code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : github.py.py # @Author: guq # @Date : 2022/4/19 # @Desc : from aiohttp import FormData from core.uploader_base import BaseUploader, init_server_decor class CodingUploader(BaseUploader): name = 'coding' is_repo = True def __init__(self, token...
[ "aiohttp.FormData" ]
[((1817, 1827), 'aiohttp.FormData', 'FormData', ([], {}), '()\n', (1825, 1827), False, 'from aiohttp import FormData\n')]
"""Websauna config.""" import pkg_resources _resource_manager = pkg_resources.ResourceManager()
[ "pkg_resources.ResourceManager" ]
[((66, 97), 'pkg_resources.ResourceManager', 'pkg_resources.ResourceManager', ([], {}), '()\n', (95, 97), False, 'import pkg_resources\n')]
from discord.ext import commands from discord import utils, errors import checks class DynamicVoice(commands.Cog): """ A stateless cog that manages voice channels. It only has one command; >refresh, to manually make it check channels """ def __init__(self, bot): self.bot = bot @comma...
[ "checks.trusted", "discord.ext.commands.command", "discord.ext.commands.Cog.listener" ]
[((315, 338), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (336, 338), False, 'from discord.ext import commands\n'), ((440, 458), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (456, 458), False, 'from discord.ext import commands\n'), ((464, 480), 'checks.truste...
#!/usr/bin/env python import os import sys # For coverage. if __package__ is None: sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/..") from unittest import main, TestCase import requests import requests_mock from iris_sdk.client import Client from iris_sdk.models.account import Account XML_RES...
[ "unittest.main", "os.path.abspath", "requests_mock.Mocker", "iris_sdk.client.Client", "iris_sdk.models.account.Account" ]
[((3987, 3993), 'unittest.main', 'main', ([], {}), '()\n', (3991, 3993), False, 'from unittest import main, TestCase\n'), ((945, 986), 'iris_sdk.client.Client', 'Client', (['"""http://foo"""', '"""bar"""', '"""bar"""', '"""qux"""'], {}), "('http://foo', 'bar', 'bar', 'qux')\n", (951, 986), False, 'from iris_sdk.client ...
# Generated by Django 2.2.4 on 2020-02-22 23:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('belleflopt', '0024_auto_20200222_1526'), ] operations = [ migrations.AddIndex( model_name='species', index=models.In...
[ "django.db.models.Index" ]
[((311, 385), 'django.db.models.Index', 'models.Index', ([], {'fields': "['pisces_fid']", 'name': '"""belleflopt__pisces__deef91_idx"""'}), "(fields=['pisces_fid'], name='belleflopt__pisces__deef91_idx')\n", (323, 385), False, 'from django.db import migrations, models\n')]
import tensorflow as tf from tensorflow.keras.layers import * from tensorflow.keras import Model from tensorflow.keras import backend as K import tensorflow_addons as tfa from build_my_layer import MyMaskCompute, MySpatialDropout1D import numpy as np import os from pathlib import Path import argparse import warnings im...
[ "tensorflow.keras.models.load_model", "argparse.ArgumentParser", "warnings.filterwarnings", "os.getcwd", "numpy.zeros", "pathlib.Path", "numpy.array" ]
[((373, 406), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (396, 406), False, 'import warnings\n'), ((417, 487), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""run DeepTrio for PPI prediction"""'}), "(description='run DeepTrio for PPI pred...
import unittest from src.core.common import (AccentsDict, Language, SpeakersDict, SpeakersLogDict, SymbolIdDict, remove_duplicates_list_orderpreserving) from src.core.pre.text.pre import * class UnitTests(unittest.TestCase): def test_preprocess(self): d...
[ "unittest.TextTestRunner", "src.core.common.SymbolIdDict.init_from_symbols", "unittest.TestLoader" ]
[((438, 480), 'src.core.common.SymbolIdDict.init_from_symbols', 'SymbolIdDict.init_from_symbols', (["{'a', 'b'}"], {}), "({'a', 'b'})\n", (468, 480), False, 'from src.core.common import AccentsDict, Language, SpeakersDict, SpeakersLogDict, SymbolIdDict, remove_duplicates_list_orderpreserving\n'), ((1062, 1104), 'src.co...
import os import numpy from numpy.distutils.misc_util import Configuration def configuration(parent_package="", top_path=None): config = Configuration("compiledtrees", parent_package, top_path) libraries = [] if os.name == 'posix': libraries.append('m') config.add_extension("_compiled", ...
[ "numpy.distutils.misc_util.Configuration", "numpy.get_include" ]
[((144, 200), 'numpy.distutils.misc_util.Configuration', 'Configuration', (['"""compiledtrees"""', 'parent_package', 'top_path'], {}), "('compiledtrees', parent_package, top_path)\n", (157, 200), False, 'from numpy.distutils.misc_util import Configuration\n'), ((404, 423), 'numpy.get_include', 'numpy.get_include', ([],...
# dappx/models.py from django.db import models from django.contrib.auth.models import User import datetime # Create your models here. class UserProfileInfo(models.Model): gender_choices = ( ('Male', 'Male'), ('Female', 'Female'), ('Other', 'Other'), ) user = models.OneToOneField(...
[ "django.db.models.CharField", "django.db.models.OneToOneField", "django.db.models.PositiveIntegerField", "django.db.models.DateField" ]
[((299, 351), 'django.db.models.OneToOneField', 'models.OneToOneField', (['User'], {'on_delete': 'models.CASCADE'}), '(User, on_delete=models.CASCADE)\n', (319, 351), False, 'from django.db import models\n'), ((493, 548), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(20)', 'choices': 'gender_c...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0069_auto_20170731_1026'), ] operations = [ migrations.AlterField( model_name='cluster', nam...
[ "django.db.models.CharField" ]
[((346, 416), 'django.db.models.CharField', 'models.CharField', ([], {'unique': '(True)', 'max_length': '(100)', 'verbose_name': '"""SMTP主机IP"""'}), "(unique=True, max_length=100, verbose_name='SMTP主机IP')\n", (362, 416), False, 'from django.db import models, migrations\n')]
#! /usr/bin/env python3 from pathlib import Path from re import compile as regex class NotFound(Exception): pass def find(filename, *patterns): ''' Search through the named file's lines, matching regex patterns. The patterns should occur in order on subsequent lines, and each should have one ma...
[ "pathlib.Path", "re.compile" ]
[((1517, 1564), 're.compile', 'regex', (['"""^\\\\| CLB Logic +\\\\| +(\\\\d+\\\\.\\\\d+) \\\\|"""'], {}), "('^\\\\| CLB Logic +\\\\| +(\\\\d+\\\\.\\\\d+) \\\\|')\n", (1522, 1564), True, 'from re import compile as regex\n'), ((3278, 3322), 're.compile', 'regex', (['"""^ mmcm_clkout1 .* (\\\\d+\\\\.\\\\d+) +$"""'], {})...
""" Camera class similar to that of camera.py, this time implemented as a graphics Group. Interface is much more simplified, with only a position and zoom implemented, but is easily extended to add other features such as autoscroll. camera = CameraGroup(x=0, y=0, zoom=1) world_object = pyglet.some_renderable(...
[ "pyglet.app.run", "pyglet.text.Label", "pyglet.window.key.KeyStateHandler", "pyglet.graphics.Batch", "pyglet.clock.schedule", "pyglet.shapes.Rectangle", "pyglet.math.Vec2", "pyglet.window.Window" ]
[((3611, 3647), 'pyglet.window.Window', 'pyglet.window.Window', ([], {'resizable': '(True)'}), '(resizable=True)\n', (3631, 3647), False, 'import pyglet\n'), ((3660, 3683), 'pyglet.graphics.Batch', 'pyglet.graphics.Batch', ([], {}), '()\n', (3681, 3683), False, 'import pyglet\n'), ((3727, 3748), 'pyglet.window.key.KeyS...
import argparse from time import time from .source import * __version__ = '0.3.2' __author__ = '<NAME>' __email__ = '<EMAIL>' """ Functions to treat the arguments and return each values """ USAGE = '%(prog)s [-s][-v][-o OUTPUT][-e][-f FORMAT][IMGUR LINK]' def get_args(): """ function that loads the argument...
[ "argparse.ArgumentParser", "time.time" ]
[((370, 465), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Download imgur videos"""', 'prog': '"""imgur-dl"""', 'usage': 'USAGE'}), "(description='Download imgur videos', prog=\n 'imgur-dl', usage=USAGE)\n", (393, 465), False, 'import argparse\n'), ((1807, 1813), 'time.time', 'time'...
""" datautils for writing/reading hdf5 files. """ import h5py from torch.utils import data from lettuce._version import get_versions import pickle import io import numpy as np __all__ = ["HDF5Reporter", "LettuceDataset"] class HDF5Reporter: """ HDF5 reporter for distribution function f in lettuce containing ...
[ "io.BytesIO", "h5py.File", "lettuce._version.get_versions", "pickle.dump" ]
[((1619, 1656), 'h5py.File', 'h5py.File', (["(self.filebase + '.h5')", '"""w"""'], {}), "(self.filebase + '.h5', 'w')\n", (1628, 1656), False, 'import h5py\n'), ((2588, 2600), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (2598, 2600), False, 'import io\n'), ((2609, 2640), 'pickle.dump', 'pickle.dump', (['instance', 'b...
# MIT License # # Copyright (c) 2020 <NAME> (Talendar) # # 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, modify, m...
[ "numpy.random.uniform", "numpy.multiply", "numpy.random.binomial", "numpy.array", "nevopy.fixed_topology.layers.base_layer.IncompatibleLayersError" ]
[((9520, 9582), 'numpy.random.binomial', 'np.random.binomial', (['w.size', 'self.config.weight_mutation_chance'], {}), '(w.size, self.config.weight_mutation_chance)\n', (9538, 9582), True, 'import numpy as np\n'), ((10271, 10330), 'numpy.random.binomial', 'np.random.binomial', (['w.size', 'self.config.weight_reset_chan...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_examples -------------- Tests for the Cookiecutter example repos. """ from __future__ import unicode_literals import errno import logging import os import shutil import subprocess import sys if sys.version_info[:3] < (2, 7): import unittest2 as unittest els...
[ "unittest.main", "unittest.skipIf", "subprocess.Popen", "logging.basicConfig", "os.path.isdir", "os.path.isfile", "cookiecutter.utils.rmtree", "cookiecutter.utils.work_in" ]
[((612, 689), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s: %(message)s"""', 'level': 'logging.DEBUG'}), "(format='%(levelname)s: %(message)s', level=logging.DEBUG)\n", (631, 689), False, 'import logging\n'), ((693, 785), 'unittest.skipIf', 'unittest.skipIf', ([], {'condition': 'travi...
import math from collections import deque from Board import Board inf = float("inf") cm2 = cm3 = cp2 = cp3 = 1 cp1 = cm1 = 3 cp4 = cp5 = cm4 = cm5 = 2 class Player: __slots__ = "board", "last_oppo_place", "depth", "history", "mine", "oppo" def __init__(self, colour, depth=4): if colour == "white":...
[ "Board.Board" ]
[((461, 468), 'Board.Board', 'Board', ([], {}), '()\n', (466, 468), False, 'from Board import Board\n')]
import pandas as pd import numpy as np #import matplotlib.pyplot as plt #import seaborn as sns #import warnings #warnings.filterwarnings("ignore", category=DeprecationWarning) from sklearn.preprocessing import StandardScaler import warnings import random from sklearn.model_selection import ShuffleSplit from ...
[ "sklearn.externals.joblib.dump", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.model_selection.cross_validate", "sklearn.linear_model.LogisticRegression", "imblearn.over_sampling.SMOTE" ]
[((559, 592), 'pandas.read_csv', 'pd.read_csv', (['"""kidney_disease.csv"""'], {}), "('kidney_disease.csv')\n", (570, 592), True, 'import pandas as pd\n'), ((2103, 2151), 'sklearn.model_selection.train_test_split', 'train_test_split', (['source', 'target'], {'test_size': '(0.05)'}), '(source, target, test_size=0.05)\n'...
import logging from typing import BinaryIO from lib import inquirer from .search import search_public_key from .validate import valid from .create import create class SSHKeys(object): """ Place for storing SSH keys. It provides tools for validating and creating keys. Args: private_key (Bina...
[ "lib.inquirer.confirm", "logging.getLogger" ]
[((858, 887), 'logging.getLogger', 'logging.getLogger', (['"""lazy_lxd"""'], {}), "('lazy_lxd')\n", (875, 887), False, 'import logging\n'), ((2919, 3009), 'lib.inquirer.confirm', 'inquirer.confirm', (['"""Create new SSH key pair\n Will be named by name of container."""'], {}), '(\n """Create new SSH key pair\n Wil...
import os input = None def myReadChar(): input = os.read(0, 100) return input def myReadLine(): input = myReadChar() inputString = "" i = 0 while i < len(input): if chr(input[i]) != '\n': inputString += chr(input[i]) i += 1 return tokenize(inputString) def t...
[ "os.read" ]
[((55, 70), 'os.read', 'os.read', (['(0)', '(100)'], {}), '(0, 100)\n', (62, 70), False, 'import os\n')]
import pytorch_lightning as pl from torch.utils.data import DataLoader from torchvision import datasets, transforms class MNISTDataModule(pl.LightningDataModule): def __init__(self, **kwargs): """ Initialization of the data module with a train and test dataset, as well as a loader for each. ...
[ "torchvision.transforms.Normalize", "torchvision.datasets.MNIST", "torch.utils.data.DataLoader", "torchvision.transforms.ToTensor" ]
[((949, 1027), 'torchvision.datasets.MNIST', 'datasets.MNIST', (['"""dataset"""'], {'download': '(True)', 'train': '(True)', 'transform': 'self.transform'}), "('dataset', download=True, train=True, transform=self.transform)\n", (963, 1027), False, 'from torchvision import datasets, transforms\n'), ((1051, 1130), 'torch...
import requests import re from bs4 import BeautifulSoup html = requests.get('http://58921.com/alltime/2020') html.encoding = 'utf-8' html = html.text # print(html) req = r'<td><a href="/film/.*?" title="(.*?)">.*?</a></td>' title = re.findall(req, html) # print(title) soup = BeautifulSoup(html, 'lxml') img_url = sou...
[ "bs4.BeautifulSoup", "re.findall", "requests.get" ]
[((64, 109), 'requests.get', 'requests.get', (['"""http://58921.com/alltime/2020"""'], {}), "('http://58921.com/alltime/2020')\n", (76, 109), False, 'import requests\n'), ((234, 255), 're.findall', 're.findall', (['req', 'html'], {}), '(req, html)\n', (244, 255), False, 'import re\n'), ((279, 306), 'bs4.BeautifulSoup',...
import numpy as np from pysbrl import BayesianRuleList from rulematrix.surrogate.discretize import get_discretizer, compute_mdlp_all_intervals class RuleList(BayesianRuleList): def __init__(self, min_rule_len=1, max_rule_len=2, min_support=0.02, lambda_=20, eta=1, iters=30000, n_chains=30, alpha=...
[ "rulematrix.surrogate.discretize.get_discretizer", "numpy.arange", "rulematrix.surrogate.discretize.compute_mdlp_all_intervals" ]
[((2066, 2110), 'rulematrix.surrogate.discretize.compute_mdlp_all_intervals', 'compute_mdlp_all_intervals', (['self.discretizer'], {}), '(self.discretizer)\n', (2092, 2110), False, 'from rulematrix.surrogate.discretize import get_discretizer, compute_mdlp_all_intervals\n'), ((1296, 1407), 'rulematrix.surrogate.discreti...
import io import inspect from importlib.util import spec_from_file_location, module_from_spec import os import sys from contextlib import redirect_stdout from flask import Flask from flask import request from flask import jsonify import core.simulate import slot.a import slot.d import slot.w from core.afflic import A...
[ "io.StringIO", "os.path.join", "flask.request.args.get", "importlib.util.module_from_spec", "inspect.isclass", "conf.coability_dict", "flask.Flask", "conf.skillshare.items", "flask.jsonify", "importlib.util.spec_from_file_location", "os.getenv", "flask.request.get_json", "inspect.getmembers"...
[((382, 397), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (387, 397), False, 'from flask import Flask\n'), ((420, 447), 'os.getenv', 'os.getenv', (['"""ROOT_DIR"""', '""".."""'], {}), "('ROOT_DIR', '..')\n", (429, 447), False, 'import os\n'), ((2787, 2824), 'inspect.getmembers', 'inspect.getmembers', ([...
"""Support number entity for Xiaomi Miot.""" import logging from homeassistant.const import * # noqa: F401 from homeassistant.components.number import ( DOMAIN as ENTITY_DOMAIN, NumberEntity, ) from . import ( DOMAIN, CONF_MODEL, XIAOMI_CONFIG_SCHEMA as PLATFORM_SCHEMA, # noqa: F401 MiotEnti...
[ "logging.getLogger" ]
[((521, 548), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (538, 548), False, 'import logging\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-09-28 12:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('showings', '0012_auto_20180220_2058'), ] operations = [ migrations.AlterFie...
[ "django.db.models.CharField" ]
[((409, 577), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('wk', 'Weekly showing'), ('an', 'Allnighter'), ('ev', 'Event'), ('mo',\n 'Movie Night'), ('ot', 'Other')]", 'default': '"""wk"""', 'max_length': '(2)'}), "(choices=[('wk', 'Weekly showing'), ('an', 'Allnighter'), (\n 'ev', 'Event'...
"""EasyEnsembleClassifier: Bag of balanced boosted learners also known as EasyEnsemble. """ # Authors: <NAME> <<EMAIL>> # License: MIT # %% from warnings import warn from sklearn.ensemble import AdaBoostClassifier from .._bagging import ResampleBaggingClassifier from ...sampler.under_sampling import RandomUnderS...
[ "sklearn.ensemble.AdaBoostClassifier", "sklearn.model_selection.train_test_split", "imbalanced_ensemble.visualizer.ImbalancedEnsembleVisualizer", "sklearn.datasets.make_classification", "copy.copy", "sklearn.tree.DecisionTreeClassifier", "collections.Counter" ]
[((10175, 10367), 'sklearn.datasets.make_classification', 'make_classification', ([], {'n_classes': '(3)', 'class_sep': '(2)', 'weights': '[0.1, 0.3, 0.6]', 'n_informative': '(3)', 'n_redundant': '(1)', 'flip_y': '(0)', 'n_features': '(20)', 'n_clusters_per_class': '(1)', 'n_samples': '(2000)', 'random_state': '(10)'})...
# A M file to specify the function that generates the doping profile # With different overlaps and different doping gradient on the drain and source side # By <NAME> October 2001/ Purdue from readinput import * import numpy as np import math def doping(Nx, Ny, Ntotal, junction_l, junction_r, Nd, N_sd, N_body): t...
[ "numpy.arange", "numpy.exp", "math.sqrt" ]
[((818, 884), 'numpy.arange', 'np.arange', (['(Nx * (t_topa + 1) / Nx)', '((Ntotal - Nx * t_bota) / Nx - 1)'], {}), '(Nx * (t_topa + 1) / Nx, (Ntotal - Nx * t_bota) / Nx - 1)\n', (827, 884), True, 'import numpy as np\n'), ((901, 925), 'numpy.arange', 'np.arange', (['(0)', 'junction_l'], {}), '(0, junction_l)\n', (910, ...
"""engine.SCons.Tool.f90 Tool-specific initialization for the generic Posix f90 Fortran compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004 The SCons Foundation...
[ "fortran.add_to_env" ]
[((5121, 5144), 'fortran.add_to_env', 'fortran.add_to_env', (['env'], {}), '(env)\n', (5139, 5144), False, 'import fortran\n')]
from pathlib import Path import pytest from aioquerysaur import load_from_file, load_from_str, load_here from aioquerysaur.exceptions import SQLLoadException from aioquerysaur.queries import QueriesContainer @pytest.fixture def sql_file(): return Path(__file__).parent / "sql/items.sql" @pytest.fixture def sql_...
[ "aioquerysaur.load_from_file", "aioquerysaur.load_from_str", "pytest.raises", "pathlib.Path", "aioquerysaur.load_here", "pathlib.Path.cwd" ]
[((703, 741), 'aioquerysaur.load_from_str', 'load_from_str', (['invalid_sql', '"""psycopg2"""'], {}), "(invalid_sql, 'psycopg2')\n", (716, 741), False, 'from aioquerysaur import load_from_file, load_from_str, load_here\n'), ((867, 897), 'aioquerysaur.load_from_str', 'load_from_str', (['sql', '"""psycopg2"""'], {}), "(s...
import numpy as np a = np.array([ [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]], [[[13, 14, 15], [16, 17, 18]], [[19, 20, 21], [22, 23, 24]]], [[[130, 140, 150], [160, 170, 180]], [[190, 200, 210], [220, 230, 240]]], [[[1300, 1400, 1500], [1600, ...
[ "numpy.array" ]
[((24, 324), 'numpy.array', 'np.array', (['[[[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]], [[[13, 14, 15], [16, \n 17, 18]], [[19, 20, 21], [22, 23, 24]]], [[[130, 140, 150], [160, 170, \n 180]], [[190, 200, 210], [220, 230, 240]]], [[[1300, 1400, 1500], [1600,\n 1700, 1800]], [[1900, 2000, 2100], [2200,...
#! /usr/bin/python3 import os import stat import sys import boto3 import requests if len(sys.argv) < 3: print('Usage: connect-instance {fleet id} {instance id}') sys.exit(1) fleet_id = sys.argv[1] instance_id = sys.argv[2] ext_ip = requests.get('https://checkip.amazonaws.com').text.strip() print("Opening s...
[ "requests.get", "sys.exit", "os.chmod", "boto3.client" ]
[((409, 433), 'boto3.client', 'boto3.client', (['"""gamelift"""'], {}), "('gamelift')\n", (421, 433), False, 'import boto3\n'), ((1316, 1368), 'os.chmod', 'os.chmod', (['pem_file_name', '(stat.S_IRUSR | stat.S_IWUSR)'], {}), '(pem_file_name, stat.S_IRUSR | stat.S_IWUSR)\n', (1324, 1368), False, 'import os\n'), ((173, 1...
from dagster import Field, String from dagster.core.definitions.system_storage import SystemStorageData, system_storage from .file_manager import LocalFileManager from .intermediate_store import FilesystemIntermediateStore from .intermediates_manager import ( InMemoryIntermediatesManager, IntermediateStoreInte...
[ "dagster.Field", "dagster.core.definitions.system_storage.system_storage" ]
[((622, 675), 'dagster.core.definitions.system_storage.system_storage', 'system_storage', ([], {'name': '"""in_memory"""', 'is_persistent': '(False)'}), "(name='in_memory', is_persistent=False)\n", (636, 675), False, 'from dagster.core.definitions.system_storage import SystemStorageData, system_storage\n'), ((852, 883)...
from __future__ import unicode_literals, print_function, absolute_import, division from collections import defaultdict from nameko.extensions import ProviderCollector, SharedExtension from nameko.utils import SpawningProxy __author__ = '<NAME>' __all__ = ['ScrapelEventsCollector'] class ScrapelEventsCollector(Prov...
[ "collections.defaultdict", "nameko.utils.SpawningProxy" ]
[((378, 394), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (389, 394), False, 'from collections import defaultdict\n'), ((1031, 1081), 'nameko.utils.SpawningProxy', 'SpawningProxy', (["self._providers_by_type['on_start']"], {}), "(self._providers_by_type['on_start'])\n", (1044, 1081), False, 'fro...
# -*- coding: utf-8 -*- # Licensed under the terms of the MIT License """ Main. """ # Third-party dependencies from waitress import serve # Local dependencies from system_mapper.config import CONFIG if __name__ == "__main__": if 'run_mapper' in CONFIG: run_mapper_config = CONFIG['run_mapper'] if ...
[ "system_mapper.visualization.dash.index.main_run", "system_mapper.provider_azure.azure_mapper.run_mapper", "waitress.serve" ]
[((435, 530), 'system_mapper.provider_azure.azure_mapper.run_mapper', 'run_mapper', ([], {'reset': "run_mapper_config['reset']", 'export_path': "run_mapper_config['export_path']"}), "(reset=run_mapper_config['reset'], export_path=run_mapper_config[\n 'export_path'])\n", (445, 530), False, 'from system_mapper.provide...
# Generated by Django 3.1.13 on 2021-10-19 15:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("websites", "0036_fix_sitemetadata_textid"), ] operations = [ migrations.AddField( model_name="website", name="gdriv...
[ "django.db.models.CharField" ]
[((349, 403), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(64)', 'null': '(True)'}), '(blank=True, max_length=64, null=True)\n', (365, 403), False, 'from django.db import migrations, models\n')]
# Copyright (c) 2013, <NAME> and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ def execute(filters=None): columns = get_columns(filters.item) data = get_data(filters.item) for rec in data: length = float(rec['length'])...
[ "frappe.db.get_list", "frappe.db.get_all", "frappe.get_doc", "frappe.scrub", "frappe._" ]
[((539, 637), 'frappe.db.get_all', 'frappe.db.get_all', (['"""Item"""'], {'fields': "['name']", 'filters': "{'variant_of': ['=', item], 'disabled': 0}"}), "('Item', fields=['name'], filters={'variant_of': ['=',\n item], 'disabled': 0})\n", (556, 637), False, 'import frappe\n'), ((1142, 1276), 'frappe.db.get_all', 'f...
import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdate from crystal_toolkit.components.core import ( PanelComponent, unicodeify_spacegroup, unicodeify_species, ) from crystal_toolkit.helpers.inputs...
[ "dash_html_components.Br", "dash_html_components.Div", "crystal_toolkit.helpers.utils.pretty_frac_format", "pymatgen.symmetry.analyzer.SpacegroupAnalyzer", "dash_html_components.Span", "crystal_toolkit.components.core.unicodeify_species" ]
[((2402, 2490), 'pymatgen.symmetry.analyzer.SpacegroupAnalyzer', 'SpacegroupAnalyzer', (['struct_or_mol'], {'symprec': 'symprec', 'angle_tolerance': 'angle_tolerance'}), '(struct_or_mol, symprec=symprec, angle_tolerance=\n angle_tolerance)\n', (2420, 2490), False, 'from pymatgen.symmetry.analyzer import SpacegroupAn...
import os def read_text_file_to_lines(file_path): file_obj = open(file_path, "r") lines = file_obj.readlines() file_obj.close() return lines def write_lines_to_path(lines, path): with open(path, 'w') as filehandle: for line in lines: filehandle.write(line) def all_files_in_...
[ "os.walk", "os.path.join" ]
[((386, 406), 'os.walk', 'os.walk', (['folder_path'], {}), '(folder_path)\n', (393, 406), False, 'import os\n'), ((634, 653), 'os.walk', 'os.walk', (['local_path'], {}), '(local_path)\n', (641, 653), False, 'import os\n'), ((459, 483), 'os.path.join', 'os.path.join', (['root', 'file'], {}), '(root, file)\n', (471, 483)...
import os from pyvirtualdisplay import Display from selenium import webdriver display = Display(visible=1, size=(1100, 500)) display.start() chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--disable-extensions') chrome_options.add_argument('--profile-directory=Default') chrome_options.add_arg...
[ "pyvirtualdisplay.Display", "os.path.realpath", "selenium.webdriver.ChromeOptions" ]
[((90, 126), 'pyvirtualdisplay.Display', 'Display', ([], {'visible': '(1)', 'size': '(1100, 500)'}), '(visible=1, size=(1100, 500))\n', (97, 126), False, 'from pyvirtualdisplay import Display\n'), ((161, 186), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (184, 186), False, 'from sele...
# 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, overload from .. import...
[ "pulumi.get", "pulumi.getter", "pulumi.log.warn", "pulumi.set" ]
[((4566, 4614), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""enableClientipPreservation"""'}), "(name='enableClientipPreservation')\n", (4579, 4614), False, 'import pulumi\n'), ((6181, 6215), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""endpointPort"""'}), "(name='endpointPort')\n", (6194, 6215), False, '...
# -*- coding: utf-8 -*- from numpy import abs, cos, exp, pi, prod, sin, sqrt, sum from .go_benchmark import Benchmark class Ackley01(Benchmark): r""" Ackley01 objective function. The Ackley01 [1]_ global optimization problem is a multimodal minimization problem defined as follows: .. math:: ...
[ "numpy.sum", "numpy.sin", "numpy.exp", "numpy.cos", "numpy.prod", "numpy.sqrt" ]
[((1239, 1250), 'numpy.sum', 'sum', (['(x ** 2)'], {}), '(x ** 2)\n', (1242, 1250), False, 'from numpy import abs, cos, exp, pi, prod, sin, sqrt, sum\n'), ((7820, 7826), 'numpy.sum', 'sum', (['x'], {}), '(x)\n', (7823, 7826), False, 'from numpy import abs, cos, exp, pi, prod, sin, sqrt, sum\n'), ((7840, 7847), 'numpy.p...
#!/usr/bin/python #coding:utf-8 # # PROGRAM/MODULE: firebird-base # FILE: test/test_hooks.py # DESCRIPTION: Unit tests for firebird.base.hooks # CREATED: 14.5.2020 # # Software distributed under the License is distributed AS IS, # WITHOUT WARRANTY OF ANY KIND, either express or implied. # ...
[ "unittest.main", "firebird.base.hooks.hook_manager.register_name", "firebird.base.hooks.hook_manager.remove_all_hooks", "typing.cast", "firebird.base.hooks.hook_manager.add_hook", "firebird.base.hooks.hook_manager.register_class", "firebird.base.hooks.hook_manager.hookables.keys", "firebird.base.hooks...
[((999, 1005), 'enum.auto', 'auto', ([], {}), '()\n', (1003, 1005), False, 'from enum import Enum, auto\n'), ((1019, 1025), 'enum.auto', 'auto', ([], {}), '()\n', (1023, 1025), False, 'from enum import Enum, auto\n'), ((24516, 24531), 'unittest.main', 'unittest.main', ([], {}), '()\n', (24529, 24531), False, 'import un...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ "tensorflow.compat.v1.stack", "tensorflow.compat.v1.ones", "tensorflow.compat.v1.pad", "tensorflow.compat.v1.cast", "tensorflow.compat.v1.floor", "tensorflow.compat.v1.ceil", "tensorflow.compat.v1.identity", "tensorflow.compat.v1.minimum", "tensorflow.compat.v1.debugging.assert_greater_equal", "te...
[((2382, 2398), 'tensorflow.compat.v1.stack', 'tf.stack', (['[y, x]'], {}), '([y, x])\n', (2390, 2398), True, 'import tensorflow.compat.v1 as tf\n'), ((3115, 3138), 'tensorflow.compat.v1.maximum', 'tf.maximum', (['start_yx', '(0)'], {}), '(start_yx, 0)\n', (3125, 3138), True, 'import tensorflow.compat.v1 as tf\n'), ((3...
# ul00.py from urllib.request import urlopen # url = 'https://www.naver.com/' url = 'https://www.daum.net/' html = urlopen(url) status = html.getheaders() for s in status: print(s) #print(html.read())
[ "urllib.request.urlopen" ]
[((117, 129), 'urllib.request.urlopen', 'urlopen', (['url'], {}), '(url)\n', (124, 129), False, 'from urllib.request import urlopen\n')]
import FWCore.ParameterSet.Config as cms pfJetFilter = cms.EDFilter("PFJetFilter", # Gen Jets InputTruthLabel = cms.InputTag('ak4GenJets'), # Reco Jets InputRecoLabel = cms.InputTag('iterativeCone5PFJets'), # Pseudo-rapidity cut for the reconstructed jet. minEta = cms.double(-1), maxEta = c...
[ "FWCore.ParameterSet.Config.bool", "FWCore.ParameterSet.Config.double", "FWCore.ParameterSet.Config.InputTag" ]
[((121, 147), 'FWCore.ParameterSet.Config.InputTag', 'cms.InputTag', (['"""ak4GenJets"""'], {}), "('ak4GenJets')\n", (133, 147), True, 'import FWCore.ParameterSet.Config as cms\n'), ((186, 222), 'FWCore.ParameterSet.Config.InputTag', 'cms.InputTag', (['"""iterativeCone5PFJets"""'], {}), "('iterativeCone5PFJets')\n", (1...
# -*- coding: utf-8 -*- """CLI related functions and classes for testing.""" import io import os import unittest from plaso.cli import tools class TestOutputWriter(tools.FileObjectOutputWriter): """Class that implements a test output writer.""" def __init__(self, encoding=u'utf-8'): """Initializes the outp...
[ "os.getcwd", "os.environ.get", "io.BytesIO", "os.path.join" ]
[((417, 429), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (427, 429), False, 'import io\n'), ((1143, 1154), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1152, 1154), False, 'import os\n'), ((1539, 1589), 'os.path.join', 'os.path.join', (['self._TEST_DATA_PATH', '*path_segments'], {}), '(self._TEST_DATA_PATH, *path_se...
# Copyright 2021 Universität Tübingen, DKFZ and EMBL for the German Human Genome-Phenome Archive (GHGA) # # 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...
[ "pyramid.view.view_config", "datetime.datetime.utcnow", "pyramid.httpexceptions.HTTPNoContent" ]
[((1400, 1501), 'pyramid.view.view_config', 'view_config', ([], {'route_name': '"""presubvalidation"""', 'renderer': '"""json"""', 'request_method': '"""POST"""', 'openapi': '(True)'}), "(route_name='presubvalidation', renderer='json', request_method=\n 'POST', openapi=True)\n", (1411, 1501), False, 'from pyramid.vi...
""" >>> from five.grok.ftests.form.autofields import * >>> id = getRootFolder()._setObject("manfred", Mammoth(id='manfred')) >>> from Testing.testbrowser import Browser >>> browser = Browser() >>> browser.handleErrors = False We can test the display form as default view: >>> browser.open("http://localh...
[ "zope.schema.TextLine", "zope.schema.Int", "five.grok.implements", "five.grok.context", "zope.schema.fieldproperty.FieldProperty" ]
[((1073, 1103), 'zope.schema.TextLine', 'schema.TextLine', ([], {'title': 'u"""Name"""'}), "(title=u'Name')\n", (1088, 1103), False, 'from zope import interface, schema\n'), ((1114, 1138), 'zope.schema.Int', 'schema.Int', ([], {'title': 'u"""Age"""'}), "(title=u'Age')\n", (1124, 1138), False, 'from zope import interfac...
import numpy as np import input_data from sklearn.utils import shuffle np.random.seed(9999) mnist = input_data.read_data_sets('../MNIST_data', one_hot=True) X_train = mnist.train.images t_train = mnist.train.labels X_test = mnist.test.images t_test = mnist.test.labels X_train, t_train = shuffle(X_train, t_train) ...
[ "input_data.read_data_sets", "numpy.save", "numpy.zeros_like", "numpy.random.seed", "numpy.random.randn", "numpy.max", "sklearn.utils.shuffle", "numpy.sqrt" ]
[((73, 93), 'numpy.random.seed', 'np.random.seed', (['(9999)'], {}), '(9999)\n', (87, 93), True, 'import numpy as np\n'), ((103, 159), 'input_data.read_data_sets', 'input_data.read_data_sets', (['"""../MNIST_data"""'], {'one_hot': '(True)'}), "('../MNIST_data', one_hot=True)\n", (128, 159), False, 'import input_data\n'...
#!/usr/bin/python3 import IndigoPy.Protein.pdb as pdb a=pdb.Protein('4hqp') insert=a[0]['J'][25:43] b=pdb.Protein('1WN9') c=b.couple('A',35,46,insert,name='1WN9Insert') c.exportpdb()
[ "IndigoPy.Protein.pdb.Protein" ]
[((57, 76), 'IndigoPy.Protein.pdb.Protein', 'pdb.Protein', (['"""4hqp"""'], {}), "('4hqp')\n", (68, 76), True, 'import IndigoPy.Protein.pdb as pdb\n'), ((103, 122), 'IndigoPy.Protein.pdb.Protein', 'pdb.Protein', (['"""1WN9"""'], {}), "('1WN9')\n", (114, 122), True, 'import IndigoPy.Protein.pdb as pdb\n')]
""" TencentBlueKing is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaSCommunity Edition) available. Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the...
[ "json.loads", "opsbot.on_command" ]
[((835, 907), 'opsbot.on_command', 'on_command', (['"""bk_sops_template_list"""'], {'aliases': "('标准运维', 'sops', 'bk_sops')"}), "('bk_sops_template_list', aliases=('标准运维', 'sops', 'bk_sops'))\n", (845, 907), False, 'from opsbot import on_command, CommandSession\n'), ((1272, 1309), 'opsbot.on_command', 'on_command', (['...
""" Processor to transform the bAbI Question Answering Dataset into a Jiant Probing Task. The Supporting Facts Probing Task takes as input a question and a sentence from the context. The task is to decide whether the sentence is part of the Supporting Facts for this question. Example question in bAbI format: 1 John m...
[ "task_processors_replicated.output_task_in_jiant_format", "argparse.ArgumentParser" ]
[((3530, 3555), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3553, 3555), False, 'import argparse\n'), ((3757, 3793), 'task_processors_replicated.output_task_in_jiant_format', 'output_task_in_jiant_format', (['samples'], {}), '(samples)\n', (3784, 3793), False, 'from task_processors_replicat...
# 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, software # ...
[ "socket.getaddrinfo", "sys.stdout.flush", "oslo_service.service.launch" ]
[((4442, 4460), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (4458, 4460), False, 'import sys\n'), ((4476, 4517), 'oslo_service.service.launch', 'service.launch', (['cfg.CONF', 'server', 'workers'], {}), '(cfg.CONF, server, workers)\n', (4490, 4517), False, 'from oslo_service import service\n'), ((2062, 21...
import abc from datetime import datetime from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import pandas import pyarrow from feast.data_source import DataSource from feast.feature_table import FeatureTable from feast.feature_view import FeatureView from feast.protos.feast.types.EntityKey_...
[ "feast.infra.gcp.Gcp", "feast.infra.local_sqlite.LocalSqlite" ]
[((4935, 5002), 'feast.infra.gcp.Gcp', 'Gcp', (['(config.online_store.datastore if config.online_store else None)'], {}), '(config.online_store.datastore if config.online_store else None)\n', (4938, 5002), False, 'from feast.infra.gcp import Gcp\n'), ((5213, 5251), 'feast.infra.local_sqlite.LocalSqlite', 'LocalSqlite',...
# 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, software # distributed under t...
[ "absl.testing.absltest.main", "google3.third_party.tink.tools.testing.supported_key_types.SUPPORTED_LANGUAGES.keys", "google3.third_party.tink.tools.testing.supported_key_types.test_cases", "google3.third_party.tink.tools.testing.supported_key_types.KEY_TEMPLATE_NAMES.keys", "google3.third_party.tink.tools....
[((1695, 1710), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (1708, 1710), False, 'from absl.testing import absltest\n'), ((1152, 1198), 'google3.third_party.tink.tools.testing.supported_key_types.KEY_TEMPLATE_NAMES.items', 'supported_key_types.KEY_TEMPLATE_NAMES.items', ([], {}), '()\n', (1196, 119...
# Copyright The PyTorch Lightning team. # # 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 i...
[ "distutils.version.LooseVersion", "importlib.util.find_spec", "numpy.finfo", "platform.system", "pytorch_lightning.utilities.xla_device_utils.XLADeviceUtils.tpu_device_exists" ]
[((2073, 2107), 'pytorch_lightning.utilities.xla_device_utils.XLADeviceUtils.tpu_device_exists', 'XLADeviceUtils.tpu_device_exists', ([], {}), '()\n', (2105, 2107), False, 'from pytorch_lightning.utilities.xla_device_utils import XLA_AVAILABLE, XLADeviceUtils\n'), ((2580, 2606), 'numpy.finfo', 'numpy.finfo', (['numpy.f...
""" base class for different translation service, like didi MT, google MT, etc. """ import threading import time from threading import Condition import gevent from utils import ThreadSafeDict from .interface import TranslationConfig, TranslationRequest, TranslationResponse # TODO(scotfang): Maybe make Translation...
[ "threading.Thread", "threading.Condition", "time.sleep", "utils.ThreadSafeDict", "time.time_ns" ]
[((823, 834), 'threading.Condition', 'Condition', ([], {}), '()\n', (832, 834), False, 'from threading import Condition\n'), ((893, 927), 'threading.Thread', 'threading.Thread', ([], {'target': 'self.loop'}), '(target=self.loop)\n', (909, 927), False, 'import threading\n'), ((2728, 2744), 'utils.ThreadSafeDict', 'Threa...
import numpy as np from math import sin, cos, pi from scipy.integrate import solve_ivp import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Circle from mpl_toolkits import mplot3d import matplotlib.animation as animation from IPython import get_ipython from cartpole import Cartpole def plot_car...
[ "matplotlib.pyplot.axes", "matplotlib.animation.FuncAnimation", "cartpole.Cartpole", "matplotlib.pyplot.figure", "numpy.sin", "numpy.linalg.solve", "matplotlib.patches.Rectangle", "matplotlib.pyplot.close", "scipy.integrate.solve_ivp", "matplotlib.pyplot.draw", "math.cos", "IPython.get_ipython...
[((508, 525), 'numpy.array', 'np.array', (['[-2, 2]'], {}), '([-2, 2])\n', (516, 525), True, 'import numpy as np\n'), ((538, 555), 'numpy.array', 'np.array', (['[-1, 3]'], {}), '([-1, 3])\n', (546, 555), True, 'import numpy as np\n'), ((643, 669), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(8, 6)'}), '...
import scrapy,re import w3lib.html from w3lib.html import remove_tags, remove_tags_with_content, replace_escape_chars from noticias.items import NoticiasItem class UolSpider(scrapy.Spider): name = 'Uol' allowed_domains = ['uol.com.br'] start_urls = ['https://noticias.uol.com.br/coronavirus/'] custom_s...
[ "noticias.items.NoticiasItem", "w3lib.html.replace_escape_chars", "w3lib.html.remove_tags", "re.sub" ]
[((2738, 2798), 'noticias.items.NoticiasItem', 'NoticiasItem', ([], {'link': 'link', 'title': 'title', 'data': 'data', 'corpo': 'corpo'}), '(link=link, title=title, data=data, corpo=corpo)\n', (2750, 2798), False, 'from noticias.items import NoticiasItem\n'), ((1559, 1579), 'w3lib.html.remove_tags', 'remove_tags', (['a...
from django.db import models from django.conf import settings class Message(models.Model): message = models.TextField() seen = models.BooleanField(default=False) date_created = models.DateTimeField(auto_now_add=True) sender = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="sent_messages", on...
[ "django.db.models.DateTimeField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.BooleanField" ]
[((107, 125), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (123, 125), False, 'from django.db import models\n'), ((137, 171), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (156, 171), False, 'from django.db import models\n'), ((191, 230...
import torch import numpy as np from torch.autograd import Variable class AdversarialLayer(torch.autograd.Function): def __init__(self, high): self.iter_num = 0 self.alpha = 10 self.low = 0.0 self.high = high self.max_iter = 10000.0 def forward(self, input): se...
[ "numpy.exp" ]
[((464, 515), 'numpy.exp', 'np.exp', (['(-self.alpha * self.iter_num / self.max_iter)'], {}), '(-self.alpha * self.iter_num / self.max_iter)\n', (470, 515), True, 'import numpy as np\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from bs4 import BeautifulSoup import scrape_common as sc main_url = "https://www.baselland.ch/politik-und-behorden/direktionen/volkswirtschafts-und-gesundheitsdirektion/amt-fur-gesundheit/medizinische-dienste/kantonsarztlicher-dienst/aktuelles/covid-19-faelle-kanton-base...
[ "bs4.BeautifulSoup", "scrape_common.timestamp", "scrape_common.find", "scrape_common.download" ]
[((346, 380), 'scrape_common.download', 'sc.download', (['main_url'], {'silent': '(True)'}), '(main_url, silent=True)\n', (357, 380), True, 'import scrape_common as sc\n'), ((859, 898), 'bs4.BeautifulSoup', 'BeautifulSoup', (['main_site', '"""html.parser"""'], {}), "(main_site, 'html.parser')\n", (872, 898), False, 'fr...
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super().__init__() self.fc1 = nn.SimulatedLinear(4,8, '../simulation_files/maeri_128mses_64_bw.cfg', 'dogsandcats_tile_fc.txt', sparsity_ratio=0.0) self.real_fc1 = nn.Linear(4,8) ...
[ "torch.randn", "torch.nn.SimulatedLinear", "torch.nn.Linear" ]
[((160, 282), 'torch.nn.SimulatedLinear', 'nn.SimulatedLinear', (['(4)', '(8)', '"""../simulation_files/maeri_128mses_64_bw.cfg"""', '"""dogsandcats_tile_fc.txt"""'], {'sparsity_ratio': '(0.0)'}), "(4, 8, '../simulation_files/maeri_128mses_64_bw.cfg',\n 'dogsandcats_tile_fc.txt', sparsity_ratio=0.0)\n", (178, 282), ...
""" test_latest_vulndb.py Copyright 2015 <NAME> This file is part of w3af, http://w3af.org/ . w3af 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 version 2 of the License. w3af is distributed in the hope that ...
[ "pkg_resources.parse_version", "yolk.yolklib.get_highest_installed", "yolk.pypi.CheeseShop", "yolk.yolklib.get_highest_version" ]
[((1396, 1413), 'yolk.pypi.CheeseShop', 'CheeseShop', (['(False)'], {}), '(False)\n', (1406, 1413), False, 'from yolk.pypi import CheeseShop\n'), ((1502, 1528), 'yolk.yolklib.get_highest_installed', 'get_highest_installed', (['pkg'], {}), '(pkg)\n', (1523, 1528), False, 'from yolk.yolklib import get_highest_version, ge...
"""Module containing chat processing related classes and functions. Contained classes and functions process all chat commands sent by user client. These commands are parsed to determine which type of chat command was issued and how they should be handled. """ import asyncio from typing import Tuple from core.processo...
[ "core.managers.manager_hub.manager_hub.user_manager.users.items", "core.managers.manager_hub.manager_hub.user_manager.is_logged_in", "core.managers.manager_hub.manager_hub.user_manager.get_user_by_account_name", "core.managers.logger_manager.logger_manager.chat.info", "asyncio.Queue", "core.templates.get_...
[((2043, 2058), 'asyncio.Queue', 'asyncio.Queue', ([], {}), '()\n', (2056, 2058), False, 'import asyncio\n'), ((4027, 4065), 'core.managers.manager_hub.manager_hub.user_manager.users.items', 'manager_hub.user_manager.users.items', ([], {}), '()\n', (4063, 4065), False, 'from core.managers.manager_hub import manager_hub...
from ipykernel.kernelapp import IPKernelApp from .kernel import PikeKernel IPKernelApp.launch_instance(kernel_class=PikeKernel)
[ "ipykernel.kernelapp.IPKernelApp.launch_instance" ]
[((75, 127), 'ipykernel.kernelapp.IPKernelApp.launch_instance', 'IPKernelApp.launch_instance', ([], {'kernel_class': 'PikeKernel'}), '(kernel_class=PikeKernel)\n', (102, 127), False, 'from ipykernel.kernelapp import IPKernelApp\n')]
from django.db import models from six import python_2_unicode_compatible from cms.models.pluginmodel import CMSPlugin from django.utils.text import Truncator from django.utils.html import strip_tags @python_2_unicode_compatible class RawHTMLPluginData(CMSPlugin): """ Model for Raw HTML Plugin body - ...
[ "django.db.models.CharField", "django.db.models.TextField", "django.utils.html.strip_tags" ]
[((427, 470), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(40)', 'default': '""""""'}), "(max_length=40, default='')\n", (443, 470), False, 'from django.db import models\n'), ((482, 506), 'django.db.models.TextField', 'models.TextField', (['"""HTML"""'], {}), "('HTML')\n", (498, 506), False, ...
# -*- coding: iso-8859-1 -*- # Copyright (c) 2004-2006 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Life cycle management""" import os import sys import persistent import zope.interface import zope.component import zope.event import zope.app.event import DateTime import Acquisition from AccessControl import ...
[ "Products.AlphaFlow.compatibility.factory.factory", "Products.AlphaFlow.interfaces.ILifeCycleController", "Globals.InitializeClass", "persistent.list.PersistentList", "DateTime.DateTime", "Products.AlphaFlow.exception.LifeCycleError", "AccessControl.getSecurityManager", "zExceptions.ExceptionFormatter...
[((819, 855), 'os.getenv', 'os.getenv', (['"""ALPHAFLOW_RAISE_ON_FAIL"""'], {}), "('ALPHAFLOW_RAISE_ON_FAIL')\n", (828, 855), False, 'import os\n'), ((4367, 4403), 'Globals.InitializeClass', 'InitializeClass', (['LifeCycleObjectBase'], {}), '(LifeCycleObjectBase)\n', (4382, 4403), False, 'from Globals import Initialize...
from django.apps import AppConfig class ComponentsConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "apps.components" def ready(self): from django.core.checks import register from apps.components.checks import example_check_main_engine register(examp...
[ "django.core.checks.register" ]
[((306, 367), 'django.core.checks.register', 'register', (['example_check_main_engine', '"""hurricane"""'], {'deploy': '(True)'}), "(example_check_main_engine, 'hurricane', deploy=True)\n", (314, 367), False, 'from django.core.checks import register\n')]
import os # sprawdznia i tworznie folderu lists directory = "lists" parent_dir = os.getcwd() + "\ChecklistDir" path = os.path.join(parent_dir, directory) if not os.path.exists(path): os.mkdir(path) # liczba checklist global n # global ChecklistNames ChecklistNames = [] # wybrana checklista global name # linia ...
[ "os.mkdir", "os.getcwd", "os.path.exists", "os.path.join", "os.listdir" ]
[((119, 154), 'os.path.join', 'os.path.join', (['parent_dir', 'directory'], {}), '(parent_dir, directory)\n', (131, 154), False, 'import os\n'), ((408, 441), 'os.listdir', 'os.listdir', (['"""ChecklistDir/lists/"""'], {}), "('ChecklistDir/lists/')\n", (418, 441), False, 'import os\n'), ((82, 93), 'os.getcwd', 'os.getcw...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ tests.test ~~~~~~~~~~ Provides scripttests pygogo CLI functionality. """ import sys sys.path.append('../chakula') import chakula # noqa from difflib import unified_diff # noqa from os import path as...
[ "sys.path.append", "io.StringIO", "difflib.unified_diff", "pygogo.Gogo", "os.path.basename", "timeit.default_timer", "os.path.dirname", "os.path.isfile", "os.path.join", "sys.exit", "scripttest.TestFileEnvironment" ]
[((165, 194), 'sys.path.append', 'sys.path.append', (['"""../chakula"""'], {}), "('../chakula')\n", (180, 194), False, 'import sys\n'), ((575, 594), 'os.path.dirname', 'p.dirname', (['__file__'], {}), '(__file__)\n', (584, 594), True, 'from os import path as p\n'), ((619, 637), 'os.path.dirname', 'p.dirname', (['CUR_DI...
## co-operate with MS Office 356 Traditional Chinese version import time import os # all path skulilScriptParentPath = os.path.dirname(getBundlePath()) xlsxPath = skulilScriptParentPath + '\\char.xlsx' saveDir = skulilScriptParentPath # Do not contains chinese characters in your saveDir !! excelPath = '"C:\\Progr...
[ "time.strftime" ]
[((384, 413), 'time.strftime', 'time.strftime', (['"""%Y%m%d%H%M%S"""'], {}), "('%Y%m%d%H%M%S')\n", (397, 413), False, 'import time\n')]
# -*- coding:utf-8 -*- import gzip import re import http.cookiejar import urllib.request import urllib.parse def get_handle(handle): def ungzip(data): return gzip.decompress(data) def get_csrf(data): cer = re.compile('data-csrf=\'(.*?)\'>&nbsp;</span>', re.S) return cer.findall(data)[0...
[ "gzip.decompress", "re.compile" ]
[((1300, 1340), 're.compile', 're.compile', (['"""%2Fprofile%2F(.*?)">"""', 're.S'], {}), '(\'%2Fprofile%2F(.*?)">\', re.S)\n', (1310, 1340), False, 'import re\n'), ((171, 192), 'gzip.decompress', 'gzip.decompress', (['data'], {}), '(data)\n', (186, 192), False, 'import gzip\n'), ((232, 283), 're.compile', 're.compile'...
# @Author : kane.zhu # @Time : 2021/7/9 18:17 # @Software: PyCharm import time,hmac, hashlib,base64,urllib.parse,requests,json class Webhook(object): """ 定义 钉钉webhook通知相关 """ def __init__(self,token,secret): """ :param token: 需要发送给谁,以token来区别 保证其唯一值 :param secret: 推送消息安全认证...
[ "requests.post", "hmac.new", "base64.b64encode", "time.time" ]
[((1154, 1211), 'requests.post', 'requests.post', ([], {'url': 'api_url', 'data': 'content', 'headers': 'headers'}), '(url=api_url, data=content, headers=headers)\n', (1167, 1211), False, 'import time, hmac, hashlib, base64, urllib.parse, requests, json\n'), ((894, 921), 'base64.b64encode', 'base64.b64encode', (['hmac_...
# https://leetcode.com/problems/first-unique-character-in-a-string from collections import Counter class Solution: def firstUniqChar(self, s): cnt = Counter(s) for i, char in enumerate(s): if cnt[char] == 1: return i return -1
[ "collections.Counter" ]
[((164, 174), 'collections.Counter', 'Counter', (['s'], {}), '(s)\n', (171, 174), False, 'from collections import Counter\n')]
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
[ "warnings.warn" ]
[((3623, 3817), 'warnings.warn', 'warnings.warn', (['"""Importing from the \'elasticsearch.client\' module is deprecated. Instead use \'elasticsearch\' module for importing the client."""'], {'category': 'DeprecationWarning', 'stacklevel': '(2)'}), '(\n "Importing from the \'elasticsearch.client\' module is deprecat...
#!/bin/env mayapy # -- coding: utf-8 -- __author__ = "<NAME>" __email__ = "<EMAIL>" from os import error import maya.cmds as cmds title = u"Vérification du décalage entre les chaînes IK et FK" image = "joinSym" def test(): errors = [] passed = True for ik in cmds.ls(type="joint"): if...
[ "maya.cmds.objExists", "maya.cmds.xform", "maya.cmds.ls" ]
[((287, 308), 'maya.cmds.ls', 'cmds.ls', ([], {'type': '"""joint"""'}), "(type='joint')\n", (294, 308), True, 'import maya.cmds as cmds\n'), ((482, 513), 'maya.cmds.xform', 'cmds.xform', (['sk'], {'q': '(1)', 'ws': '(1)', 'rp': '(1)'}), '(sk, q=1, ws=1, rp=1)\n', (492, 513), True, 'import maya.cmds as cmds\n'), ((532, ...
############################## # Библиотека работы с api вк # ############################## import vk from Logger import addLog import time class VkParser: def __init__(self, token): # Получение токена self.token = token # Флаг для проверки валидности токена self.valid_token = F...
[ "Logger.addLog", "vk.API", "vk.Session", "time.sleep" ]
[((1806, 1848), 'Logger.addLog', 'addLog', (["('|Parser|: ' + 'Token is invalid.')"], {}), "('|Parser|: ' + 'Token is invalid.')\n", (1812, 1848), False, 'from Logger import addLog\n'), ((1003, 1025), 'vk.Session', 'vk.Session', (['self.token'], {}), '(self.token)\n', (1013, 1025), False, 'import vk\n'), ((1052, 1067),...
import gym import policybazaar import pytest import torch from policybazaar.config import ENV_IDS, CHILD_PARENT_ENVS @pytest.mark.parametrize('env_name,pre_trained', [(env_name, pre_trained) for env_name in list(ENV_IDS.keys()) + list(CHILD_PARENT_ENVS.keys()) ...
[ "policybazaar.get_policy", "policybazaar.config.CHILD_PARENT_ENVS.keys", "torch.tensor", "gym.make", "policybazaar.config.ENV_IDS.keys", "policybazaar.get_dataset" ]
[((588, 634), 'policybazaar.get_policy', 'policybazaar.get_policy', (['env_name', 'pre_trained'], {}), '(env_name, pre_trained)\n', (611, 634), False, 'import policybazaar\n'), ((646, 664), 'gym.make', 'gym.make', (['env_name'], {}), '(env_name)\n', (654, 664), False, 'import gym\n'), ((1274, 1321), 'policybazaar.get_d...
#!/usr/bin/env python3 -B import unittest from cromulent import vocab from tests import TestKnoedlerPipelineOutput, classified_identifiers vocab.add_attribute_assignment_check() class PIRModelingTest_AR42(TestKnoedlerPipelineOutput): ''' AR-42: Use PLOC Data to Populate Current Location Field ''' de...
[ "unittest.main", "cromulent.vocab.add_attribute_assignment_check" ]
[((142, 180), 'cromulent.vocab.add_attribute_assignment_check', 'vocab.add_attribute_assignment_check', ([], {}), '()\n', (178, 180), False, 'from cromulent import vocab\n'), ((933, 948), 'unittest.main', 'unittest.main', ([], {}), '()\n', (946, 948), False, 'import unittest\n')]
import unittest from flask_script import Manager, Command import db_default from app import create_app, db from app.database import * import app.backup as b app = create_app("development") manager = Manager(app) @manager.shell def shell(): return globals() @manager.command def reset(yes=False): """ R...
[ "app.backup.backup", "unittest.TextTestRunner", "flask_script.Manager", "app.db.drop_all", "app.create_app", "app.db.session.commit", "unittest.TestLoader", "app.db.create_all", "app.db.session.add_all" ]
[((166, 191), 'app.create_app', 'create_app', (['"""development"""'], {}), "('development')\n", (176, 191), False, 'from app import create_app, db\n'), ((202, 214), 'flask_script.Manager', 'Manager', (['app'], {}), '(app)\n', (209, 214), False, 'from flask_script import Manager, Command\n'), ((631, 644), 'app.db.drop_a...
import copy def heap_sort(sorting_list): step = 0 ls = copy.deepcopy(sorting_list) def sift_down(start, end, step): root = start while True: child = 2 * root + 1 if child > end: break if child + 1 <= end and ls[child] < ls[child+1]: ...
[ "copy.deepcopy" ]
[((64, 91), 'copy.deepcopy', 'copy.deepcopy', (['sorting_list'], {}), '(sorting_list)\n', (77, 91), False, 'import copy\n')]
from django import forms from rest_framework.authtoken.models import Token from shealth.models import User, Doctor, Patient from django.db import transaction class DoctorCreationForm(forms.ModelForm): speciality = forms.CharField(max_length=100) class Meta: model = User fields = ("email", "ph...
[ "rest_framework.authtoken.models.Token.objects.create", "shealth.models.Patient", "django.forms.IntegerField", "django.forms.CharField", "shealth.models.Doctor" ]
[((220, 251), 'django.forms.CharField', 'forms.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (235, 251), False, 'from django import forms\n'), ((794, 814), 'django.forms.IntegerField', 'forms.IntegerField', ([], {}), '()\n', (812, 814), False, 'from django import forms\n'), ((825, 854), 'django.forms...
from diagrams import Diagram, Cluster from diagrams.aws.compute import EC2 from diagrams.aws.database import RDS from diagrams.aws.network import ELB from diagrams.custom import Custom from diagrams.onprem.database import MongoDB from diagrams.onprem.analytics import Spark from diagrams.onprem.analytics import Hadoop #...
[ "diagrams.onprem.analytics.Spark", "diagrams.custom.Custom", "diagrams.Diagram", "diagrams.onprem.database.MongoDB", "diagrams.onprem.analytics.Hadoop" ]
[((416, 502), 'diagrams.Diagram', 'Diagram', (['"""Moody Analytics API"""'], {'show': '(False)', 'filename': '"""mingrammer"""', 'direction': '"""LR"""'}), "('Moody Analytics API', show=False, filename='mingrammer', direction\n ='LR')\n", (423, 502), False, 'from diagrams import Diagram, Cluster\n'), ((555, 591), 'd...
import os import unittest import pytest import re import json import string import random import sys # Append root for proper imports sys.path.append('') # # from sense.client.logging_api import LoggingApi from sense.common import loadJSON # class TestLoggingApi(unittest.TestCase): def setUp(self) -> None: ...
[ "sys.path.append", "sense.client.logging_api.LoggingApi", "unittest.main", "random.choice" ]
[((135, 154), 'sys.path.append', 'sys.path.append', (['""""""'], {}), "('')\n", (150, 154), False, 'import sys\n'), ((3012, 3027), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3025, 3027), False, 'import unittest\n'), ((338, 350), 'sense.client.logging_api.LoggingApi', 'LoggingApi', ([], {}), '()\n', (348, 350)...
# source https://stackoverflow.com/a/30660779/5476399 import os def downsampleWav(src, dst, inrate=48000, outrate=16000, inchannels=1, outchannels=1): if not os.path.exists(src): print('Source not found!') return False if not os.path.exists(os.path.dirname(dst)): os.makedirs(os.path.d...
[ "os.path.dirname", "os.path.exists" ]
[((164, 183), 'os.path.exists', 'os.path.exists', (['src'], {}), '(src)\n', (178, 183), False, 'import os\n'), ((268, 288), 'os.path.dirname', 'os.path.dirname', (['dst'], {}), '(dst)\n', (283, 288), False, 'import os\n'), ((311, 331), 'os.path.dirname', 'os.path.dirname', (['dst'], {}), '(dst)\n', (326, 331), False, '...
from typing import Union from lgp.abcd.action import Action import numpy as np import torch IDX_TO_ACTION_TYPE = { 0: "RotateLeft", 1: "RotateRight", 2: "MoveAhead", 3: "LookUp", 4: "LookDown", 5: "OpenObject", 6: "CloseObject", 7: "PickupObject", 8: "PutObject", 9: "ToggleObje...
[ "torch.zeros" ]
[((1443, 1466), 'torch.zeros', 'torch.zeros', (['(300, 300)'], {}), '((300, 300))\n', (1454, 1466), False, 'import torch\n'), ((3481, 3507), 'torch.zeros', 'torch.zeros', (['(1, 300, 300)'], {}), '((1, 300, 300))\n', (3492, 3507), False, 'import torch\n')]
""" Menu template tags, the following menu tags are available: * ``{% admin_tools_render_menu %}`` * ``{% admin_tools_render_menu_item %}`` * ``{% admin_tools_render_menu_css %}`` To load the menu tags in your templates: ``{% load admin_tools_menu_tags %}``. """ from django import template try: from django.ur...
[ "admin_tools.menu.models.Bookmark.objects.filter", "django.template.Library", "admin_tools.utils.get_admin_site_name", "admin_tools.menu.utils.get_admin_menu" ]
[((600, 618), 'django.template.Library', 'template.Library', ([], {}), '()\n', (616, 618), False, 'from django import template\n'), ((1003, 1026), 'admin_tools.menu.utils.get_admin_menu', 'get_admin_menu', (['context'], {}), '(context)\n', (1017, 1026), False, 'from admin_tools.menu.utils import get_admin_menu\n'), ((2...
from django import forms from .models import Jugador from .models import Equipo from .models import Estadio from .models import Posicion class FormJugador(forms.ModelForm): equipo = forms.CharField(widget=forms.TextInput(attrs={"class": "form form-control"})) numero = forms.CharField(widget=forms.TextInput(attrs={"...
[ "django.forms.TextInput" ]
[((208, 261), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form form-control'}"}), "(attrs={'class': 'form form-control'})\n", (223, 261), False, 'from django import forms\n'), ((296, 349), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form form-control'}"}), "(attrs...
import inspect import re import warnings import numpy as np from collections import defaultdict from seqofeval.utils.validation import check_array, check_X_y from . import __version__ _DEFAULT_TAGS = { 'non_deterministic': False, 'requires_positive_X': False, 'requires_positive_y': False, 'X_types':...
[ "seqofeval.utils.validation.check_X_y", "re.match", "collections.defaultdict", "seqofeval.utils.validation.check_array", "inspect.getmro", "inspect.signature", "warnings.warn" ]
[((2565, 2588), 'inspect.signature', 'inspect.signature', (['init'], {}), '(init)\n', (2582, 2588), False, 'import inspect\n'), ((5308, 5325), 'collections.defaultdict', 'defaultdict', (['dict'], {}), '(dict)\n', (5319, 5325), False, 'from collections import defaultdict\n'), ((9397, 9427), 'inspect.getmro', 'inspect.ge...
import gym import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from gym import Env from scipy.spatial import distance from typing import Optional, Tuple, Any from causal_rl.environments import CausalEnv class Mujoco(CausalEnv): """A simulation of balls bouncing with gravity and elastic c...
[ "numpy.zeros", "gym.make" ]
[((880, 903), 'gym.make', 'gym.make', (['self.env_name'], {}), '(self.env_name)\n', (888, 903), False, 'import gym\n'), ((1304, 1350), 'numpy.zeros', 'np.zeros', (['(epochs, self.num_obj, self.obj_dim)'], {}), '((epochs, self.num_obj, self.obj_dim))\n', (1312, 1350), True, 'import numpy as np\n'), ((1369, 1390), 'numpy...
# coding: utf-8 """ qTest Manager API Version 8.6 - 9.1 qTest Manager API Version 8.6 - 9.1 OpenAPI spec version: 8.6 - 9.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class AutomationTe...
[ "six.iteritems" ]
[((6470, 6499), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (6479, 6499), False, 'from six import iteritems\n')]
import pytest from tests.conftest import junos_config_test access_switch_tests = [ ("access/access-interfaces", "roles/access/templates/access-interfaces.j2"), ("access/vlans", "roles/access/templates/vlans.j2"), ] edge_router_tests = [ ("edge/transit", "roles/edge/templates/transit.j2") ] @pytest.mark....
[ "pytest.mark.parametrize", "tests.conftest.junos_config_test" ]
[((308, 380), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""test_name, template_path"""', 'access_switch_tests'], {}), "('test_name, template_path', access_switch_tests)\n", (331, 380), False, 'import pytest\n'), ((556, 626), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""test_name, template_...
from functools import reduce from divisorGenerator import divisorGenerator def find_triangles(num=10): tri = [] for i in range(2, 1000000000): next_tri = reduce(lambda x,y: x+y, list(range(1, i))) tri.append(next_tri) if len(tri) == num: break return tri for x in find...
[ "divisorGenerator.divisorGenerator" ]
[((436, 455), 'divisorGenerator.divisorGenerator', 'divisorGenerator', (['x'], {}), '(x)\n', (452, 455), False, 'from divisorGenerator import divisorGenerator\n')]
import numpy as np import PIL.Image as image from sklearn import preprocessing # 加载图像,并对数据进行规范化 def load_data(file_path): # 读文件 f = open(file_path, 'rb') data = [] # 得到图像的像素值 img = image.open(f) # 得到图像尺寸 width, height = img.size for x in range(width): for y in range(height): ...
[ "sklearn.preprocessing.MinMaxScaler", "numpy.mat", "PIL.Image.open" ]
[((203, 216), 'PIL.Image.open', 'image.open', (['f'], {}), '(f)\n', (213, 216), True, 'import PIL.Image as image\n'), ((474, 502), 'sklearn.preprocessing.MinMaxScaler', 'preprocessing.MinMaxScaler', ([], {}), '()\n', (500, 502), False, 'from sklearn import preprocessing\n'), ((548, 560), 'numpy.mat', 'np.mat', (['data'...
import base_object import update_object_pb2 class UpdateObject(base_object.BaseObject): data_members = ["parents", "data"] def __init__(self, parents, data): self.parents = parents self.data = data self._sha1 = None @staticmethod def from_object(obj): """Convert an ob...
[ "update_object_pb2.UpdateObject" ]
[((383, 415), 'update_object_pb2.UpdateObject', 'update_object_pb2.UpdateObject', ([], {}), '()\n', (413, 415), False, 'import update_object_pb2\n'), ((665, 697), 'update_object_pb2.UpdateObject', 'update_object_pb2.UpdateObject', ([], {}), '()\n', (695, 697), False, 'import update_object_pb2\n')]
def init_db(engine): from sqlalchemy import (Table, Column, Integer, String, MetaData, TEXT, Float, ForeignKey, text as sql, Index, Boolean, DateTime) from sqlalchemy.exc import IntegrityError, ProgrammingError if 'mysql' in engine.name: from ...
[ "sqlalchemy.MetaData", "functools.partial", "sqlalchemy.Index", "sqlalchemy.DateTime", "sqlalchemy.Float", "sqlalchemy.ForeignKey", "sqlalchemy.text", "sqlalchemy.Column", "sqlalchemy.String" ]
[((456, 466), 'sqlalchemy.MetaData', 'MetaData', ([], {}), '()\n', (464, 466), False, 'from sqlalchemy import Table, Column, Integer, String, MetaData, TEXT, Float, ForeignKey, text as sql, Index, Boolean, DateTime\n'), ((419, 443), 'functools.partial', 'partial', (['DATETIME'], {'fsp': '(6)'}), '(DATETIME, fsp=6)\n', ...
import re from sklearn.pipeline import make_pipeline from sklearn.preprocessing import FunctionTransformer from sklearn.feature_extraction import DictVectorizer import lightgbm as lgb def convert(name: str) -> str: """ Convert upper and lower camel case to snake case :param name: String to convert :re...
[ "sklearn.feature_extraction.DictVectorizer", "sklearn.preprocessing.FunctionTransformer", "re.sub" ]
[((360, 403), 're.sub', 're.sub', (['"""(.)([A-Z][a-z]+)"""', '"""\\\\1_\\\\2"""', 'name'], {}), "('(.)([A-Z][a-z]+)', '\\\\1_\\\\2', name)\n", (366, 403), False, 'import re\n'), ((585, 632), 'sklearn.preprocessing.FunctionTransformer', 'FunctionTransformer', (['to_records'], {'validate': '(False)'}), '(to_records, val...
# -*- coding: utf-8 -*- """ curl_proxies_checker.tests ~~~~~~~~~~~~~~~~~~~~~~~~~~ Unittests for curl_proxies_checker classes :copyright: (c) 2011 by <NAME> (<EMAIL>). :license: BSD, see LICENSE for more details. """ import time import pycurl import unittest from cStringIO import StringIO import os.path from curl_pr...
[ "unittest.main", "unittest.TestSuite", "curl_proxies_checker.HTTPBinTester", "curl_proxies_checker.BaseTester", "unittest.makeSuite", "curl_proxies_checker.HWRTTNTester", "cStringIO.StringIO", "pycurl.Curl", "curl_proxies_checker.get_checker" ]
[((5016, 5036), 'unittest.TestSuite', 'unittest.TestSuite', ([], {}), '()\n', (5034, 5036), False, 'import unittest\n'), ((5198, 5232), 'unittest.main', 'unittest.main', ([], {'defaultTest': '"""suite"""'}), "(defaultTest='suite')\n", (5211, 5232), False, 'import unittest\n'), ((1091, 1121), 'curl_proxies_checker.BaseT...