code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#-*- coding:utf-8 -*- """ GLSZM Copyright (c) 2016 <NAME> This software is released under the MIT License. http://opensource.org/licenses/mit-license.php Date: 2016/01/31 """ import numpy as np from matplotlib import pyplot as plt from TextureAnalysis.Utils import normalize from scipy.ndi...
[ "numpy.unique", "numpy.hstack", "scipy.ndimage.measurements.label", "TextureAnalysis.Utils.normalize", "numpy.array", "numpy.zeros", "numpy.vstack" ]
[((856, 903), 'TextureAnalysis.Utils.normalize', 'normalize', (['img', 'level_min', 'level_max', 'threshold'], {}), '(img, level_min, level_max, threshold)\n', (865, 903), False, 'from TextureAnalysis.Utils import normalize\n'), ((1528, 1558), 'numpy.vstack', 'np.vstack', (['((j,) * mat.shape[0])'], {}), '((j,) * mat.s...
import discord from discord.ext import commands class Info: """Info is a class within Pixie that is only for accessing data from discords built in things (Although we add Pixie's status command here)""" def __init__(self, bot): self.bot = bot @commands.command(name="userinfo", pass_context=True...
[ "discord.ext.commands.command" ]
[((269, 321), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""userinfo"""', 'pass_context': '(True)'}), "(name='userinfo', pass_context=True)\n", (285, 321), False, 'from discord.ext import commands\n'), ((1058, 1111), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""guildinfo...
# # tokenize.py # # Part of the "perky" Python library # Copyright 2018-2021 by <NAME> # import ast import collections import sys token_first_characters = set() c_to_tokens = collections.defaultdict(list) s_to_token = {} tokens = {} token_to_name = {} def token(s, description): base = description.strip().lower...
[ "collections.defaultdict", "sys.exit" ]
[((178, 207), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (201, 207), False, 'import collections\n'), ((10223, 10235), 'sys.exit', 'sys.exit', (['(-1)'], {}), '(-1)\n', (10231, 10235), False, 'import sys\n')]
import logging from typing import TYPE_CHECKING from django.urls import path from django.contrib.auth import views as auth_views if TYPE_CHECKING: pass logger = logging.getLogger(__name__) app_name = 'accounts' urlpatterns = [ path('login/', auth_views.LoginView.as_view(template_name='accounts/login.html')...
[ "logging.getLogger", "django.contrib.auth.views.LoginView.as_view", "django.contrib.auth.views.LogoutView.as_view" ]
[((169, 196), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (186, 196), False, 'import logging\n'), ((255, 320), 'django.contrib.auth.views.LoginView.as_view', 'auth_views.LoginView.as_view', ([], {'template_name': '"""accounts/login.html"""'}), "(template_name='accounts/login.html')\n",...
import matplotlib matplotlib.use('Agg') import numpy as np import matplotlib.pyplot as plt import scipy.interpolate import tecplot as tp import wake_config as conf import matplotlib.ticker as ticker width = 3 #from helpers.setup_plot import * #plot_style = 'THESIS' #line_style, markers = setup_plot('THESIS', width, w...
[ "matplotlib.pyplot.savefig", "numpy.sqrt", "matplotlib.pyplot.ylabel", "matplotlib.use", "numpy.flipud", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.gca", "numpy.squeeze", "matplotlib.pyplot.close", "numpy.linspace", "matplotlib.pyplot.scatter", "matplotlib.pyplo...
[((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((384, 414), 'numpy.linspace', 'np.linspace', (['(0)', '(2.0 / 9.0)', '(300)'], {}), '(0, 2.0 / 9.0, 300)\n', (395, 414), True, 'import numpy as np\n'), ((485, 516), 'numpy.linspace', 'np.linspace'...
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('send', views.send, name='send'), path('recv', views.recv, name='recv'), path('send_action', views.send_action, name='send_action'), path('recv_action', views.recv_action, name='recv_action')...
[ "django.urls.path" ]
[((71, 106), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (75, 106), False, 'from django.urls import path\n'), ((112, 149), 'django.urls.path', 'path', (['"""send"""', 'views.send'], {'name': '"""send"""'}), "('send', views.send, name='send')\n",...
from maya import cmds import maya.mel as mel from collections import OrderedDict import time import webbrowser # Reload walkLibrary each time we execute this script to keep the package updated import walkLibrary reload(walkLibrary) # This is only for developing purposes from Qt import QtWidgets, QtCore, QtGui from fu...
[ "logging.getLogger", "webbrowser.open", "maya.cmds.setAttr", "maya.cmds.workspaceControl", "Qt.QtWidgets.QSlider", "Qt.QtWidgets.QGridLayout", "maya.OpenMayaUI.MQtUtil_mainWindow", "maya.cmds.playbackOptions", "Qt.QtWidgets.QScrollArea", "Qt.QtGui.QPixmap", "Qt.QtWidgets.QPushButton", "walkLib...
[((435, 469), 'logging.getLogger', 'logging.getLogger', (['"""WalkLibraryUI"""'], {}), "('WalkLibraryUI')\n", (452, 469), False, 'import logging\n'), ((500, 521), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (519, 521), False, 'import logging\n'), ((775, 808), 'Qt.__binding__.startswith', 'Qt.__bindi...
import json from policyglass import Condition def test_json(): subject = Condition("Key", "Operator", ["Value"]) assert subject.json() == json.dumps({"key": "Key", "operator": "Operator", "values": ["Value"]})
[ "json.dumps", "policyglass.Condition" ]
[((80, 119), 'policyglass.Condition', 'Condition', (['"""Key"""', '"""Operator"""', "['Value']"], {}), "('Key', 'Operator', ['Value'])\n", (89, 119), False, 'from policyglass import Condition\n'), ((150, 221), 'json.dumps', 'json.dumps', (["{'key': 'Key', 'operator': 'Operator', 'values': ['Value']}"], {}), "({'key': '...
#!/usr/bin/env python """ Configuration file for pytest. """ __author__ = "<NAME>" __license__ = "MIT" import sys from os.path import abspath, dirname import pytest from click.testing import CliRunner PACKAGE_PATH = abspath(dirname(dirname(__file__))) sys.path.insert(0, PACKAGE_PATH) @pytest.fixture def runner(): ...
[ "os.path.dirname", "sys.path.insert", "click.testing.CliRunner" ]
[((255, 287), 'sys.path.insert', 'sys.path.insert', (['(0)', 'PACKAGE_PATH'], {}), '(0, PACKAGE_PATH)\n', (270, 287), False, 'import sys\n'), ((331, 342), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (340, 342), False, 'from click.testing import CliRunner\n'), ((235, 252), 'os.path.dirname', 'dirname', (['...
from chainer.functions.connection import convolution_2d def dilated_convolution_2d(x, W, b=None, stride=1, pad=0, dilate=1, cover_all=False): """Two-dimensional dilated convolution function. This is an implementation of two-dimensional dilated convolution in ConvNets. It ta...
[ "chainer.functions.connection.convolution_2d.convolution_2d" ]
[((3055, 3132), 'chainer.functions.connection.convolution_2d.convolution_2d', 'convolution_2d.convolution_2d', (['x', 'W', 'b', 'stride', 'pad', 'cover_all'], {'dilate': 'dilate'}), '(x, W, b, stride, pad, cover_all, dilate=dilate)\n', (3084, 3132), False, 'from chainer.functions.connection import convolution_2d\n')]
import ssl from enum import Enum from celery import Celery from app import app def make_celery(app): celery = Celery( app.import_name, backend=app.config['CELERY_RESULT_BACKEND'], broker=app.config['CELERY_BROKER_URL'], broker_use_ssl={"ssl_cert_reqs": ssl.CERT_NONE}, redis...
[ "celery.Celery", "app.app.app_context", "app.get_db_cursor", "psycopg2.extensions.AsIs" ]
[((116, 339), 'celery.Celery', 'Celery', (['app.import_name'], {'backend': "app.config['CELERY_RESULT_BACKEND']", 'broker': "app.config['CELERY_BROKER_URL']", 'broker_use_ssl': "{'ssl_cert_reqs': ssl.CERT_NONE}", 'redis_backend_use_ssl': "{'ssl_cert_reqs': ssl.CERT_NONE}"}), "(app.import_name, backend=app.config['CELER...
import random handheld_objects = [ "coffee_cup", "paint_brush", "cologne_bottle", "ketchup_bottle", "hanger", "flowers", "shorts", "rock", "carrot", "notebook", "pepper", "apple", "bottle_opener", "clippers", "bicycle_chain", "teddy_bear" ] n = 8 for i ...
[ "random.choice" ]
[((396, 427), 'random.choice', 'random.choice', (['handheld_objects'], {}), '(handheld_objects)\n', (409, 427), False, 'import random\n')]
import torch from tools.engine import Engine from tools.config import use_cuda class GMF(torch.nn.Module): def __init__(self, config): super(GMF, self).__init__() self.num_users = config['num_users'] self.num_items = config['num_items'] self.latent_dim = config['latent_dim'] ...
[ "torch.mul", "torch.nn.Sigmoid", "tools.config.use_cuda", "torch.nn.Linear", "torch.nn.Embedding" ]
[((344, 429), 'torch.nn.Embedding', 'torch.nn.Embedding', ([], {'num_embeddings': 'self.num_users', 'embedding_dim': 'self.latent_dim'}), '(num_embeddings=self.num_users, embedding_dim=self.latent_dim\n )\n', (362, 429), False, 'import torch\n'), ((455, 540), 'torch.nn.Embedding', 'torch.nn.Embedding', ([], {'num_em...
""" ColorMatch RGB Colourspace ========================== Defines the *ColorMatch RGB* colourspace: - :attr:`colour.models.RGB_COLOURSPACE_COLOR_MATCH_RGB`. References ---------- - :cite:`Lindbloom2014a` : <NAME>. (2014). RGB Working Space Information. Retrieved April 11, 2014, from http://www.brucelindb...
[ "numpy.array", "colour.models.rgb.normalised_primary_matrix", "functools.partial", "numpy.linalg.inv" ]
[((1153, 1208), 'numpy.array', 'np.array', (['[[0.63, 0.34], [0.295, 0.605], [0.15, 0.075]]'], {}), '([[0.63, 0.34], [0.295, 0.605], [0.15, 0.075]])\n', (1161, 1208), True, 'import numpy as np\n'), ((1650, 1738), 'colour.models.rgb.normalised_primary_matrix', 'normalised_primary_matrix', (['PRIMARIES_COLOR_MATCH_RGB', ...
"""Mesh and animation export classes. @author <NAME> """ # Copyright (C) 2005 <NAME> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
[ "Blender.Get", "Blender.Mesh.New", "Blender.sys.join", "math.fabs", "Blender.Set", "Blender.Window.EditMode", "Blender.Scene.GetCurrent" ]
[((30914, 30939), 'Blender.Window.EditMode', 'Blender.Window.EditMode', ([], {}), '()\n', (30937, 30939), False, 'import Blender\n'), ((25618, 25664), 'Blender.Set', 'Blender.Set', (['"""curframe"""', 'frameNumberDict[time]'], {}), "('curframe', frameNumberDict[time])\n", (25629, 25664), False, 'import Blender\n'), ((2...
#this code is just an example from 2018 nur luege / from flask import Flask, request, render_template, abort import os, requests app = Flask(__name__) class user: def __init__(self, username, password): self.username = username self.__password = password self.files = [] def getPass(se...
[ "flask.render_template", "os.listdir", "requests.get", "flask.Flask" ]
[((137, 152), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (142, 152), False, 'from flask import Flask, request, render_template, abort\n'), ((1379, 1412), 'flask.render_template', 'render_template', (['"""loggedout.html"""'], {}), "('loggedout.html')\n", (1394, 1412), False, 'from flask import Flask, re...
from __future__ import print_function import lasagne import numpy as np # init color printer class BColors: """ Colored command line output formatting """ HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD...
[ "lasagne.layers.helper.get_all_layers", "lasagne.layers.helper.count_params" ]
[((843, 884), 'lasagne.layers.helper.get_all_layers', 'lasagne.layers.helper.get_all_layers', (['net'], {}), '(net)\n', (879, 884), False, 'import lasagne\n'), ((1150, 1189), 'lasagne.layers.helper.count_params', 'lasagne.layers.helper.count_params', (['net'], {}), '(net)\n', (1184, 1189), False, 'import lasagne\n')]
from tflearn.data_preprocessing import ImagePreprocessing import tflearn def build_net(): n = 5 tflearn.config.init_training_mode() img_prep = ImagePreprocessing() img_prep.add_featurewise_zero_center() img_prep.add_featurewise_stdnorm() # Real-time data augmentation img_aug = tflearn.I...
[ "tflearn.data_preprocessing.ImagePreprocessing", "tflearn.conv_2d", "tflearn.batch_normalization", "tflearn.DNN", "tflearn.Momentum", "tflearn.config.init_training_mode", "tflearn.ImageAugmentation", "tflearn.residual_block", "tflearn.global_avg_pool", "tflearn.regression", "tflearn.fully_connec...
[((107, 142), 'tflearn.config.init_training_mode', 'tflearn.config.init_training_mode', ([], {}), '()\n', (140, 142), False, 'import tflearn\n'), ((159, 179), 'tflearn.data_preprocessing.ImagePreprocessing', 'ImagePreprocessing', ([], {}), '()\n', (177, 179), False, 'from tflearn.data_preprocessing import ImagePreproce...
from core_data_modules.traced_data.io import TracedDataCSVIO from src.lib import PipelineConfiguration class ProductionFile(object): @staticmethod #TODO: Generate production file per episode def generate(data, production_csv_output_path): production_keys = ["uid"] for plan in PipelineConf...
[ "core_data_modules.traced_data.io.TracedDataCSVIO.export_traced_data_iterable_to_csv" ]
[((873, 962), 'core_data_modules.traced_data.io.TracedDataCSVIO.export_traced_data_iterable_to_csv', 'TracedDataCSVIO.export_traced_data_iterable_to_csv', (['data', 'f'], {'headers': 'production_keys'}), '(data, f, headers=\n production_keys)\n', (923, 962), False, 'from core_data_modules.traced_data.io import Trace...
import os import peewee from playhouse.sqlite_ext import JSONField from playhouse.sqlite_ext import ( SqliteExtDatabase, FTSModel, RowIDField, SearchField, ) database_proxy = peewee.DatabaseProxy() class BaseModel(peewee.Model): """Class base model""" class Meta: database = database...
[ "peewee.CharField", "os.getenv", "peewee.DatabaseProxy", "peewee.ForeignKeyField", "peewee.TextField", "playhouse.sqlite_ext.SearchField", "playhouse.sqlite_ext.SqliteExtDatabase", "playhouse.sqlite_ext.JSONField", "peewee.DateTimeField", "peewee.DecimalField", "playhouse.sqlite_ext.RowIDField",...
[((193, 215), 'peewee.DatabaseProxy', 'peewee.DatabaseProxy', ([], {}), '()\n', (213, 215), False, 'import peewee\n'), ((374, 392), 'peewee.AutoField', 'peewee.AutoField', ([], {}), '()\n', (390, 392), False, 'import peewee\n'), ((404, 433), 'peewee.CharField', 'peewee.CharField', ([], {'unique': '(True)'}), '(unique=T...
import sys import pathlib import unittest import yaml from net_models.models.BaseModels import BaseNetModel, VendorIndependentBaseModel from net_models.utils import get_logger class TestBaseNetModel(unittest.TestCase): LOGGER = get_logger(name="NetCm-Tests", verbosity=5) TEST_CLASS = BaseNetModel def tes...
[ "unittest.main", "net_models.utils.get_logger", "pathlib.Path" ]
[((234, 277), 'net_models.utils.get_logger', 'get_logger', ([], {'name': '"""NetCm-Tests"""', 'verbosity': '(5)'}), "(name='NetCm-Tests', verbosity=5)\n", (244, 277), False, 'from net_models.utils import get_logger\n'), ((1715, 1730), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1728, 1730), False, 'import unit...
# -*- encoding: utf-8 -*- import os import sys import platform import re import shutil import click from .crypto import Md5 def mkdir_p(absolute_path): """mkdir -p implement Usage: mkdir_p('D:\\A\\B\\C.txt') mkdir_p('~/A/B/C') """ path = os.path.dirname(absolute_path) if not os.path.ex...
[ "os.path.exists", "os.makedirs", "os.getenv", "os.path.join", "os.getcwd", "os.path.isfile", "os.path.dirname", "platform.system", "os.path.realpath", "shutil.copyfile", "shutil.copytree", "os.path.basename", "shutil.rmtree", "os.system", "os.walk", "os.remove" ]
[((268, 298), 'os.path.dirname', 'os.path.dirname', (['absolute_path'], {}), '(absolute_path)\n', (283, 298), False, 'import os\n'), ((867, 887), 'os.path.isfile', 'os.path.isfile', (['path'], {}), '(path)\n', (881, 887), False, 'import os\n'), ((1007, 1020), 'os.walk', 'os.walk', (['path'], {}), '(path)\n', (1014, 102...
import requests from bs4 import BeautifulSoup from fake_useragent import UserAgent import re from datetime import datetime from time import sleep from random import randint FILE_PATH = './' host = 'https://www.cableav.tv/' proxies = { 'http': 'http://127.0.0.1:7890', 'https': 'http://127.0.0.1:7890' } ua = UserA...
[ "re.match", "requests.get", "bs4.BeautifulSoup", "datetime.datetime.now", "random.randint", "fake_useragent.UserAgent" ]
[((315, 326), 'fake_useragent.UserAgent', 'UserAgent', ([], {}), '()\n', (324, 326), False, 'from fake_useragent import UserAgent\n'), ((844, 895), 'requests.get', 'requests.get', (['url'], {'headers': 'headers', 'proxies': 'proxies'}), '(url, headers=headers, proxies=proxies)\n', (856, 895), False, 'import requests\n'...
import networkit as nw from dwave_qbsolv import QBSolv import matplotlib.pyplot as plt import random from datetime import datetime import argparse import time import numpy as np import networkx as nx from qiskit import BasicAer from qiskit import QuantumCircuit, execute, Aer from qiskit.optimization.applications.ising ...
[ "networkit.nxadapter.nx2nk", "QAOAKit.qaoa.get_maxcut_qaoa_circuit", "qiskit.algorithms.optimizers.L_BFGS_B", "random.randint", "random.shuffle", "argparse.ArgumentParser", "numpy.full", "time.perf_counter", "networkit.nxadapter.nk2nx", "dwave_qbsolv.QBSolv", "numpy.random.seed", "numpy.random...
[((670, 695), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (693, 695), False, 'import argparse\n'), ((27983, 28002), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (28000, 28002), False, 'import time\n'), ((28103, 28122), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n'...
from urllib import quote import re import uuid class UM(object): def __init__(self): self.name = "Uri Manipulation" @staticmethod def uuid_uri(prefix): """Construct a URI using a UUID""" return prefix + str(uuid.uuid1()) @staticmethod def uuid_uri_or_empty(prefix, value)...
[ "urllib.quote", "re.sub", "uuid.uuid1" ]
[((1627, 1657), 're.sub', 're.sub', (['"""[^A-Za-z0-9]+"""', '""""""', 'x'], {}), "('[^A-Za-z0-9]+', '', x)\n", (1633, 1657), False, 'import re\n'), ((1049, 1066), 'urllib.quote', 'quote', (['c'], {'safe': '""""""'}), "(c, safe='')\n", (1054, 1066), False, 'from urllib import quote\n'), ((246, 258), 'uuid.uuid1', 'uuid...
import directory_scanner as scanner import converter import directory_controller as directory def collect_scannable_files(): acceptable_file_extensions = [".xlsx", ".csv"] return scanner.remove_invalid_file_types(scanner.retrieve_files("./data_files/machine_readable_files/*.*"), acceptable_file_extensions) PA...
[ "converter.scan_document", "directory_scanner.strip_path_and_ending", "directory_scanner.retrieve_files", "directory_controller.generate_directory" ]
[((486, 522), 'directory_scanner.strip_path_and_ending', 'scanner.strip_path_and_ending', (['files'], {}), '(files)\n', (515, 522), True, 'import directory_scanner as scanner\n'), ((222, 287), 'directory_scanner.retrieve_files', 'scanner.retrieve_files', (['"""./data_files/machine_readable_files/*.*"""'], {}), "('./dat...
import pytest import deepdiff import typing from sqlalchemy.orm import Session from mlrun.api import schemas from mlrun.api.db.base import DBInterface from mlrun.api.db.sqldb.models import ( _classes, Function, Project, Run, Artifact, FeatureSet, Feature, Entity, Schedule, ) from te...
[ "deepdiff.DeepDiff", "mlrun.api.schemas.Feature", "pytest.mark.parametrize", "mlrun.api.schemas.ScheduleCronTrigger", "mlrun.api.schemas.ObjectMetadata", "mlrun.api.schemas.Entity" ]
[((443, 538), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""db,db_session"""', '[(dbs[0], dbs[0])]'], {'indirect': "['db', 'db_session']"}), "('db,db_session', [(dbs[0], dbs[0])], indirect=['db',\n 'db_session'])\n", (466, 538), False, 'import pytest\n'), ((7842, 7880), 'mlrun.api.schemas.ScheduleCronT...
from typing import Callable, Dict, List, Optional from pydantic import root_validator, validator from pydantic.fields import ModelField from sqlalchemy import and_, or_ from const import FilterOperator from schemas.bases import BaseModel class FilterParam(BaseModel): conjunctive: Optional[Callable] field_na...
[ "pydantic.validator", "pydantic.root_validator" ]
[((444, 468), 'pydantic.root_validator', 'root_validator', ([], {'pre': '(True)'}), '(pre=True)\n', (458, 468), False, 'from pydantic import root_validator, validator\n'), ((589, 630), 'pydantic.validator', 'validator', (['"""conjunctive"""', '"""sep"""'], {'pre': '(True)'}), "('conjunctive', 'sep', pre=True)\n", (598,...
#!/usr/bin/env python from distutils.core import setup import sys import os import shutil command = sys.argv[1] if len(sys.argv) >= 2 else "" is_build = command.startswith("build") or command.startswith("install") or command.startswith("bdist") if sys.platform == "win32": package_data = {"glfw": ["glfw.dll"]} ...
[ "os.path.exists", "distutils.core.setup", "os.chdir", "shutil.copyfile", "sys.exit", "os.system" ]
[((2194, 2213), 'distutils.core.setup', 'setup', ([], {}), '(**setup_info)\n', (2199, 2213), False, 'from distutils.core import setup\n'), ((344, 409), 'shutil.copyfile', 'shutil.copyfile', (['"""glfw-2.7.5/lib/win32/glfw.dll"""', '"""glfw/glfw.dll"""'], {}), "('glfw-2.7.5/lib/win32/glfw.dll', 'glfw/glfw.dll')\n", (359...
from dsa_linked_list import DSALinkedList import pickle from unittest import TestCase class DSALinkedListTest(TestCase): test_size = 10 def setUp(self) -> None: self._list = DSALinkedList() def test_insert_first(self) -> None: for i in range(self.test_size): self._list.inser...
[ "pickle.dumps", "pickle.loads", "dsa_linked_list.DSALinkedList" ]
[((194, 209), 'dsa_linked_list.DSALinkedList', 'DSALinkedList', ([], {}), '()\n', (207, 209), False, 'from dsa_linked_list import DSALinkedList\n'), ((3282, 3306), 'pickle.dumps', 'pickle.dumps', (['self._list'], {}), '(self._list)\n', (3294, 3306), False, 'import pickle\n'), ((3328, 3343), 'pickle.loads', 'pickle.load...
#!/usr/bin/env python # -*- coding=utf-8 -*- # 关闭浏览器缓存 # https://stackoverflow.com/questions/2095520/fighting-client-side-caching-in-django # This approach (slight modification of L. De Leo's solution) with a custom middleware has worked well for me as a site wide solution: from django.utils.cache import add_never_cac...
[ "django.utils.cache.add_never_cache_headers" ]
[((442, 475), 'django.utils.cache.add_never_cache_headers', 'add_never_cache_headers', (['response'], {}), '(response)\n', (465, 475), False, 'from django.utils.cache import add_never_cache_headers\n')]
""" Generates a random key. """ import string import random def generate(): """ Generates the key. """ uni = string.ascii_letters + string.digits + string.punctuation key = ''.join([random.SystemRandom().choice(uni) for i in range(random.randint(45, 50))]) return key
[ "random.SystemRandom", "random.randint" ]
[((204, 225), 'random.SystemRandom', 'random.SystemRandom', ([], {}), '()\n', (223, 225), False, 'import random\n'), ((253, 275), 'random.randint', 'random.randint', (['(45)', '(50)'], {}), '(45, 50)\n', (267, 275), False, 'import random\n')]
import math import warnings from torch.optim.lr_scheduler import _LRScheduler, CosineAnnealingLR class CosineAnnealingWarmRestarts(_LRScheduler): r"""Set the learning rate of each parameter group using a cosine annealing schedule, where :math:`\eta_{max}` is set to the initial lr, :math:`T_{cur}` is the n...
[ "warnings.warn", "math.cos", "math.log", "math.floor" ]
[((4262, 4279), 'math.floor', 'math.floor', (['epoch'], {}), '(epoch)\n', (4272, 4279), False, 'import math\n'), ((1950, 2074), 'warnings.warn', 'warnings.warn', (['"""To get the last learning rate computed by the scheduler, please use `get_last_lr()`."""', 'UserWarning'], {}), "(\n 'To get the last learning rate co...
from PiControl import db class Node(db.Model): __tablename__ = 'nodes' id = db.Column(db.Integer, primary_key=True) ipaddress = db.Column(db.String(12), unique=True, nullable=False) hostname = db.Column(db.String(120), unique=False, nullable=False) revision = db.Column(db.Strin...
[ "PiControl.db.String", "PiControl.db.Column" ]
[((95, 134), 'PiControl.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (104, 134), False, 'from PiControl import db\n'), ((376, 428), 'PiControl.db.Column', 'db.Column', (['db.DateTime'], {'unique': '(False)', 'nullable': '(False)'}), '(db.DateTime, unique=Fals...
from setuptools import setup, find_packages from codecs import open from os import path import re here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() with open(path.join(here, 'disband', '__init__.py'), encoding='utf-8') as f: ...
[ "os.path.dirname", "setuptools.find_packages", "os.path.join" ]
[((119, 141), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (131, 141), False, 'from os import path\n'), ((154, 182), 'os.path.join', 'path.join', (['here', '"""README.md"""'], {}), "(here, 'README.md')\n", (163, 182), False, 'from os import path\n'), ((251, 292), 'os.path.join', 'path.join', (...
import pytest import mock from nose.tools import * # flake8: noqa from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from osf_tests.factories import AuthUserFactory, ProjectFactory pytestmark = pytest.mark.skip('Unskip when throttling no longer fails on travis') class TestDefaultT...
[ "pytest.mark.skip", "mock.patch", "osf_tests.factories.AuthUserFactory", "osf_tests.factories.ProjectFactory" ]
[((231, 299), 'pytest.mark.skip', 'pytest.mark.skip', (['"""Unskip when throttling no longer fails on travis"""'], {}), "('Unskip when throttling no longer fails on travis')\n", (247, 299), False, 'import pytest\n'), ((355, 411), 'mock.patch', 'mock.patch', (['"""api.base.throttling.BaseThrottle.get_ident"""'], {}), "(...
# Copyright (c) 2021 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, ...
[ "bip_utils.utils.conf.CoinNames" ]
[((1951, 1976), 'bip_utils.utils.conf.CoinNames', 'CoinNames', (['"""Acala"""', '"""ACA"""'], {}), "('Acala', 'ACA')\n", (1960, 1976), False, 'from bip_utils.utils.conf import CoinNames\n'), ((2144, 2177), 'bip_utils.utils.conf.CoinNames', 'CoinNames', (['"""Akash Network"""', '"""AKT"""'], {}), "('Akash Network', 'AKT...
import graphene from django_prices.models import MoneyField, TaxedMoneyField from graphene_django.converter import convert_django_field from .types import Money, TaxedMoney @convert_django_field.register(TaxedMoneyField) def convert_field_tax(field, registry=None): return graphene.Field(TaxedMoney) @convert_dj...
[ "graphene.Field", "graphene_django.converter.convert_django_field.register" ]
[((177, 223), 'graphene_django.converter.convert_django_field.register', 'convert_django_field.register', (['TaxedMoneyField'], {}), '(TaxedMoneyField)\n', (206, 223), False, 'from graphene_django.converter import convert_django_field\n'), ((310, 351), 'graphene_django.converter.convert_django_field.register', 'convert...
"""Tests for /balance routes.""" from datetime import datetime from decimal import Decimal from typing import Any, Dict, List, Optional from unittest import main, IsolatedAsyncioTestCase as TestCase from uuid import UUID from db_wrapper.model import sql # internal test dependencies from tests.helpers.application imp...
[ "tests.helpers.application.get_token_header", "db_wrapper.model.sql.Literal", "tests.helpers.database.setup_account", "tests.helpers.database.setup_user", "datetime.datetime.fromisoformat", "unittest.main", "tests.helpers.application.get_test_client", "db_wrapper.model.sql.SQL", "decimal.Decimal" ]
[((557, 572), 'decimal.Decimal', 'Decimal', (['"""1.00"""'], {}), "('1.00')\n", (564, 572), False, 'from decimal import Decimal\n'), ((664, 712), 'datetime.datetime.fromisoformat', 'datetime.fromisoformat', (['"""2019-12-10T08:12-05:00"""'], {}), "('2019-12-10T08:12-05:00')\n", (686, 712), False, 'from datetime import ...
#!/usr/bin/env python3 import sys from macroassembler import instructions # Generate a simple "Hello, World" program that writes to the QEMU Virt # machine's UART device def gen_hello_world(): # Put the UART address (0x10000000) into R1 yield 'addi', dict(imm=0x1, rs1=0x0, rd=0x1) # R1 ← R0 + 1 ...
[ "sys.exit" ]
[((842, 853), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (850, 853), False, 'import sys\n')]
""" This module contains some useful tool for simplifying request process """ import os from dingtalk_sdk_gmdzy2010.authority_request import AccessTokenRequest,\ SnsAccessTokenRequest, PersistentCodeRequest, SnsTokenRequest,\ UserInfoRequest from dingtalk_sdk_gmdzy2010.department_request import DeptsRequest,\ ...
[ "dingtalk_sdk_gmdzy2010.message_request.SendGroupChatRequest", "dingtalk_sdk_gmdzy2010.message_request.WorkNoticeRequest", "dingtalk_sdk_gmdzy2010.user_request.UseridByUnionidRequest", "os.environ.get", "dingtalk_sdk_gmdzy2010.authority_request.SnsTokenRequest", "dingtalk_sdk_gmdzy2010.authority_request.P...
[((656, 688), 'os.environ.get', 'os.environ.get', (['"""DINGTALK_APPID"""'], {}), "('DINGTALK_APPID')\n", (670, 688), False, 'import os\n'), ((710, 746), 'os.environ.get', 'os.environ.get', (['"""DINGTALK_APPSECRET"""'], {}), "('DINGTALK_APPSECRET')\n", (724, 746), False, 'import os\n'), ((802, 835), 'os.environ.get', ...
import time import numpy as np from airobot import Robot from airobot import log_warn from airobot.utils.common import euler2quat def main(): """ This function shows an example of block stacking. """ np.set_printoptions(precision=4, suppress=True) robot = Robot('franka') success = robot.arm....
[ "time.sleep", "numpy.zeros", "airobot.utils.common.euler2quat", "airobot.Robot", "airobot.log_warn", "numpy.set_printoptions" ]
[((220, 267), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'precision': '(4)', 'suppress': '(True)'}), '(precision=4, suppress=True)\n', (239, 267), True, 'import numpy as np\n'), ((280, 295), 'airobot.Robot', 'Robot', (['"""franka"""'], {}), "('franka')\n", (285, 295), False, 'from airobot import Robot\n'), ...
import argparse import os from collections import namedtuple from tqdm import tqdm import librosa def get_parser(): parser = argparse.ArgumentParser( description="Launch distributed process with appropriate options. ", formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_arg...
[ "os.path.isfile", "collections.namedtuple", "argparse.ArgumentParser", "os.getcwd" ]
[((602, 656), 'collections.namedtuple', 'namedtuple', (['"""Entry"""', "['start', 'stop', 'name', 'tier']"], {}), "('Entry', ['start', 'stop', 'name', 'tier'])\n", (612, 656), False, 'from collections import namedtuple\n'), ((130, 287), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Laun...
# -*- coding: utf-8 -*- #pylint: disable = missing-docstring, blacklisted-name, unused-argument, invalid-name, line-too-long, protected-access import unittest import re from nltk.tokenize.punkt import PunktSentenceTokenizer, PunktLanguageVars import context #pylint: disable=unused-import from qcrit import textual_fea...
[ "qcrit.textual_feature.word_tokenizer.word_tokenize", "re.compile", "qcrit.textual_feature.setup_tokenizers", "qcrit.textual_feature.sentence_tokenizer.tokenize", "unittest.main", "nltk.tokenize.punkt.PunktSentenceTokenizer", "nltk.tokenize.punkt.PunktLanguageVars" ]
[((390, 460), 'qcrit.textual_feature.setup_tokenizers', 'textual_feature.setup_tokenizers', ([], {'terminal_punctuation': "('.', ';', ';')"}), "(terminal_punctuation=('.', ';', ';'))\n", (422, 460), False, 'from qcrit import textual_feature\n'), ((465, 484), 'nltk.tokenize.punkt.PunktLanguageVars', 'PunktLanguageVars',...
""" Copyright (c) 2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
[ "torch.onnx.symbolic_helper.parse_args", "numpy.uint8", "PIL.Image.fromarray", "torch.onnx.symbolic_opset9.reshape", "scripts.default_config.get_default_config", "numpy.random.rand", "argparse.ArgumentParser", "torch.onnx.symbolic_registry.register_op", "torch.onnx.export", "torchreid.utils.load_p...
[((997, 1037), 'torch.onnx.symbolic_helper.parse_args', 'parse_args', (['"""v"""', '"""i"""', '"""v"""', '"""v"""', '"""f"""', '"""i"""'], {}), "('v', 'i', 'v', 'v', 'f', 'i')\n", (1007, 1037), False, 'from torch.onnx.symbolic_helper import parse_args\n'), ((2395, 2414), 'numpy.uint8', 'np.uint8', (['(img * 255)'], {})...
from django.db import models class Project(models.Model): startDate=models.DateField() endDate=models.DateField() name=models.CharField(max_length=80) assignedTo=models.CharField(max_length=80) priority=models.IntegerField() def __str__(self): return self.name
[ "django.db.models.DateField", "django.db.models.CharField", "django.db.models.IntegerField" ]
[((73, 91), 'django.db.models.DateField', 'models.DateField', ([], {}), '()\n', (89, 91), False, 'from django.db import models\n'), ((104, 122), 'django.db.models.DateField', 'models.DateField', ([], {}), '()\n', (120, 122), False, 'from django.db import models\n'), ((132, 163), 'django.db.models.CharField', 'models.Ch...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import depthrender.depthrender_pb2 as depthrender__pb2 class DepthRenderStub(object): """The greeting service definition. """ def __init__(self, c...
[ "grpc.method_handlers_generic_handler", "grpc.experimental.unary_unary", "grpc.unary_unary_rpc_method_handler" ]
[((2474, 2562), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""depthrender.DepthRender"""', 'rpc_method_handlers'], {}), "('depthrender.DepthRender',\n rpc_method_handlers)\n", (2510, 2562), False, 'import grpc\n'), ((1835, 2059), 'grpc.unary_unary_rpc_method_handler', 'grpc.un...
from flask import ( Blueprint, render_template ) import datetime from survey._app import csrf_protect from survey.tasks.task import handle_task_done, handle_task_index #### const bp = Blueprint("tasks.hexaco", __name__) FIELDS = {f"q{i}" for i in range(1, 31)} FEATURES = { "hexaco_Honesty_Humility", "hex...
[ "datetime.datetime.now", "flask.Blueprint", "survey.tasks.task.handle_task_done", "survey.tasks.task.handle_task_index" ]
[((190, 225), 'flask.Blueprint', 'Blueprint', (['"""tasks.hexaco"""', '__name__'], {}), "('tasks.hexaco', __name__)\n", (199, 225), False, 'from flask import Blueprint, render_template\n'), ((2095, 2141), 'survey.tasks.task.handle_task_index', 'handle_task_index', (['"""hexaco"""', 'validate_response'], {}), "('hexaco'...
from pprint import pprint as p import time import datetime from icv5.components.monday import boardItem, column_keys, boardItems_inventory, boardItems_main, exceptions, manage class ReportingWrapper(boardItem.MondayWrapper): def __init__(self, item_id, parent_obj, blank_item=False): new_column_dictiona...
[ "icv5.components.monday.boardItems_inventory.InventoryRepairItem", "icv5.components.monday.manage.Manager", "icv5.components.monday.boardItems_inventory.InventoryPartItem", "datetime.datetime.now", "icv5.components.monday.exceptions.TooManyItemsFoundInProducts" ]
[((1625, 1687), 'icv5.components.monday.boardItems_inventory.InventoryPartItem', 'boardItems_inventory.InventoryPartItem', (['self.partboard_id.easy'], {}), '(self.partboard_id.easy)\n', (1663, 1687), False, 'from icv5.components.monday import boardItem, column_keys, boardItems_inventory, boardItems_main, exceptions, m...
# Crie um programa que faça o computador jogar Jokenpô com você. from random import choice from time import sleep #Armazenamento de Dados escolha_do_jogador = str(input('\033[1;4;31;40mSUAS OPÇÕES:' '\n[PEDRA]' '\n[PAPEL]' '\n...
[ "random.choice", "time.sleep" ]
[((463, 478), 'random.choice', 'choice', (['jokenpo'], {}), '(jokenpo)\n', (469, 478), False, 'from random import choice\n'), ((517, 525), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (522, 525), False, 'from time import sleep\n'), ((539, 547), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (544, 547), False, 'from t...
"""Test pregnancy state notations.""" # pylint: disable=missing-module-docstring,missing-class-docstring # pylint: disable=missing-function-docstring,too-many-public-methods import unittest from vertnet.pylib.trait import Trait from vertnet.parsers.pregnancy_state import PREGNANCY_STATE class TestPregnancyState(unitt...
[ "vertnet.parsers.pregnancy_state.PREGNANCY_STATE.parse", "vertnet.pylib.trait.Trait" ]
[((402, 448), 'vertnet.parsers.pregnancy_state.PREGNANCY_STATE.parse', 'PREGNANCY_STATE.parse', (['"""pregnant; 4 emb 3L 1R"""'], {}), "('pregnant; 4 emb 3L 1R')\n", (423, 448), False, 'from vertnet.parsers.pregnancy_state import PREGNANCY_STATE\n'), ((583, 635), 'vertnet.parsers.pregnancy_state.PREGNANCY_STATE.parse',...
"""model definitions""" from typing import ( Any, Generic, Literal, Mapping, Optional, Tuple, TypeVar, Union, final, ) from pydantic import BaseModel from ..domain import DomainException from .error import UseCaseException _OptionalMapping = Optional[Mapping[str, Any]] class DTO...
[ "typing.TypeVar" ]
[((798, 829), 'typing.TypeVar', 'TypeVar', (['"""_T1"""'], {'bound': 'InputData'}), "('_T1', bound=InputData)\n", (805, 829), False, 'from typing import Any, Generic, Literal, Mapping, Optional, Tuple, TypeVar, Union, final\n'), ((1440, 1472), 'typing.TypeVar', 'TypeVar', (['"""_T2"""'], {'bound': 'OutputData'}), "('_T...
import sys import os import torch import yaml from easydict import EasyDict as edict from pytorch_transformers.tokenization_bert import BertTokenizer from vilbert.datasets import ConceptCapLoaderTrain, ConceptCapLoaderVal from vilbert.vilbert import VILBertForVLTasks, BertConfig, BertForMultiModalPreTraining from vilb...
[ "maskrcnn_benchmark.config.cfg.merge_from_file", "torch.from_numpy", "torch.full_like", "numpy.array", "maskrcnn_benchmark.modeling.detector.build_detection_model", "torch.nn.functional.softmax", "numpy.save", "matplotlib.pyplot.imshow", "numpy.repeat", "argparse.ArgumentParser", "numpy.max", ...
[((10870, 10885), 'matplotlib.pyplot.imshow', 'plt.imshow', (['img'], {}), '(img)\n', (10880, 10885), True, 'import matplotlib.pyplot as plt\n'), ((10895, 10904), 'matplotlib.pyplot.gca', 'plt.gca', ([], {}), '()\n', (10902, 10904), True, 'import matplotlib.pyplot as plt\n'), ((11540, 11592), 'matplotlib.pyplot.subplot...
import os import re xrdb_regex = re.compile("(.+)\.[xX][rR][dD][bB]$") class Xrdb(object): def __init__(self, filename): """Parse an xrdb file""" self.name = xrdb_regex.match(os.path.basename(filename)).group(1) self.colors = [None] * 16 color_regex = re.compile("#define +Ansi_...
[ "os.listdir", "os.path.join", "os.path.basename", "re.compile" ]
[((35, 73), 're.compile', 're.compile', (['"""(.+)\\\\.[xX][rR][dD][bB]$"""'], {}), "('(.+)\\\\.[xX][rR][dD][bB]$')\n", (45, 73), False, 'import re\n'), ((294, 353), 're.compile', 're.compile', (['"""#define +Ansi_(\\\\d+)_Color +(#[A-Fa-f0-9]{6})"""'], {}), "('#define +Ansi_(\\\\d+)_Color +(#[A-Fa-f0-9]{6})')\n", (304...
import json import os from os.path import exists, join as p import tarfile import pytest from owmeta_core.bundle.archive import (Archiver, ArchiveTargetPathDoesNotExist) from owmeta_core.bundle.exceptions import BundleNotFound from owmeta_core.bundle import Descriptor, BUNDLE_INDEXED_DB_NAME, BUNDLE_MANIFEST_FILE_NAM...
[ "os.path.exists", "tarfile.open", "os.listdir", "os.path.join", "pytest.fail", "json.load", "owmeta_core.bundle.archive.Archiver", "pytest.raises", "owmeta_core.bundle.Descriptor.load" ]
[((758, 767), 'os.path.exists', 'exists', (['s'], {}), '(s)\n', (764, 767), False, 'from os.path import exists, join as p\n'), ((851, 906), 'owmeta_core.bundle.Descriptor.load', 'Descriptor.load', (['"""\n id: dep\n version: 1\n """'], {}), '("""\n id: dep\n version: 1\n """)\n', (866, 906), False, 'f...
# The MIT License (MIT) # # Copyright (c) 2020 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
[ "digitalio.DigitalInOut", "time.sleep", "busio.UART", "circuitpython_dynamixel.Dynamixel" ]
[((1209, 1242), 'digitalio.DigitalInOut', 'digitalio.DigitalInOut', (['board.D12'], {}), '(board.D12)\n', (1231, 1242), False, 'import digitalio\n'), ((1318, 1366), 'busio.UART', 'busio.UART', (['board.TX', 'board.RX'], {'baudrate': '(1000000)'}), '(board.TX, board.RX, baudrate=1000000)\n', (1328, 1366), False, 'import...
""" Routines for Fourier transform. """ from __future__ import division from ..datatable.wrapping import wrap from ..datatable import column from . import waveforms, specfunc import numpy as np import numpy.fft as fft def truncate_len_pow2(trace, truncate_power=None): """ Truncate trace length to t...
[ "numpy.sqrt", "numpy.fft.fft", "numpy.column_stack", "numpy.real", "numpy.zeros", "numpy.array", "numpy.concatenate", "numpy.fft.ifft" ]
[((8192, 8212), 'numpy.fft.ifft', 'fft.ifft', (['ft_ordered'], {}), '(ft_ordered)\n', (8200, 8212), True, 'import numpy.fft as fft\n'), ((11132, 11149), 'numpy.real', 'np.real', (['ft[0, 1]'], {}), '(ft[0, 1])\n', (11139, 11149), True, 'import numpy as np\n'), ((5181, 5202), 'numpy.fft.fft', 'fft.fft', (['trace_values'...
######################################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # SPDX-License-Identifier: MIT-0 # # ...
[ "json.loads", "argparse.ArgumentParser", "subprocess.Popen", "json.dumps", "os.environ.get", "requests.get", "getpass.getpass", "sys.exit", "json.load" ]
[((1733, 1753), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (1742, 1753), False, 'import json\n'), ((4031, 4134), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'argparse.RawDescriptionHelpFormatter'}), '(description=__doc__, formatter_class=...
from meetup import app app.run()
[ "meetup.app.run" ]
[((23, 32), 'meetup.app.run', 'app.run', ([], {}), '()\n', (30, 32), False, 'from meetup import app\n')]
# Copyright 2021 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/li...
[ "numpy.clip", "tempfile.TemporaryDirectory", "util.h5_util.write_data_to_h5", "util.h5_util.load_h5_file", "pathlib.Path", "numpy.random.random", "numpy.zeros", "numpy.argwhere" ]
[((942, 983), 'numpy.zeros', 'np.zeros', ([], {'shape': '(5, 5, 5)', 'dtype': 'np.uint8'}), '(shape=(5, 5, 5), dtype=np.uint8)\n', (950, 983), True, 'import numpy as np\n'), ((1002, 1023), 'numpy.clip', 'np.clip', (['data', '(0)', '(255)'], {}), '(data, 0, 255)\n', (1009, 1023), True, 'import numpy as np\n'), ((1078, 1...
#!/usr/bin/env python3 # Requirements: # pip3 install pillow """ This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-com...
[ "PIL.Image.frombytes", "argparse.FileType", "argparse.ArgumentParser", "sys.exit" ]
[((2964, 3055), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Converts a TBF file (or wclogo.bin) to an image"""'}), "(description=\n 'Converts a TBF file (or wclogo.bin) to an image')\n", (2987, 3055), False, 'import argparse\n'), ((2827, 2859), 'PIL.Image.frombytes', 'Image.frombyt...
import warnings from collections import deque from django.db import connections from django.conf import settings from sqlalchemy import MetaData, create_engine from sqlalchemy.pool import NullPool from sqlalchemy.pool import _ConnectionRecord as _ConnectionRecordBase from .wrapper import Wrapper from .sqlite import Sq...
[ "warnings.warn", "sqlalchemy.MetaData", "collections.deque", "time.time" ]
[((2012, 2022), 'sqlalchemy.MetaData', 'MetaData', ([], {}), '()\n', (2020, 2022), False, 'from sqlalchemy import MetaData, create_engine\n'), ((2836, 2843), 'collections.deque', 'deque', ([], {}), '()\n', (2841, 2843), False, 'from collections import deque\n'), ((2869, 2880), 'time.time', 'time.time', ([], {}), '()\n'...
import pytest import logging logger = logging.getLogger(__name__) @pytest.fixture(autouse=True) def check_k8s_vms(k8scluster): """ This fixture runs before each k8s test to make sure that Kubernetes API server is reachable on all backend master servers This fixture also runs after each test to start kube...
[ "logging.getLogger", "pytest.fixture" ]
[((39, 66), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (56, 66), False, 'import logging\n'), ((70, 98), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (84, 98), False, 'import pytest\n'), ((615, 643), 'pytest.fixture', 'pytest.fixture', ([], {'aut...
import copy import sqlite3 from ..error.CmdExecError import CmdExecError from ..database.Column import Column from ..database.DomainObject import DomainObject from ..service.ConfigurationService import ConfigurationService from ..util.FileUtil import FileUtil from ..service.AppService import AppService clas...
[ "sqlite3.connect", "copy.deepcopy" ]
[((1977, 1998), 'sqlite3.connect', 'sqlite3.connect', (['path'], {}), '(path)\n', (1992, 1998), False, 'import sqlite3\n'), ((2528, 2546), 'copy.deepcopy', 'copy.deepcopy', (['obj'], {}), '(obj)\n', (2541, 2546), False, 'import copy\n')]
from locust import HttpUser, between, SequentialTaskSet, task from locust_plugins import run_single_user from lxml import html class Exercise1Tasks(SequentialTaskSet): wait_time = between(4, 6) @task def GET_https_antycaptcha_amberteam_pl_2022377847__exercises_exercise1_1359742899_8059969736143727959(sel...
[ "locust_plugins.run_single_user", "lxml.html.fromstring", "locust.between" ]
[((186, 199), 'locust.between', 'between', (['(4)', '(6)'], {}), '(4, 6)\n', (193, 199), False, 'from locust import HttpUser, between, SequentialTaskSet, task\n'), ((6676, 6702), 'locust_plugins.run_single_user', 'run_single_user', (['Exercise1'], {}), '(Exercise1)\n', (6691, 6702), False, 'from locust_plugins import r...
import requests import csv import config """This module is a simple program that takes a ZIP Code and a POI and finds the top 10 near the given ZIP Code.""" zip_code = input('Please enter a ZIP Code. ') term = input('What do you want to search for near {0}? '.format(zip_code)) bus = [] final = [] url = 'h...
[ "csv.writer", "requests.get" ]
[((550, 599), 'requests.get', 'requests.get', (['url'], {'headers': 'headers', 'params': 'params'}), '(url, headers=headers, params=params)\n', (562, 599), False, 'import requests\n'), ((1168, 1184), 'csv.writer', 'csv.writer', (['file'], {}), '(file)\n', (1178, 1184), False, 'import csv\n')]
# Generated by Django 3.1 on 2020-08-28 16:43 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0009_auto_20200828_2112'), ] operations = [ migrations.AlterField( model_name='notification', ...
[ "datetime.datetime" ]
[((380, 430), 'datetime.datetime', 'datetime.datetime', (['(2020)', '(8)', '(28)', '(22)', '(28)', '(31)', '(982561)'], {}), '(2020, 8, 28, 22, 28, 31, 982561)\n', (397, 430), False, 'import datetime\n')]
import math import pytest import tensorflow as tf from tests.tests_utils import tf_equal from transformer.train.metrics import MaskedSparseCategoricalCrossentropy from transformer.train.metrics import MaskedAccuracy @pytest.fixture(scope="module") def y_true(): return tf.constant([[0, 2, 1], [0, 1, 2]], dtype=tf...
[ "transformer.train.metrics.MaskedAccuracy", "transformer.train.metrics.MaskedSparseCategoricalCrossentropy", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.constant", "pytest.fixture" ]
[((220, 250), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (234, 250), False, 'import pytest\n'), ((330, 360), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (344, 360), False, 'import pytest\n'), ((709, 739), 'pytest.fixture', 'p...
import numpy as np class Channel: def __init__(self, inst): """Initializes a new device. Args: inst -- instrument in which the channels are """ self.inst = inst self.inst.write(":WAV:FORM BYTE") self.inst.write(":WAV:POIN:MODE MAX") def get_time_scale(...
[ "numpy.frombuffer" ]
[((5029, 5063), 'numpy.frombuffer', 'np.frombuffer', (['rawdata[10:-1]', '"""B"""'], {}), "(rawdata[10:-1], 'B')\n", (5042, 5063), True, 'import numpy as np\n')]
import numpy as np import utils def mk_training_matrices(pairs, en_dimension, cat_dimension, english_space, catalan_space): en_mat = np.zeros((len(pairs),en_dimension)) cat_mat = np.zeros((len(pairs),cat_dimension)) c = 0 for p in pairs: en_word,cat_word = p.split() en_mat[c] = englis...
[ "utils.readDM", "utils.neighbours", "numpy.dot", "numpy.linalg.lstsq" ]
[((661, 699), 'utils.readDM', 'utils.readDM', (['"""data/english.subset.dm"""'], {}), "('data/english.subset.dm')\n", (673, 699), False, 'import utils\n'), ((716, 754), 'utils.readDM', 'utils.readDM', (['"""data/catalan.subset.dm"""'], {}), "('data/catalan.subset.dm')\n", (728, 754), False, 'import utils\n'), ((1678, 1...
import os import binascii class BinaryFile: OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' def __init__(self, *args, **kwargs) -> None: self.bfc = list(args) self.lgbuf = kwargs.get('lgbuf', 16) self.manual = kwargs.get('manual', False) ...
[ "os.path.getsize", "binascii.hexlify" ]
[((337, 365), 'os.path.getsize', 'os.path.getsize', (['self.bfc[0]'], {}), '(self.bfc[0])\n', (352, 365), False, 'import os\n'), ((5432, 5460), 'os.path.getsize', 'os.path.getsize', (['self.bfc[0]'], {}), '(self.bfc[0])\n', (5447, 5460), False, 'import os\n'), ((5464, 5484), 'os.path.getsize', 'os.path.getsize', (['bfc...
import logging import json import tornado.ioloop import tornado.web import tornado.websocket from jsonrpc import JSONRPCResponseManager, dispatcher from jsonrpc.utils import DatetimeDecimalEncoder logger = logging.getLogger(__name__) def response_serialize(obj): return json.dumps(obj, cls=DatetimeDecimalEncode...
[ "logging.getLogger", "json.dumps", "jsonrpc.JSONRPCResponseManager.handle" ]
[((209, 236), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (226, 236), False, 'import logging\n'), ((279, 322), 'json.dumps', 'json.dumps', (['obj'], {'cls': 'DatetimeDecimalEncoder'}), '(obj, cls=DatetimeDecimalEncoder)\n', (289, 322), False, 'import json\n'), ((558, 608), 'jsonrpc.JSO...
import random, json from django.core import serializers from django.http import HttpResponse, JsonResponse from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_http_methods from datahandler.models import * @csrf_exempt def test(req...
[ "json.loads", "django.http.JsonResponse", "django.http.HttpResponse", "json.dumps", "django.views.decorators.http.require_http_methods" ]
[((1397, 1427), 'django.views.decorators.http.require_http_methods', 'require_http_methods', (["['POST']"], {}), "(['POST'])\n", (1417, 1427), False, 'from django.views.decorators.http import require_http_methods\n'), ((3305, 3335), 'django.views.decorators.http.require_http_methods', 'require_http_methods', (["['POST'...
"""tfmunir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
[ "django.urls.path" ]
[((735, 766), 'django.urls.path', 'path', (['"""admin/"""', 'admin.site.urls'], {}), "('admin/', admin.site.urls)\n", (739, 766), False, 'from django.urls import path\n'), ((772, 805), 'django.urls.path', 'path', (['""""""', 'views.home'], {'name': '"""home"""'}), "('', views.home, name='home')\n", (776, 805), False, '...
import sys import logging import gmpy_cffi from gmpy_cffi.interface import gmp, ffi from gmpy_cffi.convert import _mpq_to_str, _str_to_mpq, _pyint_to_mpz, _pyint_to_mpq, MAX_UI from gmpy_cffi.mpz import mpz from gmpy_cffi.cache import _new_mpq, _del_mpq, _new_mpz, _del_mpz if sys.version > '3': long = int xr...
[ "gmpy_cffi.mpz.mpz._from_c_mpz", "gmpy_cffi.interface.gmp.mpq_get_den", "gmpy_cffi.interface.gmp.mpq_get_num", "gmpy_cffi.interface.gmp.mpq_equal", "gmpy_cffi.interface.gmp.mpq_denref", "gmpy_cffi.interface.gmp.mpq_add", "gmpy_cffi.interface.gmp.mpq_set_ui", "gmpy_cffi.convert._pyint_to_mpz", "gmpy_...
[((4018, 4041), 'gmpy_cffi.interface.gmp.mpq_canonicalize', 'gmp.mpq_canonicalize', (['a'], {}), '(a)\n', (4038, 4041), False, 'from gmpy_cffi.interface import gmp, ffi\n'), ((4616, 4637), 'gmpy_cffi.interface.ffi.gc', 'ffi.gc', (['mpq', '_del_mpq'], {}), '(mpq, _del_mpq)\n', (4622, 4637), False, 'from gmpy_cffi.interf...
# pylint: disable=invalid-name,no-self-use import unittest from unittest import skipUnless from unittest.mock import MagicMock from reliabilly.components.tools.data_monitoring_client import DataMonitoringClient from reliabilly.settings import Settings, Constants class DataMonitoringClientTests(unittest.TestCase): ...
[ "reliabilly.components.tools.data_monitoring_client.DataMonitoringClient", "unittest.mock.MagicMock", "unittest.skipUnless", "reliabilly.components.tools.data_monitoring_client.DataMonitoringClient.generate_payload" ]
[((1409, 1468), 'unittest.skipUnless', 'skipUnless', (['Settings.RUN_SKIPPED', 'Constants.RUN_SKIPPED_MSG'], {}), '(Settings.RUN_SKIPPED, Constants.RUN_SKIPPED_MSG)\n', (1419, 1468), False, 'from unittest import skipUnless\n'), ((373, 497), 'reliabilly.components.tools.data_monitoring_client.DataMonitoringClient.genera...
#!/usr/bin/env python # Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
[ "os.path.join", "os.walk", "shutil.rmtree" ]
[((1026, 1043), 'os.walk', 'os.walk', (['log_path'], {}), '(log_path)\n', (1033, 1043), False, 'import os\n'), ((1570, 1587), 'os.walk', 'os.walk', (['exp_path'], {}), '(exp_path)\n', (1577, 1587), False, 'import os\n'), ((1983, 2004), 'os.path.join', 'os.path.join', (['root', 'd'], {}), '(root, d)\n', (1995, 2004), Fa...
import RPi.GPIO as gpio #Modul, dass zum Ansteuern der Pins benötigt wird. import time #Modul, zum zum Warten im Code benötigt wird. farbPinbelegungen = [["rot",5],["gruen",13],["blau",6]] #Beinhaltet alle Farben, die von der LED angzeigt werden könne mit dem zuständigen Pin, der dazu angesprochen werden muss. #Richt...
[ "RPi.GPIO.setup", "RPi.GPIO.output", "time.sleep" ]
[((1027, 1044), 'time.sleep', 'time.sleep', (['dauer'], {}), '(dauer)\n', (1037, 1044), False, 'import time\n'), ((429, 492), 'RPi.GPIO.setup', 'gpio.setup', (['farbPinbelegungen[i][1]', 'gpio.OUT'], {'initial': 'gpio.LOW'}), '(farbPinbelegungen[i][1], gpio.OUT, initial=gpio.LOW)\n', (439, 492), True, 'import RPi.GPIO ...
''' Zettelkasten txt to csv converter <NAME>, 11 Aug 2020 Read in .txt file copied from Evernote, separate into fields, and write csv for simple import to Google Sheets. Data flow: Read and decode .txt file Extract subtitles and titles from zettel, with capitalisation Extract fields (parent, UID = timestamp, title, c...
[ "datetime.datetime", "re.split", "csv.DictReader", "csv.writer", "time.sleep", "datetime.datetime.now", "tkinter.Tk", "re.finditer", "tkinter.filedialog.askopenfilename" ]
[((5428, 5454), 're.finditer', 're.finditer', (['pattern', 'text'], {}), '(pattern, text)\n', (5439, 5454), False, 'import re\n'), ((9944, 9960), 'time.sleep', 'time.sleep', (['(0.01)'], {}), '(0.01)\n', (9954, 9960), False, 'import time\n'), ((10536, 10573), 'csv.writer', 'csv.writer', (['csv_output'], {'delimiter': '...
import tensorflow as tf import numpy as np from models.tf_model import TFModel class RNN(TFModel): def input_layer(self): ''' Data and Hyperparameters ''' with tf.variable_scope("input_layer"): # Tensor containing word ids # shape = (batch size, max leng...
[ "tensorflow.shape", "tensorflow.nn.bidirectional_dynamic_rnn", "tensorflow.boolean_mask", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "tensorflow.contrib.rnn.GRUCell", "tensorflow.contrib.rnn.LSTMCell", "tensorflow.reduce_mean", "tensorflow.nn.embedding_lookup", "tensorflow.placeholder...
[((12229, 12251), 'tensorflow.get_default_graph', 'tf.get_default_graph', ([], {}), '()\n', (12249, 12251), True, 'import tensorflow as tf\n'), ((202, 234), 'tensorflow.variable_scope', 'tf.variable_scope', (['"""input_layer"""'], {}), "('input_layer')\n", (219, 234), True, 'import tensorflow as tf\n'), ((373, 434), 't...
import pickle import json import fasttext import fasttext.util from DataLoader import load_unique_words # !wget https://github.com/facebookresearch/fastText/archive/v0.9.2.zip # import zipfile # target = 'v0.9.2.zip' # handle = zipfile.ZipFile(target) # handle.extractall() # handle.close() # cd ../fastText-0.9.2 ...
[ "fasttext.load_model", "pickle.dump", "fasttext.util.reduce_model", "DataLoader.load_unique_words" ]
[((365, 384), 'DataLoader.load_unique_words', 'load_unique_words', ([], {}), '()\n', (382, 384), False, 'from DataLoader import load_unique_words\n'), ((505, 552), 'fasttext.load_model', 'fasttext.load_model', (["(base_dir + 'cc.zh.300.bin')"], {}), "(base_dir + 'cc.zh.300.bin')\n", (524, 552), False, 'import fasttext\...
import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.colors as colors import matplotlib.cm as cm from matplotlib.lines import Line2D def plotMeasurement(L, indices, measurements, s=0.25, filename=None, title=None, url=None): fig = plt.figure() axes = fig.add_subplot(111, pro...
[ "matplotlib.pyplot.figure", "matplotlib.pyplot.subplots", "numpy.arange", "matplotlib.pyplot.get_cmap" ]
[((272, 284), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (282, 284), True, 'import matplotlib.pyplot as plt\n'), ((420, 442), 'matplotlib.pyplot.get_cmap', 'plt.get_cmap', (['"""plasma"""'], {}), "('plasma')\n", (432, 442), True, 'import matplotlib.pyplot as plt\n'), ((1026, 1048), 'numpy.arange', 'np....
import urllib from urllib import request try: page = request.urlopen('http://pudim.com.br/') except urllib.error.URLError: print('\033[31mO site pudim não está acessivel no momento!\033[m') else: print('\033[32mConsegui acessar o site pudim com sucesso!\033[m') print(page.read())
[ "urllib.request.urlopen" ]
[((57, 96), 'urllib.request.urlopen', 'request.urlopen', (['"""http://pudim.com.br/"""'], {}), "('http://pudim.com.br/')\n", (72, 96), False, 'from urllib import request\n')]
""" Downloads and clips videos from youtube, rumble, bitchute (using yt-dlp) and clips the video using ffmpeg. """ import os import shutil import subprocess import sys import time from concurrent.futures import ThreadPoolExecutor from typing import Optional, Tuple def _find_video_file_from_stdout(stdout: str...
[ "os.path.exists", "os.listdir", "os.makedirs", "subprocess.Popen", "concurrent.futures.ThreadPoolExecutor", "os.path.join", "time.sleep", "os.remove", "sys.stderr.write", "shutil.copy", "shutil.rmtree", "os.path.abspath", "os.path.relpath", "sys.stdout.write" ]
[((972, 1095), 'subprocess.Popen', 'subprocess.Popen', (['cmd_str'], {'shell': '(True)', 'cwd': 'cwd', 'universal_newlines': '(True)', 'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE'}), '(cmd_str, shell=True, cwd=cwd, universal_newlines=True,\n stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n', (988, 1095)...
import subprocess import os from subprocess import Popen, PIPE, STDOUT from example_scenarios.quick_start.branin import main as quick_start_branin_main from example_scenarios.synthetic.multiobjective_branin import multiobjective_branin from example_scenarios.synthetic.ordinal_multiobjective_branin import ( ordinal...
[ "hypermapper.plot_hvi.HVI_from_files", "example_scenarios.synthetic.multiobjective_branin.multiobjective_branin.main", "hypermapper.compute_pareto.compute", "subprocess.check_call", "example_scenarios.synthetic.ordinal_multiobjective_branin.ordinal_multiobjective_branin.main", "hypermapper.utility_functio...
[((929, 959), 'hypermapper.utility_functions.validate_json', 'validate_json', (['parameters_file'], {}), '(parameters_file)\n', (942, 959), False, 'from hypermapper.utility_functions import validate_json\n'), ((1073, 1114), 'subprocess.check_call', 'subprocess.check_call', (['cmd'], {'stderr': 'STDOUT'}), '(cmd, stderr...
"""CT_lymph_nodes dataset.""" import tensorflow_datasets.public_api as tfds from tensorflow_datasets.image import CT_lymph_nodes class CtLymphNodesTest(tfds.testing.DatasetBuilderTestCase): DATASET_CLASS = CT_lymph_nodes.CtLymphNodes SPLITS = { "train": 3, # Number of fake train example } ...
[ "tensorflow_datasets.public_api.testing.test_main" ]
[((349, 373), 'tensorflow_datasets.public_api.testing.test_main', 'tfds.testing.test_main', ([], {}), '()\n', (371, 373), True, 'import tensorflow_datasets.public_api as tfds\n')]
from scipy.spatial.distance import cdist import matplotlib.pyplot as plt from numpy.linalg import eig from PIL import Image import numpy as np import argparse import glob import time import os parser = argparse.ArgumentParser() parser.add_argument("--kernel-type", type=str, default="rbf", help="k...
[ "numpy.uint8", "numpy.sqrt", "numpy.argsort", "numpy.array", "numpy.count_nonzero", "numpy.save", "os.path.exists", "argparse.ArgumentParser", "os.path.normpath", "numpy.exp", "os.path.isdir", "os.mkdir", "matplotlib.pyplot.scatter", "numpy.min", "numpy.argmin", "glob.glob", "matplot...
[((205, 230), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (228, 230), False, 'import argparse\n'), ((1472, 1499), 'numpy.array', 'np.array', (['coor'], {'dtype': 'float'}), '(coor, dtype=float)\n', (1480, 1499), True, 'import numpy as np\n'), ((2256, 2282), 'os.path.normpath', 'os.path.normp...
# Python libs import pytest # Salt libs import salt.beacons.service as service_beacon from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {service_beacon: {"__context__": {}, "__salt__": {}}} def test_non_list_config(): config = {} ret = service_beac...
[ "salt.beacons.service.beacon", "tests.support.mock.MagicMock", "salt.beacons.service.validate" ]
[((308, 339), 'salt.beacons.service.validate', 'service_beacon.validate', (['config'], {}), '(config)\n', (331, 339), True, 'import salt.beacons.service as service_beacon\n'), ((475, 506), 'salt.beacons.service.validate', 'service_beacon.validate', (['config'], {}), '(config)\n', (498, 506), True, 'import salt.beacons....
from django.views.generic import View from django.shortcuts import redirect from django.contrib import messages from django.core.mail import send_mail, send_mass_mail class SendFormEmail(View): def get(self, request): # Get the form data name = request.GET.get('name', None) email = requ...
[ "django.core.mail.send_mail", "django.shortcuts.redirect", "django.contrib.messages.success" ]
[((428, 530), 'django.core.mail.send_mail', 'send_mail', (['"""Subject - Django Email Testing"""', "('Hello ' + name + ',\\n' + message)", '"""<EMAIL>"""', '[email]'], {}), "('Subject - Django Email Testing', 'Hello ' + name + ',\\n' +\n message, '<EMAIL>', [email])\n", (437, 530), False, 'from django.core.mail impo...
#!/usr/bin/env python #coding=utf-8 import treq from twisted.internet import reactor from twisted.internet import defer from twisted.web.iweb import IBodyProducer from zope.interface import implements from twisted.web.client import HTTPConnectionPool pool = HTTPConnectionPool(reactor) class StringProducer(object): ...
[ "treq.get", "twisted.web.client.HTTPConnectionPool", "treq.post", "zope.interface.implements", "twisted.internet.defer.succeed" ]
[((260, 287), 'twisted.web.client.HTTPConnectionPool', 'HTTPConnectionPool', (['reactor'], {}), '(reactor)\n', (278, 287), False, 'from twisted.web.client import HTTPConnectionPool\n'), ((323, 348), 'zope.interface.implements', 'implements', (['IBodyProducer'], {}), '(IBodyProducer)\n', (333, 348), False, 'from zope.in...
from django.contrib.auth import get_user_model from django.db import models from django.db.models import TextField, IntegerField from django.dispatch import receiver from django_extensions.db.models import TimeStampedModel from django.utils.translation import gettext_lazy as _ from guardian.shortcuts import assign_perm...
[ "django.contrib.auth.get_user_model", "django.db.models.TextField", "django.utils.translation.gettext_lazy", "django.dispatch.receiver", "guardian.shortcuts.assign_perm" ]
[((1858, 1908), 'django.dispatch.receiver', 'receiver', (['models.signals.post_save'], {'sender': 'Cluster'}), '(models.signals.post_save, sender=Cluster)\n', (1866, 1908), False, 'from django.dispatch import receiver\n'), ((812, 823), 'django.db.models.TextField', 'TextField', ([], {}), '()\n', (821, 823), False, 'fro...
# Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ "numpy.prod", "acme.tf.networks.ClipToSpec", "acme.tf.utils.create_variables", "acme.tf.networks.MultivariateNormalDiagHead", "acme.tf.networks.GaussianMixtureHead", "acme.tf.utils.to_sonnet_module", "acme.tf.networks.LayerNormMLP" ]
[((1395, 1429), 'numpy.prod', 'np.prod', (['act_spec.shape'], {'dtype': 'int'}), '(act_spec.shape, dtype=int)\n', (1402, 1429), True, 'import numpy as np\n'), ((1573, 1620), 'acme.tf.utils.to_sonnet_module', 'tf2_utils.to_sonnet_module', (['observation_network'], {}), '(observation_network)\n', (1599, 1620), True, 'fro...
from typing import Optional from torch.nn import Module from tha2.nn.base.init_function import create_init_function from tha2.nn.base.module_factory import ModuleFactory from tha2.nn.base.nonlinearity_factory import resolve_nonlinearity_factory from tha2.nn.base.normalization import NormalizationLayerFactory ...
[ "tha2.nn.base.init_function.create_init_function", "tha2.nn.base.nonlinearity_factory.resolve_nonlinearity_factory" ]
[((497, 540), 'tha2.nn.base.init_function.create_init_function', 'create_init_function', (['initialization_method'], {}), '(initialization_method)\n', (517, 540), False, 'from tha2.nn.base.init_function import create_init_function\n'), ((1111, 1161), 'tha2.nn.base.nonlinearity_factory.resolve_nonlinearity_factory', 're...
from tastypie.resources import ModelResource from atm_s_ru.main.models import Sertificates, SertificateTypes from tastypie.api import Api from tastypie import fields class SertificateTypesResource(ModelResource): class Meta: queryset = SertificateTypes.objects.all() resource_name = 'sertificatetype...
[ "atm_s_ru.main.models.SertificateTypes.objects.all", "tastypie.fields.ForeignKey", "atm_s_ru.main.models.Sertificates.objects.all" ]
[((544, 606), 'tastypie.fields.ForeignKey', 'fields.ForeignKey', (['SertificateTypesResource', '"""Type"""'], {'full': '(True)'}), "(SertificateTypesResource, 'Type', full=True)\n", (561, 606), False, 'from tastypie import fields\n'), ((249, 279), 'atm_s_ru.main.models.SertificateTypes.objects.all', 'SertificateTypes.o...
import string from math import gcd char_num_map = {j: i for i, j in enumerate(string.ascii_lowercase + " ")} num_char_map = {i: j for i, j in enumerate(string.ascii_lowercase + " ")} def encrypt(text, key): encrypted = "" text = text.lower() for letter in text: letter_key = char_num_map[letter] ...
[ "math.gcd" ]
[((458, 467), 'math.gcd', 'gcd', (['a', 'm'], {}), '(a, m)\n', (461, 467), False, 'from math import gcd\n')]
"""added basic stich clone qc columns Revision ID: 79a1a8f844e4 Revises: e466f84812fa Create Date: 2017-06-05 17:58:49.231834 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = 'e466f84812fa' branch_labels = None depends_on = None def upg...
[ "alembic.op.f", "alembic.op.drop_column", "sqlalchemy.String" ]
[((1445, 1495), 'alembic.op.drop_column', 'op.drop_column', (['"""basic_stitch_clone"""', '"""stitch_qc3"""'], {}), "('basic_stitch_clone', 'stitch_qc3')\n", (1459, 1495), False, 'from alembic import op\n'), ((1500, 1550), 'alembic.op.drop_column', 'op.drop_column', (['"""basic_stitch_clone"""', '"""stitch_qc2"""'], {}...
import falcon import json from sqlalchemy import or_ from sqlalchemy.exc import SQLAlchemyError import util from db import session import model class Achievement(object): def on_get(self, req, resp, id): try: achievement = session.query(model.Achievement).get(id) except SQLAlchemyErr...
[ "db.session.add", "util.achievement.to_json", "db.session.query", "model.Achievement", "db.session.delete", "db.session.commit", "db.session.close", "db.session.rollback", "sqlalchemy.or_" ]
[((4822, 4923), 'model.Achievement', 'model.Achievement', ([], {'title': "data['title']", 'picture': "data['picture']", 'description': "data['description']"}), "(title=data['title'], picture=data['picture'], description\n =data['description'])\n", (4839, 4923), False, 'import model\n'), ((5382, 5397), 'db.session.cl...
from django.test import TestCase from django.test.client import Client from django.urls import reverse from model_mommy import mommy from users.models import Department from users.models import DepartmentUser from users.models import Lageruser class LageruserTests(TestCase): def setUp(self): self.client...
[ "django.test.client.Client", "django.urls.reverse", "model_mommy.mommy.make", "users.models.Lageruser.objects.create_superuser" ]
[((323, 331), 'django.test.client.Client', 'Client', ([], {}), '()\n', (329, 331), False, 'from django.test.client import Client\n'), ((340, 401), 'users.models.Lageruser.objects.create_superuser', 'Lageruser.objects.create_superuser', (['"""test"""', '"""<EMAIL>"""', '"""test"""'], {}), "('test', '<EMAIL>', 'test')\n"...
#!/usr/bin/env python # coding=utf-8 import os,datetime,time import asyncio from concurrent.futures import ThreadPoolExecutor, as_completed import aiohttp from urllib import error from urllib.request import ProxyHandler, build_opener from .config import VALIDATOR_BASE_URL, VALIDATOR_BATCH_COUNT, REQUEST_TIMEOUT, TE...
[ "aiohttp.ClientSession", "os.environ.get", "urllib.request.ProxyHandler", "datetime.datetime.now", "urllib.request.build_opener" ]
[((460, 496), 'os.environ.get', 'os.environ.get', (['"""VALIDATOR_BASE_URL"""'], {}), "('VALIDATOR_BASE_URL')\n", (474, 496), False, 'import os, datetime, time\n'), ((725, 748), 'aiohttp.ClientSession', 'aiohttp.ClientSession', ([], {}), '()\n', (746, 748), False, 'import aiohttp\n'), ((1567, 1590), 'datetime.datetime....
#Script Goal: it will predict the annotations and send back (letter,confidence,(x,y,w,h)) for a set of images #run this script in cmd by locating into the darknet folder import cv2 import numpy as np import glob2 from pandas import DataFrame import darknet import sys import itertools from tqdm import tqdm sys.path....
[ "itertools.chain", "glob2.glob", "darknet.network_width", "sys.path.insert", "darknet.free_image", "darknet.draw_boxes", "darknet.load_network", "numpy.array", "darknet.detect_image", "darknet.make_image", "cv2.cvtColor", "pandas.DataFrame", "darknet.network_height", "cv2.resize", "cv2.i...
[((311, 362), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""/mekeneocr/myUniverse/darknet"""'], {}), "(0, '/mekeneocr/myUniverse/darknet')\n", (326, 362), False, 'import sys\n'), ((620, 677), 'darknet.load_network', 'darknet.load_network', (['config', 'data', 'weights'], {'batch_size': '(1)'}), '(config, data, wei...