code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# coding: utf8 from __future__ import absolute_import, division, print_function from builtins import super, range, zip, round, map #Imports import logging import importlib import os import datetime import traceback from ditto.store import Store logger = logging.getLogger(__name__) class converter: '''Converter ...
[ "ditto.store.Store", "traceback.print_exc", "os.makedirs", "os.walk", "os.path.exists", "datetime.datetime.now", "logging.getLogger" ]
[((257, 284), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (274, 284), False, 'import logging\n'), ((3321, 3328), 'ditto.store.Store', 'Store', ([], {}), '()\n', (3326, 3328), False, 'from ditto.store import Store\n'), ((5077, 5101), 'os.path.exists', 'os.path.exists', (['log_path'], {}...
import lf_data_explorer lf_data_explorer.app.run()
[ "lf_data_explorer.app.run" ]
[((25, 51), 'lf_data_explorer.app.run', 'lf_data_explorer.app.run', ([], {}), '()\n', (49, 51), False, 'import lf_data_explorer\n')]
import os import typing import pickle import fasttext import numpy as np import tensorflow as tf from utils import text_preprocessing from utils import logging logger = logging.getLogger() PADDING_TOKEN = '<pad>' UNKNOWN_TOKEN = '<unk>' SAVED_MODEL_DIR = 'saved_model' SHARED_PATH = '/project/cq-training-1/project2/...
[ "os.mkdir", "os.path.join", "numpy.concatenate", "numpy.argmax", "fasttext.train_unsupervised", "os.path.exists", "utils.text_preprocessing.process", "tensorflow.TensorShape", "numpy.argsort", "tensorflow.cast", "fasttext.load_model", "numpy.array", "utils.text_preprocessing.recapitalize", ...
[((172, 191), 'utils.logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (189, 191), False, 'from utils import logging\n'), ((1067, 1102), 'os.path.join', 'os.path.join', (['SAVED_MODEL_DIR', 'name'], {}), '(SAVED_MODEL_DIR, name)\n', (1079, 1102), False, 'import os\n'), ((1428, 1520), 'os.path.join', 'os.path.j...
import matplotlib.pyplot as plt from sympy import symbols,diff #from mpl_toolkits.mplot3d.axes3d import Axes3D from matplotlib import cm import numpy as np def f(x,y): r=3**(-x*x -y*y) return 1/(r+1) def doFit(): a, b = symbols('x, y') multiplier = 0.1 max_iter = 900 params = np.array([-3.0, 1...
[ "sympy.symbols", "numpy.meshgrid", "matplotlib.pyplot.show", "matplotlib.pyplot.figure", "numpy.array", "numpy.linspace" ]
[((838, 876), 'numpy.linspace', 'np.linspace', ([], {'start': '(-2)', 'stop': '(2)', 'num': '(200)'}), '(start=-2, stop=2, num=200)\n', (849, 876), True, 'import numpy as np\n'), ((877, 915), 'numpy.linspace', 'np.linspace', ([], {'start': '(-2)', 'stop': '(2)', 'num': '(200)'}), '(start=-2, stop=2, num=200)\n', (888, ...
from collections import defaultdict import logging import sys sys.path.append('./modules/') import time from docopt import docopt from gensim.models.word2vec import PathLineSentences from scipy.sparse import dok_matrix from utils_ import Space def main(): """ Make count-based vector space from corpus. "...
[ "sys.path.append", "utils_.Space", "logging.basicConfig", "docopt.docopt", "gensim.models.word2vec.PathLineSentences", "time.time", "collections.defaultdict", "logging.info" ]
[((62, 91), 'sys.path.append', 'sys.path.append', (['"""./modules/"""'], {}), "('./modules/')\n", (77, 91), False, 'import sys\n'), ((359, 838), 'docopt.docopt', 'docopt', (['"""Make count-based vector space from corpus.\n Usage:\n count.py [-l] <path_corpus> <path_output> <window_size>\n \n Argumen...
from django.urls import path, include from .views import ProductsList, DetailProduct, ProductSearch from rest_framework.routers import SimpleRouter from content.api.api_views import ProductViewset router = SimpleRouter() router.register(r'product-viewset', ProductViewset, basename='products') urlpatterns = [ pat...
[ "django.urls.include", "rest_framework.routers.SimpleRouter" ]
[((207, 221), 'rest_framework.routers.SimpleRouter', 'SimpleRouter', ([], {}), '()\n', (219, 221), False, 'from rest_framework.routers import SimpleRouter\n'), ((604, 624), 'django.urls.include', 'include', (['router.urls'], {}), '(router.urls)\n', (611, 624), False, 'from django.urls import path, include\n')]
from utils import sample_utils as su, config, parse_midas_data, stats_utils, sfs_utils import pylab, sys, numpy as np, random, math from utils import temporal_changes_utils from collections import defaultdict import bz2 import pickle adir = config.analysis_directory ddir = config.data_directory pdir = "%s/pickles" % c...
[ "utils.parse_midas_data.load_pickled_good_species_list", "collections.defaultdict", "numpy.array", "utils.sample_utils.get_mi_tp_sample_dict", "matplotlib.pyplot.subplots" ]
[((382, 431), 'utils.parse_midas_data.load_pickled_good_species_list', 'parse_midas_data.load_pickled_good_species_list', ([], {}), '()\n', (429, 431), False, 'from utils import sample_utils as su, config, parse_midas_data, stats_utils, sfs_utils\n'), ((1292, 1309), 'collections.defaultdict', 'defaultdict', (['dict'], ...
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import QWidget, QApplication, QLabel, QMainWindow, QPushButton class Example(QMainWindow): def __init__(self): super().__init__() self.initUI() def initUI(self): btn1 = QPushButton('按钮1', self) ...
[ "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QPushButton" ]
[((907, 929), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (919, 929), False, 'from PyQt5.QtWidgets import QWidget, QApplication, QLabel, QMainWindow, QPushButton\n'), ((287, 311), 'PyQt5.QtWidgets.QPushButton', 'QPushButton', (['"""按钮1"""', 'self'], {}), "('按钮1', self)\n", (298, ...
import gzip import io from concurrent import futures from pathlib import Path from typing import IO, Union # Non standard libraries import pandas as pd import requests from aanalytics2 import config, connector class DIAPI: """ This class provide an easy way to use the Data Insertion API. You can initial...
[ "io.StringIO", "aanalytics2.connector.AdobeRequest", "pandas.read_csv", "pkg_resources.resource_filename", "pkg_resources.path", "dicttoxml.dicttoxml", "pathlib.Path", "requests.get", "pandas.read_pickle", "requests.post", "concurrent.futures.ThreadPoolExecutor" ]
[((3075, 3128), 'requests.get', 'requests.get', (['endpoint'], {'params': 'params', 'headers': 'header'}), '(endpoint, params=params, headers=header)\n', (3087, 3128), False, 'import requests\n'), ((4662, 4728), 'dicttoxml.dicttoxml', 'dxml.dicttoxml', (['dictionary'], {'custom_root': '"""request"""', 'attr_type': '(Fa...
import unittest import tempfile import rdflib import time import utils import csv import os import integration from dataprofileTestHelper import DataprofileTestHelper from BlazegraphIntegrationTestContainer import BlazegraphIntegrationTestContainer # Don't show the traceback of an AssertionError, because the Assertion...
[ "unittest.main", "os.remove", "csv.DictReader", "tempfile.gettempdir", "utils.query", "time.sleep", "utils.addTestData", "os.path.isfile", "dataprofileTestHelper.DataprofileTestHelper", "utils.readSPARQLQuery", "BlazegraphIntegrationTestContainer.BlazegraphIntegrationTestContainer" ]
[((16101, 16116), 'unittest.main', 'unittest.main', ([], {}), '()\n', (16114, 16116), False, 'import unittest\n'), ((2987, 3014), 'os.path.isfile', 'os.path.isfile', (['cls.tempAgg'], {}), '(cls.tempAgg)\n', (3001, 3014), False, 'import os\n'), ((744, 765), 'tempfile.gettempdir', 'tempfile.gettempdir', ([], {}), '()\n'...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- QUANDLKEY = '<ENTER YOUR QUANDLKEY HERE>' """ Created on Thu Oct 25 23:19:44 2018 @author: jeff """ '''************************************* #1. Import libraries and key varable values ''' import quandl import plotly import plotly.graph_objs as go import numpy as np fro...
[ "h5py.File", "os.remove", "os.path.dirname", "os.path.exists", "numpy.zeros", "plotly.offline.plot", "quandl.get_table", "plotly.graph_objs.Candlestick", "PIL.Image.fromarray", "os.path.join", "numpy.vstack" ]
[((791, 816), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (806, 816), False, 'import os\n'), ((830, 866), 'os.path.join', 'os.path.join', (['folder_path', '"""dataset"""'], {}), "(folder_path, 'dataset')\n", (842, 866), False, 'import os\n'), ((879, 915), 'os.path.join', 'os.path.join', ([...
# PACKAGES import numpy as np import os from scipy import stats as ss import pickle import h5py import pandas as pd from configs import * path_to_results_folder = "%sresults/"%CV_save_path path_to_preds_folder = "%spredictions/"%CV_save_path path_to_final_chosen_models = "%sfinal_models_chosen/"%CV_save_path if ...
[ "h5py.File", "os.makedirs", "os.path.isdir", "pandas.read_csv", "numpy.zeros", "scipy.stats.rankdata", "numpy.argmin", "numpy.isnan", "numpy.min", "numpy.array", "numpy.nanvar", "os.listdir", "numpy.nanmean" ]
[((2245, 2308), 'os.listdir', 'os.listdir', (["(path_to_results_folder + 'MTL/' + split_pca_dataset)"], {}), "(path_to_results_folder + 'MTL/' + split_pca_dataset)\n", (2255, 2308), False, 'import os\n'), ((324, 366), 'os.path.isdir', 'os.path.isdir', (['path_to_final_chosen_models'], {}), '(path_to_final_chosen_models...
import tkinter as tk ''' This frame contains all the check box properties. The class also maps the checkbox to the properties in the dictionary containing them. Dictionary is output from the TransitionProperties class. ''' class Frame_7(tk.Frame): def __init__(self,master,cls,defaultState=0): tk.Frame.__i...
[ "tkinter.Checkbutton", "tkinter.IntVar", "tkinter.Canvas", "tkinter.Frame.__init__" ]
[((308, 339), 'tkinter.Frame.__init__', 'tk.Frame.__init__', (['self', 'master'], {}), '(self, master)\n', (325, 339), True, 'import tkinter as tk\n'), ((461, 483), 'tkinter.Canvas', 'tk.Canvas', (['self.master'], {}), '(self.master)\n', (470, 483), True, 'import tkinter as tk\n'), ((2874, 2904), 'tkinter.IntVar', 'tk....
import numpy as np import pandas as pd import copy import scipy.stats from sklearn.metrics import mean_squared_error from sklearn.ensemble import RandomForestRegressor """ define basic functions for AFT1 """ def search_path(estimator, y_threshold): """ return path index list containing [{leaf node id, ine...
[ "copy.deepcopy", "numpy.where", "numpy.array", "numpy.unique" ]
[((3546, 3562), 'copy.deepcopy', 'copy.deepcopy', (['x'], {}), '(x)\n', (3559, 3562), False, 'import copy\n'), ((3586, 3617), 'numpy.unique', 'np.unique', (["path_info['feature']"], {}), "(path_info['feature'])\n", (3595, 3617), True, 'import numpy as np\n'), ((4761, 4777), 'copy.deepcopy', 'copy.deepcopy', (['x'], {})...
#tests the main function of provided file with the test.txt in the same folder import sys import subprocess from pathlib import Path def printError(line): print("\033[91m{}\033[00m\n".format(line)) def printSuccess(line): print("\033[92m{}\033[00m\n".format(line)) solution_path = Path("solution.txt") test_path =...
[ "subprocess.run", "pathlib.Path", "sys.exit" ]
[((288, 308), 'pathlib.Path', 'Path', (['"""solution.txt"""'], {}), "('solution.txt')\n", (292, 308), False, 'from pathlib import Path\n'), ((321, 337), 'pathlib.Path', 'Path', (['"""test.txt"""'], {}), "('test.txt')\n", (325, 337), False, 'from pathlib import Path\n'), ((801, 831), 'subprocess.run', 'subprocess.run', ...
# Copyright 2017 <NAME> a package to draw graphs of data in a terminal window """ module that implements graphs of data rendered in a terminal window """ import locale locale.setlocale(locale.LC_ALL,"") import curses import curses.ascii import sys import os import math import time from datetime import datetime from cha...
[ "curses.raw", "char_draw.canvas.Canvas", "time.time", "curses.color_pair", "curses.mousemask", "datetime.datetime.fromtimestamp", "curses.getmouse", "curses.newpad", "locale.setlocale", "curses.curs_set" ]
[((168, 203), 'locale.setlocale', 'locale.setlocale', (['locale.LC_ALL', '""""""'], {}), "(locale.LC_ALL, '')\n", (184, 203), False, 'import locale\n'), ((3923, 3951), 'curses.newpad', 'curses.newpad', (['height', 'width'], {}), '(height, width)\n', (3936, 3951), False, 'import curses\n'), ((13613, 13631), 'curses.curs...
import os, sys import argparse from collections import defaultdict import torch from tqdm import tqdm # TODO: fix these from document_retrieval import get_top_k_docs from sentence_retrieval import get_top_sents_for_claim from entailment_with_t5 import get_veracity_label from retrieve_tables_with_tapas import retrieve...
[ "retrieve_tables_with_tapas.retrieve_tables", "argparse.ArgumentParser", "os.makedirs", "retrieve_table_cells.predict", "os.getcwd", "util.util_funcs.get_tables_from_docs", "os.path.dirname", "sentence_retrieval.get_top_sents_for_claim", "os.path.exists", "sys.path.insert", "entailment_with_t5.g...
[((700, 733), 'sys.path.insert', 'sys.path.insert', (['(0)', 'FEVEROUS_PATH'], {}), '(0, FEVEROUS_PATH)\n', (715, 733), False, 'import os, sys\n'), ((643, 654), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (652, 654), False, 'import os, sys\n'), ((963, 1066), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'...
from reclaimer.hek.defs.objs.tag import HekTag class Snd_Tag(HekTag): def calc_internal_data(self): HekTag.calc_internal_data(self) for pitch_range in self.data.tagdata.pitch_ranges.STEPTREE: pitch_range.playback_rate = 1 if pitch_range.natural_pitch: ...
[ "reclaimer.hek.defs.objs.tag.HekTag.calc_internal_data" ]
[((119, 150), 'reclaimer.hek.defs.objs.tag.HekTag.calc_internal_data', 'HekTag.calc_internal_data', (['self'], {}), '(self)\n', (144, 150), False, 'from reclaimer.hek.defs.objs.tag import HekTag\n')]
#!/usr/bin/env python2 from __future__ import print_function import roslib import sys import rospy import numpy as np import datetime import time import os import pickle from geometry_msgs.msg import PoseArray from geometry_msgs.msg import Pose from geometry_msgs.msg import PoseWithCovariance from std_msgs.msg import B...
[ "dse_lib.pose_from_state_3D", "dse_lib.sub_matrix", "rospy.Subscriber", "rospy.Time.now", "os.path.join", "dse_lib.state_from_pose_3D", "rospy.signal_shutdown", "rospy.get_param", "roslib.load_manifest", "numpy.where", "numpy.array", "rospy.init_node", "numpy.linalg.inv", "rospy.spin", "...
[((822, 860), 'roslib.load_manifest', 'roslib.load_manifest', (['"""dse_simulation"""'], {}), "('dse_simulation')\n", (842, 860), False, 'import roslib\n'), ((6055, 6107), 'rospy.init_node', 'rospy.init_node', (['"""dse_plotting_node"""'], {'anonymous': '(True)'}), "('dse_plotting_node', anonymous=True)\n", (6070, 6107...
""" Export functions for brainload. In contrast to the brainview functions, these do not support color. These functions allow one to export brain meshes, e.g., for loading into standard 3D modeling software. """ import brainload as bl import os import brainload.meshexport as me import numpy as np def export_mesh_no...
[ "brainload.mesh_to_ply", "brainload.mesh_to_off", "brainload.mesh_to_obj" ]
[((884, 920), 'brainload.mesh_to_obj', 'bl.mesh_to_obj', (['vertex_coords', 'faces'], {}), '(vertex_coords, faces)\n', (898, 920), True, 'import brainload as bl\n'), ((969, 1005), 'brainload.mesh_to_off', 'bl.mesh_to_off', (['vertex_coords', 'faces'], {}), '(vertex_coords, faces)\n', (983, 1005), True, 'import brainloa...
#coding=utf-8 import time # 保存错误地址 def save_error_addr(fw, addr): fw.write(u'{}\r\n'.format(addr)) return def handleSex(sex): if sex in (u'男', u'M', u'male', u'm', u'Male'): sex = 'M' elif sex in (u'女', u'F', u'female', u'f', 'Female'): sex = 'F' else: sex = '' return s...
[ "time.strptime", "time.strftime" ]
[((696, 725), 'time.strptime', 'time.strptime', (['birthday', 'type'], {}), '(birthday, type)\n', (709, 725), False, 'import time\n'), ((745, 780), 'time.strftime', 'time.strftime', (['"""%Y-%m-%d"""', 'birthday'], {}), "('%Y-%m-%d', birthday)\n", (758, 780), False, 'import time\n')]
import numpy as np class Atom: def __init__(self, x, y, z): self.x = x self.y = y self.z = z self.type = 1 self.vx = 0.0 self.vy = 0.0 self.vz = 0.0 def save_file(filename, atoms, lo, hi): with open(filename, "w") as f: f.write(...
[ "numpy.arange" ]
[((1017, 1037), 'numpy.arange', 'np.arange', (['lo', 'hi', '(1)'], {}), '(lo, hi, 1)\n', (1026, 1037), True, 'import numpy as np\n')]
import numpy as np import matplotlib.pyplot as plt from glsl_helpers import * degtorad = lambda a: a / 180.0 * np.pi def smooth_step(x, threshold, steepness): return 1.0 / (1.0 + exp(-(x - threshold) * steepness)) def trace_u(pos, ray, path): n_steps = path.shape[0] u0 = 1.0 / length(pos) u = u0 ...
[ "matplotlib.pyplot.xlim", "numpy.arctan2", "numpy.sum", "matplotlib.pyplot.plot", "numpy.ravel", "matplotlib.pyplot.ylim", "matplotlib.pyplot.show", "numpy.zeros", "numpy.isfinite", "numpy.where", "numpy.sin", "numpy.cos", "numpy.interp" ]
[((1837, 1873), 'numpy.arctan2', 'np.arctan2', (['diffs[:, 1]', 'diffs[:, 0]'], {}), '(diffs[:, 1], diffs[:, 0])\n', (1847, 1873), True, 'import numpy as np\n'), ((2498, 2550), 'numpy.interp', 'np.interp', (['threshold', '[y[i1], y[i0]]', '[x[i1], x[i0]]'], {}), '(threshold, [y[i1], y[i0]], [x[i1], x[i0]])\n', (2507, 2...
from __future__ import unicode_literals try: from django.core.urlresolvers import reverse except ModuleNotFoundError: from django.urls import reverse from django.db import models import generic_scaffold class Book(models.Model): title = models.CharField(max_length=128) author = models.CharField(max_l...
[ "django.db.models.CharField", "django.urls.reverse" ]
[((252, 284), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)'}), '(max_length=128)\n', (268, 284), False, 'from django.db import models\n'), ((298, 330), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)'}), '(max_length=128)\n', (314, 330), False, 'from django.d...
from os.path import join import tempfile import tkinter as tk import zipfile import math from pymol import cmd, finish_launching, plugins from pymol.cgo import * finish_launching() cmd.pseudoatom(object="mypseudoatom", pos=(1, 1, 1), color=(0.9411764705882353, 0.20392156862745098, 0.20392156862745098, 0.5), label=No...
[ "pymol.cmd.pseudoatom", "pymol.finish_launching" ]
[((164, 182), 'pymol.finish_launching', 'finish_launching', ([], {}), '()\n', (180, 182), False, 'from pymol import cmd, finish_launching, plugins\n'), ((184, 332), 'pymol.cmd.pseudoatom', 'cmd.pseudoatom', ([], {'object': '"""mypseudoatom"""', 'pos': '(1, 1, 1)', 'color': '(0.9411764705882353, 0.20392156862745098, 0.2...
import asyncio import logging from time import sleep from learn_asyncio import configure_logging class Incrementer: """A stupid incrementer.""" def __init__(self): self.number = 0 def increment(self, task_id): """A very thread-unsafe way to increment a number.""" logging.info("Ta...
[ "asyncio.to_thread", "logging.info", "learn_asyncio.configure_logging", "time.sleep" ]
[((2437, 2456), 'learn_asyncio.configure_logging', 'configure_logging', ([], {}), '()\n', (2454, 2456), False, 'from learn_asyncio import configure_logging\n'), ((1077, 1130), 'logging.info', 'logging.info', (['"""Number is now: %d"""', 'incrementer.number'], {}), "('Number is now: %d', incrementer.number)\n", (1089, 1...
# -*- coding: utf-8 -*- import codecs from setuptools import setup, find_packages with codecs.open("README.rst", encoding="utf-8") as f: long_description = f.read() setup( name='yawrap', version='0.4.7', author='<NAME>', author_email='<EMAIL>', maintainer='<NAME>', maintainer_email='<EM...
[ "codecs.open", "setuptools.find_packages" ]
[((90, 133), 'codecs.open', 'codecs.open', (['"""README.rst"""'], {'encoding': '"""utf-8"""'}), "('README.rst', encoding='utf-8')\n", (101, 133), False, 'import codecs\n'), ((512, 527), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (525, 527), False, 'from setuptools import setup, find_packages\n')]
import numpy as np from opfython.math import distance from opfython.stream import loader, parser from opfython.subgraphs import knn csv = loader.load_csv('data/boat.csv') X, Y = parser.parse_loader(csv) def test_knn_subgraph_n_clusters(): subgraph = knn.KNNSubgraph(X, Y) assert subgraph.n_clusters == 0 d...
[ "opfython.subgraphs.knn.KNNSubgraph", "opfython.stream.parser.parse_loader", "numpy.ones", "opfython.stream.loader.load_csv" ]
[((140, 172), 'opfython.stream.loader.load_csv', 'loader.load_csv', (['"""data/boat.csv"""'], {}), "('data/boat.csv')\n", (155, 172), False, 'from opfython.stream import loader, parser\n'), ((180, 204), 'opfython.stream.parser.parse_loader', 'parser.parse_loader', (['csv'], {}), '(csv)\n', (199, 204), False, 'from opfy...
from motion_detector import df from bokeh.plotting import figure, show, output_file from bokeh.models import HoverTool, ColumnDataSource ### Converts the time interval information to string format df["Start_string"] = df["Start"].dt.strftime("%Y-%m-%d %H:%M:%S") df["End_string"] = df["End"].dt.strftime("%Y-%m-%d %H:%M...
[ "bokeh.models.ColumnDataSource", "bokeh.plotting.figure", "bokeh.plotting.output_file", "bokeh.models.HoverTool", "bokeh.plotting.show" ]
[((383, 403), 'bokeh.models.ColumnDataSource', 'ColumnDataSource', (['df'], {}), '(df)\n', (399, 403), False, 'from bokeh.models import HoverTool, ColumnDataSource\n'), ((433, 540), 'bokeh.plotting.figure', 'figure', ([], {'x_axis_type': '"""datetime"""', 'width': '(500)', 'height': '(100)', 'sizing_mode': '"""scale_wi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2013-2016 Online SAS and Contributors. All Rights Reserved. # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # Licensed under the BSD 2-Clause License (the "License"); you may not use this # file except in compliance ...
[ "os.path.dirname", "re.search", "setuptools.find_packages", "io.open" ]
[((1943, 2019), 're.search', 're.search', (['"""^__version__\\\\s*=\\\\s*[\\\\\'"]([^\\\\\'"]*)[\\\\\'"]"""', 'init_file', 're.M'], {}), '(\'^__version__\\\\s*=\\\\s*[\\\\\\\'"]([^\\\\\\\'"]*)[\\\\\\\'"]\', init_file, re.M)\n', (1952, 2019), False, 'import re\n'), ((1476, 1498), 'os.path.dirname', 'path.dirname', (['__...
from unittest import TestCase from openarticlegauge.plugins.pmid import PMIDPlugin from openarticlegauge import models from openarticlegauge import plugin from openarticlegauge import util import os # some random PMIDs obtained by just doing a search for "test" on the pubmed dataset # and adding random numbers to the...
[ "openarticlegauge.models.MessageObject", "os.path.abspath", "openarticlegauge.plugins.pmid.PMIDPlugin" ]
[((1085, 1110), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (1100, 1110), False, 'import os\n'), ((1195, 1220), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (1210, 1220), False, 'import os\n'), ((1307, 1332), 'os.path.abspath', 'os.path.abspath', (['__file__'],...
# Generated by Django 3.0.8 on 2020-07-28 14:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0006_auto_20200728_1652'), ] operations = [ migrations.AlterField( model_name='empl...
[ "django.db.models.OneToOneField" ]
[((378, 520), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""employee_email"""', 'to': '"""accounts.employeeProfile"""'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n related_name='employee_email'...
from ctypes import POINTER, pointer, c_int, c_char_p, c_void_p, c_size_t from logging import getLogger import ctypes import glob import json import os import subprocess import sys from .utils import Singleton try: from shutil import which except ImportError: # For Python < 3.3; it should behave more-or-less s...
[ "json.dump", "os.path.abspath", "subprocess.Popen", "os.path.isabs", "julia.core.Julia", "json.load", "os.path.dirname", "os.path.exists", "ctypes.pointer", "ctypes.PyDLL", "os.path.join", "logging.getLogger", "ctypes.POINTER" ]
[((448, 467), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (457, 467), False, 'from logging import getLogger\n'), ((534, 567), 'os.path.join', 'os.path.join', (['here', '"""config.json"""'], {}), "(here, 'config.json')\n", (546, 567), False, 'import os\n'), ((492, 517), 'os.path.abspath', 'os.p...
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # Copyright (c) 2021 # # See the LICENSE file for details # see the AUTHORS file for authors # ---------------------------------------------------------------------- #-------------------- # System wide imports # ----------...
[ "struct.pack", "wave.open", "fractions.Fraction", "logging.getLogger" ]
[((714, 740), 'logging.getLogger', 'logging.getLogger', (['"""click"""'], {}), "('click')\n", (731, 740), False, 'import logging\n'), ((2767, 2798), 'fractions.Fraction', 'Fraction', (['(nsamples_per_tick % 1)'], {}), '(nsamples_per_tick % 1)\n', (2775, 2798), False, 'from fractions import Fraction\n'), ((3363, 3392), ...
#!/usr/bin/env python __copyright__ = """ 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, modif...
[ "pylatex.LongTable", "pylatex.Subsection", "pylatex.Command", "pylatex.utils.bold", "os.path.dirname", "pylatex.Document", "pylatex.Section", "pylatex.MultiColumn", "pylatex.utils.NoEscape", "pylatex.utils.italic", "os.path.join", "pylatex.Figure" ]
[((4596, 4633), 'os.path.join', 'os.path.join', (['output_dir', 'report_name'], {}), '(output_dir, report_name)\n', (4608, 4633), False, 'import os\n'), ((5456, 5518), 'pylatex.Document', 'Document', ([], {'geometry_options': 'geometry_options', 'page_numbers': '(True)'}), '(geometry_options=geometry_options, page_numb...
import os import sys import numpy as np # isort:skip import pytest # isort:skip test_path = os.path.dirname(os.path.abspath(__file__)) # noqa # isort:skip sys.path.append(test_path + '/../neuromodels') # noqa # isort:skip import utils # isort:skip def test_compute_q10_correction(): """Test that computat...
[ "sys.path.append", "os.path.abspath", "utils.vtrap", "pytest.raises", "utils.compute_q10_correction" ]
[((161, 207), 'sys.path.append', 'sys.path.append', (["(test_path + '/../neuromodels')"], {}), "(test_path + '/../neuromodels')\n", (176, 207), False, 'import sys\n'), ((112, 137), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (127, 137), False, 'import os\n'), ((386, 427), 'utils.compute_q1...
import atexit from mlib.boot import log from mlib.boot.dicts import ObjProxy, ProxyDictRoot, ProxyListRoot, RecursiveSubDictProxy, RecursiveSubListProxy from mlib.boot.lang import enum, is_non_str_itr, isdictsafe, listkeys from mlib.boot.mlog import err, warn from mlib.file import File, write_webloc from mlib.term imp...
[ "mlib.boot.dicts.RecursiveSubDictProxy", "atexit.register", "mlib.term.log_invokation", "mlib.file.File", "mlib.boot.log", "mlib.boot.lang.listkeys", "mlib.boot.lang.enum", "mlib.boot.mlog.warn", "mlib.boot.lang.isdictsafe", "mlib.boot.dicts.RecursiveSubListProxy", "mlib.boot.dicts.ObjProxy", ...
[((2446, 2462), 'mlib.term.log_invokation', 'log_invokation', ([], {}), '()\n', (2460, 2462), False, 'from mlib.term import log_invokation\n'), ((498, 520), 'mlib.file.File', 'File', (['file'], {'quiet': '(True)'}), '(file, quiet=True)\n', (502, 520), False, 'from mlib.file import File, write_webloc\n'), ((927, 940), '...
# Generated by Django 3.1.4 on 2021-09-25 07:16 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('geography_api', '0005_auto_20210925_0702'), ] operations = [ migrations.AlterField( model_...
[ "django.db.models.CharField", "django.db.models.JSONField", "django.db.models.FloatField", "django.db.models.BooleanField", "django.db.models.IntegerField" ]
[((385, 426), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(2)', 'null': '(True)'}), '(max_length=2, null=True)\n', (401, 426), False, 'from django.db import migrations, models\n'), ((553, 594), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(3)', 'null': '(True)'}), '(...
"""bridgeGlobal URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/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')...
[ "rest_framework.routers.DefaultRouter", "django.urls.path", "rest_framework_simplejwt.views.TokenRefreshView.as_view", "django.urls.include", "rest_framework_simplejwt.views.TokenObtainPairView.as_view" ]
[((946, 969), 'rest_framework.routers.DefaultRouter', 'routers.DefaultRouter', ([], {}), '()\n', (967, 969), False, 'from rest_framework import routers\n'), ((1154, 1185), 'django.urls.path', 'path', (['"""admin/"""', 'admin.site.urls'], {}), "('admin/', admin.site.urls)\n", (1158, 1185), False, 'from django.urls impor...
from pathlib import Path import pytest from clutchless.external.filesystem import CopyError from tests.mock_fs import MockFilesystem def test_mock_fs(): fs = MockFilesystem({"folder": {"file"}}) assert set(fs.children(Path("/folder"))) == {Path("/folder/file")} assert set(fs.children(Path("/"))) == {Pa...
[ "pytest.raises", "pathlib.Path", "tests.mock_fs.MockFilesystem" ]
[((166, 202), 'tests.mock_fs.MockFilesystem', 'MockFilesystem', (["{'folder': {'file'}}"], {}), "({'folder': {'file'}})\n", (180, 202), False, 'from tests.mock_fs import MockFilesystem\n'), ((415, 436), 'tests.mock_fs.MockFilesystem', 'MockFilesystem', (['files'], {}), '(files)\n', (429, 436), False, 'from tests.mock_f...
import torch import torch.nn as nn import torch.nn.functional as F from reinforce_utils import * from utils import compute_similarity_images def init_weights(m): if type(m) == nn.Linear or type(m) == nn.Conv2d: # print(m) m.weight.data.uniform_(-0.08,0.08) if not m.bias is None: ...
[ "torch.flatten", "torch.ones", "torch.bmm", "torch.norm", "torch.nn.Conv2d", "torch.split", "torch.cat", "torch.nn.functional.softmax", "torch.nn.functional.sigmoid", "torch.nn.Linear", "torch.zeros" ]
[((3821, 3842), 'torch.flatten', 'torch.flatten', (['p1', '(-2)'], {}), '(p1, -2)\n', (3834, 3842), False, 'import torch\n'), ((3907, 3928), 'torch.flatten', 'torch.flatten', (['p2', '(-2)'], {}), '(p2, -2)\n', (3920, 3928), False, 'import torch\n'), ((3993, 4014), 'torch.flatten', 'torch.flatten', (['p3', '(-2)'], {})...
import io import os from setuptools import setup, find_packages about = {} root_path = os.path.abspath(os.path.dirname(__file__)) with io.open(os.path.join(root_path, "textacy", "about.py")) as f: exec(f.read(), about) # NOTE: Package configuration, including the name, metadata, and other options, # are set in ...
[ "os.path.dirname", "os.path.join", "setuptools.find_packages" ]
[((106, 131), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (121, 131), False, 'import os\n'), ((146, 192), 'os.path.join', 'os.path.join', (['root_path', '"""textacy"""', '"""about.py"""'], {}), "(root_path, 'textacy', 'about.py')\n", (158, 192), False, 'import os\n'), ((394, 409), 'setupto...
# -*- coding: utf-8 -*- import time, os, sys from time import strftime if __name__ == "__main__": local_file_fname = 'cities_from_dropbox.txt' print(os.path.abspath(local_file_fname)) import dropboxm dropbox_filename = '/othodi/cities_few.txt' dc = dropboxm.DropboxConnection(copy2clipboa...
[ "sys.stdout.write", "os.path.abspath", "dropboxm.DropboxConnection", "time.strftime", "time.sleep", "os.path.isfile", "sys.stdout.flush", "sys.exit" ]
[((281, 329), 'dropboxm.DropboxConnection', 'dropboxm.DropboxConnection', ([], {'copy2clipboard': '(False)'}), '(copy2clipboard=False)\n', (307, 329), False, 'import dropboxm\n'), ((166, 199), 'os.path.abspath', 'os.path.abspath', (['local_file_fname'], {}), '(local_file_fname)\n', (181, 199), False, 'import time, os, ...
from django.db.models import Model, CharField, ForeignKey, CASCADE from mii_sorter.models import Movie __author__ = 'MiiRaGe' class Tag(Model): name = CharField(unique=True, max_length=50) def __str__(self): return self.name class MovieTagging(Model): movie = ForeignKey(Movie, CASCADE) tag...
[ "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((158, 195), 'django.db.models.CharField', 'CharField', ([], {'unique': '(True)', 'max_length': '(50)'}), '(unique=True, max_length=50)\n', (167, 195), False, 'from django.db.models import Model, CharField, ForeignKey, CASCADE\n'), ((286, 312), 'django.db.models.ForeignKey', 'ForeignKey', (['Movie', 'CASCADE'], {}), '...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: create.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impo...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor", "google.protobuf.reflection.GeneratedProtocolMessageType" ]
[((460, 486), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (484, 486), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((10304, 10447), 'google.protobuf.reflection.GeneratedProtocolMessageType', '_reflection.GeneratedProtocolMessageType', (['"""Cre...
from fastapi import FastAPI, Response, status import requests import psycopg2 from cfenv import AppEnv def test_db_connection(): db = AppEnv().get_service(label="aws-rds") conn_string = db.credentials["uri"] conn = psycopg2.connect(conn_string) cur = conn.cursor() cur.execute("select count(1);") ...
[ "psycopg2.connect", "cfenv.AppEnv", "requests.get", "fastapi.FastAPI" ]
[((407, 416), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (414, 416), False, 'from fastapi import FastAPI, Response, status\n'), ((229, 258), 'psycopg2.connect', 'psycopg2.connect', (['conn_string'], {}), '(conn_string)\n', (245, 258), False, 'import psycopg2\n'), ((718, 744), 'requests.get', 'requests.get', (['api...
import weka.core.jvm as jvm jvm.start(packages=True) from weka.classifiers import Classifier from weka.core.converters import Loader, Saver print("Load operation") loader = Loader(classname="weka.core.converters.ArffLoader") data = loader.load_file("./Dataset/hepatitis.arff") #import weka.core.converters as co...
[ "weka.attribute_selection.AttributeSelection", "weka.attribute_selection.ASEvaluation", "weka.core.jvm.start", "weka.core.jvm.stop", "weka.core.converters.Loader", "weka.attribute_selection.ASSearch", "weka.filters.Filter" ]
[((29, 53), 'weka.core.jvm.start', 'jvm.start', ([], {'packages': '(True)'}), '(packages=True)\n', (38, 53), True, 'import weka.core.jvm as jvm\n'), ((179, 230), 'weka.core.converters.Loader', 'Loader', ([], {'classname': '"""weka.core.converters.ArffLoader"""'}), "(classname='weka.core.converters.ArffLoader')\n", (185...
#!/usr/bin/env python from setuptools import setup setup( name="torch-crypto", version='0.1.1', description="Command-line Cryptanalysis", author='<NAME>', author_email='<EMAIL>', url='https://github.com/CameronLonsdale/torch', license='MIT', install_requires=[ 'click>=7.0', ...
[ "setuptools.setup" ]
[((53, 387), 'setuptools.setup', 'setup', ([], {'name': '"""torch-crypto"""', 'version': '"""0.1.1"""', 'description': '"""Command-line Cryptanalysis"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/CameronLonsdale/torch"""', 'license': '"""MIT"""', 'install_requires': "['cl...
from images import IMAGES def hangman(secret_word): print ("Welcome to the game, Hangman!") print ("I am thinking of a word that is " + str(len(secret_word)) + " letters long.") # print (secret_word) print ("") total_lives = remaining_lives = 8 user_difficulty_choice = input("Choose your diffic...
[ "random.choice" ]
[((3349, 3383), 'random.choice', 'random.choice', (['letters_not_guessed'], {}), '(letters_not_guessed)\n', (3362, 3383), False, 'import random\n'), ((4111, 4135), 'random.choice', 'random.choice', (['word_list'], {}), '(word_list)\n', (4124, 4135), False, 'import random\n')]
# Copyright 2021, Yahoo # Licensed under the terms of the Apache 2.0 license. See the LICENSE file in the project root for terms from unittest import TestCase from ychaos.settings import ApplicationSettings, ProdSettings, Settings class TestSettings(TestCase): def test_settings_with_no_config_creates_ProdSetti...
[ "ychaos.settings.Settings", "ychaos.settings.Settings.get_instance", "ychaos.settings.ApplicationSettings.get_instance" ]
[((371, 394), 'ychaos.settings.Settings.get_instance', 'Settings.get_instance', ([], {}), '()\n', (392, 394), False, 'from ychaos.settings import ApplicationSettings, ProdSettings, Settings\n'), ((660, 694), 'ychaos.settings.ApplicationSettings.get_instance', 'ApplicationSettings.get_instance', ([], {}), '()\n', (692, ...
from tests.testcase import TestCase from edmunds.http.response import Response from flask.wrappers import Response as FlaskResponse class TestResponse(TestCase): """ Test Response """ def test_response(self): """ Test response :return: void """ response = ...
[ "edmunds.http.response.Response" ]
[((320, 330), 'edmunds.http.response.Response', 'Response', ([], {}), '()\n', (328, 330), False, 'from edmunds.http.response import Response\n')]
import tensorflow as tf import unittest class TestMethods(unittest.TestCase): def test_max_pool(self): num_classes = 10 print('num_classes: ', num_classes) batch_size = 2 y_output = tf.constant(value=[[.1, .3, .2, .0, .8, .4, .1, .1, .1, .2], ...
[ "unittest.main", "tensorflow.compat.v1.enable_eager_execution", "tensorflow.nn.max_pool1d", "tensorflow.reshape", "tensorflow.constant" ]
[((773, 810), 'tensorflow.compat.v1.enable_eager_execution', 'tf.compat.v1.enable_eager_execution', ([], {}), '()\n', (808, 810), True, 'import tensorflow as tf\n'), ((815, 830), 'unittest.main', 'unittest.main', ([], {}), '()\n', (828, 830), False, 'import unittest\n'), ((221, 348), 'tensorflow.constant', 'tf.constant...
""" This should be run as part of a daemonset on every instance in your cluster. Every 10 seconds it: - checks if this instance is in the list of terminating instances in the configmap - checks if this instance is being terminated for spot reasons if either of those things is true then the node is cordoned and drain...
[ "subprocess.run", "logging.debug", "json.loads", "boto3.client", "time.sleep", "os.environ.get", "requests.get", "os.getenv", "logging.getLogger" ]
[((503, 536), 'logging.getLogger', 'logging.getLogger', (['"""drainmachine"""'], {}), "('drainmachine')\n", (520, 536), False, 'import logging\n'), ((554, 648), 'os.getenv', 'os.getenv', (['"""SPOT_ENDPOINT"""', '"""http://169.254.169.254/latest/meta-data/spot/instance-action"""'], {}), "('SPOT_ENDPOINT',\n 'http://...
import sys import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy.stats import skew import imp parameters = imp.load_source("parameters", "../../../data/raw/parameters.py") def main(): player_names = [s.name for s in parameters.PLAYER_GROUPS["full"]] df = pd.read_csv("../../../da...
[ "pandas.read_csv", "imp.load_source", "matplotlib.pyplot.subplots" ]
[((138, 202), 'imp.load_source', 'imp.load_source', (['"""parameters"""', '"""../../../data/raw/parameters.py"""'], {}), "('parameters', '../../../data/raw/parameters.py')\n", (153, 202), False, 'import imp\n'), ((296, 360), 'pandas.read_csv', 'pd.read_csv', (['"""../../../data/processed/full/std/overall/main.csv"""'],...
"""Module to manage billing container.""" import logging from azure.common.client_factory import get_client_from_json_dict from azure.mgmt.containerinstance import ContainerInstanceManagementClient from azure.mgmt.containerinstance.models import ( Container, ContainerGroup, ContainerGroupRestartPolicy, ...
[ "azure.mgmt.containerinstance.models.ContainerGroup", "azure.common.client_factory.get_client_from_json_dict", "azure.mgmt.containerinstance.models.ResourceRequests", "azure.mgmt.containerinstance.models.ResourceRequirements", "azure.mgmt.containerinstance.models.ImageRegistryCredential", "azure.mgmt.cont...
[((458, 485), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (475, 485), False, 'import logging\n'), ((1791, 1949), 'azure.mgmt.containerinstance.models.ImageRegistryCredential', 'ImageRegistryCredential', ([], {'server': "registry_credentials['server']", 'username': "registry_credentials...
__author__ = 'davigar' from DevIoTGateway.sensor import * from DevIoTGateway.config import config from DevIoTGatewayPi.sensorlogic import SensorLogic from logic.grovepioperator import GrovePiOperator ranger = Sensor('ranger', 'ranger_1', 'RRanger') value_property = SProperty('distance', 0, [0, 100], 0) ranger.add_...
[ "logic.grovepioperator.GrovePiOperator.read" ]
[((498, 542), 'logic.grovepioperator.GrovePiOperator.read', 'GrovePiOperator.read', (['pin'], {'mode': '"""ultrasonic"""'}), "(pin, mode='ultrasonic')\n", (518, 542), False, 'from logic.grovepioperator import GrovePiOperator\n')]
# # Copyright (C) 2016, 2017 # The Board of Trustees of the Leland Stanford Junior University # Written by <NAME> <<EMAIL>> # # 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:/...
[ "sasutils.sysfs.sysfs.node", "sasutils.ses.ses_get_snic_nickname", "argparse.ArgumentParser", "logging.basicConfig", "sasutils.ses.ses_get_ed_status", "json.dumps", "time.time", "sasutils.ses.ses_get_ed_metrics", "sys.exit" ]
[((1209, 1250), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'desc'}), '(description=desc)\n', (1232, 1250), False, 'import argparse\n'), ((2400, 2459), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stdout', 'level': 'logging.DEBUG'}), '(stream=sys.stdout, level=loggin...
from setuptools import setup, find_packages import os here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md')) as f: long_description = f.read() setup( name='pyshadowcopy', version='0.0.1', description='Python class to work with Shadow Copy on Windows', long_de...
[ "os.path.dirname", "os.path.join", "setuptools.setup" ]
[((188, 520), 'setuptools.setup', 'setup', ([], {'name': '"""pyshadowcopy"""', 'version': '"""0.0.1"""', 'description': '"""Python class to work with Shadow Copy on Windows"""', 'long_description': 'long_description', 'url': '"""https://github.com/sblosser/pyshadowcopy"""', 'author': '"""sblosser"""', 'license': '"""MI...
__author__ = '<NAME>' # Every reference to platec has to be kept separated because it is a C extension # which is not available when using this project from jython from geo import * import platec def generate_plates_simulation(seed, width, height, sea_level=0.65, erosion_period=60, fol...
[ "platec.get_heightmap", "platec.step", "platec.is_finished", "platec.create" ]
[((701, 837), 'platec.create', 'platec.create', (['seed', 'map_side', 'sea_level', 'erosion_period', 'folding_ratio', 'aggr_overlap_abs', 'aggr_overlap_rel', 'cycle_count', 'num_plates'], {}), '(seed, map_side, sea_level, erosion_period, folding_ratio,\n aggr_overlap_abs, aggr_overlap_rel, cycle_count, num_plates)\n...
from django.db import models class Client(models.Model): name = models.CharField(max_length= 240) family_name = models.CharField(max_length= 300) age = models.IntegerField(max_length=3) nickname = models.CharField(max_length=10) password = models.CharField(max_length=7)
[ "django.db.models.CharField", "django.db.models.IntegerField" ]
[((70, 102), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(240)'}), '(max_length=240)\n', (86, 102), False, 'from django.db import models\n'), ((122, 154), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(300)'}), '(max_length=300)\n', (138, 154), False, 'from django.db ...
from network import ClientSocket, Tor from argparse import ArgumentParser import tasks onion = "mzdaxxejpx6yy47nifqvul44dfh6klhnmdsqmxakkrcabue2tjlb36ad.onion" port = 8843 class Client: BUFFERSIZE = 1024 def __init__(self): self.__tor = Tor() self.__sock = ClientSocket(onion, port) """ On...
[ "network.ClientSocket", "network.Tor", "tasks.executeShell" ]
[((259, 264), 'network.Tor', 'Tor', ([], {}), '()\n', (262, 264), False, 'from network import ClientSocket, Tor\n'), ((282, 307), 'network.ClientSocket', 'ClientSocket', (['onion', 'port'], {}), '(onion, port)\n', (294, 307), False, 'from network import ClientSocket, Tor\n'), ((661, 688), 'tasks.executeShell', 'tasks.e...
import torch import torch.nn as nn import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np import imageio import glob class NNModule(nn.Module): def __init__(self, channels): super(NNModule, self).__init__() self.conv = nn.Conv2d(3, 3, bias=False, kernel_siz...
[ "glob.glob", "torchvision.transforms.ToTensor", "torchvision.transforms.Compose", "torch.nn.Linear", "torch.is_tensor", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "imageio.imread", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.cuda.is_available", "torch.nn.MaxPool2d", "torch...
[((1092, 1114), 'torch.is_tensor', 'torch.is_tensor', (['image'], {}), '(image)\n', (1107, 1114), False, 'import torch\n'), ((1261, 1276), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)'], {}), '(1)\n', (1273, 1276), True, 'import matplotlib.pyplot as plt\n'), ((1302, 1312), 'matplotlib.pyplot.show', 'plt.show', ...
import sys import os import shutil from pyspark.sql.types import * from pyspark.sql import SparkSession from pyspark.sql.types import * def process_list_to_df(spark, csv_file, my_schema): """" :param spark: sparksession :param csv_file: data as csv file :param schema: schema :return: """ ...
[ "shutil.rmtree", "pyspark.sql.SparkSession.builder.appName", "os.path.exists" ]
[((1216, 1235), 'os.path.exists', 'os.path.exists', (['out'], {}), '(out)\n', (1230, 1235), False, 'import os\n'), ((1245, 1263), 'shutil.rmtree', 'shutil.rmtree', (['out'], {}), '(out)\n', (1258, 1263), False, 'import shutil\n'), ((1043, 1079), 'pyspark.sql.SparkSession.builder.appName', 'SparkSession.builder.appName'...
# pylint: disable=E0401 import os from base64 import b64encode import calendar from datetime import datetime, timedelta from google.appengine.ext import ndb from google.appengine.ext.ndb import model import logging import monzo class User(ndb.Model): """Models an individual user""" refresh_token = ndb.String...
[ "monzo.list_transactions", "monzo.delete_webhook", "datetime.timedelta", "google.appengine.ext.ndb.model.transaction", "monzo.annotate_transaction", "monzo.get_balance", "datetime.datetime.now", "os.urandom", "monzo.get_transaction", "google.appengine.ext.ndb.BooleanProperty", "google.appengine....
[((310, 330), 'google.appengine.ext.ndb.StringProperty', 'ndb.StringProperty', ([], {}), '()\n', (328, 330), False, 'from google.appengine.ext import ndb\n'), ((350, 370), 'google.appengine.ext.ndb.StringProperty', 'ndb.StringProperty', ([], {}), '()\n', (368, 370), False, 'from google.appengine.ext import ndb\n'), ((3...
from matplotlib import cm, rcParams import matplotlib.pyplot as plt import matplotlib.colors as colors import matplotlib as matplotlib import numpy as np import math as math import random as rand import os, sys, csv import pandas as pd #matplotlib.pyplot.xkcd(scale=.5, length=100, randomness=2) c = ['#aa3863', '#d9702...
[ "numpy.random.seed", "matplotlib.pyplot.show", "math.sqrt", "matplotlib.pyplot.ylim", "numpy.random.randn", "matplotlib.pyplot.subplots", "numpy.array", "pandas.Series", "numpy.linspace", "matplotlib.pyplot.tight_layout" ]
[((436, 452), 'numpy.random.seed', 'np.random.seed', ([], {}), '()\n', (450, 452), True, 'import numpy as np\n'), ((4708, 4729), 'pandas.Series', 'pd.Series', (['phis1_corr'], {}), '(phis1_corr)\n', (4717, 4729), True, 'import pandas as pd\n'), ((4743, 4764), 'pandas.Series', 'pd.Series', (['phis2_corr'], {}), '(phis2_...
import random from brick import * import globalVar from globalVar import TOP, HT, WIDTH, LEFT, x_bricks, obj_bricks, balls, power_ups, all_power_ups, level, paddle def init_power_ups(): globalVar.all_power_ups = [] globalVar.all_power_ups.extend(['expand','shrink','fast', 'thru', 'multi', 'grab','shooter','fir...
[ "globalVar.all_power_ups.append", "random.randint", "globalVar.balls.remove", "globalVar.all_power_ups.extend" ]
[((224, 332), 'globalVar.all_power_ups.extend', 'globalVar.all_power_ups.extend', (["['expand', 'shrink', 'fast', 'thru', 'multi', 'grab', 'shooter', 'fire']"], {}), "(['expand', 'shrink', 'fast', 'thru', 'multi',\n 'grab', 'shooter', 'fire'])\n", (254, 332), False, 'import globalVar\n'), ((357, 393), 'globalVar.all...
"""Code for "<NAME>, <NAME>, <NAME>, <NAME>, Open-source deep learning-based automatic segmentation of mouse Schlemm’s canal in optical coherence tomography images. Experimental Eye Research, 108844 (2021)." Link: https://www.sciencedirect.com/science/article/pii/S0014483521004103 DOI: 10.1016/j.exer.2021.108844 The da...
[ "yaml.load", "os.makedirs", "torch.load", "os.path.exists", "torch.cuda.device_count", "omegaconf.DictConfig", "torch.zeros", "torch.nn.DataParallel", "os.path.join" ]
[((1359, 1385), 'os.path.join', 'os.path.join', (['save_dir', 'fn'], {}), '(save_dir, fn)\n', (1371, 1385), False, 'import os\n'), ((1890, 1911), 'torch.load', 'torch.load', (['ckpt_path'], {}), '(ckpt_path)\n', (1900, 1911), False, 'import torch\n'), ((3453, 3475), 'torch.zeros', 'torch.zeros', (['out_shape'], {}), '(...
from conan.packager import ConanMultiPackager if __name__ == "__main__": builder = ConanMultiPackager(username="bitprim", channel="stable", archs=["x86_64"]) builder.add_common_builds(shared_option_name="libzmq:shared") filtered_builds = [] for settings, options, env_vars, build_requires in builder.bu...
[ "conan.packager.ConanMultiPackager" ]
[((88, 162), 'conan.packager.ConanMultiPackager', 'ConanMultiPackager', ([], {'username': '"""bitprim"""', 'channel': '"""stable"""', 'archs': "['x86_64']"}), "(username='bitprim', channel='stable', archs=['x86_64'])\n", (106, 162), False, 'from conan.packager import ConanMultiPackager\n')]
import torch from ue4nlp.dropconnect_mc import ( LinearDropConnectMC, activate_mc_dropconnect, convert_to_mc_dropconnect, hide_dropout, ) from ue4nlp.dropout_mc import DropoutMC, activate_mc_dropout, convert_to_mc_dropout from utils.utils_dropout import set_last_dropout, get_last_dropout, set_last_dropc...
[ "ue4nlp.dropconnect_mc.activate_mc_dropconnect", "numpy.argmin", "ue4nlp.mahalanobis_distance.compute_covariance", "ue4nlp.mahalanobis_distance.compute_centroids", "utils.utils_heads.BertClassificationHeadIdentityPooler", "utils.utils_inference.is_custom_head", "ue4nlp.dropconnect_mc.convert_to_mc_dropc...
[((893, 912), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (910, 912), False, 'import logging\n'), ((1482, 1556), 'ue4nlp.dropconnect_mc.convert_to_mc_dropconnect', 'convert_to_mc_dropconnect', (['model.electra.encoder', "{'Linear': dropout_ctor}"], {}), "(model.electra.encoder, {'Linear': dropout_ctor})...
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/AllergyIntolerance Release: R4 Version: 4.0.1 Build ID: 9346c8cc45 Last updated: 2019-11-01T09:29:23.356+11:00 """ import io import json import os import unittest import pytest from .. import allergyintolerance from ..fhirdate import FHIRDa...
[ "os.environ.get", "json.load", "os.path.join", "pytest.mark.usefixtures" ]
[((360, 400), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""base_settings"""'], {}), "('base_settings')\n", (383, 400), False, 'import pytest\n'), ((511, 550), 'os.environ.get', 'os.environ.get', (['"""FHIR_UNITTEST_DATADIR"""'], {}), "('FHIR_UNITTEST_DATADIR')\n", (525, 550), False, 'import os\n'), ((662...
# -*- coding: utf-8 -*- """Test helpers""" import datetime import imaplib import sys import unittest from imap_cli import search from imap_cli import tests class SearchTests(unittest.TestCase): def setUp(self): imaplib.IMAP4_SSL = tests.ImapConnectionMock() def test_basic_search(self): s...
[ "imaplib.IMAP4_SSL", "imap_cli.search.create_search_criterion_by_mail_address", "imap_cli.search.display_mail_tree", "imap_cli.tests.ImapConnectionMock", "imap_cli.search.fetch_uids", "imap_cli.search.create_search_criterion_by_uid", "imap_cli.search.create_search_criterion_by_header", "imap_cli.searc...
[((250, 276), 'imap_cli.tests.ImapConnectionMock', 'tests.ImapConnectionMock', ([], {}), '()\n', (274, 276), False, 'from imap_cli import tests\n'), ((339, 358), 'imaplib.IMAP4_SSL', 'imaplib.IMAP4_SSL', ([], {}), '()\n', (356, 358), False, 'import imaplib\n'), ((493, 512), 'imaplib.IMAP4_SSL', 'imaplib.IMAP4_SSL', ([]...
import copy from evaluator_package.Parsing_tools import is_field, tokenize_parentheses """Implemented Grammar: S -> (S) S_1 | a_1 S_1 | not (S) S_1 S_1 -> bool S S_1 | epsilon a_1 -> a | not a a -> record_field comp value | value in record_field | value not in field bool -> and | or comp -> == | != | > | < |...
[ "evaluator_package.Parsing_tools.is_field", "copy.deepcopy", "evaluator_package.Parsing_tools.tokenize_parentheses" ]
[((739, 767), 'evaluator_package.Parsing_tools.tokenize_parentheses', 'tokenize_parentheses', (['tokens'], {}), '(tokens)\n', (759, 767), False, 'from evaluator_package.Parsing_tools import is_field, tokenize_parentheses\n'), ((792, 813), 'copy.deepcopy', 'copy.deepcopy', (['tokens'], {}), '(tokens)\n', (805, 813), Fal...
from django.contrib.auth.decorators import login_required from django.http import HttpResponse from sovi.utils import jsonSerializer from sovi.api.awards.models import Award, AwardType @login_required def getAllAwards(request): return HttpResponse(jsonSerializer.serialize(Award.objects.all()), ...
[ "sovi.api.awards.models.AwardType.objects.all", "sovi.api.awards.models.Award.objects.all" ]
[((280, 299), 'sovi.api.awards.models.Award.objects.all', 'Award.objects.all', ([], {}), '()\n', (297, 299), False, 'from sovi.api.awards.models import Award, AwardType\n'), ((457, 480), 'sovi.api.awards.models.AwardType.objects.all', 'AwardType.objects.all', ([], {}), '()\n', (478, 480), False, 'from sovi.api.awards.m...
from django import forms import os from .wsapi import WSAPI # set these in some secure way in your environment rather than in source code. # os.environ['WSAPI_CLIENT_ID'] = '...' # os.environ['WSAPI_API_KEY'] = '...' # os.environ['WSAPI_API_HOST'] = 'https://my.ipgpay.com' class CreditForm(forms.Form): order_id...
[ "os.environ.get", "django.forms.CharField" ]
[((323, 340), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (338, 340), False, 'from django import forms\n'), ((356, 373), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (371, 373), False, 'from django import forms\n'), ((387, 404), 'django.forms.CharField', 'forms.CharField', ([], {}),...
import os from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from oauth2client.client import GoogleCredentials def download_data_from_drive(): gauth = GoogleAuth() gauth.LocalWebserverAuth() drive = GoogleDrive(gauth) file_list = drive.ListFile( {'q': "'17YUaUJdFzgUVEQ5r...
[ "os.rename", "pydrive.auth.GoogleAuth", "pydrive.drive.GoogleDrive" ]
[((180, 192), 'pydrive.auth.GoogleAuth', 'GoogleAuth', ([], {}), '()\n', (190, 192), False, 'from pydrive.auth import GoogleAuth\n'), ((236, 254), 'pydrive.drive.GoogleDrive', 'GoogleDrive', (['gauth'], {}), '(gauth)\n', (247, 254), False, 'from pydrive.drive import GoogleDrive\n'), ((618, 672), 'os.rename', 'os.rename...
import logging import typing from ParadoxTrading.Engine import EngineAbstract, EventType, \ ExecutionAbstract, MarketSupplyAbstract, PortfolioAbstract, ReturnMarket, \ ReturnSettlement, StrategyAbstract class BacktestEngine(EngineAbstract): def __init__( self, _market_supply: Mark...
[ "logging.info" ]
[((953, 979), 'logging.info', 'logging.info', (['"""Begin RUN!"""'], {}), "('Begin RUN!')\n", (965, 979), False, 'import logging\n')]
from odoo import models, fields class WlProductType(models.Model): _name = "wl.product.type" _description = '产品类型表' name = fields.Char(string="产品名称") come_place = fields.Char(string="生产地") wl_ids = fields.One2many(comodel_name="wl.plan", inverse_name='name', string="物料类型") wl_color_ids = fiel...
[ "odoo.fields.Many2many", "odoo.fields.One2many", "odoo.fields.Char" ]
[((138, 164), 'odoo.fields.Char', 'fields.Char', ([], {'string': '"""产品名称"""'}), "(string='产品名称')\n", (149, 164), False, 'from odoo import models, fields\n'), ((182, 207), 'odoo.fields.Char', 'fields.Char', ([], {'string': '"""生产地"""'}), "(string='生产地')\n", (193, 207), False, 'from odoo import models, fields\n'), ((221...
import os import errno import numpy as np import tensorflow as tf def create_path(path): """Create path if not exist""" try: os.makedirs(path) except OSError as exception: if exception.errno != errno.EEXIST: raise def conv_layer(name, input_tensor, ksize, num_out_channels, keep...
[ "numpy.random.seed", "os.makedirs", "tensorflow.nn.conv2d", "numpy.random.choice", "numpy.round", "numpy.random.shuffle" ]
[((616, 688), 'tensorflow.nn.conv2d', 'tf.nn.conv2d', (['input_tensor', 'conv_filter', '[1, 1, 1, 1]', '"""SAME"""'], {'name': 'name'}), "(input_tensor, conv_filter, [1, 1, 1, 1], 'SAME', name=name)\n", (628, 688), True, 'import tensorflow as tf\n'), ((1251, 1279), 'numpy.random.seed', 'np.random.seed', (['random_state...
"""Log generator module.""" import click from constants import ( ENGINE_OPTION_TYPE, ENGINE_HELP_MESSAGE, LINES_HELP_MESSAGE, INTERVAL_HELP_MESSAGE, ) from engine.webserver import WebserverFactory @click.command() @click.option( "--engine", "-e", required=True, type=ENGINE_OPTION_TYPE, help=ENGIN...
[ "click.option", "engine.webserver.WebserverFactory.generate", "click.command" ]
[((217, 232), 'click.command', 'click.command', ([], {}), '()\n', (230, 232), False, 'import click\n'), ((234, 335), 'click.option', 'click.option', (['"""--engine"""', '"""-e"""'], {'required': '(True)', 'type': 'ENGINE_OPTION_TYPE', 'help': 'ENGINE_HELP_MESSAGE'}), "('--engine', '-e', required=True, type=ENGINE_OPTIO...
#! /usr/bin/env python ################################################################################# # File Name : IPADS_GraphX_Plot_Partition_2.py # Created By : xd # Creation Date : [2014-08-14 22:09] # Last Modified : [2014-08-14 22:11] # Descrip...
[ "matplotlib.pyplot.title", "matplotlib.cm.Paired", "matplotlib.pyplot.clf", "matplotlib.pyplot.legend", "numpy.arange", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig" ]
[((693, 702), 'matplotlib.pyplot.clf', 'plt.clf', ([], {}), '()\n', (700, 702), True, 'import matplotlib.pyplot as plt\n'), ((768, 780), 'numpy.arange', 'np.arange', (['N'], {}), '(N)\n', (777, 780), True, 'import numpy as np\n'), ((1147, 1165), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['ylabel'], {}), '(ylabel)\n', ...
""" Тесты для JIMMessage """ import pytest import time from hanita_JIM import JIMMessage, JIMClientMessage, JIMMessageError, JIMMessageAttr def check_message(expect, result): assert isinstance(expect, dict) assert isinstance(result, JIMMessage) assert result.keys() == expect.keys() for key in expect:...
[ "hanita_JIM.JIMClientMessage.join", "hanita_JIM.JIMClientMessage.add_contact", "hanita_JIM.JIMClientMessage.del_contact", "hanita_JIM.JIMClientMessage.contact_list", "hanita_JIM.JIMClientMessage.who_online", "hanita_JIM.JIMClientMessage.quit", "hanita_JIM.JIMMessageAttr", "hanita_JIM.JIMClientMessage....
[((546, 571), 'hanita_JIM.JIMMessageAttr', 'JIMMessageAttr', (['"""attr"""', '(8)'], {}), "('attr', 8)\n", (560, 571), False, 'from hanita_JIM import JIMMessage, JIMClientMessage, JIMMessageError, JIMMessageAttr\n'), ((589, 613), 'hanita_JIM.JIMMessageAttr', 'JIMMessageAttr', (['"""action"""'], {}), "('action')\n", (60...
# -*- coding: utf-8 -*- import django_filters from dal import autocomplete from django import forms from django.utils.translation import ugettext_lazy as _ from company.models import Company from pola.filters import (CrispyFilterMixin) from .models import Product class NullProductFilter(django_filters.Filter): ...
[ "company.models.Company.objects.all", "django.utils.translation.ugettext_lazy", "dal.autocomplete.ModelSelect2" ]
[((697, 718), 'company.models.Company.objects.all', 'Company.objects.all', ([], {}), '()\n', (716, 718), False, 'from company.models import Company\n'), ((735, 796), 'dal.autocomplete.ModelSelect2', 'autocomplete.ModelSelect2', ([], {'url': '"""company:company-autocomplete"""'}), "(url='company:company-autocomplete')\n...
# -*- coding: utf-8 -*- from argparse import ArgumentParser from . server import gen_app parser = ArgumentParser(description='run RPZ-IR-Sensor server') args = parser.parse_args() app = gen_app() app.run(host=app.config['HOST'])
[ "argparse.ArgumentParser" ]
[((101, 155), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""run RPZ-IR-Sensor server"""'}), "(description='run RPZ-IR-Sensor server')\n", (115, 155), False, 'from argparse import ArgumentParser\n')]
#coding:utf-8 import random import requests def req_get(url :str,headers :dict,UA_pool :list,proxy_pool :list,**kwargs): session = requests.Session() try: res = session.get(url,headers=headers,**kwargs) return res except: try: if headers: headers.update...
[ "requests.Session", "random.choice" ]
[((138, 156), 'requests.Session', 'requests.Session', ([], {}), '()\n', (154, 156), False, 'import requests\n'), ((1067, 1085), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1083, 1085), False, 'import requests\n'), ((420, 442), 'random.choice', 'random.choice', (['UA_pool'], {}), '(UA_pool)\n', (433, 442)...
from localization import L from resources.fonts import QXFontDB from resources.gfx import QXImageDB, QXImageSequenceDB from xlib import qt as qtx from ...backend import BackendHost class QBackendPanel(qtx.QXWidget): """ Base panel for CSW backend """ def __init__(self, backend : BackendHost, name : s...
[ "resources.fonts.QXFontDB.get_default_font", "xlib.qt.show_and_enable", "xlib.qt.QXLabel", "xlib.qt.QXFrame", "resources.gfx.QXImageSequenceDB.icon_loading", "resources.gfx.QXImageDB.settings_reset_outline", "resources.gfx.QXImageDB.power_outline", "xlib.qt.QXVBoxLayout", "xlib.qt.hide_and_disable",...
[((1374, 1387), 'xlib.qt.QXLabel', 'qtx.QXLabel', ([], {}), '()\n', (1385, 1387), True, 'from xlib import qt as qtx\n'), ((1795, 1855), 'xlib.qt.QXFrameHBox', 'qtx.QXFrameHBox', (['[layout]'], {'contents_margins': '(2)', 'enabled': '(False)'}), '([layout], contents_margins=2, enabled=False)\n', (1810, 1855), True, 'fro...
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-06-14 02:51 from __future__ import unicode_literals import ckeditor_uploader.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion import pythonizame.apps.videos.models class Migration(migrations...
[ "django.db.models.TextField", "django.db.models.URLField", "django.db.migrations.swappable_dependency", "django.db.models.ManyToManyField", "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.ImageField", "djang...
[((383, 440), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (414, 440), False, 'from django.db import migrations, models\n'), ((3260, 3357), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'help_tex...
from lib.pgvbotLib import * import pywikibot from copy import deepcopy import re from openpyxl import Workbook site = pywikibot.Site() #page = pywikibot.Page(site,title) pool = site.allpages() pool_size = len(list(deepcopy(pool))) print(pool_size) wb = Workbook() sheet = wb.active sheet['A1'] = 'Page' sheet['B1'] ...
[ "pywikibot.Site", "copy.deepcopy", "openpyxl.Workbook" ]
[((121, 137), 'pywikibot.Site', 'pywikibot.Site', ([], {}), '()\n', (135, 137), False, 'import pywikibot\n'), ((258, 268), 'openpyxl.Workbook', 'Workbook', ([], {}), '()\n', (266, 268), False, 'from openpyxl import Workbook\n'), ((219, 233), 'copy.deepcopy', 'deepcopy', (['pool'], {}), '(pool)\n', (227, 233), False, 'f...
# -*- coding: utf-8 -*- import numpy as np from chainercv.visualizations import vis_bbox as chainer_vis_bbox def vis_bbox(img, bbox, label=None, score=None, label_names=None, ax=None): """A wrapper of chainer function for visualizing bbox inside image. Args: img (~torch.tensor): an image ...
[ "numpy.uint8" ]
[((915, 934), 'numpy.uint8', 'np.uint8', (['(img * 255)'], {}), '(img * 255)\n', (923, 934), True, 'import numpy as np\n')]
import os import os.path as osp import yaml from operator import concat, sub from utils.raw_utils import convert,scale,diff from utils.io import imread, imwrite,get_exif,get_trip,raw2rgbg,mdwrite,raw_read_rgb,check_exif,extract_exif from utils.isp import rgbg2linref, rgbg2srgb,rgbg2rgb from utils.path import be,bj,mkdi...
[ "pprint.pformat", "numpy.histogram", "utils.io.imwrite", "os.path.join", "utils.io.raw_read_rgb", "utils.io.imread", "cv2.imwrite", "utils.io.check_exif", "utils.path.mkdir", "rawpy.imread", "pandas.concat", "cv2.resize", "utils.io.get_exif", "multiprocessing.Pool", "utils.io.parse_tripr...
[((1023, 1041), 'utils.io.check_exif', 'check_exif', (['inputs'], {}), '(inputs)\n', (1033, 1041), False, 'from utils.io import imread, imwrite, get_exif, get_trip, raw2rgbg, mdwrite, raw_read_rgb, check_exif, extract_exif\n'), ((1597, 1620), 'utils.io.imwrite', 'imwrite', (['outputs[3]', 'fo'], {}), '(outputs[3], fo)\...
from pytest import fixture from cfripper.config.config import Config from cfripper.model.enums import RuleGranularity, RuleMode, RuleRisk from cfripper.model.result import Failure from cfripper.rules import S3CrossAccountTrustRule from tests.utils import compare_lists_of_failures, get_cfmodel_from @fixture() def s3_...
[ "tests.utils.get_cfmodel_from", "pytest.fixture", "cfripper.config.config.Config", "tests.utils.compare_lists_of_failures", "cfripper.rules.S3CrossAccountTrustRule", "cfripper.model.result.Failure" ]
[((303, 312), 'pytest.fixture', 'fixture', ([], {}), '()\n', (310, 312), False, 'from pytest import fixture\n'), ((447, 456), 'pytest.fixture', 'fixture', ([], {}), '()\n', (454, 456), False, 'from pytest import fixture\n'), ((625, 634), 'pytest.fixture', 'fixture', ([], {}), '()\n', (632, 634), False, 'from pytest imp...
# -*- coding: utf-8 -*- """ .. invisible: _ _ _____ _ _____ _____ | | | | ___| | | ___/ ___| | | | | |__ | | | |__ \ `--. | | | | __|| | | __| `--. \ \ \_/ / |___| |___| |___/\__/ / \___/\____/\_____|____/\____/ Created on Jul 1, 2014 Deconvolutional layer. ████████████████...
[ "numpy.ceil", "veles.ocl_blas.OCLBLAS.attach_to_device", "zope.interface.implementer", "numpy.zeros", "numpy.ones", "veles.compat.from_none", "veles.memory.Array", "numpy.prod" ]
[((1689, 1736), 'zope.interface.implementer', 'implementer', (['IOpenCLUnit', 'ICUDAUnit', 'INumpyUnit'], {}), '(IOpenCLUnit, ICUDAUnit, INumpyUnit)\n', (1700, 1736), False, 'from zope.interface import implementer\n'), ((3993, 4000), 'veles.memory.Array', 'Array', ([], {}), '()\n', (3998, 4000), False, 'from veles.memo...
# coding:utf-8 from __future__ import absolute_import, unicode_literals __author__ = 'BLUE' __time__ = 'Sun Oct 28 2018 21:52:29 GMT+0800' import six from WechatBiz.lib.Utils import to_binary, to_text class WechatException(Exception): """公众号异常基类""" pass class WechatPayError(Exception): """ 微信支付异常类 """ ...
[ "WechatBiz.lib.Utils.to_text", "WechatBiz.lib.Utils.to_binary" ]
[((1160, 1183), 'WechatBiz.lib.Utils.to_binary', 'to_binary', (['self.message'], {}), '(self.message)\n', (1169, 1183), False, 'from WechatBiz.lib.Utils import to_binary, to_text\n'), ((1217, 1238), 'WechatBiz.lib.Utils.to_text', 'to_text', (['self.message'], {}), '(self.message)\n', (1224, 1238), False, 'from WechatBi...
# @Author: <NAME> <narsi> # @Date: 2018-11-12T14:06:36-06:00 # @Last modified by: narsi # @Last modified time: 2019-01-27T20:55:47-06:00 import numpy as np import torch import torch.nn as nn import torch.nn.init as init ''' https://gist.github.com/jeasinema/ed9236ce743c8efaf30fa2ff732749f5 ''' def weight_init(m): ...
[ "torch.nn.init.normal", "torch.nn.init.constant_", "torch.nn.init.orthogonal", "numpy.sqrt" ]
[((445, 471), 'torch.nn.init.normal', 'init.normal', (['m.weight.data'], {}), '(m.weight.data)\n', (456, 471), True, 'import torch.nn.init as init\n'), ((497, 521), 'torch.nn.init.normal', 'init.normal', (['m.bias.data'], {}), '(m.bias.data)\n', (508, 521), True, 'import torch.nn.init as init\n'), ((677, 707), 'torch.n...
import click from doing.utils import get_config def get_common_options(): """ Retrieve common config options. Retrieves set of config settings from config file that are used in every command. """ return { "team": get_config("team"), "area": get_config("area"), "iteration"...
[ "doing.utils.get_config" ]
[((245, 263), 'doing.utils.get_config', 'get_config', (['"""team"""'], {}), "('team')\n", (255, 263), False, 'from doing.utils import get_config\n'), ((281, 299), 'doing.utils.get_config', 'get_config', (['"""area"""'], {}), "('area')\n", (291, 299), False, 'from doing.utils import get_config\n'), ((322, 345), 'doing.u...
""" Copyright (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt * AUTHOR : <NAME> * DATE : Nov 2018 Module Summary ############### Tools database access and connection to survey wells and logs Tutorial link can be found here: https://github.com/OpendTect/OpendTect-ML-Dev/blob/main/docum...
[ "odpy.common.getODArgs", "odpy.dbman.getDBList", "odpy.dbman.getDBDict", "odpy.oscommand.getODCommand", "odpy.dbman.getDBKeyForName", "odpy.dbman.getInfoByName" ]
[((1554, 1628), 'odpy.dbman.getInfoByName', 'oddbman.getInfoByName', (['wllnm', 'wlltrlgrp'], {'exenm': 'oddbman.dbmanexe', 'args': 'args'}), '(wllnm, wlltrlgrp, exenm=oddbman.dbmanexe, args=args)\n', (1575, 1628), True, 'import odpy.dbman as oddbman\n'), ((2433, 2468), 'odpy.oscommand.getODCommand', 'getODCommand', ([...
# In the array of random integers, swap the minimum and maximum elements. import random arr = [random.randint(1, 101) for _ in range(15)] minimum_one = arr[0] maximum_one = arr[-1] for i in arr: if i < minimum_one: minimum_one = i elif i > maximum_one: maximum_one = i min_index = arr.index...
[ "random.randint" ]
[((97, 119), 'random.randint', 'random.randint', (['(1)', '(101)'], {}), '(1, 101)\n', (111, 119), False, 'import random\n')]
import carla from __init__ import client, world from TB_common_functions import wraptopi, calculateDistance, AgentColourToRGB from path_planner_suite import astar_search, find_nearest from shapely.geometry import LineString import math import numpy as np import matplotlib.pyplot as plt class vehicle_manual(): def __...
[ "numpy.fmin", "TB_common_functions.AgentColourToRGB", "math.radians", "numpy.array", "carla.VehicleControl" ]
[((2012, 2076), 'numpy.array', 'np.array', (['[agent_velocity.x, agent_velocity.y, agent_velocity.z]'], {}), '([agent_velocity.x, agent_velocity.y, agent_velocity.z])\n', (2020, 2076), True, 'import numpy as np\n'), ((2556, 2578), 'carla.VehicleControl', 'carla.VehicleControl', ([], {}), '()\n', (2576, 2578), False, 'i...
""" Binary Sensor platform for Alarm.com """ from datetime import timedelta import logging import async_timeout from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.components.binary_sensor import ( DEVICE_CLASS_DOOR, DEVICE_CLASS_MOTION, B...
[ "async_timeout.timeout", "datetime.timedelta", "homeassistant.helpers.update_coordinator.UpdateFailed", "logging.getLogger" ]
[((684, 711), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (701, 711), False, 'import logging\n'), ((2226, 2247), 'datetime.timedelta', 'timedelta', ([], {'seconds': '(30)'}), '(seconds=30)\n', (2235, 2247), False, 'from datetime import timedelta\n'), ((1291, 1316), 'async_timeout.timeo...
#===============================WIMPFuncs.py===================================# # Created by <NAME> 2020 # Contains all the functions for doing the WIMPy calculations #==============================================================================# import numpy as np from numpy import pi, sqrt, exp, zeros, size, sha...
[ "LabFuncs.LabVelocity", "numpy.ones", "numpy.shape", "numpy.sin", "numpy.exp", "LabFuncs.LabVelocitySimple", "numpy.meshgrid", "LabFuncs.efficiency", "numpy.linspace", "LabFuncs.FormFactorHelm", "numpy.log10", "numpy.trapz", "numpy.size", "scipy.special.erf", "Params.WIMP", "numpy.cos"...
[((1528, 1560), 'LabFuncs.LabVelocitySimple', 'LabFuncs.LabVelocitySimple', (['(67.0)'], {}), '(67.0)\n', (1554, 1560), False, 'import LabFuncs\n'), ((2213, 2240), 'Params.WIMP', 'Params.WIMP', (['m_chi', 'sigma_p'], {}), '(m_chi, sigma_p)\n', (2224, 2240), False, 'import Params\n'), ((2618, 2646), 'numpy.trapz', 'trap...
# -*- coding: utf-8 -*- import os import logging from logging import Formatter from logging.handlers import RotatingFileHandler from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.assets import Environment from webassets.loaders import PythonLoader from eveask import assets app = Flask(_...
[ "flask.ext.sqlalchemy.SQLAlchemy", "flask.Flask", "flask.ext.assets.Environment", "logging.handlers.RotatingFileHandler", "os.environ.get", "logging.Formatter", "webassets.loaders.PythonLoader" ]
[((313, 328), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (318, 328), False, 'from flask import Flask\n'), ((387, 422), 'os.environ.get', 'os.environ.get', (['"""EVEASK_ENV"""', '"""dev"""'], {}), "('EVEASK_ENV', 'dev')\n", (401, 422), False, 'import os\n'), ((590, 605), 'flask.ext.sqlalchemy.SQLAlchemy...