code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. 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 ...
[ "numpy.clip", "numpy.random.default_rng", "math.cos", "numpy.array", "nvidia.dali.ops.readers.Caffe", "numpy.linalg.norm", "sequences_test_utils.ArgDesc", "random.Random", "numpy.max", "math.sin", "numpy.matmul", "test_utils.compare_pipelines", "sequences_test_utils.get_video_input_cases", ...
[((1055, 1097), 'os.path.join', 'os.path.join', (['test_data_root', '"""db"""', '"""lmdb"""'], {}), "(test_data_root, 'db', 'lmdb')\n", (1067, 1097), False, 'import os\n'), ((1829, 1849), 'numpy.linalg.norm', 'np.linalg.norm', (['axis'], {}), '(axis)\n', (1843, 1849), True, 'import numpy as np\n'), ((1919, 1934), 'math...
#%% import os print(os.getcwd()) from Blocks import ReLU, SequentialNN, Dense, Hinge, SGD from dataset_utils import load_mnist import numpy as np from convolution_layer import ConvLayer from maxpool_layer import MaxPool2x2 from flatten_layer import FlattenLayer import sys def iterate_minibatches(x, y, batch_size=16, ...
[ "flatten_layer.FlattenLayer", "numpy.mean", "convolution_layer.ConvLayer", "Blocks.SGD", "Blocks.SequentialNN", "maxpool_layer.MaxPool2x2", "matplotlib.pyplot.twinx", "os.getcwd", "numpy.array", "matplotlib.pyplot.figure", "Blocks.Dense", "Blocks.Hinge", "Blocks.ReLU", "sys.stdout.flush", ...
[((1357, 1364), 'Blocks.Hinge', 'Hinge', ([], {}), '()\n', (1362, 1364), False, 'from Blocks import ReLU, SequentialNN, Dense, Hinge, SGD\n'), ((1377, 1384), 'Blocks.SGD', 'SGD', (['nn'], {}), '(nn)\n', (1380, 1384), False, 'from Blocks import ReLU, SequentialNN, Dense, Hinge, SGD\n'), ((1456, 1489), 'numpy.array', 'np...
# Normal-exponential using out-of-band probes # normex: negative control probes # noob: ‘out-of-band’ Infinium I probes # Lib import logging import numpy as np import pandas as pd from statsmodels import robust from scipy.stats import norm, lognorm # App from ..models import ControlType, ArrayType from ..models.sketch...
[ "logging.getLogger", "numpy.median", "scipy.stats.norm", "statsmodels.robust.mad", "pandas.concat", "pandas.DataFrame", "numpy.maximum", "numpy.seterr" ]
[((450, 477), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (467, 477), False, 'import logging\n'), ((3266, 3319), 'pandas.DataFrame', 'pd.DataFrame', (['(Rmeth + Runmeth)'], {'columns': "['mean_value']"}), "(Rmeth + Runmeth, columns=['mean_value'])\n", (3278, 3319), True, 'import pandas...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging from typing import List import numpy as np from pydantic import BaseModel, validator from ray.rllib.agents.dqn import ApexTrain...
[ "logging.getLogger", "numpy.median", "compiler_gym.util.timer.Timer", "pydantic.validator" ]
[((596, 623), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (613, 623), False, 'import logging\n'), ((4873, 4905), 'pydantic.validator', 'validator', (['"""benchmark"""'], {'pre': '(True)'}), "('benchmark', pre=True)\n", (4882, 4905), False, 'from pydantic import BaseModel, validator\n')...
import re from array import * import fileinput import sys, getopt import csv def main(argv): vlog = '' top = '' try: opts, args = getopt.getopt(argv,"hf:t:",["Vlog=","Top="]) except getopt.GetoptError: print ('script_gen.py -r <verilog file> -t <top module name>') sys.exit(2) ...
[ "getopt.getopt", "sys.exit" ]
[((151, 198), 'getopt.getopt', 'getopt.getopt', (['argv', '"""hf:t:"""', "['Vlog=', 'Top=']"], {}), "(argv, 'hf:t:', ['Vlog=', 'Top='])\n", (164, 198), False, 'import sys, getopt\n'), ((306, 317), 'sys.exit', 'sys.exit', (['(2)'], {}), '(2)\n', (314, 317), False, 'import sys, getopt\n'), ((522, 532), 'sys.exit', 'sys.e...
# Generated by Django 3.0.8 on 2020-11-16 19:09 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hello', '0001_initial'), ] operations = [ migrations.CreateModel( name='Author', fi...
[ "django.db.migrations.AlterUniqueTogether", "django.db.migrations.DeleteModel", "django.db.models.EmailField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.migrations.RemoveField", "django.db.models.CharFie...
[((1389, 1455), 'django.db.migrations.AlterUniqueTogether', 'migrations.AlterUniqueTogether', ([], {'name': '"""guest"""', 'unique_together': 'None'}), "(name='guest', unique_together=None)\n", (1419, 1455), False, 'from django.db import migrations, models\n'), ((1500, 1556), 'django.db.migrations.RemoveField', 'migrat...
import multiprocessing as mp import pytest from kawadi.text_search import SearchInText @pytest.fixture() def input_data(): text_to_find = "String distance algorithm" text_to_search = """SIFT4 is a general purpose string distance algorithm inspired by JaroWinkler and Longest Common Subsequence. It was develo...
[ "pytest.fixture", "kawadi.text_search.SearchInText", "multiprocessing.cpu_count", "pytest.raises" ]
[((92, 108), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (106, 108), False, 'import pytest\n'), ((678, 694), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (692, 694), False, 'import pytest\n'), ((1145, 1159), 'kawadi.text_search.SearchInText', 'SearchInText', ([], {}), '()\n', (1157, 1159), False, 'fr...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') DEBUG = False class DevelopmentConfig: DEBUG = True SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://levy:Dadiesboy12@localhost/ronchezfitness' SQLALCHEMY_TRACK_MODIFICATIONS =...
[ "os.path.join", "os.path.dirname", "os.environ.get" ]
[((37, 62), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (52, 62), False, 'import os\n'), ((97, 125), 'os.environ.get', 'os.environ.get', (['"""SECRET_KEY"""'], {}), "('SECRET_KEY')\n", (111, 125), False, 'import os\n'), ((401, 431), 'os.environ.get', 'os.environ.get', (['"""postgres_uri"""...
import pandas as pd from crosstab.mega_analysis.pivot_result_to_pixel_intensities import * def lateralisation_to_pixel_intensities(all_combined_gifs, df, semiology_term, quantiles, method='non-linear', scale_factor=10, ...
[ "pandas.concat" ]
[((1344, 1420), 'pandas.concat', 'pd.concat', (['[a3, a2, pivot_result, all_combined_gifs_intensities]'], {'sort': '(False)'}), '([a3, a2, pivot_result, all_combined_gifs_intensities], sort=False)\n', (1353, 1420), True, 'import pandas as pd\n')]
from overrides import overrides import torch from allennlp.common.checks import ConfigurationError from allennlp.training.learning_rate_schedulers.learning_rate_scheduler import LearningRateScheduler @LearningRateScheduler.register("polynomial_decay") class PolynomialDecay(LearningRateScheduler): """ Impleme...
[ "allennlp.common.checks.ConfigurationError", "allennlp.training.learning_rate_schedulers.learning_rate_scheduler.LearningRateScheduler.register" ]
[((204, 254), 'allennlp.training.learning_rate_schedulers.learning_rate_scheduler.LearningRateScheduler.register', 'LearningRateScheduler.register', (['"""polynomial_decay"""'], {}), "('polynomial_decay')\n", (234, 254), False, 'from allennlp.training.learning_rate_schedulers.learning_rate_scheduler import LearningRate...
""" TO DO: 1. Lot of edge cases not accounted for 2. Could use some unit testing scripts for sanity check 3. What are the bounds for years? """ import mysql from mysql.connector import Error import re import numpy as np def reject_outliers(data, m = 6.): d = np.abs(data - np.median(data)) ...
[ "re.sub", "re.findall", "mysql.connector.connect", "numpy.median" ]
[((330, 342), 'numpy.median', 'np.median', (['d'], {}), '(d)\n', (339, 342), True, 'import numpy as np\n'), ((438, 544), 'mysql.connector.connect', 'mysql.connector.connect', ([], {'host': '"""127.0.0.1"""', 'port': '(3307)', 'database': '"""explorer_db"""', 'user': '"""root"""', 'password': '""""""'}), "(host='127.0.0...
import unittest from pyhmmer.easel import Alphabet from pyhmmer.errors import UnexpectedError, AllocationError, EaselError, AlphabetMismatch class TestErrors(unittest.TestCase): def test_unexpected_error(self): err = UnexpectedError(1, "p7_ReconfigLength") self.assertEqual(repr(err), "Unexpected...
[ "pyhmmer.easel.Alphabet.amino", "pyhmmer.errors.AllocationError", "pyhmmer.easel.Alphabet.dna", "pyhmmer.errors.UnexpectedError", "pyhmmer.errors.EaselError", "pyhmmer.easel.Alphabet.rna" ]
[((233, 272), 'pyhmmer.errors.UnexpectedError', 'UnexpectedError', (['(1)', '"""p7_ReconfigLength"""'], {}), "(1, 'p7_ReconfigLength')\n", (248, 272), False, 'from pyhmmer.errors import UnexpectedError, AllocationError, EaselError, AlphabetMismatch\n'), ((516, 545), 'pyhmmer.errors.AllocationError', 'AllocationError', ...
import base64 STANDARD_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' CUSTOM_ALPHABET = 'abcdefghjkmnprstuvwxyz0123456789' ENCODE_TRANS = str.maketrans(STANDARD_ALPHABET, CUSTOM_ALPHABET) DECODE_TRANS = str.maketrans(CUSTOM_ALPHABET, STANDARD_ALPHABET) PADDING_LETTER = '=' def encode(buffer): assert type(buffer) ...
[ "base64.b32encode" ]
[((399, 423), 'base64.b32encode', 'base64.b32encode', (['buffer'], {}), '(buffer)\n', (415, 423), False, 'import base64\n')]
""" A* grid planning author: <NAME>(@Atsushi_twi) <NAME> (<EMAIL>) See Wikipedia article (https://en.wikipedia.org/wiki/A*_search_algorithm) """ import math from node import Node from obstacle_map import Position class AStarPlanner: def __init__(self, obstacle_map): """ Initialize gr...
[ "obstacle_map.Position", "math.hypot", "node.Node", "math.sqrt" ]
[((698, 732), 'node.Node', 'Node', (['*args'], {'parent': 'self'}), '(*args, parent=self, **kwargs)\n', (702, 732), False, 'from node import Node\n'), ((3874, 3922), 'math.hypot', 'math.hypot', (['(pos_1.x - pos_2.x)', '(pos_1.y - pos_2.y)'], {}), '(pos_1.x - pos_2.x, pos_1.y - pos_2.y)\n', (3884, 3922), False, 'import...
import datetime as dt import pytest from cuenca_validations.types import ( EntryType, SavingCategory, TransactionStatus, WalletTransactionType, ) from cuenca import BalanceEntry, Saving, WalletTransaction @pytest.mark.vcr def test_create_wallet_transaction(): wallet_id = 'LAvWUDH6OpQk-ber3E_zUEi...
[ "cuenca.WalletTransaction.retrieve", "datetime.datetime.now", "cuenca.WalletTransaction.all", "datetime.timedelta", "cuenca.WalletTransaction.create", "cuenca.BalanceEntry.all" ]
[((337, 463), 'cuenca.WalletTransaction.create', 'WalletTransaction.create', ([], {'wallet_uri': 'f"""/savings/{wallet_id}"""', 'transaction_type': 'WalletTransactionType.deposit', 'amount': '(10000)'}), "(wallet_uri=f'/savings/{wallet_id}',\n transaction_type=WalletTransactionType.deposit, amount=10000)\n", (361, 4...
''' XlPy/inputs ___________ Validates input file selection, configurations, and matches file types. :copyright: (c) 2015 The Regents of the University of California. :license: GNU GPL, see licenses/GNU GPLv3.txt for more details. ''' # load modules import operator as op from xldlib.onstart.main ...
[ "xldlib.xlpy.wrappers.threadmessage", "xldlib.utils.logger.call", "operator.attrgetter" ]
[((421, 449), 'xldlib.utils.logger.call', 'logger.call', (['"""xlpy"""', '"""debug"""'], {}), "('xlpy', 'debug')\n", (432, 449), False, 'from xldlib.utils import logger\n'), ((513, 557), 'xldlib.xlpy.wrappers.threadmessage', 'wrappers.threadmessage', (['"""Checking inputs..."""'], {}), "('Checking inputs...')\n", (535,...
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from scipy.spatial import KDTree import cv2 import yaml import math import numpy as...
[ "rospy.logerr", "rospy.Subscriber", "rospy.init_node", "rospy.get_param", "scipy.spatial.KDTree", "std_msgs.msg.Int32", "yaml.load", "rospy.spin", "geometry_msgs.msg.Pose", "rospy.Publisher" ]
[((450, 480), 'rospy.init_node', 'rospy.init_node', (['"""tl_detector"""'], {}), "('tl_detector')\n", (465, 480), False, 'import rospy\n'), ((729, 769), 'rospy.get_param', 'rospy.get_param', (['"""/traffic_light_config"""'], {}), "('/traffic_light_config')\n", (744, 769), False, 'import rospy\n'), ((792, 816), 'yaml.lo...
# Generated by Django 2.1.7 on 2019-03-29 20:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('e_secretary', '0009_profile'), ] operations = [ migrations.AlterModelOptions( name='professor', options={'ordering':...
[ "django.db.models.EmailField", "django.db.migrations.DeleteModel", "django.db.models.BooleanField", "django.db.migrations.AlterModelOptions", "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((228, 307), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""professor"""', 'options': "{'ordering': ['title']}"}), "(name='professor', options={'ordering': ['title']})\n", (256, 307), False, 'from django.db import migrations, models\n'), ((352, 412), 'django.db.migrations.R...
""" Implements Pseudo-outcome based Two-step Nets, namely the DR-learner, the PW-learner and the RA-learner. """ # Author: <NAME> from typing import Callable, Optional, Tuple import jax.numpy as jnp import numpy as onp import pandas as pd from sklearn.model_selection import StratifiedKFold import catenets.logger as l...
[ "catenets.logger.debug", "catenets.models.jax.model_utils.check_shape_1d_data", "numpy.ones", "catenets.models.jax.transformation_utils._get_transformation_function", "sklearn.model_selection.StratifiedKFold", "numpy.zeros", "numpy.std", "catenets.models.jax.base.train_output_net_only", "numpy.round...
[((18080, 18124), 'catenets.models.jax.transformation_utils._get_transformation_function', '_get_transformation_function', (['transformation'], {}), '(transformation)\n', (18108, 18124), False, 'from catenets.models.jax.transformation_utils import DR_TRANSFORMATION, PW_TRANSFORMATION, RA_TRANSFORMATION, _get_transforma...
import random from plotting_utils import plot_spectrogram_to_numpy, image_for_logger, plot_to_image import numpy as np import tensorflow as tf class GParrotLogger(): def __init__(self, logdir, ali_path='ali'): # super(ParrotLogger, self).__init__(logdir) self.writer = tf.summary.create_file_write...
[ "tensorflow.summary.scalar", "tensorflow.summary.create_file_writer" ]
[((292, 329), 'tensorflow.summary.create_file_writer', 'tf.summary.create_file_writer', (['logdir'], {}), '(logdir)\n', (321, 329), True, 'import tensorflow as tf\n'), ((729, 786), 'tensorflow.summary.scalar', 'tf.summary.scalar', (['"""training.loss"""', 'train_loss', 'iteration'], {}), "('training.loss', train_loss, ...
import pyspiel game = pyspiel.load_game('bridge(use_double_dummy_result=false)') line = '30 32 10 35 50 45 21 7 1 42 39 43 0 16 40 20 36 15 22 44 26 6 4 51 47 46 25 14 29 5 34 11 49 31 37 9 41 13 24 8 28 17 48 23 33 18 3 19 38 2 27 12 56 57 52 63 52 52 52 0 32 48 8 3 51 47 15 44 28 16 4 14 50 2 10 49 5 37 9 36 31 24 2...
[ "pyspiel.load_game" ]
[((22, 80), 'pyspiel.load_game', 'pyspiel.load_game', (['"""bridge(use_double_dummy_result=false)"""'], {}), "('bridge(use_double_dummy_result=false)')\n", (39, 80), False, 'import pyspiel\n')]
import pytest from gorgona.stages.cleaners import NumberCleaner @pytest.fixture() def setup_number_cleaner(): nc = NumberCleaner( '', '', ) return nc def test_positive_integer_single_digit_single_digit(setup_number_cleaner): assert setup_number_cleaner("7") == "" def test_positiv...
[ "pytest.fixture", "gorgona.stages.cleaners.NumberCleaner" ]
[((68, 84), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (82, 84), False, 'import pytest\n'), ((122, 143), 'gorgona.stages.cleaners.NumberCleaner', 'NumberCleaner', (['""""""', '""""""'], {}), "('', '')\n", (135, 143), False, 'from gorgona.stages.cleaners import NumberCleaner\n')]
#! /usr/bin/env python3 import argparse import atexit import json import os import subprocess import sys import time import unittest from test_device import ( Bitcoind, DeviceEmulator, DeviceTestCase, TestDeviceConnect, TestGetKeypool, TestGetDescriptors, TestSignTx, ) from hwilib.devices...
[ "unittest.TestSuite", "argparse.ArgumentParser", "test_device.DeviceTestCase.parameterize", "test_device.Bitcoind.create", "json.dumps", "unittest.TextTestRunner", "time.sleep", "hwilib.devices.digitalbitbox.send_plain", "os.path.dirname", "hwilib.devices.digitalbitbox.BitboxSimulator", "os.unli...
[((7871, 7891), 'unittest.TestSuite', 'unittest.TestSuite', ([], {}), '()\n', (7889, 7891), False, 'import unittest\n'), ((8978, 9051), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Test Digital Bitbox implementation"""'}), "(description='Test Digital Bitbox implementation')\n", (9001, ...
import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' extensions = [] templates_path = ['_templates'] source_suffix = ['.rst', '.md'] master_doc = 'index' project = u'fiubar' copyright = u'2008-2018, <NAME>' version = '2.0.0' release = '2.0.0' exclude_trees = ['_build'] pygments_style = 'sphinx' html_stati...
[ "sphinx_rtd_theme.get_html_theme_path", "os.environ.get" ]
[((20, 55), 'os.environ.get', 'os.environ.get', (['"""READTHEDOCS"""', 'None'], {}), "('READTHEDOCS', None)\n", (34, 55), False, 'import os\n'), ((443, 481), 'sphinx_rtd_theme.get_html_theme_path', 'sphinx_rtd_theme.get_html_theme_path', ([], {}), '()\n', (479, 481), False, 'import sphinx_rtd_theme\n')]
from io import StringIO import itertools import numpy as np import numpy.ma as ma inputfile = './input/day9.txt' # inputfile = StringIO('''2199943210 # 3987894921 # 9856789892 # 8767896789 # 9899965678''') def neighbors(ar, i, j): return {ar[i-1,j], ar[i+1,j], ar[i,j-1], ar[i...
[ "numpy.pad", "numpy.genfromtxt" ]
[((333, 381), 'numpy.genfromtxt', 'np.genfromtxt', (['inputfile'], {'dtype': '"""i"""', 'delimiter': '(1)'}), "(inputfile, dtype='i', delimiter=1)\n", (346, 381), True, 'import numpy as np\n'), ((409, 456), 'numpy.pad', 'np.pad', (['a', '((1, 1), (1, 1))'], {'constant_values': '(10)'}), '(a, ((1, 1), (1, 1)), constant_...
""" Copyright 2019 BBC. Licensed under the terms of the Apache License 2.0. """ from unittest.mock import Mock import pytest from google.cloud.bigquery import Client from foxglove.connectors.bigquery import BigQueryConnector @pytest.fixture def fake_bq_client(): return Mock(spec=Client(project='test_project')...
[ "foxglove.connectors.bigquery.BigQueryConnector", "google.cloud.bigquery.Client" ]
[((406, 472), 'foxglove.connectors.bigquery.BigQueryConnector', 'BigQueryConnector', (['"""test_dataset_id"""', '"""test_table_id"""', '"""test_role"""'], {}), "('test_dataset_id', 'test_table_id', 'test_role')\n", (423, 472), False, 'from foxglove.connectors.bigquery import BigQueryConnector\n'), ((697, 763), 'foxglov...
import sys #"splchar":["!","@","#","$",".",",",":","%","^","*"] splchar=[chr(i) for i in range(33,48)]#ASCII spl charecter range from 33-48 and58-65#and i here is the mapping expression ie the thing thet is executed evry iteration splchar1=[chr(i) for i in range(58,65)]#Instead of explicit declaration of for loop ...
[ "sys.stdin.read" ]
[((733, 749), 'sys.stdin.read', 'sys.stdin.read', ([], {}), '()\n', (747, 749), False, 'import sys\n')]
__author__ = 'ashvinder' import re import os import gc import logger import time from TestInput import TestInputSingleton from backup.backup_base import BackupBaseTest from remote.remote_util import RemoteMachineShellConnection from couchbase_helper.documentgenerator import BlobGenerator from couchbase_helper.documentg...
[ "re.search", "view.spatialquerytests.SimpleDataSet", "couchbase_helper.cluster.Cluster", "memcached.helper.kvstore.KVStore", "membase.helper.spatial_helper.SpatialHelper", "remote.remote_util.RemoteMachineShellConnection", "time.sleep", "logger.Logger.get_logger", "couchbase_helper.documentgenerator...
[((1093, 1168), 'couchbase_helper.documentgenerator.BlobGenerator', 'BlobGenerator', (['"""testdata"""', '"""testdata-"""', 'self.value_size'], {'end': 'self.num_items'}), "('testdata', 'testdata-', self.value_size, end=self.num_items)\n", (1106, 1168), False, 'from couchbase_helper.documentgenerator import BlobGenerat...
"""Check the feasibility of a bipartite graph by using SSLAP's feasibility module""" import numpy as np from sslap import hopcroft_solve # All 3 methods will use the same input bipartite graph: # i = 0 connects to j = 0, 1 # i = 1 connects to j = 1, 2 # i = 2 connects to j = 1, 4 # i = 3 connects to j = 2 # i = 4 con...
[ "numpy.array", "numpy.ones", "sslap.hopcroft_solve" ]
[((494, 523), 'sslap.hopcroft_solve', 'hopcroft_solve', ([], {'lookup': 'lookup'}), '(lookup=lookup)\n', (508, 523), False, 'from sslap import hopcroft_solve\n'), ((690, 713), 'sslap.hopcroft_solve', 'hopcroft_solve', ([], {'mat': 'mat'}), '(mat=mat)\n', (704, 713), False, 'from sslap import hopcroft_solve\n'), ((752, ...
from django.db import models # Create your models here. class HeadlineListing(models.Model): headline_text = models.CharField(max_length=500) accessed = models.DateTimeField() source_url = models.CharField(max_length=200) author = models.CharField(default="", max_length=200) source = models.CharFie...
[ "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((114, 146), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(500)'}), '(max_length=500)\n', (130, 146), False, 'from django.db import models\n'), ((162, 184), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {}), '()\n', (182, 184), False, 'from django.db import models\n'), ((202,...
import matplotlib.pyplot as plt import pandas as pd def main(): times = [ 1, 100, 365, 365*20, 365*100, 100000] df = pd.read_csv('tmp.csv') df_ini = pd.read_csv("initial_value.csv") xan_measured = (df_ini["distance"], df_ini["XAn"]) df_m = pd.read_csv('measured_value.csv') measured_da...
[ "matplotlib.pyplot.figure", "pandas.read_csv" ]
[((126, 148), 'pandas.read_csv', 'pd.read_csv', (['"""tmp.csv"""'], {}), "('tmp.csv')\n", (137, 148), True, 'import pandas as pd\n'), ((167, 199), 'pandas.read_csv', 'pd.read_csv', (['"""initial_value.csv"""'], {}), "('initial_value.csv')\n", (178, 199), True, 'import pandas as pd\n'), ((271, 304), 'pandas.read_csv', '...
import os import re import csv import sys import json import yaml import time import socket import connexion import postgresql as psql from flask import current_app from urllib.parse import urlencode from hashlib import md5 from bokeh.embed import server_document from .processes import fetch_process, is_running, proce...
[ "csv.DictReader", "re.compile", "subprocess.run", "json.dumps", "os.path.splitext", "postgresql.open", "os.path.basename", "json.load" ]
[((378, 405), 're.compile', 're.compile', (['"""^\\\\d*\\\\.\\\\d+$"""'], {}), "('^\\\\d*\\\\.\\\\d+$')\n", (388, 405), False, 'import re\n'), ((418, 440), 're.compile', 're.compile', (['"""^-?\\\\d+$"""'], {}), "('^-?\\\\d+$')\n", (428, 440), False, 'import re\n'), ((454, 472), 're.compile', 're.compile', (['"""^NA$""...
import numpy as np import chainer from chainer import cuda, Function, gradient_check, Variable from chainer import optimizers, serializers, utils from chainer import Link, Chain, ChainList import chainer.functions as F import chainer.links as L class normalNN(Chain): def __init__(self, dim): super().__ini...
[ "chainer.links.BatchNormalization", "chainer.links.Linear", "chainer.links.Convolution2D" ]
[((340, 358), 'chainer.links.Linear', 'L.Linear', (['dim', '(100)'], {}), '(dim, 100)\n', (348, 358), True, 'import chainer.links as L\n'), ((375, 391), 'chainer.links.Linear', 'L.Linear', (['(100)', '(1)'], {}), '(100, 1)\n', (383, 391), True, 'import chainer.links as L\n'), ((674, 705), 'chainer.links.Linear', 'L.Lin...
""" This script is needed to convert gdb scripts from commands to documentation """ import os def convert_commands_to_docs(): commands_dir = os.getcwd() + "/numba_dppy/examples/debug/commands" examples = os.listdir(commands_dir) os.chdir(commands_dir + "/docs") for file in examples: if file !=...
[ "os.path.exists", "os.listdir", "os.getcwd", "os.chdir", "os.remove" ]
[((214, 238), 'os.listdir', 'os.listdir', (['commands_dir'], {}), '(commands_dir)\n', (224, 238), False, 'import os\n'), ((243, 275), 'os.chdir', 'os.chdir', (["(commands_dir + '/docs')"], {}), "(commands_dir + '/docs')\n", (251, 275), False, 'import os\n'), ((147, 158), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (156...
import json import requests from typing import List from konlpy.tag import Okt from requests.models import Response class OktTokenizer: """ A POS-tagger based tokenizer functor. Note that these are just examples. The `phrases` function usually gives a better result than an ordinary POS tokenizer. ...
[ "konlpy.tag.Okt", "json.loads", "requests.post" ]
[((467, 472), 'konlpy.tag.Okt', 'Okt', ([], {}), '()\n', (470, 472), False, 'from konlpy.tag import Okt\n'), ((1098, 1137), 'requests.post', 'requests.post', (['self.endpoint'], {'data': 'body'}), '(self.endpoint, data=body)\n', (1111, 1137), False, 'import requests\n'), ((1166, 1186), 'json.loads', 'json.loads', (['re...
from .alexnet import alexnet_V2 import tensorflow.compat.v1 as tf import tensorflow.contrib.slim as slim from utils import montage_tf from .lci_nets import patch_inpainter, patch_discriminator import tensorflow.contrib as contrib # Average pooling params for imagenet linear classifier experiments AVG_POOL_PARAMS = {'...
[ "tensorflow.compat.v1.ones_like", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.pad", "tensorflow.contrib.layers.variance_scaling_initializer", "tensorflow.compat.v1.losses.mean_squared_error", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.nn.relu", "tensorflow.compat.v1.split", "tensor...
[((7919, 7980), 'tensorflow.compat.v1.ones', 'tf.ones', (['[im_shape[0], patch_sz[0], patch_sz[1], im_shape[3]]'], {}), '([im_shape[0], patch_sz[0], patch_sz[1], im_shape[3]])\n', (7926, 7980), True, 'import tensorflow.compat.v1 as tf\n'), ((7998, 8106), 'tensorflow.compat.v1.pad', 'tf.pad', (['patch_mask', '[[0, 0], [...
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Author: pirogue Purpose: 白名单端口表操作 Site: http://pirogue.org Created: 2018-08-03 17:32:54 """ from dbs.initdb import DBSession from dbs.models.Whiteport import Whiteport from sqlalchemy import desc,asc from sqlalchemy.exc import InvalidRequestError # import s...
[ "dbs.models.Whiteport.Whiteport" ]
[((884, 912), 'dbs.models.Whiteport.Whiteport', 'Whiteport', ([], {'dst_port': 'dst_port'}), '(dst_port=dst_port)\n', (893, 912), False, 'from dbs.models.Whiteport import Whiteport\n')]
# # Copyright (C) 2018 <NAME> <<EMAIL>> # License: MIT # r"""Singleton class .. versionadded:: 0.9.8 - Add to make a kind of manager instancne later to manage plugins. """ from __future__ import absolute_import import threading class Singleton(object): """Singleton utilizes __new__ special method. .. no...
[ "threading.RLock" ]
[((428, 445), 'threading.RLock', 'threading.RLock', ([], {}), '()\n', (443, 445), False, 'import threading\n')]
import tvm from functools import reduce from ..utils import to_int, to_int_or_None def get_need_tile(need_tile): return [True if x.value == 1 else False for x in need_tile] def get_factors(split_factor_entities): return [[x.value for x in factors.factors] for factors in split_factor_entities] def tile_axis(st...
[ "functools.reduce" ]
[((3933, 3982), 'functools.reduce', 'reduce', (['(lambda x, y: x + y)', 'leveled_axes[:-1]', '[]'], {}), '(lambda x, y: x + y, leveled_axes[:-1], [])\n', (3939, 3982), False, 'from functools import reduce\n'), ((4008, 4059), 'functools.reduce', 'reduce', (['(lambda x, y: x + y)', 'reduce_leveled_axes', '[]'], {}), '(la...
""" mcpython - a minecraft clone written in python licenced under the MIT-licence (https://github.com/mcpython4-coding/core) Contributors: uuk, xkcdjerry (inactive) Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence Original game "minecraft" by Mojang Studios (www.m...
[ "mcpython.engine.ResourceLoader.read_image", "mcpython.engine.logger.print_exception", "asyncio.get_event_loop" ]
[((4030, 4091), 'mcpython.engine.logger.print_exception', 'logger.print_exception', (['"""failed to add alpha composite layer"""'], {}), "('failed to add alpha composite layer')\n", (4052, 4091), False, 'from mcpython.engine import logger\n'), ((2844, 2888), 'mcpython.engine.ResourceLoader.read_image', 'ResourceLoader....
from setuptools import setup setup(name='goofy', version='0.1', description='A goofy ebay bot.', url='github.com/elcolumbio/goofy', author='<NAME>', author_email='<EMAIL>', license='Apache License, Version 2.0 (the "License")', packages=['goofy'])
[ "setuptools.setup" ]
[((30, 257), 'setuptools.setup', 'setup', ([], {'name': '"""goofy"""', 'version': '"""0.1"""', 'description': '"""A goofy ebay bot."""', 'url': '"""github.com/elcolumbio/goofy"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""Apache License, Version 2.0 (the "License")"""', 'packages': "['g...
import unittest import translator class TestEnglishToFrench(unittest.TestCase): def test_love(self): self.assertEqual(translator.english_to_french('Love'), 'Amour') def test_sun(self): self.assertEqual(translator.english_to_french('Sun'), 'Soleil') def test_null(self): self.as...
[ "unittest.main", "translator.french_to_english", "translator.english_to_french" ]
[((972, 987), 'unittest.main', 'unittest.main', ([], {}), '()\n', (985, 987), False, 'import unittest\n'), ((131, 167), 'translator.english_to_french', 'translator.english_to_french', (['"""Love"""'], {}), "('Love')\n", (159, 167), False, 'import translator\n'), ((228, 263), 'translator.english_to_french', 'translator....
from flask import (Flask, jsonify) from gevent import (pywsgi, sleep) from geventwebsocket.handler import WebSocketHandler from . import __version__ from .logs import logger class FlaskApp(object): def __init__(self, host='', port=8080): self.app = Flask(__name__) self._register_routes() ...
[ "flask.jsonify", "gevent.sleep", "gevent.pywsgi.WSGIServer", "flask.Flask" ]
[((264, 279), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (269, 279), False, 'from flask import Flask, jsonify\n'), ((419, 509), 'gevent.pywsgi.WSGIServer', 'pywsgi.WSGIServer', (['(self._host, self._port)', 'self.app'], {'handler_class': 'WebSocketHandler'}), '((self._host, self._port), self.app, handl...
from django.views.generic import ListView, CreateView, UpdateView from django.utils.decorators import method_decorator from django.contrib.admin.views.decorators import staff_member_required from django.shortcuts import get_object_or_404, redirect, reverse from django.urls import reverse_lazy from django.contrib import...
[ "django.http.JsonResponse", "django.contrib.messages.warning", "django.shortcuts.get_object_or_404", "product.models.Product.objects.filter", "django.utils.decorators.method_decorator", "product.models.Product.broswer.active", "datetime.datetime.now", "django.shortcuts.reverse", "django_tables2.Requ...
[((716, 772), 'django.utils.decorators.method_decorator', 'method_decorator', (['staff_member_required'], {'name': '"""dispatch"""'}), "(staff_member_required, name='dispatch')\n", (732, 772), False, 'from django.utils.decorators import method_decorator\n'), ((2079, 2135), 'django.utils.decorators.method_decorator', 'm...
import caffe import torch import numpy as np import argparse from collections import OrderedDict from torch.autograd import Variable import torch.nn as nn def arg_parse(): parser = argparse.ArgumentParser() parser.add_argument('--model', '-m', default='alexnet') parser.add_argument('--decimal', '-d', defa...
[ "numpy.prod", "collections.OrderedDict", "torchvision.models.inception.inception_v3", "argparse.ArgumentParser", "torchvision.models.resnet.resnet18", "torch.Tensor", "numpy.testing.assert_almost_equal", "caffe.Net", "torchvision.models.alexnet.alexnet" ]
[((187, 212), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (210, 212), False, 'import argparse\n'), ((836, 849), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (847, 849), False, 'from collections import OrderedDict\n'), ((1695, 1708), 'collections.OrderedDict', 'OrderedDict', ([...
# coding=utf-8 import logging import numpy as np import pandas as pd from sklearn import metrics from sklearn.linear_model import LogisticRegression from sklearn.multiclass import OneVsRestClassifier from sklearn.preprocessing import LabelBinarizer from sklearn.utils import shuffle logging.basicConfig(format='%(level...
[ "logging.basicConfig", "sklearn.preprocessing.LabelBinarizer", "pandas.read_csv", "numpy.where", "sklearn.utils.shuffle", "numpy.argmax", "numpy.isin", "sklearn.linear_model.LogisticRegression", "numpy.array", "numpy.linalg.norm" ]
[((285, 361), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s:%(message)s"""', 'level': 'logging.ERROR'}), "(format='%(levelname)s:%(message)s', level=logging.ERROR)\n", (304, 361), False, 'import logging\n'), ((538, 581), 'pandas.read_csv', 'pd.read_csv', (['lbl_path'], {'header': 'None...
import os import glob import argparse as ap import shutil as sh import re def main(): parser = ap.ArgumentParser(description="""Uses minimum basis term file to extract the data for a simulation that used the minimum number of basis terms for each frequency""") parser.add_argument('min_file',type=str,help="...
[ "argparse.ArgumentParser", "os.makedirs", "os.path.join", "os.path.isfile", "shutil.copytree", "os.path.isdir", "os.path.basename", "os.path.abspath", "glob.glob", "re.search" ]
[((100, 279), 'argparse.ArgumentParser', 'ap.ArgumentParser', ([], {'description': '"""Uses minimum basis term file to extract the data for a\n simulation that used the minimum number of basis terms for each frequency"""'}), '(description=\n """Uses minimum basis term file to extract the data for a\n simulatio...
# turingmachine.py - implementation of the Turing machine model # # Copyright 2014 <NAME>. # # This file is part of turingmachine. # # turingmachine is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either versi...
[ "logging.getLogger", "logging.Formatter", "logging.StreamHandler" ]
[((951, 978), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (968, 978), False, 'import logging\n'), ((989, 1012), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (1010, 1012), False, 'import logging\n'), ((1025, 1073), 'logging.Formatter', 'logging.Formatter', (['"""[...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 5 23:04:10 2020 @author: y3 749e8aa818a63c61c31acd7ee948d6d8 """ import requests api_address = "https://api.openweathermap.org/data/2.5/weather?q=" api_key_url = "&APPID=749e8aa818a63c61c31acd7ee948d6d8" city_name = "Bet shemesh,IL" weather_data...
[ "requests.get" ]
[((323, 374), 'requests.get', 'requests.get', (['(api_address + city_name + api_key_url)'], {}), '(api_address + city_name + api_key_url)\n', (335, 374), False, 'import requests\n')]
#!/usr/bin/python3 import os import click import sys import csv import time import pandas as pd import country_converter as coco import hashlib import phonenumbers from tqdm import tqdm from uszipcode import SearchEngine HEADER_TRANSLATIONS = { "email1": "Email", "phone1": "Phone", "person_country": "Count...
[ "csv.DictReader", "pandas.read_csv", "country_converter.convert", "csv.Sniffer", "sys.exit", "os.path.exists", "tqdm.tqdm.write", "click.option", "click.command", "click.argument", "hashlib.sha256", "click.confirm", "uszipcode.SearchEngine", "os.path.isfile", "os.path.dirname", "phonen...
[((14903, 15046), 'click.command', 'click.command', ([], {'help': '"""Generates a Google Ads Customer Match compliant CSV file from a (potentially large) CSV file in another format."""'}), "(help=\n 'Generates a Google Ads Customer Match compliant CSV file from a (potentially large) CSV file in another format.'\n ...
import io from PIL import Image from torchvision import models import torch import torchvision.transforms as transforms import torch.nn as nn import torch.nn.functional as F import urllib import os def get_model_from_global_agent(): global_model = models.squeezenet1_1(pretrained=True) global_model.classifier[1...
[ "torchvision.transforms.CenterCrop", "torch.device", "urllib.request.urlretrieve", "io.BytesIO", "torch.nn.Conv2d", "torchvision.transforms.Normalize", "torchvision.transforms.Resize", "torchvision.transforms.ToTensor", "torchvision.models.squeezenet1_1", "os.remove" ]
[((253, 290), 'torchvision.models.squeezenet1_1', 'models.squeezenet1_1', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (273, 290), False, 'from torchvision import models\n'), ((324, 376), 'torch.nn.Conv2d', 'nn.Conv2d', (['(512)', '(5)'], {'kernel_size': '(1, 1)', 'stride': '(1, 1)'}), '(512, 5, kernel_size=(...
""" main(terminal).py Author: <NAME> """ from solver import print_grid, solve def main(): sudoku_grid = [ [0,8,0, 0,0,0, 2,0,0], [0,0,0, 0,8,4, 0,9,0], [0,0,6, 3,2,0, 0,1,0], [0,9,7, 0,0,0, 0,8,0], ...
[ "solver.solve", "solver.print_grid" ]
[((872, 895), 'solver.print_grid', 'print_grid', (['sudoku_grid'], {}), '(sudoku_grid)\n', (882, 895), False, 'from solver import print_grid, solve\n'), ((973, 987), 'solver.solve', 'solve', (['copy', '(9)'], {}), '(copy, 9)\n', (978, 987), False, 'from solver import print_grid, solve\n'), ((992, 1008), 'solver.print_g...
import subprocess import os import requests import pyttsx3 from bs4 import BeautifulSoup class Commander: def __init__(self): self.confirm = ["yes", "ok", "go on", "sure", "do it", "yeah", "yaa", "Imm", "confirm", "of course"] self.cancel = ["nope", "no", "noo", "not yet", "don't", "do not", "stop...
[ "pyttsx3.init", "bs4.BeautifulSoup", "requests.get" ]
[((2034, 2048), 'pyttsx3.init', 'pyttsx3.init', ([], {}), '()\n', (2046, 2048), False, 'import pyttsx3\n'), ((1282, 1299), 'requests.get', 'requests.get', (['URL'], {}), '(URL)\n', (1294, 1299), False, 'import requests\n'), ((1319, 1361), 'bs4.BeautifulSoup', 'BeautifulSoup', (['content.text', '"""html.parser"""'], {})...
# Generated by Django 2.2.12 on 2020-04-29 18:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cmsplugin_remote_form', '0004_remoteform_notification_emails'), ] operations = [ migrations.AlterField( model_name='extrafield'...
[ "django.db.models.CharField" ]
[((370, 1138), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('CharField', 'CharField'), ('BooleanField', 'BooleanField'), (\n 'EmailField', 'EmailField'), ('DecimalField', 'DecimalField'), (\n 'FloatField', 'FloatField'), ('IntegerField', 'IntegerField'), (\n 'FileField', 'FileField'), ...
import csv import cv2 import numpy as np import pandas as pd import sys from datetime import datetime from numpy.random import RandomState import keras import tensorflow as tf from keras.models import Sequential from keras.callbacks import ModelCheckpoint from keras.layers import Flatten, Dense, Lambda, Cropping2D, C...
[ "keras.optimizers.Adam", "keras.layers.Conv2D", "keras.layers.Flatten", "pandas.read_csv", "cv2.flip", "keras.layers.Lambda", "tensorflow.multiply", "keras.callbacks.TensorBoard", "keras.models.Sequential", "numpy.array", "keras.layers.Dropout", "keras.layers.Dense", "keras.layers.MaxPool2D"...
[((14357, 14369), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (14367, 14369), False, 'from keras.models import Sequential\n'), ((15282, 15386), 'pandas.read_csv', 'pd.read_csv', (['"""data/driving_log.csv"""'], {'names': "['center', 'left', 'right', 'measurement', '1', '2', '3']"}), "('data/driving_log.c...
import torch from torch import nn from configs import ANCHOR_SIZES class PostRes(nn.Module): def __init__(self, n_in, n_out, stride=1): super(PostRes, self).__init__() self.conv1 = nn.Conv3d(n_in, n_out, kernel_size=3, stride=stride, padding=1) self.bn1 = nn.BatchNorm3d(n_out) self...
[ "torch.nn.ReLU", "torch.nn.BatchNorm3d", "torch.nn.ConvTranspose3d", "torch.nn.Dropout3d", "torch.nn.Sequential", "torch.nn.MaxPool3d", "torch.nn.MaxUnpool3d", "torch.cat", "torch.nn.Conv3d" ]
[((203, 266), 'torch.nn.Conv3d', 'nn.Conv3d', (['n_in', 'n_out'], {'kernel_size': '(3)', 'stride': 'stride', 'padding': '(1)'}), '(n_in, n_out, kernel_size=3, stride=stride, padding=1)\n', (212, 266), False, 'from torch import nn\n'), ((286, 307), 'torch.nn.BatchNorm3d', 'nn.BatchNorm3d', (['n_out'], {}), '(n_out)\n', ...
from django.urls import path from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView, ) from . views import * urlpatterns = [ path('register/', UserRegisterView.as_view()), path('logout/', LogoutView.as_view()), path('token/', TokenObtainPairView.as_...
[ "rest_framework_simplejwt.views.TokenVerifyView.as_view", "rest_framework_simplejwt.views.TokenObtainPairView.as_view", "rest_framework_simplejwt.views.TokenRefreshView.as_view" ]
[((297, 326), 'rest_framework_simplejwt.views.TokenObtainPairView.as_view', 'TokenObtainPairView.as_view', ([], {}), '()\n', (324, 326), False, 'from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView, TokenVerifyView\n'), ((382, 408), 'rest_framework_simplejwt.views.TokenRefreshView.as_view', ...
from __future__ import print_function import os import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader, Dataset from collections import OrderedDict import numpy as np from edgeml_pytorch.trainer.drocc_trainer import DROCCTra...
[ "numpy.mean", "edgeml_pytorch.trainer.drocc_trainer.DROCCTrainer", "torch.nn.ReLU", "os.path.exists", "numpy.ones", "torch.set_printoptions", "argparse.ArgumentParser", "os.makedirs", "numpy.std", "os.path.join", "torch.from_numpy", "torch.is_tensor", "torch.tensor", "torch.cuda.is_availab...
[((2779, 2807), 'numpy.ones', 'np.ones', (['train_data.shape[0]'], {}), '(train_data.shape[0])\n', (2786, 2807), True, 'import numpy as np\n'), ((3052, 3074), 'numpy.mean', 'np.mean', (['train_data', '(0)'], {}), '(train_data, 0)\n', (3059, 3074), True, 'import numpy as np\n'), ((3082, 3103), 'numpy.std', 'np.std', (['...
from django import forms class ContactForm(forms.Form): user_name = forms.CharField(max_length=60, label='', required=True, widget=forms.TextInput(attrs={'placeholder': '<NAME>'})) user_email = forms.EmailField(label='', required=True) message = forms.CharField(label='', required=True, widget=forms.Texta...
[ "django.forms.Textarea", "django.forms.EmailField", "django.forms.TextInput" ]
[((205, 246), 'django.forms.EmailField', 'forms.EmailField', ([], {'label': '""""""', 'required': '(True)'}), "(label='', required=True)\n", (221, 246), False, 'from django import forms\n'), ((138, 186), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'placeholder': '<NAME>'}"}), "(attrs={'placeholder': '...
#coding:utf-8 import ftplib import os from ...core import constants from . import base class Configurer(base.Configurer): def __init__(self,config): self._config = config self._key = constants.KEY_CONFIGURER_INSTANCES self._results = {} self.instance = ftplib.FTP() self.inst...
[ "os.path.exists", "os.listdir", "ftplib.FTP", "os.makedirs", "os.path.join", "os.path.isdir" ]
[((290, 302), 'ftplib.FTP', 'ftplib.FTP', ([], {}), '()\n', (300, 302), False, 'import ftplib\n'), ((1235, 1259), 'os.path.isdir', 'os.path.isdir', (['localpath'], {}), '(localpath)\n', (1248, 1259), False, 'import os\n'), ((1282, 1303), 'os.listdir', 'os.listdir', (['localpath'], {}), '(localpath)\n', (1292, 1303), Fa...
# Name: load.py # Date: June 2019 # Function: goes trough a bookmark file checking the status of each URL # Input: bookmark file in json format # Output: new text and json files including those URLs according with their status import os import ast try: import requests except: sys.stderr.write("%s: Please inst...
[ "simplejson.load", "requests.head", "os.mkdir" ]
[((915, 940), 'simplejson.load', 'json.load', (['input_filename'], {}), '(input_filename)\n', (924, 940), True, 'import simplejson as json\n'), ((1172, 1189), 'os.mkdir', 'os.mkdir', (['DIRNAME'], {}), '(DIRNAME)\n', (1180, 1189), False, 'import os\n'), ((2281, 2311), 'requests.head', 'requests.head', (['url'], {'timeo...
from tir import Webapp import unittest from tir.technologies.apw_internal import ApwInternal import datetime import time DateSystem = datetime.datetime.today().strftime('%d/%m/%Y') DateVal = datetime.datetime(2120, 5, 17) """------------------------------------------------------------------- /*/{Protheus.doc} PLSA809T...
[ "datetime.datetime", "unittest.main", "time.sleep", "tir.Webapp", "datetime.datetime.today" ]
[((192, 222), 'datetime.datetime', 'datetime.datetime', (['(2120)', '(5)', '(17)'], {}), '(2120, 5, 17)\n', (209, 222), False, 'import datetime\n'), ((4574, 4589), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4587, 4589), False, 'import unittest\n'), ((135, 160), 'datetime.datetime.today', 'datetime.datetime.to...
from __future__ import print_function from P13pt.mascril.measurement import MeasurementBase from P13pt.mascril.parameter import Sweep, String, Folder, Boolean from P13pt.drivers.bilt import Bilt, BiltVoltageSource, BiltVoltMeter from P13pt.drivers.zilockin import ZILockin import time import numpy as np import os clas...
[ "P13pt.mascril.parameter.Folder", "P13pt.mascril.parameter.String", "P13pt.drivers.zilockin.ZILockin", "P13pt.mascril.parameter.Sweep", "time.strftime", "os.path.join", "time.sleep", "P13pt.mascril.parameter.Boolean", "P13pt.drivers.bilt.Bilt", "P13pt.drivers.bilt.BiltVoltageSource", "P13pt.driv...
[((383, 395), 'P13pt.mascril.parameter.Sweep', 'Sweep', (['[0.0]'], {}), '([0.0])\n', (388, 395), False, 'from P13pt.mascril.parameter import Sweep, String, Folder, Boolean\n'), ((413, 425), 'P13pt.mascril.parameter.Sweep', 'Sweep', (['[0.0]'], {}), '([0.0])\n', (418, 425), False, 'from P13pt.mascril.parameter import S...
# NOTE: Following example requires boto3 package. import boto3 from InquirerPy import prompt from InquirerPy.exceptions import InvalidArgument from InquirerPy.validator import PathValidator client = boto3.client("s3") def get_bucket(_): return [bucket["Name"] for bucket in client.list_buckets()["Buckets"]] de...
[ "InquirerPy.prompt", "InquirerPy.validator.PathValidator", "boto3.client" ]
[((201, 219), 'boto3.client', 'boto3.client', (['"""s3"""'], {}), "('s3')\n", (213, 219), False, 'import boto3\n'), ((1646, 1677), 'InquirerPy.prompt', 'prompt', (['questions'], {'vi_mode': '(True)'}), '(questions, vi_mode=True)\n', (1652, 1677), False, 'from InquirerPy import prompt\n'), ((911, 926), 'InquirerPy.valid...
#!/bin/sh ''''[ ! -z $VIRTUAL_ENV ] && exec python -u -- "$0" ${1+"$@"}; command -v python3 > /dev/null && exec python3 -u -- "$0" ${1+"$@"}; exec python2 -u -- "$0" ${1+"$@"} # ''' import sys import os import argparse HERE = os.path.dirname(__file__) ROOT = os.path.abspath(os.path.join(HERE, "..")) sys.path.insert(0...
[ "sys.path.insert", "argparse.ArgumentParser", "os.path.join", "os.path.dirname", "paella.Setup.__init__" ]
[((228, 253), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (243, 253), False, 'import os\n'), ((303, 327), 'sys.path.insert', 'sys.path.insert', (['(0)', 'ROOT'], {}), '(0, ROOT)\n', (318, 327), False, 'import sys\n'), ((1104, 1167), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([]...
import pyHook from threading import Timer import win32gui import logging class blockInput(): def OnKeyboardEvent(self,event): return False def OnMouseEvent(self,event): return False def unblock(self): logging.info(" -- Unblock!") if self.t.is_alive(): ...
[ "logging.basicConfig", "win32gui.PumpWaitingMessages", "threading.Timer", "pyHook.HookManager", "logging.info", "time.sleep", "time.time" ]
[((992, 1031), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (1011, 1031), False, 'import logging\n'), ((1108, 1119), 'time.time', 'time.time', ([], {}), '()\n', (1117, 1119), False, 'import time\n'), ((1238, 1259), 'logging.info', 'logging.info', (['"""Done.""...
""" This python code demonstrates an edge-based active contour model as an application of the Distance Regularized Level Set Evolution (DRLSE) formulation in the following paper: <NAME>, <NAME>, <NAME>, <NAME>, "Distance Regularized Level Set Evolution and Its Application to Image Segmentation", IEEE Trans. Ima...
[ "numpy.ones", "numpy.max", "skimage.io.imread", "lv_set.find_lsf.find_lsf", "numpy.min", "lv_set.show_fig.draw_all" ]
[((2340, 2358), 'lv_set.find_lsf.find_lsf', 'find_lsf', ([], {}), '(**params)\n', (2348, 2358), False, 'from lv_set.find_lsf import find_lsf\n'), ((2387, 2419), 'lv_set.show_fig.draw_all', 'draw_all', (['phi', "params['img']", '(10)'], {}), "(phi, params['img'], 10)\n", (2395, 2419), False, 'from lv_set.show_fig import...
#!/usr/bin/python # vim: set fileencoding=utf-8 : # Copyright 2019 Google 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/LIC...
[ "sys.path.insert", "distutils.dir_util.copy_tree", "zipfile.ZipFile", "yt_api.remove_uploaded_videos", "time.sleep", "yt_api.start_video_upload", "bottle.get", "os.walk", "os.path.exists", "os.listdir", "argparse.ArgumentParser", "bottle.post", "json.dumps", "os.path.split", "os.path.isd...
[((931, 987), 'sys.path.insert', 'sys.path.insert', (['(0)', "(program_dir + '/third_party/bottle/')"], {}), "(0, program_dir + '/third_party/bottle/')\n", (946, 987), False, 'import sys\n'), ((1611, 1652), 'bottle.post', 'post', (['"""/api/youtube_auth/get_device_code"""'], {}), "('/api/youtube_auth/get_device_code')\...
#!/usr/bin/env python # coding: utf-8 # # Lab 02 # # ## Solving a system of nonlinear equations # # ### <NAME>, Б01-818 # # IV.12.7.д # $$\begin{cases} x^7 - 5x^2y^4 + 1510 = 0 \\ y^3 - 3x^4y - 105 = 0 \end{cases}$$ # $$\begin{cases} x_{n+1} = \sqrt{\frac{x_n^7 + 1510}{5y_n^4}} \\ y_{n+1} = \sqrt[3]{3x_{n}^4y_{n}...
[ "logging.getLogger", "numpy.abs", "numpy.sqrt", "pandas.DataFrame", "numpy.cbrt" ]
[((3476, 3495), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (3493, 3495), False, 'import logging\n'), ((3984, 4097), 'pandas.DataFrame', 'pd.DataFrame', (["{'Начальное приближение': x_init_vec_fpi, 'Результат': fpi_results,\n 'Итераций': fpi_iterations}"], {}), "({'Начальное приближение': x_init_vec_...
#!/usr/bin/env python3 """PenIn setup script.""" from setuptools import setup, find_packages from penin.core.version import get_version VERSION = get_version() readme_file = open("README.md", "r") LONG_DESCRIPTION = readme_file.read() readme_file.close() setup( name="penin", version=VERSION, description=...
[ "setuptools.find_packages", "penin.core.version.get_version" ]
[((147, 160), 'penin.core.version.get_version', 'get_version', ([], {}), '()\n', (158, 160), False, 'from penin.core.version import get_version\n'), ((600, 645), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['ez_setup', 'tests*']"}), "(exclude=['ez_setup', 'tests*'])\n", (613, 645), False, 'from setup...
# -*- coding: utf-8 -*- """ Copyright (c) 2012 University of Oxford Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modif...
[ "ConfigParser.ConfigParser", "repoze.who.classifiers.default_request_classifier", "pylons.config.has_key" ]
[((1530, 1565), 'repoze.who.classifiers.default_request_classifier', 'default_request_classifier', (['environ'], {}), '(environ)\n', (1556, 1565), False, 'from repoze.who.classifiers import default_request_classifier\n'), ((1834, 1867), 'pylons.config.has_key', 'config.has_key', (['"""who.config_file"""'], {}), "('who....
#!/usr/bin/env python3 #------------------------------------------------------------------------------# # Filename: apod_linux_config.py / \ # # Project : APOD_Linux | () | # # Date : 06/23/2021 ...
[ "logging.debug", "gi.repository.Gtk.Grid", "gi.repository.Gtk.Button", "gi.repository.Gtk.Adjustment", "gi.repository.Gtk.main", "os.path.exists", "gi.repository.Gtk.Stack", "gi.repository.Gtk.SpinButton", "subprocess.Popen", "gi.repository.Gtk.Window.__init__", "os.path.expanduser", "gi.requi...
[((607, 639), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (625, 639), False, 'import gi\n'), ((778, 801), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (796, 801), False, 'import os\n'), ((812, 855), 'os.path.join', 'os.path.join', (['hom...
import vtk class Scene(object): def __init__(self): self.sceneSources = list() self.sceneMappers = list() self.sceneActors = list() self.sceneLights = list() self.sceneSources.append(vtk.vtkCubeSource()) self.sceneSources[-1].SetXLength(50000) self.sceneSou...
[ "vtk.vtkJPEGReader", "vtk.vtkTexture", "vtk.vtkPolyDataMapper", "vtk.vtkActor", "vtk.vtkLight", "vtk.vtkCubeSource", "vtk.vtkTextureMapToPlane" ]
[((561, 580), 'vtk.vtkJPEGReader', 'vtk.vtkJPEGReader', ([], {}), '()\n', (578, 580), False, 'import vtk\n'), ((722, 738), 'vtk.vtkTexture', 'vtk.vtkTexture', ([], {}), '()\n', (736, 738), False, 'import vtk\n'), ((882, 908), 'vtk.vtkTextureMapToPlane', 'vtk.vtkTextureMapToPlane', ([], {}), '()\n', (906, 908), False, '...
import sys import matplotlib.pyplot as plt import matplotlib.image as mpimg import random from cobras_ts.querier import Querier from IPython import display def _query_yes_no(question, default="yes"): """Ask a yes/no question via raw_input() and return their answer. "question" is a string that is presented t...
[ "matplotlib.pyplot.imshow", "random.sample", "matplotlib.pyplot.gcf", "matplotlib.image.imread", "matplotlib.pyplot.clf", "IPython.display.clear_output", "matplotlib.pyplot.figure", "matplotlib.pyplot.subplot", "matplotlib.pyplot.subplots_adjust", "sys.stdout.write" ]
[((990, 1025), 'sys.stdout.write', 'sys.stdout.write', (['(question + prompt)'], {}), '(question + prompt)\n', (1006, 1025), False, 'import sys\n'), ((1490, 1518), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(20, 20)'}), '(figsize=(20, 20))\n', (1500, 1518), True, 'import matplotlib.pyplot as plt\n'), (...
import os import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from dataclasses import dataclass from argparse import ArgumentParser from tqdm import tqdm from torch.utils.data import DataLoader from data import VCTKAudio from model import WaveNet def set_option(): parse...
[ "data.VCTKAudio", "os.makedirs", "argparse.ArgumentParser", "torch.nn.CrossEntropyLoss", "os.path.join", "torch.utils.data.DataLoader", "model.WaveNet" ]
[((324, 340), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (338, 340), False, 'from argparse import ArgumentParser\n'), ((2195, 2235), 'os.makedirs', 'os.makedirs', (['opt.ckpt_dir'], {'exist_ok': '(True)'}), '(opt.ckpt_dir, exist_ok=True)\n', (2206, 2235), False, 'import os\n'), ((2288, 2356), 'data....
import os def remove_comments_and_crlf(inp_path, comment_string=';', overwrite=False): tmpfilename = os.path.splitext(os.path.basename(inp_path))[0] + '_mod.inp' tmpfilepath = os.path.join(os.path.dirname(inp_path), tmpfilename) with open (inp_path) as oldf: with open(tmpfilepath, 'w') as newf: ...
[ "os.path.dirname", "os.rename", "os.path.basename", "os.remove" ]
[((199, 224), 'os.path.dirname', 'os.path.dirname', (['inp_path'], {}), '(inp_path)\n', (214, 224), False, 'import os\n'), ((916, 935), 'os.remove', 'os.remove', (['inp_path'], {}), '(inp_path)\n', (925, 935), False, 'import os\n'), ((944, 976), 'os.rename', 'os.rename', (['tmpfilepath', 'inp_path'], {}), '(tmpfilepath...
import re import pprint pp = pprint.PrettyPrinter(indent=4) from sys import version_info # py3, for checking type of input def combine_messages(messages): """ Combines messages that have one or more integers in them, such as "trial001" "trial002", into a single message like "trial# (#=1-2)". Thi...
[ "re.sub", "re.findall", "pprint.PrettyPrinter" ]
[((29, 59), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (49, 59), False, 'import pprint\n'), ((2601, 2624), 're.findall', 're.findall', (['"""\\\\d+"""', 'msg'], {}), "('\\\\d+', msg)\n", (2611, 2624), False, 'import re\n'), ((2959, 2984), 're.sub', 're.sub', (['pattern', '"...
# Generated by Django 3.0.1 on 2020-01-02 22:21 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='CustomerProfile', fields=[ ('id', models.Au...
[ "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.BinaryField" ]
[((311, 404), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (327, 404), False, 'from django.db import migrations, models\...
import logging logging.basicConfig(level=logging.INFO) from flask import Flask from application.config import Config app = Flask(__name__) app.config.from_object(Config) from application.models.classifiers.CNNClassifier import CNNClassifier from application.models.classifiers.MLPClassifier import MLPClassifier fro...
[ "logging.basicConfig", "application.utils.get_urls_list", "flask.Flask", "application.models.classifiers.MLPClassifier.MLPClassifier", "application.models.classifiers.CNNClassifier.CNNClassifier", "application.models.detectors.CasClasDetector.CasClasDetector", "application.models.classifiers.NaiveBayesC...
[((15, 54), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (34, 54), False, 'import logging\n'), ((127, 142), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (132, 142), False, 'from flask import Flask\n'), ((661, 694), 'logging.info', 'logging.info'...
import numpy as np import unittest from itertools import product from ml_techniques.svm import * class PermutationDataTest(unittest.TestCase): def testpropershape(self): data = np.random.random((10, 4)) labels = np.random.randint(0, 2, 10)*2-1 data_per = permut_data(data) self.a...
[ "numpy.random.random", "itertools.product", "numpy.random.randint", "numpy.random.randn", "numpy.random.permutation" ]
[((193, 218), 'numpy.random.random', 'np.random.random', (['(10, 4)'], {}), '((10, 4))\n', (209, 218), True, 'import numpy as np\n'), ((3285, 3315), 'numpy.random.random', 'np.random.random', (['(n, n_feats)'], {}), '((n, n_feats))\n', (3301, 3315), True, 'import numpy as np\n'), ((5136, 5166), 'numpy.random.random', '...
import collections from numpy.core.defchararray import lower import streamlit as st import numpy as np import pandas as pd from pages import utils def app(): st.title("Data Storyteller Application") st.markdown("## Data Upload") # Upload the dataset and save as csv st.markdown("### Upload ...
[ "streamlit.markdown", "pandas.read_csv", "streamlit.file_uploader", "streamlit.write", "streamlit.button", "streamlit.dataframe", "pandas.read_excel", "pandas.DataFrame", "streamlit.set_option", "pages.utils.genMetaData", "streamlit.title" ]
[((173, 213), 'streamlit.title', 'st.title', (['"""Data Storyteller Application"""'], {}), "('Data Storyteller Application')\n", (181, 213), True, 'import streamlit as st\n'), ((219, 248), 'streamlit.markdown', 'st.markdown', (['"""## Data Upload"""'], {}), "('## Data Upload')\n", (230, 248), True, 'import streamlit as...
# -*- coding:utf-8 -*- import paddle.fluid as fluid def cnn_net(data, dict_dim, emb_dim=128, hid_dim=128, hid_dim2=96, class_dim=2, win_size=3): """ Conv net """ # embedding layer emb = fluid.layers.embedding( input=da...
[ "paddle.fluid.ParamAttr" ]
[((377, 431), 'paddle.fluid.ParamAttr', 'fluid.ParamAttr', ([], {'name': '"""@HUB_senta_cnn@embedding_0.w_0"""'}), "(name='@HUB_senta_cnn@embedding_0.w_0')\n", (392, 431), True, 'import paddle.fluid as fluid\n'), ((644, 702), 'paddle.fluid.ParamAttr', 'fluid.ParamAttr', ([], {'name': '"""@HUB_senta_cnn@sequence_conv_0....
#!/usr/bin/env python # -*- coding: utf-8 -*- import runpy import os import pytest import glob THIS_FILES_DIR_PATH = os.path.realpath(os.path.dirname(__file__)) def get_paths_of_scripts(): exclude_sub_strings = ["do_not_execute"] plot_script_paths = glob.glob( os.path.join( os.path.dirna...
[ "os.path.dirname", "runpy.run_path" ]
[((136, 161), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (151, 161), False, 'import os\n'), ((878, 943), 'runpy.run_path', 'runpy.run_path', (['path_script'], {'init_globals': '{}', 'run_name': '"""__main__"""'}), "(path_script, init_globals={}, run_name='__main__')\n", (892, 943), False,...
# -*- coding: utf-8 -*- """ Inspired by: * https://gist.github.com/shirriff/c9fb5d98e6da79d9a772#file-merkle-py * https://github.com/richardkiss/pycoin """ from __future__ import absolute_import, division, unicode_literals from builtins import range import binascii import hashlib def merkleroot(hashes): ...
[ "hashlib.sha256" ]
[((773, 814), 'hashlib.sha256', 'hashlib.sha256', (['(hashes[i] + hashes[i + 1])'], {}), '(hashes[i] + hashes[i + 1])\n', (787, 814), False, 'import hashlib\n'), ((850, 882), 'hashlib.sha256', 'hashlib.sha256', (['first_round_hash'], {}), '(first_round_hash)\n', (864, 882), False, 'import hashlib\n')]
from django.contrib import admin from simple_history.admin import SimpleHistoryAdmin from .models import MainMetadata # Register your models here. admin.site.register(MainMetadata, SimpleHistoryAdmin)
[ "django.contrib.admin.site.register" ]
[((149, 202), 'django.contrib.admin.site.register', 'admin.site.register', (['MainMetadata', 'SimpleHistoryAdmin'], {}), '(MainMetadata, SimpleHistoryAdmin)\n', (168, 202), False, 'from django.contrib import admin\n')]
""" The CPTPState class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Govern...
[ "numpy.trace", "numpy.sqrt", "pygsti.modelmembers.states.densestate.DenseState.__init__", "numpy.rollaxis", "numpy.array", "numpy.einsum", "numpy.imag", "numpy.take", "numpy.real", "numpy.dot", "numpy.empty", "pygsti.evotypes.Evotype.cast", "pygsti.modelmembers.states.state.State._to_vector"...
[((2705, 2727), 'pygsti.modelmembers.states.state.State._to_vector', '_State._to_vector', (['vec'], {}), '(vec)\n', (2722, 2727), True, 'from pygsti.modelmembers.states.state import State as _State\n'), ((2903, 2937), 'numpy.rollaxis', '_np.rollaxis', (['self.basis_mxs', '(0)', '(3)'], {}), '(self.basis_mxs, 0, 3)\n', ...
# -*- coding: utf-8 -*- """ Created on Fri Apr 30 11:58:20 2021 @author: <NAME> """ import sys sys.path.append("...") import macheval as me class IMSettingsHandler(me.SettingsHandler): def getSettings(x): return NotImplementedError #TODO Implement settings functionality
[ "sys.path.append" ]
[((97, 119), 'sys.path.append', 'sys.path.append', (['"""..."""'], {}), "('...')\n", (112, 119), False, 'import sys\n')]
import datetime as dt import json import os import pandas as pd from sqlalchemy import Column, Integer, String, Float, DateTime, Boolean, func from iotfunctions.preprocessor import BaseTransformer from iotfunctions.bif import IoTExpression from iotfunctions.metadata import EntityType, make_sample_entity from iotfunctio...
[ "iotfunctions.db.Database", "iotfunctions.estimator.SimpleAnomaly", "iotfunctions.metadata.make_sample_entity", "iotfunctions.bif.IoTExpression" ]
[((652, 685), 'iotfunctions.db.Database', 'Database', ([], {'credentials': 'credentials'}), '(credentials=credentials)\n', (660, 685), False, 'from iotfunctions.db import Database\n'), ((799, 906), 'iotfunctions.metadata.make_sample_entity', 'make_sample_entity', ([], {'db': 'db', 'schema': 'db_schema', 'float_cols': '...
# Copyright 2017 Red Hat, Inc. <http://www.redhat.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 b...
[ "rally.task.validation.add", "rally_openstack.task.scenario.configure" ]
[((875, 945), 'rally.task.validation.add', 'validation.add', (['"""required_services"""'], {'services': '[consts.Service.GNOCCHI]'}), "('required_services', services=[consts.Service.GNOCCHI])\n", (889, 945), False, 'from rally.task import validation\n'), ((947, 1016), 'rally.task.validation.add', 'validation.add', (['"...
import queue import textwrap import threading import time import urllib.parse import pychromecast def create_notify_url(text: str, lang: str, ttsspeed: float): payload = { "ie": "UTF-8", "q": text, "tl": lang, "total": 1, "idx": 0, "textlen": ...
[ "time.sleep", "pychromecast.get_chromecasts", "textwrap.wrap", "threading.Thread", "queue.Queue", "time.time" ]
[((684, 729), 'textwrap.wrap', 'textwrap.wrap', (['text'], {'width': 'max_split_text_len'}), '(text, width=max_split_text_len)\n', (697, 729), False, 'import textwrap\n'), ((3656, 3712), 'pychromecast.get_chromecasts', 'pychromecast.get_chromecasts', (['tries', 'retry_wait', 'timeout'], {}), '(tries, retry_wait, timeou...
from taurex.log import Logger class LinesReader: def __init__(self, lines): self._lines = lines self._count = 0 def skip(self, num=1): self._count += num def read_int(self, skip=1): val = int(self._lines[self._count]) self.skip(skip) return val ...
[ "re.findall", "os.path.join" ]
[((1800, 1844), 'os.path.join', 'os.path.join', (['broadener_path', 'self._filename'], {}), '(broadener_path, self._filename)\n', (1812, 1844), False, 'import os\n'), ((6644, 6668), 're.findall', 're.findall', (['"""\\\\d+"""', 'form'], {}), "('\\\\d+', form)\n", (6654, 6668), False, 'import re\n')]
import os import json from flask_sqlalchemy import SQLAlchemy from flask import Flask, request, jsonify from flask.views import MethodView from flask.ext.cors import CORS from database import ElasticStorage, RedisClient from article import Article as ESArticle app = Flask(__name__) CORS(app) #sql_config = json.loads(...
[ "os.getenv", "flask.Flask", "database.RedisClient.get_instance", "flask.ext.cors.CORS", "flask.request.data.decode", "database.ElasticStorage.get_instance", "article.Article.get", "flask_sqlalchemy.SQLAlchemy", "flask.jsonify" ]
[((268, 283), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (273, 283), False, 'from flask import Flask, request, jsonify\n'), ((284, 293), 'flask.ext.cors.CORS', 'CORS', (['app'], {}), '(app)\n', (288, 293), False, 'from flask.ext.cors import CORS\n'), ((534, 549), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlch...
import os from qaviton.utils import filer from qaviton.utils import path from qaviton.utils.operating_system import s from qaviton.version import __version__ cwd = os.getcwd() examples = path.of(__file__)('examples') def initial_msg(f): def dec(*args, **kwargs): print(""" QAVITON VERSION {} ...
[ "qaviton.utils.filer.find_replace", "qaviton.utils.path.of", "os.getcwd", "qaviton.utils.filer.os.path.exists", "os.system", "qaviton.utils.filer.copy_directory" ]
[((165, 176), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (174, 176), False, 'import os\n'), ((188, 205), 'qaviton.utils.path.of', 'path.of', (['__file__'], {}), '(__file__)\n', (195, 205), False, 'from qaviton.utils import path\n'), ((4869, 4913), 'qaviton.utils.filer.os.path.exists', 'filer.os.path.exists', (["(cwd +...
""" Tests for the reference loader for Buyback Authorizations. """ from functools import partial from unittest import TestCase import blaze as bz from blaze.compute.core import swap_resources_into_scope from contextlib2 import ExitStack import pandas as pd from six import iteritems from zipline.pipeline.common import...
[ "zipline.pipeline.factors.events.BusinessDaysSinceCashBuybackAuth", "zipline.utils.test_utils.tmp_asset_finder", "blaze.compute.core.swap_resources_into_scope", "contextlib2.ExitStack", "zipline.pipeline.factors.events.BusinessDaysSinceShareBuybackAuth", "functools.partial", "pandas.DataFrame", "six.i...
[((1243, 1317), 'pandas.DataFrame', 'pd.DataFrame', (['{SHARE_COUNT_FIELD_NAME: [1, 15], CASH_FIELD_NAME: [10, 20]}'], {}), '({SHARE_COUNT_FIELD_NAME: [1, 15], CASH_FIELD_NAME: [10, 20]})\n', (1255, 1317), True, 'import pandas as pd\n'), ((1367, 1441), 'pandas.DataFrame', 'pd.DataFrame', (['{SHARE_COUNT_FIELD_NAME: [7,...
import pymongo from bson.objectid import ObjectId # mongo 增加 def main(): client = pymongo.MongoClient(host='172.16.17.32', port=27017) db = client.test collection = db.students # 插入一条数据 student = { 'id': '20170101', 'name': 'Kevin', 'age': 20, 'gender': 'male' ...
[ "pymongo.MongoClient" ]
[((89, 141), 'pymongo.MongoClient', 'pymongo.MongoClient', ([], {'host': '"""172.16.17.32"""', 'port': '(27017)'}), "(host='172.16.17.32', port=27017)\n", (108, 141), False, 'import pymongo\n')]
# # Copyright (C) 2014 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ "gerrymander.model.ModelEvent.from_json", "gerrymander.model.ModelChange.from_json" ]
[((3660, 3687), 'gerrymander.model.ModelChange.from_json', 'ModelChange.from_json', (['line'], {}), '(line)\n', (3681, 3687), False, 'from gerrymander.model import ModelChange\n'), ((4476, 4502), 'gerrymander.model.ModelEvent.from_json', 'ModelEvent.from_json', (['line'], {}), '(line)\n', (4496, 4502), False, 'from ger...
import rospy import numpy as np import cv2 class ScalarStable(object): """Represents a stabilized scalar""" def __init__(self, x=.0, vx=.0, p_cov=.03, m_cov=.01, time=None): """ScalarStabilized constructor""" self.x = x ...
[ "numpy.array", "rospy.Time", "numpy.float32", "cv2.KalmanFilter" ]
[((411, 433), 'cv2.KalmanFilter', 'cv2.KalmanFilter', (['(2)', '(1)'], {}), '(2, 1)\n', (427, 433), False, 'import cv2\n'), ((522, 552), 'numpy.array', 'np.array', (['[[1, 1]]', 'np.float32'], {}), '([[1, 1]], np.float32)\n', (530, 552), True, 'import numpy as np\n'), ((1073, 1116), 'numpy.array', 'np.array', (['[[self...
#!/usr/bin/env python import os import sys import sqlite3 import pandas as pd import numpy as np from scraper import create_data_folder, read_config from collections import OrderedDict def main(): """ Mainly for debugging purposes. """ config_file = read_config() # Pick a file try: c...
[ "pandas.read_sql_query", "scraper.read_config", "collections.OrderedDict", "os.listdir", "sqlite3.connect", "pandas.read_csv", "os.path.join", "pandas.set_option", "sys.exc_info", "scraper.create_data_folder", "numpy.savetxt", "pandas.DataFrame" ]
[((269, 282), 'scraper.read_config', 'read_config', ([], {}), '()\n', (280, 282), False, 'from scraper import create_data_folder, read_config\n'), ((701, 755), 'scraper.create_data_folder', 'create_data_folder', (["config_file['extracted_data_path']"], {}), "(config_file['extracted_data_path'])\n", (719, 755), False, '...
import nengo import pytest from nengo_spinnaker.builder import Model from nengo_spinnaker.builder.ports import OutputPort, InputPort from nengo_spinnaker.node_io import ethernet as ethernet_io from nengo_spinnaker.operators import SDPReceiver, SDPTransmitter @pytest.mark.parametrize("transmission_period", [0.001, 0....
[ "nengo.Network", "nengo_spinnaker.node_io.ethernet.Ethernet", "nengo.Ensemble", "nengo_spinnaker.builder.Model", "nengo.Node", "pytest.mark.parametrize", "nengo.Connection" ]
[((263, 325), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""transmission_period"""', '[0.001, 0.002]'], {}), "('transmission_period', [0.001, 0.002])\n", (286, 325), False, 'import pytest\n'), ((518, 579), 'nengo_spinnaker.node_io.ethernet.Ethernet', 'ethernet_io.Ethernet', ([], {'transmission_period': 't...
from rest_framework import serializers from api.model.foodComment import FoodComment from api.model.food import Food from django.contrib.auth.models import User from api.serializer.user import UserSerializer class FoodCommentSerializer(serializers.ModelSerializer): comment = serializers.CharField(max_length=255...
[ "api.model.food.Food.objects.all", "rest_framework.serializers.CharField", "django.contrib.auth.models.User.objects.all", "api.serializer.user.UserSerializer" ]
[((284, 321), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'max_length': '(255)'}), '(max_length=255)\n', (305, 321), False, 'from rest_framework import serializers\n'), ((334, 404), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'max_length': '(255)', 'allow_null': '(T...