code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import numpy as np from quick_knn import LSH, MinHash set1 = set(map(lambda x: x.encode(), ['minhash', 'is', 'a', 'probabilistic', 'data', 'structure', 'for', 'estimating', 'the', 'similarity', 'between', 'datasets'])) set2 = set(map(lambda x: x.encode(), ['minhash', 'is', 'a', 'probability', 'data', 'structure', 'fo...
[ "quick_knn.LSH", "quick_knn.MinHash" ]
[((662, 675), 'quick_knn.LSH', 'LSH', (['(0.51)', '(32)'], {}), '(0.51, 32)\n', (665, 675), False, 'from quick_knn import LSH, MinHash\n'), ((681, 692), 'quick_knn.MinHash', 'MinHash', (['(32)'], {}), '(32)\n', (688, 692), False, 'from quick_knn import LSH, MinHash\n')]
from distutils.core import setup setup( name = 'glassyiffpy', packages = ['glassyiffpy'], version = '0.5', license='MIT', description = 'Simple thingy to interact with yiff-party.com', author = 'Glass-Paramedic', author_email = '<EMAIL>', url = 'http://weddit.ne...
[ "distutils.core.setup" ]
[((33, 853), 'distutils.core.setup', 'setup', ([], {'name': '"""glassyiffpy"""', 'packages': "['glassyiffpy']", 'version': '"""0.5"""', 'license': '"""MIT"""', 'description': '"""Simple thingy to interact with yiff-party.com"""', 'author': '"""Glass-Paramedic"""', 'author_email': '"""<EMAIL>"""', 'url': '"""http://wedd...
from setuptools import setup setup( name="autofilter", version="0.0.1", description="A simple expression parser", author="<NAME>", author_email="<EMAIL>", packages=["autofilter", "autofilter.criterion"], license="Apache 2.0", )
[ "setuptools.setup" ]
[((30, 234), 'setuptools.setup', 'setup', ([], {'name': '"""autofilter"""', 'version': '"""0.0.1"""', 'description': '"""A simple expression parser"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'packages': "['autofilter', 'autofilter.criterion']", 'license': '"""Apache 2.0"""'}), "(name='autofilter', ...
from django.test import TestCase from forkit import utils, signals from forkit.tests.models import Author, Post, Blog, Tag __all__ = ('SignalsTestCase',) # receivers def author_config(sender, config, **kwargs): config['fields'] = ['first_name', 'posts'] def post_config(sender, config, **kwargs): config['fiel...
[ "forkit.signals.pre_fork.connect", "forkit.tests.models.Post.objects.get", "forkit.tests.models.Blog.objects.get", "forkit.utils._get_field_value", "forkit.signals.pre_fork.disconnect", "forkit.tests.models.Author.objects.get", "forkit.tests.models.Tag.objects.get" ]
[((449, 473), 'forkit.tests.models.Author.objects.get', 'Author.objects.get', ([], {'pk': '(1)'}), '(pk=1)\n', (467, 473), False, 'from forkit.tests.models import Author, Post, Blog, Tag\n'), ((494, 516), 'forkit.tests.models.Post.objects.get', 'Post.objects.get', ([], {'pk': '(1)'}), '(pk=1)\n', (510, 516), False, 'fr...
from datetime import datetime import scrapy import lxml from lxml.html.clean import Cleaner SOURCE = 'Clarín' LANGUAGE = 'es' cleaner = Cleaner(allow_tags=['p', 'br', 'b', 'a', 'strong', 'i', 'em']) class ClarinSpider(scrapy.Spider): name = 'clarin' allowed_domains = ['clarin.com'] def start_requests(self...
[ "lxml.html.clean.Cleaner", "datetime.datetime.strptime", "scrapy.Request", "lxml.html.fromstring" ]
[((137, 199), 'lxml.html.clean.Cleaner', 'Cleaner', ([], {'allow_tags': "['p', 'br', 'b', 'a', 'strong', 'i', 'em']"}), "(allow_tags=['p', 'br', 'b', 'a', 'strong', 'i', 'em'])\n", (144, 199), False, 'from lxml.html.clean import Cleaner\n'), ((2367, 2420), 'datetime.datetime.strptime', 'datetime.strptime', (['modificat...
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CON...
[ "os.makedirs", "cv2.cvtColor", "os.path.realpath", "numpy.ones", "cv2.transpose", "cv2.flip", "cv2.imread", "numpy.array", "numpy.loadtxt", "cv2.drawContours", "os.path.join" ]
[((944, 957), 'numpy.loadtxt', 'np.loadtxt', (['f'], {}), '(f)\n', (954, 957), True, 'import numpy as np\n'), ((1126, 1139), 'numpy.loadtxt', 'np.loadtxt', (['f'], {}), '(f)\n', (1136, 1139), True, 'import numpy as np\n'), ((1288, 1301), 'numpy.loadtxt', 'np.loadtxt', (['f'], {}), '(f)\n', (1298, 1301), True, 'import n...
import networkx.algorithms.tests.test_triads import pytest from graphscope.nx.utils.compat import import_as_graphscope_nx import_as_graphscope_nx(networkx.algorithms.tests.test_triads, decorators=pytest.mark.usefixtures("graphscope_session")) from collections import defaultdict from itertools...
[ "graphscope.nx.is_isomorphic", "graphscope.nx.DiGraph", "graphscope.nx.is_directed", "graphscope.nx.random_triad", "collections.defaultdict", "graphscope.nx.karate_club_graph", "graphscope.nx.all_triads", "pytest.mark.usefixtures", "graphscope.nx.NetworkXAlgorithmError" ]
[((3278, 3323), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (3301, 3323), False, 'import pytest\n'), ((3562, 3607), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (3585, 3607)...
import os.path import string import subprocess import sys try: """ If used in a package, package logging functions are used instead of stderr. """ from . import debug, info, warning, error, fatal except: def error(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) debug = info = warning = fatal = erro...
[ "sys.platform.startswith", "subprocess.Popen", "sys.stdout.isatty" ]
[((4449, 4479), 'sys.platform.startswith', 'sys.platform.startswith', (['"""win"""'], {}), "('win')\n", (4472, 4479), False, 'import sys\n'), ((777, 880), 'subprocess.Popen', 'subprocess.Popen', (['command'], {'stdin': 'subprocess.DEVNULL', 'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE'}), '(command, stdin=su...
import pygame as pg import math import numpy as np _BLACK = (0, 0, 0) _DARK_GRAY = (40, 40, 40) _GRAY = (100, 100, 100) _WHITE = (255, 255, 255) draw_speed = 60 clock = pg.time.Clock() class Cube: def __init__(self, surface, color, position, rotation, scale): self.surface = surface self.color =...
[ "pygame.quit", "math.hypot", "math.atan2", "pygame.event.get", "pygame.display.set_mode", "math.radians", "pygame.init", "pygame.display.flip", "math.sin", "pygame.display.update", "numpy.mean", "numpy.array", "math.cos", "numpy.interp", "pygame.display.set_caption", "pygame.time.Clock...
[((171, 186), 'pygame.time.Clock', 'pg.time.Clock', ([], {}), '()\n', (184, 186), True, 'import pygame as pg\n'), ((3981, 3990), 'pygame.init', 'pg.init', ([], {}), '()\n', (3988, 3990), True, 'import pygame as pg\n'), ((4001, 4053), 'pygame.display.set_mode', 'pg.display.set_mode', (['(display_width, display_height)']...
# Copyright 2019 The Open SoC Debug Project # # 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 t...
[ "osd.Log", "osd.Hostmod", "logging.basicConfig", "unittest.mock.Mock", "time.sleep", "osd.Hostctrl", "pytest.raises", "osd.Packet" ]
[((804, 844), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (823, 844), False, 'import logging\n'), ((855, 864), 'osd.Log', 'osd.Log', ([], {}), '()\n', (862, 864), False, 'import osd\n'), ((947, 984), 'osd.Hostctrl', 'osd.Hostctrl', (['log', 'HOSTCTRL_BIND_A...
import torch import torch.autograd from torch.autograd import Variable import torch.optim as optim import torch.nn as nn import numpy as np import scipy as sp import scipy.linalg from qpsolvers import solve_qp from core.DDPG import DDPGagent from core.ConstraintNetwork import ConstraintNetwork class SafeDDPGagent(...
[ "core.ConstraintNetwork.ConstraintNetwork", "scipy.linalg.block_diag", "numpy.zeros", "numpy.ones", "numpy.split", "numpy.linalg.norm", "numpy.eye", "torch.no_grad", "numpy.concatenate", "torch.from_numpy" ]
[((2130, 2145), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (2143, 2145), False, 'import torch\n'), ((2551, 2566), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (2564, 2566), False, 'import torch\n'), ((3784, 3799), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (3797, 3799), False, 'import torch\n')...
""" a lightweight robot runner Install once (per notebook/kernel): %reload_ext JupyterLibrary """ from pathlib import Path from hashlib import sha256 import shutil import tempfile from pygments import highlight from pygments.formatters.html import HtmlFormatter from pygments.lexers.robotframework import RobotFra...
[ "robot.tidy.Tidy", "IPython.display.Markdown", "ipywidgets.Output", "pathlib.Path", "shutil.rmtree", "robot.run", "IPython.display.HTML", "tempfile.TemporaryDirectory", "ipywidgets.Tab", "IPython.display.display", "hashlib.sha256", "IPython.core.magic_arguments.parse_argstring", "IPython.get...
[((986, 1019), 'IPython.core.magic_arguments.magic_arguments', 'magic_arguments.magic_arguments', ([], {}), '()\n', (1017, 1019), False, 'from IPython.core import magic_arguments\n'), ((1025, 1155), 'IPython.core.magic_arguments.argument', 'magic_arguments.argument', (['"""-o"""', '"""--output-dir"""'], {'default': 'No...
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from hub.models import Fieldstats import csv def annotate_datafield(field_name, annotation): '''Presently working with a limited subset of redcap fields. Most fields won't be found. ''' try: c =...
[ "csv.DictReader", "hub.models.Fieldstats.objects.all", "hub.models.Fieldstats", "optparse.make_option" ]
[((744, 783), 'csv.DictReader', 'csv.DictReader', (['csvfile'], {'delimiter': '"""\t"""'}), "(csvfile, delimiter='\\t')\n", (758, 783), False, 'import csv\n'), ((651, 675), 'hub.models.Fieldstats.objects.all', 'Fieldstats.objects.all', ([], {}), '()\n', (673, 675), False, 'from hub.models import Fieldstats\n'), ((1869,...
import pandas as pd import numpy as np from gamechangerml.src.utilities.text_utils import normalize_answer, normalize_query, get_tokens from gamechangerml.src.utilities.test_utils import * from gamechangerml.configs.config import ValidationConfig, TrainingConfig from gamechangerml.api.utils.logger import logger from ga...
[ "pandas.DataFrame", "gamechangerml.api.utils.logger.logger.info", "gamechangerml.src.utilities.text_utils.normalize_query", "numpy.min", "gamechangerml.src.utilities.test_utils.filter_date_range", "gamechangerml.api.utils.logger.logger.warning", "gamechangerml.src.utilities.text_utils.normalize_answer",...
[((9324, 9350), 'pandas.DataFrame', 'pd.DataFrame', (['self.matched'], {}), '(self.matched)\n', (9336, 9350), True, 'import pandas as pd\n'), ((9375, 9404), 'pandas.DataFrame', 'pd.DataFrame', (['self.mismatched'], {}), '(self.mismatched)\n', (9387, 9404), True, 'import pandas as pd\n'), ((9500, 9536), 'pandas.concat',...
from model.add_new_form import AddNewForm from random import randrange def test_edit_contact_first_name(app): if app.contact.count_contact() == 0: app.contact.create_new_contact(AddNewForm(first_name="Vladimir")) old_contacts = app.contact.get_contact_list() index = randrange(len(old_contacts)) ...
[ "model.add_new_form.AddNewForm" ]
[((331, 360), 'model.add_new_form.AddNewForm', 'AddNewForm', ([], {'first_name': '"""Vlad"""'}), "(first_name='Vlad')\n", (341, 360), False, 'from model.add_new_form import AddNewForm\n'), ((191, 224), 'model.add_new_form.AddNewForm', 'AddNewForm', ([], {'first_name': '"""Vladimir"""'}), "(first_name='Vladimir')\n", (2...
#!/usr/bin/env python import sys import automation_direct_stock as ads def main(args): if (len(args) == 1): return ads.isInStock(args[0]) else: return "bad arguments" if __name__ == '__main__': main(sys.argv)
[ "automation_direct_stock.isInStock" ]
[((128, 150), 'automation_direct_stock.isInStock', 'ads.isInStock', (['args[0]'], {}), '(args[0])\n', (141, 150), True, 'import automation_direct_stock as ads\n')]
from collections import namedtuple from bs4 import BeautifulSoup # pylint: disable=E0401 SAMLRole = namedtuple("SAMLRole", ["role_arn", "principal_arn"]) def get_assertion_roles(saml_assertion_xml): # Returns a list of AWS roles that the assertion says may be assumed. soup = BeautifulSoup(saml_assertion_xm...
[ "bs4.BeautifulSoup", "collections.namedtuple" ]
[((103, 156), 'collections.namedtuple', 'namedtuple', (['"""SAMLRole"""', "['role_arn', 'principal_arn']"], {}), "('SAMLRole', ['role_arn', 'principal_arn'])\n", (113, 156), False, 'from collections import namedtuple\n'), ((289, 334), 'bs4.BeautifulSoup', 'BeautifulSoup', (['saml_assertion_xml', '"""lxml-xml"""'], {}),...
# Copyright 2013 Big Switch Networks, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ "neutron.api.v2.attributes._validate_subnet", "neutron.openstack.common.log.getLogger", "neutron.api.v2.attributes._verify_dict_keys", "neutron.common.exceptions.InvalidInput", "neutron.api.v2.attributes._validate_ip_address" ]
[((798, 825), 'neutron.openstack.common.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (815, 825), True, 'from neutron.openstack.common import log as logging\n'), ((1823, 1866), 'neutron.common.exceptions.InvalidInput', 'qexception.InvalidInput', ([], {'error_message': 'emsg'}), '(error_messag...
from queue import * from Segmentation import CombinedHist import numpy as np #Thia class is a queuse of histograms class HistQueue: size = 0 added_elements = 0 hist_queue = Queue() total_blue_histr = np.zeros((256,1),dtype = np.float32) total_green_histr = np.zeros((256,1),dtype = np.float32) ...
[ "Segmentation.CombinedHist.CombinedHist", "numpy.zeros" ]
[((219, 255), 'numpy.zeros', 'np.zeros', (['(256, 1)'], {'dtype': 'np.float32'}), '((256, 1), dtype=np.float32)\n', (227, 255), True, 'import numpy as np\n'), ((280, 316), 'numpy.zeros', 'np.zeros', (['(256, 1)'], {'dtype': 'np.float32'}), '((256, 1), dtype=np.float32)\n', (288, 316), True, 'import numpy as np\n'), ((3...
""" This module defines the Gate class, which represents a quantum gate, as well as implementations of many common Gates. Through the use of KroneckerGate and ProductGate, Gates can be formed for complex circuit structures. The matrix and mat_jac functions are used for numerical optimization of parameterized gates. ...
[ "numpy.pad", "numpy.eye", "numpy.log", "numpy.shape", "numpy.sin", "numpy.array", "numpy.exp", "numpy.cos", "numpy.matmul", "numpy.kron", "numpy.dot", "numpy.random.random", "numpy.sqrt" ]
[((19155, 19459), 'numpy.array', 'np.array', (['[[1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, \n 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, \n 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, ...
import os from collections import defaultdict from tempfile import TemporaryDirectory from unittest import TestCase import bandersnatch.filter from bandersnatch.configuration import BandersnatchConfig from bandersnatch.filter import filter_project_plugins, filter_release_plugins class TestBandersnatchFilter(TestCase...
[ "tempfile.TemporaryDirectory", "os.getcwd", "collections.defaultdict", "bandersnatch.filter.filter_project_plugins", "bandersnatch.filter.filter_release_plugins", "bandersnatch.configuration.BandersnatchConfig", "os.chdir" ]
[((464, 475), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (473, 475), False, 'import os\n'), ((499, 519), 'tempfile.TemporaryDirectory', 'TemporaryDirectory', ([], {}), '()\n', (517, 519), False, 'from tempfile import TemporaryDirectory\n'), ((572, 589), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)...
import nltk from sklearn.preprocessing import normalize import numpy as np from gensim.models import KeyedVectors from mabed.es_connector import Es_connector model_path = "./word2vec_twitter_model.bin" model = KeyedVectors.load_word2vec_format(model_path, binary=True,unicode_errors='ignore') # the index to be read an...
[ "numpy.zeros", "sklearn.preprocessing.normalize", "gensim.models.KeyedVectors.load_word2vec_format", "numpy.add", "nltk.word_tokenize" ]
[((211, 299), 'gensim.models.KeyedVectors.load_word2vec_format', 'KeyedVectors.load_word2vec_format', (['model_path'], {'binary': '(True)', 'unicode_errors': '"""ignore"""'}), "(model_path, binary=True, unicode_errors=\n 'ignore')\n", (244, 299), False, 'from gensim.models import KeyedVectors\n'), ((773, 797), 'nltk...
# -*- coding: utf-8 -*- import sys import numpy as np from numpy import pi, sqrt, exp, sin, cos, tan, log, log10 import scipy as sp import scipy.interpolate import h5py import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.collections import PatchCollection from matplotlib.patches import Rectangl...
[ "matplotlib.rc", "h5py.File", "numpy.concatenate", "matplotlib.lines.Line2D", "matplotlib.patches.Rectangle", "matplotlib.pyplot.subplots", "numpy.append", "matplotlib.collections.PatchCollection", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.savefig" ]
[((1214, 1244), 'matplotlib.rc', 'mpl.rc', (['"""font"""'], {'family': '"""serif"""'}), "('font', family='serif')\n", (1220, 1244), True, 'import matplotlib as mpl\n'), ((1245, 1271), 'matplotlib.rc', 'mpl.rc', (['"""font"""'], {'size': '"""6.0"""'}), "('font', size='6.0')\n", (1251, 1271), True, 'import matplotlib as ...
# -*- coding: utf-8 -*- import numpy as np import os import logging from keras import backend as K from keras.models import load_model from sklearn.metrics import classification_report from keras.callbacks import ModelCheckpoint from keras.models import Model import tensorflow as tf import random as rn from ...
[ "keras.models.load_model", "numpy.load", "numpy.random.seed", "argparse.ArgumentParser", "sklearn.model_selection.train_test_split", "sklearn.metrics.accuracy_score", "sklearn.preprocessing.MinMaxScaler", "keras.models.Model", "tensorflow.ConfigProto", "gc.collect", "sklearn.metrics.f1_score", ...
[((718, 772), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""TTSS_classifier"""'}), "(description='TTSS_classifier')\n", (741, 772), False, 'import argparse\n'), ((1553, 1648), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s : %(levelname)s : %(message)s"""'...
#!/usr/bin/python3 import sys import json import configparser import tempfile import os import argparse import pprint def process_cmdline(): desc = ''' Read JSON from stdin. Convert to INI file with section named JSON. Save ini output to a temp file. Print path to temp file. ...
[ "json.load", "argparse.ArgumentParser", "tempfile.mkstemp", "os.fdopen", "configparser.ConfigParser" ]
[((337, 378), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'desc'}), '(description=desc)\n', (360, 378), False, 'import argparse\n'), ((1100, 1120), 'json.load', 'json.load', (['sys.stdin'], {}), '(sys.stdin)\n', (1109, 1120), False, 'import json\n'), ((1131, 1158), 'configparser.ConfigPar...
import pytest from preservicaservice import s3_url @pytest.mark.parametrize( 'url, expected', [ ('s3://bucket/path/to/file.pdf', True), ('s3://bucket/file.pdf', True), ('http://bucket/file.pdf', False), ('s3://', False), ], ) def test_is_valid_url(url, expected): assert s3...
[ "preservicaservice.s3_url.S3Url.parse", "preservicaservice.s3_url.S3Url.is_valid_url", "preservicaservice.s3_url.S3Url", "pytest.raises", "pytest.mark.parametrize" ]
[((55, 232), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""url, expected"""', "[('s3://bucket/path/to/file.pdf', True), ('s3://bucket/file.pdf', True), (\n 'http://bucket/file.pdf', False), ('s3://', False)]"], {}), "('url, expected', [('s3://bucket/path/to/file.pdf', \n True), ('s3://bucket/file.pd...
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//h1", 'price' : "//tr[@class='commerce-price-savings-formatter-price odd']/td[@class='price-amount']", 'category' : "", 'desc...
[ "scrapy.linkextractors.LinkExtractor" ]
[((823, 877), 'scrapy.linkextractors.LinkExtractor', 'LinkExtractor', ([], {'allow': "['/[\\\\w-]+-[a-zA-Z]\\\\d+\\\\.html$']"}), "(allow=['/[\\\\w-]+-[a-zA-Z]\\\\d+\\\\.html$'])\n", (836, 877), False, 'from scrapy.linkextractors import LinkExtractor\n'), ((900, 958), 'scrapy.linkextractors.LinkExtractor', 'LinkExtract...
# Get the Computer Name from System Preferences -> Sharing from SystemConfiguration import SCDynamicStoreCopyComputerName try: computer_name = SCDynamicStoreCopyComputerName(None, None)[0].encode('utf-8') except: computer_name = None # Get the Bonjour .local name from socket import gethostname try: bonjour...
[ "plistlib.readPlistFromString", "socket.gethostname", "subprocess.Popen", "SystemConfiguration.SCDynamicStoreCopyComputerName" ]
[((650, 690), 'plistlib.readPlistFromString', 'readPlistFromString', (['system_profiler_xml'], {}), '(system_profiler_xml)\n', (669, 690), False, 'from plistlib import readPlistFromString\n'), ((328, 341), 'socket.gethostname', 'gethostname', ([], {}), '()\n', (339, 341), False, 'from socket import gethostname\n'), ((5...
from abc import ABCMeta, abstractmethod import numpy as np import os import pandas as pd from covid_xprize.standard_predictor.xprize_predictor import XPrizePredictor import time SEED = 0 DEFAULT_TEST_COST = 'covid_xprize/validation/data/uniform_random_costs.csv' TEST_CONFIGS = [ # ('Default', {'start_date': '2020-...
[ "numpy.random.uniform", "os.path.abspath", "covid_xprize.standard_predictor.xprize_predictor.XPrizePredictor", "pandas.DataFrame.from_dict", "numpy.random.seed", "pandas.read_csv", "time.time", "numpy.timedelta64", "pandas.to_datetime", "os.path.join", "pandas.concat" ]
[((2012, 2053), 'os.path.join', 'os.path.join', (['ROOT_DIR', 'os.pardir', '"""data"""'], {}), "(ROOT_DIR, os.pardir, 'data')\n", (2024, 2053), False, 'import os\n'), ((2072, 2115), 'os.path.join', 'os.path.join', (['DATA_DIR', '"""OxCGRT_latest.csv"""'], {}), "(DATA_DIR, 'OxCGRT_latest.csv')\n", (2084, 2115), False, '...
# Copyright 2014, Big Switch Networks # 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 requ...
[ "oslo_log.log.getLogger", "random.randint", "time.time", "oslo_db.sqlalchemy.session.EngineFacade.from_config", "re.findall", "sqlalchemy.update", "networking_bigswitch.plugins.bigswitch.i18n._", "sqlalchemy.String", "eventlet.sleep" ]
[((1011, 1038), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1028, 1038), True, 'from oslo_log import log as logging\n'), ((2775, 2824), 're.findall', 're.findall', (['"""^TOPO_SYNC\\\\[(\\\\d+\\\\.\\\\d+)\\\\]"""', 'hash'], {}), "('^TOPO_SYNC\\\\[(\\\\d+\\\\.\\\\d+)\\\\]', hash)\...
# # Copyright (c) 2016 <NAME> # All rights reserved. # # This file is part of Faber. It is made available under the # Boost Software License, Version 1.0. # (Consult LICENSE or http://www.boost.org/LICENSE_1_0.txt) from ..action import action from ..feature import feature, multi, path, incidental from ..feature import...
[ "subprocess.check_output", "os.path.join", "re.search", "logging.getLogger" ]
[((543, 569), 'logging.getLogger', 'logging.getLogger', (['"""tools"""'], {}), "('tools')\n", (560, 569), False, 'import logging\n'), ((1043, 1118), 'subprocess.check_output', 'subprocess.check_output', (["[self.command, '-c', cmd]"], {'universal_newlines': '(True)'}), "([self.command, '-c', cmd], universal_newlines=Tr...
from logistic_regression.model import LogisticRegresssionModel from pathlib import Path def test_to_onnx(): model = LogisticRegresssionModel() model_path = Path.cwd() / "log_reg_model.onnx" model.create_model() model.to_onnx(str(model_path)) assert model_path.exists()
[ "pathlib.Path.cwd", "logistic_regression.model.LogisticRegresssionModel" ]
[((122, 148), 'logistic_regression.model.LogisticRegresssionModel', 'LogisticRegresssionModel', ([], {}), '()\n', (146, 148), False, 'from logistic_regression.model import LogisticRegresssionModel\n'), ((166, 176), 'pathlib.Path.cwd', 'Path.cwd', ([], {}), '()\n', (174, 176), False, 'from pathlib import Path\n')]
import pickle import numpy as np import pandas as pd import sys sys.path.insert(1, '../src/MyAIGuide/data') from fitbitDataGatheredFromWebExport import fitbitDataGatheredFromWebExport from movesDataGatheredFromWebExport import movesDataGatheredFromWebExport from googleFitGatheredFromWebExport import googleFitGatheredF...
[ "pandas.DataFrame", "fitbitDataGatheredFromWebExport.fitbitDataGatheredFromWebExport", "pickle.dump", "pandas.date_range", "googleFitGatheredFromWebExport.googleFitGatheredFromWebExport", "storeManicTime.storeManicTime", "sys.path.insert", "retrieve_mentalstate_participant1.retrieve_mentalstate_partic...
[((64, 107), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""../src/MyAIGuide/data"""'], {}), "(1, '../src/MyAIGuide/data')\n", (79, 107), False, 'import sys\n'), ((734, 786), 'pandas.date_range', 'pd.date_range', (['"""2015-11-19"""'], {'periods': '(1700)', 'freq': '"""1D"""'}), "('2015-11-19', periods=1700, freq='...
from django import forms from django.contrib.admin.sites import site from django.utils import timezone # relative imports from ..models import ObrazecSplosno from eda5.arhiv.widgets import ArhiviranjeManyToManyRawIdWidget from eda5.partnerji.widgets import PartnerForeignKeyRawIdWidget, OsebaForeignKeyRawIdWidget ...
[ "django.utils.timezone.now" ]
[((508, 522), 'django.utils.timezone.now', 'timezone.now', ([], {}), '()\n', (520, 522), False, 'from django.utils import timezone\n')]
"""Chat Socket.IO Example Implements a simple chat server. """ from flask import Blueprint, render_template, request, session, url_for, \ current_app from flask_socketio import emit from socketio_examples import socketio bp = Blueprint('chat', __name__, static_folder='static', template_folder='temp...
[ "flask.Blueprint", "flask.current_app.config.get", "flask.request.args.get", "flask.url_for", "flask_socketio.emit", "flask.render_template", "socketio_examples.socketio.on" ]
[((232, 317), 'flask.Blueprint', 'Blueprint', (['"""chat"""', '__name__'], {'static_folder': '"""static"""', 'template_folder': '"""templates"""'}), "('chat', __name__, static_folder='static', template_folder='templates'\n )\n", (241, 317), False, 'from flask import Blueprint, render_template, request, session, url_...
""" Functional Test Module for the /get endpoint of the AudioServer Test Framework: pyTest """ import json import random def test_Create_Song(client): """ **GIVEN** a Flask application configured for testing\n **WHEN** the create endpoint is hit with a POST request for creating a Song\n **THEN** check...
[ "random.randint", "json.loads" ]
[((799, 824), 'json.loads', 'json.loads', (['response.data'], {}), '(response.data)\n', (809, 824), False, 'import json\n'), ((1376, 1401), 'json.loads', 'json.loads', (['response.data'], {}), '(response.data)\n', (1386, 1401), False, 'import json\n'), ((2565, 2590), 'json.loads', 'json.loads', (['response.data'], {}),...
import os from unittest import mock from django.test import TestCase from twitter import utils class TwitterUtilTests(TestCase): def test_unlock_removes_file(self): utils.LOCK_PATH.touch() self.assertTrue(utils.LOCK_PATH.exists()) utils.unlock_twitter() self.assertFalse(utils.LO...
[ "twitter.utils.LOCK_PATH.open", "os.getpid", "twitter.utils.LOCK_PATH.touch", "twitter.utils.LOCK_PATH.read_text", "twitter.utils.unlock_twitter", "unittest.mock.patch", "twitter.utils.lock_twitter", "twitter.utils.LOCK_PATH.exists" ]
[((632, 653), 'unittest.mock.patch', 'mock.patch', (['"""os.kill"""'], {}), "('os.kill')\n", (642, 653), False, 'from unittest import mock\n'), ((182, 205), 'twitter.utils.LOCK_PATH.touch', 'utils.LOCK_PATH.touch', ([], {}), '()\n', (203, 205), False, 'from twitter import utils\n'), ((264, 286), 'twitter.utils.unlock_t...
from django.contrib.auth.models import User from rest_framework import serializers from rest_framework.authtoken.models import Token from mail.models import Mail, MailAttachment, MailForward from advertisement.models import UserProfile,Banner from .models import Country class RegistrationSerializer(serializers.Se...
[ "rest_framework.serializers.IntegerField", "django.contrib.auth.models.User.objects.filter", "rest_framework.serializers.CharField", "rest_framework.serializers.ImageField", "rest_framework.serializers.Field", "rest_framework.serializers.ValidationError" ]
[((350, 376), 'rest_framework.serializers.IntegerField', 'serializers.IntegerField', ([], {}), '()\n', (374, 376), False, 'from rest_framework import serializers\n'), ((393, 416), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {}), '()\n', (414, 416), False, 'from rest_framework import serializer...
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import time from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Any, Dict, Optional, Tuple, Type from ..graphs.topic import Topic from ..messages.message import Message, TimestampedMessage from ..util.e...
[ "time.time" ]
[((1215, 1226), 'time.time', 'time.time', ([], {}), '()\n', (1224, 1226), False, 'import time\n')]
""" - Takes fixed points data from fixed point dictionary file - Computes matrix L and eigenvalues for the fixpoint, located, corresponding to a wave with wave numbers (k1,k2). - Creates a subfolder and save the result INPUT: - args: k1, k2, delta0, tol - fixpoint_dict.pkl -> dictionary of fixed points """ import sys ...
[ "scipy.linalg.solve", "pickle.dump", "numpy.save", "carpet.get_mean_phase", "os.makedirs", "numpy.log", "sim_physics.get_mtwist", "os.path.dirname", "sim_physics.solve_cycle", "numpy.zeros", "scipy.linalg.eig", "numpy.ones", "pickle.load", "numpy.array", "scipy.linalg.norm", "os.path.j...
[((586, 611), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (601, 611), False, 'import os\n'), ((5553, 5594), 'os.makedirs', 'os.makedirs', (['output_folder'], {'exist_ok': '(True)'}), '(output_folder, exist_ok=True)\n', (5564, 5594), False, 'import os\n'), ((5664, 5691), 'numpy.save', 'np.s...
# -*- coding: utf-8 -*- import subprocess import pytest from services import KeychainAccess class TestGetPasswordMethod(object): @pytest.mark.parametrize( "keychain_output, expected_password", [ ("password: \n", ""), ("password: \"<PASSWORD>\"", "<PASSWORD>"), ...
[ "pytest.raises", "pytest.mark.parametrize", "services.KeychainAccess" ]
[((139, 376), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""keychain_output, expected_password"""', '[(\'password: \\n\', \'\'), (\'password: "<PASSWORD>"\', \'<PASSWORD>\'), (\n \'password: <PASSWORD>\', u\'<PASSWORD>\'), (\n \'password: <PASSWORD> "abcабв"\', u\'<PASSWORD>\')]'], {}), '(\'keyc...
from pathlib import Path CURRRENT_DIR = Path(__file__).parent.absolute() DATA_DIR = CURRRENT_DIR / 'data/'
[ "pathlib.Path" ]
[((40, 54), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (44, 54), False, 'from pathlib import Path\n')]
from .core import Event from fastapi.templating import Jinja2Templates class Manager: def __init__(self): self.active_event = None self.active_game = None self._update_active_event() def _update_active_event(self): query = Event.select().where(Event.active == True) tr...
[ "fastapi.templating.Jinja2Templates" ]
[((680, 728), 'fastapi.templating.Jinja2Templates', 'Jinja2Templates', ([], {'directory': '"""staticker/templates"""'}), "(directory='staticker/templates')\n", (695, 728), False, 'from fastapi.templating import Jinja2Templates\n')]
from random import randint from time import sleep vencedor = True computador = randint(1, 25) result = str("") comp = result total = 0 while vencedor != False: jogador = int(input("Jogue um número: ")) escolha = str(input("Você quer [PAR/IMPAR]: ")).upper().strip()[0] computador = randint(1, 25) if tota...
[ "random.randint", "time.sleep" ]
[((79, 93), 'random.randint', 'randint', (['(1)', '(25)'], {}), '(1, 25)\n', (86, 93), False, 'from random import randint\n'), ((294, 308), 'random.randint', 'randint', (['(1)', '(25)'], {}), '(1, 25)\n', (301, 308), False, 'from random import randint\n'), ((615, 623), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (62...
from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models # Create your models here. from django.db import models from django.contrib.auth.models import AbstractUser from django.db.models import CheckConstraint, Q import datetime from django.utils.translation import ugettext_...
[ "django.db.models.OneToOneField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.core.validators.MinValueValidator", "django.db.models.FloatField", "django.db.models.BooleanField", "datetime.date.today", "django.db.models.ImageField", ...
[((405, 460), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)', 'blank': '(True)', 'null': '(True)'}), '(max_length=255, blank=True, null=True)\n', (421, 460), False, 'from django.db import models\n'), ((723, 823), 'django.db.models.OneToOneField', 'models.OneToOneField', (['settings.AUTH_U...
from aiogram import types, Dispatcher from aiogram.dispatcher import FSMContext from aiogram.dispatcher.filters import Text from house_services.states import UserInformation dp = Dispatcher.get_current() @dp.message_handler(commands=['aboutme']) async def start_collecting_user_information(message: types.Message): ...
[ "aiogram.dispatcher.filters.Text", "house_services.states.UserInformation.confirmation.set", "aiogram.types.InlineKeyboardButton", "aiogram.types.InlineKeyboardMarkup", "aiogram.Dispatcher.get_current", "house_services.states.UserInformation.address.set", "house_services.states.UserInformation.fio.set" ...
[((181, 205), 'aiogram.Dispatcher.get_current', 'Dispatcher.get_current', ([], {}), '()\n', (203, 205), False, 'from aiogram import types, Dispatcher\n'), ((1654, 1693), 'aiogram.types.InlineKeyboardMarkup', 'types.InlineKeyboardMarkup', ([], {'row_width': '(2)'}), '(row_width=2)\n', (1680, 1693), False, 'from aiogram ...
# testes da Main são realizados aqui import ui_V1 as jn import sys app = jn.QtWidgets.QApplication(sys.argv) MainWindow = jn.QtWidgets.QMainWindow() ui = jn.Ui_MainWindow() path = "chromedriver" ui.setupUi(MainWindow, path) ui.setupBrowser(path) MainWindow.show() sys.exit(app.exec_())
[ "ui_V1.QtWidgets.QApplication", "ui_V1.Ui_MainWindow", "ui_V1.QtWidgets.QMainWindow" ]
[((75, 110), 'ui_V1.QtWidgets.QApplication', 'jn.QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (100, 110), True, 'import ui_V1 as jn\n'), ((124, 150), 'ui_V1.QtWidgets.QMainWindow', 'jn.QtWidgets.QMainWindow', ([], {}), '()\n', (148, 150), True, 'import ui_V1 as jn\n'), ((156, 174), 'ui_V1.Ui_MainWindow'...
import pyrogue.interfaces import time client = pyrogue.interfaces.VirtualClient('localhost',9099) print(f"Time= {client.MultiRenaRoot.LocalTime.get()}") # Cleanup client.MultiRenaRoot.RunControl.runState.setDisp("Stopped") client.MultiRenaRoot.DataWriter.Close() # Take state steps as a script client.MultiRenaRoot.L...
[ "time.sleep" ]
[((412, 425), 'time.sleep', 'time.sleep', (['(5)'], {}), '(5)\n', (422, 425), False, 'import time\n'), ((2107, 2120), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (2117, 2120), False, 'import time\n'), ((2353, 2366), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (2363, 2366), False, 'import time\n'), ((256...
# -*- coding: utf-8 -*- import sys import codecs import random import re #Textを読み込みリストを返す def get_source2list(src): n = 0 res_list=[] tmp_list=[] i = [] f = codecs.open("./dic/resp_list.txt", "r", "utf-8") for i in f: tmp_list=[] tmp = i.split(",") tmp_list.append(tmp[0]) tmp_list.append(tm...
[ "re.search", "codecs.open", "random.randrange" ]
[((168, 216), 'codecs.open', 'codecs.open', (['"""./dic/resp_list.txt"""', '"""r"""', '"""utf-8"""'], {}), "('./dic/resp_list.txt', 'r', 'utf-8')\n", (179, 216), False, 'import codecs\n'), ((684, 712), 're.search', 're.search', (['input_line1', 'i[0]'], {}), '(input_line1, i[0])\n', (693, 712), False, 'import re\n'), (...
#!/usr/bin/python3 #Author: <NAME> & <NAME> import json import argparse import sys import subprocess """"""""""""""""""""""""""""""""""""""""""""""""""""""""" Flattener for solidity files """"""""""""""""""""""""""""""""""""""""""""""""""""""""" """ Functions corresponding to a nodeType """ def sourceUnit(jsonFile)...
[ "subprocess.run", "json.loads" ]
[((27770, 27844), 'subprocess.run', 'subprocess.run', (['arguments'], {'stdout': 'subprocess.PIPE', 'universal_newlines': '(True)'}), '(arguments, stdout=subprocess.PIPE, universal_newlines=True)\n', (27784, 27844), False, 'import subprocess\n'), ((25877, 25899), 'json.loads', 'json.loads', (['newlist[i]'], {}), '(newl...
import os import random import cv2 as cv import keras.backend as K import numpy as np from config import colors from data_generator import get_label from data_generator import get_y from data_generator import random_choice from data_generator import safe_crop from model import build_encoder_decoder if __name__ == '...
[ "data_generator.random_choice", "numpy.argmax", "random.sample", "numpy.empty", "data_generator.get_y", "numpy.zeros", "cv2.imread", "data_generator.safe_crop", "numpy.reshape", "data_generator.get_label", "os.path.join", "keras.backend.clear_session", "model.build_encoder_decoder" ]
[((452, 475), 'model.build_encoder_decoder', 'build_encoder_decoder', ([], {}), '()\n', (473, 475), False, 'from model import build_encoder_decoder\n'), ((668, 692), 'random.sample', 'random.sample', (['names', '(10)'], {}), '(names, 10)\n', (681, 692), False, 'import random\n'), ((2391, 2408), 'keras.backend.clear_ses...
from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QAction, QTableWidget,QTableWidgetItem,QVBoxLayout,QFileDialog from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSlot from libs.utils import addActions, newAction from functools import partial import os import numpy as np import pandas as pd cl...
[ "pandas.DataFrame", "functools.partial", "PyQt5.QtWidgets.QTableWidget", "numpy.array", "libs.utils.addActions", "os.path.split", "PyQt5.QtWidgets.QFileDialog" ]
[((525, 539), 'numpy.array', 'np.array', (['data'], {}), '(data)\n', (533, 539), True, 'import numpy as np\n'), ((653, 676), 'os.path.split', 'os.path.split', (['save_dir'], {}), '(save_dir)\n', (666, 676), False, 'import os\n'), ((1138, 1162), 'functools.partial', 'partial', (['newAction', 'self'], {}), '(newAction, s...
from delab.topic.topic_data_preperation import update_timelines_from_conversation_users def run(*args): if len(args) == 1: update_timelines_from_conversation_users(classify_author_topics=(args[0] == "True")) if len(args) == 2: update_timelines_from_conversation_users(classify_author_topics=(ar...
[ "delab.topic.topic_data_preperation.update_timelines_from_conversation_users" ]
[((137, 223), 'delab.topic.topic_data_preperation.update_timelines_from_conversation_users', 'update_timelines_from_conversation_users', ([], {'classify_author_topics': "(args[0] == 'True')"}), "(classify_author_topics=args[0] ==\n 'True')\n", (177, 223), False, 'from delab.topic.topic_data_preperation import update...
import warnings from multi_groups_hotelling_nn_model import ModelStructure from multi_groups_hotelling_nn_train_test import train warnings.filterwarnings("ignore") from multi_groups_hotelling_nn_parameter_setting import parameter_setting experiment_index = 10607 cuda_index = 1 repeat_number = 1 learning_rate = 0.1 o...
[ "utils.get_pvalue_from_tvalue.get_pvalue_from_tvalue", "multi_groups_hotelling_nn_model.ModelStructure", "multi_groups_hotelling_nn_parameter_setting.parameter_setting", "multi_groups_hotelling_nn_train_test.train", "warnings.filterwarnings", "utils.get_hotelling_tvalue_matrix_whole.get_hotelling_tvalue_m...
[((132, 165), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (155, 165), False, 'import warnings\n'), ((431, 582), 'multi_groups_hotelling_nn_parameter_setting.parameter_setting', 'parameter_setting', (['cuda_index', 'repeat_number', 'learning_rate', 'output_dimension', 'i...
#!/bin/python3 from argparse import ArgumentParser, Namespace import logging import os import re import socket import sys from urllib.parse import quote from webbrowser import open as webopen import pyinotify from autorefresh.httpmanager import HttpManager from autorefresh import websocketmanager BASEPORT = 8000 ...
[ "webbrowser.open", "logging.error", "argparse.ArgumentParser", "autorefresh.httpmanager.HttpManager", "os.getcwd", "socket.socket", "re.match", "logging.info", "urllib.parse.quote", "pyinotify.WatchManager", "autorefresh.websocketmanager.WebsocketSession", "sys.exit" ]
[((477, 525), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_DGRAM'], {}), '(socket.AF_INET, socket.SOCK_DGRAM)\n', (490, 525), False, 'import socket\n'), ((3201, 3225), 'pyinotify.WatchManager', 'pyinotify.WatchManager', ([], {}), '()\n', (3223, 3225), False, 'import pyinotify\n'), ((3484, 3501), '...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from . import test_pb2 as test__pb2 class TestServiceStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """...
[ "grpc.method_handlers_generic_handler", "grpc.unary_stream_rpc_method_handler", "grpc.unary_unary_rpc_method_handler", "grpc.stream_unary_rpc_method_handler", "grpc.stream_stream_rpc_method_handler" ]
[((3604, 3692), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""rxgrpc.test.TestService"""', 'rpc_method_handlers'], {}), "('rxgrpc.test.TestService',\n rpc_method_handlers)\n", (3640, 3692), False, 'import grpc\n'), ((2629, 2811), 'grpc.unary_unary_rpc_method_handler', 'grpc.un...
"""Convenience functions for Gaussian filtering and smoothing. We support the following methods: - ekf0: Extended Kalman filtering based on a zero-th order Taylor approximation [1]_, [2]_, [3]_. Also known as "PFOS". - ekf1: Extended Kalman filtering [3]_. - ukf: Unscented Kalman filtering [3]_. ...
[ "probnum.diffeq.odefiltsmooth.ivp2filter.ivp2ekf1", "probnum.diffeq.odefiltsmooth.ivp2filter.ivp2ukf", "probnum.filtsmooth.statespace.IOUP", "probnum.diffeq.steprule.AdaptiveSteps", "probnum.filtsmooth.statespace.Matern", "probnum.diffeq.odefiltsmooth.ivp2filter.ivp2ekf0", "probnum.diffeq.steprule.Const...
[((8447, 8507), 'probnum.diffeq.odefiltsmooth.ivpfiltsmooth.GaussianIVPFilter', 'GaussianIVPFilter', (['ivp', 'gfilt'], {'with_smoothing': 'with_smoothing'}), '(ivp, gfilt, with_smoothing=with_smoothing)\n', (8464, 8507), False, 'from probnum.diffeq.odefiltsmooth.ivpfiltsmooth import GaussianIVPFilter\n'), ((9004, 9032...
from sqlalchemy import func from app import db from app.schema.model_schema import ModelSchema class ChallengingBehavior(db.Model): __tablename__ = "challenging_behavior" __label__ = "ChallengingBehavior" __no_export__ = True # This will be transferred as a part of a parent class id = db.Column(db....
[ "app.db.DateTime", "sqlalchemy.func.now", "app.db.ForeignKey", "app.db.Column" ]
[((307, 346), 'app.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (316, 346), False, 'from app import db\n'), ((580, 724), 'app.db.Column', 'db.Column', (['db.DateTime'], {'info': "{'display_order': 1, 'type': 'datepicker', 'template_options': {'label':\n 'T...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'form.ui' # # Created by: PyQt5 UI code generator 5.15.3 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui, ...
[ "PyQt5.QtCore.QTimer", "PyQt5.QtWidgets.QLabel", "os.path.abspath", "PyQt5.QtWidgets.QSizePolicy", "PyQt5.QtWidgets.QWidget", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QFileDialog.getExistingDirectory", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtWidgets.QLineEdit", "PyQt...
[((9225, 9244), 'multiprocessing.freeze_support', 'mp.freeze_support', ([], {}), '()\n', (9242, 9244), True, 'import multiprocessing as mp\n'), ((9255, 9287), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (9277, 9287), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'...
#importing the library import numpy as np import matplotlib.pyplot as plt import pandas as pd #importing the dataset dataset = pd.read_csv('Salary_Data.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values y = y.reshape(len(y),1) #splitting the dataset into training set and test set fro...
[ "sklearn.svm.SVR", "sklearn.preprocessing.StandardScaler", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.metrics.r2_score" ]
[((136, 166), 'pandas.read_csv', 'pd.read_csv', (['"""Salary_Data.csv"""'], {}), "('Salary_Data.csv')\n", (147, 166), True, 'import pandas as pd\n'), ((406, 459), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': '(0.2)', 'random_state': '(0)'}), '(X, y, test_size=0.2, random_st...
from urllib.parse import quote # Py 3 import os def path2url(path): """Turn a file path into a URL""" parts = path.split(os.path.sep) return '{{ site.baseurl }}/notebooks/' + '/'.join(quote(part) for part in parts) ################################################################################ c = ge...
[ "urllib.parse.quote" ]
[((200, 211), 'urllib.parse.quote', 'quote', (['part'], {}), '(part)\n', (205, 211), False, 'from urllib.parse import quote\n')]
from __future__ import division import tensorflow as tf from nets import * class SfMLearner(object): def __init__(self, batch_size=4, img_height=128, img_width=416): self.batch_size = batch_size self.img_height = img_height self.img_width...
[ "tensorflow.placeholder", "tensorflow.name_scope", "tensorflow.image.convert_image_dtype" ]
[((394, 495), 'tensorflow.placeholder', 'tf.placeholder', (['tf.uint8', '[self.batch_size, self.img_height, self.img_width, 3]'], {'name': '"""raw_input"""'}), "(tf.uint8, [self.batch_size, self.img_height, self.img_width,\n 3], name='raw_input')\n", (408, 495), True, 'import tensorflow as tf\n'), ((984, 1037), 'ten...
"""An example deserialization of books with validation.""" import json from dataclasses import dataclass from pprint import pprint from typing import List, TypeVar import serdataclasses from serdataclasses import OptionalProperty # pylint: disable=missing-class-docstring # pylint: disable=invalid-name T = TypeVar("...
[ "json.load", "serdataclasses.dump", "serdataclasses.load", "pprint.pprint", "typing.TypeVar" ]
[((311, 323), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (318, 323), False, 'from typing import List, TypeVar\n'), ((1097, 1132), 'serdataclasses.load', 'serdataclasses.load', (['raw_data', 'Book'], {}), '(raw_data, Book)\n', (1116, 1132), False, 'import serdataclasses\n'), ((1252, 1279), 'serdataclasse...
import base64 from docker_build.configuration.exception import \ InvalidArgumentValue def decode_argument_value(name, value): """ Decodes the value of an argument. The value is assumed to be Base64 encoded :param name: The name of the argument that is being decoded :param value: The encoded valu...
[ "base64.b64decode" ]
[((1037, 1060), 'base64.b64decode', 'base64.b64decode', (['value'], {}), '(value)\n', (1053, 1060), False, 'import base64\n')]
""" NCL_polyg_18.py =============== This script illustrates the following concepts: - Adding lines, markers, and polygons to a map - Drawing lines, markers, polygons, and text in inset axes See following URLs to see the reproduced NCL plot & script: - Original NCL script: https://www.ncl.ucar.edu/Application...
[ "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "geocat.viz.util.set_titles_and_labels", "matplotlib.patches.Rectangle", "cartopy.mpl.ticker.LongitudeFormatter", "cartopy.feature.NaturalEarthFeature", "cartopy.crs.PlateCarree", "matplotlib.patches.Circle", "matplotlib.pyplot.figure", "geoca...
[((1163, 1191), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(10, 10)'}), '(figsize=(10, 10))\n', (1173, 1191), True, 'import matplotlib.pyplot as plt\n'), ((1244, 1275), 'matplotlib.pyplot.GridSpec', 'plt.GridSpec', (['(2)', '(20)'], {'figure': 'fig'}), '(2, 20, figure=fig)\n', (1256, 1275), True, 'impo...
import requests def is_valid_user(login, password): if not login or login == '' or not password or password == '': # if the login/password wasn't entered, return false return False else: headers = {'X-OpenAM-Username': login.split("@")[0] + '@company.com', 'X-OpenAM-Password': password, 'Content-Type':...
[ "requests.post" ]
[((397, 438), 'requests.post', 'requests.post', (['http_path'], {'headers': 'headers'}), '(http_path, headers=headers)\n', (410, 438), False, 'import requests\n')]
import os import socket,random,time import colorama from platform import system from threading import Thread from modules.ConnectionsHandler import Handler class Server: def __init__(self): if system() == 'Windows': colorama.init(convert=True) self.CLEAR = 'cls' els...
[ "colorama.init", "threading.Thread", "random.randint", "socket.socket", "os.system", "time.sleep", "platform.system", "modules.ConnectionsHandler.Handler" ]
[((2953, 2961), 'threading.Thread', 'Thread', ([], {}), '()\n', (2959, 2961), False, 'from threading import Thread\n'), ((2975, 3024), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (2988, 3024), False, 'import socket, random, time\n'), ((3120...
''' Lab 1 This code implements a two-layer perceptron with the backpropagation algorithm to solve the parity problem. <NAME> (lin.3326 at osu.edu) Created: 9/22/2020 ''' from random import seed, randrange, uniform, shuffle from math import exp import csv # Initialize network def init_net(n_inputs, n_hidden, n_outpu...
[ "random.shuffle", "math.exp", "random.uniform" ]
[((2223, 2236), 'random.shuffle', 'shuffle', (['data'], {}), '(data)\n', (2230, 2236), False, 'from random import seed, randrange, uniform, shuffle\n'), ((830, 837), 'math.exp', 'exp', (['(-v)'], {}), '(-v)\n', (833, 837), False, 'from math import exp\n'), ((364, 378), 'random.uniform', 'uniform', (['(-1)', '(1)'], {})...
import unittest # from models import NewsArticle from models import Article # Article = NewsArticle.Article class ArticleTest(unittest.TestCase): """ Test the behaviour of News class """ def setUp(self): """ Set up method that will run before every Test """ self.new_article = Artic...
[ "models.Article" ]
[((315, 479), 'models.Article', 'Article', (['"""abc-news"""', '"""ABC_News"""', '"""Your trusted source for breaking news"""', '"""Your trusted source for breaking news"""', '"""https://abcnews.go.com"""', '"""general"""', '"""us"""'], {}), "('abc-news', 'ABC_News', 'Your trusted source for breaking news',\n 'Your ...
"""Test the Google Maps Travel Time config flow.""" import pytest from homeassistant import config_entries, data_entry_flow from homeassistant.components.google_travel_time.const import ( ARRIVAL_TIME, CONF_ARRIVAL_TIME, CONF_AVOID, CONF_DEPARTURE_TIME, CONF_DESTINATION, CONF_LANGUAGE, CONF...
[ "pytest.mark.parametrize", "pytest.mark.usefixtures" ]
[((701, 765), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""validate_config_entry"""', '"""bypass_setup"""'], {}), "('validate_config_entry', 'bypass_setup')\n", (724, 765), False, 'import pytest\n'), ((1469, 1519), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""invalidate_config_entry"""'], ...
import argparse import os.path BUFSIZE_KB = 1024 parser = argparse.ArgumentParser() parser.add_argument('step', type=int) parser.add_argument('size_kb', type=int) parser.add_argument('output_dir', type=str) args = parser.parse_args() outfile = os.path.join(args.output_dir, "step_{}".format(args.step)) buf = "a" * ...
[ "argparse.ArgumentParser" ]
[((61, 86), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (84, 86), False, 'import argparse\n')]
import json import pandas as pd df = pd.read_csv('TPU_212_cp.csv') for nfloor in range(8): tpu_dict = { "AirflowNetwork:SimulationControl": { "Ventilacao": { "absolute_airflow_convergence_tolerance": 0.0001, "airflownetwork_control": "MultizoneWithoutDistri...
[ "pandas.read_csv", "json.dumps" ]
[((38, 67), 'pandas.read_csv', 'pd.read_csv', (['"""TPU_212_cp.csv"""'], {}), "('TPU_212_cp.csv')\n", (49, 67), True, 'import pandas as pd\n'), ((26444, 26464), 'json.dumps', 'json.dumps', (['tpu_dict'], {}), '(tpu_dict)\n', (26454, 26464), False, 'import json\n')]
#!/usr/bin/env python3 import socket import time from multiprocessing import Process #define address & buffer size HOST = "" PORT = 8001 BUFFER_SIZE = 1024 def handle_request(conn, addr): #recieve data, wait a bit, then send it back full_data = conn.recv(BUFFER_SIZE) print(full_data) conn.sendall(full_data) ...
[ "multiprocessing.Process", "socket.socket" ]
[((341, 390), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (354, 390), False, 'import socket\n'), ((831, 880), 'multiprocessing.Process', 'Process', ([], {'target': 'handle_request', 'args': '(conn, addr)'}), '(target=handle_request, args=(c...
import os import wget from mlrun import import_function from os import path import mlrun from pygit2 import Repository from rnn_serving import * def download_pretrained_model(model_path): # Run this to download the pre-trained model to your `models` directory model_location = 'https://s3.wasabisys.com/iguazio...
[ "os.path.abspath", "os.makedirs", "os.path.basename", "mlrun.import_function", "os.path.exists", "wget.download" ]
[((419, 466), 'os.makedirs', 'os.makedirs', (['saved_models_directory'], {'exist_ok': '(1)'}), '(saved_models_directory, exist_ok=1)\n', (430, 466), False, 'import os\n'), ((563, 608), 'wget.download', 'wget.download', (['model_location', 'model_filepath'], {}), '(model_location, model_filepath)\n', (576, 608), False, ...
import numpy as np class StanleyControl: def __init__(self, kp=0.5): self.path = None self.kp = kp def set_path(self, path): self.path = path.copy() def _search_nearest(self, pos): min_dist = 99999999 min_id = -1 for i in range(self.path.shape[0]): ...
[ "sys.path.append", "path_generator.path2", "numpy.arctan2", "numpy.deg2rad", "cv2.waitKey", "bicycle_model.KinematicModel", "numpy.ones", "numpy.hypot", "cv2.flip", "numpy.dot", "cv2.imshow" ]
[((2604, 2626), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (2619, 2626), False, 'import sys\n'), ((2695, 2717), 'path_generator.path2', 'path_generator.path2', ([], {}), '()\n', (2715, 2717), False, 'import path_generator\n'), ((2733, 2755), 'numpy.ones', 'np.ones', (['(600, 600, 3)'], {}),...
# jarecli - jaacoppi's client for reddit # A client for reddit using Python & PRAW # MIT LICENSED. See LICENSE for details import curses # uimod.py contains all listview related code #UI windows: # prognameline contains version copyright information. It will be initialized once but never modified # topbar contains in...
[ "curses.noecho", "curses.initscr", "curses.cbreak", "curses.curs_set" ]
[((818, 834), 'curses.initscr', 'curses.initscr', ([], {}), '()\n', (832, 834), False, 'import curses\n'), ((837, 852), 'curses.noecho', 'curses.noecho', ([], {}), '()\n', (850, 852), False, 'import curses\n'), ((881, 899), 'curses.curs_set', 'curses.curs_set', (['(0)'], {}), '(0)\n', (896, 899), False, 'import curses\...
""" Test suite to automatically test emulator REST API endpoints. """ import time import unittest from emuvim.test.api_base import SimpleTestTopology import subprocess from emuvim.dcemulator.node import EmulatorCompute import ast class testRestApi( SimpleTestTopology ): """ Tests to check the REST API endpoin...
[ "unittest.main", "ast.literal_eval", "subprocess.check_output", "subprocess.call" ]
[((6014, 6029), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6027, 6029), False, 'import unittest\n'), ((938, 1017), 'subprocess.call', 'subprocess.call', (['"""son-emu-cli compute start -d datacenter0 -n vnf1"""'], {'shell': '(True)'}), "('son-emu-cli compute start -d datacenter0 -n vnf1', shell=True)\n", (953...
import pandas as pd import numpy as np import warnings warnings.filterwarnings('ignore') import os print(os.getcwd()) train = pd.read_csv('../data/prep/train3.csv') test = pd.read_csv('../data/prep/test3.csv') submission = pd.read_csv('../data/raw/housing/sample_submission.csv') train = train.iloc[:, 1:] test = ...
[ "numpy.abs", "warnings.filterwarnings", "pandas.read_csv", "os.getcwd", "numpy.std", "numpy.zeros", "sklearn.model_selection.KFold", "ngboost.NGBRegressor", "numpy.expm1", "sklearn.metrics.make_scorer", "numpy.mean", "catboost.Pool" ]
[((59, 92), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (82, 92), False, 'import warnings\n'), ((132, 170), 'pandas.read_csv', 'pd.read_csv', (['"""../data/prep/train3.csv"""'], {}), "('../data/prep/train3.csv')\n", (143, 170), True, 'import pandas as pd\n'), ((178, 215...
import gc def start(): gc.collect(0) gc.collect(1) gc.collect(2) l = [] l.append(l) del l gc.collect(2) gc.collect() start()
[ "gc.collect" ]
[((134, 146), 'gc.collect', 'gc.collect', ([], {}), '()\n', (144, 146), False, 'import gc\n'), ((28, 41), 'gc.collect', 'gc.collect', (['(0)'], {}), '(0)\n', (38, 41), False, 'import gc\n'), ((46, 59), 'gc.collect', 'gc.collect', (['(1)'], {}), '(1)\n', (56, 59), False, 'import gc\n'), ((64, 77), 'gc.collect', 'gc.coll...
#!/usr/bin/env python3 import sys import os import fcntl import serial import minimalmodbus from collections import OrderedDict, namedtuple import logging ####### Adjustments to minimalmodbus class BlockingInstrument(minimalmodbus.Instrument): def _communicate(self, request, number_of_bytes_to_read): """W...
[ "collections.OrderedDict", "logging.debug", "logging.getLogger", "time.sleep" ]
[((698, 716), 'logging.debug', 'logging.debug', (['msg'], {}), '(msg)\n', (711, 716), False, 'import logging\n'), ((7704, 7719), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (7714, 7719), False, 'import time\n'), ((3056, 3080), 'logging.debug', 'logging.debug', (['self.inst'], {}), '(self.inst)\n', (3069, 30...
#!/usr/bin/env python # The BassieC Transpiler v0.1.0 # This code is an ugly mess I know, but hey it works quite well! # Also I want to clean it up in the future... import argparse, os, re version = '0.1.0' parser = argparse.ArgumentParser(description='The BassieC Transpiler v' + version) parser.add_argument('file')...
[ "os.listdir", "argparse.ArgumentParser", "os.path.basename", "os.path.dirname", "re.findall", "os.path.splitext", "re.search", "re.sub", "os.chdir", "re.compile" ]
[((219, 292), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': "('The BassieC Transpiler v' + version)"}), "(description='The BassieC Transpiler v' + version)\n", (242, 292), False, 'import argparse, os, re\n'), ((1964, 1997), 're.sub', 're.sub', (['"""\\\\/\\\\/[^\\\\n]*"""', '""""""', 'code'...
import smtplib import os from email.message import EmailMessage def creds(): with open('/home/johnny/creds') as f: credentials = f.read() return credentials.splitlines() def send_email_report(): email = creds()[2] password = creds()[3] directory = '/home/johnny/err_disabled/test' ms...
[ "email.message.EmailMessage", "smtplib.SMTP_SSL" ]
[((324, 338), 'email.message.EmailMessage', 'EmailMessage', ([], {}), '()\n', (336, 338), False, 'from email.message import EmailMessage\n'), ((994, 1033), 'smtplib.SMTP_SSL', 'smtplib.SMTP_SSL', (['"""smtp.gmail.com"""', '(465)'], {}), "('smtp.gmail.com', 465)\n", (1010, 1033), False, 'import smtplib\n')]
# Copyright 2017-2021 EPAM Systems, Inc. (https://www.epam.com/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "platform.system", "fcntl.lockf", "logging.debug", "os.path.join" ]
[((917, 967), 'logging.debug', 'logging.debug', (['"""Locking directory %s..."""', 'dir_path'], {}), "('Locking directory %s...', dir_path)\n", (930, 967), False, 'import logging\n'), ((1363, 1420), 'logging.debug', 'logging.debug', (['"""Trying to lock directory %s..."""', 'dir_path'], {}), "('Trying to lock directory...
# Adaptation of VEEGAN example: # https://github.com/akashgit/VEEGAN/blob/master/VEEGAN_2D_RING.ipynb # to TensorFlow 2 + Keras, with the TensorFlow Probabilities library: # https://blog.tensorflow.org/2019/03/variational-autoencoders-with.html # # <NAME> <<EMAIL>> import tensorflow as tf import tensorflow.keras as t...
[ "tensorflow.keras.Model", "tensorflow_probability.bijectors.FillScaleTriL", "tensorflow.repeat", "tensorflow.constant" ]
[((5525, 5566), 'tensorflow.constant', 'tf.constant', (['[[0.0, 1, 2, 3, 4, 5, 6, 7]]'], {}), '([[0.0, 1, 2, 3, 4, 5, 6, 7]])\n', (5536, 5566), True, 'import tensorflow as tf\n'), ((5568, 5591), 'tensorflow.constant', 'tf.constant', (['[[0.0, 0]]'], {}), '([[0.0, 0]])\n', (5579, 5591), True, 'import tensorflow as tf\n'...
from urllib.parse import urlparse, urlencode from jwt.jwt import JWT from jwt.jwk import JWKSet from zope.interface import implementer, Interface import json import time import requests default_id_classes = {} class OAuthException(RuntimeError): pass class OAuthIdentity: name = "default" config = {} ...
[ "json.loads", "urllib.parse.urlencode", "zope.interface.implementer", "time.time", "jwt.jwt.JWT", "requests.post", "urllib.parse.urlparse" ]
[((5223, 5248), 'zope.interface.implementer', 'implementer', (['IOAuthConfig'], {}), '(IOAuthConfig)\n', (5234, 5248), False, 'from zope.interface import implementer, Interface\n'), ((8163, 8199), 'urllib.parse.urlparse', 'urlparse', (["settings['oauth2callback']"], {}), "(settings['oauth2callback'])\n", (8171, 8199), ...
from flask import request from flask import render_template from . import app from . import utils @app.route("/") def form(): return render_template('form.html') @app.route("/result", methods=['POST']) def result(): return render_template('result.html', password=get()) @app.route("/get", methods=['POST']...
[ "flask.render_template", "flask.request.form.get" ]
[((140, 168), 'flask.render_template', 'render_template', (['"""form.html"""'], {}), "('form.html')\n", (155, 168), False, 'from flask import render_template\n'), ((540, 566), 'flask.request.form.get', 'request.form.get', (['"""ignore"""'], {}), "('ignore')\n", (556, 566), False, 'from flask import request\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-15 14:31 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('aggregator', '0006_auto_20170515_1444'), ] operations = [ migrations.AlterFie...
[ "django.db.models.CharField" ]
[((403, 435), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(256)'}), '(max_length=256)\n', (419, 435), False, 'from django.db import migrations, models\n'), ((559, 591), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(256)'}), '(max_length=256)\n', (575, 591), False, 'f...
#!/usr/bin/env python3 # coding: utf-8 import rclpy from rclpy.node import Node from rclpy.qos import QoSProfile from rclpy.qos import QoSReliabilityPolicy, QoSDurabilityPolicy, QoSLivelinessPolicy from sample_msgs.msg import SimpleMsg class SimplePublisher(Node): def __init__(self): super().__init__("s...
[ "rclpy.init", "rclpy.spin", "sample_msgs.msg.SimpleMsg", "rclpy.shutdown" ]
[((1528, 1549), 'rclpy.init', 'rclpy.init', ([], {'args': 'args'}), '(args=args)\n', (1538, 1549), False, 'import rclpy\n'), ((1585, 1601), 'rclpy.spin', 'rclpy.spin', (['node'], {}), '(node)\n', (1595, 1601), False, 'import rclpy\n'), ((1631, 1647), 'rclpy.shutdown', 'rclpy.shutdown', ([], {}), '()\n', (1645, 1647), F...
from unittest import TestCase import numpy as np from copulas.bivariate.independence import Independence class TestIndependence(TestCase): def test___init__(self): """Independence copula can be instantiated directly.""" # Setup / Run instance = Independence() # Check as...
[ "numpy.array", "copulas.bivariate.independence.Independence" ]
[((278, 292), 'copulas.bivariate.independence.Independence', 'Independence', ([], {}), '()\n', (290, 292), False, 'from copulas.bivariate.independence import Independence\n'), ((558, 572), 'copulas.bivariate.independence.Independence', 'Independence', ([], {}), '()\n', (570, 572), False, 'from copulas.bivariate.indepen...
# -*- coding: utf-8 -*- # Copyright (c) 2021, <EMAIL> and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint from math import radians, sin, cos, asin, sqrt import json _AVG_EARTH_RADIUS_M = 6371.0088 *...
[ "json.loads", "math.sqrt", "decimal.Decimal", "math.radians", "frappe.db.get_value", "math.sin", "frappe.custom.doctype.custom_field.custom_field.create_custom_fields", "math.cos", "frappe._", "frappe.throw" ]
[((1275, 1334), 'frappe.db.get_value', 'frappe.db.get_value', (['"""Freezer"""', 'freezer', '"""freezer_location"""'], {}), "('Freezer', freezer, 'freezer_location')\n", (1294, 1334), False, 'import frappe\n'), ((1459, 1487), 'json.loads', 'json.loads', (['freezer_location'], {}), '(freezer_location)\n', (1469, 1487), ...
import argparse import json import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) from metabasepy.client import Client if __name__ == '__main__': parser = argparse.ArgumentParser( prog="flush_queries", usage="flusher -c /your/config/file/path.json", description="Delete ...
[ "metabasepy.client.Client", "os.path.join", "argparse.ArgumentParser", "json.load" ]
[((69, 100), 'os.path.join', 'os.path.join', (['sys.path[0]', '""".."""'], {}), "(sys.path[0], '..')\n", (81, 100), False, 'import os\n'), ((181, 344), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""flush_queries"""', 'usage': '"""flusher -c /your/config/file/path.json"""', 'description': '"""D...
""" This module defines CRUD routes for the state schema. """ from fastapi import Depends, HTTPException, status from sqlalchemy.orm import Session from app.auth_dependencies import User, current_user from .base_router import CRUDRouter, NOT_FOUND_RESPONSE, Route from .. import database from ..models import state as ...
[ "fastapi.HTTPException", "fastapi.Depends" ]
[((822, 846), 'fastapi.Depends', 'Depends', (['database.get_db'], {}), '(database.get_db)\n', (829, 846), False, 'from fastapi import Depends, HTTPException, status\n'), ((866, 887), 'fastapi.Depends', 'Depends', (['current_user'], {}), '(current_user)\n', (873, 887), False, 'from fastapi import Depends, HTTPException,...
#!/usr/bin/env python import os import json import torch import pprint import argparse import importlib import numpy as np import cv2 import matplotlib matplotlib.use("Agg") from config import system_configs from nnet.py_factory import NetworkFactory from config import system_configs from utils import crop_image, no...
[ "argparse.ArgumentParser", "nnet.py_factory.NetworkFactory", "numpy.clip", "pprint.pprint", "cv2.rectangle", "cv2.imshow", "os.path.join", "config.system_configs.update_config", "utils.normalize_", "cv2.resize", "numpy.partition", "utils.crop_image", "cv2.waitKey", "external.nms.soft_nms_m...
[((153, 174), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (167, 174), False, 'import matplotlib\n'), ((1435, 1488), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Demo CornerNet"""'}), "(description='Demo CornerNet')\n", (1458, 1488), False, 'import argparse\n')...
''' Table.py A module/class for creating LaTeX deluxetable's. In a nutshell, you create a table instance, add columns, set options, then call the pring method. written by <NAME>, http://users.obs.carnegiescience.edu/~cburns/site/?p=22 ''' from __future__ import print_function from __future__ import absolute_import ...
[ "numpy.shape", "numpy.isnan" ]
[((4405, 4425), 'numpy.shape', 'numpy.shape', (['data[0]'], {}), '(data[0])\n', (4416, 4425), False, 'import numpy\n'), ((4624, 4644), 'numpy.shape', 'numpy.shape', (['sigfigs'], {}), '(sigfigs)\n', (4635, 4644), False, 'import numpy\n'), ((4296, 4314), 'numpy.shape', 'numpy.shape', (['datum'], {}), '(datum)\n', (4307,...
from webargs.flaskparser import use_args from ..services import IntervalService from ..services import BlockService from flask import Blueprint from .args import page_args from .. import utils from pony import orm blueprint = Blueprint("api", __name__, url_prefix="/v2/") @blueprint.route("/chart/<string:key>", method...
[ "webargs.flaskparser.use_args", "flask.Blueprint" ]
[((227, 272), 'flask.Blueprint', 'Blueprint', (['"""api"""', '__name__'], {'url_prefix': '"""/v2/"""'}), "('api', __name__, url_prefix='/v2/')\n", (236, 272), False, 'from flask import Blueprint\n'), ((1720, 1757), 'webargs.flaskparser.use_args', 'use_args', (['page_args'], {'location': '"""query"""'}), "(page_args, lo...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ "azure.cli.testsdk.StorageAccountPreparer", "azure.cli.testsdk.ResourceGroupPreparer", "azure.cli.command_modules.ams._test_utils._get_test_data_file", "time.sleep" ]
[((622, 645), 'azure.cli.testsdk.ResourceGroupPreparer', 'ResourceGroupPreparer', ([], {}), '()\n', (643, 645), False, 'from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer\n'), ((651, 718), 'azure.cli.testsdk.StorageAccountPreparer', 'StorageAccountPreparer', ([], {'parameter_name'...
import demandimport with demandimport.enabled(): import tensorflow as tf __all__ = ('conv1d', 'conv1dtransp', 'conv2d', 'conv2dtransp', 'maxpool1d', 'maxpool2d', 'huber') def conv1d(x, W, stride=1, padding='SAME'): with tf.name_scope('conv1d'): return tf.nn.conv1d(x, W, ...
[ "tensorflow.constant_initializer", "tensorflow.nn.conv1d", "tensorflow.nn.conv2d", "tensorflow.nn.conv2d_transpose", "tensorflow.abs", "tensorflow.nn.moments", "tensorflow.pad", "tensorflow.variable_scope", "tensorflow.stack", "tensorflow.squeeze", "tensorflow.name_scope", "demandimport.enable...
[((25, 47), 'demandimport.enabled', 'demandimport.enabled', ([], {}), '()\n', (45, 47), False, 'import demandimport\n'), ((243, 266), 'tensorflow.name_scope', 'tf.name_scope', (['"""conv1d"""'], {}), "('conv1d')\n", (256, 266), True, 'import tensorflow as tf\n'), ((283, 333), 'tensorflow.nn.conv1d', 'tf.nn.conv1d', (['...
# -*- coding: utf-8 -*- """ libfb2.utils ~~~~~~~~~~~~ Various utilities. :copyright: (c) Copyright 2011 by <NAME>, <NAME>, Pilate. :license: BSD, see LICENSE for more details. """ import struct from array import array from itertools import imap, count from contextlib import contextmanager DICE_H...
[ "struct.Struct", "array.array", "itertools.count", "itertools.imap" ]
[((1223, 1230), 'itertools.count', 'count', ([], {}), '()\n', (1228, 1230), False, 'from itertools import imap, count\n'), ((4090, 4104), 'array.array', 'array', (['"""c"""', 'rv'], {}), "('c', rv)\n", (4095, 4104), False, 'from array import array\n'), ((4486, 4509), 'struct.Struct', 'struct.Struct', (['typecode'], {})...
import requests def get_rate(to_currency, from_currency, date): ''' get the rate of exchange currency from frankfurter api ''' response = requests.get('https://api.frankfurter.app/%s?to=%s&from=%s' % (date, to_currency, from_currency)) if response.status_code == 200: return response....
[ "requests.get" ]
[((161, 262), 'requests.get', 'requests.get', (["('https://api.frankfurter.app/%s?to=%s&from=%s' % (date, to_currency,\n from_currency))"], {}), "('https://api.frankfurter.app/%s?to=%s&from=%s' % (date,\n to_currency, from_currency))\n", (173, 262), False, 'import requests\n')]
from urllib.parse import urlparse from six import b from time import time import utils class Block(object): #Chain consisting of blocks def __init__(self, previous_hash, height): self.block_header = { 'difficulty': 4, 'gas_limit': 10, 'gas_used': 0, 'h...
[ "utils.hash", "time.time" ]
[((635, 664), 'utils.hash', 'utils.hash', (['self.block_header'], {}), '(self.block_header)\n', (645, 664), False, 'import utils\n'), ((485, 491), 'time.time', 'time', ([], {}), '()\n', (489, 491), False, 'from time import time\n')]