code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import getpass import json import os from xdg import XDG_CONFIG_HOME BRIDGE_ENDPOINT_ENV = 'PLAZA_BRIDGE_ENDPOINT' AUTH_TOKEN_ENV = 'PLAZA_BRIDGE_AUTH_TOKEN' BRIDGE_ENDPOINT_INDEX = "plaza_bridge_endpoint" AUTH_TOKEN_INDEX = 'plaza_authentication_token' global directory, config_file directory = os.path.join(XDG_CONF...
[ "os.path.exists", "os.makedirs", "os.getenv", "os.path.join", "json.load", "json.dump" ]
[((299, 357), 'os.path.join', 'os.path.join', (['XDG_CONFIG_HOME', '"""plaza"""', '"""bridges"""', '"""toggl"""'], {}), "(XDG_CONFIG_HOME, 'plaza', 'bridges', 'toggl')\n", (311, 357), False, 'import os\n'), ((372, 410), 'os.path.join', 'os.path.join', (['directory', '"""config.json"""'], {}), "(directory, 'config.json'...
""" Module containing all segmentation related functions. """ from typing import List, Tuple, NamedTuple, Generator import cv2 as cv import numpy as np from skimage import measure, morphology, segmentation as segment from scipy import ndimage # ========================================================== # SETTINGS # ...
[ "skimage.morphology.watershed", "scipy.ndimage.distance_transform_edt", "numpy.amax", "numpy.ones", "numpy.average", "numpy.where", "scipy.ndimage.label", "numpy.zeros_like", "skimage.segmentation.morphological_geodesic_active_contour", "cv2.morphologyEx", "numpy.array", "skimage.morphology.co...
[((425, 475), 'cv2.getStructuringElement', 'cv.getStructuringElement', (['cv.MORPH_ELLIPSE', '(9, 9)'], {}), '(cv.MORPH_ELLIPSE, (9, 9))\n', (449, 475), True, 'import cv2 as cv\n'), ((716, 766), 'cv2.getStructuringElement', 'cv.getStructuringElement', (['cv.MORPH_ELLIPSE', '(9, 9)'], {}), '(cv.MORPH_ELLIPSE, (9, 9))\n'...
import tensorflow as tf tf.compat.v1.disable_eager_execution() x_ = tf.compat.v1.placeholder(dtype=tf.float32, shape=(1, 4, 4, 20), name="Hole") op_ = tf.compat.v1.nn.lrn(x_, 5, 1.0, 1.0, 0.5)
[ "tensorflow.compat.v1.placeholder", "tensorflow.compat.v1.disable_eager_execution", "tensorflow.compat.v1.nn.lrn" ]
[((25, 63), 'tensorflow.compat.v1.disable_eager_execution', 'tf.compat.v1.disable_eager_execution', ([], {}), '()\n', (61, 63), True, 'import tensorflow as tf\n'), ((70, 146), 'tensorflow.compat.v1.placeholder', 'tf.compat.v1.placeholder', ([], {'dtype': 'tf.float32', 'shape': '(1, 4, 4, 20)', 'name': '"""Hole"""'}), "...
import tensorflow as tf import argparse def load_graph(frozen_graph_filename): # We load the protobuf file from the disk and parse it to retrieve the # unserialized graph_def with tf.gfile.GFile(frozen_graph_filename, "rb") as f: graph_def = tf.GraphDef() graph_def.ParseFromString(f.read())...
[ "tensorflow.Graph", "argparse.ArgumentParser", "tensorflow.GraphDef", "tensorflow.import_graph_def", "tensorflow.gfile.GFile" ]
[((737, 762), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (760, 762), False, 'import argparse\n'), ((193, 236), 'tensorflow.gfile.GFile', 'tf.gfile.GFile', (['frozen_graph_filename', '"""rb"""'], {}), "(frozen_graph_filename, 'rb')\n", (207, 236), True, 'import tensorflow as tf\n'), ((263, 2...
#!/usr/bin/env python3 import atexit import struct import random import sys import threading import socket import termios from select import select PORT = 13117 BUFFER_SIZE = 4096 TEAM_NAME = f"2pack\n" UTF8_ENCODE = 'utf-8' SOCKET_LIST = [] ACTIVE_CONNECTION = 0 stop_threads = False import os os.system("") # Grou...
[ "sys.stdin.fileno", "select.select", "termios.tcgetattr", "socket.socket", "termios.tcsetattr", "struct.unpack", "os.system", "sys.stdin.read", "atexit.register", "threading.Thread" ]
[((299, 312), 'os.system', 'os.system', (['""""""'], {}), "('')\n", (308, 312), False, 'import os\n'), ((1567, 1635), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_DGRAM', 'socket.IPPROTO_UDP'], {}), '(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)\n', (1580, 1635), False, 'import socket\n'...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'logPlotHeaders.ui' # # Created: Fri Apr 3 12:05:41 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except...
[ "PyQt4.QtGui.QWidget", "PyQt4.QtGui.QScrollArea", "PyQt4.QtGui.QFont", "PyQt4.QtCore.QMetaObject.connectSlotsByName", "PyQt4.QtGui.QLabel", "PyQt4.QtCore.QRect", "PyQt4.QtGui.QVBoxLayout", "PyQt4.QtGui.QStatusBar", "PyQt4.QtGui.QFrame", "PyQt4.QtGui.QApplication.translate", "PyQt4.QtGui.QMenuBar...
[((489, 553), 'PyQt4.QtGui.QApplication.translate', 'QtGui.QApplication.translate', (['context', 'text', 'disambig', '_encoding'], {}), '(context, text, disambig, _encoding)\n', (517, 553), False, 'from PyQt4 import QtCore, QtGui\n'), ((879, 904), 'PyQt4.QtGui.QWidget', 'QtGui.QWidget', (['MainWindow'], {}), '(MainWind...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pant...
[ "pants.backend.jvm.tasks.unpack_jars.UnpackJars.get_unpack_filter", "pants.backend.jvm.tasks.classpath_util.ClasspathUtil.internal_classpath", "os.path.join", "twitter.common.collections.OrderedSet", "os.walk", "os.path.relpath" ]
[((2914, 2949), 'os.path.join', 'os.path.join', (['outdir', 'self.DEX_NAME'], {}), '(outdir, self.DEX_NAME)\n', (2926, 2949), False, 'import os\n'), ((4465, 4501), 'pants.backend.jvm.tasks.unpack_jars.UnpackJars.get_unpack_filter', 'UnpackJars.get_unpack_filter', (['target'], {}), '(target)\n', (4493, 4501), False, 'fr...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import json from collections import defaultdict from shapely.geometry import LineString, Point from shapely.ops import linemerge import gmplot import urllib import sys import codecs import pyproj import yattag import hashlib from progressbar import ProgressBar, ETA, SimplePro...
[ "pyproj.Geod", "overpy.Overpass", "gmplot.GoogleMapPlotter", "shapely.ops.linemerge", "shapely.geometry.Point", "yattag.Doc", "collections.defaultdict", "shapely.geometry.LineString", "progressbar.ETA", "codecs.open", "progressbar.FormatLabel" ]
[((805, 822), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (816, 822), False, 'from collections import defaultdict\n'), ((1153, 1179), 'pyproj.Geod', 'pyproj.Geod', ([], {'ellps': '"""WGS84"""'}), "(ellps='WGS84')\n", (1164, 1179), False, 'import pyproj\n'), ((1265, 1282), 'overpy.Overpass', 'o...
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import logging from clickhouse_mysql.pool.pool import Pool from clickhouse_mysql.objectbuilder import ObjectBuilder from pymysqlreplication.row_event import WriteRowsEvent, UpdateRowsEvent, DeleteRowsEvent # Buckets Belts' Index Generator class BBIndexGenera...
[ "time.time", "logging.info", "clickhouse_mysql.objectbuilder.ObjectBuilder" ]
[((2924, 2935), 'time.time', 'time.time', ([], {}), '()\n', (2933, 2935), False, 'import time\n'), ((1685, 1696), 'time.time', 'time.time', ([], {}), '()\n', (1694, 1696), False, 'import time\n'), ((1295, 1337), 'clickhouse_mysql.objectbuilder.ObjectBuilder', 'ObjectBuilder', ([], {'class_name': 'BBIndexGenerator'}), '...
# © 2019 Nokia # Licensed under the BSD 3 Clause license # SPDX-License-Identifier: BSD-3-Clause import os from setuptools import setup, find_packages pkg_name = 'radish_rest' def _packages(): packages = [f'{pkg_name}.{sub_pkg_name}' for sub_pkg_name in find_packages(os.path.join(os.path.dirnam...
[ "os.path.dirname" ]
[((306, 331), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (321, 331), False, 'import os\n')]
import argparse import warnings from pytorch_lightning.models.trainer import Trainer from pytorch_lightning.callbacks import ModelCheckpoint from test_tube import Experiment import models warnings.filterwarnings('ignore') def main(): parser = argparse.ArgumentParser() parser.add_argument('--model', choices...
[ "test_tube.Experiment", "warnings.filterwarnings", "argparse.ArgumentParser" ]
[((191, 224), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (214, 224), False, 'import warnings\n'), ((252, 277), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (275, 277), False, 'import argparse\n'), ((958, 1000), 'test_tube.Experiment', 'Experi...
""" Levenberg Marquart fitting class and helper tools https://github.com/jaimedelacruz/LevMar Coded by <NAME> (ISP-SU 2021) References: This implementation follows the notation presented in: <NAME>, Leenaarts, Danilovic & Uitenbroek (2019): https://ui.adsabs.harvard.edu/abs/2019A%26A...623A..74D/abstract but without...
[ "numpy.copy", "numpy.abs", "numpy.sqrt", "numpy.minimum", "numpy.diag", "numpy.ascontiguousarray", "numpy.zeros", "numpy.linalg.svd", "numpy.maximum", "numpy.transpose" ]
[((4195, 4205), 'numpy.copy', 'np.copy', (['x'], {}), '(x)\n', (4202, 4205), True, 'import numpy as np\n'), ((6606, 6622), 'numpy.linalg.svd', 'np.linalg.svd', (['A'], {}), '(A)\n', (6619, 6622), True, 'import numpy as np\n'), ((7442, 7481), 'numpy.zeros', 'np.zeros', (['(nPar, nPar)'], {'dtype': '"""float64"""'}), "((...
import pytest from tests.helpers import check from yatl.interpolation import render_interpolation from yatl.types import YATLEnvironmentError, YATLSyntaxError def test_render_interpolation(): assert ( render_interpolation(".(foo) and .(bar)", {"foo": "abc", "bar": "xyz"}) == "abc and xyz" ) ...
[ "tests.helpers.check", "pytest.raises", "yatl.interpolation.render_interpolation" ]
[((766, 807), 'tests.helpers.check', 'check', (['test', 'expected', "{'foo': 'bar'}", '{}'], {}), "(test, expected, {'foo': 'bar'}, {})\n", (771, 807), False, 'from tests.helpers import check\n'), ((937, 978), 'tests.helpers.check', 'check', (['test', 'expected', "{'bar': 'baz'}", '{}'], {}), "(test, expected, {'bar': ...
# 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 agreed to in writing,...
[ "qkeras.qtools.quantized_operators.quantizer_impl.Bernoulli", "qkeras.qtools.quantized_operators.quantizer_impl.StochasticTernary", "numpy.testing.assert_equal", "qkeras.qtools.quantized_operators.quantizer_impl.Ternary", "qkeras.quantizers.quantized_ulaw", "qkeras.quantizers.stochastic_binary", "qkeras...
[((1154, 1181), 'qkeras.quantizers.quantized_bits', 'quantizers.quantized_bits', ([], {}), '()\n', (1179, 1181), False, 'from qkeras import quantizers\n'), ((1203, 1233), 'qkeras.qtools.quantized_operators.quantizer_impl.QuantizedBits', 'quantizer_impl.QuantizedBits', ([], {}), '()\n', (1231, 1233), False, 'from qkeras...
#!/usr/bin/python3 import os os.putenv('LD_LIBRARY_PATH', '.') import ctypes librmath = ctypes.CDLL('./librmath.so') print(librmath.square(5)) class Point(ctypes.Structure): _fields_ = [('x', ctypes.c_double), ('y', ctypes.c_double)] def __str__(self): return 'Point(%f,%f)' % (self.x, self.y) librma...
[ "os.putenv", "ctypes.POINTER", "ctypes.CDLL" ]
[((29, 62), 'os.putenv', 'os.putenv', (['"""LD_LIBRARY_PATH"""', '"""."""'], {}), "('LD_LIBRARY_PATH', '.')\n", (38, 62), False, 'import os\n'), ((89, 117), 'ctypes.CDLL', 'ctypes.CDLL', (['"""./librmath.so"""'], {}), "('./librmath.so')\n", (100, 117), False, 'import ctypes\n'), ((463, 484), 'ctypes.POINTER', 'ctypes.P...
import _thread import time from machine import Timer import gc def thread_function(): print("Thread is executing...") return 0 def alarm_cb(self): _thread.start_new_thread(thread_function, ()) #Need to call gc.collect() because when this test is executing usually not enough free memory exists as earlier ...
[ "machine.Timer.Alarm", "_thread.start_new_thread", "time.ticks_ms", "gc.collect" ]
[((339, 351), 'gc.collect', 'gc.collect', ([], {}), '()\n', (349, 351), False, 'import gc\n'), ((353, 407), 'machine.Timer.Alarm', 'Timer.Alarm', ([], {'handler': 'alarm_cb', 'ms': '(1000)', 'periodic': '(False)'}), '(handler=alarm_cb, ms=1000, periodic=False)\n', (364, 407), False, 'from machine import Timer\n'), ((40...
import sys from codecs import iterdecode from functools import partial import re import logging def replaceuri(textiter,uri,replacement): exp = re.compile(re.escape(uri[0:16])) slen = len(uri) remaining = '' try: for text in textiter: value = remaining + text remaining = value[-sle...
[ "codecs.iterdecode", "re.escape", "logging.exception", "functools.partial", "sys.stdout.write" ]
[((160, 180), 're.escape', 're.escape', (['uri[0:16]'], {}), '(uri[0:16])\n', (169, 180), False, 'import re\n'), ((822, 869), 'logging.exception', 'logging.exception', (['"""Drat! Halt and catch fire."""'], {}), "('Drat! Halt and catch fire.')\n", (839, 869), False, 'import logging\n'), ((1108, 1138), 'codecs.iterdecod...
from common.alive_helper import AliveHelper from server.middleware import Middleware from server.modules.scheduler_module import SchedulerModule from server.modules.storage_module import StorageModule from server.net import Server # check client_startup.py for how this work # the server is basically the same, but with...
[ "server.net.Server", "server.modules.scheduler_module.SchedulerModule", "server.modules.storage_module.StorageModule", "common.alive_helper.AliveHelper", "server.middleware.Middleware" ]
[((551, 578), 'server.middleware.Middleware', 'Middleware', ([], {'modules': 'modules'}), '(modules=modules)\n', (561, 578), False, 'from server.middleware import Middleware\n'), ((593, 622), 'server.net.Server', 'Server', ([], {'middleware': 'middleware'}), '(middleware=middleware)\n', (599, 622), False, 'from server....
import numpy as np ########################## method used - "1env_1jet", or "1env_njet" ################################################## method='1env_1jet' ########################## nature of neural network - "mlp", "mlp_shared" or "cnn" ################################################## policy_name='mlp' ####...
[ "numpy.array" ]
[((2754, 2795), 'numpy.array', 'np.array', (['(jets_position / dx)'], {'dtype': '"""int"""'}), "(jets_position / dx, dtype='int')\n", (2762, 2795), True, 'import numpy as np\n')]
# -*- coding: utf-8 -*- """ Survey_Estimate3dCoord.py *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Gen...
[ "numpy.identity", "PyQt5.QtCore.QCoreApplication.translate", "numpy.sqrt", "numpy.linalg.pinv", "lftools.geocapt.topogeo.dms2dd", "numpy.diag", "numpy.array", "lftools.geocapt.topogeo.String2CoordList", "lftools.geocapt.imgs.Imgs", "lftools.geocapt.topogeo.String2StringList", "numpy.cos", "num...
[((1447, 1495), 'PyQt5.QtCore.QCoreApplication.translate', 'QCoreApplication.translate', (['"""Processing"""', 'string'], {}), "('Processing', string)\n", (1473, 1495), False, 'from PyQt5.QtCore import QCoreApplication, QVariant\n'), ((7050, 7056), 'numpy.cos', 'cos', (['Z'], {}), '(Z)\n', (7053, 7056), False, 'from nu...
import numpy as np from sklearn.preprocessing import Imputer # Represent the unknown value by np.nan in numpy data_origin = [[30, 100], [20, 50], [35, np.nan], [25, 80], [30, 70], [40, 60]] # Imputation with the mean value imp_mean = Imputer(m...
[ "sklearn.ensemble.RandomForestRegressor", "numpy.where", "sklearn.preprocessing.Imputer", "sklearn.model_selection.cross_val_score", "numpy.array", "numpy.random.randint", "sklearn.datasets.load_diabetes", "numpy.random.seed", "numpy.random.shuffle" ]
[((311, 357), 'sklearn.preprocessing.Imputer', 'Imputer', ([], {'missing_values': '"""NaN"""', 'strategy': '"""mean"""'}), "(missing_values='NaN', strategy='mean')\n", (318, 357), False, 'from sklearn.preprocessing import Imputer\n'), ((502, 550), 'sklearn.preprocessing.Imputer', 'Imputer', ([], {'missing_values': '"""...
from pprint import pprint from deutschland import autobahn from deutschland.autobahn.api import default_api autobahn_api_instance = default_api.DefaultApi() try: # Auflistung aller Autobahnen api_response = autobahn_api_instance.list_autobahnen() pprint(api_response) # Details zu einer Ladestation ...
[ "pprint.pprint", "deutschland.autobahn.api.default_api.DefaultApi" ]
[((134, 158), 'deutschland.autobahn.api.default_api.DefaultApi', 'default_api.DefaultApi', ([], {}), '()\n', (156, 158), False, 'from deutschland.autobahn.api import default_api\n'), ((262, 282), 'pprint.pprint', 'pprint', (['api_response'], {}), '(api_response)\n', (268, 282), False, 'from pprint import pprint\n'), ((...
import vivialconnect from tests.common import BaseTestCase, HTTMock class LogTest(BaseTestCase): def test_get_logs(self): with HTTMock( self.response_content, body=self.load_fixture("log/log"), headers={"Conent-type": "application/json"}, ): params =...
[ "vivialconnect.Log.find", "vivialconnect.Log.get_aggregated_logs" ]
[((417, 449), 'vivialconnect.Log.find', 'vivialconnect.Log.find', ([], {}), '(**params)\n', (439, 449), False, 'import vivialconnect\n'), ((945, 992), 'vivialconnect.Log.get_aggregated_logs', 'vivialconnect.Log.get_aggregated_logs', ([], {}), '(**params)\n', (982, 992), False, 'import vivialconnect\n'), ((2004, 2051), ...
import torch from manopth.demo import generate_random_hand def test_generate_random_hand(): batch_size = 3 hand_info = generate_random_hand(batch_size=batch_size, ncomps=6) verts = hand_info['verts'] joints = hand_info['joints'] assert verts.shape == (batch_size, 778, 3) assert joints.shape =...
[ "manopth.demo.generate_random_hand" ]
[((130, 183), 'manopth.demo.generate_random_hand', 'generate_random_hand', ([], {'batch_size': 'batch_size', 'ncomps': '(6)'}), '(batch_size=batch_size, ncomps=6)\n', (150, 183), False, 'from manopth.demo import generate_random_hand\n')]
import torch from src.models import CAECStochastic, CAECUniform def make_model(cfg): model_cls = CAECStochastic if cfg.model_cls == 'CAECStochastic' else CAECUniform model = model_cls(cfg) if hasattr(cfg, 'checkpoint'): model.load_state_dict(torch.load(cfg.checkpoint, map_location='cpu')) mod...
[ "torch.load" ]
[((265, 311), 'torch.load', 'torch.load', (['cfg.checkpoint'], {'map_location': '"""cpu"""'}), "(cfg.checkpoint, map_location='cpu')\n", (275, 311), False, 'import torch\n')]
import pytest from tests.factories import ChallengeFactory, ResultFactory @pytest.mark.django_db def test_public_private_default(): c = ChallengeFactory() r1 = ResultFactory(job__submission__challenge=c) assert r1.published == True c.evaluation_config.auto_publish_new_results = False c.evaluat...
[ "tests.factories.ResultFactory", "tests.factories.ChallengeFactory" ]
[((143, 161), 'tests.factories.ChallengeFactory', 'ChallengeFactory', ([], {}), '()\n', (159, 161), False, 'from tests.factories import ChallengeFactory, ResultFactory\n'), ((172, 215), 'tests.factories.ResultFactory', 'ResultFactory', ([], {'job__submission__challenge': 'c'}), '(job__submission__challenge=c)\n', (185,...
#!/usr/bin/env python # encoding: utf-8 import redis r = redis.Redis(host='127.0.0.1', port=6379, db=0) num_negative_cache_keys = len(r.keys('negative_cache:*')) num_negative_req_cache_keys = len(r.keys('negative_req_cache:*')) num_all_keys = len(r.keys('*')) num_account_cache_keys = num_all_keys - \ num_negative...
[ "redis.Redis" ]
[((59, 105), 'redis.Redis', 'redis.Redis', ([], {'host': '"""127.0.0.1"""', 'port': '(6379)', 'db': '(0)'}), "(host='127.0.0.1', port=6379, db=0)\n", (70, 105), False, 'import redis\n')]
from django.test import TestCase from django.test.client import RequestFactory from django.urls.base import reverse from core.models import Movie from core.views import MovieList class MovieListPaginationTestCase(TestCase): ACTIVE_PAGINATION_HTML = """ <li class="page-item active"> <a href="{}?page=...
[ "django.urls.base.reverse", "django.test.client.RequestFactory", "core.views.MovieList.as_view" ]
[((626, 651), 'django.urls.base.reverse', 'reverse', (['"""core:MovieList"""'], {}), "('core:MovieList')\n", (633, 651), False, 'from django.urls.base import reverse\n'), ((732, 751), 'core.views.MovieList.as_view', 'MovieList.as_view', ([], {}), '()\n', (749, 751), False, 'from core.views import MovieList\n'), ((670, ...
from tests.integration.create_token import create_token from tests.integration.integration_test_case import IntegrationTestCase class TestHappyPath(IntegrationTestCase): def test_try_date_203(self): self.try_date('0203', '1') def test_try_another_data_203(self): self.try_another_date('0203',...
[ "tests.integration.create_token.create_token" ]
[((631, 686), 'tests.integration.create_token.create_token', 'create_token', (['form_type_id', 'eq_id', 'start_date', 'end_date'], {}), '(form_type_id, eq_id, start_date, end_date)\n', (643, 686), False, 'from tests.integration.create_token import create_token\n'), ((1977, 2045), 'tests.integration.create_token.create_...
from data.database import ImageStorage, ManifestBlob, UploadedBlob from data.model import BlobDoesNotExist from data.model.storage import get_storage_by_uuid, InvalidImageException def get_repository_blob_by_digest(repository, blob_digest): """ Find the content-addressable blob linked to the specified reposit...
[ "data.model.storage.get_storage_by_uuid", "data.database.ImageStorage.select" ]
[((656, 689), 'data.model.storage.get_storage_by_uuid', 'get_storage_by_uuid', (['storage.uuid'], {}), '(storage.uuid)\n', (675, 689), False, 'from data.model.storage import get_storage_by_uuid, InvalidImageException\n'), ((815, 853), 'data.database.ImageStorage.select', 'ImageStorage.select', (['ImageStorage.uuid'], {...
import sys from bisect import insort_left def wi(): return list(map(int, sys.stdin.readline().split())) n, k = wi() x = wi() # newx = [[x[i], i + 1] for i in range(n)] # 二次元配列だと遅いので一次元+辞書で書き直した age_num = {} for cnt, age in enumerate(x, 1): age_num[age] = cnt y = x[:k] z = x[k:] y.sort() # 二分探索に単調性は必須 print(age_...
[ "sys.stdin.readline", "bisect.insort_left" ]
[((411, 430), 'bisect.insort_left', 'insort_left', (['y', 'age'], {}), '(y, age)\n', (422, 430), False, 'from bisect import insort_left\n'), ((74, 94), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (92, 94), False, 'import sys\n')]
from mmdet.apis import init_detector, inference_detector import mmcv import cv2 import tqdm #config_file = 'configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py' #checkpoint_file = 'work_dirs/cascade_rcnn_r50_fpn_1x_coco/epoch_10.pth' config_file = 'configs/hrnet/cascade_rcnn_hrnetv2p_w32_20e_coco.py' # checkpoint_fil...
[ "csv.DictWriter", "mmdet.apis.init_detector", "tqdm.tqdm", "os.path.join", "os.path.basename", "mmdet.apis.inference_detector" ]
[((499, 559), 'mmdet.apis.init_detector', 'init_detector', (['config_file', 'checkpoint_file'], {'device': '"""cuda:0"""'}), "(config_file, checkpoint_file, device='cuda:0')\n", (512, 559), False, 'from mmdet.apis import init_detector, inference_detector\n'), ((1274, 1296), 'tqdm.tqdm', 'tqdm.tqdm', (['images_path'], {...
# Generated by Django 3.1.5 on 2021-01-08 18:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('questions', '0004_auto_20210108_1325'), ] operations = [ migrations.AddField( model_name='useranswer', name='my_poin...
[ "django.db.models.CharField", "django.db.models.IntegerField" ]
[((343, 400), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(-1)', 'verbose_name': '"""My points"""'}), "(default=-1, verbose_name='My points')\n", (362, 400), False, 'from django.db import migrations, models\n'), ((530, 587), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'de...
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC. 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 requir...
[ "googlecloudsdk.api_lib.composer.util.GetMessagesModule", "googlecloudsdk.api_lib.composer.environments_util.Patch", "googlecloudsdk.command_lib.composer.util.ParseRequirementsFile", "googlecloudsdk.command_lib.composer.util.BuildPartialUpdate", "googlecloudsdk.command_lib.composer.util.BuildFullMapUpdate",...
[((2392, 2486), 'googlecloudsdk.api_lib.composer.environments_util.Patch', 'environments_api_util.Patch', (['env_resource', 'patch', 'field_mask'], {'release_track': 'release_track'}), '(env_resource, patch, field_mask, release_track=\n release_track)\n', (2419, 2486), True, 'from googlecloudsdk.api_lib.composer imp...
# Like /common/slow.py except with text/html content-type so that it won't # trigger strange parts of the <iframe> navigate algorithm. import time def main(request, response): time.sleep(2) return 200, [["Content-Type", "text/html"]], b''
[ "time.sleep" ]
[((181, 194), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (191, 194), False, 'import time\n')]
# -*- coding: utf-8 -*- import sys from concurrent.futures import as_completed from concurrent.futures.thread import ThreadPoolExecutor from multiprocessing import cpu_count, get_context from typing import Any, Callable, Dict, List from django.conf import settings def batch_call( func: Callable, params_list:...
[ "concurrent.futures.as_completed", "multiprocessing.get_context", "concurrent.futures.thread.ThreadPoolExecutor", "multiprocessing.cpu_count" ]
[((802, 821), 'concurrent.futures.as_completed', 'as_completed', (['tasks'], {}), '(tasks)\n', (814, 821), False, 'from concurrent.futures import as_completed\n'), ((648, 706), 'concurrent.futures.thread.ThreadPoolExecutor', 'ThreadPoolExecutor', ([], {'max_workers': 'settings.CONCURRENT_NUMBER'}), '(max_workers=settin...
# Generated by Django 3.1.2 on 2020-10-03 11:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('github', '0002_auto_20201003_1003'), ] operations = [ migrations.AddField( model_name='repository', name='name', ...
[ "django.db.models.CharField" ]
[((335, 379), 'django.db.models.CharField', 'models.CharField', ([], {'default': '""""""', 'max_length': '(256)'}), "(default='', max_length=256)\n", (351, 379), False, 'from django.db import migrations, models\n')]
import os from contextlib import ContextDecorator from copy import copy from bitcaster.config.environ import env class override_environ(ContextDecorator): def __init__(self, *remove, **update): self._env = copy(env) self.environ = os.environ self.update = update or {} self.remove ...
[ "copy.copy" ]
[((221, 230), 'copy.copy', 'copy', (['env'], {}), '(env)\n', (225, 230), False, 'from copy import copy\n')]
# Generated by Django 2.2.11 on 2020-06-09 18:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('readinglist', '0001_initial'), ] operations = [ migrations.RenameField( model_name='paper', old_name='metadata', ...
[ "django.db.migrations.AlterUniqueTogether", "django.db.migrations.RenameField", "django.db.models.TextField" ]
[((229, 319), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""paper"""', 'old_name': '"""metadata"""', 'new_name': '"""_metadata"""'}), "(model_name='paper', old_name='metadata', new_name=\n '_metadata')\n", (251, 319), False, 'from django.db import migrations, models\n'), ((533...
from bs4 import BeautifulSoup import urllib.request import sys ## Parses the file and stores it with the respective label def parse(source, link): soup = BeautifulSoup(source, "html.parser"); fileSource = open(str(x[30:]) + ".txt", 'w'); fileSource.write(str(soup.encode("utf-8"))) fileSource.close(); ...
[ "bs4.BeautifulSoup", "sys.stdout.flush", "sys.stdout.write" ]
[((159, 195), 'bs4.BeautifulSoup', 'BeautifulSoup', (['source', '"""html.parser"""'], {}), "(source, 'html.parser')\n", (172, 195), False, 'from bs4 import BeautifulSoup\n'), ((323, 344), 'sys.stdout.write', 'sys.stdout.write', (['"""."""'], {}), "('.')\n", (339, 344), False, 'import sys\n'), ((350, 368), 'sys.stdout.f...
from django.conf import settings from django.test import TestCase from nose.util import resolve_name __all__ = ('IP', 'PORT', 'SITE', 'DjangoTestCase') IP = getattr(settings, 'TDDSPRY_IP', '127.0.0.1') PORT = getattr(settings, 'TDDSPRY_PORT', 8088) SITE = 'http://%s:%s/' % (IP, PORT) DjangoTestCase = getattr(sett...
[ "nose.util.resolve_name" ]
[((422, 450), 'nose.util.resolve_name', 'resolve_name', (['DjangoTestCase'], {}), '(DjangoTestCase)\n', (434, 450), False, 'from nose.util import resolve_name\n')]
import discord from discord.ext import commands from discord_slash import SlashContext from discord_slash import cog_ext from discord_slash.model import SlashCommandOptionType from discord_slash.utils.manage_commands import create_option import time import typing import logging import sys import Chess_B...
[ "discord.ext.commands.Cog.listener", "Chess_Bot.util.Data.data_manager.change_settings", "Chess_Bot.util.Data.data_manager.total_games", "discord.Game", "Chess_Bot.util.Data.data_manager.get_games", "discord_slash.utils.manage_commands.create_option", "discord.Embed", "Chess_Bot.util.Data.data_manager...
[((1206, 1229), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (1227, 1229), False, 'from discord.ext import commands\n'), ((1723, 1741), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (1739, 1741), False, 'from discord.ext import commands\n'), ((1748, 1797), 'dis...
# Copyright 2018 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, ...
[ "sqlite3.connect", "csv.writer", "itertools.zip_longest", "bz2.BZ2File", "collections.defaultdict", "alive_progress.alive_bar", "io.StringIO", "csv.reader" ]
[((2058, 2075), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (2069, 2075), False, 'from collections import defaultdict\n'), ((4391, 4415), 'sqlite3.connect', 'sqlite3.connect', (['db_path'], {}), '(db_path)\n', (4406, 4415), False, 'import sqlite3\n'), ((6136, 6154), 'collections.defaultdict', ...
import os from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( TranscriptPhrase, TranscriptPhraseVote, TranscriptPhraseCorrection, TranscriptPhraseCorrectionVote ) class Command(BaseCommand): help = '''Deletes all votes, corrections, and...
[ "django.contrib.auth.models.User.objects.filter" ]
[((858, 893), 'django.contrib.auth.models.User.objects.filter', 'User.objects.filter', ([], {'is_staff': '(False)'}), '(is_staff=False)\n', (877, 893), False, 'from django.contrib.auth.models import User\n')]
import cv2 import numpy as np import os import pickle import torch from torch.utils.data import Dataset from torchvision.transforms import Normalize import config class PW3DEvalDataset(Dataset): def __init__(self, pw3d_dir_path, img_wh): super(PW3DEvalDataset, self).__init__() # Paths cr...
[ "os.path.join", "torch.from_numpy", "torch.is_tensor", "torchvision.transforms.Normalize", "cv2.resize", "numpy.transpose", "cv2.imread" ]
[((339, 384), 'os.path.join', 'os.path.join', (['pw3d_dir_path', '"""cropped_frames"""'], {}), "(pw3d_dir_path, 'cropped_frames')\n", (351, 384), False, 'import os\n'), ((731, 792), 'torchvision.transforms.Normalize', 'Normalize', ([], {'mean': 'config.IMG_NORM_MEAN', 'std': 'config.IMG_NORM_STD'}), '(mean=config.IMG_N...
from django.shortcuts import render from . import handle_diary as handle # Create your views here. def index(request): context = { 'years': None, 'content': None } years, content = handle.get_content() context.update({'years': years, 'content': content}) return render(request, ...
[ "django.shortcuts.render" ]
[((304, 348), 'django.shortcuts.render', 'render', (['request', '"""diary/index.html"""', 'context'], {}), "(request, 'diary/index.html', context)\n", (310, 348), False, 'from django.shortcuts import render\n')]
import monasca_predictor.common.util as util # set up logging before importing any other components util.initialize_logging("predictor")
[ "monasca_predictor.common.util.initialize_logging" ]
[((101, 137), 'monasca_predictor.common.util.initialize_logging', 'util.initialize_logging', (['"""predictor"""'], {}), "('predictor')\n", (124, 137), True, 'import monasca_predictor.common.util as util\n')]
#### !/usr/bin/env python # coding: utf-8 from molmap.model import RegressionEstimator, MultiClassEstimator, MultiLabelEstimator from molmap import loadmap, dataset from molmap.show import imshow_wrap import molmap from sklearn.utils import shuffle from joblib import load, dump import numpy as np import pandas as pd ...
[ "molmap.model.MultiLabelEstimator", "pandas.read_csv", "os.path.join", "chembench.dataset.load_BACE", "numpy.nanmean", "joblib.load", "pandas.DataFrame", "chembench.dataset.load_HIV", "chembench.dataset.load_BBBP" ]
[((635, 654), 'chembench.dataset.load_BACE', 'dataset.load_BACE', ([], {}), '()\n', (652, 654), False, 'from chembench import dataset\n'), ((662, 681), 'chembench.dataset.load_BBBP', 'dataset.load_BBBP', ([], {}), '()\n', (679, 681), False, 'from chembench import dataset\n'), ((688, 706), 'chembench.dataset.load_HIV', ...
import socket import network import wifi_secrets import machine import uos import usys import gc import utime import ure import hashlib from sparkle import Sparkle import ubinascii import uio from irq_counter import IRQCounter from bme280_sensor import BME280Sensor from dht22_sensor import DHT22Sensor from mhz19_sensor...
[ "machine.reset", "hashlib.sha1", "utime.sleep", "uos.ilistdir", "ure.match", "machine.Pin", "network.WLAN", "uos.remove", "uos.rename", "ure.search", "uio.StringIO", "config.sensor_configs.items", "utime.ticks_ms", "gc.collect", "gc.mem_alloc", "gc.mem_free", "uos.stat", "ubinascii...
[((1117, 1145), 'network.WLAN', 'network.WLAN', (['network.STA_IF'], {}), '(network.STA_IF)\n', (1129, 1145), False, 'import network\n'), ((1828, 1842), 'utime.sleep', 'utime.sleep', (['(2)'], {}), '(2)\n', (1839, 1842), False, 'import utime\n'), ((1951, 1973), 'config.sensor_configs.items', 'sensor_configs.items', ([]...
# ██╗░░░░░██╗███╗░░██╗░██████╗░░░░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗ # ██║░░░░░██║████╗░██║██╔════╝░░░░██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝ # ██║░░░░░██║██╔██╗██║██║░░██╗░░░░██████╦╝██║░░░░░███████║██║░░╚═╝█████═╝░ # ██║░░░░░██║██║╚████║██║░░╚██╗░░░██╔══██╗██║░░░░░██╔══██║██║░░██╗██╔═██╗░ # ███████╗██║██...
[ "database.wow.models.BlizzardUserModel", "blizzard.core.blizzard_oauth_validate", "fastapi.HTTPException", "blizzard.core.blizzard_db" ]
[((844, 874), 'blizzard.core.blizzard_oauth_validate', 'blizzard_oauth_validate', (['token'], {}), '(token)\n', (867, 874), False, 'from blizzard.core import blizzard_db, blizzard_oauth_validate\n'), ((1549, 1562), 'blizzard.core.blizzard_db', 'blizzard_db', ([], {}), '()\n', (1560, 1562), False, 'from blizzard.core im...
import os from flask import send_from_directory from app import create_app settings_module = os.getenv('APP_SETTINGS_MODULE') app = create_app(settings_module)
[ "app.create_app", "os.getenv" ]
[((99, 131), 'os.getenv', 'os.getenv', (['"""APP_SETTINGS_MODULE"""'], {}), "('APP_SETTINGS_MODULE')\n", (108, 131), False, 'import os\n'), ((138, 165), 'app.create_app', 'create_app', (['settings_module'], {}), '(settings_module)\n', (148, 165), False, 'from app import create_app\n')]
import inspect import os from pathlib import Path from typing import Any, Dict, List, cast import schema_salad.metaschema as cg_metaschema from schema_salad import codegen from schema_salad.avro.schema import Names from schema_salad.schema import load_schema from .test_java_codegen import cwl_file_uri, metaschema_fil...
[ "os.path.exists", "inspect.getsource", "typing.cast", "schema_salad.schema.load_schema" ]
[((463, 489), 'os.path.exists', 'os.path.exists', (['src_target'], {}), '(src_target)\n', (477, 489), False, 'import os\n'), ((727, 753), 'os.path.exists', 'os.path.exists', (['src_target'], {}), '(src_target)\n', (741, 753), False, 'import os\n'), ((1007, 1033), 'os.path.exists', 'os.path.exists', (['src_target'], {})...
import re inputs = [] with open("inputs_2.txt") as f: for line in f.readlines(): inputs.append(line.strip().replace(":", "")) def count_valid_passwords_1(inputs): valid = 0 for line in inputs: # split based on - and " " (spaces) minimum, maximum, letter, password = re.split(r"[-\s]", line) if password.cou...
[ "re.split" ]
[((278, 302), 're.split', 're.split', (['"""[-\\\\s]"""', 'line'], {}), "('[-\\\\s]', line)\n", (286, 302), False, 'import re\n'), ((582, 606), 're.split', 're.split', (['"""[-\\\\s]"""', 'line'], {}), "('[-\\\\s]', line)\n", (590, 606), False, 'import re\n')]
import json from unittest import TestCase import websockets import asyncio from .utils.rabbitmq import send_trigger from .utils.wiremock import set_bootstrap_response from settings import WS_URI # from time import time class TestSubscribe(TestCase): """ Simple test for setting up a websocket connection. ...
[ "asyncio.get_event_loop", "websockets.connect", "json.dumps" ]
[((666, 692), 'websockets.connect', 'websockets.connect', (['WS_URI'], {}), '(WS_URI)\n', (684, 692), False, 'import websockets\n'), ((2949, 2973), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (2971, 2973), False, 'import asyncio\n'), ((1025, 1051), 'websockets.connect', 'websockets.connect', (...
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from facial.util import getData, y2indicator, error_rate, init_weight_and_bias from sklearn.utils import shuffle class HiddenLayer(object): def __init__(self, M1, M2, an_id): self.id = an_id self.M1 = M1 self.M2 = M...
[ "tensorflow.train.RMSPropOptimizer", "facial.util.init_weight_and_bias", "tensorflow.placeholder", "sklearn.utils.shuffle", "tensorflow.Session", "numpy.argmax", "matplotlib.pyplot.plot", "tensorflow.nn.softmax_cross_entropy_with_logits_v2", "tensorflow.global_variables_initializer", "tensorflow.n...
[((3672, 3681), 'facial.util.getData', 'getData', ([], {}), '()\n', (3679, 3681), False, 'from facial.util import getData, y2indicator, error_rate, init_weight_and_bias\n'), ((337, 365), 'facial.util.init_weight_and_bias', 'init_weight_and_bias', (['M1', 'M2'], {}), '(M1, M2)\n', (357, 365), False, 'from facial.util im...
import os import json import time import threading import logging import torch import glob import shutil from .trial_local import TrialConnector from .thread_manager import ThreadManager from dataloop_services.plugin_utils import get_dataset_obj import dtlpy as dl from logging_utils import logginger from copy import de...
[ "threading.currentThread", "logging_utils.logginger", "torch.cuda.device_count" ]
[((338, 357), 'logging_utils.logginger', 'logginger', (['__name__'], {}), '(__name__)\n', (347, 357), False, 'from logging_utils import logginger\n'), ((561, 586), 'torch.cuda.device_count', 'torch.cuda.device_count', ([], {}), '()\n', (584, 586), False, 'import torch\n'), ((2460, 2485), 'threading.currentThread', 'thr...
from beir.configs import dataset_stored_loc from beir.custom_logging import setup_logger, log_map from beir.retrieval.models import SentenceBERT from beir.retrieval.models import DPR from beir.datasets.data_loader import GenericDataLoader from beir.retrieval.evaluation import EvaluateRetrieval from beir.retrieval.searc...
[ "logging.getLogger", "argparse.ArgumentParser", "beir.retrieval.models.DPR", "os.path.join", "beir.datasets.data_loader.GenericDataLoader", "beir.custom_logging.log_map", "beir.custom_logging.setup_logger", "beir.retrieval.evaluation.EvaluateRetrieval" ]
[((421, 448), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (438, 448), False, 'import logging\n'), ((449, 469), 'beir.custom_logging.setup_logger', 'setup_logger', (['logger'], {}), '(logger)\n', (461, 469), False, 'from beir.custom_logging import setup_logger, log_map\n'), ((511, 536),...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('notifications', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='noticedigest', ...
[ "django.db.migrations.DeleteModel", "django.db.migrations.RemoveField" ]
[((246, 316), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""noticedigest"""', 'name': '"""notice_types"""'}), "(model_name='noticedigest', name='notice_types')\n", (268, 316), False, 'from django.db import models, migrations\n'), ((361, 430), 'django.db.migrations.RemoveField', '...
# Generated by Django 2.0 on 2018-06-20 13:14 import blog.models import django.core.validators from django.db import migrations, models import wagtail.core.blocks import wagtail.core.fields import wagtail.embeds.blocks class Migration(migrations.Migration): dependencies = [ ('blog', '0005_auto_20180619_...
[ "django.db.models.URLField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((456, 549), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (472, 549), False, 'from django.db import migrations, models\...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
[ "logging.getLogger", "struct.unpack", "cflib.utils.callbacks.Caller", "cflib.crtp.crtpstack.CRTPPacket" ]
[((2179, 2206), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2196, 2206), False, 'import logging\n'), ((2452, 2460), 'cflib.utils.callbacks.Caller', 'Caller', ([], {}), '()\n', (2458, 2460), False, 'from cflib.utils.callbacks import Caller\n'), ((2482, 2490), 'cflib.utils.callbacks.Cal...
#!/usr/bin/python # Copyright: (c) 2020, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], ...
[ "ansible.module_utils.basic.AnsibleModule", "yaml.safe_dump", "os.path.join", "ansible.module_utils._text.to_bytes", "os.mkdir", "functools.partial", "tempfile.NamedTemporaryFile", "multiprocessing.dummy.Pool" ]
[((2260, 2328), 'os.path.join', 'os.path.join', (['module.tmpdir', "('%s-%s-%s' % (namespace, name, version))"], {}), "(module.tmpdir, '%s-%s-%s' % (namespace, name, version))\n", (2272, 2328), False, 'import os\n'), ((2352, 2406), 'ansible.module_utils._text.to_bytes', 'to_bytes', (['collection_dir'], {'errors': '"""s...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of https://github.com/zsquareplusc/python-msp430-tools # (C) 2002-2010 <NAME> <<EMAIL>> # # SPDX-License-Identifier: BSD-3-Clause # # JTAG programmer for the MSP430 embedded processor. # # Requires Python 2+ and the binary extension _parjtag or ctyp...
[ "optparse.OptionGroup", "msp430.memory.save", "sys.stderr.flush", "msp430.memory.load", "msp430.jtag.jtag.JTAG", "sys.stderr.write", "msp430.memory.Memory", "sys.exit", "sys.stdout.fileno", "msp430.jtag.jtag.init_backend" ]
[((607, 2711), 'sys.stderr.write', 'sys.stderr.write', (['("""%(prog)s can use different libraries to connect to the target.\nThe backend can be chosen with the --backend command line option.\n\n"mspgcc"\n Using %(msp430mspgcc)s, the open source implementation\n from the mspgcc project.\n\n"ti" (default)\n Usi...
import numpy as np import tensorflow as tf import scipy import lib_gcnn.graph as graph class GraphCNN(object): """ A graph CNN for text classification. Composed of graph convolutional + max-pooling layer(s) and a softmax layer. filter_name = Filter name (i.e. "chebyshev", "spline", "fourier") L...
[ "tensorflow.equal", "tensorflow.transpose", "numpy.column_stack", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "numpy.array", "tensorflow.nn.dropout", "lib_gcnn.graph.rescale_L", "tensorflow.reduce_mean", "tensorflow.cast", "numpy.mod", "tensorflow.sparse_reorder", "numpy.isscalar...
[((1631, 1701), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[batch_size, num_vertices]'], {'name': '"""input_x"""'}), "(tf.float32, [batch_size, num_vertices], name='input_x')\n", (1645, 1701), True, 'import tensorflow as tf\n'), ((1725, 1779), 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32', ...
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='<EMAIL>', password='<PASSWORD>'): """to create a sample user for testing""" return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_cr...
[ "django.contrib.auth.get_user_model" ]
[((220, 236), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (234, 236), False, 'from django.contrib.auth import get_user_model\n'), ((502, 518), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (516, 518), False, 'from django.contrib.auth import get_user_model\n'), (...
from __future__ import print_function import numpy as np import bayesiancoresets as bc from scipy.optimize import minimize from inference import nuts, rhat, hmc import time ## FOR LOGISTIC REGRESSION from model_lr import * dnames = ['synth', 'ds1', 'phishing'] fldr = 'lr' ## FOR POISSON REGRESSION #from model_poiss ...
[ "numpy.ones", "numpy.random.multivariate_normal", "numpy.zeros", "bayesiancoresets.RandomSubsampling", "bayesiancoresets.GIGA", "numpy.savez_compressed", "numpy.logspace", "time.time", "bayesiancoresets.FrankWolfe" ]
[((536, 568), 'numpy.logspace', 'np.logspace', (['(0)', '(3)', '(10)'], {'dtype': 'int'}), '(0, 3, 10, dtype=int)\n', (547, 568), True, 'import numpy as np\n'), ((855, 866), 'time.time', 'time.time', ([], {}), '()\n', (864, 866), False, 'import time\n'), ((1120, 1141), 'numpy.ones', 'np.ones', (['cov.shape[0]'], {}), '...
# # 教師あり機械学習によるチート判定チュートリアル bot判定用スクリプト # [使い方] python detect.py # [出力] bot判定結果をprint # # # ライブラリのインポート # from sklearn.neural_network import MLPClassifier from joblib import load from pathlib import Path # # 学習済みモデルのロード # clf: MLPClassifier = load(Path(__file__).parent / 'train_model.joblib') # # 判定する特徴量の入力 # pr...
[ "pathlib.Path" ]
[((254, 268), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (258, 268), False, 'from pathlib import Path\n')]
# Copyright (c) <NAME> <<EMAIL>> # See LICENSE file. from collections import deque from _sadm.utils.cmd import call __all__ = ['check'] def check(env, action = None): diff = deque() dn = env.dist() l = ('install', 'remove', 'prune') if action is not None and action in l: l = (action,) doCommon = env.settings...
[ "collections.deque", "_sadm.utils.cmd.call" ]
[((179, 186), 'collections.deque', 'deque', ([], {}), '()\n', (184, 186), False, 'from collections import deque\n'), ((1140, 1202), '_sadm.utils.cmd.call', 'call', (["('/usr/bin/dpkg-query -s %s >/dev/null 2>/dev/null' % pkg)"], {}), "('/usr/bin/dpkg-query -s %s >/dev/null 2>/dev/null' % pkg)\n", (1144, 1202), False, '...
import json from grafana_backup.dashboardApi import create_folder def main(args, settings, file_path): grafana_url = settings.get('GRAFANA_URL') http_post_headers = settings.get('HTTP_POST_HEADERS') verify_ssl = settings.get('VERIFY_SSL') client_cert = settings.get('CLIENT_CERT') debug = settings....
[ "json.loads", "json.dumps" ]
[((408, 424), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (418, 424), False, 'import json\n'), ((452, 470), 'json.dumps', 'json.dumps', (['folder'], {}), '(folder)\n', (462, 470), False, 'import json\n')]
import matplotlib.pyplot as plt import numpy as np from scipy.optimize import curve_fit from astropy.io import ascii from uncertainties import ufloat import uncertainties.unumpy as unp g = ufloat(9.811899, 0.000041) x, d0, d = np.genfromtxt("Messdaten/c.txt", unpack=True) D = d - d0 x1 = x[0:26] x2 = x[28:52] D1 = D[0...
[ "scipy.optimize.curve_fit", "matplotlib.pyplot.savefig", "astropy.io.ascii.write", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "numpy.diag", "matplotlib.pyplot.tight_layout", "uncertainties.ufloat", "matplotlib.pyplot.xlim", "matpl...
[((189, 214), 'uncertainties.ufloat', 'ufloat', (['(9.811899)', '(4.1e-05)'], {}), '(9.811899, 4.1e-05)\n', (195, 214), False, 'from uncertainties import ufloat\n'), ((228, 273), 'numpy.genfromtxt', 'np.genfromtxt', (['"""Messdaten/c.txt"""'], {'unpack': '(True)'}), "('Messdaten/c.txt', unpack=True)\n", (241, 273), Tru...
# Copyright 2017 Red Hat, Inc. # 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...
[ "mock.patch.object", "mock.Mock", "sushy.main.Sushy" ]
[((869, 925), 'mock.patch.object', 'mock.patch.object', (['connector', '"""Connector"""'], {'autospec': '(True)'}), "(connector, 'Connector', autospec=True)\n", (886, 925), False, 'import mock\n'), ((1986, 2046), 'mock.patch.object', 'mock.patch.object', (['system', '"""SystemCollection"""'], {'autospec': '(True)'}), "...
import unittest import pandas as pd from osu.local.beatmap.beatmapIO import BeatmapIO from analysis.osu.std.map_data import StdMapData class TestStdMapData(unittest.TestCase): @classmethod def setUpClass(cls): cls.beatmap = BeatmapIO.open_beatmap('unit_tests\\maps\\osu\\test\\abraker - unknown (abr...
[ "analysis.osu.std.map_data.StdMapData.get_scorepoint_before", "analysis.osu.std.map_data.StdMapData.end_times", "analysis.osu.std.map_data.StdMapData.get_map_data", "analysis.osu.std.map_data.StdMapData.start_times", "analysis.osu.std.map_data.StdMapData.get_releases", "analysis.osu.std.map_data.StdMapDat...
[((245, 344), 'osu.local.beatmap.beatmapIO.BeatmapIO.open_beatmap', 'BeatmapIO.open_beatmap', (['"""unit_tests\\\\maps\\\\osu\\\\test\\\\abraker - unknown (abraker) [250ms].osu"""'], {}), "(\n 'unit_tests\\\\maps\\\\osu\\\\test\\\\abraker - unknown (abraker) [250ms].osu')\n", (267, 344), False, 'from osu.local.beatm...
import hug from tabulate import tabulate OUTPUT_JSON = "json" OUTPUT_HTML = "html" OUTPUT_TEXT = "text" SUPPORTED_OUTPUTS = [ OUTPUT_JSON, OUTPUT_HTML, OUTPUT_TEXT, ] def get_current_output(response): content_type = response.content_type if response else "" if content_type == hug.output_format....
[ "tabulate.tabulate" ]
[((726, 776), 'tabulate.tabulate', 'tabulate', (['ips'], {'headers': '"""firstrow"""', 'tablefmt': 'format'}), "(ips, headers='firstrow', tablefmt=format)\n", (734, 776), False, 'from tabulate import tabulate\n')]
import os import logging logger = logging.getLogger(__name__) OWNER_ID = os.getenv("OWNER_ID") # ---------------------------------------------------------------------------------------------------------------------- HELPER_SCRIPTS = {} # --------------------------------------------------------------------------------...
[ "logging.getLogger", "os.getenv" ]
[((35, 62), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (52, 62), False, 'import logging\n'), ((74, 95), 'os.getenv', 'os.getenv', (['"""OWNER_ID"""'], {}), "('OWNER_ID')\n", (83, 95), False, 'import os\n')]
import pygame from pygame.locals import * from pygame.sprite import Sprite from enum import Enum class CardSuit(Enum): DIAMONDS = 1 SPADES = 2 HEARTS = 3 CLUBS = 4 class CardAssets(): @staticmethod def load_assets(card_back, scale): CardAssets.scale = scale CardAssets.assets =...
[ "pygame.image.load", "pygame.sprite.Sprite.__init__" ]
[((2378, 2399), 'pygame.sprite.Sprite.__init__', 'Sprite.__init__', (['self'], {}), '(self)\n', (2393, 2399), False, 'from pygame.sprite import Sprite\n'), ((599, 663), 'pygame.image.load', 'pygame.image.load', (["('assets/cards/cardBack_' + card_back + '.png')"], {}), "('assets/cards/cardBack_' + card_back + '.png')\n...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: luisgasco Script to generate a terminology tsv file with concepts of SnomedCT given a list of seed codes. You will get the concept to normaliza clinical entities to controlled vocabularies """ import sys import pandas as pd import networkx as nx import numpy...
[ "networkx.dfs_tree", "networkx.DiGraph", "optparse.OptionParser", "pandas.read_csv" ]
[((2720, 2732), 'networkx.DiGraph', 'nx.DiGraph', ([], {}), '()\n', (2730, 2732), True, 'import networkx as nx\n'), ((3454, 3494), 'networkx.dfs_tree', 'nx.dfs_tree', (['ontology', 'root_concept_code'], {}), '(ontology, root_concept_code)\n', (3465, 3494), True, 'import networkx as nx\n'), ((3713, 3727), 'optparse.Opti...
import xlsxwriter from selenium import webdriver import os class teste_BPA: def __init__(self): self.__pesquisado = '' self.__chrome_options = webdriver.ChromeOptions() self.__chrome_options.add_argument("--start-maximized") self.__caminho_webdriver = r'C:\chromedriver\chro...
[ "selenium.webdriver.Chrome", "selenium.webdriver.ChromeOptions", "os.path.exists", "os.mkdir" ]
[((171, 196), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (194, 196), False, 'from selenium import webdriver\n'), ((1155, 1240), 'selenium.webdriver.Chrome', 'webdriver.Chrome', (['self.__caminho_webdriver'], {'chrome_options': 'self.__chrome_options'}), '(self.__caminho_webdriver, ...
from socket import * import time serverName = '127.0.0.1' serverPort = 12345 clientSocket = socket(AF_INET, SOCK_DGRAM) now = 0 while(1): message = input('Input lowercase sentence>\n') message = message.encode('utf-8') clientSocket.sendto(message, (serverName, serverPort)) modifiedMessage, serverAddre...
[ "time.time_ns" ]
[((363, 377), 'time.time_ns', 'time.time_ns', ([], {}), '()\n', (375, 377), False, 'import time\n')]
"""Base class for a job.""" import os import socket from ndscheduler.corescheduler import utils class JobBase: def __init__(self, job_id, execution_id): self.job_id = job_id self.execution_id = execution_id @classmethod def create_test_instance(cls): """Creates an instance of th...
[ "ndscheduler.corescheduler.utils.get_stacktrace", "socket.gethostname", "os.getpid" ]
[((453, 473), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (471, 473), False, 'import socket\n'), ((488, 499), 'os.getpid', 'os.getpid', ([], {}), '()\n', (497, 499), False, 'import os\n'), ((641, 661), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (659, 661), False, 'import socket\n'),...
# a class for genterating the PDF from fpdf import FPDF class Generate_pdf(): """A way to generate a pdf based on what people select""" def __init__(self, v4, v1, v5, v2, v3, patient_name): self.dosage_type = v1 self.quantity = v4 self.admin_route = v5 self.eat = v2 self.time = v3 self.patient_name = p...
[ "fpdf.FPDF" ]
[((585, 591), 'fpdf.FPDF', 'FPDF', ([], {}), '()\n', (589, 591), False, 'from fpdf import FPDF\n')]
from asyncio import sleep from contextlib import suppress from typing import Optional import glob import os import discord from use_dir import use_dir from .constants import AUDIO_FILES_DIR, PLAY_CMD def _get_files() -> list[str]: with use_dir(AUDIO_FILES_DIR): return glob.glob("*") def _match_track(t...
[ "use_dir.use_dir", "os.path.join", "contextlib.suppress", "asyncio.sleep", "glob.glob" ]
[((244, 268), 'use_dir.use_dir', 'use_dir', (['AUDIO_FILES_DIR'], {}), '(AUDIO_FILES_DIR)\n', (251, 268), False, 'from use_dir import use_dir\n'), ((285, 299), 'glob.glob', 'glob.glob', (['"""*"""'], {}), "('*')\n", (294, 299), False, 'import glob\n'), ((973, 992), 'contextlib.suppress', 'suppress', (['Exception'], {})...
import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm from sklearn.decomposition import FastICA from ..utils.parallel import ParallelBackend, get_backend from ..utils.kde import kde from ..utils.cubic import cubic_spline from ..utils.sobol import multivariate_normal from ..utils.random import ...
[ "numpy.random.default_rng", "numpy.log", "numpy.array", "getdist.plots.getSubplotPlotter", "numpy.isfinite", "scipy.stats.norm.logpdf", "sklearn.decomposition.FastICA", "numpy.mean", "numpy.asarray", "numpy.concatenate", "warnings.warn", "numpy.eye", "numpy.ones", "numpy.std", "matplotli...
[((7215, 7228), 'sklearn.decomposition.FastICA', 'FastICA', ([], {}), '(**io)\n', (7222, 7228), False, 'from sklearn.decomposition import FastICA\n'), ((7466, 7484), 'numpy.mean', 'np.mean', (['x'], {'axis': '(0)'}), '(x, axis=0)\n', (7473, 7484), True, 'import numpy as np\n'), ((7497, 7514), 'numpy.std', 'np.std', (['...
#the code used for the first lesson in how to build a BuyLowSellHigh investment algorithm import pandas as pd import requests #the function to get the individual stock pricing data def get_data_api(stock): """ function calls the IEX API and returns a pandas df of it. Make sure it starts with oldest date ...
[ "pandas.DataFrame" ]
[((698, 785), 'pandas.DataFrame', 'pd.DataFrame', (['data_list'], {'columns': "['date', 'open', 'close', 'low', 'high', 'volume']"}), "(data_list, columns=['date', 'open', 'close', 'low', 'high',\n 'volume'])\n", (710, 785), True, 'import pandas as pd\n')]
import common import numpy as np from utils import iter_proofs from lark.exceptions import UnexpectedCharacters, ParseError from tac_grammar import CFG, TreeBuilder, NonterminalNode, TerminalNode import pdb grammar = CFG(common.tac_grammar, 'tactic_expr') tree_builder = TreeBuilder(grammar) ast_height = [] num_token...
[ "tac_grammar.CFG", "numpy.mean", "tac_grammar.TreeBuilder", "utils.iter_proofs" ]
[((219, 257), 'tac_grammar.CFG', 'CFG', (['common.tac_grammar', '"""tactic_expr"""'], {}), "(common.tac_grammar, 'tactic_expr')\n", (222, 257), False, 'from tac_grammar import CFG, TreeBuilder, NonterminalNode, TerminalNode\n'), ((273, 293), 'tac_grammar.TreeBuilder', 'TreeBuilder', (['grammar'], {}), '(grammar)\n', (2...
import cgi import logging from normality import slugify from followthemoney import model from followthemoney.types import registry from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.orm.attributes import flag_modified from aleph.core import db, cache from aleph.model.metadata import Metadata from aleph.m...
[ "logging.getLogger", "aleph.model.document_tag.DocumentTag.MAPPING.keys", "aleph.core.db.Column", "cgi.parse_header", "aleph.core.db.ForeignKey", "aleph.core.db.session.query", "sqlalchemy.orm.attributes.flag_modified", "aleph.model.document_record.DocumentRecord.index.asc", "followthemoney.model.ge...
[((543, 570), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (560, 570), False, 'import logging\n'), ((1078, 1120), 'aleph.core.db.Column', 'db.Column', (['db.BigInteger'], {'primary_key': '(True)'}), '(db.BigInteger, primary_key=True)\n', (1087, 1120), False, 'from aleph.core import db, ...
import threading from data import config import method from script.x_developer import developer_tools class interface(threading.Thread): scriptLibrary = None; developerTools = None; SCA = [ "ONLINE", "OFFLINE", ]; TERMINAL_COMMAND = [ "sca.exit", ...
[ "method.method", "threading.Thread.__init__", "script.x_developer.developer_tools.developer_tools" ]
[((2263, 2278), 'method.method', 'method.method', ([], {}), '()\n', (2276, 2278), False, 'import method\n'), ((2311, 2344), 'script.x_developer.developer_tools.developer_tools', 'developer_tools.developer_tools', ([], {}), '()\n', (2342, 2344), False, 'from script.x_developer import developer_tools\n'), ((2355, 2386), ...
# pylint: disable-msg=W0611, W0612, W0511,R0201 """Tests suite for MaskedArray. Adapted from the original test_ma by <NAME> :author: <NAME> & <NAME> :contact: pierregm_at_uga_dot_edu & mattknox_ca_at_hotmail_dot_com :version: $Id: test_timeseries.py 3836 2008-01-15 13:09:03Z <EMAIL> $ """ __author__ = "<NAME> & <NAME>...
[ "numpy.sqrt", "numpy.random.rand", "scikits.timeseries.date_array", "scikits.timeseries.TimeSeriesError", "numpy.ma.column_stack", "numpy.column_stack", "numpy.ma.sqrt", "numpy.array", "scikits.timeseries.last_unmasked_val", "scikits.timeseries.align_series", "copy.deepcopy", "numpy.arange", ...
[((1408, 1435), 'scikits.timeseries.date_array', 'date_array', (['dlist'], {'freq': '"""D"""'}), "(dlist, freq='D')\n", (1418, 1435), False, 'from scikits.timeseries import TimeSeries, TimeSeriesError, TimeSeriesCompatibilityError, tseries, Date, date_array, now, time_series, adjust_endpoints, align_series, align_with,...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
[ "numpy.sqrt", "iris.cube.CubeList", "numpy.ones", "iris.coords.DimCoord", "numpy.array", "numpy.linspace", "numpy.zeros", "improver.wind_calculations.wind_components.ResolveWindComponents", "unittest.main", "iris.coord_systems.OSGB" ]
[((2334, 2379), 'numpy.linspace', 'np.linspace', (['(150000)', '(250000)', 'data_2d.shape[1]'], {}), '(150000, 250000, data_2d.shape[1])\n', (2345, 2379), True, 'import numpy as np\n'), ((2445, 2485), 'numpy.linspace', 'np.linspace', (['(0)', '(600000)', 'data_2d.shape[0]'], {}), '(0, 600000, data_2d.shape[0])\n', (245...
import logging import sys import time import datetime import json class Borg: """Borg Pattern by <NAME>. Like a Singleton but maybe more elegant, all instances of this class will have the same internal state""" _shared_state = {} def __init__(self): self.__dict__ = self._shared_state clas...
[ "logging.getLogger", "logging.StreamHandler", "datetime.datetime.fromtimestamp", "logging.debug", "logging.Formatter", "json.dumps", "time.time" ]
[((901, 912), 'time.time', 'time.time', ([], {}), '()\n', (910, 912), False, 'import time\n'), ((960, 971), 'time.time', 'time.time', ([], {}), '()\n', (969, 971), False, 'import time\n'), ((1295, 1306), 'time.time', 'time.time', ([], {}), '()\n', (1304, 1306), False, 'import time\n'), ((534, 553), 'logging.getLogger',...
#!/usr/bin/env python3 # @generated AUTOGENERATED file. Do not Change! from dataclasses import dataclass, field from datetime import datetime from enum import Enum from functools import partial from typing import Any, Callable, List, Mapping, Optional from dataclasses_json import dataclass_json from marshmallow impor...
[ "marshmallow.fields.DateTime" ]
[((570, 611), 'marshmallow.fields.DateTime', 'marshmallow_fields.DateTime', ([], {'format': '"""iso"""'}), "(format='iso')\n", (597, 611), True, 'from marshmallow import fields as marshmallow_fields\n')]
# Copyright 2018 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ "json_database.JsonStorage", "time.sleep", "ovos_utils.system.ssh_enable", "pytz.timezone", "threading.Lock", "astral.Location", "mycroft.configuration.config.Configuration.get", "subprocess.call", "ovos_utils.system.system_shutdown", "mycroft.intent_handler", "time.monotonic", "mycroft.api.is...
[((23039, 23074), 'mycroft.intent_handler', 'intent_handler', (['"""brightness.intent"""'], {}), "('brightness.intent')\n", (23053, 23074), False, 'from mycroft import MycroftSkill, intent_handler\n'), ((25946, 25986), 'mycroft.intent_handler', 'intent_handler', (['"""brightness.auto.intent"""'], {}), "('brightness.aut...
from dataclasses import dataclass from typing import Any, Literal, Optional from aiohttp import ClientSession @dataclass class Response: status: int body: Any class Request: def __init__(self, client_session: Optional[ClientSession] = None) -> None: self.client_session = client_session asy...
[ "aiohttp.ClientSession" ]
[((669, 684), 'aiohttp.ClientSession', 'ClientSession', ([], {}), '()\n', (682, 684), False, 'from aiohttp import ClientSession\n')]
import argparse from utils.distributions import RandInt, Uniform from functions.mnist import MLPWithMNIST import numpy as np import os import datetime from hyperband import Hyperband from utils import plot_util import time import pandas as pd def get_path_with_time(alg_name): time_name = str(datetime.datetime.now...
[ "utils.plot_util.plot_separately", "argparse.ArgumentParser", "os.makedirs", "utils.distributions.Uniform", "datetime.datetime.now", "numpy.random.randint", "os.path.isdir", "pandas.DataFrame", "time.time", "hyperband.Hyperband", "utils.distributions.RandInt" ]
[((799, 832), 'numpy.random.randint', 'np.random.randint', (['(0)', '(2 ** 32 - 1)'], {}), '(0, 2 ** 32 - 1)\n', (816, 832), True, 'import numpy as np\n'), ((1070, 1130), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Hyperband main script"""'}), "(description='Hyperband main script')\n"...
import numpy as np import numpy.matlib from ..core import Agent class FPSP(Agent): """ Fast Periodic Switching between high and low beta policy. Implementation of https://robertshorten.files.wordpress.com/2020/03/fpsr_title.pdf Agent returns [0, ... suppression start]: beta_high ...
[ "numpy.array", "numpy.zeros", "numpy.vstack", "numpy.maximum", "numpy.mod" ]
[((3017, 3028), 'numpy.array', 'np.array', (['x'], {}), '(x)\n', (3025, 3028), True, 'import numpy as np\n'), ((4315, 4347), 'numpy.mod', 'np.mod', (['cycle_step', 'cycle_length'], {}), '(cycle_step, cycle_length)\n', (4321, 4347), True, 'import numpy as np\n'), ((5523, 5534), 'numpy.array', 'np.array', (['x'], {}), '(...
# Copyright 2019 NREL # 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...
[ "numpy.abs", "numpy.sqrt", "numpy.polyfit", "numpy.min", "numpy.diff", "scipy.interpolate.interp1d", "numpy.max", "datetime.datetime.now", "numpy.deg2rad", "numpy.array", "numpy.cos", "numpy.concatenate", "sys.exit", "numpy.sin", "numpy.maximum", "numpy.rad2deg", "numpy.zeros_like", ...
[((731, 754), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (752, 754), False, 'import datetime\n'), ((776, 789), 'numpy.rad2deg', 'np.rad2deg', (['(1)'], {}), '(1)\n', (786, 789), True, 'import numpy as np\n'), ((800, 813), 'numpy.deg2rad', 'np.deg2rad', (['(1)'], {}), '(1)\n', (810, 813), True, ...
""" Submit documents to a workflow, auto review them and submit them for human review """ from indico_toolkit import auto_review from indico_toolkit.auto_review import ( ReviewConfiguration, AutoReviewer, ) from indico_toolkit.indico_wrapper import Workflow from indico_toolkit import create_client WORKFLOW_ID...
[ "indico_toolkit.create_client", "indico_toolkit.auto_review.ReviewConfiguration", "indico_toolkit.indico_wrapper.Workflow", "indico_toolkit.auto_review.AutoReviewer" ]
[((460, 495), 'indico_toolkit.create_client', 'create_client', (['HOST', 'API_TOKEN_PATH'], {}), '(HOST, API_TOKEN_PATH)\n', (473, 495), False, 'from indico_toolkit import create_client\n'), ((504, 520), 'indico_toolkit.indico_wrapper.Workflow', 'Workflow', (['client'], {}), '(client)\n', (512, 520), False, 'from indic...
import numpy as np import pyaudio import time, sys, math from collections import deque from src.utils import * class Stream_Reader: """ The Stream_Reader continuously reads data from a selected sound source using PyAudio Arguments: device: int or None: Select which audio stream to read . ...
[ "collections.deque", "sys.exit", "numpy.frombuffer", "pyaudio.PyAudio", "time.time" ]
[((712, 729), 'pyaudio.PyAudio', 'pyaudio.PyAudio', ([], {}), '()\n', (727, 729), False, 'import pyaudio\n'), ((1348, 1364), 'collections.deque', 'deque', ([], {'maxlen': '(20)'}), '(maxlen=20)\n', (1353, 1364), False, 'from collections import deque\n'), ((3414, 3425), 'time.time', 'time.time', ([], {}), '()\n', (3423,...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # Copyright (c) 2018-2019 NVIDIA CORPORATION. All rights reserved. import torch from torch.nn import functional as F from maskrcnn_benchmark.layers import smooth_l1_loss from maskrcnn_benchmark.structures.bounding_box import BoxList from maskrcnn_...
[ "maskrcnn_benchmark.structures.boxlist_ops.boxlist_iou", "maskrcnn_benchmark.modeling.balanced_positive_negative_sampler.BalancedPositiveNegativeSampler", "torch.nn.utils.rnn.pad_sequence", "maskrcnn_benchmark.modeling.box_coder.BoxCoder", "maskrcnn_benchmark.layers.smooth_l1_loss", "torch.cuda.nvtx.range...
[((11333, 11454), 'maskrcnn_benchmark.modeling.matcher.Matcher', 'Matcher', (['cfg.MODEL.ROI_HEADS.FG_IOU_THRESHOLD', 'cfg.MODEL.ROI_HEADS.BG_IOU_THRESHOLD'], {'allow_low_quality_matches': '(False)'}), '(cfg.MODEL.ROI_HEADS.FG_IOU_THRESHOLD, cfg.MODEL.ROI_HEADS.\n BG_IOU_THRESHOLD, allow_low_quality_matches=False)\n...
from app import db class Verify(db.Model): __tablename__ = 'verifies' num = db.Column(db.Integer, nullable=False) url = db.Column(db.String(20), nullable=False) uid = db.Column(db.Integer, nullable=False, primary_key=True) def __init__(self, _num, _url, _uid): self.num = _num self....
[ "app.db.String", "app.db.Column" ]
[((85, 122), 'app.db.Column', 'db.Column', (['db.Integer'], {'nullable': '(False)'}), '(db.Integer, nullable=False)\n', (94, 122), False, 'from app import db\n'), ((184, 239), 'app.db.Column', 'db.Column', (['db.Integer'], {'nullable': '(False)', 'primary_key': '(True)'}), '(db.Integer, nullable=False, primary_key=True...
""" Test suite module for ``XGBoost``. Credits ------- :: Authors: - Diptesh - Madhu Date: Sep 27, 2021 """ # pylint: disable=invalid-name # pylint: disable=wrong-import-position import unittest import warnings import re import sys from inspect import getsourcefile from os.path import absp...
[ "inspect.getsourcefile", "sys.path.insert", "pandas.read_csv", "sklearn.model_selection.train_test_split", "warnings.catch_warnings", "mllib.lib.tree.XGBoost", "sklearn.metrics.mean_squared_error", "warnings.simplefilter", "mllib.lib.tree.RandomForest", "pandas.read_excel", "unittest.main", "r...
[((515, 554), 're.sub', 're.sub', (['"""(.+)(\\\\/tests.*)"""', '"""\\\\1"""', 'path'], {}), "('(.+)(\\\\/tests.*)', '\\\\1', path)\n", (521, 554), False, 'import re\n'), ((556, 580), 'sys.path.insert', 'sys.path.insert', (['(0)', 'path'], {}), '(0, path)\n', (571, 580), False, 'import sys\n'), ((482, 507), 'inspect.ge...
# <NAME> 25/09/18 import datetime today = datetime.datetime.today() dayofweek = today.weekday() if dayofweek == 1: print("It's Tuesday!") else: print("Unfortunately, it's not Tuesday.")
[ "datetime.datetime.today" ]
[((46, 71), 'datetime.datetime.today', 'datetime.datetime.today', ([], {}), '()\n', (69, 71), False, 'import datetime\n')]