code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from application.TDG import PatientTDG from passlib.hash import sha256_crypt import datetime # Returns True if patient exists def patientExists(hcnumber): return PatientTDG.find(hcnumber=hcnumber) is not None # Returns Patient if found def getPatient(hcnumber): patient = PatientTDG.find(hcnumber=hcnumber) if patie...
[ "application.TDG.PatientTDG.create", "application.TDG.PatientTDG.find", "datetime.datetime.strptime", "application.TDG.PatientTDG.update", "passlib.hash.sha256_crypt.hash", "passlib.hash.sha256_crypt.verify", "datetime.datetime.now" ]
[((276, 310), 'application.TDG.PatientTDG.find', 'PatientTDG.find', ([], {'hcnumber': 'hcnumber'}), '(hcnumber=hcnumber)\n', (291, 310), False, 'from application.TDG import PatientTDG\n'), ((164, 198), 'application.TDG.PatientTDG.find', 'PatientTDG.find', ([], {'hcnumber': 'hcnumber'}), '(hcnumber=hcnumber)\n', (179, 1...
from django.urls import path, include urlpatterns = [ # API path('', include('backend.api.v2.urls')), ]
[ "django.urls.include" ]
[((78, 108), 'django.urls.include', 'include', (['"""backend.api.v2.urls"""'], {}), "('backend.api.v2.urls')\n", (85, 108), False, 'from django.urls import path, include\n')]
''' @brief Leg-Rest Pos Recommendataion with DecisionTree Regressor @author <NAME> <<EMAIL>> @date 2021. 05. 21 ''' import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeRegressor import progressbar ''' Presets & Hyper-parameters ''' CONF...
[ "pandas.DataFrame", "sklearn.tree.DecisionTreeRegressor", "numpy.ravel", "pandas.read_csv", "progressbar.Bar", "progressbar.Percentage", "numpy.arange", "pandas.set_option" ]
[((404, 439), 'pandas.set_option', 'pd.set_option', (['"""display.width"""', '(200)'], {}), "('display.width', 200)\n", (417, 439), True, 'import pandas as pd\n'), ((748, 807), 'pandas.read_csv', 'pd.read_csv', (['CONFIGURATION_FILE_PATH'], {'header': '(0)', 'index_col': '(0)'}), '(CONFIGURATION_FILE_PATH, header=0, in...
import os import os.path as osp import re import time import shutil import argparse import subprocess import multiprocessing import cv2 import numpy as np import pandas as pd from requests_html import HTML from selenium import webdriver def check_banner(args): valid = False stage_dir = args[0] banner_dir...
[ "pandas.DataFrame", "subprocess.Popen", "numpy.abs", "argparse.ArgumentParser", "os.makedirs", "os.path.basename", "time.sleep", "cv2.imread", "re.findall", "selenium.webdriver.ChromeOptions", "selenium.webdriver.Chrome", "shutil.rmtree", "os.path.join", "os.listdir", "cv2.resize", "mu...
[((1762, 1787), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (1785, 1787), False, 'from selenium import webdriver\n'), ((1929, 1985), 'selenium.webdriver.Chrome', 'webdriver.Chrome', (["args['driver']"], {'options': 'chrome_options'}), "(args['driver'], options=chrome_options)\n", (1...
#!/usr/bin/python import argparse import glob import re def recog_file(filename, ground_truth_path): # read ground truth gt_file = ground_truth_path + re.sub('.*/','/',filename) + '.txt' with open(gt_file, 'r') as f: ground_truth = f.read().split('\n')[0:-1] f.close() # read recogniz...
[ "re.sub", "argparse.ArgumentParser", "glob.glob" ]
[((957, 982), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (980, 982), False, 'import argparse\n'), ((1146, 1178), 'glob.glob', 'glob.glob', (["(args.recog_dir + '/*')"], {}), "(args.recog_dir + '/*')\n", (1155, 1178), False, 'import glob\n'), ((163, 191), 're.sub', 're.sub', (['""".*/"""', '...
import argparse import numpy as np import struct from matplotlib import gridspec import matplotlib.pyplot as plt from glob import glob import os from os.path import join from natsort import natsorted from skimage.transform import resize import re from tqdm import tqdm """ Code to process depth/image/pose binaries the ...
[ "numpy.stack", "matplotlib.pyplot.subplot", "numpy.flip", "argparse.ArgumentParser", "os.makedirs", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "skimage.transform.resize", "numpy.reshape", "matplotlib.gridspec.GridSpec", "os.path.join" ]
[((1955, 1991), 'numpy.reshape', 'np.reshape', (['file_content', '(192, 256)'], {}), '(file_content, (192, 256))\n', (1965, 1991), True, 'import numpy as np\n'), ((2260, 2296), 'numpy.reshape', 'np.reshape', (['file_content', '(192, 256)'], {}), '(file_content, (192, 256))\n', (2270, 2296), True, 'import numpy as np\n'...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 <NAME> # http://www.codeatcpp.com # # Licensed under the BSD 3-Clause license. # See LICENSE file in the project root for full license information. # """ Convert Zeus Z80 assembler file to a plain text """ import argparse import logging import io f...
[ "io.StringIO", "argparse.ArgumentParser", "logging.getLogger", "argparse.FileType" ]
[((1812, 1845), 'logging.getLogger', 'logging.getLogger', (['"""convert_file"""'], {}), "('convert_file')\n", (1829, 1845), False, 'import logging\n'), ((2002, 2015), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (2013, 2015), False, 'import io\n'), ((3867, 3940), 'argparse.ArgumentParser', 'argparse.ArgumentParser',...
from django import forms class ContactForm(forms.Form): nombre = forms.CharField(max_length=100) email = forms.CharField( max_length=100) mensaje = forms.CharField(widget=forms.Textarea)
[ "django.forms.CharField" ]
[((70, 101), 'django.forms.CharField', 'forms.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (85, 101), False, 'from django import forms\n'), ((114, 145), 'django.forms.CharField', 'forms.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (129, 145), False, 'from django import forms\n'),...
from tinyalign import edit_distance, hamming_distance import random import pytest STRING_PAIRS = [ ('', ''), ('', 'A'), ('A', 'A'), ('AB', ''), ('AB', 'ABC'), ('TGAATCCC', 'CCTGAATC'), ('ANANAS', 'BANANA'), ('SISSI', 'MISSISSIPPI'), ('GGAATCCC', 'TGAGGGATAAATATTTAGAATTTAGTAGTAGTGT...
[ "random.randint", "tinyalign.hamming_distance", "random.choice", "pytest.raises", "tinyalign.edit_distance" ]
[((1960, 1996), 'tinyalign.edit_distance', 'edit_distance', (['s', 't'], {'maxdiff': 'maxdiff'}), '(s, t, maxdiff=maxdiff)\n', (1973, 1996), False, 'from tinyalign import edit_distance, hamming_distance\n'), ((2013, 2032), 'tinyalign.edit_distance', 'edit_distance', (['s', 't'], {}), '(s, t)\n', (2026, 2032), False, 'f...
import time from datetime import datetime, timedelta from ledger.util import F from plenum.common.txn import TXN_TIME from sovrin.persistence.identity_graph import IdentityGraph def testMakeResultTxnTimeString(): oRecordData = { F.seqNo.name: 1, TXN_TIME: 'some-datetime' } assert TXN_TIM...
[ "sovrin.persistence.identity_graph.IdentityGraph.makeResult", "datetime.datetime.now", "datetime.timedelta", "datetime.datetime" ]
[((418, 432), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (430, 432), False, 'from datetime import datetime\n'), ((662, 682), 'datetime.datetime', 'datetime', (['(1999)', '(1)', '(1)'], {}), '(1999, 1, 1)\n', (670, 682), False, 'from datetime import datetime\n'), ((1132, 1146), 'datetime.datetime.now', '...
# 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 writing, software # distribu...
[ "nisqai.layer._product_ansatz.ProductAnsatz" ]
[((755, 771), 'nisqai.layer._product_ansatz.ProductAnsatz', 'ProductAnsatz', (['(4)'], {}), '(4)\n', (768, 771), False, 'from nisqai.layer._product_ansatz import ProductAnsatz\n'), ((980, 1010), 'nisqai.layer._product_ansatz.ProductAnsatz', 'ProductAnsatz', (['(5)'], {'gate_depth': '(4)'}), '(5, gate_depth=4)\n', (993,...
from this import d from django.core.exceptions import ObjectDoesNotExist from rest_framework import status from rest_framework.decorators import action from rest_framework.viewsets import ModelViewSet from rest_framework.authtoken.models import Token from rest_framework.response import Response from rest_framework.perm...
[ "users.models.User.objects.get", "users.serializers.OTPSerializer", "home.utility.auth_token", "rest_framework.authtoken.models.Token.objects.get_or_create", "users.models.User.objects.create_superuser", "users.serializers.ChangePasswordSerializer", "home.utility.generateOTP", "rest_framework.response...
[((998, 1016), 'users.models.User.objects.all', 'User.objects.all', ([], {}), '()\n', (1014, 1016), False, 'from users.models import User\n'), ((2139, 2177), 'rest_framework.decorators.action', 'action', ([], {'detail': '(False)', 'methods': "['post']"}), "(detail=False, methods=['post'])\n", (2145, 2177), False, 'from...
from root.config.main import rAnk, mAster_rank, cOmm from screws.freeze.main import FrozenOnly import matplotlib.pyplot as plt from matplotlib import cm import numpy as np class _3dCSCG_1Trace_Visualize(FrozenOnly): """The visualization property/component of standard forms.""" def __init__(self, tf): ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.cm.ScalarMappable", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.figure", "numpy.max", "numpy.array", "numpy.min", "numpy.linspace", "root.config.main.cOmm.gather", "numpy.sqrt" ]
[((1384, 1411), 'numpy.linspace', 'np.linspace', (['(-1)', '(1)', 'density'], {}), '(-1, 1, density)\n', (1395, 1411), True, 'import numpy as np\n'), ((1486, 1520), 'root.config.main.cOmm.gather', 'cOmm.gather', (['xyz'], {'root': 'mAster_rank'}), '(xyz, root=mAster_rank)\n', (1497, 1520), False, 'from root.config.main...
""" Topic handler definition """ import os from distutils.util import strtobool from topics.utils import TopicHandler from .handler import handler EXAMPLE_HANDLER = TopicHandler( handle=handler, topic="/example", enabled=strtobool(os.environ.get("EXAMPLE_STREAMING", "false")), )
[ "os.environ.get" ]
[((250, 294), 'os.environ.get', 'os.environ.get', (['"""EXAMPLE_STREAMING"""', '"""false"""'], {}), "('EXAMPLE_STREAMING', 'false')\n", (264, 294), False, 'import os\n')]
import itertools class Solution: def permute(self, nums: [int]) -> [[int]]: return list(itertools.permutations(nums))
[ "itertools.permutations" ]
[((100, 128), 'itertools.permutations', 'itertools.permutations', (['nums'], {}), '(nums)\n', (122, 128), False, 'import itertools\n')]
# package org.apache.helix.util #from org.apache.helix.util import * #from java.util import Arrays #from java.util import HashMap #from java.util import Map #from java.util.regex import Matcher #from java.util.regex import Pattern #from org.apache.log4j import Logger from org.apache.helix.util.logger import get_logger...
[ "org.apache.helix.util.UserExceptions.IllegalArgumentException", "re.compile", "org.apache.helix.util.logger.get_logger" ]
[((574, 594), 'org.apache.helix.util.logger.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (584, 594), False, 'from org.apache.helix.util.logger import get_logger\n'), ((753, 774), 're.compile', 're.compile', (['"""({.+?})"""'], {}), "('({.+?})')\n", (763, 774), False, 'import re\n'), ((2577, 2609), 'or...
from django import forms class AddDocuments(forms.Form): doc = forms.FileField(required=True) description = forms.CharField(label='Description', max_length=100, widget=forms.TextInput( attrs={'placeholder': 'Enter Description'})) def...
[ "django.forms.TextInput", "django.forms.FileField" ]
[((69, 99), 'django.forms.FileField', 'forms.FileField', ([], {'required': '(True)'}), '(required=True)\n', (84, 99), False, 'from django import forms\n'), ((555, 585), 'django.forms.FileField', 'forms.FileField', ([], {'required': '(True)'}), '(required=True)\n', (570, 585), False, 'from django import forms\n'), ((212...
# GridGain Community Edition Licensing # Copyright 2019 GridGain Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") modified with Commons Clause # Restriction; you may not use this file except in compliance with the License. You may obtain a # copy of th...
[ "pyignite.Client" ]
[((2069, 2088), 'pyignite.Client', 'Client', ([], {'timeout': '(4.0)'}), '(timeout=4.0)\n', (2075, 2088), False, 'from pyignite import Client\n')]
import sympy as sy from sympy.physics import mechanics as mc import numpy as np from sympy import sympify, nsimplify from forward_kinematics import forward from sympy import Integral, Matrix, pi, pprint def Inverse_kin(T0_4, T0_3, T0_2, T0_1, X): #Calculates inverse kinematics f=T0_4[:3,3] J_half=f.jacob...
[ "sympy.symbols", "forward_kinematics.forward", "numpy.matrix", "numpy.array", "sympy.nsimplify", "numpy.linalg.pinv" ]
[((572, 616), 'sympy.nsimplify', 'nsimplify', (['J'], {'tolerance': '(0.001)', 'rational': '(True)'}), '(J, tolerance=0.001, rational=True)\n', (581, 616), False, 'from sympy import sympify, nsimplify\n'), ((760, 865), 'sympy.symbols', 'sy.symbols', (['"""R, theta, alpha, a, d, theta1, theta2, theta3, theta4, theta5, d...
import doublemetaphone def match(value1, value2): value1metaphone = doublemetaphone.doublemetaphone(value1) value2metaphone = doublemetaphone.doublemetaphone(value2) possibilities = [ value1metaphone[0] == value2metaphone[0], value1metaphone[0] == value2metaphone[1], value1metaphone...
[ "doublemetaphone.doublemetaphone" ]
[((73, 112), 'doublemetaphone.doublemetaphone', 'doublemetaphone.doublemetaphone', (['value1'], {}), '(value1)\n', (104, 112), False, 'import doublemetaphone\n'), ((135, 174), 'doublemetaphone.doublemetaphone', 'doublemetaphone.doublemetaphone', (['value2'], {}), '(value2)\n', (166, 174), False, 'import doublemetaphone...
import builtins as __builtin__ import json import os import time import torch from models import get_iou_types from utils import misc_util from utils.coco_eval_util import CocoEvaluator from utils.coco_util import get_coco_api_from_dataset def overwrite_dict(org_dict, sub_dict): for sub_key, sub_value in sub_di...
[ "utils.misc_util.MetricLogger", "torch.cuda.synchronize", "torch.distributed.init_process_group", "json.loads", "utils.coco_util.get_coco_api_from_dataset", "models.get_iou_types", "torch.distributed.barrier", "time.time", "torch.cuda.device_count", "torch.set_num_threads", "torch.optim.lr_sched...
[((2189, 2204), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (2202, 2204), False, 'import torch\n'), ((1505, 1537), 'torch.cuda.set_device', 'torch.cuda.set_device', (['device_id'], {}), '(device_id)\n', (1526, 1537), False, 'import torch\n'), ((1649, 1768), 'torch.distributed.init_process_group', 'torch.distrib...
#!/usr/bin/env python from configparser import ConfigParser from sys import argv from autofit.tools import edenise def main( root_directory ): try: config = ConfigParser() config.read( f"{root_directory}/eden.ini" ) eden_dependencies = [ ...
[ "configparser.ConfigParser" ]
[((193, 207), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (205, 207), False, 'from configparser import ConfigParser\n')]
global sdc try: sdc.importLock() import time from datetime import datetime, timedelta import sys import os sys.path.append(os.path.join(os.environ['SDC_DIST'], 'python-libs')) import requests finally: sdc.importUnlock() def get_interval(): return int(sdc.userParams['INTERVAL_IN_SE...
[ "requests.Session", "datetime.datetime.now", "time.time", "time.sleep", "datetime.datetime", "datetime.datetime.strptime", "datetime.datetime.utcnow", "os.path.join" ]
[((465, 485), 'datetime.datetime', 'datetime', (['(1970)', '(1)', '(1)'], {}), '(1970, 1, 1)\n', (473, 485), False, 'from datetime import datetime, timedelta\n'), ((1803, 1821), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1819, 1821), False, 'import requests\n'), ((148, 199), 'os.path.join', 'os.path.joi...
from __future__ import print_function, division import logging from time import time import numpy as np from ...core.exceptions import IncompatibleAttribute from ...core.util import Pointer, split_component_view from ...utils import view_shape, stack_view, color2rgb from ...clients.image_client import ImageClient f...
[ "numpy.dstack", "ginga.util.wcsmod.use", "numpy.clip", "time.time", "numpy.array", "ginga.misc.Bunch.Bunch", "numpy.linspace", "numpy.broadcast_arrays", "logging.getLogger" ]
[((508, 529), 'ginga.util.wcsmod.use', 'wcsmod.use', (['"""astropy"""'], {}), "('astropy')\n", (518, 529), False, 'from ginga.util import wcsmod\n'), ((12980, 13038), 'ginga.misc.Bunch.Bunch', 'Bunch.Bunch', ([], {'data': 'result', 'scale_x': 'scale_x', 'scale_y': 'scale_y'}), '(data=result, scale_x=scale_x, scale_y=sc...
import codecs import json import os import sys sys.path.append("../") sys.path.append("../transformers/src") import copy import gc import torch import pickle from tqdm import tqdm from utils import set_seed, get_task_data, random_split_train_and_dev from dataset import PairSentenceClassificationDataset from transformer...
[ "sys.path.append", "tqdm.tqdm", "copy.deepcopy", "codecs.open", "json.loads", "utils.set_seed", "torch.load", "tokenizer.TransfomerTokenizer", "os.path.exists", "json.dumps", "model.TMPredictor", "transformers.AutoTokenizer.from_pretrained", "utils.get_task_data", "model.Bert", "utils.ra...
[((47, 69), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (62, 69), False, 'import sys\n'), ((70, 108), 'sys.path.append', 'sys.path.append', (['"""../transformers/src"""'], {}), "('../transformers/src')\n", (85, 108), False, 'import sys\n'), ((2179, 2193), 'utils.set_seed', 'set_seed', (['(20...
from pyspark.ml.feature import HashingTF, IDF, Tokenizer, StopWordsRemover, CountVectorizer, RegexTokenizer, Word2Vec from pyspark.sql import SparkSession from pyspark.ml.clustering import LDA spark = SparkSession.builder.appName("tokenizer").getOrCreate() # Loads data. raw = spark.read.load("data/libguides_txt.parqu...
[ "pyspark.ml.clustering.LDA", "pyspark.ml.feature.StopWordsRemover", "pyspark.ml.feature.CountVectorizer", "pyspark.ml.feature.Tokenizer", "pyspark.sql.SparkSession.builder.appName" ]
[((479, 531), 'pyspark.ml.feature.Tokenizer', 'Tokenizer', ([], {'inputCol': '"""words"""', 'outputCol': '"""word_tokens"""'}), "(inputCol='words', outputCol='word_tokens')\n", (488, 531), False, 'from pyspark.ml.feature import HashingTF, IDF, Tokenizer, StopWordsRemover, CountVectorizer, RegexTokenizer, Word2Vec\n'), ...
from unittest import TestCase, main as run_tests from src.pyetllib.etllib import filtertruefalse class TestFilter(TestCase): def test_filter_1(self): data = list(range(5)) _, evens = filtertruefalse( lambda x: bool(x % 2), data ) self.assertListEqual(lis...
[ "unittest.main", "src.pyetllib.etllib.filtertruefalse" ]
[((664, 686), 'unittest.main', 'run_tests', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (673, 686), True, 'from unittest import TestCase, main as run_tests\n'), ((439, 483), 'src.pyetllib.etllib.filtertruefalse', 'filtertruefalse', (['(lambda x: 0 <= x <= 9)', 'data'], {}), '(lambda x: 0 <= x <= 9, data)\n', (454, 4...
""" Copyright (c) 2021 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 writin...
[ "nncf.tensorflow.quantization.quantizers.QuantizerConfig", "tensorflow.ones", "numpy.abs", "nncf.tensorflow.quantization.quantizers.TFQuantizerSpec.from_config", "tensorflow.keras.layers.Dense", "nncf.tensorflow.quantization.utils.apply_overflow_fix_to_layer", "nncf.tensorflow.layers.custom_objects.NNCF...
[((1862, 2021), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""bits,low,range_,narrow_range,ref"""', '[(7, -1, 2, False, -128 / 127), (7, -2, 2, True, -2)]'], {'ids': "['full_range', 'narrow_range']"}), "('bits,low,range_,narrow_range,ref', [(7, -1, 2, \n False, -128 / 127), (7, -2, 2, True, -2)], ids=[...
#!/usr/bin/python3 import sys import json import os.path if len(sys.argv) != 2: print("Usage: python3 export_users.py <db-path>") sys.exit(1) db_path = sys.argv[1] with open(os.path.join(db_path, 'users.json')) as f: users = json.loads(f.read()) for user in users: print(f"{user['username']},{user...
[ "sys.exit" ]
[((140, 151), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (148, 151), False, 'import sys\n')]
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import functools from pyro.params.param_store import ( # noqa: F401 _MODULE_NAMESPACE_DIVIDER, ParamStoreDict, ) # the global pyro stack _PYRO_STACK = [] # the global ParamStore _PYRO_PARAM_STORE = ParamStoreDict() cl...
[ "functools.partial", "pyro.params.param_store.ParamStoreDict", "functools.wraps" ]
[((299, 315), 'pyro.params.param_store.ParamStoreDict', 'ParamStoreDict', ([], {}), '()\n', (313, 315), False, 'from pyro.params.param_store import _MODULE_NAMESPACE_DIVIDER, ParamStoreDict\n'), ((7604, 7623), 'functools.wraps', 'functools.wraps', (['fn'], {}), '(fn)\n', (7619, 7623), False, 'import functools\n'), ((73...
import datetime from django.db import models from django.contrib.auth.models import User from applications.globals.models import ExtraInfo, Staff, Faculty from applications.academic_information.models import Student from django.utils import timezone class HostelManagementConstants: ROOM_STATUS = ( ('Booke...
[ "django.db.models.FileField", "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.TimeField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.BooleanField", "django.db.models.IntegerField", "dja...
[((1034, 1065), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(10)'}), '(max_length=10)\n', (1050, 1065), False, 'from django.db import models\n'), ((1082, 1113), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)'}), '(max_length=50)\n', (1098, 1113), False, 'from djan...
from pprint import pprint import numpy as np from collections import Counter import itertools, copy from more_itertools import split_before import os, json, traceback, time, warnings, shutil, sys import multiprocessing from miditoolkit.midi.parser import MidiFile from miditoolkit.midi.containers import Instrument from ...
[ "os.walk", "pprint.pprint", "fractions.Fraction", "more_itertools.split_before", "os.path.abspath", "traceback.print_exc", "encoding.bom2str", "os.path.exists", "encoding.pos2str", "collections.Counter", "encoding.ins2str", "copy.deepcopy", "miditoolkit.midi.parser.MidiFile", "chorder.Dech...
[((764, 773), 'collections.Counter', 'Counter', ([], {}), '()\n', (771, 773), False, 'from collections import Counter\n'), ((1479, 1533), 'chorder.Dechorder.get_chord_quality', 'Dechorder.get_chord_quality', (['mtknotes'], {'start': '(0)', 'end': 'ts'}), '(mtknotes, start=0, end=ts)\n', (1506, 1533), False, 'from chord...
import torch import cv2 import os import numpy as np from torch.utils.data import DataLoader, SubsetRandomSampler def one_hot_encode(index, num): vector = [0 for _ in range(num)] vector[index] = 1 return torch.Tensor(vector) def extract_frames(video_path, save_path, fps=5): video_name = video_path.spl...
[ "os.mkdir", "os.path.isdir", "cv2.VideoCapture", "torch.Tensor", "os.path.join" ]
[((217, 237), 'torch.Tensor', 'torch.Tensor', (['vector'], {}), '(vector)\n', (229, 237), False, 'import torch\n'), ((367, 402), 'os.path.join', 'os.path.join', (['save_path', 'video_name'], {}), '(save_path, video_name)\n', (379, 402), False, 'import os\n'), ((565, 593), 'cv2.VideoCapture', 'cv2.VideoCapture', (['vide...
# This is used by Environment to populate its env # Due to circular dependencies it cannot reference other parts of bldr import toml import os import platform import shutil from pathlib import Path def default(dotbldr_path: str) -> dict: """ Load the config by merging the local config on top of inclu...
[ "shutil.which", "pathlib.Path", "toml.load", "platform.system", "os.getenv" ]
[((550, 571), 'os.getenv', 'os.getenv', (['"""BLDR_ENV"""'], {}), "('BLDR_ENV')\n", (559, 571), False, 'import os\n'), ((665, 685), 'shutil.which', 'shutil.which', (['"""bldr"""'], {}), "('bldr')\n", (677, 685), False, 'import shutil\n'), ((1671, 1685), 'pathlib.Path', 'Path', (['path_str'], {}), '(path_str)\n', (1675,...
from django.core.management.base import BaseCommand from playstore_review_crawler.crawler.crawler import Crawler from config.settings.base import ( APP_ID, AMOUNT_REVIEWS_TO_SAVE, REVIEWS_LANGUAGE, REVIEWS_COUNTRY, ) class Command(BaseCommand): help = "Stores app reviews in the database." de...
[ "playstore_review_crawler.crawler.crawler.Crawler" ]
[((372, 394), 'playstore_review_crawler.crawler.crawler.Crawler', 'Crawler', ([], {'app_id': 'APP_ID'}), '(app_id=APP_ID)\n', (379, 394), False, 'from playstore_review_crawler.crawler.crawler import Crawler\n')]
#!/usr/bin/env python """A script to scrape items from an Amazon wishlist. The script only works for wishlists which are "Public". You can change the settings by following the instruction in: http://www.amazon.com/gp/help/customer/display.html?nodeId=501094 Copyright 2014 <NAME> Licensed under the Apache Lice...
[ "sorno.loggingutil.setup_logger", "lxml.html.tostring", "argparse.ArgumentParser", "sorno.consoleutil.DataPrinter", "lxml.html.fromstring", "urlparse.urlparse", "collections.namedtuple", "requests.get", "sorno.loggingutil.create_plain_logger", "logging.getLogger" ]
[((1212, 1239), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1229, 1239), False, 'import logging\n'), ((1354, 1388), 'collections.namedtuple', 'namedtuple', (['"""Item"""', '"""id title url"""'], {}), "('Item', 'id title url')\n", (1364, 1388), False, 'from collections import namedtupl...
import cupy as cp from SpaceSim.BackEndSources.DataStructures import MathList, TypeCounter from SpaceSim.BackEndSources.Utils import TableToText class _Component: def __init__(self, *Modules): self.Name = 'NONE' self.Types = [] self.Stats = {} self.Define('Armor', 0) self.De...
[ "SpaceSim.BackEndSources.DataStructures.MathList", "SpaceSim.BackEndSources.DataStructures.TypeCounter", "SpaceSim.BackEndSources.Utils.TableToText" ]
[((374, 388), 'SpaceSim.BackEndSources.DataStructures.MathList', 'MathList', (['(0)', '(0)'], {}), '(0, 0)\n', (382, 388), False, 'from SpaceSim.BackEndSources.DataStructures import MathList, TypeCounter\n'), ((732, 745), 'SpaceSim.BackEndSources.DataStructures.TypeCounter', 'TypeCounter', ([], {}), '()\n', (743, 745),...
# -*- coding: utf-8 -*- from pywechat.services.wechat_shake import ShakeService from pywechat.services.wechat_card import CardService from pywechat.excepts import CodeBuildError class WechatService(object): """This class is a role of factory. Attributes: app_id: the app id of a wechat account. ...
[ "pywechat.excepts.CodeBuildError" ]
[((970, 1006), 'pywechat.excepts.CodeBuildError', 'CodeBuildError', (['"""Service name wrong"""'], {}), "('Service name wrong')\n", (984, 1006), False, 'from pywechat.excepts import CodeBuildError\n')]
import copy import logging from disco.extensions.pydss_simulation.pydss_configuration import \ PyDssConfiguration from disco.extensions.pydss_simulation.pydss_inputs import PyDssInputs from disco.pydss.common import ConfigType from jade.utils.utils import load_data logger = logging.getLogger(__name__) def aut...
[ "disco.extensions.pydss_simulation.pydss_configuration.PyDssConfiguration", "disco.extensions.pydss_simulation.pydss_inputs.PyDssInputs", "logging.getLogger" ]
[((283, 310), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (300, 310), False, 'import logging\n'), ((490, 526), 'disco.extensions.pydss_simulation.pydss_configuration.PyDssConfiguration', 'PyDssConfiguration', (['inputs'], {}), '(inputs, **kwargs)\n', (508, 526), False, 'from disco.exte...
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import os import sys import platform kratos_benchmarking_path = '../../../benchmarking' sys.path.append(kratos_benchmarking_path) swimming_dem_scripts_path = 'hydrodynamic_forces' sys....
[ "sys.path.append", "os.remove", "os.system", "platform.system", "os.chdir" ]
[((224, 265), 'sys.path.append', 'sys.path.append', (['kratos_benchmarking_path'], {}), '(kratos_benchmarking_path)\n', (239, 265), False, 'import sys\n'), ((316, 358), 'sys.path.append', 'sys.path.append', (['swimming_dem_scripts_path'], {}), '(swimming_dem_scripts_path)\n', (331, 358), False, 'import sys\n'), ((379, ...
""" User classes & helpers ~~~~~~~~~~~~~~~~~~~~~~ """ import os import json import binascii import hashlib import sqlite3 from functools import wraps from flask import current_app from flask_login import current_user from config import USER_DIR class UserManager(object): """A very simple user Manager, ...
[ "flask.current_app.login_manager.unauthorized", "flask.current_app.config.get", "binascii.hexlify", "os.path.exists", "json.dumps", "binascii.unhexlify", "sqlite3.connect", "functools.wraps", "hashlib.sha512", "os.path.join", "os.urandom" ]
[((4557, 4625), 'flask.current_app.config.get', 'current_app.config.get', (['"""DEFAULT_AUTHENTICATION_METHOD"""', '"""cleartext"""'], {}), "('DEFAULT_AUTHENTICATION_METHOD', 'cleartext')\n", (4579, 4625), False, 'from flask import current_app\n'), ((4726, 4742), 'hashlib.sha512', 'hashlib.sha512', ([], {}), '()\n', (4...
from __future__ import division import sys from mmtbx.validation.molprobity import mp_geo if __name__ == "__main__": mp_geo.run(sys.argv[1:])
[ "mmtbx.validation.molprobity.mp_geo.run" ]
[((121, 145), 'mmtbx.validation.molprobity.mp_geo.run', 'mp_geo.run', (['sys.argv[1:]'], {}), '(sys.argv[1:])\n', (131, 145), False, 'from mmtbx.validation.molprobity import mp_geo\n')]
# -*- coding: UTF-8 -*- # Copyright 2009-2016 <NAME> # License: BSD (see file COPYING for details) """Adds the default Lino user interface based on ExtJS. It is being automatically included by every Lino application unless you disable it (e.g. by overriding your :meth:`get_apps_modifiers <lino.core.site.Site.get_apps...
[ "django.utils.translation.ugettext_lazy", "lino.core.elems.form_field_name" ]
[((2201, 2211), 'django.utils.translation.ugettext_lazy', '_', (['"""Admin"""'], {}), "('Admin')\n", (2202, 2211), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((5698, 5716), 'lino.core.elems.form_field_name', 'form_field_name', (['f'], {}), '(f)\n', (5713, 5716), False, 'from lino.core.elems imp...
import pandas as pd import os.path import csv clair = '/Users/malcolmorian/Documents/Bioinformatics/Projects2021/Guppy3Guppy5/NOSC/nosc_clair/2022.01.02/clair_vcfData' pepper = '/Users/malcolmorian/Documents/Bioinformatics/Projects2021/Guppy3Guppy5/NOSC/nosc_pepper/2022.01.02/pepper_vcfData' gatk = '/Users/malcolmoria...
[ "pandas.read_excel" ]
[((1013, 1051), 'pandas.read_excel', 'pd.read_excel', (['path'], {'engine': '"""openpyxl"""'}), "(path, engine='openpyxl')\n", (1026, 1051), True, 'import pandas as pd\n')]
""" Script containing various utilities related to data processing and cleaning. Includes tokenization, text cleaning, feature extractor (token type IDs & attention masks) for BERT, and IMDBDataset. """ import logging import torch from torch.utils.data import Dataset import os import pickle import re import numpy as ...
[ "pickle.dump", "nltk.stem.WordNetLemmatizer", "logging.warning", "pickle.load", "numpy.array", "nltk.corpus.stopwords.words", "re.sub", "os.path.join", "os.listdir", "torch.tensor" ]
[((549, 568), 'nltk.stem.WordNetLemmatizer', 'WordNetLemmatizer', ([], {}), '()\n', (566, 568), False, 'from nltk.stem import WordNetLemmatizer\n'), ((508, 534), 'nltk.corpus.stopwords.words', 'stopwords.words', (['"""english"""'], {}), "('english')\n", (523, 534), False, 'from nltk.corpus import stopwords\n'), ((702, ...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class DCA(nn.Module): def __init__(self, no_channels=1): super(DCA, self).__init__() self.encoder = nn.Sequential( nn.Conv2d(no_channels, 16, 7, stride=3, padding=1), nn.R...
[ "torch.nn.ReLU", "torch.nn.ConvTranspose2d", "torch.nn.Tanh", "torch.nn.BatchNorm1d", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.Flatten" ]
[((252, 302), 'torch.nn.Conv2d', 'nn.Conv2d', (['no_channels', '(16)', '(7)'], {'stride': '(3)', 'padding': '(1)'}), '(no_channels, 16, 7, stride=3, padding=1)\n', (261, 302), True, 'import torch.nn as nn\n'), ((316, 325), 'torch.nn.ReLU', 'nn.ReLU', ([], {}), '()\n', (323, 325), True, 'import torch.nn as nn\n'), ((339...
import json import logging import os import random import spacy from spacy.training import Example from tqdm.auto import tqdm from label_studio_ml.model import LabelStudioMLBase logging.basicConfig(level=logging.INFO) class SimpleNER(LabelStudioMLBase): def __init__(self, **kwargs): # don't forget to ...
[ "logging.basicConfig", "random.shuffle", "spacy.training.Example.from_dict", "spacy.load", "spacy.blank", "os.path.join" ]
[((181, 220), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (200, 220), False, 'import logging\n'), ((2231, 2248), 'spacy.blank', 'spacy.blank', (['"""en"""'], {}), "('en')\n", (2242, 2248), False, 'import spacy\n'), ((4661, 4691), 'os.path.join', 'os.path.join...
import pytest from pyball import PyBall from pyball.models.config import Platform @pytest.fixture(scope='module') def test_platform(): pyball = PyBall() return pyball.get_platforms() def test_get_platform_returns_platform(test_platform): assert isinstance(test_platform, list) assert isinstance(test_...
[ "pytest.fixture", "pyball.PyBall" ]
[((85, 115), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (99, 115), False, 'import pytest\n'), ((150, 158), 'pyball.PyBall', 'PyBall', ([], {}), '()\n', (156, 158), False, 'from pyball import PyBall\n')]
from flask import g, session from SoftLayer import TokenAuthentication, Client def get_client(): if not hasattr(g, 'client'): if session.get('sl_user_id'): auth = TokenAuthentication(session['sl_user_id'], session['sl_user_hash']) if auth: ...
[ "flask.session.get", "SoftLayer.Client", "SoftLayer.TokenAuthentication" ]
[((144, 169), 'flask.session.get', 'session.get', (['"""sl_user_id"""'], {}), "('sl_user_id')\n", (155, 169), False, 'from flask import g, session\n'), ((190, 257), 'SoftLayer.TokenAuthentication', 'TokenAuthentication', (["session['sl_user_id']", "session['sl_user_hash']"], {}), "(session['sl_user_id'], session['sl_us...
import unittest import requests import bom_water.bom_water as bm import os from pathlib import Path import shapely from bom_water.spatial_util import spatail_utilty class test_core(unittest.TestCase): # def __init__(self): # super(test_core, self).__init__(self) # self.setUp() @classmethod ...
[ "unittest.main", "os.remove", "pathlib.Path.home", "os.path.basename", "os.path.exists", "bom_water.bom_water.BomWater" ]
[((3746, 3761), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3759, 3761), False, 'import unittest\n'), ((452, 479), 'os.path.exists', 'os.path.exists', (['remove_file'], {}), '(remove_file)\n', (466, 479), False, 'import os\n'), ((734, 747), 'bom_water.bom_water.BomWater', 'bm.BomWater', ([], {}), '()\n', (745,...
from __future__ import unicode_literals from mock import Mock from world.weather.models import WeatherType, WeatherEmit from server.utils.test_utils import ArxCommandTest from world.weather import weather_commands, weather_script, utils from evennia.server.models import ServerConfig class TestWeatherCommands(ArxComma...
[ "world.weather.utils.advance_weather", "evennia.server.models.ServerConfig.objects.conf", "world.weather.models.WeatherType.objects.create", "world.weather.models.WeatherEmit.objects.create" ]
[((423, 487), 'world.weather.models.WeatherType.objects.create', 'WeatherType.objects.create', ([], {'name': '"""Test"""', 'gm_notes': '"""Test weather"""'}), "(name='Test', gm_notes='Test weather')\n", (449, 487), False, 'from world.weather.models import WeatherType, WeatherEmit\n'), ((509, 594), 'world.weather.models...
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ "textwrap.dedent" ]
[((697, 832), 'textwrap.dedent', 'textwrap.dedent', (['"""\n {% tab proto %}\n Something something\n More more more\n {% endtabs %}\n """'], {}), '(\n """\n {% tab proto %}\n Something something\n More more more\n {% endtabs %}\n """\n )\n', (712, 832)...
from typing import Union, Tuple, Callable import pygame from schafkopf.game_modes import * from schafkopf.pygame_gui.Button import Button from schafkopf.pygame_gui.colors import WHITE, BLACK, RED class GameModeWidget(Button): def __init__( self, topleft: Tuple[int, int] = (0, 0), bidding...
[ "pygame.Color", "pygame.Surface", "pygame.font.Font" ]
[((514, 547), 'pygame.font.Font', 'pygame.font.Font', (['None', 'font_size'], {}), '(None, font_size)\n', (530, 547), False, 'import pygame\n'), ((721, 752), 'pygame.Surface', 'pygame.Surface', (['(width, height)'], {}), '((width, height))\n', (735, 752), False, 'import pygame\n'), ((905, 936), 'pygame.Surface', 'pygam...
# Modules import pygame import numpy as np import random from pygame.constants import KEYDOWN import settings as s # Initialize pygame pygame.init() # screen screen = pygame.display.set_mode((s.WIDTH,s.HEIGHT)) # Title and Icon pygame.display.set_caption('TIC TAC TOE') icon = pygame.image.load('icon.png') pygame.disp...
[ "pygame.draw.line", "pygame.display.set_icon", "pygame.font.SysFont", "pygame.event.get", "pygame.display.set_mode", "numpy.zeros", "random.choice", "pygame.init", "pygame.display.update", "pygame.image.load", "pygame.display.set_caption" ]
[((136, 149), 'pygame.init', 'pygame.init', ([], {}), '()\n', (147, 149), False, 'import pygame\n'), ((169, 213), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(s.WIDTH, s.HEIGHT)'], {}), '((s.WIDTH, s.HEIGHT))\n', (192, 213), False, 'import pygame\n'), ((230, 271), 'pygame.display.set_caption', 'pygame.disp...
""" Aggregation of all application routes into a single router. All created routers are imported here and added to a single router for access from the app.api.server file. router: - Initial instantiation of a router - All routers are aggregated to this router - All routers are given a name (to appear in th...
[ "fastapi.APIRouter" ]
[((681, 692), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (690, 692), False, 'from fastapi import APIRouter\n')]
from django.db import models # Create your models here. class New(models.Model): heading_one = models.CharField(max_length=500) h1_paragraph1 = models.TextField() h1_paragraph2 = models.TextField(blank=True) h1_paragraph3 = models.TextField(blank=True) image_one = models.ImageField(upload_to='news...
[ "django.db.models.FileField", "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ImageField", "django.db.models.DateTimeField" ]
[((101, 133), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(500)'}), '(max_length=500)\n', (117, 133), False, 'from django.db import models\n'), ((154, 172), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (170, 172), False, 'from django.db import models\n'), ((193, 221), '...
import discord from discord.ext import tasks, commands from urllib.parse import quote as uriquote import html from utils.time import human_timedelta from datetime import datetime import base64 class Twitter(commands.Cog): """All twittery functions like subscribe and lasttweet""" def __init__(self, bot): ...
[ "discord.ext.commands.command", "discord.Embed", "utils.time.human_timedelta", "datetime.datetime.strptime", "discord.ext.tasks.loop", "datetime.datetime.utcnow", "discord.ext.commands.is_owner" ]
[((801, 830), 'discord.ext.commands.command', 'commands.command', ([], {'hidden': '(True)'}), '(hidden=True)\n', (817, 830), False, 'from discord.ext import tasks, commands\n'), ((836, 855), 'discord.ext.commands.is_owner', 'commands.is_owner', ([], {}), '()\n', (853, 855), False, 'from discord.ext import tasks, comman...
"""adapted from: https://gist.github.com/shivakar/82ac5c9cb17c95500db1906600e5e1ea""" import argparse import os import sys from http.server import SimpleHTTPRequestHandler, HTTPServer from os.path import realpath, join, dirname, isdir, exists parser = argparse.ArgumentParser(description='Start simple HTTP server suppo...
[ "argparse.ArgumentParser", "os.path.isdir", "os.path.realpath", "os.path.exists", "http.server.SimpleHTTPRequestHandler.copyfile", "http.server.SimpleHTTPRequestHandler.send_head", "sys.stderr.write", "sys.stderr.flush" ]
[((253, 399), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Start simple HTTP server supporting HTTP/1.1 requests (needed to playthe aligned audio in HTML5)!"""'}), "(description=\n 'Start simple HTTP server supporting HTTP/1.1 requests (needed to playthe aligned audio in HTML5)!'\n ...
""" show simplest database operation """ import sqlite3 sql_statements = ( "drop table if exists test", "create table test (id, name)", "insert into test values (1, 'abc')", "insert into test values (2, 'def')", "insert into test values (3, 'xyz')", "select id, name from test", ) def main():...
[ "sqlite3.connect" ]
[((356, 382), 'sqlite3.connect', 'sqlite3.connect', (['"""dbms.db"""'], {}), "('dbms.db')\n", (371, 382), False, 'import sqlite3\n')]
#encoding: utf-8 from flask import Blueprint admin = Blueprint('admin', '__name__') # import views
[ "flask.Blueprint" ]
[((53, 83), 'flask.Blueprint', 'Blueprint', (['"""admin"""', '"""__name__"""'], {}), "('admin', '__name__')\n", (62, 83), False, 'from flask import Blueprint\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Create Github Actions Job Matrix for building dockerfiles. Expects one optional input as the first positional argument. This is the upstream branch name, which the current working tree will be compared against in order to understand if a benchmark should be labeled as...
[ "argparse.ArgumentParser", "shlex.split", "json.dumps", "pathlib.Path", "re.search", "re.compile" ]
[((11061, 11105), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (11084, 11105), False, 'import argparse\n'), ((3265, 3315), 'shlex.split', 'shlex.split', (['f"""git fetch origin {upstream_branch}"""'], {}), "(f'git fetch origin {upstream_branch}')\n",...
__author__ = "<NAME>" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import io from contextlib import redirect_stdout # RiBuild Modules from delphin_6_automation.database_interactions.db_templates import...
[ "io.StringIO", "delphin_6_automation.database_interactions.db_templates.user_entry.User.objects", "delphin_6_automation.database_interactions.user_interactions.find_account_by_email", "delphin_6_automation.database_interactions.user_interactions.list_user_simulations", "delphin_6_automation.database_interac...
[((661, 717), 'delphin_6_automation.database_interactions.user_interactions.create_account', 'user_interactions.create_account', (['"""User Test"""', '"""<EMAIL>"""'], {}), "('User Test', '<EMAIL>')\n", (693, 717), False, 'from delphin_6_automation.database_interactions import user_interactions\n'), ((907, 956), 'delph...
""" A class for converting ``discretize`` meshes to OMF objects """ import omf import numpy as np import discretize def ravel_data_array(arr, nx, ny, nz): """Ravel's a numpy array into proper order for passing to the OMF specification from ``discretize``/UBC formats """ dim = (nz, ny, nx) return ...
[ "discretize.TensorMesh", "omf.VolumeElement", "omf.VolumeGridGeometry", "numpy.array", "numpy.reshape" ]
[((1217, 1241), 'omf.VolumeGridGeometry', 'omf.VolumeGridGeometry', ([], {}), '()\n', (1239, 1241), False, 'import omf\n'), ((2589, 2625), 'omf.VolumeElement', 'omf.VolumeElement', ([], {'geometry': 'geometry'}), '(geometry=geometry)\n', (2606, 2625), False, 'import omf\n'), ((4741, 4765), 'discretize.TensorMesh', 'dis...
import sys import numpy as np def tvDenoising1D(data, lamb): """ This function implements a 1-D Total Variation denoising according to <NAME>. (2013) "A direct algorithm for 1-D total variation denoising." See also: `<NAME>. (2013). A direct algorithm for 1-D total variation denoising. IEEE Signal Process...
[ "pylab.hold", "lmfit.models.LinearModel", "pylab.show", "numpy.multiply", "numpy.argmax", "numpy.argmin", "numpy.max", "numpy.min", "numpy.array", "numpy.loadtxt", "lmfit.models.GaussianModel", "pylab.plot" ]
[((4077, 4092), 'lmfit.models.GaussianModel', 'GaussianModel', ([], {}), '()\n', (4090, 4092), False, 'from lmfit.models import GaussianModel, LinearModel\n'), ((4106, 4119), 'lmfit.models.LinearModel', 'LinearModel', ([], {}), '()\n', (4117, 4119), False, 'from lmfit.models import GaussianModel, LinearModel\n'), ((453...
#!C:\Users\user\myprojects\angello\angello-venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'gprof2dot==2016.10.13','console_scripts','gprof2dot' __requires__ = 'gprof2dot==2016.10.13' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.py...
[ "pkg_resources.load_entry_point", "re.sub" ]
[((299, 351), 're.sub', 're.sub', (['"""(-script\\\\.pyw?|\\\\.exe)?$"""', '""""""', 'sys.argv[0]'], {}), "('(-script\\\\.pyw?|\\\\.exe)?$', '', sys.argv[0])\n", (305, 351), False, 'import re\n'), ((373, 446), 'pkg_resources.load_entry_point', 'load_entry_point', (['"""gprof2dot==2016.10.13"""', '"""console_scripts"""'...
"""Functions and utilities used to format the databases.""" import numpy as np import jax.numpy as jnp from scipy.integrate import quadrature import tools21cm as t2c def apply_uv_coverage(Box_uv, uv_bool): """Apply UV coverage to the data. Args: Box_uv: data box in Fourier space uv_bool: mask...
[ "jax.numpy.array", "jax.numpy.amax", "jax.numpy.logical_or", "jax.numpy.fft.fft", "tools21cm.noise_model.noise_map", "numpy.empty", "tools21cm.telescope_functions.jansky_2_kelvin", "jax.numpy.fft.fftfreq", "tools21cm.noise_model.get_uv_map", "numpy.append", "tools21cm.cosmology.z_to_nu", "jax....
[((1580, 1635), 'numpy.append', 'np.append', (['redshifts', '(2 * redshifts[-1] - redshifts[-2])'], {}), '(redshifts, 2 * redshifts[-1] - redshifts[-2])\n', (1589, 1635), True, 'import numpy as np\n'), ((1698, 1736), 'numpy.empty', 'np.empty', (['uv.shape'], {'dtype': 'np.complex64'}), '(uv.shape, dtype=np.complex64)\n...
from app.repositories.base_repo import BaseRepo from app.models.student_event import StudentEvent class StudentEventRepo(BaseRepo): def __init__(self): BaseRepo.__init__(self, StudentEvent) def new_student_event(self, event_id, student_id): student_event = StudentEvent(event_id=event_id, student_id=student_id...
[ "app.repositories.base_repo.BaseRepo.__init__", "app.models.student_event.StudentEvent" ]
[((158, 195), 'app.repositories.base_repo.BaseRepo.__init__', 'BaseRepo.__init__', (['self', 'StudentEvent'], {}), '(self, StudentEvent)\n', (175, 195), False, 'from app.repositories.base_repo import BaseRepo\n'), ((267, 321), 'app.models.student_event.StudentEvent', 'StudentEvent', ([], {'event_id': 'event_id', 'stude...
import json from datetime import date from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db import transaction from opentech.apply.categories.models import Category from opentech.apply.funds.models import ApplicationForm, FundType, Round from opentech.apply...
[ "opentech.apply.funds.models.Round.objects.filter", "opentech.apply.funds.models.FundType.objects.get", "opentech.apply.home.models.ApplyHomePage.objects.first", "opentech.apply.categories.models.Category.objects.get", "django.contrib.auth.get_user_model", "datetime.date", "json.dumps", "opentech.appl...
[((16090, 16106), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (16104, 16106), False, 'from django.contrib.auth import get_user_model\n'), ((1707, 1741), 'opentech.apply.categories.models.Category.objects.get', 'Category.objects.get', ([], {'name': '"""Focus"""'}), "(name='Focus')\n", (1727...
import os def clean_up_files(path): os.remove(path)
[ "os.remove" ]
[((42, 57), 'os.remove', 'os.remove', (['path'], {}), '(path)\n', (51, 57), False, 'import os\n')]
from persimmon.view.pins.circularbutton import CircularButton # MYPY HACK from persimmon.view.util import Type, AbstractWidget, Connection from kivy.properties import ObjectProperty from kivy.lang import Builder from kivy.graphics import Color, Ellipse, Line from kivy.input import MotionEvent from abc import abstractm...
[ "kivy.lang.Builder.load_file", "kivy.properties.ObjectProperty" ]
[((327, 374), 'kivy.lang.Builder.load_file', 'Builder.load_file', (['"""persimmon/view/pins/pin.kv"""'], {}), "('persimmon/view/pins/pin.kv')\n", (344, 374), False, 'from kivy.lang import Builder\n'), ((439, 480), 'kivy.properties.ObjectProperty', 'ObjectProperty', (['None'], {'force_dispatch': '(True)'}), '(None, forc...
from django.contrib import admin from.models import Profile # Register your models here. admin.site.register(Profile)
[ "django.contrib.admin.site.register" ]
[((91, 119), 'django.contrib.admin.site.register', 'admin.site.register', (['Profile'], {}), '(Profile)\n', (110, 119), False, 'from django.contrib import admin\n')]
import traceback from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from marketplace import logger class DebugModeLoggingMiddleware(object): """ Use this middleware to force logging of errors even when Debug = True. You'll find this useful in the case that you have QA in DEBUG ...
[ "traceback.format_exc", "marketplace.logger.get_log" ]
[((948, 972), 'marketplace.logger.get_log', 'logger.get_log', (['__name__'], {}), '(__name__)\n', (962, 972), False, 'from marketplace import logger\n'), ((1562, 1593), 'traceback.format_exc', 'traceback.format_exc', (['exception'], {}), '(exception)\n', (1582, 1593), False, 'import traceback\n')]
# %% [markdown] # # THE MIND OF A MAGGOT # %% [markdown] # ## Imports import os import time import warnings from itertools import chain import colorcet as cc import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.transforms as transforms import numpy as np import pandas as pd import seaborn as sns...
[ "numpy.random.seed", "scipy.linalg.orthogonal_procrustes", "src.io.savefig", "pandas.read_csv", "src.traverse.to_transmission_matrix", "src.cluster.get_paired_inds", "src.traverse.RandomWalk", "numpy.mean", "graspy.cluster.AutoGMMCluster", "sklearn.manifold.MDS", "numpy.unique", "src.graph.pre...
[((1450, 1519), 'warnings.filterwarnings', 'warnings.filterwarnings', ([], {'action': '"""ignore"""', 'category': 'ConvergenceWarning'}), "(action='ignore', category=ConvergenceWarning)\n", (1473, 1519), False, 'import warnings\n'), ((1813, 1875), 'seaborn.plotting_context', 'sns.plotting_context', ([], {'context': '""...
def Prox(tests, num_test_bytes, write_tests_to_nvm, reset): try: import board from pimoroni_circuitpython_adapter import not_SMBus from pimoroni_ltr559 import LTR559 i2c = board.I2C() i2c_dev = not_SMBus(I2C=i2c) ltr559 = LTR559(i2c_dev=i2c_dev) if 0 <= ltr559...
[ "board.I2C", "pimoroni_circuitpython_adapter.not_SMBus", "pimoroni_ltr559.LTR559" ]
[((208, 219), 'board.I2C', 'board.I2C', ([], {}), '()\n', (217, 219), False, 'import board\n'), ((238, 256), 'pimoroni_circuitpython_adapter.not_SMBus', 'not_SMBus', ([], {'I2C': 'i2c'}), '(I2C=i2c)\n', (247, 256), False, 'from pimoroni_circuitpython_adapter import not_SMBus\n'), ((274, 297), 'pimoroni_ltr559.LTR559', ...
from ray.rllib.agents.bco.inverse_dynamics_model import InverseDynamicsModel from osim.env import ProstheticsEnv env = ProstheticsEnv(visualize=True) # env.change_model(model='3D', prosthetic=False) print(env.action_space) # Returns `Box(19,)` print(env.action_space.low) # Returns list of 19 zeroes pri...
[ "ray.rllib.agents.bco.inverse_dynamics_model.InverseDynamicsModel", "osim.env.ProstheticsEnv" ]
[((121, 151), 'osim.env.ProstheticsEnv', 'ProstheticsEnv', ([], {'visualize': '(True)'}), '(visualize=True)\n', (135, 151), False, 'from osim.env import ProstheticsEnv\n'), ((390, 437), 'ray.rllib.agents.bco.inverse_dynamics_model.InverseDynamicsModel', 'InverseDynamicsModel', (['env_creator', 'config', '(True)'], {}),...
#!/usr/bin/env python # this script classifies TE position as genic or intergenic # it also outputs the sequeunce name if a TE was found in a gene and whether or not that TE was in the the "border" region of a gene(within 10bp from the end) # or if it is in an "internal" region # USE: separate_gene_assignments.py impo...
[ "re.split", "re.search" ]
[((641, 663), 're.split', 're.split', (['"""[\t]"""', 'line'], {}), "('[\\t]', line)\n", (649, 663), False, 'import re\n'), ((767, 823), 're.search', 're.search', (['"""sequence_name=([A-za-z\\\\d\\\\.]+);"""', 'gene_info'], {}), "('sequence_name=([A-za-z\\\\d\\\\.]+);', gene_info)\n", (776, 823), False, 'import re\n')...
import re f = open("adam-results-128-gpus-all-algos", "r") ourAdam = f.read() f.close() f = open("/philly/rr3/msrhyperprojvc2_scratch/saemal/abhinav/nccl-manual/samples/optim-bench-results-128GPUs", "r") otherAdams = f.read() f.close() adamResults = {"FusedAdam":{}, "PyTorchAdam":{}, "OurAdam":{}} #dictionary of [Fu...
[ "re.findall" ]
[((399, 451), 're.findall', 're.findall', (['"""\\\\(null\\\\) (\\\\d+) ([\\\\d\\\\.]+)"""', 'ourAdam'], {}), "('\\\\(null\\\\) (\\\\d+) ([\\\\d\\\\.]+)', ourAdam)\n", (409, 451), False, 'import re\n'), ((548, 607), 're.findall', 're.findall', (['"""fusedadam (\\\\d+) \\\\d+ ([\\\\d\\\\.]+)"""', 'otherAdams'], {}), "('...
import cv2 import rest import numpy as np class ChromaKeyServiceImpl(rest.ChromaKeyingService): def replace(self, src_image_str, bg_image_str) -> bytes: bg = cv2.imdecode(np.frombuffer(bg_image_str, np.uint8), cv2.IMREAD_COLOR) img = cv2.imdecode(np.frombuffer(src_image_str, np.uint8), cv2.IMREAD...
[ "cv2.bitwise_not", "cv2.bitwise_and", "numpy.frombuffer", "cv2.imencode", "cv2.add", "cv2.resize" ]
[((665, 686), 'cv2.bitwise_not', 'cv2.bitwise_not', (['mask'], {}), '(mask)\n', (680, 686), False, 'import cv2\n'), ((819, 855), 'cv2.bitwise_and', 'cv2.bitwise_and', (['img', 'img'], {'mask': 'mask'}), '(img, img, mask=mask)\n', (834, 855), False, 'import cv2\n'), ((870, 897), 'cv2.resize', 'cv2.resize', (['bg', '(128...
import pylab import numpy as np from qiskit import Aer from qiskit.utils import QuantumInstance from qiskit.tools.visualization import plot_histogram from qiskit.algorithms import Grover, AmplificationProblem from qiskit.circuit.library.phase_oracle import PhaseOracle ### Finding Solutions to 3-SAT Problems input_3sa...
[ "qiskit.algorithms.Grover", "tempfile.NamedTemporaryFile", "os.remove", "qiskit.algorithms.AmplificationProblem", "qiskit.tools.visualization.plot_histogram", "qiskit.circuit.library.phase_oracle.PhaseOracle", "qiskit.circuit.library.phase_oracle.PhaseOracle.from_dimacs_file", "qiskit.Aer.get_backend"...
[((686, 739), 'tempfile.NamedTemporaryFile', 'tempfile.NamedTemporaryFile', ([], {'mode': '"""w+t"""', 'delete': '(False)'}), "(mode='w+t', delete=False)\n", (713, 739), False, 'import tempfile\n'), ((1194, 1226), 'qiskit.Aer.get_backend', 'Aer.get_backend', (['"""aer_simulator"""'], {}), "('aer_simulator')\n", (1209, ...
# ****************************************************************************** # # test_allauth_2f2a.py: allauth_2f2a tests # # SPDX-License-Identifier: Apache-2.0 # # django-allauth-2f2a, a 2fa adapter for django-allauth. # # ****************************************************************************** # # django-...
[ "django_otp.oath.TOTP", "allauth.account.signals.user_logged_in.connect", "urllib.parse.urlencode", "django.contrib.auth.get_user_model", "django.urls.reverse", "django.contrib.messages.info", "urllib.parse.parse_qsl", "django.test.override_settings", "urllib.parse.urlparse" ]
[((22082, 22228), 'django.test.override_settings', 'override_settings', ([], {'LOGIN_REDIRECT_URL': '"""/unnamed-view"""', 'MIDDLEWARE': "(settings.MIDDLEWARE + ('allauth_2f2a.middleware.BaseRequire2FAMiddleware',))"}), "(LOGIN_REDIRECT_URL='/unnamed-view', MIDDLEWARE=settings.\n MIDDLEWARE + ('allauth_2f2a.middlewa...
import cPickle as pickle from ram.classes.module import UnitService from ram.classes.module import UseFilename from ram.classes import DumbResults import ram.process from ram.osutils import setenv class __api__(UnitService): """runs dialogs to interact with user To run dialogs for the unit: $ ram input...
[ "cPickle.dumps", "ram.classes.module.UseFilename" ]
[((371, 406), 'ram.classes.module.UseFilename', 'UseFilename', (['"""input"""'], {'required': '(True)'}), "('input', required=True)\n", (382, 406), False, 'from ram.classes.module import UseFilename\n'), ((508, 526), 'cPickle.dumps', 'pickle.dumps', (['args'], {}), '(args)\n', (520, 526), True, 'import cPickle as pickl...
""" .. module:: Multi :platform: Unix, Windows :synopsis: Provides container classes for spline geoemtries .. moduleauthor:: <NAME> <<EMAIL>> """ import abc import warnings from functools import partial from multiprocessing import Value, Lock from . import abstract from . import vis from . import voxelize fr...
[ "warnings.warn", "functools.partial", "multiprocessing.Value", "multiprocessing.Lock" ]
[((5135, 5228), 'warnings.warn', 'warnings.warn', (['"""Visualization component is NOT an instance of the vis.VisAbstract class"""'], {}), "(\n 'Visualization component is NOT an instance of the vis.VisAbstract class')\n", (5148, 5228), False, 'import warnings\n'), ((14100, 14151), 'warnings.warn', 'warnings.warn', ...
# Copyright (c) 2021 PaddlePaddle Authors. 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 appli...
[ "paddlespeech.s2t.utils.log.Log", "paddlespeech.s2t.frontend.utility.read_manifest" ]
[((981, 994), 'paddlespeech.s2t.utils.log.Log', 'Log', (['__name__'], {}), '(__name__)\n', (984, 994), False, 'from paddlespeech.s2t.utils.log import Log\n'), ((3712, 3981), 'paddlespeech.s2t.frontend.utility.read_manifest', 'read_manifest', ([], {'manifest_path': 'manifest_path', 'max_input_len': 'max_input_len', 'min...
import datetime import factory import uuid from apps.fund.models import Donation, Order from bluebottle.test.factory_models.accounts import BlueBottleUserFactory from onepercentclub.tests.factory_models.project_factories import OnePercentProjectFactory def random_order_number(length=30): return unicode(uuid.uuid...
[ "factory.SubFactory", "uuid.uuid4" ]
[((425, 466), 'factory.SubFactory', 'factory.SubFactory', (['BlueBottleUserFactory'], {}), '(BlueBottleUserFactory)\n', (443, 466), False, 'import factory\n'), ((633, 674), 'factory.SubFactory', 'factory.SubFactory', (['BlueBottleUserFactory'], {}), '(BlueBottleUserFactory)\n', (651, 674), False, 'import factory\n'), (...
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import Photo class PhotoForm(forms.ModelForm): name = forms.TextInput() image = forms.ImageField() class Meta: model = Photo fields = ["name", "image"] ...
[ "django.forms.TextInput", "django.forms.EmailField", "django.forms.ImageField" ]
[((197, 214), 'django.forms.TextInput', 'forms.TextInput', ([], {}), '()\n', (212, 214), False, 'from django import forms\n'), ((227, 245), 'django.forms.ImageField', 'forms.ImageField', ([], {}), '()\n', (243, 245), False, 'from django import forms\n'), ((372, 390), 'django.forms.EmailField', 'forms.EmailField', ([], ...
import codecs import os import tempfile import pytest from pji.control.model import Identification, ResourceLimit from .base import TASK_TEMPLATE_SUCCESS_1, TASK_TEMPLATE_SUCCESS_2 from ..section.section.base import COMPLEX_TEXT # noinspection DuplicatedCode @pytest.mark.unittest class TestServiceTaskTask: def ...
[ "os.path.join", "pytest.raises", "tempfile.TemporaryDirectory", "pji.control.model.Identification.loads" ]
[((395, 424), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (422, 424), False, 'import tempfile\n'), ((1438, 1467), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (1465, 1467), False, 'import tempfile\n'), ((1906, 1935), 'tempfile.TemporaryDirectory', '...
import pandas as pd import json from pprint import pprint def JSONLineToDict(JSONRoute): ''' Funcion auxiliar que dado un archivo json con JSONObjects en cada linea, lo abre y lo convierte a lista de diccionarios ''' with open(JSONRoute) as f: jsonList = list(f) return json.load...
[ "pandas.read_csv", "json.loads" ]
[((727, 757), 'pandas.read_csv', 'pd.read_csv', (['csvRoute'], {'sep': '""";"""'}), "(csvRoute, sep=';')\n", (738, 757), True, 'import pandas as pd\n'), ((334, 354), 'json.loads', 'json.loads', (['jsonLine'], {}), '(jsonLine)\n', (344, 354), False, 'import json\n')]
import logging import telegram import datetime from time import sleep from toolbox import ToolBox from threading import Thread from telegram.ext import Updater from telegram.ext import Filters from telegram.ext import MessageHandler from telegram.ext import CommandHandler class Bot(object): def __init__(self): ...
[ "threading.Thread", "logging.basicConfig", "datetime.date.today", "time.sleep", "telegram.ext.Updater", "telegram.ext.MessageHandler", "telegram.ext.CommandHandler" ]
[((342, 358), 'telegram.ext.Updater', 'Updater', (['"""TOKEN"""'], {}), "('TOKEN')\n", (349, 358), False, 'from telegram.ext import Updater\n'), ((398, 485), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(name)s - %(levelname)s - %(message)s"""'}), "(format=\n '%(asctime)s - %(name...
""" Message editor with a wheel zoom functionality """ # pylint: disable=bad-continuation from PyQt4 import QtCore, QtGui class MessageCompose(QtGui.QTextEdit): """Editor class with wheel zoom functionality""" def __init__(self, parent=0): super(MessageCompose, self).__init__(parent) self.set...
[ "PyQt4.QtGui.QApplication.translate", "PyQt4.QtGui.QApplication.queryKeyboardModifiers", "PyQt4.QtGui.QApplication.activeWindow" ]
[((515, 558), 'PyQt4.QtGui.QApplication.queryKeyboardModifiers', 'QtGui.QApplication.queryKeyboardModifiers', ([], {}), '()\n', (556, 558), False, 'from PyQt4 import QtCore, QtGui\n'), ((959, 1019), 'PyQt4.QtGui.QApplication.translate', 'QtGui.QApplication.translate', (['"""MainWindow"""', '"""Zoom level %1%"""'], {}),...
""" This tests when a Datastore experiences some typical changes to the underlying definition. Test Cases: - Table is renamed. - Table is created. - Table is dropped. - Column is dropped. - [PENDING] Column attributes are updated. """ from app.revisioner.tests.e2e import inspected from app.revisioner.tests...
[ "app.revisioner.tests.test_e2e.mutate_inspected" ]
[((409, 2435), 'app.revisioner.tests.test_e2e.mutate_inspected', 'mutate_inspected', (['inspected.tables_and_views', "[{'type': 'modified', 'filters': lambda row: row['table_object_id'] == \n 16392, 'metadata': {'field': 'table_name', 'new_value': 'depts'}}, {\n 'type': 'dropped', 'filters': lambda row: row['tabl...
#!/usr/bin/env python3 # vi:nu:et:sts=4 ts=4 sw=4 """ Generate SQL Applications for all the Test01 Input Data Test01 Input Data has test data for each SQL Server type supported by genapp so that it can be properly tested. This program scans ./misc/ for all the test01 application defin...
[ "os.makedirs", "os.path.exists", "sys.path.insert", "os.system", "subprocess.call", "os.path.join" ]
[((2217, 2248), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""./scripts"""'], {}), "(0, './scripts')\n", (2232, 2248), False, 'import sys\n'), ((4850, 4899), 'os.path.join', 'os.path.join', (['self.args.bin_dir', 'self.genapp_name'], {}), '(self.args.bin_dir, self.genapp_name)\n', (4862, 4899), False, 'import os\n...
from statistics import mode from django.contrib.auth import get_user_model from django.db import models from django.db.models import UniqueConstraint from django.db.models.deletion import CASCADE User = get_user_model() class Bank(models.Model): long_name = models.CharField( verbose_name="Официальное по...
[ "django.db.models.UniqueConstraint", "django.db.models.CharField", "django.db.models.ForeignKey", "django.contrib.auth.get_user_model", "django.db.models.PositiveSmallIntegerField", "django.db.models.IntegerField", "django.db.models.DateField" ]
[((205, 221), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (219, 221), False, 'from django.contrib.auth import get_user_model\n'), ((266, 352), 'django.db.models.CharField', 'models.CharField', ([], {'verbose_name': '"""Официальное польное наименование"""', 'max_length': '(1000)'}), "(verbo...
# coding=utf-8 # Copyright 2022 HyperBO Authors. # # 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 ag...
[ "absl.testing.absltest.main", "copy.deepcopy", "numpy.random.seed", "jax.random.normal", "hyperbo.basics.linalg.inverse_spdmatrix_vector_product", "jax.numpy.dot", "jax.scipy.linalg.cholesky", "numpy.random.randn", "jax.numpy.vdot", "jax.random.PRNGKey", "jax.numpy.allclose", "numpy.eye", "j...
[((909, 926), 'jax.random.PRNGKey', 'random.PRNGKey', (['(0)'], {}), '(0)\n', (923, 926), False, 'from jax import random\n'), ((943, 960), 'jax.random.split', 'random.split', (['key'], {}), '(key)\n', (955, 960), False, 'from jax import random\n'), ((969, 1011), 'jax.random.normal', 'random.normal', (['subkey', 'params...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
[ "proto.RepeatedField", "proto.module", "proto.Field" ]
[((762, 1586), 'proto.module', 'proto.module', ([], {'package': '"""google.analytics.admin.v1alpha"""', 'manifest': "{'IndustryCategory', 'ServiceLevel', 'ActorType', 'ActionType',\n 'ChangeHistoryResourceType', 'GoogleSignalsState',\n 'GoogleSignalsConsent', 'LinkProposalInitiatingProduct',\n 'LinkProposalSta...
from prometheus_client.core import GaugeMetricFamily import prometheus_client as prom import time from vault_integration import Vault class CustomVaultExporter: def __init__(self): pass def collect(self): vault = Vault() tokens_info = vault.get_key_data_from_vault() for token...
[ "vault_integration.Vault", "prometheus_client.start_http_server", "prometheus_client.REGISTRY.register", "time.sleep", "prometheus_client.core.GaugeMetricFamily" ]
[((830, 869), 'prometheus_client.REGISTRY.register', 'prom.REGISTRY.register', (['custom_exporter'], {}), '(custom_exporter)\n', (852, 869), True, 'import prometheus_client as prom\n'), ((874, 902), 'prometheus_client.start_http_server', 'prom.start_http_server', (['(9121)'], {}), '(9121)\n', (896, 902), True, 'import ...
""" For more informations on the contents of this module: - help(plastic.GenotypeMatrix) - help(clustering.cluster_mutations) -------- Module that exposes the clustering algorithm presented at https://github.com/AlgoLab/celluloid Simple example workflow: from plastic import clustering to_cluster = cl.GenotypeMatri...
[ "kmodes.kmodes.KModes", "collections.defaultdict", "numpy.vectorize", "numpy.array" ]
[((2650, 2711), 'numpy.vectorize', 'np.vectorize', (['(lambda ai, bi: ai != 2 and bi != 2 and ai != bi)'], {}), '(lambda ai, bi: ai != 2 and bi != 2 and ai != bi)\n', (2662, 2711), True, 'import numpy as np\n'), ((4007, 4149), 'kmodes.kmodes.KModes', 'KModes', ([], {'n_clusters': 'k', 'cat_dissim': '_conflict_dissim', ...
# -*- coding: utf-8 -*- import wx import PexpectRunnerConsolGUI ########################################################################### ## Class PexpectRunnerImp ########################################################################### class PexpectRunnerImpl ( PexpectRunnerConsolGUI.PexpectRunnerGUI ): def...
[ "PexpectRunnerConsolGUI.PexpectRunnerGUI.__init__" ]
[((349, 411), 'PexpectRunnerConsolGUI.PexpectRunnerGUI.__init__', 'PexpectRunnerConsolGUI.PexpectRunnerGUI.__init__', (['self', 'parent'], {}), '(self, parent)\n', (397, 411), False, 'import PexpectRunnerConsolGUI\n')]
""" Inserts metadata and figures into the report template. """ import base64 import json import logging from pathlib import Path import re import subprocess import tempfile from bokeh import __version__ as bokeh_version from jinja2 import Environment, PackageLoader, select_autoescape, ChoiceLoader from jinja2.runtime...
[ "tempfile.TemporaryDirectory", "solarforecastarbiter.reports.figures.plotly_figures.timeseries_plots", "json.dumps", "jinja2.select_autoescape", "jinja2.PackageLoader", "pathlib.Path", "re.search", "re.sub", "base64.a85decode", "logging.getLogger" ]
[((507, 534), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (524, 534), False, 'import logging\n'), ((8427, 8477), 'json.dumps', 'json.dumps', (['value'], {'indent': '(4)', 'separators': "(',', ':')"}), "(value, indent=4, separators=(',', ':'))\n", (8437, 8477), False, 'import json\n'), ...
from pathlib import Path import matplotlib.pyplot as plt import numpy as np import skimage from sklearn import svm, metrics, datasets from sklearn.utils import Bunch from sklearn.model_selection import GridSearchCV, train_test_split #import opencv from skimage.io import imread from skimage.transform import res...
[ "sklearn.utils.Bunch", "time.time", "pathlib.Path", "numpy.array", "skimage.transform.resize", "sklearn.svm.SVC", "skimage.io.imread" ]
[((360, 371), 'time.time', 'time.time', ([], {}), '()\n', (369, 371), False, 'import time\n'), ((2311, 2320), 'sklearn.svm.SVC', 'svm.SVC', ([], {}), '()\n', (2318, 2320), False, 'from sklearn import svm, metrics, datasets\n'), ((3544, 3555), 'time.time', 'time.time', ([], {}), '()\n', (3553, 3555), False, 'import time...
import io import math from textwrap import wrap from time import strftime, gmtime import bezier import matplotlib import numpy as np import pandas as pd import seaborn as sns from PIL import Image from matplotlib import pyplot as plt from ..utils import Log def graph_bpm(map_obj): """ graphs the bpm changes...
[ "matplotlib.pyplot.title", "seaborn.lineplot", "matplotlib.pyplot.clf", "textwrap.wrap", "matplotlib.pyplot.box", "numpy.arange", "bezier.Curve", "pandas.DataFrame", "matplotlib.pyplot.close", "bezier.CurvedPolygon", "numpy.insert", "numpy.append", "seaborn.set", "io.BytesIO", "matplotli...
[((1024, 1050), 'pandas.DataFrame', 'pd.DataFrame', (['chart_points'], {}), '(chart_points)\n', (1036, 1050), True, 'import pandas as pd\n'), ((1138, 1591), 'seaborn.set', 'sns.set', ([], {'rc': "{'axes.facecolor': col, 'text.color': (236 / 255, 239 / 255, 241 / 255),\n 'figure.facecolor': col, 'savefig.facecolor': ...