code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" ------------------------------------------------------------------------------ @file tool_bar.py @author <NAME> (<EMAIL>) @brief Tool bar. @version 0.1 @date 2020-08-29 @copyright Copyright (c) 2020 Distributed under the MIT software license, see the accompa...
[ "PyQt5.QtWidgets.QComboBox", "PyQt5.QtGui.QIcon", "PyQt5.QtWidgets.QPushButton" ]
[((1117, 1140), 'PyQt5.QtWidgets.QPushButton', 'QtWidgets.QPushButton', ([], {}), '()\n', (1138, 1140), False, 'from PyQt5 import QtWidgets, QtCore, QtGui\n'), ((1418, 1441), 'PyQt5.QtWidgets.QPushButton', 'QtWidgets.QPushButton', ([], {}), '()\n', (1439, 1441), False, 'from PyQt5 import QtWidgets, QtCore, QtGui\n'), (...
from decimal import * multiply = {u'G': Decimal('1000000000'), u'G\u03a9': Decimal('1000000000'), u'GR': Decimal('1000000000'), u'M': Decimal('1000000'), u'M\u03a9': Decimal('1000000'), u'MR': Decimal('1000000'), u'k': Decimal('1000'), u'k\u03a9': Decimal('1000'), ...
[ "re.split" ]
[((978, 1008), 're.split', 're.split', (['"""(\\\\d+)"""', 'resistance'], {}), "('(\\\\d+)', resistance)\n", (986, 1008), False, 'import re\n')]
import os, json import pandas as pd mainCsv = pd.read_csv("variant_data.csv") # Detect and drop the columns with the keywords "Tickets" and "Odds" droppedCsv = mainCsv[mainCsv.columns.drop(list(mainCsv.filter(regex="Tickets")))] droppedCsv = droppedCsv[droppedCsv.columns.drop(list(droppedCsv.filter(regex="Material"))...
[ "pandas.read_csv", "json.dump", "os.walk" ]
[((47, 78), 'pandas.read_csv', 'pd.read_csv', (['"""variant_data.csv"""'], {}), "('variant_data.csv')\n", (58, 78), True, 'import pandas as pd\n'), ((1040, 1058), 'os.walk', 'os.walk', (['directory'], {}), '(directory)\n', (1047, 1058), False, 'import os, json\n'), ((966, 989), 'json.dump', 'json.dump', (['json_file', ...
# -*- coding: utf-8 -*- from rest_framework import routers from .views import UserViewSet, GroupViewSet router = routers.SimpleRouter(trailing_slash=False) router.register(r'users', UserViewSet) router.register(r'groups', GroupViewSet) urlpatterns = router.urls
[ "rest_framework.routers.SimpleRouter" ]
[((115, 157), 'rest_framework.routers.SimpleRouter', 'routers.SimpleRouter', ([], {'trailing_slash': '(False)'}), '(trailing_slash=False)\n', (135, 157), False, 'from rest_framework import routers\n')]
# -*- coding: utf-8 -*- from datetime import datetime import unittest import os from neo4jrestclient import client from neo4jrestclient.exceptions import NotFoundError, StatusException NEO4J_URL = os.environ.get('NEO4J_URL', "http://localhost:7474/db/data/") NEO4J_VERSION = os.environ.get('NEO4J_VERSION', None) cla...
[ "os.environ.get", "datetime.datetime.utcnow", "neo4jrestclient.client.GraphDatabase" ]
[((199, 260), 'os.environ.get', 'os.environ.get', (['"""NEO4J_URL"""', '"""http://localhost:7474/db/data/"""'], {}), "('NEO4J_URL', 'http://localhost:7474/db/data/')\n", (213, 260), False, 'import os\n'), ((277, 314), 'os.environ.get', 'os.environ.get', (['"""NEO4J_VERSION"""', 'None'], {}), "('NEO4J_VERSION', None)\n"...
from setuptools import setup with open("README.rst", "r") as f: description = f.read() requires = [ "httpie>=0.9.7", "requests-gssapi>=1.0.0", ] setup( name="httpie-gssapi", description="GSSAPI authentication plug-in for HTTPie", long_description=description, version="1.0.2", author=...
[ "setuptools.setup" ]
[((161, 1143), 'setuptools.setup', 'setup', ([], {'name': '"""httpie-gssapi"""', 'description': '"""GSSAPI authentication plug-in for HTTPie"""', 'long_description': 'description', 'version': '"""1.0.2"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'url': '"""https://github.com/...
#!/usr/bin/env python # <NAME> # Plot the "region plot" of BGC candidates in a bacterial genomes (horizontal colored lines for each model). import argparse import matplotlib.pyplot as plt import numpy as np import pandas as pd import os def candidate_regions(cands, safety_limit=50, xlim=0, xstep=100000, colors=None)...
[ "os.mkdir", "argparse.ArgumentParser", "matplotlib.pyplot.cm.tab10", "pandas.read_csv", "matplotlib.pyplot.close", "matplotlib.pyplot.style.context", "numpy.ones", "numpy.arange", "matplotlib.pyplot.subplots", "pandas.concat" ]
[((3497, 3511), 'matplotlib.pyplot.close', 'plt.close', (['fig'], {}), '(fig)\n', (3506, 3511), True, 'import matplotlib.pyplot as plt\n'), ((3622, 3647), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3645, 3647), False, 'import argparse\n'), ((5066, 5082), 'pandas.concat', 'pd.concat', (['ca...
from typing import Tuple from pitop.common.bitwise_ops import join_bytes, split_into_bytes from .common import type_check from .common.encoder_motor_registers import ( MotorControlModes, MotorControlRegisters, MotorRegisterTypes, ) from .plate_interface import PlateInterface class EncoderMotorController...
[ "pitop.common.bitwise_ops.split_into_bytes", "pitop.common.bitwise_ops.join_bytes" ]
[((2320, 2383), 'pitop.common.bitwise_ops.split_into_bytes', 'split_into_bytes', (['rotations', '(4)'], {'signed': '(True)', 'little_endian': '(True)'}), '(rotations, 4, signed=True, little_endian=True)\n', (2336, 2383), False, 'from pitop.common.bitwise_ops import join_bytes, split_into_bytes\n'), ((4948, 4994), 'pito...
#!/usr/bin/env python # encoding: utf-8 """Commerson driver that allows communication with the LX15D motors""" # Copyright (c) 2019 Teddy Robotics LLC # # 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 t...
[ "serial.Serial", "LX15D.LX15D.LX15D" ]
[((1359, 1506), 'serial.Serial', 'serial.Serial', ([], {'port': 'serial_port', 'baudrate': '(115200)', 'parity': 'serial.PARITY_NONE', 'stopbits': 'serial.STOPBITS_ONE', 'bytesize': 'serial.EIGHTBITS', 'timeout': '(1)'}), '(port=serial_port, baudrate=115200, parity=serial.PARITY_NONE,\n stopbits=serial.STOPBITS_ONE,...
from __future__ import absolute_import import os.path as osp import appdirs from blazeutils.helpers import tolist import flask from pathlib import PurePath import six from werkzeug.utils import ( import_string, ImportStringError ) from keg.utils import app_environ_get, pymodule_fpaths_to_objects class Conf...
[ "appdirs.AppDirs", "blazeutils.helpers.tolist", "os.path.dirname", "pathlib.PurePath", "keg.utils.pymodule_fpaths_to_objects", "keg.utils.app_environ_get", "os.path.join" ]
[((1885, 1950), 'appdirs.AppDirs', 'appdirs.AppDirs', (['app_import_name'], {'appauthor': '(False)', 'multipath': '(True)'}), '(app_import_name, appauthor=False, multipath=True)\n', (1900, 1950), False, 'import appdirs\n'), ((4510, 4526), 'blazeutils.helpers.tolist', 'tolist', (['error_to'], {}), '(error_to)\n', (4516,...
import random import json import argparse import numpy as np import cv2 import tensorflow as tf from colormath.color_diff import delta_e_cie1976 from colormath.color_objects import LabColor from utils.helpers import load_module from vehicle_attributes.trainer import create_session, resnet_v1_10_1 from vehicle_attrib...
[ "argparse.ArgumentParser", "tensorflow.logging.set_verbosity", "colormath.color_objects.LabColor", "vehicle_attributes.readers.vehicle_attributes_json.BarrierAttributesJson.one_hot_annotation_to_type", "tensorflow.estimator.Estimator", "cv2.rectangle", "cv2.imshow", "cv2.cvtColor", "vehicle_attribut...
[((416, 505), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Perform inference of vehicle attributes model"""'}), "(description=\n 'Perform inference of vehicle attributes model')\n", (439, 505), False, 'import argparse\n'), ((652, 687), 'numpy.zeros', 'np.zeros', (['(1, 1, 3)'], {'dt...
#================================RunDL_1D.py===================================# # Created by <NAME> 2020 # Script for running the 1D discovery limits (at fixed mass) # The atmospheric neutrinos need to be generated first by running both # python AtmNu_Recoils.py Xe131 # python AtmNu_Recoils.py Ar40 # # Then the resul...
[ "sys.path.append" ]
[((556, 581), 'sys.path.append', 'sys.path.append', (['"""../src"""'], {}), "('../src')\n", (571, 581), False, 'import sys\n')]
from Utils.Utils import div def CalculateBound(iTree,level,arity,S,minMap,indexMap,candNodes): lastItem = S[-1] lBGMM = [] uBGMM = [] for nodeId in range(1,arity**level+1): node = iTree.levelMatrix[level][nodeId] #########cluster to iTree distance########## nid = iTree.documen...
[ "Utils.Utils.div" ]
[((2924, 2933), 'Utils.Utils.div', 'div', (['i', 'j'], {}), '(i, j)\n', (2927, 2933), False, 'from Utils.Utils import div\n')]
from django.db import models STATUS = ( (1, 'New'), (2, 'Read'), ) class Signup(models.Model): email = models.EmailField() timestamp = models.DateTimeField(auto_now_add=True) def __str__(self): return self.email class Meta: verbose_name = "Subscriber" verbose_name_pl...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.EmailField", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((118, 137), 'django.db.models.EmailField', 'models.EmailField', ([], {}), '()\n', (135, 137), False, 'from django.db import models\n'), ((154, 193), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (174, 193), False, 'from django.db import models\n')...
# -*- coding: utf-8 -*- """ Classes in this module enhance several stationary covariance functions with the Stochastic Differential Equation (SDE) functionality. """ from .rbf import RBF from .stationary import Exponential from .stationary import RatQuad import numpy as np import scipy as sp try: from scipy.linalg...
[ "scipy.poly1d", "scipy.roots", "numpy.empty", "numpy.zeros", "numpy.ones", "numpy.mod", "numpy.math.factorial", "numpy.array", "numpy.arange", "numpy.real", "numpy.dot", "GPy.models.state_space_main.balance_ss_model", "numpy.sqrt" ]
[((1316, 1336), 'numpy.math.factorial', 'np.math.factorial', (['N'], {}), '(N)\n', (1333, 1336), True, 'import numpy as np\n'), ((1505, 1527), 'numpy.zeros', 'np.zeros', (['(2 * N + 1,)'], {}), '((2 * N + 1,))\n', (1513, 1527), True, 'import numpy as np\n'), ((1772, 1785), 'scipy.poly1d', 'sp.poly1d', (['pp'], {}), '(p...
from tkinter import * from tkinter import messagebox from polyy import * from what import * import random as r import string root=Tk() root.title("Verifying Captcha") def poli(): poli5() def what(): what1() def cancel(): answer=messagebox.askquestion("Cancel?","Do you really want to Cancel") ...
[ "tkinter.messagebox.askquestion", "random.randint" ]
[((255, 320), 'tkinter.messagebox.askquestion', 'messagebox.askquestion', (['"""Cancel?"""', '"""Do you really want to Cancel"""'], {}), "('Cancel?', 'Do you really want to Cancel')\n", (277, 320), False, 'from tkinter import messagebox\n'), ((635, 650), 'random.randint', 'r.randint', (['(0)', '(6)'], {}), '(0, 6)\n', ...
from django.conf.urls import patterns, include, url from tastypie.api import Api from tutorons.core.api import ClientQueryResource, ViewResource v1_api = Api(api_name='v1') v1_api.register(ClientQueryResource()) v1_api.register(ViewResource()) urlpatterns = patterns( '', url(r'^(home)?$', include('tutorons.ho...
[ "django.conf.urls.include", "tutorons.core.api.ClientQueryResource", "tastypie.api.Api", "django.conf.urls.url", "tutorons.core.api.ViewResource" ]
[((155, 173), 'tastypie.api.Api', 'Api', ([], {'api_name': '"""v1"""'}), "(api_name='v1')\n", (158, 173), False, 'from tastypie.api import Api\n'), ((190, 211), 'tutorons.core.api.ClientQueryResource', 'ClientQueryResource', ([], {}), '()\n', (209, 211), False, 'from tutorons.core.api import ClientQueryResource, ViewRe...
from setuptools import setup with open("README.md", "r") as fh: readme = fh.read() setup(name='generic-web-server', version='1.0.1', url='https://github.com/matheusphalves/generic-web-server', license='MIT License', author= ['<NAME>','<NAME>', '<NAME>', '<NAME>'], long_description=readme, ...
[ "setuptools.setup" ]
[((89, 630), 'setuptools.setup', 'setup', ([], {'name': '"""generic-web-server"""', 'version': '"""1.0.1"""', 'url': '"""https://github.com/matheusphalves/generic-web-server"""', 'license': '"""MIT License"""', 'author': "['<NAME>', '<NAME>', '<NAME>', '<NAME>']", 'long_description': 'readme', 'long_description_content...
#!/usr/bin/python3 import os import pytz from datetime import datetime, timedelta def calc_expire(tz='Asia/Chongqing', **kargs): now = datetime.now() tz = pytz.timezone(tz) now = tz.localize(now) delta = timedelta(**kargs) now = now + delta return now.strftime('%a, %d %b %Y %H:%M:%S %z') pr...
[ "datetime.datetime.now", "pytz.timezone", "datetime.timedelta" ]
[((142, 156), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (154, 156), False, 'from datetime import datetime, timedelta\n'), ((166, 183), 'pytz.timezone', 'pytz.timezone', (['tz'], {}), '(tz)\n', (179, 183), False, 'import pytz\n'), ((223, 241), 'datetime.timedelta', 'timedelta', ([], {}), '(**kargs)\n', ...
import argparse import scapy from scapy.all import sniff, Ether, ARP, srp, IP, UDP, raw, hexdump, sendp, Packet, XByteField, X3BytesField, DNS, \ ShortEnumField, ShortField, XShortField, AsyncSniffer, bind_layers from scapy.data import UDP_SERVICES ##aasignment3### parser = argparse.ArgumentParser(description='Arg...
[ "scapy.all.ShortField", "scapy.all.IP", "scapy.all.ShortEnumField", "argparse.ArgumentParser", "scapy.all.XShortField", "scapy.all.UDP", "scapy.all.Ether", "scapy.all.raw", "scapy.all.X3BytesField", "scapy.all.bind_layers", "scapy.all.XByteField" ]
[((280, 367), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Argumetns for sender program"""', 'add_help': '(False)'}), "(description='Argumetns for sender program',\n add_help=False)\n", (303, 367), False, 'import argparse\n'), ((1713, 1733), 'scapy.all.bind_layers', 'bind_layers', (...
import pytest from requests import get from urllib.parse import urljoin def test_valid_new_link_page(wait_for_api, login_user): """ GIVEN a user has logged in (login_user) WHEN the '/links/new' page is navigated to (GET) THEN check the response is valid and page title is correct """ request_ses...
[ "urllib.parse.urljoin" ]
[((384, 414), 'urllib.parse.urljoin', 'urljoin', (['api_url', '"""/links/new"""'], {}), "(api_url, '/links/new')\n", (391, 414), False, 'from urllib.parse import urljoin\n'), ((796, 826), 'urllib.parse.urljoin', 'urljoin', (['api_url', '"""/links/new"""'], {}), "(api_url, '/links/new')\n", (803, 826), False, 'from urll...
import torch import torch.nn as nn import torchvision.models as models class EncoderCNN(nn.Module): def __init__(self, embed_size): super(EncoderCNN, self).__init__() resnet = models.resnet50(pretrained=True) for param in resnet.parameters(): param.requires_grad_(False) ...
[ "torch.nn.Sequential", "torch.nn.Embedding", "torchvision.models.resnet50", "torch.nn.Linear", "torch.zeros", "torch.nn.LSTM" ]
[((198, 230), 'torchvision.models.resnet50', 'models.resnet50', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (213, 230), True, 'import torchvision.models as models\n'), ((391, 414), 'torch.nn.Sequential', 'nn.Sequential', (['*modules'], {}), '(*modules)\n', (404, 414), True, 'import torch.nn as nn\n'), ((436,...
#!/usr/bin/env python2.7 # coding: utf-8 """ Simple helper script to load application in development mode. """ import argparse import logging # -- Standard lib ------------------------------------------------------------ import logging.config import os THIS_DIR = os.path.abspath(os.path.dirname(__file__)) # -- Proj...
[ "argparse.ArgumentParser", "logging.basicConfig", "os.path.dirname", "ServiceGateway.rest_api.APP.run", "VestaRestPackage.generic_rest_api.configure_home_route", "os.path.join", "logging.getLogger" ]
[((283, 308), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (298, 308), False, 'import os\n'), ((517, 572), 'os.path.join', 'os.path.join', (['THIS_DIR', '"""ServiceGateway"""', '"""logging.ini"""'], {}), "(THIS_DIR, 'ServiceGateway', 'logging.ini')\n", (529, 572), False, 'import os\n'), ((5...
""" Script for translating the KITTI 3D bounding box annotation format into the BB3TXT data format. A BB3TXT file is formatted like this: filename label confidence xmin ymin xmax ymax fblx fbly fbrx fbry rblx rbly ftly filename label confidence xmin ymin xmax ymax fblx fbly fbrx fbry rblx rbly ftly filename label conf...
[ "argparse.ArgumentParser", "os.path.isfile", "mappings.utils.LabelMappingManager", "os.path.join", "numpy.copy", "cv2.imwrite", "os.path.dirname", "os.path.exists", "numpy.max", "argparse.FileType", "mappings.utils.available_categories", "os.path.basename", "numpy.min", "cv2.flip", "os.l...
[((1537, 1558), 'mappings.utils.LabelMappingManager', 'LabelMappingManager', ([], {}), '()\n', (1556, 1558), False, 'from mappings.utils import LabelMappingManager\n'), ((3286, 3487), 'numpy.asmatrix', 'np.asmatrix', (['[[l / 2, -l / 2, l / 2, -l / 2, l / 2, -l / 2, l / 2, -l / 2], [0, 0, 0, 0,\n -h, -h, -h, -h], [-...
import os import sys import math import music21 import argparse import itertools from os import path from fractions import Fraction from src import DATA_DIR from src.parser.parser import dataset2states, chorales2music21_streams, parse_music21_dataset from src.helpers import save_pickle, load_pickle, get_pitch_space, ge...
[ "os.path.abspath", "src.helpers.save_pickle", "argparse.ArgumentParser", "os.makedirs", "os.path.exists", "src.parser.parser.dataset2states", "src.parser.parser.parse_music21_dataset", "itertools.product", "os.path.join", "os.listdir" ]
[((419, 790), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Pretends to be git"""', 'usage': '"""parse.py <command> [<args>]\n\n The most commonly commands are:\n music21 Search songs by author and instrument from music21 corpuses, \n or ...
import pytest import zarr from numpy import zeros from ome_zarr.data import create_zarr from ome_zarr.format import FormatV01, FormatV02, FormatV03 from ome_zarr.io import parse_url from ome_zarr.reader import Label, Labels, Multiscales, Node, Plate, Well from ome_zarr.writer import write_image, write_plate_metadata, ...
[ "ome_zarr.format.FormatV01", "ome_zarr.writer.write_plate_metadata", "ome_zarr.writer.write_well_metadata", "pytest.fixture", "numpy.zeros", "ome_zarr.format.FormatV02", "zarr.group", "ome_zarr.format.FormatV03", "pytest.mark.parametrize", "ome_zarr.io.parse_url", "pytest.mark.xfail" ]
[((363, 391), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (377, 391), False, 'import pytest\n'), ((1351, 1379), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (1365, 1379), False, 'import pytest\n'), ((4109, 4182), 'pytest.mark.xfail', 'pyte...
# -*- encoding: utf-8 -*- from __future__ import absolute_import, unicode_literals import logging from bs4 import BeautifulSoup import requests from .base import HostHotelScraper, RequestsGuard from ..conf import settings log = logging.getLogger(__name__) class MarriottAvailability(HostHotelScraper): name = ...
[ "bs4.BeautifulSoup", "requests.Session", "logging.getLogger" ]
[((233, 260), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (250, 260), False, 'import logging\n'), ((1890, 1908), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1906, 1908), False, 'import requests\n'), ((2176, 2205), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.text', '"""lxm...
import random from app.genetic.genes.fundamental.statement_values.gene_statement_value import ( GeneStatementValue, ) class PEGene(GeneStatementValue): def __init__(self): super().__init__() self.indicator = "P/E" self.compared_value = random.uniform(2, 40)
[ "random.uniform" ]
[((271, 292), 'random.uniform', 'random.uniform', (['(2)', '(40)'], {}), '(2, 40)\n', (285, 292), False, 'import random\n')]
import copy import numpy as np from NodeTag import NodeTag class NormPolishExpression: @staticmethod def _isViolatingBallotingIfSwap(expression, indexOfOperator): # indexOfOperator must be pointed to an operator assert (NodeTag.isOperator(expression[indexOfOperator])) p = indexOfOperator ...
[ "copy.deepcopy", "NodeTag.NodeTag.isOperand", "NodeTag.NodeTag.isSameTag", "NodeTag.NodeTag.invertTag", "NodeTag.NodeTag.isOperator" ]
[((240, 287), 'NodeTag.NodeTag.isOperator', 'NodeTag.isOperator', (['expression[indexOfOperator]'], {}), '(expression[indexOfOperator])\n', (258, 287), False, 'from NodeTag import NodeTag\n'), ((1611, 1642), 'copy.deepcopy', 'copy.deepcopy', (['self._expression'], {}), '(self._expression)\n', (1624, 1642), False, 'impo...
import typing import time import numpy as np import pyautogui as pg import vboard as vb class MouseClicker: def __init__(self): scr = vb.make_screenshot(bw=False) self.screenshot_wh = scr.shape[::-1] self.screen_wh = tuple(pg.size()) def click(self, ploc: typing.Tuple[int, int], lef...
[ "time.sleep", "vboard.cellid_as_pixelloc", "numpy.ravel_multi_index", "vboard.make_screenshot", "pyautogui.click", "pyautogui.size", "pyautogui.moveTo" ]
[((150, 178), 'vboard.make_screenshot', 'vb.make_screenshot', ([], {'bw': '(False)'}), '(bw=False)\n', (168, 178), True, 'import vboard as vb\n'), ((492, 519), 'pyautogui.moveTo', 'pg.moveTo', (['sloc[0]', 'sloc[1]'], {}), '(sloc[0], sloc[1])\n', (501, 519), True, 'import pyautogui as pg\n'), ((579, 602), 'pyautogui.cl...
#!/usr/bin/env python3 # Copyright (c) 2019 The Unit-e developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the getparameters RPC. Showcases how to pass chainparams to nodes and inject a new genesis block including ...
[ "test_framework.util.assert_equal" ]
[((1988, 2037), 'test_framework.util.assert_equal', 'assert_equal', (["params[0]['block_time_seconds']", '(24)'], {}), "(params[0]['block_time_seconds'], 24)\n", (2000, 2037), False, 'from test_framework.util import assert_equal\n'), ((2046, 2115), 'test_framework.util.assert_equal', 'assert_equal', (["params[0]['block...
""" Data readers for remote sensing devices (e.g., 3D data) Based on https://github.com/NWTC/datatools/blob/master/remote_sensing.py """ import numpy as np import pandas as pd expected_profiler_datatypes=['wind','winds','rass'] def profiler(fname,scans=None, data_type=None, datetime_format=...
[ "pandas.DataFrame", "pandas.datetime.today", "numpy.max", "numpy.arange", "pandas.to_datetime", "pandas.concat" ]
[((5468, 5489), 'pandas.concat', 'pd.concat', (['dataframes'], {}), '(dataframes)\n', (5477, 5489), True, 'import pandas as pd\n'), ((12293, 12346), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'block', 'columns': 'header', 'dtype': 'float'}), '(data=block, columns=header, dtype=float)\n', (12305, 12346), True, 'i...
from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from __init__ import db class User(db.Model): """Data model for user accounts.""" _...
[ "werkzeug.security.check_password_hash", "__init__.db.String", "__init__.db.Column", "werkzeug.security.generate_password_hash" ]
[((355, 394), '__init__.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (364, 394), False, 'from __init__ import db\n'), ((565, 629), '__init__.db.Column', 'db.Column', (['db.Boolean'], {'index': '(False)', 'unique': '(False)', 'nullable': '(False)'}), '(db.Bool...
"""Assign papers to area chairs.""" import openreview import sys if __name__ == '__main__': client = openreview.Client( baseurl='https://api.openreview.net', username='<EMAIL>', password='', ) notes = list( openreview.tools.iterget_notes( client, ...
[ "openreview.tools.iterget_notes", "openreview.helpers.get_conference", "openreview.Client" ]
[((109, 201), 'openreview.Client', 'openreview.Client', ([], {'baseurl': '"""https://api.openreview.net"""', 'username': '"""<EMAIL>"""', 'password': '""""""'}), "(baseurl='https://api.openreview.net', username='<EMAIL>',\n password='')\n", (126, 201), False, 'import openreview\n'), ((599, 655), 'openreview.helpers....
from theia.watcher import (FileSource, DirectoryEventHandler, SourcesDaemon) import tempfile from unittest import mock from watchdog.observers import Observer from theia.comm import Client import os def test_file_source_modified(): mock_callback = mock.MagicM...
[ "unittest.mock.patch.object", "tempfile.NamedTemporaryFile", "tempfile.TemporaryDirectory", "unittest.mock.MagicMock", "theia.watcher.FileSource", "theia.comm.Client", "theia.watcher.DirectoryEventHandler", "os.path.join", "watchdog.observers.Observer" ]
[((2764, 2800), 'unittest.mock.patch.object', 'mock.patch.object', (['Observer', '"""start"""'], {}), "(Observer, 'start')\n", (2781, 2800), False, 'from unittest import mock\n'), ((2802, 2841), 'unittest.mock.patch.object', 'mock.patch.object', (['Observer', '"""schedule"""'], {}), "(Observer, 'schedule')\n", (2819, 2...
# Generated by Django 3.1.1 on 2020-11-28 02:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('resin', '0001_initial'), ] operations = [ migrations.AlterField( model_name='calculator', name='target_resin', ...
[ "django.db.models.PositiveIntegerField" ]
[((333, 362), 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {}), '()\n', (360, 362), False, 'from django.db import migrations, models\n'), ((492, 521), 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {}), '()\n', (519, 521), False, 'from django.db import migra...
"""Test suite for websitemailer.driver""" import sys from distutils.spawn import find_executable from loguru import logger from pathlib import Path from websitemailer.driver import get_version_via_com, get_chrome_driver, get_chrome_driver_version from websitemailer.screenshots import take_screenshot __author__ = "<NA...
[ "websitemailer.screenshots.take_screenshot", "loguru.logger.info", "pathlib.Path", "websitemailer.driver.get_chrome_driver_version", "websitemailer.driver.get_version_via_com", "websitemailer.driver.get_chrome_driver" ]
[((1080, 1109), 'websitemailer.driver.get_chrome_driver_version', 'get_chrome_driver_version', (['(94)'], {}), '(94)\n', (1105, 1109), False, 'from websitemailer.driver import get_version_via_com, get_chrome_driver, get_chrome_driver_version\n'), ((1494, 1515), 'websitemailer.driver.get_chrome_driver', 'get_chrome_driv...
import pytest from pymobiledevice3.utils import sanitize_ios_version @pytest.mark.parametrize('version, sanitized', [ ('14.5', '14.5'), ('14.5.1', '14.5'), ('0.0', '0.0'), ('9999.9999', '9999.9999'), ('9999.9999.9999', '9999.9999'), ]) def test_sanitize_ios_version(version, sanitized): assert...
[ "pytest.mark.parametrize", "pymobiledevice3.utils.sanitize_ios_version" ]
[((73, 243), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""version, sanitized"""', "[('14.5', '14.5'), ('14.5.1', '14.5'), ('0.0', '0.0'), ('9999.9999',\n '9999.9999'), ('9999.9999.9999', '9999.9999')]"], {}), "('version, sanitized', [('14.5', '14.5'), ('14.5.1',\n '14.5'), ('0.0', '0.0'), ('9999.99...
from METSFlask import db class METS(db.Model): id = db.Column(db.Integer, primary_key=True) metsfile = db.Column(db.String(120), index=True, unique=True) nickname = db.Column(db.String(120)) metslist = db.Column(db.PickleType, index=True, unique=True) dcmetadata = db.Column(db.PickleType) origi...
[ "METSFlask.db.String", "METSFlask.db.Integer", "METSFlask.db.Column" ]
[((57, 96), 'METSFlask.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (66, 96), False, 'from METSFlask import db\n'), ((219, 268), 'METSFlask.db.Column', 'db.Column', (['db.PickleType'], {'index': '(True)', 'unique': '(True)'}), '(db.PickleType, index=True, uni...
# # Copyright 2021 <NAME> # # 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, sof...
[ "nasty_utils.DecompressingTextIOWrapper" ]
[((1128, 1202), 'nasty_utils.DecompressingTextIOWrapper', 'DecompressingTextIOWrapper', (['self.path'], {'encoding': '"""UTF-8"""', 'progress_bar': '(True)'}), "(self.path, encoding='UTF-8', progress_bar=True)\n", (1154, 1202), False, 'from nasty_utils import DecompressingTextIOWrapper\n')]
from os import path import sys import unittest from test_utils import get_content , PRESETS_DIR from gh import User import httpretty class TestUserFromUserId(unittest.TestCase): def setUp(self): httpretty.HTTPretty.enable() httpretty.register_uri(httpretty.HTTPretty.GET,'http://growthhackers.com/member/ev...
[ "unittest.main", "httpretty.HTTPretty.disable", "httpretty.HTTPretty.enable", "gh.User.from_user_id", "test_utils.get_content" ]
[((856, 871), 'unittest.main', 'unittest.main', ([], {}), '()\n', (869, 871), False, 'import unittest\n'), ((207, 235), 'httpretty.HTTPretty.enable', 'httpretty.HTTPretty.enable', ([], {}), '()\n', (233, 235), False, 'import httpretty\n'), ((380, 409), 'gh.User.from_user_id', 'User.from_user_id', (['"""everette"""'], {...
import torch import triton import os class _conv(torch.autograd.Function): src = triton.read(os.path.join(os.path.dirname(__file__), 'conv.c')) kernel = dict() @staticmethod def unpack(IDX, CI, R, S): s = IDX % S cr = IDX // S r = cr % R ci = cr // R return ci, r, s...
[ "triton.cdiv", "os.path.dirname", "torch.empty", "torch.arange", "triton.kernel" ]
[((1444, 1498), 'torch.empty', 'torch.empty', (['[Z, CO, P, Q]'], {'dtype': 'dtype', 'device': 'device'}), '([Z, CO, P, Q], dtype=dtype, device=device)\n', (1455, 1498), False, 'import torch\n'), ((111, 136), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (126, 136), False, 'import os\n'), ((...
from random import choice def emoji_random_func(bot): guild = bot.get_guild(747480356625711204) guild_emojis = choice(guild.emojis) if guild_emojis.animated and guild_emojis.is_usable(): return f'<a:{guild_emojis.name}:{guild_emojis.id}>' elif not guild_emojis.animated and guild_emojis.is_usab...
[ "random.choice" ]
[((121, 141), 'random.choice', 'choice', (['guild.emojis'], {}), '(guild.emojis)\n', (127, 141), False, 'from random import choice\n')]
import datetime from .functions import read_json, aggregate_surveys_no_config import glob import json import logging import math import numpy as np import os import pandas as pd import pytz from typing import List def convert_time_to_date(submit_time, day, time): """ Takes a single array of timings and a sing...
[ "pandas.DataFrame", "pandas.Timestamp", "math.ceil", "pandas.merge", "pandas.offsets.Micro", "numpy.where", "numpy.array", "pandas.Series", "datetime.timedelta", "pandas.Timedelta", "pandas.concat" ]
[((2432, 2456), 'pandas.Timestamp', 'pd.Timestamp', (['time_start'], {}), '(time_start)\n', (2444, 2456), True, 'import pandas as pd\n'), ((2469, 2491), 'pandas.Timestamp', 'pd.Timestamp', (['time_end'], {}), '(time_end)\n', (2481, 2491), True, 'import pandas as pd\n'), ((2586, 2608), 'math.ceil', 'math.ceil', (['(week...
# -*- coding:utf-8 -*- from invoke import task from steem.settings import settings from utils.logging.logger import logger from action.claim.bot import ClaimBot @task(help={ 'account': 'the account to claim the rewards', 'token': 'the token symbol to do the claim', 'debug': 'enable the debug mode...
[ "invoke.task", "action.claim.bot.ClaimBot", "steem.settings.settings.set_steem_node" ]
[((167, 308), 'invoke.task', 'task', ([], {'help': "{'account': 'the account to claim the rewards', 'token':\n 'the token symbol to do the claim', 'debug': 'enable the debug mode'}"}), "(help={'account': 'the account to claim the rewards', 'token':\n 'the token symbol to do the claim', 'debug': 'enable the debug ...
"""Command line interface module for the disassembler.""" import os from chip8_dasm import __version__ from chip8_dasm.disassembler import Disassembler from chip8_dasm.writer import Writer import click CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) @click.command(context_settings=CONTEXT_SETTINGS) @cl...
[ "click.version_option", "os.path.basename", "click.option", "click.echo", "chip8_dasm.writer.Writer", "click.command", "click.Path", "chip8_dasm.disassembler.Disassembler" ]
[((268, 316), 'click.command', 'click.command', ([], {'context_settings': 'CONTEXT_SETTINGS'}), '(context_settings=CONTEXT_SETTINGS)\n', (281, 316), False, 'import click\n'), ((318, 359), 'click.version_option', 'click.version_option', ([], {'version': '__version__'}), '(version=__version__)\n', (338, 359), False, 'imp...
# -*- coding: utf-8 -*- import re import unittest from xml.etree import ElementTree from macropy.case_classes import macros, case from macropy.experimental.pyxl_strings import macros, p # noqa: F811 from macropy.tracing import macros, require # noqa: F811, F401 from pyxl import html # noqa: F401 def normalize(st...
[ "re.sub" ]
[((404, 430), 're.sub', 're.sub', (['"""\n *"""', '""""""', 'string'], {}), "('\\n *', '', string)\n", (410, 430), False, 'import re\n')]
#!/usr/bin/env python # heatmap - High performance heatmap creation in C. # # The MIT License (MIT) # # Copyright (c) 2013 <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 re...
[ "ctypes.CFUNCTYPE", "os.path.dirname", "Image.frombuffer", "ctypes.c_ulong" ]
[((1882, 1909), 'ctypes.CFUNCTYPE', 'CFUNCTYPE', (['c_float', 'c_float'], {}), '(c_float, c_float)\n', (1891, 1909), False, 'from ctypes import CDLL, CFUNCTYPE, c_float, c_ulong, c_ubyte\n'), ((3953, 4014), 'Image.frombuffer', 'Image.frombuffer', (['"""RGBA"""', '(w, h)', 'rawimg', '"""raw"""', '"""RGBA"""', '(0)', '(1...
import requests import urllib from lxml import html from cssselect import GenericTranslator import re TRACK_VARIATION_MIN = 0.9 TRACK_VARIATION_MAX = 1.1 # .1 difference for production changes TRACK_VARIATION_MS = 1000 * 30 # 30 Seconds in case some intro / outro was added purchase_title_regex = re.compile(re.escap...
[ "cssselect.GenericTranslator", "re.escape", "lxml.html.fromstring", "urllib.parse.quote", "requests.get" ]
[((1363, 1386), 'requests.get', 'requests.get', (['query_url'], {}), '(query_url)\n', (1375, 1386), False, 'import requests\n'), ((1406, 1442), 'lxml.html.fromstring', 'html.fromstring', (['search_request.text'], {}), '(search_request.text)\n', (1421, 1442), False, 'from lxml import html\n'), ((312, 343), 're.escape', ...
from river import metrics, utils from river.metrics.multioutput.base import MultiOutputMetric __all__ = ["MicroAverage"] class MicroAverage(MultiOutputMetric, metrics.base.WrapperMetric): """Micro-average wrapper. The provided metric is updated with the value of each output. Parameters ---------- ...
[ "river.utils.inspect.ismoclassifier", "river.utils.inspect.ismoregressor" ]
[((699, 733), 'river.utils.inspect.ismoregressor', 'utils.inspect.ismoregressor', (['model'], {}), '(model)\n', (726, 733), False, 'from river import metrics, utils\n'), ((648, 683), 'river.utils.inspect.ismoclassifier', 'utils.inspect.ismoclassifier', (['model'], {}), '(model)\n', (676, 683), False, 'from river import...
import json from pathlib import Path import pytest from bravado_core.spec import Spec from bravado.response import BravadoResponse, BravadoResponseMetadata from gc3_query.lib import gc3_cfg from gc3_query.lib import * from gc3_query.lib import gc3_cfg from gc3_query.lib.paas_classic import PaaSServiceBase from gc3_q...
[ "gc3_query.lib.gc3_cfg.BASE_DIR.joinpath", "pathlib.Path", "pytest.fixture", "gc3_query.lib.gc3_cfg.paas_classic.services.get" ]
[((647, 686), 'gc3_query.lib.gc3_cfg.BASE_DIR.joinpath', 'gc3_cfg.BASE_DIR.joinpath', (['"""etc/config"""'], {}), "('etc/config')\n", (672, 686), False, 'from gc3_query.lib import gc3_cfg\n'), ((1029, 1045), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1043, 1045), False, 'import pytest\n'), ((564, 578), 'pat...
import itertools as it input = [int(line.strip()) for line in open('input/day09.txt').readlines()] def can_sum(source_nums, target): for c in it.combinations(source_nums, 2): if sum(c) == target: return True return False start = 0 end = 25 source_nums = input[start:end] target = input[end] while can_...
[ "itertools.combinations" ]
[((147, 178), 'itertools.combinations', 'it.combinations', (['source_nums', '(2)'], {}), '(source_nums, 2)\n', (162, 178), True, 'import itertools as it\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Filters documents or their sections in the simple HTML format (in other words: after ``extract_zim_htmls.py``, but before ``convert.py``). """ from argparse import ArgumentParser from functools import partial import gzip import json import logging from multiprocessin...
[ "zim_to_corpus.transformations.remove_empty_tags", "zim_to_corpus.transformations.remove_sections", "argparse.ArgumentParser", "zim_to_corpus.html.get_html_title", "zim_to_corpus.readers.parse_simple_html", "os.nice", "os.path.join", "json.loads", "multiprocessing_logging.install_mp_handler", "fun...
[((726, 761), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (740, 761), False, 'from argparse import ArgumentParser\n'), ((4088, 4147), 'logging.info', 'logging.info', (['f"""Filtering {input_file} to {output_file}..."""'], {}), "(f'Filtering {input_file} to {...
from __future__ import print_function import mxnet as mx import numpy as np from mxnet import nd, autograd, gluon mx.random.seed(1) # ctx = mx.gpu() ctx = mx.cpu() batch_size = 64 num_inputs = 784 num_outputs = 10 def transform(data, label): return nd.transpose(data.astype(np.float32), (2, 0, 1)) / 255, label...
[ "mxnet.autograd.record", "mxnet.random.seed", "mxnet.metric.Accuracy", "mxnet.gluon.nn.Dense", "mxnet.gluon.nn.MaxPool2D", "mxnet.gluon.nn.Conv2D", "mxnet.gluon.loss.SoftmaxCrossEntropyLoss", "mxnet.gluon.nn.Sequential", "mxnet.init.Xavier", "mxnet.cpu", "mxnet.gluon.data.vision.MNIST", "mxnet...
[((116, 133), 'mxnet.random.seed', 'mx.random.seed', (['(1)'], {}), '(1)\n', (130, 133), True, 'import mxnet as mx\n'), ((158, 166), 'mxnet.cpu', 'mx.cpu', ([], {}), '()\n', (164, 166), True, 'import mxnet as mx\n'), ((670, 691), 'mxnet.gluon.nn.Sequential', 'gluon.nn.Sequential', ([], {}), '()\n', (689, 691), False, '...
import logging from abc import ABC, abstractmethod from typing import Optional from uuid import uuid4 import requests from common.utils import get_hex_string from django.db import models from scalade.entities import EntityContract class ModelContract(models.Model): uuid = models.UUIDField( primary_key=T...
[ "django.db.models.DateTimeField", "django.db.models.UUIDField", "common.utils.get_hex_string", "logging.getLogger" ]
[((281, 386), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'primary_key': '(True)', 'default': 'uuid4', 'editable': '(False)', 'verbose_name': '"""Resource Identifier"""'}), "(primary_key=True, default=uuid4, editable=False,\n verbose_name='Resource Identifier')\n", (297, 386), False, 'from django.db impo...
import bpy def PropObjectMotionsImport(): return bpy.props.BoolProperty( name='Import Motions', description='Import embedded motions as actions', default=True ) def PropObjectMeshSplitByMaterials(): return bpy.props.BoolProperty( name='Split Mesh By Materials', de...
[ "bpy.props.BoolProperty" ]
[((55, 169), 'bpy.props.BoolProperty', 'bpy.props.BoolProperty', ([], {'name': '"""Import Motions"""', 'description': '"""Import embedded motions as actions"""', 'default': '(True)'}), "(name='Import Motions', description=\n 'Import embedded motions as actions', default=True)\n", (77, 169), False, 'import bpy\n'), (...
import asyncio import logging import aiohttp from aiogram import Bot, Dispatcher, executor from aiogram.types import * from jobs.defipulse_job import DefiPulseFetcher, DefiPulseKeeper from jobs.price_job import PriceFetcher, PriceHandler from lib.broadcast import Broadcaster from localization import LocalizationManag...
[ "jobs.price_job.PriceHandler", "jobs.price_job.PriceFetcher", "asyncio.get_event_loop", "aiogram.executor.start_polling", "dialog.init_dialogs", "lib.broadcast.Broadcaster", "aiogram.Dispatcher", "aiohttp.ClientSession", "logging.info", "lib.config.Config", "aiogram.Bot", "jobs.defipulse_job.D...
[((505, 519), 'lib.depcont.DepContainer', 'DepContainer', ([], {}), '()\n', (517, 519), False, 'from lib.depcont import DepContainer\n'), ((536, 544), 'lib.config.Config', 'Config', ([], {}), '()\n', (542, 544), False, 'from lib.config import Config\n'), ((842, 865), 'logging.info', 'logging.info', (["('-' * 100)"], {}...
#!/usr/bin/env python import os import django import argparse import arrow from django.db import models from django.utils import timezone def get_arguments(): parser = argparse.ArgumentParser(description='Fetch delivery statistics for Devilry users.') parser.add_argument( '--username-list', ...
[ "devilry.devilry_group.models.GroupComment.objects.filter", "arrow.get", "django.setup", "os.environ.setdefault", "argparse.ArgumentParser", "devilry.apps.core.models.Period.objects.get", "django.utils.timezone.now", "devilry.apps.core.models.Candidate.objects.select_related", "django.db.models.Oute...
[((176, 264), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Fetch delivery statistics for Devilry users."""'}), "(description=\n 'Fetch delivery statistics for Devilry users.')\n", (199, 264), False, 'import argparse\n'), ((1022, 1067), 'os.environ.setdefault', 'os.environ.setdefault...
# Copyright 2020 Lorna Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ "collections.namedtuple", "torch.utils.model_zoo.load_url" ]
[((836, 968), 'collections.namedtuple', 'collections.namedtuple', (['"""GlobalParams"""', "['num_classes', 'aux_logits', 'transform_input', 'blocks', 'dropout_rate',\n 'image_size']"], {}), "('GlobalParams', ['num_classes', 'aux_logits',\n 'transform_input', 'blocks', 'dropout_rate', 'image_size'])\n", (858, 968)...
import numpy as np def linear_y(t0, t_step, slope, y0): """ A function to generate y values that satisfied to linear relationship with independent value t_list, slope, and start point of y Parameters: ----------- t0: t0, with dependent variable as startpoint_y t_step: step of t slope: slop...
[ "numpy.max", "numpy.abs", "numpy.random.normal" ]
[((2231, 2272), 'numpy.random.normal', 'np.random.normal', (['deltat_mean', 'deltat_std'], {}), '(deltat_mean, deltat_std)\n', (2247, 2272), True, 'import numpy as np\n'), ((2286, 2327), 'numpy.random.normal', 'np.random.normal', (['deltas_mean', 'deltas_std'], {}), '(deltas_mean, deltas_std)\n', (2302, 2327), True, 'i...
import os import paramiko import getpass import matplotlib as plt from configparser import ConfigParser OF_WIKI = 'wiki' OF_LATEX = 'latex' OF_CONSOLE = 'console' def create_dir(directory): if not os.path.exists(directory): os.makedirs(directory) def get_separators(output_format): if output_format ==...
[ "os.makedirs", "paramiko.SSHClient", "os.path.isdir", "os.path.realpath", "os.path.exists", "configparser.ConfigParser", "os.path.join", "os.listdir" ]
[((3220, 3243), 'os.path.isdir', 'os.path.isdir', (['src_file'], {}), '(src_file)\n', (3233, 3243), False, 'import os\n'), ((5343, 5386), 'os.path.join', 'os.path.join', (['file_dir', '"""upload_config.ini"""'], {}), "(file_dir, 'upload_config.ini')\n", (5355, 5386), False, 'import os\n'), ((5408, 5422), 'configparser....
# enabling shell exec from any directory # enabling shell exec from any directory import os workingDir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../') import sys sys.path.append(workingDir) # configure params # configure params import config_data as conf import SharedDataMethods as Shared share...
[ "sys.path.append", "SharedDataMethods.SharedDataMethods", "os.path.realpath", "DownloadMJUData2Localhost.DownloadMJUData2Localhost", "MJUData2OCDSConversion.MJUData2OCDSConversion", "config_data.time.time", "TbfyKGRawJSON2FeatureVectors.TbfyKGRawJSON2FeatureVectors", "MJURaw2FeatureVectors.MJURaw2Feat...
[((184, 211), 'sys.path.append', 'sys.path.append', (['workingDir'], {}), '(workingDir)\n', (199, 211), False, 'import sys\n'), ((331, 361), 'SharedDataMethods.SharedDataMethods', 'Shared.SharedDataMethods', (['conf'], {}), '(conf)\n', (355, 361), True, 'import SharedDataMethods as Shared\n'), ((1254, 1307), 'DownloadM...
import numpy as np from typing import Optional, Union, Sequence, List, Callable, Tuple from scipy.ndimage.filters import gaussian_filter from scipy.ndimage import map_coordinates import itertools import collections from collections import OrderedDict import torch import os from scipy import ndimage as ndi from batc...
[ "numpy.arange", "numpy.unique", "numpy.pad", "numpy.meshgrid", "numpy.stack", "torch.where", "numpy.floor_divide", "numpy.asarray", "numpy.squeeze", "numpy.vstack", "numpy.random.uniform", "numpy.subtract", "numpy.zeros", "numpy.unravel_index", "numpy.expand_dims", "numpy.any", "nump...
[((1082, 1105), 'numpy.array', 'np.array', (['data[0].shape'], {}), '(data[0].shape)\n', (1090, 1105), True, 'import numpy as np\n'), ((1122, 1141), 'numpy.array', 'np.array', (['new_shape'], {}), '(new_shape)\n', (1130, 1141), True, 'import numpy as np\n'), ((1149, 1175), 'numpy.any', 'np.any', (['(shape != new_shape)...
import gi import time from ctypes import * gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GdkPixbuf import svgNanoparser_arm as svgparser class MyWindow(Gtk.Window): def __init__(self): super().__init__(title="Welcome to the labyrinth!") self.maximize() #Creates...
[ "gi.require_version", "gi.repository.Gtk.main", "gi.repository.Gtk.Adjustment", "gi.repository.Gtk.SpinButton", "svgNanoparser_arm.svgNanoparser", "gi.repository.Gtk.Button", "gi.repository.Gtk.Notebook", "gi.repository.Gtk.Adjustment.new", "gi.repository.GdkPixbuf.Pixbuf.new_from_file", "gi.repos...
[((44, 76), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (62, 76), False, 'import gi\n'), ((10043, 10053), 'gi.repository.Gtk.main', 'Gtk.main', ([], {}), '()\n', (10051, 10053), False, 'from gi.repository import Gtk, GdkPixbuf\n'), ((388, 402), 'gi.repository.Gtk.No...
import pymongo from flask import Flask, jsonify, request def get_db_connection(uri): client = pymongo.MongoClient(uri) return client.cryptongo app = Flask(__name__) db_connection = get_db_connection('mongodb://localhost:27017/') def get_documents(): params = {} name = request.args.get('name', '') ...
[ "pymongo.MongoClient", "flask.jsonify", "flask.Flask", "flask.request.args.get" ]
[((161, 176), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (166, 176), False, 'from flask import Flask, jsonify, request\n'), ((100, 124), 'pymongo.MongoClient', 'pymongo.MongoClient', (['uri'], {}), '(uri)\n', (119, 124), False, 'import pymongo\n'), ((291, 319), 'flask.request.args.get', 'request.args.g...
import datetime def date_ranges(start_date, end_date, date_format='%Y-%m-%d'): start_date = datetime.datetime.strptime(start_date, date_format) end_date = datetime.datetime.strptime(end_date, date_format) ranges = [] while start_date + datetime.timedelta(weeks=8) < end_date: ranges.append((sta...
[ "datetime.datetime.strptime", "datetime.timedelta" ]
[((98, 149), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['start_date', 'date_format'], {}), '(start_date, date_format)\n', (124, 149), False, 'import datetime\n'), ((165, 214), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['end_date', 'date_format'], {}), '(end_date, date_format)\n', (...
import logging import os import requests from urllib.parse import parse_qs from auth import TwitterAuth log = logging.getLogger(__name__) log.setLevel(os.environ.get('LOG_LEVEL', 'WARNING')) SEARCH_ENDPOINT_KEY = '/search/tweets' TIMELINE_ENDPOINT_KEY = '/statuses/user_timeline' SEARCH_COUNT = 100 TIMELINE_COUNT = 2...
[ "os.environ.get", "requests.get", "auth.TwitterAuth", "logging.getLogger" ]
[((112, 139), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (129, 139), False, 'import logging\n'), ((508, 521), 'auth.TwitterAuth', 'TwitterAuth', ([], {}), '()\n', (519, 521), False, 'from auth import TwitterAuth\n'), ((153, 191), 'os.environ.get', 'os.environ.get', (['"""LOG_LEVEL"""'...
# Copyright(c) 2019 Unitedstack Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ "mock.patch.object", "masakari_monitors_icmp_plugin.tests.unit.fakes.FakeHost", "masakari_monitors_icmp_plugin.ha.api.Api", "mock.Mock", "masakari_monitors_icmp_plugin.tests.unit.fakes.FakeSegment" ]
[((1014, 1066), 'masakari_monitors_icmp_plugin.tests.unit.fakes.FakeHost', 'FakeHost', ([], {'name': '"""fake_host1"""', 'failover_segment_id': '"""1"""'}), "(name='fake_host1', failover_segment_id='1')\n", (1022, 1066), False, 'from masakari_monitors_icmp_plugin.tests.unit.fakes import FakeHost, FakeSegment\n'), ((110...
import numpy as np # print('numpy:', np.__version__) # print(dir(np)) # Listas de Python Normal python_list = [1, 2, 3, 4, 5] two_dimensional_list = [[0, 1, 2], [3, 4, 5], [6, 7, 8]] # Criando um numpy (numeral python) array de uma python list numpy_array_from_list_with_int = np.array(python_list) # Criando uma num...
[ "numpy.array" ]
[((280, 301), 'numpy.array', 'np.array', (['python_list'], {}), '(python_list)\n', (288, 301), True, 'import numpy as np\n'), ((370, 404), 'numpy.array', 'np.array', (['python_list'], {'dtype': 'float'}), '(python_list, dtype=float)\n', (378, 404), True, 'import numpy as np\n'), ((474, 512), 'numpy.array', 'np.array', ...
# -*- coding: utf-8 -*- # Copyright 2018 New Vector Ltd # # 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 la...
[ "synapse.util.glob_to_regex" ]
[((2506, 2528), 'synapse.util.glob_to_regex', 'glob_to_regex', (['user_id'], {}), '(user_id)\n', (2519, 2528), False, 'from synapse.util import glob_to_regex\n'), ((2561, 2581), 'synapse.util.glob_to_regex', 'glob_to_regex', (['alias'], {}), '(alias)\n', (2574, 2581), False, 'from synapse.util import glob_to_regex\n')]
# -*- coding: utf-8 -*- from django import forms from json import dumps as json_dumps class TypeaheadInput(forms.TextInput): """ Input class for typeahead-enabled widgets. """ input_type = 'search' template_name = 'django_typeahead/input.html' options = None datasets = [] class Media:...
[ "json.dumps" ]
[((1653, 1675), 'json.dumps', 'json_dumps', (['json_attrs'], {}), '(json_attrs)\n', (1663, 1675), True, 'from json import dumps as json_dumps\n')]
import requests import datetime import pandas as pd import psycopg2 from pprint import pprint import urllib import io import sqlalchemy from sqlalchemy import create_engine import re import time from datetime import timedelta import cryptocompare as cc import ccxt from datetime import timedelta from pytz import timezon...
[ "pandas.DataFrame", "logging.error", "re.split", "boto3.client", "datetime.datetime.fromtimestamp", "ccxt.binance", "os.environ.get", "datetime.datetime.utcfromtimestamp", "pathlib.Path", "ccxt.okex", "ccxt.okcoinusd", "datetime.timedelta", "requests.get", "ccxt.bitfinex", "datetime" ]
[((470, 491), 'datetime', 'datetime', (['(2020)', '(3)', '(25)'], {}), '(2020, 3, 25)\n', (478, 491), False, 'import datetime\n'), ((678, 713), 'os.environ.get', 'os.environ.get', (['"""AWS_ACCESS_KEY_ID"""'], {}), "('AWS_ACCESS_KEY_ID')\n", (692, 713), False, 'import os\n'), ((736, 775), 'os.environ.get', 'os.environ....
# load the order request from json import json f = open('../data/FreshProductOrder.json','r') order = json.load(f) print(order) import requests response = requests.get('https://httpbin.org/ip') print('Your IP is {0}'.format(response.json()['origin'])) # call create order service res = requests.post("http://ordercmd...
[ "requests.post", "json.load", "requests.get" ]
[((102, 114), 'json.load', 'json.load', (['f'], {}), '(f)\n', (111, 114), False, 'import json\n'), ((157, 195), 'requests.get', 'requests.get', (['"""https://httpbin.org/ip"""'], {}), "('https://httpbin.org/ip')\n", (169, 195), False, 'import requests\n'), ((290, 346), 'requests.post', 'requests.post', (['"""http://ord...
import torch import torch.nn as nn print("Hello world!") for i in range(10): print(i) print(torch.cuda.is_available())
[ "torch.cuda.is_available" ]
[((100, 125), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (123, 125), False, 'import torch\n')]
from django.contrib.auth.models import AbstractUser from django.db import models class UserCRM(AbstractUser): """ Модель пользователя системы взаимоотношения с клиентом (CRM). """ class RoleUser(models.TextChoices): USER = 'client', 'Клиент' ADMIN = 'admin', 'Администратор' DI...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.FloatField", "django.db.models.BooleanField", "django.db.models.IntegerField", "django.db.models.SmallIntegerField", "django.db.models.DateField", "django.db.models.DateTimeField" ]
[((367, 420), 'django.db.models.IntegerField', 'models.IntegerField', (['"""chat_id"""'], {'blank': '(True)', 'null': '(True)'}), "('chat_id', blank=True, null=True)\n", (386, 420), False, 'from django.db import models\n'), ((468, 535), 'django.db.models.CharField', 'models.CharField', (['"""telegram"""'], {'max_length...
from transformers import BertTokenizer class TokenizerWrapper: def __init__(self, bert_model): self.tokenizer = BertTokenizer.from_pretrained(bert_model) # returns the value def get_tokens(self, string): return self.tokenizer.vocab[string] # returns a list of tokens ...
[ "transformers.BertTokenizer.from_pretrained" ]
[((132, 173), 'transformers.BertTokenizer.from_pretrained', 'BertTokenizer.from_pretrained', (['bert_model'], {}), '(bert_model)\n', (161, 173), False, 'from transformers import BertTokenizer\n')]
# Copyright (c) 2018 <NAME>. # Cura is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt, QTimer from UM.Qt.ListModel import ListModel from UM.i18n import i18nCatalog from UM.Util import parseBool from cura.PrinterOutput.PrinterOutputDevice import ConnectionType from cura.Settings.CuraCon...
[ "PyQt5.QtCore.QTimer", "UM.i18n.i18nCatalog", "cura.Settings.CuraContainerRegistry.CuraContainerRegistry.getInstance" ]
[((857, 876), 'UM.i18n.i18nCatalog', 'i18nCatalog', (['"""cura"""'], {}), "('cura')\n", (868, 876), False, 'from UM.i18n import i18nCatalog\n'), ((1204, 1212), 'PyQt5.QtCore.QTimer', 'QTimer', ([], {}), '()\n', (1210, 1212), False, 'from PyQt5.QtCore import Qt, QTimer\n'), ((2145, 2180), 'cura.Settings.CuraContainerReg...
import numpy as np import pandas as pd import anomaly_detection dat = np.random.random(24*4*30) + 10 dts = pd.date_range(start='2018-08-01', freq='15min', periods=24*4*30) df = pd.DataFrame(dat, index=dts, columns=['y']) outliers = np.random.randint(low=0, high=24*4*30, size=20) df.y.iloc[outliers] = df.y.iloc[outlie...
[ "pandas.DataFrame", "numpy.random.randint", "pandas.date_range", "numpy.random.random" ]
[((108, 176), 'pandas.date_range', 'pd.date_range', ([], {'start': '"""2018-08-01"""', 'freq': '"""15min"""', 'periods': '(24 * 4 * 30)'}), "(start='2018-08-01', freq='15min', periods=24 * 4 * 30)\n", (121, 176), True, 'import pandas as pd\n'), ((178, 221), 'pandas.DataFrame', 'pd.DataFrame', (['dat'], {'index': 'dts',...
# -*- coding: utf-8 -*- # # Copyright 2018-2021- Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in co...
[ "renku.core.management.command_builder.command.inject.autoparams", "pathlib.Path", "importlib.resources.files", "renku.core.utils.git.get_hook_path" ]
[((1928, 1947), 'renku.core.management.command_builder.command.inject.autoparams', 'inject.autoparams', ([], {}), '()\n', (1945, 1947), False, 'from renku.core.management.command_builder.command import inject\n'), ((1296, 1343), 'renku.core.utils.git.get_hook_path', 'get_hook_path', ([], {'name': 'hook', 'repository': ...
# Copyright 2019, Imperial College London # # CO416 - Machine Learning for Imaging # # This file: Functions to visualise medical imaging data. import numpy as np import SimpleITK as sitk import matplotlib.pyplot as plt from ipywidgets import interact, fixed from IPython.display import display # Calculate parameters...
[ "matplotlib.pyplot.show", "numpy.floor", "SimpleITK.GetArrayFromImage", "numpy.max", "numpy.min", "ipywidgets.fixed", "matplotlib.pyplot.subplots" ]
[((629, 656), 'SimpleITK.GetArrayFromImage', 'sitk.GetArrayFromImage', (['img'], {}), '(img)\n', (651, 656), True, 'import SimpleITK as sitk\n'), ((1317, 1352), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(3)'], {'figsize': '(10, 4)'}), '(1, 3, figsize=(10, 4))\n', (1329, 1352), True, 'import matplotlib.pyp...
import inspect from pkgutil import iter_modules from six import itervalues def iter_submodules(module_path): '''Loads a module and all its submodules from a the given module path and returns them. If *any* module throws an exception while importing, that exception is thrown back. ''' mods = [] ...
[ "inspect.isclass", "pkgutil.iter_modules" ]
[((453, 479), 'pkgutil.iter_modules', 'iter_modules', (['mod.__path__'], {}), '(mod.__path__)\n', (465, 479), False, 'from pkgutil import iter_modules\n'), ((1109, 1129), 'inspect.isclass', 'inspect.isclass', (['obj'], {}), '(obj)\n', (1124, 1129), False, 'import inspect\n')]
from application import * from cffi import FFI ffi2 = FFI() ffi2.cdef(''' typedef struct { float transform[12]; uint32_t instanceId : 24; uint32_t mask : 8; uint32_t instanceOffset : 24; uint32_t flags : 8; uint64_t accelerationStructureHandle; } VkGeometryInstance; ''') @InstanceProcAddr d...
[ "cffi.FFI" ]
[((56, 61), 'cffi.FFI', 'FFI', ([], {}), '()\n', (59, 61), False, 'from cffi import FFI\n')]
from pommesdispatch.model.dispatch_model import run_dispatch_model, add_args def create_default_config(): content = """# Determine the model configuration # 1) Set overall workflow control parameters control_parameters: rolling_horizon: False aggregate_input: False countries: ['AT', 'BE', 'CH', 'CZ',...
[ "pommesdispatch.model.dispatch_model.add_args", "pommesdispatch.model.dispatch_model.run_dispatch_model" ]
[((1334, 1344), 'pommesdispatch.model.dispatch_model.add_args', 'add_args', ([], {}), '()\n', (1342, 1344), False, 'from pommesdispatch.model.dispatch_model import run_dispatch_model, add_args\n'), ((1859, 1879), 'pommesdispatch.model.dispatch_model.run_dispatch_model', 'run_dispatch_model', ([], {}), '()\n', (1877, 18...
import _dictdraw, sys d = {'smtp': 21, 'svn': 3690, 'dict': 2628, 'ircd': 6667, 'zope': 9673, 'fido': 60179} surface = _dictdraw.draw_dictionary(d) surface.write_to_png(sys.argv[1])
[ "_dictdraw.draw_dictionary" ]
[((125, 153), '_dictdraw.draw_dictionary', '_dictdraw.draw_dictionary', (['d'], {}), '(d)\n', (150, 153), False, 'import _dictdraw, sys\n')]
from grapher import Grapher from writer import RowWriter from parameters import Parameters params = Parameters() params.use_polymer_ra_nylon_parameters() excel_writer = RowWriter() excel_writer.save_row('Time,Mix,Measurement,' + ','.join(params.gases) + ',' + ','.join([g + '_diff' for g in params.gases])) for shee...
[ "parameters.Parameters", "grapher.Grapher", "writer.RowWriter" ]
[((101, 113), 'parameters.Parameters', 'Parameters', ([], {}), '()\n', (111, 113), False, 'from parameters import Parameters\n'), ((171, 182), 'writer.RowWriter', 'RowWriter', ([], {}), '()\n', (180, 182), False, 'from writer import RowWriter\n'), ((395, 404), 'grapher.Grapher', 'Grapher', ([], {}), '()\n', (402, 404),...
import numpy as np from multiprocessing import Pool, cpu_count import statsmodels.api as sm from tqdm import tqdm from itertools import product import pandas as pd # Load files from parent folders import os import sys try:sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) except NameError: pr...
[ "numpy.random.uniform", "numpy.nansum", "os.path.abspath", "numpy.random.seed", "numpy.isnan", "statsmodels.api.stats.ztest", "itertools.product", "numpy.concatenate", "multiprocessing.cpu_count" ]
[((585, 602), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (599, 602), True, 'import numpy as np\n'), ((503, 531), 'numpy.concatenate', 'np.concatenate', (['args'], {'axis': '(1)'}), '(args, axis=1)\n', (517, 531), True, 'import numpy as np\n'), ((1256, 1294), 'itertools.product', 'product', (['n_rang...
import bpy class tmpPanel(bpy.types.Panel): bl_label = "tmpPanel" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" bl_category = "Addons" def draw(self, context): layout = self.layout scriptBox = layout.box() scriptBox.label(text = "scriptBox") def register(): ...
[ "bpy.utils.unregister_class", "bpy.utils.register_class" ]
[((324, 358), 'bpy.utils.register_class', 'bpy.utils.register_class', (['tmpPanel'], {}), '(tmpPanel)\n', (348, 358), False, 'import bpy\n'), ((382, 418), 'bpy.utils.unregister_class', 'bpy.utils.unregister_class', (['tmpPanel'], {}), '(tmpPanel)\n', (408, 418), False, 'import bpy\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 13 16:49:29 2020 Copyright 2020 by <NAME>. """ # Standard imports: import numpy as np def fpcond(F): """Enforce the pole condition for the DFS coefficients F.""" # Get the dimension: n = len(F) Fp = np.zeros([n, n], dtype=compl...
[ "numpy.arange", "numpy.linalg.inv", "numpy.zeros", "numpy.ones" ]
[((292, 323), 'numpy.zeros', 'np.zeros', (['[n, n]'], {'dtype': 'complex'}), '([n, n], dtype=complex)\n', (300, 323), True, 'import numpy as np\n'), ((389, 404), 'numpy.ones', 'np.ones', (['[2, n]'], {}), '([2, n])\n', (396, 404), True, 'import numpy as np\n'), ((598, 613), 'numpy.ones', 'np.ones', (['[2, n]'], {}), '(...
import json import meilisearch from meilisearch.tests import BASE_URL, MASTER_KEY class TestSearchableAttributes: """ TESTS: searchableAttributes setting """ client = meilisearch.Client(BASE_URL, MASTER_KEY) index = None dataset_file = None dataset_json = None new_searchable_attributes = ['so...
[ "meilisearch.Client" ]
[((178, 218), 'meilisearch.Client', 'meilisearch.Client', (['BASE_URL', 'MASTER_KEY'], {}), '(BASE_URL, MASTER_KEY)\n', (196, 218), False, 'import meilisearch\n')]
from django.urls import path, include from . import views # App name app_name = 'contactform' # Url Patterns urlpatterns = [ path('', views.form, name = 'contact'), path('success/', views.success, name = 'success'), ]
[ "django.urls.path" ]
[((131, 167), 'django.urls.path', 'path', (['""""""', 'views.form'], {'name': '"""contact"""'}), "('', views.form, name='contact')\n", (135, 167), False, 'from django.urls import path, include\n'), ((175, 222), 'django.urls.path', 'path', (['"""success/"""', 'views.success'], {'name': '"""success"""'}), "('success/', v...
import time import json from threading import Lock, Thread from lomond import WebSocket class YerFaceWebsocketReader: def __init__(self, uri): self.packets = None self.packetsLock = Lock() self.websocket = None self.thread = None self.running = False self.uri = uri ...
[ "threading.Thread", "lomond.WebSocket", "json.loads", "time.sleep", "threading.Lock" ]
[((204, 210), 'threading.Lock', 'Lock', ([], {}), '()\n', (208, 210), False, 'from threading import Lock, Thread\n'), ((498, 536), 'threading.Thread', 'Thread', ([], {'target': 'self.runWebsocketThread'}), '(target=self.runWebsocketThread)\n', (504, 536), False, 'from threading import Lock, Thread\n'), ((945, 964), 'lo...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:\Users\jon.crall\code\hotspotter\hs_setup\../hotspotter/front\ResultDialog.ui' # # Created: Thu May 30 15:48:17 2013 # by: PyQt4 UI code generator 4.10.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCo...
[ "PyQt4.QtGui.QApplication.translate", "PyQt4.QtGui.QHBoxLayout", "PyQt4.QtCore.QMetaObject.connectSlotsByName", "PyQt4.QtGui.QVBoxLayout", "PyQt4.QtGui.QApplication", "PyQt4.QtGui.QDialogButtonBox", "PyQt4.QtGui.QDialog" ]
[((1864, 1892), 'PyQt4.QtGui.QApplication', 'QtGui.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (1882, 1892), False, 'from PyQt4 import QtCore, QtGui\n'), ((1912, 1927), 'PyQt4.QtGui.QDialog', 'QtGui.QDialog', ([], {}), '()\n', (1925, 1927), False, 'from PyQt4 import QtCore, QtGui\n'), ((551, 615), 'PyQt4.QtGui.Q...
import os import pickle import numpy as np import errno def do_pickle(pickle_bool, pickle_name, num_args, func, *args, **kwargs): ''' General function to handle pickling. @func: call this guy to get the result if pickle file not available. ''' if not pickle_bool: rets = func(*args, **kwargs...
[ "pickle.dump", "os.makedirs", "os.path.isdir", "os.path.isfile", "pickle.load", "numpy.array", "numpy.vstack" ]
[((971, 1014), 'numpy.vstack', 'np.vstack', (['(train_genuine, train_impostors)'], {}), '((train_genuine, train_impostors))\n', (980, 1014), True, 'import numpy as np\n'), ((1200, 1216), 'numpy.array', 'np.array', (['labels'], {}), '(labels)\n', (1208, 1216), True, 'import numpy as np\n'), ((334, 361), 'os.path.isfile'...
# coding=utf-8 """Symbol related helpers. This include for instance functions that check if a symbol is in CamlCase, snake_case and soon.""" import re __all__ = ( 'Symbol', 'isVerb' ) class Symbol(object): CamlCase = r'^_?[A-Z][A-Za-z0-9]*_?' camlCase = r'_?[a-z][A-Za-z0-9]*_?' SNAKE_CASE = r'_?...
[ "re.match" ]
[((469, 511), 're.match', 're.match', (["('%s$' % cls.CamlCase)", 'word', 're.U'], {}), "('%s$' % cls.CamlCase, word, re.U)\n", (477, 511), False, 'import re\n'), ((610, 652), 're.match', 're.match', (["('%s$' % cls.camlCase)", 'word', 're.U'], {}), "('%s$' % cls.camlCase, word, re.U)\n", (618, 652), False, 'import re\...
# Copyright (C) 2004, 2005, 2006, 2007 StatPro Italia srl # # This file is part of QuantLib, a free-software/open-source library # for financial quantitative analysts and developers - http://quantlib.org/ # # QuantLib is free software: you can redistribute it and/or modify it under the # terms of the QuantLib lic...
[ "QuantLib.Schedule", "QuantLib.G2", "QuantLib.Euribor6M", "QuantLib.Swaption", "QuantLib.BermudanExercise", "QuantLib.BlackKarasinski", "QuantLib.SimpleQuote", "QuantLib.DiscountingSwapEngine", "QuantLib.Actual365Fixed", "QuantLib.Period", "QuantLib.Settings.instance", "QuantLib.HullWhite", ...
[((2491, 2521), 'QuantLib.Date', 'ql.Date', (['(15)', 'ql.February', '(2002)'], {}), '(15, ql.February, 2002)\n', (2498, 2521), True, 'import QuantLib as ql\n'), ((2586, 2597), 'QuantLib.TARGET', 'ql.TARGET', ([], {}), '()\n', (2595, 2597), True, 'import QuantLib as ql\n'), ((2616, 2646), 'QuantLib.Date', 'ql.Date', ([...
from urllib.parse import urlsplit from .cf_fetcher import CodeForceFetcher from .spoj_fetcher import SPOJFetcher from .cc_fetcher import CodeChefFetcher class FetcherFactory: def __init__(self): self._fetchers = {} def register(self, key, fetcher): self._fetchers[key] = fetcher ...
[ "urllib.parse.urlsplit" ]
[((359, 372), 'urllib.parse.urlsplit', 'urlsplit', (['url'], {}), '(url)\n', (367, 372), False, 'from urllib.parse import urlsplit\n')]
import json import django_filters from onepanman_api.permissions import IsAdminUser, IsLoggedInUserOrAdmin, UserReadOnly from rest_framework import viewsets, status from onepanman_api.models import UserInformationInProblem, UserInfo from onepanman_api.serializers.userInformationInProblem import UserInformationInProbl...
[ "rest_framework.response.Response", "onepanman_api.models.UserInformationInProblem.objects.all", "onepanman_api.serializers.userInformationInProblem.UserInformationInProblemSerializer" ]
[((1166, 1221), 'onepanman_api.serializers.userInformationInProblem.UserInformationInProblemSerializer', 'UserInformationInProblemSerializer', (['queryset'], {'many': '(True)'}), '(queryset, many=True)\n', (1200, 1221), False, 'from onepanman_api.serializers.userInformationInProblem import UserInformationInProblemSeria...
from time import time import numpy as np from models import convolutional_model from pre_process import next_batch from triplet_loss import deep_speaker_loss from constants import BATCH_NUM_TRIPLETS if __name__ == '__main__': b = next_batch() num_frames = b.shape[0] model = convolutional_model(batch_inp...
[ "pre_process.next_batch", "numpy.random.uniform", "time.time", "numpy.reshape", "numpy.concatenate" ]
[((237, 249), 'pre_process.next_batch', 'next_batch', ([], {}), '()\n', (247, 249), False, 'from pre_process import next_batch\n'), ((611, 617), 'time.time', 'time', ([], {}), '()\n', (615, 617), False, 'from time import time\n'), ((649, 661), 'pre_process.next_batch', 'next_batch', ([], {}), '()\n', (659, 661), False,...
from django.db import models from django.template.defaultfilters import slugify from django.core.files.storage import FileSystemStorage fs = FileSystemStorage() #TODO: decide lengths for efficiency in storage class Citation(models.Model): author = models.CharField(max_length=255) book = models.CharField(...
[ "django.core.files.storage.FileSystemStorage", "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.SlugField", "django.db.models.ImageField", "django.db.models.DecimalField", "django.db.models.IntegerField", "django.template.defaultfilters.slu...
[((146, 165), 'django.core.files.storage.FileSystemStorage', 'FileSystemStorage', ([], {}), '()\n', (163, 165), False, 'from django.core.files.storage import FileSystemStorage\n'), ((261, 293), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)'}), '(max_length=255)\n', (277, 293), False, 'fro...
# Generated by Django 3.2.7 on 2021-09-29 06:39 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('draft', '0004_rename_namecode_player_name_code'), ] operations = [ migrations.RenameField( model_name='player', old_name='ru...
[ "django.db.migrations.RenameField" ]
[((239, 341), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""player"""', 'old_name': '"""rushing_attempts"""', 'new_name': '"""rush_attempts"""'}), "(model_name='player', old_name='rushing_attempts',\n new_name='rush_attempts')\n", (261, 341), False, 'from django.db import migr...