code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import math import numpy as np def relu(pixel_vals, bias=0): '''Takes tuple (r,g,b) and returns the relu transformation. For use within each individual node in a dense layer before being passed onto the next layer bias 0'ed out by default ''' return (pixel_vals * (pixel_vals > 0) + bias,) def sigm...
[ "numpy.exp", "numpy.tanh" ]
[((598, 617), 'numpy.tanh', 'np.tanh', (['pixel_vals'], {}), '(pixel_vals)\n', (605, 617), True, 'import numpy as np\n'), ((439, 458), 'numpy.exp', 'np.exp', (['(-pixel_vals)'], {}), '(-pixel_vals)\n', (445, 458), True, 'import numpy as np\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- # import web import time from bson.objectid import ObjectId from config import setting import helper db = setting.db_web # 问题帖子,可跟贴,原问题/状态修改 只限 提交人和处理人,其他人可 跟帖 写意见 url = ('/ticket/thread') class handler: def GET(self): if not helper.logged(helper.PRIV_USER...
[ "helper.logged", "bson.objectid.ObjectId", "web.seeother", "helper.create_render", "web.input", "helper.get_session_uname", "helper.get_privilege_name" ]
[((390, 412), 'helper.create_render', 'helper.create_render', ([], {}), '()\n', (410, 412), False, 'import helper\n'), ((433, 456), 'web.input', 'web.input', ([], {'ticket_id': '""""""'}), "(ticket_id='')\n", (442, 456), False, 'import web\n'), ((290, 334), 'helper.logged', 'helper.logged', (['helper.PRIV_USER', '"""TI...
import lxml import requests from urllib.request import urlopen import re #import urllib.request import time from bs4 import BeautifulSoup import pandas as pd links=[] url="http://dspace-roma3.caspur.it/handle/2307/729/browse?type=dateissued&sort_by=2&order=ASC&rpp=100&etal=5&year=-1&month=-1&starts_with=1970" page = ...
[ "bs4.BeautifulSoup", "urllib.request.urlopen" ]
[((320, 332), 'urllib.request.urlopen', 'urlopen', (['url'], {}), '(url)\n', (327, 332), False, 'from urllib.request import urlopen\n'), ((340, 374), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page', '"""html.parser"""'], {}), "(page, 'html.parser')\n", (353, 374), False, 'from bs4 import BeautifulSoup\n')]
from dzTrafico.BusinessEntities.Simulation import Simulation from NetworkManager import NetworkManager from dzTrafico.BusinessLayer.TrafficAnalysis.LaneChangeControlAlgo import LaneChange from TripManager import TripManager from dzTrafico.BusinessLayer.SimulationCreation.SensorsManager import SensorsManager from dzTraf...
[ "dzTrafico.BusinessLayer.SimulationCreation.SensorsManager.SensorsManager", "TripManager.TripManager", "NetworkManager.NetworkManager", "dzTrafico.BusinessEntities.Simulation.Simulation" ]
[((403, 415), 'dzTrafico.BusinessEntities.Simulation.Simulation', 'Simulation', ([], {}), '()\n', (413, 415), False, 'from dzTrafico.BusinessEntities.Simulation import Simulation\n'), ((439, 455), 'NetworkManager.NetworkManager', 'NetworkManager', ([], {}), '()\n', (453, 455), False, 'from NetworkManager import Network...
from datetime import datetime import requests from st2reactor.sensor.base import PollingSensor from typing import Mapping class LibreNMSBasePollingSensor(PollingSensor): api_key: str = None api_root: str = None api_call: str = None ssl_verify: bool = None method: str = None params: Mapping[st...
[ "datetime.datetime.now" ]
[((899, 913), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (911, 913), False, 'from datetime import datetime\n'), ((1746, 1760), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1758, 1760), False, 'from datetime import datetime\n')]
import io import unittest from contextlib import redirect_stdout import solution class TestQ(unittest.TestCase): def test_case_0(self): text_trap = io.StringIO() with redirect_stdout(text_trap): html = '<!--[if IE 9]>IE9-specific content\n' + \ '<![endif]-->\n' + \ ...
[ "unittest.main", "io.StringIO", "solution.MyHTMLParser", "contextlib.redirect_stdout" ]
[((980, 995), 'unittest.main', 'unittest.main', ([], {}), '()\n', (993, 995), False, 'import unittest\n'), ((163, 176), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (174, 176), False, 'import io\n'), ((190, 216), 'contextlib.redirect_stdout', 'redirect_stdout', (['text_trap'], {}), '(text_trap)\n', (205, 216), False...
from pluto.data.traffic.download.executors.executor import _RequestExecutor from pluto.data.traffic.download.request import EquityRequest from datetime import datetime,date import math import quandl class _Quandl(_RequestExecutor): def __init__(self, api_key, requests_counter, name=None): super(_Quandl,self).__init...
[ "math.ceil", "math.floor" ]
[((1312, 1324), 'math.ceil', 'math.ceil', (['n'], {}), '(n)\n', (1321, 1324), False, 'import math\n'), ((1343, 1356), 'math.floor', 'math.floor', (['n'], {}), '(n)\n', (1353, 1356), False, 'import math\n')]
import operator from typing import List import torch from torch.fx import GraphModule import mqbench.nn.qat as qnnqat from mqbench.utils.logger import logger from mqbench.utils.registry import register_model_quantizer from mqbench.prepare_by_platform import BackendType from mqbench.custom_quantizer import ModelQuanti...
[ "pdb.set_trace", "mqbench.utils.registry.register_model_quantizer" ]
[((3245, 3295), 'mqbench.utils.registry.register_model_quantizer', 'register_model_quantizer', (['BackendType.Tensorrt_NLP'], {}), '(BackendType.Tensorrt_NLP)\n', (3269, 3295), False, 'from mqbench.utils.registry import register_model_quantizer\n'), ((5994, 6009), 'pdb.set_trace', 'pdb.set_trace', ([], {}), '()\n', (60...
from rescore import * import pandas as pd import time import glob def get_score(schrodinger=SCHRODINGER): jobs = [] for folder in glob.glob("*/"): with cd(folder): log = glob.glob("*.log")[0] inputpdb = glob.glob("*.pdb")[0] inputglide = glob.glob("*.in")[0] ...
[ "pandas.DataFrame", "time.sleep", "glob.glob" ]
[((142, 157), 'glob.glob', 'glob.glob', (['"""*/"""'], {}), "('*/')\n", (151, 157), False, 'import glob\n'), ((1074, 1122), 'pandas.DataFrame', 'pd.DataFrame', (["{'paths': paths, 'scores': scores}"], {}), "({'paths': paths, 'scores': scores})\n", (1086, 1122), True, 'import pandas as pd\n'), ((202, 220), 'glob.glob', ...
import os import pandas as pd from numpy.random import default_rng def create_sample( input_file="../../classes_input/test_input.csv", output_file=None, percentage_sample=25, exclude_samples=None, ): if not output_file: exclude = "" if exclude_samples: excluded_names = ...
[ "pandas.unique", "numpy.random.default_rng", "pandas.read_csv", "os.path.basename" ]
[((700, 713), 'numpy.random.default_rng', 'default_rng', ([], {}), '()\n', (711, 713), False, 'from numpy.random import default_rng\n'), ((730, 753), 'pandas.read_csv', 'pd.read_csv', (['input_file'], {}), '(input_file)\n', (741, 753), True, 'import pandas as pd\n'), ((772, 803), 'pandas.unique', 'pd.unique', (["input_...
import pygame from pygame.surface import Surface from util import Rect, Point from util.collisions import rect_contains_point from util.colors import WHITE from . import GameObject class Goal(GameObject): _area: Rect def __init__(self, *, area: Rect): self._area = area def draw_to(self, draw_ta...
[ "pygame.draw.rect", "util.collisions.rect_contains_point" ]
[((344, 392), 'pygame.draw.rect', 'pygame.draw.rect', (['draw_target', 'WHITE', 'self._area'], {}), '(draw_target, WHITE, self._area)\n', (360, 392), False, 'import pygame\n'), ((451, 489), 'util.collisions.rect_contains_point', 'rect_contains_point', (['self._area', 'point'], {}), '(self._area, point)\n', (470, 489), ...
# Copyright 2017 The Johns Hopkins University Applied Physics Laboratory # # 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 ...
[ "requests.post", "requests.get", "requests.delete", "subprocess.call", "intern.service.service.Service.__init__" ]
[((851, 873), 'intern.service.service.Service.__init__', 'Service.__init__', (['self'], {}), '(self)\n', (867, 873), False, 'from intern.service.service import Service\n'), ((3054, 3087), 'requests.get', 'requests.get', (["(api + '/api/server')"], {}), "(api + '/api/server')\n", (3066, 3087), False, 'import requests\n'...
import sys import argparse import math from collections import defaultdict reset_report = None def print_usage(name, input_file): print(f"Usage: python3 {name} {input_file}") def load_inputs(input_file): global reset_report report = [] if reset_report is not None: report = reset_report.copy...
[ "argparse.FileType", "collections.defaultdict", "argparse.ArgumentParser" ]
[((1558, 1574), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (1569, 1574), False, 'from collections import defaultdict\n'), ((2183, 2239), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""compute qustions."""'}), "(description='compute qustions.')\n", (2206, 2239), F...
from app.tests import set_up import unittest import json class TestTravel(unittest.TestCase): def setUp(self): self.app = set_up.app.test_client() self.notFoundMessage = 'This travel does not exists!' self.id = '' response = self.app.get('/api/users') responseData = json.l...
[ "app.tests.set_up.app.test_client" ]
[((136, 160), 'app.tests.set_up.app.test_client', 'set_up.app.test_client', ([], {}), '()\n', (158, 160), False, 'from app.tests import set_up\n')]
from django.dispatch import Signal language_changed = Signal(providing_args=['request', 'lang'])
[ "django.dispatch.Signal" ]
[((55, 97), 'django.dispatch.Signal', 'Signal', ([], {'providing_args': "['request', 'lang']"}), "(providing_args=['request', 'lang'])\n", (61, 97), False, 'from django.dispatch import Signal\n')]
from gmtpy import GMT gmt = GMT( config={'BASEMAP_TYPE':'fancy'}) gmt.pscoast( R='5/15/52/58', # region J='B10/55/55/60/10c', # projection B='4g4', # grid D='f', # resolution S=(114,159,207), # wet fill color G=(2...
[ "gmtpy.GMT" ]
[((29, 66), 'gmtpy.GMT', 'GMT', ([], {'config': "{'BASEMAP_TYPE': 'fancy'}"}), "(config={'BASEMAP_TYPE': 'fancy'})\n", (32, 66), False, 'from gmtpy import GMT\n')]
# Author: <NAME> # Created: 2021-05-14 # Copyright (C) 2021, <NAME> # License: MIT # Expand an image, adding a 40 pixel border from PIL import Image, ImageOps image = Image.open('boat-small.jpg') result_image = ImageOps.expand(image, 40, 'yellow') result_image.save('imageops-expand-40.jpg')
[ "PIL.Image.open", "PIL.ImageOps.expand" ]
[((171, 199), 'PIL.Image.open', 'Image.open', (['"""boat-small.jpg"""'], {}), "('boat-small.jpg')\n", (181, 199), False, 'from PIL import Image, ImageOps\n'), ((215, 251), 'PIL.ImageOps.expand', 'ImageOps.expand', (['image', '(40)', '"""yellow"""'], {}), "(image, 40, 'yellow')\n", (230, 251), False, 'from PIL import Im...
from datetime import datetime import unittest from flight_tables.flight_parsing import Flight, ParsedFlights class SampleData(object): def __init__(self): self.test_flight_departed_1 = {'actual_datetime': datetime(2020, 1, 30, 15, 15), 'code_share_type': 'mai...
[ "datetime.datetime", "flight_tables.flight_parsing.ParsedFlights", "flight_tables.flight_parsing.Flight", "flight_tables.flight_parsing.Flight.labels", "unittest.main", "flight_tables.flight_parsing.Flight.calculate_delay_minutes" ]
[((5277, 5292), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5290, 5292), False, 'import unittest\n'), ((2468, 2495), 'datetime.datetime', 'datetime', (['(2020)', '(2)', '(2)', '(7)', '(30)'], {}), '(2020, 2, 2, 7, 30)\n', (2476, 2495), False, 'from datetime import datetime\n'), ((2518, 2545), 'datetime.datetim...
#!/usr/bin/env python3 # # (c) 2017 Fetal-Neonatal Neuroimaging & Developmental Science Center # Boston Children's Hospital # # http://childrenshospital.org/FNNDSC/ # <EMAIL> # from argparse import RawTextHelpFormatter from argparse im...
[ "json.dump", "json.dumps", "pfmisc.debug", "argparse.ArgumentParser" ]
[((10721, 10795), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': 'str_desc', 'formatter_class': 'RawTextHelpFormatter'}), '(description=str_desc, formatter_class=RawTextHelpFormatter)\n', (10735, 10795), False, 'from argparse import ArgumentParser\n'), ((2129, 2199), 'pfmisc.debug', 'pfmisc.debug', (...
# -*- coding: utf-8 -*- """ Created on Tue Mar 24 16:32:08 2020 @author: LionelMassoulard """ import numpy as np import pandas as pd from sklearn.base import BaseEstimator, ClassifierMixin, RegressorMixin, is_classifier, is_regressor from sklearn.preprocessing import OrdinalEncoder, KBinsDiscretizer from aikit.too...
[ "numpy.abs", "sklearn.preprocessing.KBinsDiscretizer", "sklearn.base.is_classifier", "pandas.DataFrame", "numpy.exp", "aikit.tools.data_structure_helper.make2dimensions", "numpy.dot", "numpy.concatenate", "sklearn.base.is_regressor", "aikit.tools.data_structure_helper.convert_generic" ]
[((4998, 5030), 'numpy.exp', 'np.exp', (['(-d / self.kernel_windows)'], {}), '(-d / self.kernel_windows)\n', (5004, 5030), True, 'import numpy as np\n'), ((6238, 6294), 'aikit.tools.data_structure_helper.convert_generic', 'convert_generic', (['y_int'], {'output_type': 'DataTypes.NumpyArray'}), '(y_int, output_type=Data...
""" <name>image</name> <tags>Plotting</tags> <icon>plot.png</icon> """ from OWRpy import * import redRGUI, signals import redRGUI class image(OWRpy): globalSettingsList = ['commitButton'] def __init__(self, **kwargs): OWRpy.__init__(self, **kwargs) self.RFunctionParam_x = '' ...
[ "redRGUI.base.graphicsView", "redRGUI.base.commitButton" ]
[((421, 506), 'redRGUI.base.graphicsView', 'redRGUI.base.graphicsView', (['self.controlArea'], {'label': '"""Heatmap"""', 'displayLabel': '(False)'}), "(self.controlArea, label='Heatmap', displayLabel=False\n )\n", (446, 506), False, 'import redRGUI\n'), ((530, 643), 'redRGUI.base.commitButton', 'redRGUI.base.commit...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Setup script for pepa ''' from setuptools import setup, find_packages import sys, os CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apac...
[ "setuptools.find_packages" ]
[((946, 990), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['examples', 'tests']"}), "(exclude=['examples', 'tests'])\n", (959, 990), False, 'from setuptools import setup, find_packages\n')]
# Simple request-reply broker # # Author: <NAME> <lev(at)columbia(dot)edu> import zmq # Prepare our context and sockets context = zmq.Context() frontend = context.socket(zmq.ROUTER) backend = context.socket(zmq.DEALER) frontend.bind("tcp://127.0.0.1:5559") backend.bind("tcp://127.0.0.1:5560") # Initialize poll set p...
[ "zmq.Poller", "zmq.Context" ]
[((132, 145), 'zmq.Context', 'zmq.Context', ([], {}), '()\n', (143, 145), False, 'import zmq\n'), ((328, 340), 'zmq.Poller', 'zmq.Poller', ([], {}), '()\n', (338, 340), False, 'import zmq\n')]
import logging import numpy as np from typing import Dict, List, Tuple from transformers import PreTrainedTokenizer from transformers.tokenization_utils_base import BatchEncoding class RstPreprocessor: """ Class for preprocessing a list of raw texts to a batch of tensors. """ def __init__( ...
[ "allennlp.modules.elmo.batch_to_ids", "logging.warning" ]
[((1890, 1923), 'allennlp.modules.elmo.batch_to_ids', 'batch_to_ids', (['tokenized_sentences'], {}), '(tokenized_sentences)\n', (1902, 1923), False, 'from allennlp.modules.elmo import batch_to_ids\n'), ((626, 681), 'logging.warning', 'logging.warning', (['"""The package "nltk" is not installed!"""'], {}), '(\'The packa...
import requests from bs4 import BeautifulSoup def get_lyrics(song_title): """ Returns lyrics for a passed in song title. """ with requests.session() as c: url = r"https://search.azlyrics.com/search.php?" query = {"q": song_title} r = requests.get(url, params=query) so...
[ "bs4.BeautifulSoup", "requests.session", "requests.get" ]
[((148, 166), 'requests.session', 'requests.session', ([], {}), '()\n', (164, 166), False, 'import requests\n'), ((277, 308), 'requests.get', 'requests.get', (['url'], {'params': 'query'}), '(url, params=query)\n', (289, 308), False, 'import requests\n'), ((325, 364), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.content'...
################################################################################################### # Project : Global Challenges Research Fund (GCRF) African SWIFT (Science for Weather # Information and Forecasting Techniques. # # Program name : dewpoint_HL.py # # Author ...
[ "Ngl.open_wks", "numpy.log", "Ngl.frame", "Ngl.contour", "sys.exit", "Ngl.destroy", "Ngl.read_colormap_file", "numpy.where", "numpy.exp", "os.popen", "Ngl.draw", "numpy.concatenate", "numpy.abs", "Ngl.contour_map", "Ngl.Resources", "numpy.sign", "Ngl.maximize_plot", "numpy.int", ...
[((4047, 4075), 'Nio.open_file', 'nio.open_file', (['(diri + a_fili)'], {}), '(diri + a_fili)\n', (4060, 4075), True, 'import Nio as nio\n'), ((7688, 7731), 'numpy.where', 'np.where', (['(temp > 273.15)', '(17.08085)', '(17.84362)'], {}), '(temp > 273.15, 17.08085, 17.84362)\n', (7696, 7731), True, 'import numpy as np\...
# -*- coding: utf-8 -*- ######################################################################### ## This scaffolding model makes your app work on Google App Engine too ######################################################################### if request.env.web2py_runtime_gae: # if running on Google...
[ "datetime.datetime.now" ]
[((3566, 3589), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (3587, 3589), False, 'import datetime\n')]
#!/usr/bin/env python3 from itertools import chain from collections import Counter import unittest def char_counter(text): return ''.join(chain(*[[key, str(total)] for key, total in Counter(text).items()])) class Test(unittest.TestCase): def test1(self): input = "GOOGLE" output = "G2O2L1E...
[ "unittest.main", "collections.Counter" ]
[((682, 697), 'unittest.main', 'unittest.main', ([], {}), '()\n', (695, 697), False, 'import unittest\n'), ((189, 202), 'collections.Counter', 'Counter', (['text'], {}), '(text)\n', (196, 202), False, 'from collections import Counter\n')]
import errno import os import random import socket import time import unittest import docker.client from sourced.ml.core.utils.bblfsh import BBLFSH_VERSION_HIGH, BBLFSH_VERSION_LOW, check_version @unittest.skipIf(os.getenv("SKIP_BBLFSH_UTILS_TESTS", False), "Skip ml_core.utils.bblfsh tests.") class BblfshUtilsTests...
[ "socket.socket", "os.getenv", "sourced.ml.core.utils.bblfsh.check_version", "time.sleep", "unittest.main", "random.randint" ]
[((217, 260), 'os.getenv', 'os.getenv', (['"""SKIP_BBLFSH_UTILS_TESTS"""', '(False)'], {}), "('SKIP_BBLFSH_UTILS_TESTS', False)\n", (226, 260), False, 'import os\n'), ((2590, 2605), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2603, 2605), False, 'import unittest\n'), ((961, 976), 'socket.socket', 'socket.socke...
import requests url = "https://awm16002.srv.wifi.arista.com/new/webservice/login/modScanWifi/86400" payload = "{\n\"type\":\"apikeycredentials\",\n\"keyId\":\"KEY-ATN565039-674\",\n\"keyValue\":\"16d7b32456a7700568d359fa452818bd\"\n}" headers = { 'Content-Type': "application/json", 'cache-control': "no-cache"...
[ "time.time", "requests.request", "pandas.read_csv" ]
[((369, 429), 'requests.request', 'requests.request', (['"""POST"""', 'url'], {'data': 'payload', 'headers': 'headers'}), "('POST', url, data=payload, headers=headers)\n", (385, 429), False, 'import requests\n'), ((1080, 1126), 'requests.request', 'requests.request', (['"""GET"""', 'url'], {'headers': 'headers1'}), "('...
""" Helper methods for use during the i18n sync process """ import django.apps from django.conf import settings from django.template.base import TemplateDoesNotExist from django.utils.translation import to_locale from django_slack import slack_message from i18n.models import Internationalizable CHANGES_JSON = "/tmp...
[ "django_slack.slack_message", "django.utils.translation.to_locale" ]
[((1987, 2011), 'django.utils.translation.to_locale', 'to_locale', (['language_code'], {}), '(language_code)\n', (1996, 2011), False, 'from django.utils.translation import to_locale\n'), ((2365, 2423), 'django_slack.slack_message', 'slack_message', (['"""slack/message.slack"""', "{'message': message}"], {}), "('slack/m...
from machine import I2C, Pin # Create an I2C object i2c = I2C(0, sda = Pin(19), scl = Pin(18)) address = i2c.scan() # list # Scan for devices print('Address:', hex(address[0]))
[ "machine.Pin" ]
[((72, 79), 'machine.Pin', 'Pin', (['(19)'], {}), '(19)\n', (75, 79), False, 'from machine import I2C, Pin\n'), ((87, 94), 'machine.Pin', 'Pin', (['(18)'], {}), '(18)\n', (90, 94), False, 'from machine import I2C, Pin\n')]
import numpy as np from gurobipy import * # Author: <NAME> # Date: 2020-04-01 def get_approx_planes(P0, B, D, p_min, p_max, Relaxed=False): # Return the approximation plane # with the constraint pt' B pt + b' pt + c = 0 # # P0 should be feasible # Gurobipy is imported via * mod ...
[ "numpy.dot", "numpy.ones", "numpy.linalg.norm" ]
[((485, 499), 'numpy.ones', 'np.ones', (['n_gen'], {}), '(n_gen)\n', (492, 499), True, 'import numpy as np\n'), ((1308, 1325), 'numpy.linalg.norm', 'np.linalg.norm', (['n'], {}), '(n)\n', (1322, 1325), True, 'import numpy as np\n'), ((1754, 1766), 'numpy.dot', 'np.dot', (['n', 'x'], {}), '(n, x)\n', (1760, 1766), True,...
#!/usr/bin/env python3 """ Build lightweight slims from curie lists. Used for sources that don't have an owl ontology floating. """ #TODO consider using some of the code from scr_sync.py??? from pathlib import Path import requests from pyontutils.core import createOntology from pyontutils.utils import chunk_li...
[ "pyontutils.utils.chunk_list", "requests.post", "pyontutils.config.auth.get_path", "pyontutils.namespaces.makePrefixes" ]
[((1845, 1871), 'pyontutils.config.auth.get_path', 'auth.get_path', (['"""resources"""'], {}), "('resources')\n", (1858, 1871), False, 'from pyontutils.config import auth\n'), ((2452, 2472), 'pyontutils.utils.chunk_list', 'chunk_list', (['ids', '(100)'], {}), '(ids, 100)\n', (2462, 2472), False, 'from pyontutils.utils ...
""" eval auc curve """ import matplotlib.pyplot as plt import numpy as np from sklearn.metrics import roc_auc_score,roc_curve,auc,average_precision_score from net.utils.parser import load_config,parse_args import net.utils.logging_tool as logging from sklearn import metrics import os import scipy.io as scio import ma...
[ "os.listdir", "scipy.io.savemat", "os.makedirs", "net.utils.parser.load_config", "sklearn.metrics.auc", "matplotlib.pyplot.plot", "os.path.join", "net.utils.logging_tool.get_logger", "net.utils.parser.parse_args", "sklearn.metrics.roc_curve", "numpy.expand_dims", "matplotlib.pyplot.title", "...
[((330, 358), 'net.utils.logging_tool.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (348, 358), True, 'import net.utils.logging_tool as logging\n'), ((429, 449), 'matplotlib.pyplot.plot', 'plt.plot', (['x', 'y_score'], {}), '(x, y_score)\n', (437, 449), True, 'import matplotlib.pyplot as plt\n'...
import click import inspect import os import logging import gym import time import yaml import traceback from importlib_metadata import version from evestop.generic import EVEEarlyStopping from pathlib import Path from importlib_resources import files import cibi import cibi.codebases from cibi import bf from cibi i...
[ "logging.getLogger", "cibi.utils.ensure_enough_test_runs", "importlib_metadata.version", "cibi.extensions.make_gym", "cibi.bf_io.burn_in", "pathlib.Path", "click.option", "cibi.codebase.make_prod_codebase", "cibi.utils.calc_hash", "logging.FileHandler", "importlib_resources.files", "cibi.bf.Ex...
[((604, 657), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s %(message)s"""'}), "(format='%(asctime)s %(message)s')\n", (623, 657), False, 'import logging\n'), ((667, 692), 'logging.getLogger', 'logging.getLogger', (['"""cibi"""'], {}), "('cibi')\n", (684, 692), False, 'import logging\n')...
# Copyright (c) 2020 UATC, 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...
[ "os.path.exists", "sys.path.insert", "os.path.join", "json.load", "caffe.Net" ]
[((1114, 1154), 'os.path.join', 'os.path.join', (['neuropod_path', '"""0"""', '"""data"""'], {}), "(neuropod_path, '0', 'data')\n", (1126, 1154), False, 'import os\n'), ((1184, 1224), 'os.path.join', 'os.path.join', (['neuropod_path', '"""0"""', '"""code"""'], {}), "(neuropod_path, '0', 'code')\n", (1196, 1224), False,...
from pathlib import Path import numpy as np import skimage.io from matplotlib import pyplot as plt from segmentation_models import get_preprocessing from tools.model import configs from tools.model import input_preprocessing from utils import image as image_utils BACKBONE_INPUT_PREPROCESSING = get_preprocessing(con...
[ "numpy.sqrt", "pathlib.Path", "utils.image.normalized_image", "tools.model.input_preprocessing.InputPreprocessor", "segmentation_models.get_preprocessing", "numpy.zeros", "numpy.stack", "numpy.array", "matplotlib.pyplot.subplots" ]
[((299, 334), 'segmentation_models.get_preprocessing', 'get_preprocessing', (['configs.BACKBONE'], {}), '(configs.BACKBONE)\n', (316, 334), False, 'from segmentation_models import get_preprocessing\n'), ((357, 524), 'tools.model.input_preprocessing.InputPreprocessor', 'input_preprocessing.InputPreprocessor', (['configs...
# -*- coding: utf-8 -*- # Author : tyty # Date : 2018-6-21 from __future__ import division import numpy as np import pandas as pd import tools as tl class AritificialNeuralNetworks(object): def __init__(self, layers, learningRate, trainX, trainY, testX, testY, epoch): # input params self.layers ...
[ "numpy.mean", "time.clock", "numpy.tanh", "numpy.argmax", "tools.createDataSet", "numpy.array", "numpy.random.uniform", "numpy.zeros", "numpy.dot", "numpy.std", "numpy.math.exp" ]
[((7558, 7576), 'tools.createDataSet', 'tl.createDataSet', ([], {}), '()\n', (7574, 7576), True, 'import tools as tl\n'), ((7875, 7887), 'time.clock', 'time.clock', ([], {}), '()\n', (7885, 7887), False, 'import time\n'), ((7967, 7979), 'time.clock', 'time.clock', ([], {}), '()\n', (7977, 7979), False, 'import time\n')...
from decimal import Decimal from typing import Iterable, Optional, TypeVar from stock_indicators._cslib import CsIndicator from stock_indicators._cstypes import List as CsList from stock_indicators._cstypes import Decimal as CsDecimal from stock_indicators._cstypes import to_pydecimal from stock_indicators.indicators....
[ "stock_indicators._cstypes.Decimal", "stock_indicators._cstypes.to_pydecimal", "stock_indicators._cstypes.List", "typing.TypeVar" ]
[((2257, 2288), 'typing.TypeVar', 'TypeVar', (['"""_T"""'], {'bound': 'KAMAResult'}), "('_T', bound=KAMAResult)\n", (2264, 2288), False, 'from typing import Iterable, Optional, TypeVar\n'), ((1572, 1593), 'stock_indicators._cstypes.List', 'CsList', (['Quote', 'quotes'], {}), '(Quote, quotes)\n', (1578, 1593), True, 'fr...
import pytest import numpy as np import mymath.bindings def test_dot(): v1 = [1., 2, 3, -5.5, 42] v2 = [-3.2, 0, 13, 6, -3.14] result = mymath.bindings.dot(vector1=v1, vector2=v2) assert pytest.approx(result) == np.dot(v1, v2) def test_normalize(): v = [1., 2, 3, -5.5, 42] result = mymat...
[ "pytest.approx", "numpy.array", "numpy.dot", "pytest.raises", "numpy.linalg.norm" ]
[((452, 483), 'numpy.array', 'np.array', (['[1.0, 2, 3, -5.5, 42]'], {}), '([1.0, 2, 3, -5.5, 42])\n', (460, 483), True, 'import numpy as np\n'), ((492, 525), 'numpy.array', 'np.array', (['[-3.2, 0, 13, 6, -3.14]'], {}), '([-3.2, 0, 13, 6, -3.14])\n', (500, 525), True, 'import numpy as np\n'), ((674, 705), 'numpy.array...
#!/usr/bin/env python import glob import numpy as np import astropy.io.fits as fits import scipy.optimize as opt import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams['font.family'] = 'Times New Roman' mpl.rcParams['font.size'] = '15' mpl.rcParams['mathtext.default'] = 'regular' #mpl.rcParams['xtic...
[ "scipy.optimize.curve_fit", "matplotlib.pyplot.savefig", "numpy.sqrt", "matplotlib.pyplot.legend", "matplotlib.pyplot.clf", "numpy.argmax", "glob.glob", "matplotlib.pyplot.scatter", "astropy.io.fits.open", "matplotlib.pyplot.subplots", "numpy.arange" ]
[((2786, 2843), 'scipy.optimize.curve_fit', 'opt.curve_fit', (['func', 'numof_xrays_mpgrp', 'significance_n250'], {}), '(func, numof_xrays_mpgrp, significance_n250)\n', (2799, 2843), True, 'import scipy.optimize as opt\n'), ((2898, 2907), 'matplotlib.pyplot.clf', 'plt.clf', ([], {}), '()\n', (2905, 2907), True, 'import...
# Copyright Pyjamas Team # Copyright (C) 2009 <NAME> <<EMAIL>> # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ "pyjamas.Factory.registerClass", "pyjamas.ui.CustomButton.CustomButton.__init__", "pyjamas.ui.CustomButton.CustomButton.onClick" ]
[((1492, 1570), 'pyjamas.Factory.registerClass', 'Factory.registerClass', (['"""pyjamas.ui.ToggleButton"""', '"""ToggleButton"""', 'ToggleButton'], {}), "('pyjamas.ui.ToggleButton', 'ToggleButton', ToggleButton)\n", (1513, 1570), False, 'from pyjamas import Factory\n'), ((1273, 1347), 'pyjamas.ui.CustomButton.CustomBut...
# Importações import matplotlib.pyplot as plt import numpy as np # Acrescentar Sinais # Mensagem, Portadora, Subportadora # Descobrir o K tempo_maximo = 45000 frequencia_mensagem = 5 frequencia_portadora = 40 amplitude_portadora = 1 # Vai dividir cada valor do vetor criado para que se obtenha valores pequenos tempo ...
[ "numpy.multiply", "matplotlib.pyplot.grid", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.cos", "numpy.sin", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "numpy.arange", "matplotlib.pyplot.show" ]
[((372, 419), 'numpy.sin', 'np.sin', (['(2 * np.pi * frequencia_mensagem * tempo)'], {}), '(2 * np.pi * frequencia_mensagem * tempo)\n', (378, 419), True, 'import numpy as np\n'), ((531, 563), 'numpy.multiply', 'np.multiply', (['mensagem', 'portadora'], {}), '(mensagem, portadora)\n', (542, 563), True, 'import numpy as...
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize examples_extension = Extension( name="sgxwrapper", sources=["sgxwrapper.pyx"], libraries=['iiv'], library_dirs=['libcSGX'], include_dirs=['libcSGX/untrusted'] ) setup( name="sgxwrapper"...
[ "Cython.Build.cythonize", "distutils.extension.Extension" ]
[((132, 273), 'distutils.extension.Extension', 'Extension', ([], {'name': '"""sgxwrapper"""', 'sources': "['sgxwrapper.pyx']", 'libraries': "['iiv']", 'library_dirs': "['libcSGX']", 'include_dirs': "['libcSGX/untrusted']"}), "(name='sgxwrapper', sources=['sgxwrapper.pyx'], libraries=['iiv'],\n library_dirs=['libcSGX...
import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers def f(x): return x[0]+x[1]*x[2]+np.sin(x[3]) def gettestdata(f,n=1000): x=np.random.normal(0,1,(n,4)) y=np.array([[f(xx)] for xx in x]) return x,y def traindensemodel(datax,datay,hidden,lr=0.001,batch...
[ "numpy.random.normal", "tensorflow.keras.Model", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.layers.Dense", "tensorflow.keras.Input", "numpy.sin", "time.time" ]
[((189, 219), 'numpy.random.normal', 'np.random.normal', (['(0)', '(1)', '(n, 4)'], {}), '(0, 1, (n, 4))\n', (205, 219), True, 'import numpy as np\n'), ((1321, 1332), 'time.time', 'time.time', ([], {}), '()\n', (1330, 1332), False, 'import time\n'), ((1413, 1424), 'time.time', 'time.time', ([], {}), '()\n', (1422, 1424...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "functools.reduce", "operator.itemgetter", "collections.namedtuple" ]
[((1238, 1291), 'collections.namedtuple', 'collections.namedtuple', (['"""Traversal"""', '"""pivot, members"""'], {}), "('Traversal', 'pivot, members')\n", (1260, 1291), False, 'import collections\n'), ((7344, 7366), 'operator.itemgetter', 'operator.itemgetter', (['(0)'], {}), '(0)\n', (7363, 7366), False, 'import oper...
# 相手の駒配置を予測 # これは不完全情報ゲームにおいて動作するようにする # 正体が不明な相手の駒をとりあえず-1としておく # board→14R24R34R44R15B25B35B45B41u31u21u11u40u30u20u10u # move import numpy as np import itertools import time from game import State # from pv_mcts import predict from pathlib import Path from tensorflow.keras.models import load_model from test imp...
[ "test.get_policies", "test.PredictPolicy", "math.log", "numpy.array", "numpy.where", "numpy.sort", "test.convert_func_use_in_guess", "random.randint", "test.HandyAction", "random.choice", "numpy.amin", "random.randrange", "numpy.argmax", "numpy.any", "time.time", "numpy.insert", "num...
[((18826, 18853), 'game.State', 'State', (['pieces', 'enemy_pieces'], {}), '(pieces, enemy_pieces)\n', (18831, 18853), False, 'from game import State\n'), ((21596, 21640), 'numpy.any', 'np.any', (['(ii_state.all_piece == now_coordinate)'], {}), '(ii_state.all_piece == now_coordinate)\n', (21602, 21640), True, 'import n...
#!/usr/bin/python import random def attackroll(): attackdice = 1 attackdicesides = 20 RANDOM = random.randint(1, attackdicesides) return RANDOM def damageroll(): damagedice = 1 damagesides = 6 RANDOM = random.randint(1, damagesides) return RANDOM
[ "random.randint" ]
[((99, 133), 'random.randint', 'random.randint', (['(1)', 'attackdicesides'], {}), '(1, attackdicesides)\n', (113, 133), False, 'import random\n'), ((210, 240), 'random.randint', 'random.randint', (['(1)', 'damagesides'], {}), '(1, damagesides)\n', (224, 240), False, 'import random\n')]
from hex import HexBoard from actor import RuleAgent if __name__ == '__main__': actor = RuleAgent('W', 'a1 {b1, b2}')
[ "actor.RuleAgent" ]
[((93, 122), 'actor.RuleAgent', 'RuleAgent', (['"""W"""', '"""a1 {b1, b2}"""'], {}), "('W', 'a1 {b1, b2}')\n", (102, 122), False, 'from actor import RuleAgent\n')]
#!/usr/bin/env python # The MIT License (MIT) # Copyright (c) 2016 <NAME>, <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to...
[ "rospy.logerr", "rospy.logwarn", "pep.readInputFile", "rospy.init_node", "time.sleep", "tf.TransformListener", "std_msgs.msg.UInt8MultiArray", "thread.allocate_lock", "rospy.Subscriber", "geometry_msgs.msg.Twist", "rospy.get_param", "math.degrees", "rospy.Time", "rospy.logdebug", "rospy....
[((20443, 20476), 'rospy.init_node', 'rospy.init_node', (['"""pep_controller"""'], {}), "('pep_controller')\n", (20458, 20476), False, 'import rospy\n'), ((20745, 20777), 'rospy.get_param', 'rospy.get_param', (['"""~pepInputFile"""'], {}), "('~pepInputFile')\n", (20760, 20777), False, 'import rospy\n'), ((20782, 20882)...
# Generated by the protocol buffer compiler. DO NOT EDIT! # sources: coinomiwallet.proto # plugin: python-betterproto from dataclasses import dataclass from typing import List import betterproto class KeyType(betterproto.Enum): ORIGINAL = 1 ENCRYPTED_SCRYPT_AES = 2 DETERMINISTIC_MNEMONIC = 3 DETERMI...
[ "betterproto.bytes_field", "betterproto.enum_field", "betterproto.int64_field", "betterproto.int32_field", "betterproto.string_field", "betterproto.bool_field", "betterproto.uint32_field", "betterproto.uint64_field", "betterproto.message_field" ]
[((894, 920), 'betterproto.bytes_field', 'betterproto.bytes_field', (['(1)'], {}), '(1)\n', (917, 920), False, 'import betterproto\n'), ((937, 964), 'betterproto.uint32_field', 'betterproto.uint32_field', (['(2)'], {}), '(2)\n', (961, 964), False, 'import betterproto\n'), ((985, 1012), 'betterproto.uint64_field', 'bett...
import itertools from os import path from pdb import set_trace import pickle from typing import Dict, List, Tuple from explicit import waiter, XPATH from selenium import webdriver import selenium from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.chrome.options import Options from se...
[ "numpy.random.normal", "yaml.full_load", "selenium.webdriver.chrome.options.Options", "os.path.exists", "src.profile.get_post_link", "requests.Session", "selenium.webdriver.support.ui.WebDriverWait", "selenium.webdriver.Chrome", "explicit.waiter.find_element", "itertools.count", "traceback.print...
[((1006, 1026), 'yaml.full_load', 'yaml.full_load', (['file'], {}), '(file)\n', (1020, 1026), False, 'import yaml\n'), ((1101, 1110), 'selenium.webdriver.chrome.options.Options', 'Options', ([], {}), '()\n', (1108, 1110), False, 'from selenium.webdriver.chrome.options import Options\n'), ((1339, 1372), 'selenium.webdri...
# Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved. from __future__ import print_function import dace import numpy as np N = dace.symbol('N') @dace.program def dot(A, B, out): @dace.map def product(i: _[0:N]): a << A[i] b << B[i] o >> out(1, lambda x, y: x + y...
[ "numpy.random.rand", "dace.symbol", "dace.scalar", "numpy.dot", "dace.ndarray", "dace.float64" ]
[((151, 167), 'dace.symbol', 'dace.symbol', (['"""N"""'], {}), "('N')\n", (162, 167), False, 'import dace\n'), ((390, 427), 'dace.ndarray', 'dace.ndarray', (['[N]'], {'dtype': 'dace.float32'}), '([N], dtype=dace.float32)\n', (402, 427), False, 'import dace\n'), ((441, 466), 'dace.scalar', 'dace.scalar', (['dace.float64...
import click from picomc.account import AccountError, OfflineAccount, OnlineAccount, RefreshError from picomc.cli.utils import pass_account_manager from picomc.yggdrasil import AuthenticationError def account_cmd(fn): return click.argument("account")(fn) @click.group() def account_cli(): """Manage your acc...
[ "click.argument", "click.group", "picomc.account.OfflineAccount.new", "picomc.account.OnlineAccount.new", "getpass.getpass" ]
[((265, 278), 'click.group', 'click.group', ([], {}), '()\n', (276, 278), False, 'import click\n'), ((674, 719), 'click.argument', 'click.argument', (['"""mojang_username"""'], {'default': '""""""'}), "('mojang_username', default='')\n", (688, 719), False, 'import click\n'), ((232, 257), 'click.argument', 'click.argume...
# Utilities for installing and selecting SSL certificates. import os, os.path, re, shutil from utils import shell, safe_domain_name def get_ssl_certificates(env): # Scan all of the installed SSL certificates and map every domain # that the certificates are good for to the best certificate for # the domain. from...
[ "utils.safe_domain_name", "os.listdir", "utils.shell", "shutil.move", "os.path.isdir", "os.unlink", "os.close", "idna.encode", "re.match", "os.path.isfile", "os.path.dirname", "re.sub", "re.findall", "tempfile.mkstemp", "cryptography.hazmat.backends.default_backend", "cryptography.hazm...
[((485, 525), 'os.path.join', 'os.path.join', (["env['STORAGE_ROOT']", '"""ssl"""'], {}), "(env['STORAGE_ROOT'], 'ssl')\n", (497, 525), False, 'import os, os.path, re, shutil\n'), ((2218, 2244), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (2242, 2244), False, 'import datetime\n'), ((3505, ...
from bluesky import Msg from bluesky.callbacks.olog import logbook_cb_factory text = [] def f(**kwargs): text.append(kwargs['text']) def test_default_template(RE): text.clear() RE.subscribe(logbook_cb_factory(f), 'start') RE([Msg('open_run', plan_args={}), Msg('close_run')]) assert len(text[0])...
[ "bluesky.callbacks.olog.logbook_cb_factory", "bluesky.Msg" ]
[((207, 228), 'bluesky.callbacks.olog.logbook_cb_factory', 'logbook_cb_factory', (['f'], {}), '(f)\n', (225, 228), False, 'from bluesky.callbacks.olog import logbook_cb_factory\n'), ((392, 436), 'bluesky.callbacks.olog.logbook_cb_factory', 'logbook_cb_factory', (['f'], {'desc_template': '"""hello"""'}), "(f, desc_templ...
from unittest import TestCase from pykalman.sqrt import BiermanKalmanFilter from pykalman.tests.test_standard import KalmanFilterTests from pykalman.datasets import load_robot class BiermanKalmanFilterTestSuite(TestCase, KalmanFilterTests): """Run Kalman Filter tests on the UDU' Decomposition-based Kalman Filter"...
[ "pykalman.datasets.load_robot" ]
[((403, 415), 'pykalman.datasets.load_robot', 'load_robot', ([], {}), '()\n', (413, 415), False, 'from pykalman.datasets import load_robot\n')]
#----------------------------------------------------------------------------# # Imports #----------------------------------------------------------------------------# from app import app, db, login_manager from flask import Flask, render_template, request, redirect, g, url_for, flash, session from app.classes import *...
[ "flask.render_template", "app.app.run", "app.app.logger.info", "flask.flash", "sqlalchemy.sql.text", "flask_login.logout_user", "logging.Formatter", "app.app.logger.setLevel", "app.db.connect", "flask_login.login_user", "flask.url_for", "app.app.errorhandler", "app.app.logger.addHandler", ...
[((801, 815), 'app.app.route', 'app.route', (['"""/"""'], {}), "('/')\n", (810, 815), False, 'from app import app, db, login_manager\n'), ((881, 924), 'app.app.route', 'app.route', (['"""/dash"""'], {'methods': "['GET', 'POST']"}), "('/dash', methods=['GET', 'POST'])\n", (890, 924), False, 'from app import app, db, log...
"""Model training/evaluation base interface module. This module contains the interface required to train and/or evaluate a model based on different tasks. The trainers based on this interface are instantiated in launched sessions based on configuration dictionaries. """ import functools import json import logging impo...
[ "logging.getLogger", "torch.manual_seed", "torch.cuda.manual_seed_all", "os.path.exists", "cv2.imwrite", "platform.node", "os.makedirs", "logging.Formatter", "time.strftime", "os.path.join", "torch.nn.DataParallel", "random.seed", "logging.FileHandler", "numpy.random.seed", "torch.save",...
[((638, 665), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (655, 665), False, 'import logging\n'), ((7448, 7487), 'os.makedirs', 'os.makedirs', (['session_dir'], {'exist_ok': '(True)'}), '(session_dir, exist_ok=True)\n', (7459, 7487), False, 'import os\n'), ((7507, 7540), 'os.path.join'...
from django import forms from .models import * class gemSearchForm(forms.Form): tokenId = forms.IntegerField()
[ "django.forms.IntegerField" ]
[((96, 116), 'django.forms.IntegerField', 'forms.IntegerField', ([], {}), '()\n', (114, 116), False, 'from django import forms\n')]
"""Definition for main data models used in this library.""" from dataclasses import dataclass from enum import IntEnum, auto class EdgeQLOperationType(IntEnum): """Enumeration for operation types for queries.""" #: type for operation that definetly returns a single object. required_single_return = auto(...
[ "enum.auto", "dataclasses.dataclass" ]
[((578, 600), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (587, 600), False, 'from dataclasses import dataclass\n'), ((315, 321), 'enum.auto', 'auto', ([], {}), '()\n', (319, 321), False, 'from enum import IntEnum, auto\n'), ((410, 416), 'enum.auto', 'auto', ([], {}), '()\n', (4...
# Generated by Django 3.1 on 2020-08-29 20:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('busker', '0008_remove_downloadablework_thumbnail'), ] operations = [ migrations.RemoveField( model_name='downloadablework', ...
[ "django.db.migrations.RemoveField", "django.db.models.BooleanField" ]
[((247, 315), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""downloadablework"""', 'name': '"""status"""'}), "(model_name='downloadablework', name='status')\n", (269, 315), False, 'from django.db import migrations, models\n'), ((472, 628), 'django.db.models.BooleanField', 'models....
from __future__ import print_function import os import time import json import numpy as np from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Lambda from keras.optimizers import Nadam as Trainer #from keras.optimizers import Adam as Trainer from keras.regularizers import WeightRe...
[ "keras.callbacks.LearningRateScheduler", "genomic_neuralnet.util.get_is_time_stats", "keras.layers.Lambda", "genomic_neuralnet.util.get_should_plot", "keras.regularizers.WeightRegularizer", "json.dumps", "keras.models.Sequential", "keras.layers.Dense", "keras.optimizers.Nadam", "keras.layers.Dropo...
[((1574, 1586), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (1584, 1586), False, 'from keras.models import Sequential\n'), ((3876, 3908), 'keras.callbacks.LearningRateScheduler', 'LearningRateScheduler', (['rate_func'], {}), '(rate_func)\n', (3897, 3908), False, 'from keras.callbacks import EarlyStopping...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: list.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import...
[ "google.protobuf.reflection.GeneratedProtocolMessageType", "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((458, 484), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (482, 484), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((7472, 7625), 'google.protobuf.reflection.GeneratedProtocolMessageType', '_reflection.GeneratedProtocolMessageType', (['"""ListT...
import flask import os from dotenv import load_dotenv from pathlib import Path import sys sys.path.append('fraud_graph/') import fraud_times.quiz_statistics as quiz_stats import fraud_times.quiz_orm as quiz_orm import get_scores as get_scores import create_dataset2 as create_dataset import json # Does not override en...
[ "create_dataset2.create_dataset", "flask.Flask", "fraud_times.quiz_statistics.Quiz_Statistic", "dotenv.load_dotenv", "fraud_times.quiz_orm.QuizzesDBConnector", "get_scores.create_network", "sys.path.append", "flask.jsonify" ]
[((90, 121), 'sys.path.append', 'sys.path.append', (['"""fraud_graph/"""'], {}), "('fraud_graph/')\n", (105, 121), False, 'import sys\n'), ((413, 426), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (424, 426), False, 'from dotenv import load_dotenv\n'), ((433, 454), 'flask.Flask', 'flask.Flask', (['__name__'],...
import dataclasses import unittest import pytest from netdisc.tools import pandor @dataclasses.dataclass class Included: ip_address: str = "10.20.30.40" short: str = "included" field: str = "abc 123 this is the included field" @dataclasses.dataclass class Excluded: ip_address: str =...
[ "netdisc.tools.pandor.NetworkAttrFilterFactory", "netdisc.tools.pandor.AllowAll", "netdisc.tools.pandor.AttrFilter", "netdisc.tools.pandor.AttrFilterForkFactory", "pytest.param", "pytest.mark.parametrize", "pytest.raises", "netdisc.tools.pandor.DiscardAll", "netdisc.tools.pandor.StrAttrFilterFactory...
[((4570, 4630), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (["('expected', 'pattern')", 'variations'], {}), "(('expected', 'pattern'), variations)\n", (4593, 4630), False, 'import pytest\n'), ((4882, 4951), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (["('expected', 'pattern')", 'opposite_variation...
#! /usr/bin/env python3 import os import argparse from biowardrobe_migration.utils.files import norm_path def normalize_args(args, skip_list=[]): """ Converts all relative path arguments to absolute ones relatively to the current working directory """ normalized_args = {} for key,value in args.__dict__.it...
[ "argparse.Namespace", "os.path.isabs", "argparse.ArgumentParser", "os.getcwd" ]
[((551, 588), 'argparse.Namespace', 'argparse.Namespace', ([], {}), '(**normalized_args)\n', (569, 588), False, 'import argparse\n'), ((649, 724), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""BioWardrobe Migration"""', 'add_help': '(True)'}), "(description='BioWardrobe Migration', add_...
#!/usr/bin/env python3 # coding=utf-8 """ csgo-icon-extractor script """ import argparse import csgo_icon_extractor DEFAULT_ICONLIB = 'iconlib.swf' DEFAULT_OUTPUT_DIR = 'csgo-icons' def _parse_command_line_args(): parser = argparse.ArgumentParser(description='Extracts the CS:GO icon images from the icon lib S...
[ "argparse.ArgumentParser", "csgo_icon_extractor.extract_icon_set", "csgo_icon_extractor.create_output_directory", "csgo_icon_extractor.verfiy_swt_tools_is_in_path", "csgo_icon_extractor.extract_object_set_details_list" ]
[((233, 335), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Extracts the CS:GO icon images from the icon lib SWF file."""'}), "(description=\n 'Extracts the CS:GO icon images from the icon lib SWF file.')\n", (256, 335), False, 'import argparse\n'), ((851, 900), 'csgo_icon_extractor....
import bpy #from mathutils import * #from math import * # for each finger ## add a control bone goes from base of 1st bone to tip of last bone 3 for fingers, 2 for thumb hand_bones={ 'f_Index': ('Index1','Index2','Index3',), 'f_Mid' : ('Mid1', 'Mid2', 'Mid3',), 'f_Ring' : ('Ring1', 'Ring2', 'Ring3',), 'f_Pinky': (...
[ "bpy.ops.object.mode_set" ]
[((671, 707), 'bpy.ops.object.mode_set', 'bpy.ops.object.mode_set', ([], {'mode': '"""EDIT"""'}), "(mode='EDIT')\n", (694, 707), False, 'import bpy\n'), ((729, 767), 'bpy.ops.object.mode_set', 'bpy.ops.object.mode_set', ([], {'mode': '"""OBJECT"""'}), "(mode='OBJECT')\n", (752, 767), False, 'import bpy\n'), ((789, 825)...
from django.db import models class Setting(models.Model): VALUE_TYPES = ( ("B", "Bool"), ("S", "String"), ("N", "Number") ) key = models.CharField(max_length=100, primary_key=True) value = models.CharField(max_length=2000) description = models.CharField(max_length=2000) ...
[ "django.db.models.CharField", "django.db.models.IntegerField" ]
[((168, 218), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'primary_key': '(True)'}), '(max_length=100, primary_key=True)\n', (184, 218), False, 'from django.db import models\n'), ((231, 264), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(2000)'}), '(max_lengt...
import pytest from zhtools.tokenize import get_tokenizer from zhtools.similarity import compute_similarity @pytest.mark.parametrize( 'first, second, tokenizer, ngram_range, ngram_weights, sim', [ ('abcde', 'bcd', None, None, None, 0.6), ('abcde', 'bcd', None, [1, 2], None, 0.55), ('ab...
[ "zhtools.tokenize.get_tokenizer", "pytest.mark.parametrize", "pytest.raises", "zhtools.similarity.compute_similarity" ]
[((822, 917), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""first, second, method"""', "[('abcde', 'bcd', 'some_unknown_method')]"], {}), "('first, second, method', [('abcde', 'bcd',\n 'some_unknown_method')])\n", (845, 917), False, 'import pytest\n'), ((573, 686), 'zhtools.similarity.compute_similarit...
from django.core import mail from django.test.utils import override_settings from base.tests.base import SeleniumTestCase CAPTCHA = 'test' @override_settings(CAPTCHA=CAPTCHA) class ContactFormTest(SeleniumTestCase): def test_contact_form(self): self.assertEqual(mail.outbox, []) username = 'joh...
[ "django.test.utils.override_settings" ]
[((144, 178), 'django.test.utils.override_settings', 'override_settings', ([], {'CAPTCHA': 'CAPTCHA'}), '(CAPTCHA=CAPTCHA)\n', (161, 178), False, 'from django.test.utils import override_settings\n')]
import logging from django.utils.module_loading import import_string logger = logging.getLogger(__name__) def get_storage_implementation(path): ''' Given a path, examine the file prefix to determine where a resource is stored. Return a "storage backend" class type ''' # a dictionary which maps ...
[ "logging.getLogger", "django.utils.module_loading.import_string" ]
[((80, 107), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (97, 107), False, 'import logging\n'), ((1440, 1477), 'django.utils.module_loading.import_string', 'import_string', (['implementing_class_str'], {}), '(implementing_class_str)\n', (1453, 1477), False, 'from django.utils.module_lo...
__author__ = '<NAME>' import unittest from datetime import datetime, timedelta from odm import document, fields from odm.errors import ValidationError from tests.test_document_operations import SimpleContainer class NestedDocuments(document.BaseDocument): field_nested = fields.NestedDocumentField(SimpleContaine...
[ "odm.fields.NestedDocumentField", "odm.fields.StringField", "tests.test_document_operations.SimpleContainer", "odm.fields.IntegerField", "datetime.datetime.now", "unittest.main", "datetime.timedelta" ]
[((279, 322), 'odm.fields.NestedDocumentField', 'fields.NestedDocumentField', (['SimpleContainer'], {}), '(SimpleContainer)\n', (305, 322), False, 'from odm import document, fields\n'), ((343, 364), 'odm.fields.IntegerField', 'fields.IntegerField', ([], {}), '()\n', (362, 364), False, 'from odm import document, fields\...
import os import sys import threading import time import config from glob import glob sys.path.append(os.path.join(sys.path[0], "../../")) import schedule from instabot import Bot, utils bot = Bot() bot.login(username=config.USERNAME, password=config.PASSWORD) bot.logger.info("ULTIMATE script. Safe to run 24/7!") ...
[ "schedule.run_pending", "os.path.join", "time.sleep", "instabot.Bot", "schedule.every", "os.path.basename", "threading.Thread", "glob.glob", "instabot.utils.file" ]
[((196, 201), 'instabot.Bot', 'Bot', ([], {}), '()\n', (199, 201), False, 'from instabot import Bot, utils\n'), ((104, 139), 'os.path.join', 'os.path.join', (['sys.path[0]', '"""../../"""'], {}), "(sys.path[0], '../../')\n", (116, 139), False, 'import os\n'), ((338, 373), 'instabot.utils.file', 'utils.file', (['config....
from typing import List from financial_data.extensions.database import db from .interface import DebtIndicatorsInterface from .model import DebtIndicators class DebtIndicatorsService: @staticmethod def get_all() -> List[DebtIndicators]: return DebtIndicators.query.all() @staticmethod def g...
[ "financial_data.extensions.database.db.session.add", "financial_data.extensions.database.db.session.delete", "financial_data.extensions.database.db.session.commit" ]
[((786, 805), 'financial_data.extensions.database.db.session.commit', 'db.session.commit', ([], {}), '()\n', (803, 805), False, 'from financial_data.extensions.database import db\n'), ((1052, 1073), 'financial_data.extensions.database.db.session.delete', 'db.session.delete', (['di'], {}), '(di)\n', (1069, 1073), False,...
import re from collections import deque def parse(script): """Parse Nuke node's TCL script string into nested list structure Args: script (str): Node knobs TCL script string Returns: Tablet: A list containing knob scripts or tab knobs that has parsed into list """ qu...
[ "re.compile" ]
[((515, 620), 're.compile', 're.compile', (['"""addUserKnob {20 (?P<name>\\\\S+)(| l (?P<label>".*"|\\\\S+))(| n (?P<type>1|-[1-3]))}"""'], {}), '(\n \'addUserKnob {20 (?P<name>\\\\S+)(| l (?P<label>".*"|\\\\S+))(| n (?P<type>1|-[1-3]))}\'\n )\n', (525, 620), False, 'import re\n')]
from random import shuffle from enigma_machine.reflector import Reflector class Rotor: def __init__(self, parent, root, size, nbChilds): self.parent = parent self.root = root self.decallage = 0 self.size = size self.config = list(range(size)) shuffle(self.config) ...
[ "random.shuffle", "enigma_machine.reflector.Reflector" ]
[((298, 318), 'random.shuffle', 'shuffle', (['self.config'], {}), '(self.config)\n', (305, 318), False, 'from random import shuffle\n'), ((453, 485), 'enigma_machine.reflector.Reflector', 'Reflector', (['self', 'self.root', 'size'], {}), '(self, self.root, size)\n', (462, 485), False, 'from enigma_machine.reflector imp...
"""Add additional indexing Revision ID: 06ce82a384b0 Revises: <PASSWORD> Create Date: 2017-06-13 14:24:17.794833 """ # revision identifiers, used by Alembic. revision = '06ce82a384b0' down_revision = '<PASSWORD>' from alembic import op import sqlalchemy as sa def upgrade(): op.create_index('ix_item_item', 'it...
[ "sqlalchemy.text", "alembic.op.drop_index" ]
[((521, 550), 'alembic.op.drop_index', 'op.drop_index', (['"""ix_item_item"""'], {}), "('ix_item_item')\n", (534, 550), False, 'from alembic import op\n'), ((555, 593), 'alembic.op.drop_index', 'op.drop_index', (['"""ix_item_item_end-date"""'], {}), "('ix_item_item_end-date')\n", (568, 593), False, 'from alembic import...
# # Copyright 2021 Splunk 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 writing, so...
[ "logging.debug", "celery.signals.beat_init.connect", "opentelemetry.exporter.jaeger.thrift.JaegerExporter", "opentelemetry.trace.set_tracer_provider", "celery.Celery", "asyncio.new_event_loop", "pysnmp.entity.engine.SnmpEngine", "dotenv.load_dotenv", "splunk_connect_for_snmp.common.customised_json_f...
[((1656, 1672), 'opentelemetry.sdk.trace.TracerProvider', 'TracerProvider', ([], {}), '()\n', (1670, 1672), False, 'from opentelemetry.sdk.trace import TracerProvider\n'), ((1761, 1796), 'opentelemetry.trace.set_tracer_provider', 'trace.set_tracer_provider', (['provider'], {}), '(provider)\n', (1786, 1796), False, 'fro...
from __future__ import print_function import sys import cv2 import pdb import argparse import numpy as np import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data from torch.autograd import Variable import torch.nn.functional as...
[ "dataloader.sintellist_val.dataloader", "torch.cuda.synchronize", "models.VCN_exp.WarpModule", "torch.squeeze", "utils.flowlib.point_vec", "numpy.mean", "argparse.ArgumentParser", "numpy.asarray", "numpy.tile", "numpy.ones", "utils.io.mkdir_p", "utils.flowlib.warp_flow", "cv2.resize", "tim...
[((494, 546), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""VCN+expansion"""'}), "(description='VCN+expansion')\n", (517, 546), False, 'import argparse\n'), ((3290, 3328), 'torch.nn.DataParallel', 'nn.DataParallel', (['model'], {'device_ids': '[0]'}), '(model, device_ids=[0])\n', (3305,...
import numpy as np import keras import json from tqdm import tqdm import cv2 import random import matplotlib.pyplot as plt from keras.applications.vgg16 import preprocess_input from keras.preprocessing import image as keras_image import pickle def augment_patch(patch, augmentation): if augmentation=='H-Flip': ...
[ "numpy.ceil", "random.choice", "cv2.imread", "numpy.flipud", "numpy.fliplr", "tqdm.tqdm", "pickle.load", "numpy.floor", "numpy.zeros", "numpy.empty", "numpy.concatenate", "numpy.rot90", "json.load", "cv2.resize", "numpy.zeros_like", "numpy.random.shuffle" ]
[((1114, 1124), 'tqdm.tqdm', 'tqdm', (['pdfs'], {}), '(pdfs)\n', (1118, 1124), False, 'from tqdm import tqdm\n'), ((1515, 1541), 'numpy.random.shuffle', 'np.random.shuffle', (['indexes'], {}), '(indexes)\n', (1532, 1541), True, 'import numpy as np\n'), ((2050, 2077), 'cv2.resize', 'cv2.resize', (['img', 'resize_dim'], ...
import json from pathlib import Path artist_database_path = Path("../../app/data/artist_mapping.json") with open(artist_database_path, encoding="utf-8") as json_file: artist_database = json.load(json_file) for group in artist_database: if len(artist_database[group]["members"]) > 0: for i, members_con...
[ "json.load", "json.dump", "pathlib.Path" ]
[((61, 103), 'pathlib.Path', 'Path', (['"""../../app/data/artist_mapping.json"""'], {}), "('../../app/data/artist_mapping.json')\n", (65, 103), False, 'from pathlib import Path\n'), ((191, 211), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (200, 211), False, 'import json\n'), ((688, 723), 'json.dump'...
"""Kea6 User Check Hook Library - Logging""" # pylint: disable=invalid-name,line-too-long import pytest import srv_control import srv_msg import misc @pytest.mark.v6 @pytest.mark.kea_only @pytest.mark.user_check @pytest.mark.IA_NA @pytest.mark.logging def test_user_check_hook_IA_NA_no_registry_logging(): # Wit...
[ "srv_msg.compare_file", "srv_msg.copy_remote", "srv_msg.client_sets_value", "srv_control.start_srv_during_process", "srv_msg.response_check_suboption_content", "misc.pass_criteria", "srv_msg.send_file_to_server", "srv_control.start_srv", "srv_msg.response_check_include_option", "srv_control.add_ho...
[((442, 459), 'misc.test_setup', 'misc.test_setup', ([], {}), '()\n', (457, 459), False, 'import misc\n'), ((464, 525), 'srv_msg.remove_file_from_server', 'srv_msg.remove_file_from_server', (['"""/tmp/user_chk_registry.txt"""'], {}), "('/tmp/user_chk_registry.txt')\n", (495, 525), False, 'import srv_msg\n'), ((530, 590...
import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo import torchvision.models as models from utils import get_mean_var import os.path class AdaInstanceNormalization(nn.Module): ''' Implement Adaptive Instance Normalization Layer ref: https://arxiv.org/pdf/1703.06868.pdf in...
[ "torchvision.models.vgg.make_layers", "torch.nn.ReLU", "utils.get_mean_var", "torch.nn.Sequential", "torch.nn.ReflectionPad2d", "torch.load", "torch.utils.model_zoo.load_url", "torch.nn.Conv2d", "torch.nn.Upsample" ]
[((580, 595), 'utils.get_mean_var', 'get_mean_var', (['c'], {}), '(c)\n', (592, 595), False, 'from utils import get_mean_var\n'), ((620, 635), 'utils.get_mean_var', 'get_mean_var', (['s'], {}), '(s)\n', (632, 635), False, 'from utils import get_mean_var\n'), ((2017, 2039), 'torch.nn.Sequential', 'nn.Sequential', (['*la...
# -*- coding: utf-8 -*- import app.config.env as env import pandas as pd class Capacity: def __init__(self, capacity=0., unit=None, tenors=[], start=-float("inf"), end=float("inf")): self.capacity = capacity self.unit = unit self.start = start self.end = end self.capaciti...
[ "pandas.Series" ]
[((492, 527), 'pandas.Series', 'pd.Series', (['capacities'], {'index': 'tenors'}), '(capacities, index=tenors)\n', (501, 527), True, 'import pandas as pd\n'), ((739, 774), 'pandas.Series', 'pd.Series', (['capacities'], {'index': 'tenors'}), '(capacities, index=tenors)\n', (748, 774), True, 'import pandas as pd\n')]
from tkinter import * from tkinter.ttk import Combobox import tkinter.messagebox import threading import socket import time class Dos: def __init__(self,root): self.root=root self.root.title("DOS ATTACK") self.root.geometry("450x400") self.root.iconbitmap("logo980.ico") s...
[ "threading.Thread", "socket.socket", "time.sleep", "tkinter.ttk.Combobox" ]
[((3684, 3790), 'tkinter.ttk.Combobox', 'Combobox', (['firstframe'], {'values': 'ports', 'font': "('arial', 14)", 'width': '(20)', 'state': '"""readonly"""', 'textvariable': 'port'}), "(firstframe, values=ports, font=('arial', 14), width=20, state=\n 'readonly', textvariable=port)\n", (3692, 3790), False, 'from tkin...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 24 11:41:13 2020 @author: roopareddynagilla """ import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify fro...
[ "sqlalchemy.func.min", "flask.Flask", "datetime.datetime.strptime", "sqlalchemy.ext.automap.automap_base", "sqlalchemy.create_engine", "sqlalchemy.orm.Session", "sqlalchemy.func.max", "sqlalchemy.func.avg", "numpy.ravel", "datetime.timedelta", "flask.jsonify" ]
[((539, 589), 'sqlalchemy.create_engine', 'create_engine', (['"""sqlite:///Resources/hawaii.sqlite"""'], {}), "('sqlite:///Resources/hawaii.sqlite')\n", (552, 589), False, 'from sqlalchemy import create_engine, func\n'), ((646, 660), 'sqlalchemy.ext.automap.automap_base', 'automap_base', ([], {}), '()\n', (658, 660), F...
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # create tensor ellipsoids # Create the RenderWindow, Renderer and interactive renderer # ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() ir...
[ "vtk.util.misc.vtkGetDataRoot", "vtk.vtkContourFilter", "vtk.vtkCamera", "vtk.vtkRenderWindowInteractor", "vtk.vtkRenderWindow", "vtk.vtkImageDataGeometryFilter", "vtk.vtkProbeFilter", "vtk.vtkLoopSubdivisionFilter", "vtk.vtkPolyDataMapper", "vtk.vtkActor", "vtk.vtkRenderer", "vtk.vtkOutlineFi...
[((90, 106), 'vtk.util.misc.vtkGetDataRoot', 'vtkGetDataRoot', ([], {}), '()\n', (104, 106), False, 'from vtk.util.misc import vtkGetDataRoot\n'), ((205, 222), 'vtk.vtkRenderer', 'vtk.vtkRenderer', ([], {}), '()\n', (220, 222), False, 'import vtk\n'), ((232, 253), 'vtk.vtkRenderWindow', 'vtk.vtkRenderWindow', ([], {}),...
import numpy as np import random def assign_trait_values(organism_type: str, organism_id: int) -> list: """ Function takes in the type of organism and returns a list of the various traits for that organism to be passed to the next list Parameters """ if organism_type == 'Producer':...
[ "random.sample", "numpy.random.exponential", "numpy.random.uniform" ]
[((438, 479), 'numpy.random.exponential', 'np.random.exponential', ([], {'scale': '(0.34)', 'size': '(1)'}), '(scale=0.34, size=1)\n', (459, 479), True, 'import numpy as np\n'), ((1154, 1194), 'numpy.random.exponential', 'np.random.exponential', ([], {'scale': '(800)', 'size': '(1)'}), '(scale=800, size=1)\n', (1175, 1...
import json import os from django.shortcuts import render, get_object_or_404, get_list_or_404 from django.http import HttpResponse, JsonResponse from django.core import serializers from django.core.exceptions import ObjectDoesNotExist from .models import ( MediaFile, ImagePrediction, AudioPrediction, Vi...
[ "django.shortcuts.render", "django.http.HttpResponse", "django.shortcuts.get_object_or_404", "json.dumps" ]
[((443, 500), 'django.http.HttpResponse', 'HttpResponse', (['"""Hello, world. You\'re at the labels index."""'], {}), '("Hello, world. You\'re at the labels index.")\n', (455, 500), False, 'from django.http import HttpResponse, JsonResponse\n'), ((604, 642), 'django.http.HttpResponse', 'HttpResponse', (['(response % pr...
import os from conans import ConanFile, CMake, tools class AzureiotsdkcConan(ConanFile): name = "Azure-IoT-SDK-C" version = "1.1.27" release_date = "2017-10-20" generators = "cmake" settings = "os", "compiler", "build_type", "arch" url = "https://github.com/bincrafters/conan-azure-iot-sdk-c" ...
[ "conans.tools.replace_in_file", "conans.CMake", "os.path.join", "os.getcwd", "conans.tools.chdir", "conans.tools.get", "conans.tools.collect_libs" ]
[((1060, 1127), 'conans.tools.get', 'tools.get', (["('%s/archive/%s.tar.gz' % (source_url, self.release_date))"], {}), "('%s/archive/%s.tar.gz' % (source_url, self.release_date))\n", (1069, 1127), False, 'from conans import ConanFile, CMake, tools\n'), ((1522, 1567), 'os.path.join', 'os.path.join', (['self.root_dir', '...
#! /usr/bin/python3 # (C) 2020 by <NAME> <<EMAIL>> # License: Apache License v2.0 from bus_test import bus_test from cpu_6510 import cpu_6510 class cbm64: def __init__(self): self.bus = bus_test() self.cpu = cpu_6510(self.bus) def reset(self): self.cpu.reset() self.cpu.pc = 0...
[ "bus_test.bus_test", "cpu_6510.cpu_6510" ]
[((201, 211), 'bus_test.bus_test', 'bus_test', ([], {}), '()\n', (209, 211), False, 'from bus_test import bus_test\n'), ((231, 249), 'cpu_6510.cpu_6510', 'cpu_6510', (['self.bus'], {}), '(self.bus)\n', (239, 249), False, 'from cpu_6510 import cpu_6510\n')]
import pytest import supercollider from tests.shared import server def test_synth_create(server): synth = supercollider.Synth(server, "sine", { "freq": 440.0, "gain": -24 }) assert synth.id > 0 synth.free() def test_synth_get_set(server): synth = supercollider.Synth(server, "sine", { "freq": 440.0, ...
[ "supercollider.Group", "supercollider.Synth", "tests.shared.server.query_tree" ]
[((112, 177), 'supercollider.Synth', 'supercollider.Synth', (['server', '"""sine"""', "{'freq': 440.0, 'gain': -24}"], {}), "(server, 'sine', {'freq': 440.0, 'gain': -24})\n", (131, 177), False, 'import supercollider\n'), ((267, 332), 'supercollider.Synth', 'supercollider.Synth', (['server', '"""sine"""', "{'freq': 440...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ "os.path.exists", "os.makedirs", "os.rename", "synthtool.languages.java.bazel_library", "synthtool.languages.java.common_templates" ]
[((803, 1016), 'synthtool.languages.java.bazel_library', 'java.bazel_library', ([], {'service': 'service', 'version': 'version', 'proto_path': 'f"""google/{service}/{version}"""', 'bazel_target': 'f"""//google/{service}/{version}:google-cloud-{service}-{version}-java"""', 'preserve_gapic': '(True)'}), "(service=service...
#! /usr/bin/env python # -*- coding: utf-8 -*- import wx import sys import os import uivar sys.path.append(os.path.abspath("..")) from win import efuseWin_BootCfg1 class secBootUiEfuseBootCfg1(efuseWin_BootCfg1.efuseWin_BootCfg1): def __init__(self, parent): efuseWin_BootCfg1.efuseWin_BootCfg1.__init__(se...
[ "uivar.getEfuseSettings", "uivar.setRuntimeSettings", "win.efuseWin_BootCfg1.efuseWin_BootCfg1.__init__", "os.path.abspath", "uivar.setEfuseSettings" ]
[((107, 128), 'os.path.abspath', 'os.path.abspath', (['""".."""'], {}), "('..')\n", (122, 128), False, 'import os\n'), ((273, 331), 'win.efuseWin_BootCfg1.efuseWin_BootCfg1.__init__', 'efuseWin_BootCfg1.efuseWin_BootCfg1.__init__', (['self', 'parent'], {}), '(self, parent)\n', (317, 331), False, 'from win import efuseW...
import collections.abc from functools import partial from urllib.parse import urlencode from geopy.exc import ConfigurationError, GeocoderQueryError from geopy.geocoders.base import _DEFAULT_USER_AGENT, DEFAULT_SENTINEL, Geocoder from geopy.location import Location from geopy.util import logger __all__ = ("Nominatim"...
[ "geopy.exc.GeocoderQueryError", "geopy.location.Location", "geopy.util.logger.debug", "geopy.exc.ConfigurationError", "functools.partial", "urllib.parse.urlencode" ]
[((10047, 10107), 'geopy.util.logger.debug', 'logger.debug', (['"""%s.geocode: %s"""', 'self.__class__.__name__', 'url'], {}), "('%s.geocode: %s', self.__class__.__name__, url)\n", (10059, 10107), False, 'from geopy.util import logger\n'), ((10127, 10177), 'functools.partial', 'partial', (['self._parse_json'], {'exactl...
import json from django.contrib.auth.models import AbstractBaseUser from django.db import models from django.utils import timezone class SlackUserManager(models.Manager): """ A class that manages `SlackUser` model """ def __init__(self, *args): """ A initialization method that setup ...
[ "json.loads", "django.db.models.DateField", "django.db.models.ForeignKey", "json.dumps", "django.db.models.BooleanField", "django.utils.timezone.now", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((1014, 1061), 'django.db.models.AutoField', 'models.AutoField', ([], {'unique': '(True)', 'primary_key': '(True)'}), '(unique=True, primary_key=True)\n', (1030, 1061), False, 'from django.db import models\n'), ((1077, 1133), 'django.db.models.CharField', 'models.CharField', ([], {'unique': '(True)', 'max_length': '(2...
# Copyright 2015 Palo Alto Networks, 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 agre...
[ "mock.Mock", "time.sleep", "redis.StrictRedis", "mock.call", "time.time" ]
[((836, 847), 'time.time', 'time.time', ([], {}), '()\n', (845, 847), False, 'import time\n'), ((932, 951), 'redis.StrictRedis', 'redis.StrictRedis', ([], {}), '()\n', (949, 951), False, 'import redis\n'), ((1016, 1035), 'redis.StrictRedis', 'redis.StrictRedis', ([], {}), '()\n', (1033, 1035), False, 'import redis\n'),...