code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
"""create exchange market table Revision ID: 76f253d77eba Revises: 4d9ca085df42 Create Date: 2019-09-22 01:32:11.855978 """ from antalla.settings import TABLE_PREFIX from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "76f253d77eba" down_revision = "4d9ca085df42" branc...
[ "sqlalchemy.ForeignKeyConstraint", "alembic.op.drop_table", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.ForeignKey", "sqlalchemy.Index", "sqlalchemy.Column" ]
[((2208, 2256), 'alembic.op.drop_table', 'op.drop_table', (["(TABLE_PREFIX + 'exchange_markets')"], {}), "(TABLE_PREFIX + 'exchange_markets')\n", (2221, 2256), False, 'from alembic import op\n'), ((443, 476), 'sqlalchemy.Column', 'sa.Column', (['"""volume_usd"""', 'sa.Float'], {}), "('volume_usd', sa.Float)\n", (452, 4...
""" sphinx.domains.python ~~~~~~~~~~~~~~~~~~~~~ The Python domain. :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import builtins import inspect import re import typing import warnings from inspect import Parameter from typing import A...
[ "sphinx.pycode.ast.parse", "docutils.nodes.inline", "re.compile", "sphinx.addnodes.desc_returns", "docutils.nodes.Text", "sphinx.util.inspect.signature_from_str", "sphinx.domains.IndexEntry", "re.split", "sphinx.locale.__", "sphinx.addnodes.desc_addname", "sphinx.locale._", "sphinx.addnodes.de...
[((1408, 1435), 'sphinx.util.logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1425, 1435), False, 'from sphinx.util import logging\n'), ((1478, 1795), 're.compile', 're.compile', (['"""^ ([\\\\w.]*\\\\.)? # class name(s)\n (\\\\w+) \\\\s* # thing name\n ...
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ "mindspore.dataset.MnistDataset", "mindspore.dataset.vision.c_transforms.Rescale", "mindspore.nn.metrics.Accuracy", "mindspore.nn.Flatten", "mindspore.dataset.vision.c_transforms.HWC2CHW", "mindspore.context.set_ps_context", "mindspore.nn.MaxPool2d", "mindspore.dataset.vision.c_transforms.Resize", "...
[((1216, 1323), 'mindspore.context.set_context', 'context.set_context', ([], {'mode': 'context.GRAPH_MODE', 'enable_compile_cache': '(True)', 'compile_cache_path': 'sys.argv[1]'}), '(mode=context.GRAPH_MODE, enable_compile_cache=True,\n compile_cache_path=sys.argv[1])\n', (1235, 1323), True, 'import mindspore.contex...
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
[ "nova.i18n._", "wmi.WMI", "uuid.uuid4" ]
[((938, 980), 'wmi.WMI', 'wmi.WMI', ([], {'moniker': '"""//./root/virtualization"""'}), "(moniker='//./root/virtualization')\n", (945, 980), False, 'import wmi\n'), ((1539, 1566), 'nova.i18n._', '_', (['"""vswitch "%s" not found"""'], {}), '(\'vswitch "%s" not found\')\n', (1540, 1566), False, 'from nova.i18n import _\...
"""Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always its smallest element. Usag...
[ "_heapq._heapify_max", "doctest.testmod" ]
[((20437, 20457), '_heapq._heapify_max', '_heapify_max', (['result'], {}), '(result)\n', (20449, 20457), False, 'from _heapq import _heapify_max\n'), ((19932, 19952), '_heapq._heapify_max', '_heapify_max', (['result'], {}), '(result)\n', (19944, 19952), False, 'from _heapq import _heapify_max\n'), ((22878, 22895), 'doc...
# Copyright 2018 Amazon.com, Inc. or its 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 require...
[ "horovod.common.basics.HorovodBasics", "mxnet.nd.zeros", "os.path.dirname", "ctypes.c_bool", "horovod.common.util.get_ext_suffix", "ctypes.CDLL", "mxnet.base.c_str", "ctypes.c_int" ]
[((1075, 1110), 'horovod.common.basics.HorovodBasics', '_HorovodBasics', (['__file__', '"""mpi_lib"""'], {}), "(__file__, 'mpi_lib')\n", (1089, 1110), True, 'from horovod.common.basics import HorovodBasics as _HorovodBasics\n'), ((1696, 1737), 'ctypes.CDLL', 'ctypes.CDLL', (['dll_path', 'ctypes.RTLD_GLOBAL'], {}), '(dl...
#!/usr/bin/env python2 # # Copyright 2015 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/LICENSE-2.0 # # Unless required...
[ "shutil.copyfileobj", "optparse.OptionParser", "sys.stderr.write", "os.unlink", "fcntl.lockf", "threading.Thread" ]
[((1100, 1123), 'optparse.OptionParser', 'optparse.OptionParser', ([], {}), '()\n', (1121, 1123), False, 'import optparse\n'), ((2084, 2105), 'sys.stderr.write', 'sys.stderr.write', (['msg'], {}), '(msg)\n', (2100, 2105), False, 'import sys\n'), ((2832, 2844), 'os.unlink', 'os.unlink', (['f'], {}), '(f)\n', (2841, 2844...
import io from os.path import dirname, abspath, join from nanohttp import settings, configure from restfulpy.messaging.providers import SMTPProvider from restfulpy.mockup import mockup_smtp_server HERE = abspath(dirname(__file__)) def test_smtp_provider(): configure(force=True) settings.merge(f''' ...
[ "nanohttp.configure", "os.path.join", "io.BytesIO", "restfulpy.messaging.providers.SMTPProvider", "os.path.dirname", "restfulpy.mockup.mockup_smtp_server" ]
[((216, 233), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (223, 233), False, 'from os.path import dirname, abspath, join\n'), ((267, 288), 'nanohttp.configure', 'configure', ([], {'force': '(True)'}), '(force=True)\n', (276, 288), False, 'from nanohttp import settings, configure\n'), ((734, 754), ...
# encoding: utf-8 """Word completion for IPython. This module started as fork of the rlcompleter module in the Python standard library. The original enhancements made to rlcompleter have been sent upstream and were accepted as of Python 2.3, """ # Copyright (c) IPython Development Team. # Distributed under the term...
[ "IPython.utils.generics.complete_object", "re.compile", "sys.exc_info", "re.search", "IPython.utils.process.arg_split", "inspect.ismethod", "IPython.utils.py3compat.cast_unicode_py2", "functools.wraps", "traitlets.Enum", "IPython.utils.dir2.get_real_method", "os.path.isdir", "os.path.expanduse...
[((2670, 2685), 'functools.wraps', 'wraps', (['complete'], {}), '(complete)\n', (2675, 2685), False, 'from functools import wraps\n'), ((13427, 13453), 're.search', 're.search', (['"""["\']"""', 'prefix'], {}), '(\'["\\\']\', prefix)\n', (13436, 13453), False, 'import re\n'), ((13672, 13710), 're.search', 're.search', ...
import requests, time #Loads University API-data and saves it into json and xml files. def save_API_data(): #Is there a delay between API calls or not delay = False #Implementation of study modules #URL and API-key for the request url = 'https://opendata.uta.fi:8443/apiman-gateway/UTA/opintojaksot/1.0...
[ "requests.post", "time.sleep" ]
[((461, 507), 'requests.post', 'requests.post', (['url'], {'data': '"""{}"""', 'headers': 'headers'}), "(url, data='{}', headers=headers)\n", (474, 507), False, 'import requests, time\n'), ((959, 1005), 'requests.post', 'requests.post', (['url'], {'data': '"""{}"""', 'headers': 'headers'}), "(url, data='{}', headers=he...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
[ "jax.numpy.logical_and", "optax.GradientTransformation", "jax.tree_flatten", "jax.tree_map", "optax.global_norm", "jax.numpy.isfinite" ]
[((2358, 2412), 'optax.GradientTransformation', 'optax.GradientTransformation', ([], {'init': 'init', 'update': 'update'}), '(init=init, update=update)\n', (2386, 2412), False, 'import optax\n'), ((1708, 1734), 'optax.global_norm', 'optax.global_norm', (['updates'], {}), '(updates)\n', (1725, 1734), False, 'import opta...
import math import torch import torch.nn as nn import numpy as np import torch.nn.functional as F from model.layers.attention_layers import SEModule, CBAM import config.yolov4_config as cfg class Mish(nn.Module): def __init__(self): super(Mish, self).__init__() def forward(self, x): return x ...
[ "numpy.fromfile", "model.layers.attention_layers.CBAM", "math.sqrt", "torch.from_numpy", "torch.nn.Conv2d", "torch.nn.functional.softplus", "model.layers.attention_layers.SEModule", "torch.nn.Identity", "torch.randn", "torch.cat" ]
[((465, 478), 'torch.nn.Identity', 'nn.Identity', ([], {}), '()\n', (476, 478), True, 'import torch.nn as nn\n'), ((8767, 8794), 'torch.randn', 'torch.randn', (['(1)', '(3)', '(224)', '(224)'], {}), '(1, 3, 224, 224)\n', (8778, 8794), False, 'import torch\n'), ((762, 907), 'torch.nn.Conv2d', 'nn.Conv2d', ([], {'in_chan...
import re import smtplib import dns.resolver # Address used for SMTP MAIL FROM command fromAddress = '<EMAIL>' # Simple Regex for syntax checking regex = '^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$' # Email address to verify inputAddress = input('Please enter the emailAddress to verify:')...
[ "smtplib.SMTP", "re.match" ]
[((381, 413), 're.match', 're.match', (['regex', 'addressToVerify'], {}), '(regex, addressToVerify)\n', (389, 413), False, 'import re\n'), ((792, 806), 'smtplib.SMTP', 'smtplib.SMTP', ([], {}), '()\n', (804, 806), False, 'import smtplib\n')]
#!/usr/bin/env pytest ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: gdalinfo.py testing # Author: <NAME> <<EMAIL>> # ############################################################################### # Copyright (c) 2010, <NAME> <even...
[ "test_py_scripts.get_py_script", "pytest.skip", "test_py_scripts.run_py_script", "os.remove" ]
[((1680, 1721), 'test_py_scripts.get_py_script', 'test_py_scripts.get_py_script', (['"""gdalinfo"""'], {}), "('gdalinfo')\n", (1709, 1721), False, 'import test_py_scripts\n'), ((1783, 1868), 'test_py_scripts.run_py_script', 'test_py_scripts.run_py_script', (['script_path', '"""gdalinfo"""', '"""../gcore/data/byte.tif""...
import os.path import cv2 import matplotlib.pyplot as plt import numpy as np from keras import Input, regularizers from keras.applications import vgg16 from keras.engine import Model from keras.layers import Flatten, Dense, Lambda, Cropping2D, Dropout, ELU, Activation, MaxPooling2D, Conv2D, \ BatchNormalization fr...
[ "keras.layers.Conv2D", "keras.applications.vgg16.VGG16", "matplotlib.pyplot.ylabel", "data_loader.load_training_data_as_generator", "data_loader.data_resampling", "keras.layers.Activation", "keras.layers.Dense", "keras.layers.Cropping2D", "data_loader.preprocessing_pipe", "keras.utils.plot_model",...
[((558, 580), 'keras.models.load_model', 'load_model', (['model_file'], {}), '(model_file)\n', (568, 580), False, 'from keras.models import Sequential, load_model\n'), ((594, 630), 'cv2.imread', 'cv2.imread', (['"""test_images/center.jpg"""'], {}), "('test_images/center.jpg')\n", (604, 630), False, 'import cv2\n'), ((6...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "datetime.datetime.utcfromtimestamp", "base.memoize.Memcache", "re.compile", "system.environment.get_value", "datastore.fuzz_target_utils.get_fuzz_target_jobs", "datastore.data_handler.get_project_name", "base.utils.get_application_id", "os.path.exists", "metrics.fuzzer_logs.get_logs_directory", "...
[((2808, 2843), 're.compile', 're.compile', (['"""[a-zA-Z][a-zA-Z0-9_]*"""'], {}), "('[a-zA-Z][a-zA-Z0-9_]*')\n", (2818, 2843), False, 'import re\n'), ((29183, 29272), 'datastore.data_types.CoverageInformation.query', 'data_types.CoverageInformation.query', (['(data_types.CoverageInformation.fuzzer == fuzzer)'], {}), '...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from astropy.io import fits from astropy.time import Time import os import datetime import numpy as np from radiospectra.spectrogram import REFERENCE, LinearTimeSpectrogram from radiospectra.util import get_day, ConditionalDispat...
[ "radiospectra.util.get_day", "astropy.time.Time", "radiospectra.util.ConditionalDispatch.from_existing", "astropy.io.fits.open" ]
[((418, 482), 'radiospectra.util.ConditionalDispatch.from_existing', 'ConditionalDispatch.from_existing', (['LinearTimeSpectrogram._create'], {}), '(LinearTimeSpectrogram._create)\n', (451, 482), False, 'from radiospectra.util import get_day, ConditionalDispatch\n'), ((779, 808), 'astropy.io.fits.open', 'fits.open', ([...
import re from cybox.objects.address_object import Address from cybox.objects.uri_object import URI from .text import StixTextTransform class StixBroIntelTransform(StixTextTransform): """Generate observable details for the Bro Intelligence Framework. This class can be used to generate a list of indicators ...
[ "re.sub" ]
[((4499, 4565), 're.sub', 're.sub', ([], {'pattern': '"""^(https?|ftp)://"""', 'repl': '""""""', 'string': "field['value']"}), "(pattern='^(https?|ftp)://', repl='', string=field['value'])\n", (4505, 4565), False, 'import re\n')]
# Generated by Django 3.1.2 on 2020-12-21 03:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0002_catenauser_access_token'), ] operations = [ migrations.AddField( model_name='catenauser', name='public...
[ "django.db.models.CharField" ]
[((345, 415), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(31)', 'verbose_name': '"""public key"""'}), "(blank=True, max_length=31, verbose_name='public key')\n", (361, 415), False, 'from django.db import migrations, models\n')]
from library_organizer import read_google_photos, read_manifest, retrieve_metadata, check_manifest_result,\ update_google_photos_images def perform_sync(): tcur = datetime.now() manifest = read_manifest() check_manifest_result(manifest) update_google_photos_images(manifest) # update_google...
[ "library_organizer.read_manifest", "library_organizer.update_google_photos_images", "library_organizer.check_manifest_result" ]
[((204, 219), 'library_organizer.read_manifest', 'read_manifest', ([], {}), '()\n', (217, 219), False, 'from library_organizer import read_google_photos, read_manifest, retrieve_metadata, check_manifest_result, update_google_photos_images\n'), ((225, 256), 'library_organizer.check_manifest_result', 'check_manifest_resu...
import tensorflow as tf class Trainer(object): def __init__(self, config): self.config = config def get_run_config(self): run_config = tf.estimator.RunConfig( model_dir=self.config.model_dir, save_summary_steps=self.config.summary_steps, keep_checkpoint_max...
[ "tensorflow.estimator.RunConfig" ]
[((162, 294), 'tensorflow.estimator.RunConfig', 'tf.estimator.RunConfig', ([], {'model_dir': 'self.config.model_dir', 'save_summary_steps': 'self.config.summary_steps', 'keep_checkpoint_max': 'None'}), '(model_dir=self.config.model_dir, save_summary_steps=\n self.config.summary_steps, keep_checkpoint_max=None)\n', (...
import os import math import numpy as np import tensorflow as tf from concept import Concept import pdb np.set_printoptions(precision=5, suppress=True) class Teacher: def __init__(self, sess, rl_gamma, boltzman_beta, belief_var_1d, num_distractors, attributes_size, message_space_size): self.sess = sess ...
[ "tensorflow.transpose", "tensorflow.math.log", "tensorflow.reduce_sum", "tensorflow.multiply", "numpy.array", "tensorflow.ones_like", "tensorflow.reduce_mean", "tensorflow.slice", "os.path.exists", "numpy.mean", "tensorflow.placeholder", "tensorflow.not_equal", "tensorflow.random_normal_init...
[((105, 152), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'precision': '(5)', 'suppress': '(True)'}), '(precision=5, suppress=True)\n', (124, 152), True, 'import numpy as np\n'), ((1510, 1553), 'tensorflow.train.AdamOptimizer', 'tf.train.AdamOptimizer', ([], {'learning_rate': '(0.001)'}), '(learning_rate=0.0...
from step import Stepper MOTOR_STEPS = (2048) PIN_MOTOR_1 = (27) PIN_MOTOR_2 = (26) PIN_MOTOR_3 = (25) PIN_MOTOR_4 = (23) my_motor = Stepper(MOTOR_STEPS, PIN_MOTOR_1, PIN_MOTOR_2, PIN_MOTOR_3, PIN_MOTOR_4) for i in range(50, 150, 1): my_motor.set_speed(i/10) my_motor.step(16) for i in ran...
[ "step.Stepper" ]
[((135, 207), 'step.Stepper', 'Stepper', (['MOTOR_STEPS', 'PIN_MOTOR_1', 'PIN_MOTOR_2', 'PIN_MOTOR_3', 'PIN_MOTOR_4'], {}), '(MOTOR_STEPS, PIN_MOTOR_1, PIN_MOTOR_2, PIN_MOTOR_3, PIN_MOTOR_4)\n', (142, 207), False, 'from step import Stepper\n')]
# ====================================================================================== # # Useful functions for analyzing corp data. # Author: <NAME>, <EMAIL> # ====================================================================================== # import numpy as np import pandas as pd from fastparquet import Parqu...
[ "numpy.abs", "numpy.histogram", "numpy.unique", "pandas.read_csv", "datetime.datetime.strptime", "duckdb.connect", "numpy.log", "numpy.diff", "numpy.exp", "numpy.concatenate", "snappy.decompress", "os.path.expanduser" ]
[((571, 594), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (589, 594), False, 'import os\n'), ((672, 720), 'duckdb.connect', 'db.connect', ([], {'database': '""":memory:"""', 'read_only': '(False)'}), "(database=':memory:', read_only=False)\n", (682, 720), True, 'import duckdb as db\n'), ((...
from tkinter import * from tkinter import filedialog from PIL import Image,ImageTk def open(): global lbl global img_lbl global imagem root.filename = filedialog.askopenfilename(initialdir = "/Aulas-Tkinter", title = "Selecionar Arquivo", filetypes = (("png files", "*.png"), ("all files", "*.*")))...
[ "PIL.Image.open", "tkinter.filedialog.askopenfilename" ]
[((169, 319), 'tkinter.filedialog.askopenfilename', 'filedialog.askopenfilename', ([], {'initialdir': '"""/Aulas-Tkinter"""', 'title': '"""Selecionar Arquivo"""', 'filetypes': "(('png files', '*.png'), ('all files', '*.*'))"}), "(initialdir='/Aulas-Tkinter', title=\n 'Selecionar Arquivo', filetypes=(('png files', '*...
from simalia.math.numbers.integer import Integer from simalia.math.operators.sum import Sum from simalia.pymath import Variable class Pi(Sum, Variable): def __init__(self, iterations=11): self.__k = Variable("k", Integer(0)) super().__init__(iterations, self.__k, self.__formular) self.ite...
[ "simalia.math.numbers.integer.Integer" ]
[((228, 238), 'simalia.math.numbers.integer.Integer', 'Integer', (['(0)'], {}), '(0)\n', (235, 238), False, 'from simalia.math.numbers.integer import Integer\n'), ((524, 534), 'simalia.math.numbers.integer.Integer', 'Integer', (['(1)'], {}), '(1)\n', (531, 534), False, 'from simalia.math.numbers.integer import Integer\...
"""Custom strategies for property tests.""" import hypothesis.strategies as st from hypothesis import assume from skspatial.objects import Circle from skspatial.objects import Line from skspatial.objects import Plane from skspatial.objects import Point from skspatial.objects import Points from skspatial.objects import...
[ "hypothesis.strategies.lists", "hypothesis.strategies.integers", "skspatial.objects.Points", "hypothesis.strategies.floats", "skspatial.objects.Triangle" ]
[((650, 702), 'hypothesis.strategies.lists', 'st.lists', (['floats'], {'min_size': 'DIM_MIN', 'max_size': 'DIM_MAX'}), '(floats, min_size=DIM_MIN, max_size=DIM_MAX)\n', (658, 702), True, 'import hypothesis.strategies as st\n'), ((3771, 3792), 'skspatial.objects.Points', 'Points', (['array_like_2d'], {}), '(array_like_2...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ power_controller.py for usage with neptune/GardenPi V1.0.0 Manages all of our power zones. """ VERSION = "V1.0.0 (2020-07-31)" import sys sys.path.append('/var/www/gardenpi_control/gardenpi') from sqlalchemy import update, select, and_, create_engine import system_in...
[ "logging.getLogger", "tables.power_scheduled_jobs.update", "logging._checkLevel", "tables.power_scheduled_jobs.c.zone.in_", "sqlalchemy.create_engine", "tables.power.c.zone_name.in_", "sqlalchemy.select", "wiringpi.mcp23017Setup", "tables.power_currently_running.update", "sqlalchemy.and_", "tabl...
[((191, 244), 'sys.path.append', 'sys.path.append', (['"""/var/www/gardenpi_control/gardenpi"""'], {}), "('/var/www/gardenpi_control/gardenpi')\n", (206, 244), False, 'import sys\n'), ((521, 540), 'wiringpi.wiringPiSetup', 'mcp.wiringPiSetup', ([], {}), '()\n', (538, 540), True, 'import wiringpi as mcp\n'), ((582, 607)...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function, unicode_literals) import os import warnings import librosa import numpy as np import pandas as pd from keras.layers import Activation, Dense, Dropout, Flatten from keras.models import Sequential from keras.uti...
[ "sklearn.preprocessing.LabelEncoder", "pandas.read_csv", "sklearn.model_selection.train_test_split", "librosa.feature.mfcc", "pandas.DataFrame.from_dict", "keras.models.Sequential", "numpy.array", "keras.layers.Activation", "keras.layers.Dense", "numpy.load", "keras.layers.Dropout", "warnings....
[((440, 473), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (463, 473), False, 'import warnings\n'), ((799, 841), 'pandas.read_csv', 'pd.read_csv', (['"""./zh-CN/train.tsv"""'], {'sep': '"""\t"""'}), "('./zh-CN/train.tsv', sep='\\t')\n", (810, 841), True, 'import pandas a...
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets, linear_model from sklearn.metrics import mean_squared_error, r2_score diabetes_X, diabetes_y = datasets.load_diabetes(return_X_y=True) from sklearn.model_selection import train_test_split x_train,x_test,y_train,y_test=train_test_split(dia...
[ "sklearn.model_selection.train_test_split", "matplotlib.pyplot.plot", "sklearn.metrics.mean_squared_error", "sklearn.datasets.load_diabetes", "matplotlib.pyplot.scatter", "sklearn.metrics.r2_score", "sklearn.linear_model.LinearRegression" ]
[((177, 216), 'sklearn.datasets.load_diabetes', 'datasets.load_diabetes', ([], {'return_X_y': '(True)'}), '(return_X_y=True)\n', (199, 216), False, 'from sklearn import datasets, linear_model\n'), ((300, 340), 'sklearn.model_selection.train_test_split', 'train_test_split', (['diabetes_X', 'diabetes_y'], {}), '(diabetes...
import xml.sax from collections import OrderedDict from xml.sax.xmlreader import AttributesNSImpl from xml.sax import handler # http://www.theinformationlab.co.uk/wp-content/uploads/2015/07/Step-Three2.png from metaappscriptsdk.feed.FeedColumn import FeedColumn class Exact(xml.sax.handler.ContentHandler): schema...
[ "collections.OrderedDict", "metaappscriptsdk.feed.FeedColumn.FeedColumn" ]
[((323, 336), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (334, 336), False, 'from collections import OrderedDict\n'), ((791, 888), 'metaappscriptsdk.feed.FeedColumn.FeedColumn', 'FeedColumn', ([], {'type': '"""TEXT"""', 'search_path': 'xpath', 'path': 'copy_path', 'name': 'name', 'display_name': 'node_...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from . import _utilities...
[ "pulumi.get", "pulumi.getter", "pulumi.set", "pulumi.InvokeOptions", "pulumi.runtime.invoke" ]
[((3224, 3253), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""axfrIps"""'}), "(name='axfrIps')\n", (3237, 3253), False, 'import pulumi\n'), ((3589, 3620), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""expireSec"""'}), "(name='expireSec')\n", (3602, 3620), False, 'import pulumi\n'), ((3930, 3961), 'pulumi.ge...
import numpy as np from scipy.ndimage import watershed_ift from skimage.measure import label def watershed_prediction(y_pred): markers = label(y_pred[..., 0]) markers[y_pred[..., 2]] = -1 y_pred = watershed_ift((y_pred[..., 1]).astype(np.uint8), markers) return y_pred
[ "skimage.measure.label" ]
[((143, 164), 'skimage.measure.label', 'label', (['y_pred[..., 0]'], {}), '(y_pred[..., 0])\n', (148, 164), False, 'from skimage.measure import label\n')]
from PySide2.QtWidgets import QDialog, QListWidget, QPushButton, QLabel, QVBoxLayout import shapely.wkb as wkb from .geometry_utils import get_line_segments, find_closest_line_segment_of, to_latlon, distance_between, merge_similar_line_segments, get_complete_road_line from .humanization_utils import format_number f...
[ "PySide2.QtWidgets.QListWidget", "PySide2.QtWidgets.QVBoxLayout" ]
[((551, 564), 'PySide2.QtWidgets.QVBoxLayout', 'QVBoxLayout', ([], {}), '()\n', (562, 564), False, 'from PySide2.QtWidgets import QDialog, QListWidget, QPushButton, QLabel, QVBoxLayout\n'), ((691, 708), 'PySide2.QtWidgets.QListWidget', 'QListWidget', (['self'], {}), '(self)\n', (702, 708), False, 'from PySide2.QtWidget...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from shoppingcart import shoppingcart_pb2 as shoppingcart_dot_shoppingcart__pb2 class ShoppingCartStub(object): # missing associated documentation comment in...
[ "grpc.method_handlers_generic_handler", "grpc.unary_unary_rpc_method_handler" ]
[((3162, 3264), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""com.example.shoppingcart.ShoppingCart"""', 'rpc_method_handlers'], {}), "('com.example.shoppingcart.ShoppingCart',\n rpc_method_handlers)\n", (3198, 3264), False, 'import grpc\n'), ((2330, 2557), 'grpc.unary_unary_r...
#components.py # Copyright (c) 2020 <NAME> <NAME> # # MIT License # # 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, co...
[ "torch.cuda.manual_seed_all", "torch.manual_seed", "torch.nn.ReLU", "torch.nn.Conv2d", "numpy.random.seed", "torch.cuda.manual_seed" ]
[((1187, 1204), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (1201, 1204), True, 'import numpy as np\n'), ((1205, 1225), 'torch.manual_seed', 'torch.manual_seed', (['(0)'], {}), '(0)\n', (1222, 1225), False, 'import torch, torch.nn as nn\n'), ((1226, 1251), 'torch.cuda.manual_seed', 'torch.cuda.manual...
from helper_functions import Helper_Functions from assembler import CF_Assembler cf = CF_Assembler() hf = Helper_Functions( cf ) cf.define_chain("initialization",True) hf.one_step("add_watch_dog") hf.one_step("setup_gpio_relay") hf.one_step("mqtt_current_initialize_ref_max_currents") hf.one_step("mqtt_cur...
[ "assembler.CF_Assembler", "helper_functions.Helper_Functions" ]
[((98, 112), 'assembler.CF_Assembler', 'CF_Assembler', ([], {}), '()\n', (110, 112), False, 'from assembler import CF_Assembler\n'), ((118, 138), 'helper_functions.Helper_Functions', 'Helper_Functions', (['cf'], {}), '(cf)\n', (134, 138), False, 'from helper_functions import Helper_Functions\n')]
import pandas as pd # Method chain wrapped in a function # Has renamned columns and dropped Nan values and duplicates def load_and_process(_): #Method 1 load csv file and drop for Nan values df1 = ( pd.read_csv(r"default of credit card clients.csv") .dropna() ) # Method 2 rename all col...
[ "pandas.read_csv" ]
[((216, 265), 'pandas.read_csv', 'pd.read_csv', (['"""default of credit card clients.csv"""'], {}), "('default of credit card clients.csv')\n", (227, 265), True, 'import pandas as pd\n')]
import re from itertools import cycle import lib.logger as logging from lib.functions import wait_until, r_sleep, confirm_condition_by_time from lib.game import ui logger = logging.get_logger(__name__) t3_percentage_regexp = re.compile(r"([0-9][0-9]?\.?[0-9]? ?%?)") class BattleBot: """Class for working with ga...
[ "lib.functions.confirm_condition_by_time", "itertools.cycle", "re.compile", "lib.logger.get_logger", "lib.functions.wait_until", "lib.functions.r_sleep", "lib.game.ui.SKIP_TAP_THE_SCREEN.copy" ]
[((175, 203), 'lib.logger.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (193, 203), True, 'import lib.logger as logging\n'), ((227, 268), 're.compile', 're.compile', (['"""([0-9][0-9]?\\\\.?[0-9]? ?%?)"""'], {}), "('([0-9][0-9]?\\\\.?[0-9]? ?%?)')\n", (237, 268), False, 'import re\n'), ((888, 9...
# coding=utf-8 import os from array import array from time import strftime def convert_to_root_array(list_array): return array('d', list_array) def create_filename(path, filename): timestamp_str = strftime("%Y%m%d%H%M%S") return path + filename + "_" + timestamp_str + ".root" def get_limits(list_arra...
[ "os.path.isdir", "os.access", "time.strftime", "array.array" ]
[((128, 150), 'array.array', 'array', (['"""d"""', 'list_array'], {}), "('d', list_array)\n", (133, 150), False, 'from array import array\n'), ((210, 234), 'time.strftime', 'strftime', (['"""%Y%m%d%H%M%S"""'], {}), "('%Y%m%d%H%M%S')\n", (218, 234), False, 'from time import strftime\n'), ((419, 438), 'os.path.isdir', 'o...
""" Get fingerprints produced by a 3D conformed-basedmodel. """ import json import os import subprocess import pickle import time import argparse from tqdm import tqdm from nff.utils import (METRICS, CHEMPROP_TRANSFORM, parse_args, get_split_names) # dictionary that transforms our metric syntax to chemprop's REVERSE...
[ "os.listdir", "pickle.dump", "argparse.ArgumentParser", "subprocess.Popen", "tqdm.tqdm", "os.path.join", "nff.utils.CHEMPROP_TRANSFORM.items", "time.sleep", "pickle.load", "json.load", "os.path.isfile", "os.path.abspath", "nff.utils.parse_args", "json.dump" ]
[((2186, 2206), 'os.path.abspath', 'os.path.abspath', (['"""."""'], {}), "('.')\n", (2201, 2206), False, 'import os\n'), ((2225, 2264), 'os.path.join', 'os.path.join', (['this_dir', '"""fps_single.py"""'], {}), "(this_dir, 'fps_single.py')\n", (2237, 2264), False, 'import os\n'), ((3280, 3373), 'subprocess.Popen', 'sub...
try: from langdetect import detect except ImportError: print('Please pip install langdetect') SMALL_ALPHABEIT = 'abcdefghijklmnopqrstuvwxyz' CAPITAL_ALPHABEIT = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' NUMBERS = '0123456789' SPECIAL = '~!@#$%^&*()_=-+`/.,\\<>?:"{}|[];\' ' ANSWERS = { 0: SMALL_ALPHABEIT, 1: CAPITAL_ALPHABEIT,...
[ "langdetect.detect" ]
[((2542, 2564), 'langdetect.detect', 'detect', (['sentences[key]'], {}), '(sentences[key])\n', (2548, 2564), False, 'from langdetect import detect\n')]
""" Django settings for gennotes_server project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ import...
[ "os.getenv", "dj_database_url.config", "os.path.join", "os.path.abspath", "env_tools.apply_env" ]
[((502, 513), 'env_tools.apply_env', 'apply_env', ([], {}), '()\n', (511, 513), False, 'from env_tools import apply_env\n'), ((862, 885), 'os.getenv', 'os.getenv', (['"""SECRET_KEY"""'], {}), "('SECRET_KEY')\n", (871, 885), False, 'import os\n'), ((4898, 4955), 'os.getenv', 'os.getenv', (['"""EMAIL_BACKEND"""', 'global...
#!/usr/bin/env python # AWS DISCLAMER # --- # The following files are provided by AWS Professional Services describe the process to create a IAM Policy with description. # These are non-production ready and are to be used for testing purposes. # These files is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES # OR...
[ "pytest.fixture", "os.path.dirname", "json.loads", "inventory.mappers.RdsDataMapper" ]
[((837, 853), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (851, 853), False, 'import pytest\n'), ((1075, 1100), 'json.loads', 'json.loads', (['file_contents'], {}), '(file_contents)\n', (1085, 1100), False, 'import json\n'), ((1222, 1237), 'inventory.mappers.RdsDataMapper', 'RdsDataMapper', ([], {}), '()\n', ...
import vaex.misc.progressbar import pytest from unittest.mock import MagicMock from common import * def test_progress_bar(): pb = vaex.misc.progressbar.ProgressBar(0, 100) pb.update(0) pb.update(50) assert "50.00%" in repr(pb) pb.finish() assert "elapsed time" in repr(pb) def test_progress_bar...
[ "pytest.mark.parametrize", "unittest.mock.MagicMock", "pytest.raises" ]
[((541, 596), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""progress"""', "['vaex', 'widget']"], {}), "('progress', ['vaex', 'widget'])\n", (564, 596), False, 'import pytest\n'), ((1079, 1090), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (1088, 1090), False, 'from unittest.mock import MagicM...
import os import argparse import logging import sys import numpy as np import torch import torch.nn as nn import torchvision.transforms as transforms from tensorboardX import SummaryWriter sys.path.append('./') from dataset.backbone_dataset import ImageNetDataset from model.Backbone import ResNet from dataset.transfo...
[ "logging.getLogger", "logging.StreamHandler", "torch.nn.CrossEntropyLoss", "torch.optim.lr_scheduler.MultiStepLR", "torch.cuda.device_count", "sys.path.append", "os.path.exists", "dataset.backbone_dataset.ImageNetDataset", "tensorboardX.SummaryWriter", "argparse.ArgumentParser", "dataset.transfo...
[((191, 212), 'sys.path.append', 'sys.path.append', (['"""./"""'], {}), "('./')\n", (206, 212), False, 'import sys\n'), ((393, 456), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Resnet Imagenet Training"""'}), "(description='Resnet Imagenet Training')\n", (416, 456), False, 'import arg...
import os import sys import pyauparser def main(): g = pyauparser.Grammar.load_file("data/operator.egt") # build a whole parse tree from string try: tree = pyauparser.parse_string_to_tree(g, "-2*(3+4)-5") tree.dump() print() except pyauparser.ParseError as e: print(e) ...
[ "pyauparser.parse_string_to_tree", "pyauparser.Grammar.load_file" ]
[((61, 110), 'pyauparser.Grammar.load_file', 'pyauparser.Grammar.load_file', (['"""data/operator.egt"""'], {}), "('data/operator.egt')\n", (89, 110), False, 'import pyauparser\n'), ((179, 227), 'pyauparser.parse_string_to_tree', 'pyauparser.parse_string_to_tree', (['g', '"""-2*(3+4)-5"""'], {}), "(g, '-2*(3+4)-5')\n", ...
#Developer by Bafomet # -*- coding: utf-8 -*- import requests from settings import shodan_api # color R = "\033[31m" # Red G = "\033[1;34m" # Blue C = "\033[1;32m" # Green W = "\033[0m" # white O = "\033[45m" # Purple def honeypot(inp): url = f"https://api.shodan.io/labs/honeyscore/{inp}" try: ...
[ "requests.get" ]
[((331, 376), 'requests.get', 'requests.get', (['url'], {'params': "{'key': shodan_api}"}), "(url, params={'key': shodan_api})\n", (343, 376), False, 'import requests\n')]
from flask import Flask, render_template, session, request from modules.constants import Constants from modules.sites import Sites from modules.css_classes import CSS_classes connected_users = [] # {username, room} shared_rooms = [] # {users} def get_user_by_name(username): for user in connected_users...
[ "app.send" ]
[((546, 613), 'app.send', 'send', (['"""login"""', "['username: ']"], {'new_line': '(False)', 'show_pre_input': '(False)'}), "('login', ['username: '], new_line=False, show_pre_input=False)\n", (550, 613), False, 'from app import send\n'), ((873, 916), 'app.send', 'send', (['"""user"""', '[Constants.UNKNOWN_USER_NAME]'...
from flask import Blueprint reports=Blueprint('reports',__name__) from . import routes
[ "flask.Blueprint" ]
[((39, 69), 'flask.Blueprint', 'Blueprint', (['"""reports"""', '__name__'], {}), "('reports', __name__)\n", (48, 69), False, 'from flask import Blueprint\n')]
from collections import OrderedDict import torch.nn as nn from . import wrapped import modifiers.modules as quantisable class Conv2d(nn.Module): """Simple wrapper for the default convolution class. Introduced so all convolution variants have a similar interface. Adds batch normalisation to be fair, ...
[ "torch.nn.BatchNorm2d", "modifiers.modules.Quantiser" ]
[((1715, 1738), 'modifiers.modules.Quantiser', 'quantisable.Quantiser', ([], {}), '()\n', (1736, 1738), True, 'import modifiers.modules as quantisable\n'), ((2010, 2038), 'torch.nn.BatchNorm2d', 'nn.BatchNorm2d', (['out_channels'], {}), '(out_channels)\n', (2024, 2038), True, 'import torch.nn as nn\n'), ((2078, 2101), ...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
[ "sofima.flow_field._batched_peaks", "sofima.flow_field.JAXMaskedXCorrWithStatsCalculator", "numpy.sqrt", "numpy.ones", "absl.testing.absltest.main", "numpy.exp", "numpy.zeros", "numpy.min", "numpy.full", "numpy.testing.assert_array_equal" ]
[((3485, 3500), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (3498, 3500), False, 'from absl.testing import absltest\n'), ((824, 860), 'numpy.zeros', 'np.zeros', (['(120, 120)'], {'dtype': 'np.uint8'}), '((120, 120), dtype=np.uint8)\n', (832, 860), True, 'import numpy as np\n'), ((878, 914), 'numpy....
#!/usr/bin/env python3 # --- Euler pb 1 # Multiples of 3 and 5 # If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. # The sum of these multiples is 23. # Find the sum of all the multiples of 3 or 5 below 1000. def euler1(n): return sum([x for x in range(1, n) if x % ...
[ "math.sqrt" ]
[((1635, 1642), 'math.sqrt', 'sqrt', (['n'], {}), '(n)\n', (1639, 1642), False, 'from math import sqrt\n'), ((1468, 1475), 'math.sqrt', 'sqrt', (['n'], {}), '(n)\n', (1472, 1475), False, 'from math import sqrt\n')]
# Copyright 2015 Conchylicultor. All Rights Reserved. # Modifications copyright (C) 2016 <NAME> # Modifications copyright (C) 2017 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
[ "utils.log.getLogger", "tensorflow.scalar_summary", "tensorflow.variable_scope", "tensorflow.get_variable", "tensorflow.transpose", "tensorflow.nn.rnn_cell.BasicLSTMCell", "tensorflow.nn.rnn_cell.MultiRNNCell", "tensorflow.placeholder", "os.path.realpath", "tensorflow.name_scope", "tensorflow.ma...
[((1039, 1062), 'utils.log.getLogger', 'log.getLogger', (['__name__'], {}), '(__name__)\n', (1052, 1062), False, 'from utils import log\n'), ((5289, 5367), 'tensorflow.nn.rnn_cell.BasicLSTMCell', 'tf.nn.rnn_cell.BasicLSTMCell', (['self.args.train_hidden_size'], {'state_is_tuple': '(True)'}), '(self.args.train_hidden_si...
""" Interfaces with Alarm.com alarm control panels. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/alarm_control_panel.alarmdotcom/ """ import logging import voluptuous as vol import homeassistant.components.alarm_control_panel as alarm from homeassist...
[ "logging.getLogger", "voluptuous.Required", "voluptuous.Optional", "pyalarmdotcom.pyalarmdotcom.Alarmdotcom" ]
[((761, 788), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (778, 788), False, 'import logging\n'), ((865, 892), 'voluptuous.Required', 'vol.Required', (['CONF_PASSWORD'], {}), '(CONF_PASSWORD)\n', (877, 892), True, 'import voluptuous as vol\n'), ((909, 936), 'voluptuous.Required', 'vol....
import sys from datetime import date, timedelta SIGN_IDS = list(range(1, 13)) if __name__ == "__main__": start_date = date(2019, 1, 1) end_date = date.today() for date_diff in range(0, (end_date - start_date).days + 1): date_str = (start_date + timedelta(days=date_diff)).strftime("%Y%m%d") ...
[ "datetime.timedelta", "datetime.date.today", "datetime.date", "sys.stdout.write" ]
[((125, 141), 'datetime.date', 'date', (['(2019)', '(1)', '(1)'], {}), '(2019, 1, 1)\n', (129, 141), False, 'from datetime import date, timedelta\n'), ((157, 169), 'datetime.date.today', 'date.today', ([], {}), '()\n', (167, 169), False, 'from datetime import date, timedelta\n'), ((359, 402), 'sys.stdout.write', 'sys.s...
import torch from . import networks from os.path import join from util.util import seg_accuracy, print_network import pdb class ClassifierModel: """ Class for training Model weights :args opt: structure containing configuration params e.g., --dataset_mode -> classification / segmentation) --arch -...
[ "util.util.print_network", "os.path.join", "torch.from_numpy", "torch.cuda.is_available", "util.util.seg_accuracy", "torch.no_grad", "torch.device" ]
[((602, 637), 'os.path.join', 'join', (['opt.checkpoints_dir', 'opt.name'], {}), '(opt.checkpoints_dir, opt.name)\n', (606, 637), False, 'from os.path import join\n'), ((2606, 2640), 'os.path.join', 'join', (['self.save_dir', 'save_filename'], {}), '(self.save_dir, save_filename)\n', (2610, 2640), False, 'from os.path ...
import sys from psutil import virtual_memory from tempfile import gettempdir from numpy.ma import masked as numpy_ma_masked from numpy.ma import nomask as numpy_ma_nomask from . import mpi_on from . import mpi_size from .units import Units #platform = sys.platform #if platform == 'darwin': # from psutil impo...
[ "tempfile.gettempdir", "psutil.virtual_memory" ]
[((3142, 3154), 'tempfile.gettempdir', 'gettempdir', ([], {}), '()\n', (3152, 3154), False, 'from tempfile import gettempdir\n'), ((547, 563), 'psutil.virtual_memory', 'virtual_memory', ([], {}), '()\n', (561, 563), False, 'from psutil import virtual_memory\n')]
import os from bluesky_widgets.models.run_engine_client import RunEngineClient from bluesky_widgets.qt import Window from bluesky_widgets.models.plot_specs import Axes, Figure from bluesky_widgets.models.plot_builders import Lines from bluesky_widgets.models.auto_plot_builders import AutoPlotter from .widgets import ...
[ "bluesky_kafka.RemoteDispatcher", "bluesky_widgets.utils.streaming.stream_documents_into_runs", "os.environ.get", "bluesky_widgets.qt.Window" ]
[((3490, 3515), 'bluesky_widgets.qt.Window', 'Window', (['widget'], {'show': 'show'}), '(widget, show=show)\n', (3496, 3515), False, 'from bluesky_widgets.qt import Window\n'), ((900, 943), 'os.environ.get', 'os.environ.get', (['"""QSERVER_ZMQ_ADDRESS"""', 'None'], {}), "('QSERVER_ZMQ_ADDRESS', None)\n", (914, 943), Fa...
"""Clean Code in Python - Chapter 9: Common Design Patterns > State """ import abc from log import logger from state_1 import InvalidTransitionError class MergeRequestState(abc.ABC): def __init__(self, merge_request): self._merge_request = merge_request @abc.abstractmethod def open(self): ...
[ "state_1.InvalidTransitionError", "log.logger.info" ]
[((738, 784), 'log.logger.info', 'logger.info', (['"""merging %s"""', 'self._merge_request'], {}), "('merging %s', self._merge_request)\n", (749, 784), False, 'from log import logger\n'), ((793, 861), 'log.logger.info', 'logger.info', (['"""deleting branch %s"""', 'self._merge_request.source_branch'], {}), "('deleting ...
import logging import sqlite3 import ruamel.yaml # create logger logger = logging.getLogger('terminology') # cashes sql and root concepts data = {} def load_terminology_data(): global data f = open('terminology.yml', 'r') data = ruamel.yaml.safe_load(f.read()) f.close() return data def get_sql(...
[ "logging.getLogger", "sqlite3.connect" ]
[((75, 107), 'logging.getLogger', 'logging.getLogger', (['"""terminology"""'], {}), "('terminology')\n", (92, 107), False, 'import logging\n'), ((1004, 1040), 'sqlite3.connect', 'sqlite3.connect', (['"""db/terminology.db"""'], {}), "('db/terminology.db')\n", (1019, 1040), False, 'import sqlite3\n'), ((3559, 3595), 'sql...
from django.dispatch import receiver from krit.registration.models import SignupCodeResult from krit.registration.signals import signup_code_used from .models import Invitation @receiver(signup_code_used, sender=SignupCodeResult) def handle_signup_code_used(sender, **kwargs): result = kwargs.get("signup_code_res...
[ "django.dispatch.receiver" ]
[((181, 232), 'django.dispatch.receiver', 'receiver', (['signup_code_used'], {'sender': 'SignupCodeResult'}), '(signup_code_used, sender=SignupCodeResult)\n', (189, 232), False, 'from django.dispatch import receiver\n')]
# Copyright (c) Microsoft Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ "playwright._impl._path_utils.get_file_dirname", "socket.socket", "twisted.internet.reactor.stop", "mimetypes.add_type", "asyncio.Future", "twisted.internet.reactor.run", "mimetypes.guess_type", "gzip.compress", "twisted.internet.reactor.listenTCP", "twisted.internet.reactor.listenSSL" ]
[((1018, 1036), 'playwright._impl._path_utils.get_file_dirname', 'get_file_dirname', ([], {}), '()\n', (1034, 1036), False, 'from playwright._impl._path_utils import get_file_dirname\n'), ((1669, 1709), 'mimetypes.add_type', 'mimetypes.add_type', (['"""text/html"""', '""".html"""'], {}), "('text/html', '.html')\n", (16...
#!/usr/bin/env python # encoding:utf-8 """ Author : <NAME> Date : 2020 HomePage : http://github.com/yuanqingmei Email : <EMAIL> 功能:对terapromise92个项目的数据做描述性统计 """ # 参数说明: # (1) wd: 用于存放被训练的项目路径,默认值为"/home/mei/RD/JURECZKO/"; # (2) rd: 用于存放为断点回归数据(按各个度量名形成文件 )以及 metricThresholds.csv用入存入LOGIT回归变量的系数协方差, # ...
[ "os.path.getsize", "pandas.read_csv", "csv.writer", "os.getcwd", "os.chdir", "pandas.concat", "os.mkdir", "pandas.DataFrame", "csv.reader" ]
[((756, 782), 'os.chdir', 'os.chdir', (['workingDirectory'], {}), '(workingDirectory)\n', (764, 782), False, 'import os\n'), ((1060, 1074), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1072, 1074), True, 'import pandas as pd\n'), ((1107, 1121), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1119, 1121...
# Copyright 2014 NeuroData (http://neurodata.io) # # 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 ag...
[ "boto3.resource", "ndingest.settings.settings.Settings.load" ]
[((733, 748), 'ndingest.settings.settings.Settings.load', 'Settings.load', ([], {}), '()\n', (746, 748), False, 'from ndingest.settings.settings import Settings\n'), ((979, 1052), 'boto3.resource', 'boto3.resource', (['"""sns"""'], {'region_name': 'region_name', 'endpoint_url': 'endpoint_url'}), "('sns', region_name=re...
from statsmodels.compat.python import range import numpy as np import matplotlib.pyplot as plt import matplotlib.lines as lines def tukeyplot(results, dim=None, yticklabels=None): npairs = len(results) fig = plt.figure() fsp = fig.add_subplot(111) fsp.axis([-50,50,0.5,10.5]) fsp.set_title('95 % f...
[ "numpy.array", "matplotlib.pyplot.figure", "numpy.arange", "statsmodels.compat.python.range" ]
[((2057, 2371), 'numpy.array', 'np.array', (['[[-10.04391794, 26.34391794], [-21.45225794, 14.93557794], [5.61441206, \n 42.00224794], [-13.40225794, 22.98557794], [-29.60225794, 6.78557794],\n [-2.53558794, 33.85224794], [-21.55225794, 14.83557794], [8.87275206, \n 45.26058794], [-10.14391794, 26.24391794], [...
#!/usr/bin/env python import sys import panic_tests as test from test_panic_util.test_panic_util import panic_test, run_all # test_task_wdt @panic_test(target=['ESP32', 'ESP32S2']) def test_panic_task_wdt(env, _extra_data): test.task_wdt_inner(env, 'panic') @panic_test() def test_coredump_task_wdt_uart_elf_crc...
[ "panic_tests.ub_inner", "panic_tests.cache_error_inner", "panic_tests.storeprohibited_inner", "panic_tests.int_wdt_cache_disabled_inner", "test_panic_util.test_panic_util.run_all", "test_panic_util.test_panic_util.panic_test", "panic_tests.int_wdt_inner", "panic_tests.task_wdt_inner", "panic_tests.a...
[((144, 183), 'test_panic_util.test_panic_util.panic_test', 'panic_test', ([], {'target': "['ESP32', 'ESP32S2']"}), "(target=['ESP32', 'ESP32S2'])\n", (154, 183), False, 'from test_panic_util.test_panic_util import panic_test, run_all\n'), ((268, 280), 'test_panic_util.test_panic_util.panic_test', 'panic_test', ([], {}...
# -*- coding: utf-8 -*- from zope.component import getSiteManager, getGlobalSiteManager from zope.component.interfaces import IComponents def contextualSiteManager(): return getSiteManager() or getGlobalSiteManager() def query_registry(name, parent_components=None): if parent_components is None: pa...
[ "zope.component.getGlobalSiteManager", "zope.component.getSiteManager" ]
[((181, 197), 'zope.component.getSiteManager', 'getSiteManager', ([], {}), '()\n', (195, 197), False, 'from zope.component import getSiteManager, getGlobalSiteManager\n'), ((201, 223), 'zope.component.getGlobalSiteManager', 'getGlobalSiteManager', ([], {}), '()\n', (221, 223), False, 'from zope.component import getSite...
import collections import numpy as np import pandas as pd import matplotlib.colors import matplotlib.cm as cm import matplotlib.pyplot as plt import matplotlib.colors as mcolors import plotly import chart_studio.plotly as py import plotly.graph_objects as go from plotly.subplots import make_subplots class MultiResol...
[ "pandas.DataFrame", "matplotlib.colors.to_hex", "matplotlib.cm.ScalarMappable", "pandas.concat" ]
[((4068, 4138), 'pandas.DataFrame', 'pd.DataFrame', (["self.sankey_dict['node_labels']"], {'columns': "['node_labels']"}), "(self.sankey_dict['node_labels'], columns=['node_labels'])\n", (4080, 4138), True, 'import pandas as pd\n'), ((6817, 6856), 'matplotlib.cm.ScalarMappable', 'cm.ScalarMappable', ([], {'norm': 'norm...
#!/usr/bin/env python ''' optical_flow.py - Optical-flow velocity calculation and display using OpenCV To test: % python optical_flow.py # video from webcam % python optical_flow.py -f FILENAME # video from file % python optical_flow.py -c CAMERA # specific camera number ...
[ "cv2.calcOpticalFlowFarneback", "numpy.reshape", "math.tan", "optparse.OptionParser", "cv2.imshow", "cv2.circle", "cv2.waitKey", "cv2.VideoCapture", "cv2.cvtColor", "numpy.frombuffer", "cv2.resize", "time.time" ]
[((5486, 5509), 'optparse.OptionParser', 'optparse.OptionParser', ([], {}), '()\n', (5507, 5509), False, 'import optparse\n'), ((6037, 6106), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(camno if not options.filename else options.filename)'], {}), '(camno if not options.filename else options.filename)\n', (6053, 6106), ...
from datetime import datetime as dt import os database_dt_format = "%Y-%m-%d %H:%M:%S.%f" # datetime string format, json do not support datetime objects execution_log_filename = "execution_log.txt" # execution logfile execution_log_path = os.path.join(os.curdir, execution_log_filename) # execution logfile path de...
[ "os.path.join", "datetime.datetime.utcnow" ]
[((242, 289), 'os.path.join', 'os.path.join', (['os.curdir', 'execution_log_filename'], {}), '(os.curdir, execution_log_filename)\n', (254, 289), False, 'import os\n'), ((409, 420), 'datetime.datetime.utcnow', 'dt.utcnow', ([], {}), '()\n', (418, 420), True, 'from datetime import datetime as dt\n'), ((558, 569), 'datet...
#!/usr/bin/env python3 # License MIT # Copyright 2016-2021 <NAME> # Version 3.0.0 import random import discord from dislash import * from discord.ext import commands from ftsbot import data class textcommands(commands.Cog): def __init__(self, bot): self.bot = bot @slash_commands.cooldown(1, 300, commands.Bucket...
[ "discord.Colour", "random.randrange" ]
[((2081, 2114), 'random.randrange', 'random.randrange', (['(1)', '(sides + 1)', '(1)'], {}), '(1, sides + 1, 1)\n', (2097, 2114), False, 'import random\n'), ((2020, 2053), 'random.randrange', 'random.randrange', (['(1)', '(sides + 1)', '(1)'], {}), '(1, sides + 1, 1)\n', (2036, 2053), False, 'import random\n'), ((464, ...
#!/usr/bin/python # -*- coding: utf-8 -- #@File: 06 requests file.py #@author: Gorit #@contact: <EMAIL> #@time: 2020/5/25 20:21 ''' target:requests 高级用法,文件上传 模拟文件上传 ''' import requests # rb 以二进制的形式读取数据 files = { "file":open('favicon.ico', 'rb') } r = requests.post("http://httpbin.org/post", files=files)...
[ "requests.post" ]
[((267, 320), 'requests.post', 'requests.post', (['"""http://httpbin.org/post"""'], {'files': 'files'}), "('http://httpbin.org/post', files=files)\n", (280, 320), False, 'import requests\n')]
# Generated by Django 3.1 on 2020-08-05 13:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0012_service'), ('users', '0002_alter_user_first_name'), ] operations = [ migrations.AddField( model_name='user...
[ "django.db.models.ManyToManyField" ]
[((370, 414), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'to': '"""website.Service"""'}), "(to='website.Service')\n", (392, 414), False, 'from django.db import migrations, models\n')]
# Copyright 2006-2016 by <NAME>. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Bio.AlignIO support for ...
[ "Bio.Align.MultipleSeqAlignment", "Bio.Seq.Seq" ]
[((11385, 11429), 'Bio.Align.MultipleSeqAlignment', 'MultipleSeqAlignment', (['records', 'self.alphabet'], {}), '(records, self.alphabet)\n', (11405, 11429), False, 'from Bio.Align import MultipleSeqAlignment\n'), ((11270, 11291), 'Bio.Seq.Seq', 'Seq', (['s', 'self.alphabet'], {}), '(s, self.alphabet)\n', (11273, 11291...
import cgen as c from sympy import Symbol from devito.cgen_utils import ccode from devito.ir.iet import (Expression, Iteration, List, UnboundedIndex, ntags, FindAdjacentIterations, FindNodes, IsPerfectIteration, NestedTransformer, Transformer, compose_nodes, ...
[ "devito.ir.iet.FindAdjacentIterations", "sympy.Symbol", "devito.ir.iet.is_foldable", "devito.ir.iet.retrieve_iteration_tree", "devito.cgen_utils.ccode", "devito.ir.iet.compose_nodes", "devito.ir.iet.UnboundedIndex", "devito.ir.iet.FindNodes", "devito.ir.iet.Iteration", "devito.tools.as_tuple", "...
[((2921, 2950), 'devito.ir.iet.retrieve_iteration_tree', 'retrieve_iteration_tree', (['node'], {}), '(node)\n', (2944, 2950), False, 'from devito.ir.iet import Expression, Iteration, List, UnboundedIndex, ntags, FindAdjacentIterations, FindNodes, IsPerfectIteration, NestedTransformer, Transformer, compose_nodes, is_fol...
from django.views.generic import CreateView, TemplateView from django.contrib.messages.views import SuccessMessageMixin from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.forms import UserCreationForm from django.views.generic import DetailView, ListView, FormView, TemplateView, View fro...
[ "django.shortcuts.get_object_or_404", "django.utils.http.urlsafe_base64_decode" ]
[((1191, 1256), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Player'], {'user__username': "self.kwargs['username']"}), "(Player, user__username=self.kwargs['username'])\n", (1208, 1256), False, 'from django.shortcuts import get_object_or_404\n'), ((1614, 1643), 'django.utils.http.urlsafe_base64_decode'...
# Copyright 2020 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ "cirq.testing.EqualsTester", "cirq.testing.assert_implements_consistent_protocols", "cirq.ops.QubitPermutationGate", "cirq.LineQubit.range", "cirq.testing.assert_equivalent_computational_basis_map", "cirq.QubitPermutationGate", "cirq.Circuit", "pytest.mark.parametrize", "pytest.raises", "cirq.X", ...
[((2194, 2369), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""maps, permutation"""', '[[{(0): 0}, [0]], [{(0): 0, (1): 1, (2): 2}, [0, 1, 2]], [{(0): 0, (1): 4,\n (2): 2, (4): 1, (7): 7, (5): 5}, [2, 1, 0]]]'], {}), "('maps, permutation', [[{(0): 0}, [0]], [{(0): 0, (1\n ): 1, (2): 2}, [0, 1, 2]], [...
# Generated by Django 3.1.4 on 2020-12-09 00:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('spendings', '0001_initial'), ] operations = [ migrations.AlterField( model_name='expenses', name='expense', ...
[ "django.db.models.CharField" ]
[((330, 362), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)'}), '(max_length=128)\n', (346, 362), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Standard lib imports import os import sys from glob import glob import subprocess import hashlib from collections import OrderedDict import argparse import sys # Generic third party imports import yaml __version__ = "0.0.1" __name__ = "build_all_singularity" __descrip...
[ "collections.OrderedDict", "argparse.ArgumentParser", "yaml.dump", "subprocess.Popen", "sys.stderr.flush", "yaml.load", "os.path.split", "os.path.isfile", "sys.stderr.write", "os.remove", "sys.stdout.flush", "glob.glob", "sys.stdout.write" ]
[((507, 559), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__description__'}), '(description=__description__)\n', (530, 559), False, 'import argparse\n'), ((5499, 5518), 'sys.stdout.write', 'sys.stdout.write', (['s'], {}), '(s)\n', (5515, 5518), False, 'import sys\n'), ((5523, 5541), 'sys...
import pytest from configargparse import Namespace from pydpiper.core.arguments import CompoundParser, AnnotatedParser, application_parser, parse #, lsq6_parser, lsq12_parser from pydpiper.pipelines.MBM import mbm_parser # TODO should these test files be named test_*? # should these be fixtures or not? @pytest.fixt...
[ "pytest.fixture", "pydpiper.core.arguments.AnnotatedParser", "pydpiper.core.arguments.parse", "configargparse.Namespace" ]
[((816, 832), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (830, 832), False, 'import pytest\n'), ((975, 991), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (989, 991), False, 'import pytest\n'), ((1517, 1533), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1531, 1533), False, 'import pytest\n'...
from abc import ABC, abstractmethod from collections import defaultdict, namedtuple from typing import TYPE_CHECKING, Any, Dict, FrozenSet, Iterable, List, Optional, Set, Tuple, Union from dagster import check from dagster.core.errors import DagsterInvalidDefinitionError from dagster.serdes import whitelist_for_serdes...
[ "dagster.check.list_param", "dagster.check.inst_param", "collections.namedtuple", "collections.defaultdict.__setitem__", "dagster.check.str_param", "dagster.check.dict_param", "dagster.check.opt_str_param", "dagster.check.invariant", "dagster.check.opt_dict_param", "collections.defaultdict", "co...
[((750, 798), 'collections.namedtuple', 'namedtuple', (['"""Solid"""', '"""name alias tags hook_defs"""'], {}), "('Solid', 'name alias tags hook_defs')\n", (760, 798), False, 'from collections import defaultdict, namedtuple\n'), ((6639, 6680), 'collections.namedtuple', 'namedtuple', (['"""_SolidHandle"""', '"""name par...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # 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...
[ "edb.ir.utils.contains_dml", "edb.ir.typeutils.is_object", "edb.pgsql.ast.UpdateStmt", "edb.pgsql.ast.SelectStmt", "edb.pgsql.types.get_ptrref_storage_info", "edb.pgsql.ast.ResTarget", "edb.pgsql.ast.UpdateTarget", "edb.pgsql.ast.FuncCall", "edb.pgsql.common.get_constraint_raw_name", "edb.pgsql.as...
[((16625, 16717), 'edb.pgsql.ast.IteratorCTE', 'pgast.IteratorCTE', ([], {'path_id': 'iterator_set.path_id', 'cte': 'iterator_cte', 'parent': 'last_iterator'}), '(path_id=iterator_set.path_id, cte=iterator_cte, parent=\n last_iterator)\n', (16642, 16717), True, 'from edb.pgsql import ast as pgast\n'), ((17517, 17549...
# Some part of the code was referenced from below. # https://github.com/pytorch/examples/tree/master/word_language_model import torch import torch.nn as nn import numpy as np from torch.autograd import Variable from data_utils import Dictionary, Corpus # Hyper Parameters embed_size = 128 hidden_size = 1024 num_layer...
[ "torch.nn.CrossEntropyLoss", "data_utils.Corpus", "torch.multinomial", "torch.nn.LSTM", "numpy.exp", "torch.nn.Linear", "torch.autograd.Variable", "torch.zeros", "torch.nn.Embedding", "torch.ones" ]
[((548, 556), 'data_utils.Corpus', 'Corpus', ([], {}), '()\n', (554, 556), False, 'from data_utils import Dictionary, Corpus\n'), ((1804, 1825), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (1823, 1825), True, 'import torch.nn as nn\n'), ((3318, 3340), 'torch.ones', 'torch.ones', (['vocab_size'...
#!/usr/bin/env python # Written for Python 3.4 # # Dependencies # pillow # scikit-image # scikit-learn # ...and their dependencies # # @TODO@: # * implement shared palette # * range check numeric command-line arguments # * consider click instead of argparse # * error out if width or height is not a mult...
[ "numpy.mean", "numpy.repeat", "argparse.ArgumentParser", "io.BytesIO", "time.perf_counter", "struct.pack", "numpy.array", "platform.system", "glob.glob" ]
[((849, 881), 'numpy.array', 'np.array', (['[[0, 0, 7], [3, 5, 1]]'], {}), '([[0, 0, 7], [3, 5, 1]])\n', (857, 881), True, 'import numpy as np\n'), ((921, 982), 'numpy.array', 'np.array', (['[[0, 0, 0, 7, 5], [3, 5, 7, 5, 3], [1, 3, 5, 3, 1]]'], {}), '([[0, 0, 0, 7, 5], [3, 5, 7, 5, 3], [1, 3, 5, 3, 1]])\n', (929, 982)...
""" mdform.fields ~~~~~~~~~~~~~ Labeled field <label> = Labeled required field <label>* = Specific fields: - StringField ___[length] (length is optional) - IntegerField ###[min:max:step] (min, max, step are optional) - Decimal...
[ "dataclasses.dataclass", "re.compile" ]
[((1991, 2053), 're.compile', 're.compile', (['"""\\\\[section[ \\\\t]*(:(?P<name>.*))?\\\\]"""', 're.UNICODE'], {}), "('\\\\[section[ \\\\t]*(:(?P<name>.*))?\\\\]', re.UNICODE)\n", (2001, 2053), False, 'import re\n'), ((2101, 2164), 're.compile', 're.compile', (['"""\\\\[collapse[ \\\\t]*(:(?P<name>.*))?\\\\]"""', 're...
import datetime from django.core.management import call_command from django.db.models import Max, Sum import waffle from celery import group import olympia.core.logger from olympia.amo.utils import chunked from olympia.lib.es.utils import raise_if_reindex_in_progress from . import tasks from .models import AddonC...
[ "django.core.management.call_command", "datetime.datetime.strptime", "waffle.switch_is_active", "olympia.lib.es.utils.raise_if_reindex_in_progress", "celery.group", "olympia.amo.utils.chunked", "datetime.timedelta", "datetime.date.today", "django.db.models.Max", "django.db.models.Sum" ]
[((571, 606), 'olympia.lib.es.utils.raise_if_reindex_in_progress', 'raise_if_reindex_in_progress', (['"""amo"""'], {}), "('amo')\n", (599, 606), False, 'from olympia.lib.es.utils import raise_if_reindex_in_progress\n'), ((1274, 1309), 'olympia.lib.es.utils.raise_if_reindex_in_progress', 'raise_if_reindex_in_progress', ...
import scrapy import os class CveSpider(scrapy.Spider): name = "cve" ## Spider name should be unique ## Feed Settings required to get a beautifully arranged json format custom_settings = {'FEEDS':{ 'scraped_data.json': { 'format': 'json'...
[ "scrapy.Request" ]
[((939, 983), 'scrapy.Request', 'scrapy.Request', ([], {'url': 'url', 'callback': 'self.parse'}), '(url=url, callback=self.parse)\n', (953, 983), False, 'import scrapy\n')]
"""Contains a class implementing two versions of search with Dijkstra. """ import math from collections import defaultdict from heapdict import heapdict from backend.search_algorithms.search_result import SearchResult from backend.search_algorithms.search_algorithm import SearchAlgorithm from backend.graph_providers.g...
[ "heapdict.heapdict", "collections.defaultdict", "backend.search_algorithms.search_result.SearchResult" ]
[((2522, 2548), 'collections.defaultdict', 'defaultdict', (['(lambda : None)'], {}), '(lambda : None)\n', (2533, 2548), False, 'from collections import defaultdict\n'), ((2639, 2669), 'collections.defaultdict', 'defaultdict', (['(lambda : math.inf)'], {}), '(lambda : math.inf)\n', (2650, 2669), False, 'from collections...
# Copyright (c) 2020 NVIDIA Corporation. All rights reserved. # This work is licensed under the NVIDIA Source Code License - Non-commercial. Full # text can be found in LICENSE.md import argparse import matplotlib import pprint import glob import copy import posecnn_cuda from pose_rbpf.pose_rbpf import * from pose_rb...
[ "matplotlib.pyplot.imshow", "pose_rbpf.sdf_multiple_optimizer.sdf_multiple_optimizer", "argparse.ArgumentParser", "matplotlib.pyplot.gca", "config.config.cfg_from_file", "posecnn_cuda.backproject_forward", "matplotlib.pyplot.figure", "copy.deepcopy", "matplotlib.pyplot.Rectangle", "glob.glob", "...
[((1139, 1235), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Test PoseRBPF on YCB Video or T-LESS Datasets (RGBD)"""'}), "(description=\n 'Test PoseRBPF on YCB Video or T-LESS Datasets (RGBD)')\n", (1162, 1235), False, 'import argparse\n'), ((8936, 8964), 'config.config.cfg_from_fil...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from . import templates from .name_convention import ( is_valid_class_name, is_valid_variable_name, is_valid_surfix, to_variable_name ) from .exc import ValidationError from .pkg.six import integer_types, string_types from .pkg....
[ "collections.OrderedDict", "autocompvar.templates.t_def_all_class.render", "autocompvar.exc.ValidationError", "autocompvar.templates.t_def_class.render", "autocompvar.name_convention.is_valid_surfix", "autocompvar.name_convention.to_variable_name", "autocompvar.name_convention.is_valid_class_name", "a...
[((7437, 7500), 'autocompvar.templates.t_def_all_class.render', 'templates.t_def_all_class.render', ([], {'class_def_list': 'class_def_list'}), '(class_def_list=class_def_list)\n', (7469, 7500), False, 'from autocompvar import templates\n'), ((946, 959), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (957,...
import praw, time, pandas as pd, json, threading from nltk.sentiment.vader import SentimentIntensityAnalyzer from praw.models import Submission from typing import Dict, List, Tuple from timeit import default_timer as timer from dotenv import load_dotenv, dotenv_values from config.symbols import us, blacklist from conf...
[ "data.es.add_analyses", "nltk.sentiment.vader.SentimentIntensityAnalyzer", "timeit.default_timer", "config.models.SentimentContext", "json.dumps", "dotenv.load_dotenv", "praw.Reddit", "threading.Thread", "dotenv.dotenv_values", "time.time", "config.models.Analysis" ]
[((686, 699), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (697, 699), False, 'from dotenv import load_dotenv, dotenv_values\n'), ((710, 731), 'dotenv.dotenv_values', 'dotenv_values', (['""".env"""'], {}), "('.env')\n", (723, 731), False, 'from dotenv import load_dotenv, dotenv_values\n'), ((1190, 1288), 'pra...
from unittest import TestCase import unittest from unittest.mock import patch from main import main class TestMain(TestCase): @patch('main.Class') def test_main(self, mock_Class): instance = mock_Class.return_value instance.fun1.return_value = 'r1' instance.fun2.return_value = 'r2' ...
[ "unittest.main", "main.main", "unittest.mock.patch" ]
[((133, 152), 'unittest.mock.patch', 'patch', (['"""main.Class"""'], {}), "('main.Class')\n", (138, 152), False, 'from unittest.mock import patch\n'), ((472, 498), 'unittest.main', 'unittest.main', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (485, 498), False, 'import unittest\n'), ((325, 339), 'main.main', 'main', ...
## @file # package and install PyEfiCompressor extension # # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of th...
[ "setuptools.Extension" ]
[((890, 1043), 'setuptools.Extension', 'setuptools.Extension', (['"""EfiCompressor"""'], {'sources': "['Decompress.c', 'EfiCompress.c', 'TianoCompress.c', 'EfiCompressor.c']", 'include_dirs': "['Include']"}), "('EfiCompressor', sources=['Decompress.c',\n 'EfiCompress.c', 'TianoCompress.c', 'EfiCompressor.c'], includ...
""" Configuration for the sheep flask app """ import os class SheepConfig: if "SHEEP_HOME" in os.environ.keys(): SHEEP_HOME = os.environ["SHEEP_HOME"] else: SHEEP_HOME = os.path.join(os.environ["HOME"], "SHEEP","pysheep") UPLOAD_FOLDER = os.path.join(SHEEP...
[ "os.environ.keys", "os.path.join" ]
[((302, 347), 'os.path.join', 'os.path.join', (['SHEEP_HOME', '"""webapp"""', '"""uploads"""'], {}), "(SHEEP_HOME, 'webapp', 'uploads')\n", (314, 347), False, 'import os\n'), ((100, 117), 'os.environ.keys', 'os.environ.keys', ([], {}), '()\n', (115, 117), False, 'import os\n'), ((196, 248), 'os.path.join', 'os.path.joi...
#!/usr/bin/env python """ * ******************************************************* * Copyright (c) VMware, Inc. 2020. All Rights Reserved. * SPDX-License-Identifier: MIT * ******************************************************* * * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT * WARRANTIES OR CONDITIONS...
[ "samples.vsphere.common.ssl_helper.get_unverified_session", "vmware.vapi.vsphere.client.create_vsphere_client", "samples.vsphere.common.sample_cli.build_arg_parser" ]
[((1054, 1083), 'samples.vsphere.common.sample_cli.build_arg_parser', 'sample_cli.build_arg_parser', ([], {}), '()\n', (1081, 1083), False, 'from samples.vsphere.common import sample_cli, sample_util\n'), ((1250, 1361), 'vmware.vapi.vsphere.client.create_vsphere_client', 'create_vsphere_client', ([], {'server': 'args.s...
from __future__ import print_function import os, time, json from collections import defaultdict from .database import get_db from ..errors import UsageError def abbrev(t): if t is None: return "-" if t > 1.0: return "%.3fs" % t if t > 1e-3: return "%.1fms" % (t*1e3) return "%.1f...
[ "os.path.exists", "time.ctime", "json.dumps", "time.sleep", "collections.defaultdict", "time.time" ]
[((1751, 1767), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (1762, 1767), False, 'from collections import defaultdict\n'), ((1791, 1807), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (1802, 1807), False, 'from collections import defaultdict\n'), ((1566, 1596), 'os.path.exi...
import little_helper import re day = 10 if __file__.endswith("_2"): m = __import__(day + "_1") def show(lights, min_x, max_x, min_y, max_y): for y in range(min_y, max_y+1): for x in range(min_x, max_x+1): if [x,y] in (light.position for light in lights): print('#',...
[ "re.match", "little_helper.submit", "argparse.ArgumentParser", "little_helper.get_input" ]
[((1994, 2019), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2017, 2019), False, 'import argparse\n'), ((2153, 2181), 'little_helper.get_input', 'little_helper.get_input', (['day'], {}), '(day)\n', (2176, 2181), False, 'import little_helper\n'), ((1309, 1372), 're.match', 're.match', (['"""p...
from distutils.version import StrictVersion import unittest from numpy.testing import assert_almost_equal from onnxruntime import InferenceSession, __version__ as ort_version from sklearn.ensemble import ( GradientBoostingClassifier, GradientBoostingRegressor, ) from sklearn.linear_model import LogisticRegressi...
[ "sklearn.neural_network.MLPRegressor", "sklearn.neural_network.MLPClassifier", "skl2onnx.common.data_types.FloatTensorType", "sklearn.ensemble.GradientBoostingRegressor", "sklearn.linear_model.LogisticRegression", "skl2onnx.common.data_types.Int64TensorType", "numpy.testing.assert_almost_equal", "test...
[((15487, 15502), 'unittest.main', 'unittest.main', ([], {}), '()\n', (15500, 15502), False, 'import unittest\n'), ((991, 1144), 'test_utils.dump_multiple_classification', 'dump_multiple_classification', (['model'], {'allow_failure': '"""StrictVersion(onnxruntime.__version__) <= StrictVersion(\'0.2.1\')"""', 'target_op...
from typing import Union from pathlib import Path PathIsh = Union[str, Path] def expand_path(path: PathIsh) -> Path: if isinstance(path, str): path = Path(path) return path.expanduser().absolute()
[ "pathlib.Path" ]
[((165, 175), 'pathlib.Path', 'Path', (['path'], {}), '(path)\n', (169, 175), False, 'from pathlib import Path\n')]