code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import FWCore.ParameterSet.Config as cms process = cms.Process("PROD1") process.source = cms.Source("IntSource") process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(3) ) process.out = cms.OutputModule("PoolOutputModule", fileName = cms.untracked.string('testEdmProvDump.root'), outputComma...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.untracked.string", "FWCore.ParameterSet.Config.EndPath", "FWCore.ParameterSet.Config.InputTag", "FWCore.ParameterSet.Config.Task", "FWCore.ParameterSet.Config.Source", "FWCore.ParameterSet.Config.int32", "FWCore.ParameterSet.Config.untra...
[((52, 72), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""PROD1"""'], {}), "('PROD1')\n", (63, 72), True, 'import FWCore.ParameterSet.Config as cms\n'), ((91, 114), 'FWCore.ParameterSet.Config.Source', 'cms.Source', (['"""IntSource"""'], {}), "('IntSource')\n", (101, 114), True, 'import FWCore.ParameterSet...
""" Specify times for synchronic image download. Query available images and download best matches. """ import os import numpy as np import pandas as pd from astropy.time import Time import astropy.units as u from chmap.settings.app import App import chmap.database.db_classes as DBClass from chmap.database.db_funs imp...
[ "chmap.database.db_funs.init_db_conn_old", "os.path.join", "astropy.time.Time", "pandas.DataFrame", "chmap.data.download.image_download.synchronic_euv_download", "numpy.arange" ]
[((467, 511), 'astropy.time.Time', 'Time', (['"""2021-01-02T00:00:00.000"""'], {'scale': '"""utc"""'}), "('2021-01-02T00:00:00.000', scale='utc')\n", (471, 511), False, 'from astropy.time import Time\n'), ((525, 569), 'astropy.time.Time', 'Time', (['"""2021-01-03T00:00:00.000"""'], {'scale': '"""utc"""'}), "('2021-01-0...
def split_version(vs): import re for v in re.findall(r"[\w\d]+", vs): try: v = int(v) except ValueError: pass yield v __version__ = "0.1.9-dev" __version_info__ = tuple(split_version(__version__))
[ "re.findall" ]
[((50, 77), 're.findall', 're.findall', (['"""[\\\\w\\\\d]+"""', 'vs'], {}), "('[\\\\w\\\\d]+', vs)\n", (60, 77), False, 'import re\n')]
import sys import pandas as pd if len(sys.argv) == 1: print('Set arg n!!') else: n = int(sys.argv[1]) df = pd.read_csv('popular-names.txt', sep='\t', header=None) print(df.head(n))
[ "pandas.read_csv" ]
[((120, 175), 'pandas.read_csv', 'pd.read_csv', (['"""popular-names.txt"""'], {'sep': '"""\t"""', 'header': 'None'}), "('popular-names.txt', sep='\\t', header=None)\n", (131, 175), True, 'import pandas as pd\n')]
# -*- coding: utf-8 -*- from github import Github, StatsCommitActivity from multiprocessing import Pool, cpu_count, Lock import pandas as pd # or using an access token GIT = Github("xxxxxxxxxxxxxxxxxxxxxxx ") # LOCK = threading.Lock() # 全局资源锁 lock = Lock() PD_FORMAT = { "created_at" : [], "login" : [], ...
[ "multiprocessing.Lock", "pandas.DataFrame", "github.Github" ]
[((175, 209), 'github.Github', 'Github', (['"""xxxxxxxxxxxxxxxxxxxxxxx """'], {}), "('xxxxxxxxxxxxxxxxxxxxxxx ')\n", (181, 209), False, 'from github import Github, StatsCommitActivity\n'), ((256, 262), 'multiprocessing.Lock', 'Lock', ([], {}), '()\n', (260, 262), False, 'from multiprocessing import Pool, cpu_count, Loc...
#!/usr/bin/python # -*- coding: utf-8 -*- from flask_httpauth import HTTPTokenAuth from itsdangerous import TimedJSONWebSignatureSerializer as JsonWebToken from config.config import JWT_SECRET, JWT_REF_SECRET # JWT creation. Expires in one hour jwt = JsonWebToken(JWT_SECRET, expires_in=3600) # Refresh token creatio...
[ "flask_httpauth.HTTPTokenAuth", "itsdangerous.TimedJSONWebSignatureSerializer" ]
[((254, 295), 'itsdangerous.TimedJSONWebSignatureSerializer', 'JsonWebToken', (['JWT_SECRET'], {'expires_in': '(3600)'}), '(JWT_SECRET, expires_in=3600)\n', (266, 295), True, 'from itsdangerous import TimedJSONWebSignatureSerializer as JsonWebToken\n'), ((362, 408), 'itsdangerous.TimedJSONWebSignatureSerializer', 'Json...
import pytest from eth_utils import ValidationError from hypothesis import ( given, settings, strategies as st, ) from trinity._utils.tree_root import Tree, RootTracker @given(st.permutations(range(10))) def test_tree_linking(add_order): # node and parent id nodes = ( ('A0', '_'), ...
[ "hypothesis.strategies.sampled_from", "hypothesis.strategies.integers", "trinity._utils.tree_root.Tree", "pytest.raises", "hypothesis.settings", "trinity._utils.tree_root.RootTracker", "hypothesis.strategies.permutations" ]
[((4691, 4717), 'hypothesis.settings', 'settings', ([], {'max_examples': '(500)'}), '(max_examples=500)\n', (4699, 4717), False, 'from hypothesis import given, settings, strategies as st\n'), ((529, 535), 'trinity._utils.tree_root.Tree', 'Tree', ([], {}), '()\n', (533, 535), False, 'from trinity._utils.tree_root import...
#!/usr/bin/env python """ Calculates fractional amplitude of low-frequency fluctuations (fALFF) Usage: falff_nifti.py <func.nii.gz> <output.nii.gz> [options] Arguments: <func.nii.gz> The functional 4D nifti files <mask.nii.gz> A brainmask for the functional file <output.nii.gz> Output filename O...
[ "nibabel.load", "numpy.where", "numpy.arange", "numpy.fft.fftfreq", "numpy.std", "numpy.sum", "numpy.zeros", "scipy.fftpack.fft", "nibabel.Nifti1Image", "docopt.docopt", "numpy.divide" ]
[((868, 883), 'docopt.docopt', 'docopt', (['__doc__'], {}), '(__doc__)\n', (874, 883), False, 'from docopt import docopt\n'), ((2456, 2474), 'nibabel.load', 'nib.load', (['funcfile'], {}), '(funcfile)\n', (2464, 2474), True, 'import nibabel as nib\n'), ((2977, 2996), 'numpy.where', 'np.where', (['(mask != 0)'], {}), '(...
import math import numpy as np from random import randint, seed from copy import deepcopy from typing import List from EvaluationUtils.vision_metrics import CVMetrics from Animator.consolidation_api import CharacterBoundingBox from Animator.utils import serialize_pickle, deserialize_pickle seed(1234567) class Tripl...
[ "EvaluationUtils.vision_metrics.CVMetrics.bb_intersection_over_union", "numpy.random.choice", "random.seed", "copy.deepcopy", "Animator.utils.serialize_pickle", "Animator.utils.deserialize_pickle" ]
[((293, 306), 'random.seed', 'seed', (['(1234567)'], {}), '(1234567)\n', (297, 306), False, 'from random import randint, seed\n'), ((1546, 1581), 'Animator.utils.serialize_pickle', 'serialize_pickle', (['self', 'output_path'], {}), '(self, output_path)\n', (1562, 1581), False, 'from Animator.utils import serialize_pick...
import warnings warnings.warn("pandas.types.common is deprecated and will be " "removed in a future version, import " "from pandas.api.types", DeprecationWarning, stacklevel=3) from pandas.core.dtypes.common import * # noqa
[ "warnings.warn" ]
[((17, 181), 'warnings.warn', 'warnings.warn', (['"""pandas.types.common is deprecated and will be removed in a future version, import from pandas.api.types"""', 'DeprecationWarning'], {'stacklevel': '(3)'}), "(\n 'pandas.types.common is deprecated and will be removed in a future version, import from pandas.api.type...
from carla_utils import carla DestroyActor = carla.command.DestroyActor import weakref from typing import Dict from ..system import debug from ..basic import flatten_list from .sensor_callback import RawCallback, DefaultCallback from .sensor_create import create_sensor, create_sensor_command def createSensorListMas...
[ "weakref.ref" ]
[((4928, 4945), 'weakref.ref', 'weakref.ref', (['self'], {}), '(self)\n', (4939, 4945), False, 'import weakref\n')]
import argparse import csv import os import signal import shutil import sys import zlib VERSION = "1.0.4" class StatusBar: def __init__(self, title): terminal_width = shutil.get_terminal_size()[0] self.bar_len = min(100, terminal_width - (7 + len(title))) self.progress = 0 self.bar...
[ "os.path.getsize", "sys.exit", "argparse.ArgumentParser", "csv.writer", "os.path.join", "os.scandir", "shutil.get_terminal_size", "os.path.isdir", "zlib.crc32", "os.path.abspath", "os.path.relpath", "sys.stdout.flush", "os.walk", "sys.stdout.write" ]
[((1803, 1879), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'readme', 'usage': '"""%(prog)s [options] path"""'}), "(description=readme, usage='%(prog)s [options] path')\n", (1826, 1879), False, 'import argparse\n'), ((2676, 2700), 'os.path.isdir', 'os.path.isdir', (['args.path'], {}), '(a...
# Here, we are using index to traverse the array, But we are doing it in the reverse order # Returns: an int denoting the maximum profit, that can be achieved from Utils.Array import input_array def max_profit_in_01knapsack(weight, value, capacity, n) -> int: # Base Case --> Initialization step """ for i ...
[ "Utils.Array.input_array" ]
[((1319, 1332), 'Utils.Array.input_array', 'input_array', ([], {}), '()\n', (1330, 1332), False, 'from Utils.Array import input_array\n'), ((1343, 1356), 'Utils.Array.input_array', 'input_array', ([], {}), '()\n', (1354, 1356), False, 'from Utils.Array import input_array\n')]
import sys import dplython from dplython import Verb, DplyFrame, X, select, mutate, head from readpy import * from tidypython import gather class spread(Verb): __name__ = "spread" def __call__(self, df): if len(self.args) >= 2: if not isinstance(self.args[0], dplython.later.Later) or \...
[ "tidypython.gather", "dplython.head" ]
[((1190, 1294), 'tidypython.gather', 'gather', (['X.info', 'X.val', 'X.mpg', 'X.cyl', 'X.disp', 'X.hp', 'X.drat', 'X.wt', 'X.qsec', 'X.vs', 'X.am', 'X.gear', 'X.carb'], {}), '(X.info, X.val, X.mpg, X.cyl, X.disp, X.hp, X.drat, X.wt, X.qsec, X.\n vs, X.am, X.gear, X.carb)\n', (1196, 1294), False, 'from tidypython imp...
import discord from discord.commands import slash_command, Option from discord.ext import commands, pages import logging import json # Logging logging.basicConfig( filename="./logs/discordlogs.log", filemode="w", format="%(name)s - %(levelname)s - %(message)s", ) logger = logging.getLogger() logger.setLev...
[ "logging.basicConfig", "logging.getLogger", "discord.commands.slash_command", "json.load", "discord.Embed" ]
[((145, 267), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""./logs/discordlogs.log"""', 'filemode': '"""w"""', 'format': '"""%(name)s - %(levelname)s - %(message)s"""'}), "(filename='./logs/discordlogs.log', filemode='w', format\n ='%(name)s - %(levelname)s - %(message)s')\n", (164, 267), False...
from typing import List, Tuple import numpy as np from pyrep.objects.shape import Shape from pyrep.objects.dummy import Dummy from pyrep.objects.proximity_sensor import ProximitySensor from rlbench.backend.task import Task from rlbench.backend.conditions import DetectedCondition, NothingGrasped from rlbench.backend.spa...
[ "rlbench.backend.spawn_boundary.SpawnBoundary", "pyrep.objects.dummy.Dummy", "rlbench.backend.conditions.NothingGrasped", "rlbench.backend.conditions.DetectedCondition", "pyrep.objects.shape.Shape" ]
[((525, 546), 'pyrep.objects.shape.Shape', 'Shape', (['"""dollar_stack"""'], {}), "('dollar_stack')\n", (530, 546), False, 'from pyrep.objects.shape import Shape\n'), ((577, 607), 'pyrep.objects.shape.Shape', 'Shape', (['"""dollar_stack_boundary"""'], {}), "('dollar_stack_boundary')\n", (582, 607), False, 'from pyrep.o...
''' Config class that loads yaml config files At import, it tries to load $HOME/.mopro.yaml and $(pwd)/mopro.yaml It also checks for the following environment variables: * CORSIKA_PASSWORD * CORSIKA_VERSION * FLUKA_ID * FLUKA_PASSWORD ''' import os from ruamel.yaml import YAML from collections import namedtuple yam...
[ "collections.namedtuple", "os.path.join", "os.environ.get", "ruamel.yaml.YAML", "os.getcwd", "os.path.isfile", "os.path.abspath" ]
[((324, 340), 'ruamel.yaml.YAML', 'YAML', ([], {'typ': '"""safe"""'}), "(typ='safe')\n", (328, 340), False, 'from ruamel.yaml import YAML\n'), ((494, 584), 'collections.namedtuple', 'namedtuple', (['"""DatabaseConfig"""', "['kind', 'host', 'port', 'user', 'password', 'database']"], {}), "('DatabaseConfig', ['kind', 'ho...
import discord from discord.ext import commands async def fetchUser(client: commands.Bot, user: discord.User or str = None) -> discord.User: if(user == None): user = await client.fetch_user(client.user.id) else: try: user = await client.fetch_user(user) except: ...
[ "discord.Embed" ]
[((627, 674), 'discord.Embed', 'discord.Embed', ([], {'description': 'content', 'color': 'color'}), '(description=content, color=color)\n', (640, 674), False, 'import discord\n')]
# Generated by Django 3.0.7 on 2020-07-31 07:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('business_register', '0028_auto_20200729_0937'), ] operations = [ migrations.AlterField( model_name='fop', name='code...
[ "django.db.models.CharField" ]
[((341, 388), 'django.db.models.CharField', 'models.CharField', ([], {'db_index': '(True)', 'max_length': '(675)'}), '(db_index=True, max_length=675)\n', (357, 388), False, 'from django.db import migrations, models\n'), ((509, 568), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(175)', 'verbose...
from __future__ import absolute_import, division, print_function, unicode_literals import torch import torch.nn.functional as F from tests.utils import jitVsGlow import unittest class TestDropout(unittest.TestCase): def test_dropout(self): """Basic test of the PyTorch aten::dropout Node on Glow.""" ...
[ "torch.randn", "torch.nn.functional.dropout", "tests.utils.jitVsGlow" ]
[((412, 433), 'torch.randn', 'torch.randn', (['(6)', '(4)', '(10)'], {}), '(6, 4, 10)\n', (423, 433), False, 'import torch\n'), ((443, 501), 'tests.utils.jitVsGlow', 'jitVsGlow', (['test_f', 'x'], {'expected_fused_ops': "{'aten::dropout'}"}), "(test_f, x, expected_fused_ops={'aten::dropout'})\n", (452, 501), False, 'fr...
from tensorflow.keras.layers import ZeroPadding2D, Convolution2D, MaxPooling2D from tensorflow.keras.layers import Dense, Dropout, Softmax, Flatten, Activation, BatchNormalization import numpy as np from matplotlib import pyplot from tensorflow.keras.models import Sequential, Model from tensorflow.keras.preprocessing.i...
[ "tensorflow.keras.layers.Convolution2D", "keras.layers.experimental.preprocessing.RandomFlip", "matplotlib.pyplot.imshow", "tensorflow.keras.models.Model", "tensorflow.keras.preprocessing.image.img_to_array", "keras.layers.experimental.preprocessing.RandomRotation", "tensorflow.keras.models.Sequential",...
[((1029, 1119), 'keras_vggface.vggface.VGGFace', 'VGGFace', ([], {'model': '"""resnet50"""', 'include_top': '(False)', 'input_shape': '(224, 224, 3)', 'pooling': '"""avg"""'}), "(model='resnet50', include_top=False, input_shape=(224, 224, 3),\n pooling='avg')\n", (1036, 1119), False, 'from keras_vggface.vggface impo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = '<NAME>' import www.orm from www.models import User import asyncio import random async def test(loop): await www.orm.create_pool(loop, user='root', password='<PASSWORD>', db='awesome') u = User(name='Test', email='<EMAIL>' % random.randint(0, 10000...
[ "asyncio.get_event_loop", "random.randint" ]
[((395, 419), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (417, 419), False, 'import asyncio\n'), ((297, 324), 'random.randint', 'random.randint', (['(0)', '(10000000)'], {}), '(0, 10000000)\n', (311, 324), False, 'import random\n')]
#!/usr/bin/env python3 import subprocess import atexit from setuptools import setup from setuptools.command.install import install def install_punkt(): """ Some additional data needs to be installed for the Natural Language Tool Kit. This needs to be done after the dependencies have been installed. Unf...
[ "setuptools.setup", "atexit.register", "subprocess.check_call" ]
[((929, 1293), 'setuptools.setup', 'setup', ([], {'cmdclass': "{'install': CustomInstallCommand}", 'name': '"""ArtiClass"""', 'version': '"""1.0"""', 'description': '"""Classification of BBC articles."""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'packages': "['articlass']", 'python_requires': '""">=3...
from aerosandbox.common import ExplicitAnalysis import aerosandbox.numpy as np import subprocess from pathlib import Path from aerosandbox.geometry import Airplane from aerosandbox.performance import OperatingPoint from typing import Union, List, Dict import tempfile import warnings class AVL(ExplicitAnalysis): "...
[ "tempfile.TemporaryDirectory", "aerosandbox.performance.OperatingPoint", "pathlib.Path", "aerosandbox.Atmosphere", "subprocess.call" ]
[((1331, 1347), 'aerosandbox.performance.OperatingPoint', 'OperatingPoint', ([], {}), '()\n', (1345, 1347), False, 'from aerosandbox.performance import OperatingPoint\n'), ((4533, 4562), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (4560, 4562), False, 'import tempfile\n'), ((4601, 46...
import copy import typing as ty from collections.abc import MutableMapping _AT = ty.Union[list, bool, str, float, dict, int] _UT = ty.Union[int, float, str, bool] _KT = ty.List[ty.Tuple[str, ...]] _VT = ty.List[_AT] _IT = ty.List[ty.Tuple[ty.Tuple[str, ...], _AT]] Path = ty.Union[str, ty.Tuple[str, ...]] def topath...
[ "copy.deepcopy" ]
[((3764, 3783), 'copy.deepcopy', 'copy.deepcopy', (['self'], {}), '(self)\n', (3777, 3783), False, 'import copy\n')]
#!/usr/bin/env python from local_settings import PORT, PASSWORD from threading import Thread import logging import select import SocketServer import time logger = logging.getLogger("socket-state-server") logger.setLevel(logging.INFO) format_string = "%(asctime)s - %(client_ip)s:%(client_port)s - %(levelname)s - %(me...
[ "logging.getLogger", "select.select", "logging.StreamHandler", "logging.Formatter", "time.time" ]
[((166, 206), 'logging.getLogger', 'logging.getLogger', (['"""socket-state-server"""'], {}), "('socket-state-server')\n", (183, 206), False, 'import logging\n'), ((341, 373), 'logging.Formatter', 'logging.Formatter', (['format_string'], {}), '(format_string)\n', (358, 373), False, 'import logging\n'), ((379, 402), 'log...
from create_allele_counts import get_primer_intervals def pair_counts(sam_fname, paired=False, qual_min=30, max_reads=-1, max_isize = 700, VERBOSE = 0, fwd_primer_regions = None, rev_primer_regions = None): ''' ''' import numpy as np import pysam from collections imp...
[ "numpy.abs", "numpy.ones_like", "pickle.dump", "argparse.ArgumentParser", "gzip.open", "create_allele_counts.get_primer_intervals", "numpy.where", "itertools.combinations", "numpy.array", "numpy.zeros", "pysam.Samfile", "numpy.fromstring" ]
[((505, 547), 'numpy.array', 'np.array', (["['A', 'C', 'G', 'T']"], {'dtype': '"""S1"""'}), "(['A', 'C', 'G', 'T'], dtype='S1')\n", (513, 547), True, 'import numpy as np\n'), ((7551, 7669), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""create pair counts"""', 'formatter_class': 'argpars...
from __future__ import annotations from cmath import cos import sys from exo import proc, Procedure, DRAM, config, instr, QAST import matmap.base as matmap from matmap.qast_utils.loopReader import * import matmap.transforms.TilingTransform as ts import matmap.transforms.ReorderingTransform as rs from matmap.cosa.src.co...
[ "matmap.cosa.src.cosa_input_objs.Arch", "matmap.transforms.TilingTransform.TilingTransform", "matmap.cosa.src.cosa_input_objs.Mapspace", "matmap.transforms.ReorderingTransform.ReorderingTransform", "matmap.cosa.src.cosa_input_objs.Prob" ]
[((1202, 1217), 'matmap.cosa.src.cosa_input_objs.Prob', 'Prob', (['prob_path'], {}), '(prob_path)\n', (1206, 1217), False, 'from matmap.cosa.src.cosa_input_objs import Prob, Arch, Mapspace\n'), ((1233, 1248), 'matmap.cosa.src.cosa_input_objs.Arch', 'Arch', (['arch_path'], {}), '(arch_path)\n', (1237, 1248), False, 'fro...
# Program: hashtable.py # Execution: python hashtable.py < data/input.txt # This hashtable program is modeled after the hashst.py program from # Princeton. http://introcs.cs.princeton.edu/python/44st/hashst.py.html # This program supports the public methods size(), isEmpty(), put(), get(), # delete(), and contains(). I...
[ "re.sub", "stdarray.create2D", "stdio.readString", "stdio.isEmpty" ]
[((763, 789), 'stdarray.create2D', 'stdarray.create2D', (['size', '(0)'], {}), '(size, 0)\n', (780, 789), False, 'import stdarray\n'), ((2526, 2541), 'stdio.isEmpty', 'stdio.isEmpty', ([], {}), '()\n', (2539, 2541), False, 'import stdio\n'), ((2604, 2630), 're.sub', 're.sub', (['"""[^\\\\w\\\\s]"""', '""""""', 'a'], {}...
from django.contrib import auth from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.core.mail import send_mail from django.contrib import messages from django.http import HttpResponseRed...
[ "tcd.profiles.models.Forgotten.objects.filter", "django.core.mail.send_mail", "tcd.base_utils.render_to_AJAX", "tcd.profiles.models.Forgotten", "tcd.base_utils.render_message", "tcd.comments.models.fcomMessage.objects.filter", "django.contrib.auth.models.User.objects.get", "django.http.HttpResponseRed...
[((15209, 15250), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""/users/login/"""'}), "(login_url='/users/login/')\n", (15223, 15250), False, 'from django.contrib.auth.decorators import login_required\n'), ((2610, 2624), 'tcd.profiles.forms.tcdLoginForm', 'tcdLoginForm', ([], ...
from collections import namedtuple import pytest from blockkit import ( Button, Confirm, Image, MarkdownText, Option, OptionGroup, PlainText, Filter, ) TestValues = namedtuple( "TestValues", ( "title text short_text image_url alt_text url deep_link " "action_id...
[ "collections.namedtuple", "blockkit.PlainText", "blockkit.Option", "blockkit.Button", "blockkit.Filter", "blockkit.MarkdownText", "blockkit.Image" ]
[((200, 344), 'collections.namedtuple', 'namedtuple', (['"""TestValues"""', '"""title text short_text image_url alt_text url deep_link action_id block_id confirm_text deny_text value date"""'], {}), "('TestValues',\n 'title text short_text image_url alt_text url deep_link action_id block_id confirm_text deny_text va...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ This m...
[ "azure.iot.device.MethodResponse.create_from_method_request", "json.dumps", "pnp_helper.create_command_response_payload", "pnp_helper.retrieve_values_dict_from_payload" ]
[((1699, 1724), 'json.dumps', 'json.dumps', (['telemetry_msg'], {}), '(telemetry_msg)\n', (1709, 1724), False, 'import json\n'), ((5977, 6038), 'pnp_helper.retrieve_values_dict_from_payload', 'pnp_helper.retrieve_values_dict_from_payload', (['command_request'], {}), '(command_request)\n', (6021, 6038), False, 'import p...
import dataclasses from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type from graphql import ( ASTValidationRule, ExecutionResult as GraphQLExecutionResult, specified_rules, ) from graphql.error.graphql_error import GraphQLError from graphql.language import DocumentNode, OperationDefinit...
[ "strawberry.utils.operation.get_first_operation", "strawberry.utils.operation.get_operation_type" ]
[((1922, 1979), 'strawberry.utils.operation.get_operation_type', 'get_operation_type', (['graphql_document', 'self.operation_name'], {}), '(graphql_document, self.operation_name)\n', (1940, 1979), False, 'from strawberry.utils.operation import get_first_operation, get_operation_type\n'), ((2176, 2213), 'strawberry.util...
# Python imports import math # Project imports from dexbot.strategies.base import StrategyBase, ConfigElement, DetailElement from dexbot.qt_queue.idle_queue import idle_add # Third party imports from bitshares.market import Market STRATEGY_NAME = 'Strategy Template' class Strategy(StrategyBase): """ <strategy_...
[ "dexbot.strategies.base.DetailElement", "dexbot.strategies.base.ConfigElement", "dexbot.strategies.base.StrategyBase.configure", "dexbot.strategies.base.StrategyBase.configure_details", "dexbot.qt_queue.idle_queue.idle_add" ]
[((6923, 6990), 'dexbot.qt_queue.idle_queue.idle_add', 'idle_add', (['self.view.set_worker_slider', 'self.worker_name', 'percentage'], {}), '(self.view.set_worker_slider, self.worker_name, percentage)\n', (6931, 6990), False, 'from dexbot.qt_queue.idle_queue import idle_add\n'), ((1919, 1961), 'dexbot.strategies.base.S...
import boto3 import logging #setup simple logging for INFO logger = logging.getLogger() logger.setLevel(logging.INFO) backup = boto3.client('backup') page_size = 1000 def lambda_handler(event, context): # List Backup Vaults backupvaults = backup.list_backup_vaults() logger.info(backupvaults) backu...
[ "logging.getLogger", "boto3.client" ]
[((69, 88), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (86, 88), False, 'import logging\n'), ((129, 151), 'boto3.client', 'boto3.client', (['"""backup"""'], {}), "('backup')\n", (141, 151), False, 'import boto3\n')]
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- from marshmallow import fields, post_load from azure.ai.ml.constants import AutoMLConstants from azure.ai.ml._schema import PatchedSchemaMe...
[ "marshmallow.fields.Int", "azure.ai.ml._restclient.v2022_02_01_preview.models.ImageSweepLimitSettings", "azure.ai.ml.automl.ImageLimitSettings" ]
[((494, 506), 'marshmallow.fields.Int', 'fields.Int', ([], {}), '()\n', (504, 506), False, 'from marshmallow import fields, post_load\n'), ((524, 536), 'marshmallow.fields.Int', 'fields.Int', ([], {}), '()\n', (534, 536), False, 'from marshmallow import fields, post_load\n'), ((559, 571), 'marshmallow.fields.Int', 'fie...
from Statistics.mean import mean from Statistics.samplestand import samplestand from Calculator.subtraction import subtraction from Calculator.division import division def zscore(data): x = 64 u = mean(data) sample_sd = samplestand(data) y = subtraction(x, u) return division(sample_sd, ...
[ "Calculator.division.division", "Statistics.samplestand.samplestand", "Calculator.subtraction.subtraction", "Statistics.mean.mean" ]
[((215, 225), 'Statistics.mean.mean', 'mean', (['data'], {}), '(data)\n', (219, 225), False, 'from Statistics.mean import mean\n'), ((243, 260), 'Statistics.samplestand.samplestand', 'samplestand', (['data'], {}), '(data)\n', (254, 260), False, 'from Statistics.samplestand import samplestand\n'), ((270, 287), 'Calculat...
import torch from scipy import io import numpy as np #import visdom #vis = visdom.Visdom() file_PATH = '/home/leejeyeol/Documents/ground_truth_demo/testing_label_mask' num_of_files = 21 for videos in range(1, num_of_files+1): volLabel = io.loadmat(file_PATH+'/%d_label.mat' % videos)['volLabel'].tolist()[0] ...
[ "torch.load", "scipy.io.loadmat", "torch.save" ]
[((529, 589), 'torch.save', 'torch.save', (['data', "(file_PATH + '/Ground_truth_%d.t7' % videos)"], {}), "(data, file_PATH + '/Ground_truth_%d.t7' % videos)\n", (539, 589), False, 'import torch\n'), ((710, 764), 'torch.load', 'torch.load', (["(file_PATH + '/Ground_truth_%d.t7' % videos)"], {}), "(file_PATH + '/Ground_...
# Copyright 2021 The Distla Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ "distla_core.linalg.utils.testutils.eps", "distla_core.utils.initializers.ones", "jax.random.PRNGKey", "jax.random.uniform", "jax.local_device_count", "numpy.testing.assert_allclose", "jax.random.normal", "pytest.mark.parametrize", "distla_core.utils.initializers.normal", "distla_core.utils.pops.u...
[((1283, 1337), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""matrix_shape"""', 'matrix_shapes'], {}), "('matrix_shape', matrix_shapes)\n", (1306, 1337), False, 'import pytest\n'), ((1563, 1617), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""matrix_shape"""', 'matrix_shapes'], {}), "('matrix...
# 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...
[ "random.choice", "allure.step", "genson.SchemaBuilder", "tests.api.utils.tools.random_string", "rstr.xeger.Xeger", "random.randint" ]
[((1008, 1041), 'random.randint', 'randint', ([], {'a': 'min_value', 'b': 'max_value'}), '(a=min_value, b=max_value)\n', (1015, 1041), False, 'from random import randint, choice\n'), ((1982, 1994), 'random.choice', 'choice', (['enum'], {}), '(enum)\n', (1988, 1994), False, 'from random import randint, choice\n'), ((422...
MAX_CHANNELS = 4 if __name__ == "__main__": import sys from pathlib import Path sys.path.append(str(Path(__file__).parents[1]/'Helper_Lib')) from driver_config import ( LDriverDefinition, LDouble, LBoolean, LButton, LVector ) dir_path = Path(__file__).parent f = LDriverDefinition(...
[ "pathlib.Path", "driver_config.LDriverDefinition", "driver_config.LButton", "driver_config.LBoolean", "driver_config.LDouble", "driver_config.LVector" ]
[((302, 353), 'driver_config.LDriverDefinition', 'LDriverDefinition', (["(dir_path / 'QuantumCTek_AWG.ini')"], {}), "(dir_path / 'QuantumCTek_AWG.ini')\n", (319, 353), False, 'from driver_config import LDriverDefinition, LDouble, LBoolean, LButton, LVector\n'), ((272, 286), 'pathlib.Path', 'Path', (['__file__'], {}), '...
# -*- coding: utf-8 -*- """ Created on Sun Feb 28 16:23:37 2016 @author: <NAME> (<EMAIL>) """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os import sys import time import numpy as np from six.moves import xrange # pylint: disable=r...
[ "data_utils.initialize_vocabulary", "tensorflow.gfile.GFile", "math.exp", "tensorflow.app.run", "tensorflow.gfile.Exists", "subprocess.Popen", "tensorflow.Session", "os.chmod", "os.path.isdir", "subprocess.call", "tensorflow.app.flags.DEFINE_boolean", "sys.stdout.flush", "tensorflow.initiali...
[((631, 718), 'tensorflow.app.flags.DEFINE_float', 'tf.app.flags.DEFINE_float', (['"""max_gradient_norm"""', '(5.0)', '"""Clip gradients to this norm."""'], {}), "('max_gradient_norm', 5.0,\n 'Clip gradients to this norm.')\n", (656, 718), True, 'import tensorflow as tf\n'), ((741, 828), 'tensorflow.app.flags.DEFINE...
""" Plots fig S2: Specifically, zonal-mean root-mean-square of stationary wave meridional wind at 850 hPa for both reanalysis and aquaplanet simulation data for ANNUAL and NDJFM. NOTE: since the reviewer asked for a measure of interannual variability in stationary wave amplitude, here we calculate stationary waves as...
[ "matplotlib.pyplot.savefig", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "numpy.arange", "matplotlib.pyplot.legend", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.array", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylim", "xarray.open_dataset", "matplotlib.pyplot....
[((1283, 1309), 'xarray.open_dataset', 'xr.open_dataset', (['filename1'], {}), '(filename1)\n', (1298, 1309), True, 'import xarray as xr\n'), ((1327, 1353), 'xarray.open_dataset', 'xr.open_dataset', (['filename2'], {}), '(filename2)\n', (1342, 1353), True, 'import xarray as xr\n'), ((1371, 1397), 'xarray.open_dataset',...
from unittest import TestCase from mock import Mock, patch, call from samcli.commands.logs.command import do_cli class TestLogsCliCommand(TestCase): def setUp(self): self.function_name = "name" self.stack_name = "stack name" self.filter_pattern = "filter" self.start_time = "start...
[ "mock.Mock", "mock.patch", "mock.call", "samcli.commands.logs.command.do_cli" ]
[((358, 401), 'mock.patch', 'patch', (['"""samcli.commands.logs.command.click"""'], {}), "('samcli.commands.logs.command.click')\n", (363, 401), False, 'from mock import Mock, patch, call\n'), ((407, 468), 'mock.patch', 'patch', (['"""samcli.commands.logs.logs_context.LogsCommandContext"""'], {}), "('samcli.commands.lo...
import hy import interpreter import pytest from version import VERSION @pytest.mark.skipif(VERSION != 0.2, reason="Test wants version 0.2") @pytest.mark.parametrize( "program, expected", ( ("Hello World! //commented out", "helloworld!"), ( "This is quite a long sentence, // Is it n...
[ "pytest.mark.parametrize", "interpreter.interpreter", "pytest.mark.skipif" ]
[((74, 141), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(VERSION != 0.2)'], {'reason': '"""Test wants version 0.2"""'}), "(VERSION != 0.2, reason='Test wants version 0.2')\n", (92, 141), False, 'import pytest\n'), ((143, 331), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""program, expected"""', "(('He...
#!/usr/bin/env python # # This script shows an advanced Sysdig Monitor data request that leverages # filtering and segmentation. # # The request returns the last 10 minutes of CPU utilization for the 5 # busiest containers inside the given host, with 1 minute data granularity # import json import sys from sdcclient i...
[ "json.dumps", "sdcclient.SdcClient", "sys.exit" ]
[((640, 660), 'sdcclient.SdcClient', 'SdcClient', (['sdc_token'], {}), '(sdc_token)\n', (649, 660), False, 'from sdcclient import SdcClient\n'), ((535, 546), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (543, 546), False, 'import sys\n'), ((2034, 2075), 'json.dumps', 'json.dumps', (['res'], {'sort_keys': '(True)', '...
"""Normalize input string.""" import re from .state_core import StateCore # https://spec.commonmark.org/0.29/#line-ending NEWLINES_RE = re.compile(r"\r\n?|\n") NULL_RE = re.compile(r"\0") def normalize(state: StateCore): # Normalize newlines string, _ = NEWLINES_RE.subn("\n", state.src) # Replace NUL...
[ "re.compile" ]
[((139, 164), 're.compile', 're.compile', (['"""\\\\r\\\\n?|\\\\n"""'], {}), "('\\\\r\\\\n?|\\\\n')\n", (149, 164), False, 'import re\n'), ((173, 190), 're.compile', 're.compile', (['"""\\\\0"""'], {}), "('\\\\0')\n", (183, 190), False, 'import re\n')]
##################################################################### # # # SkillsFuture IBM Cloud Function Example # # This example is used to show how to get data from WeatherAPI # # and return it to Watson Assistan...
[ "requests.get" ]
[((1822, 1899), 'requests.get', 'requests.get', (['WeatherAPI_url'], {'auth': '(WeatherAPI_username, WeatherAPI_password)'}), '(WeatherAPI_url, auth=(WeatherAPI_username, WeatherAPI_password))\n', (1834, 1899), False, 'import requests\n'), ((3847, 3925), 'requests.get', 'requests.get', (['"""https://api.data.gov.sg/v1/...
import pandas as pd import numpy as np class Treefile(object): """Tools for working with a treefile (.tree)""" def __init__(self, fname=None, comment_char="#", field_sep=" ", cluster_sep=":"): """ :fname: filename for the treefil...
[ "pandas.DataFrame" ]
[((1594, 1614), 'pandas.DataFrame', 'pd.DataFrame', (['self.d'], {}), '(self.d)\n', (1606, 1614), True, 'import pandas as pd\n')]
import os import time import unittest import pytest from kafka.admin_client import AdminClient, NewTopic, NewPartitionsInfo from kafka.protocol.metadata import MetadataRequest from test.fixtures import ZookeeperFixture, KafkaFixture from test.testutil import KafkaIntegrationTestCase, env_kafka_version KAFKA_ADMIN_TIM...
[ "kafka.admin_client.NewPartitionsInfo", "os.environ.get", "kafka.admin_client.NewTopic", "time.sleep", "kafka.admin_client.AdminClient", "test.testutil.env_kafka_version", "test.fixtures.KafkaFixture.instance", "test.fixtures.ZookeeperFixture.instance" ]
[((535, 562), 'test.fixtures.ZookeeperFixture.instance', 'ZookeeperFixture.instance', ([], {}), '()\n', (560, 562), False, 'from test.fixtures import ZookeeperFixture, KafkaFixture\n'), ((584, 616), 'test.fixtures.KafkaFixture.instance', 'KafkaFixture.instance', (['(0)', 'cls.zk'], {}), '(0, cls.zk)\n', (605, 616), Fal...
# -*- coding:utf-8 -*- from api.extensions import celery from flask import current_app @celery.task(queue="ticket_web") def test_task(): current_app.logger.info("test task.............................")
[ "api.extensions.celery.task", "flask.current_app.logger.info" ]
[((91, 122), 'api.extensions.celery.task', 'celery.task', ([], {'queue': '"""ticket_web"""'}), "(queue='ticket_web')\n", (102, 122), False, 'from api.extensions import celery\n'), ((144, 209), 'flask.current_app.logger.info', 'current_app.logger.info', (['"""test task............................."""'], {}), "('test tas...
from biliob_analyzer.add_keyword import AddKeyword AddKeyword().add_all_author() AddKeyword().add_all_video()
[ "biliob_analyzer.add_keyword.AddKeyword" ]
[((51, 63), 'biliob_analyzer.add_keyword.AddKeyword', 'AddKeyword', ([], {}), '()\n', (61, 63), False, 'from biliob_analyzer.add_keyword import AddKeyword\n'), ((81, 93), 'biliob_analyzer.add_keyword.AddKeyword', 'AddKeyword', ([], {}), '()\n', (91, 93), False, 'from biliob_analyzer.add_keyword import AddKeyword\n')]
from elasticsearch import Elasticsearch from idunn import settings ES_CONNECTION = None def get_elasticsearch(): global ES_CONNECTION if ES_CONNECTION is None: ES_CONNECTION = Elasticsearch(settings["MIMIR_ES"]) return ES_CONNECTION
[ "elasticsearch.Elasticsearch" ]
[((196, 231), 'elasticsearch.Elasticsearch', 'Elasticsearch', (["settings['MIMIR_ES']"], {}), "(settings['MIMIR_ES'])\n", (209, 231), False, 'from elasticsearch import Elasticsearch\n')]
from flask import request, current_app as app from flask_restplus import Resource, Namespace, fields from elasticsearch import helpers, Elasticsearch, TransportError from app.main.lib.fields import JsonObject api = Namespace('glossary', description='glossary operations') glossary_request = api.model('glossary_request'...
[ "flask_restplus.fields.String", "elasticsearch.Elasticsearch", "flask_restplus.Namespace", "app.main.lib.fields.JsonObject" ]
[((216, 272), 'flask_restplus.Namespace', 'Namespace', (['"""glossary"""'], {'description': '"""glossary operations"""'}), "('glossary', description='glossary operations')\n", (225, 272), False, 'from flask_restplus import Resource, Namespace, fields\n'), ((332, 389), 'flask_restplus.fields.String', 'fields.String', ([...
# Create your views here. from fatsecret import Fatsecret from django.http import JsonResponse from django.conf import settings fs = Fatsecret(settings.FATSECRET_ACCESS_KEY, settings.FATSECRET_SECRET_KEY) def foods(request): if request.method == 'GET': search = request.GET["search"] foods_detail =...
[ "fatsecret.Fatsecret", "django.http.JsonResponse" ]
[((134, 205), 'fatsecret.Fatsecret', 'Fatsecret', (['settings.FATSECRET_ACCESS_KEY', 'settings.FATSECRET_SECRET_KEY'], {}), '(settings.FATSECRET_ACCESS_KEY, settings.FATSECRET_SECRET_KEY)\n', (143, 205), False, 'from fatsecret import Fatsecret\n'), ((529, 568), 'django.http.JsonResponse', 'JsonResponse', (["{'results':...
import bleach from django.conf import settings from django.contrib.postgres.fields import ArrayField from django.db import models from django.db.models import Q from django.utils.text import Truncator from loguru import logger import maya from feedzero.core.models import SlugifiedMixin class FeedManager(models.Manag...
[ "bleach.clean", "django.db.models.OneToOneField", "loguru.logger.exception", "django.db.models.Manager", "django.db.models.TextField", "django.db.models.ForeignKey", "django.utils.text.Truncator", "django.db.models.ManyToManyField", "django.db.models.FileField", "maya.MayaDT.from_datetime", "dja...
[((604, 650), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(1000)', 'unique': '(True)'}), '(max_length=1000, unique=True)\n', (620, 650), False, 'from django.db import models\n'), ((663, 718), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)', 'blank': '(True)', 'nu...
#!/usr/bin/env python """Make sure the data in BOTMETA.yml is valid""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import glob import os import re import sys import yaml from voluptuous import All, Any, Match, MultipleInvalid, Required, Schema from voluptuous.humanize impor...
[ "voluptuous.humanize.humanize_error", "voluptuous.Required", "voluptuous.Any", "voluptuous.Schema", "yaml.safe_load", "sys.exit", "voluptuous.Match" ]
[((1011, 1032), 'voluptuous.Schema', 'Schema', (['*string_types'], {}), '(*string_types)\n', (1017, 1032), False, 'from voluptuous import All, Any, Match, MultipleInvalid, Required, Schema\n'), ((534, 556), 'yaml.safe_load', 'yaml.safe_load', (['f_path'], {}), '(f_path)\n', (548, 556), False, 'import yaml\n'), ((751, 7...
# -*- coding: utf-8 -*- """ This module """ import attr import typing from ..core.model import ( Property, Resource, Tag, GetAtt, TypeHint, TypeCheck, ) from ..core.constant import AttrMeta #--- Property declaration --- @attr.s class PropDetectorModelSetTimer(Property): """ AWS Object Type = "AWS::IoTE...
[ "attr.validators.instance_of" ]
[((1257, 1314), 'attr.validators.instance_of', 'attr.validators.instance_of', (['TypeCheck.intrinsic_str_type'], {}), '(TypeCheck.intrinsic_str_type)\n', (1284, 1314), False, 'import attr\n'), ((3019, 3076), 'attr.validators.instance_of', 'attr.validators.instance_of', (['TypeCheck.intrinsic_str_type'], {}), '(TypeChec...
import copy from joblib import Parallel import numpy as np import time import numbers from itertools import product from collections import defaultdict from sklearn import clone from sklearn.pipeline import Pipeline from sklearn.model_selection import check_cv, GridSearchCV, RandomizedSearchCV from sklearn.model_select...
[ "sklearn.model_selection._validation._translate_train_sizes", "sklearn.utils.validation._check_fit_params", "sklearn.model_selection._validation._insert_error_scores", "sklearn.model_selection._validation._aggregate_score_dicts", "sklearn.clone", "copy.deepcopy", "sklearn.base.is_classifier", "sklearn...
[((1285, 1314), 'copy.deepcopy', 'copy.deepcopy', (['src_fit_params'], {}), '(src_fit_params)\n', (1298, 1314), False, 'import copy\n'), ((2942, 2967), 'copy.deepcopy', 'copy.deepcopy', (['fit_params'], {}), '(fit_params)\n', (2955, 2967), False, 'import copy\n'), ((5142, 5537), 'sklearn.model_selection._validation._fi...
import string import secrets def generate_token(size=12): assert size > 0 alpha = string.ascii_lowercase alnum = string.ascii_lowercase + string.digits return secrets.choice(alpha) + ''.join([secrets.choice(alnum) for _ in range(size - 1)]) def flatten(xxs): return [x for xs in xxs for x in xs]
[ "secrets.choice" ]
[((177, 198), 'secrets.choice', 'secrets.choice', (['alpha'], {}), '(alpha)\n', (191, 198), False, 'import secrets\n'), ((210, 231), 'secrets.choice', 'secrets.choice', (['alnum'], {}), '(alnum)\n', (224, 231), False, 'import secrets\n')]
# Generated by Django 3.2.5 on 2021-07-08 10:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0023_add_choose_permissions'), ('profil', '0006_auto_20210708_0919'), ] operations = [ ...
[ "django.db.models.DateField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((325, 391), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""softskill"""', 'name': '"""description"""'}), "(model_name='softskill', name='description')\n", (347, 391), False, 'from django.db import migrations, models\n'), ((547, 591), 'django.db.models.TextField', 'models.TextFie...
import numpy as np from pysc2.lib import actions import tensorflow as tf def compute_trajectory_loss ( y_true, y_pred ): combinedLoss = tf.reduce_mean(y_true) - 0 * tf.reduce_mean(y_pred[-1]) return combinedLoss class Agent(): def __init__(self, envParams ): self.welcomeStr = 'PLACEHOLDER-AGENT' ...
[ "numpy.reshape", "pysc2.lib.actions.FunctionCall", "numpy.random.random", "numpy.argmax", "numpy.square", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.isfinite", "numpy.unravel_index", "numpy.ma.log", "tensorflow.reduce_mean" ]
[((142, 164), 'tensorflow.reduce_mean', 'tf.reduce_mean', (['y_true'], {}), '(y_true)\n', (156, 164), True, 'import tensorflow as tf\n'), ((1189, 1236), 'numpy.zeros', 'np.zeros', (['(nEnvs, nSteps + 1)'], {'dtype': 'np.float32'}), '((nEnvs, nSteps + 1), dtype=np.float32)\n', (1197, 1236), True, 'import numpy as np\n')...
""" This is the sklearn iris example from https://scikit-learn.org/stable/auto_examples/datasets/plot_iris_dataset.html Uses the Iris data set, which is a set flower measurements of three different types of flowers """ import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from sklearn import datasets...
[ "sklearn.datasets.load_iris", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "sklearn.decomposition.PCA", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.clf", "matplotlib.pyplot.figure", "matplotlib.pyplot.yticks", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylim", "matplotlib.pyplo...
[((367, 387), 'sklearn.datasets.load_iris', 'datasets.load_iris', ([], {}), '()\n', (385, 387), False, 'from sklearn import datasets\n'), ((607, 636), 'matplotlib.pyplot.figure', 'plt.figure', (['(2)'], {'figsize': '(8, 6)'}), '(2, figsize=(8, 6))\n', (617, 636), True, 'import matplotlib.pyplot as plt\n'), ((637, 646),...
import copy from mock import patch from ruskit.failover import FastAddMachineManager from ruskit.distribute import RearrangeSlaveManager, NodeWrapper from test_base import TestCaseBase class DummyCluster(object): def __init__(self): self.nodes = [] def dummy_gen_distribution_for_move_masters(nodes, ne...
[ "ruskit.distribute.NodeWrapper", "mock.patch" ]
[((2696, 2782), 'mock.patch', 'patch', (['"""ruskit.failover.gen_distribution"""', 'dummy_gen_distribution_for_move_masters'], {}), "('ruskit.failover.gen_distribution',\n dummy_gen_distribution_for_move_masters)\n", (2701, 2782), False, 'from mock import patch\n'), ((3611, 3702), 'mock.patch', 'patch', (['"""ruskit...
import re from aviation_weather.components import Component from aviation_weather.exceptions import SkyConditionDecodeError class SkyCondition(Component): TYPES = { "VV": "vertical visibility", "SKC": "clear", "CLR": "clear", "NCD": "no cloud detected", "FEW": "few", ...
[ "aviation_weather.exceptions.SkyConditionDecodeError" ]
[((865, 934), 'aviation_weather.exceptions.SkyConditionDecodeError', 'SkyConditionDecodeError', (["('SkyCondition(%r) could not be parsed' % raw)"], {}), "('SkyCondition(%r) could not be parsed' % raw)\n", (888, 934), False, 'from aviation_weather.exceptions import SkyConditionDecodeError\n')]
from setuptools import setup from torch.utils.cpp_extension import CppExtension, BuildExtension, CUDAExtension setup(name='adaptive_sigmoid', ext_modules=[CUDAExtension('adaptive_sigmoid_gpu',['adaptive_sigmoid.cpp', 'adaptive_sigmoid_cuda.cu']),], cmdclass={'build_ext': BuildExtension})
[ "torch.utils.cpp_extension.CUDAExtension" ]
[((155, 250), 'torch.utils.cpp_extension.CUDAExtension', 'CUDAExtension', (['"""adaptive_sigmoid_gpu"""', "['adaptive_sigmoid.cpp', 'adaptive_sigmoid_cuda.cu']"], {}), "('adaptive_sigmoid_gpu', ['adaptive_sigmoid.cpp',\n 'adaptive_sigmoid_cuda.cu'])\n", (168, 250), False, 'from torch.utils.cpp_extension import CppEx...
import asyncio import discord import json import os from urllib.parse import quote from discord.ext import commands from Cogs import Settings from Cogs import DisplayName from Cogs import TinyURL from Cogs import Message from Cogs import DL from pyquery import PyQuery as pq def setup(bot):...
[ "Cogs.DisplayName.name", "urllib.parse.quote", "os.path.isfile", "Cogs.TinyURL.tiny_url", "discord.ext.commands.command", "Cogs.DL.async_json" ]
[((684, 719), 'discord.ext.commands.command', 'commands.command', ([], {'pass_context': '(True)'}), '(pass_context=True)\n', (700, 719), False, 'from discord.ext import commands\n'), ((1178, 1213), 'discord.ext.commands.command', 'commands.command', ([], {'pass_context': '(True)'}), '(pass_context=True)\n', (1194, 1213...
"""Operations to update Area.""" from haversine import haversine from flock_controller.mechanics.main import CENTRAL_SERVER, RES_CS from flock_controller.mechanics.drone import gen_drone_list_from_collection from hydra import SCHEMA, Resource def gen_Location(coordinate_str): """Generate a Location object...
[ "flock_controller.mechanics.main.RES_CS.find_suitable_operation", "haversine.haversine", "hydra.Resource.from_iri", "flock_controller.mechanics.drone.gen_drone_list_from_collection" ]
[((1622, 1670), 'flock_controller.mechanics.drone.gen_drone_list_from_collection', 'gen_drone_list_from_collection', (['drone_collection'], {}), '(drone_collection)\n', (1652, 1670), False, 'from flock_controller.mechanics.drone import gen_drone_list_from_collection\n'), ((561, 667), 'flock_controller.mechanics.main.RE...
from typing import Optional import pytest from tokamak.radix_tree import tree @pytest.mark.parametrize("default_handler", (None, "A")) @pytest.mark.parametrize( "tsm", (tree.TrailingSlashMatch.RELAXED, tree.TrailingSlashMatch.STRICT) ) def test_tree_ctor( default_handler: Optional[str], tsm: tree.TrailingSl...
[ "pytest.mark.parametrize", "pytest.raises", "tokamak.radix_tree.tree.Tree" ]
[((83, 138), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""default_handler"""', "(None, 'A')"], {}), "('default_handler', (None, 'A'))\n", (106, 138), False, 'import pytest\n'), ((140, 242), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""tsm"""', '(tree.TrailingSlashMatch.RELAXED, tree.Traili...
from .prs import PRS, SubStream_Container import random import torch import numpy as np from collections import deque class DelayBuffer(PRS): """ Delayed Buffer for new data samples that need to be learned in chunks. and used to made the decision later whether to enter the buffer or not. """ def r...
[ "torch.manual_seed", "numpy.random.seed", "random.seed" ]
[((564, 606), 'numpy.random.seed', 'np.random.seed', (["self.config['random_seed']"], {}), "(self.config['random_seed'])\n", (578, 606), True, 'import numpy as np\n'), ((615, 654), 'random.seed', 'random.seed', (["self.config['random_seed']"], {}), "(self.config['random_seed'])\n", (626, 654), False, 'import random\n')...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() version = '0.3.1b2' requires = [ 'eduid-am >= 0.7.2b0', 'eduid-userdb >= 0.4.0b12', ] test...
[ "os.path.dirname", "setuptools.find_packages", "os.path.join" ]
[((80, 105), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (95, 105), False, 'import os\n'), ((829, 844), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (842, 844), False, 'from setuptools import setup, find_packages\n'), ((121, 153), 'os.path.join', 'os.path.join', (['here',...
import os import blockchyp # initialize a client. client = blockchyp.Client( api_key=os.environ["BC_API_KEY"], bearer_token=os.environ["BC_BEARER_TOKEN"], signing_key=os.environ["BC_SIGNING_KEY"], ) # populate request parameters. request = { "test": True, "terminalName": "Test Terminal", "tra...
[ "blockchyp.Client" ]
[((61, 202), 'blockchyp.Client', 'blockchyp.Client', ([], {'api_key': "os.environ['BC_API_KEY']", 'bearer_token': "os.environ['BC_BEARER_TOKEN']", 'signing_key': "os.environ['BC_SIGNING_KEY']"}), "(api_key=os.environ['BC_API_KEY'], bearer_token=os.environ[\n 'BC_BEARER_TOKEN'], signing_key=os.environ['BC_SIGNING_KEY...
import unittest from unittest.mock import Mock, patch from .common import header, body, responses, R from atlabs.sms import Sms from atlabs.token import Token from atlabs.voice import Voice from atlabs.airtime import Airtime @patch('requests.post') def test_create_checkout_token(mock_post): data = responses['Crea...
[ "atlabs.sms.Sms", "atlabs.airtime.Airtime", "atlabs.voice.Voice", "atlabs.token.Token", "unittest.mock.patch" ]
[((228, 250), 'unittest.mock.patch', 'patch', (['"""requests.post"""'], {}), "('requests.post')\n", (233, 250), False, 'from unittest.mock import Mock, patch\n'), ((496, 518), 'unittest.mock.patch', 'patch', (['"""requests.post"""'], {}), "('requests.post')\n", (501, 518), False, 'from unittest.mock import Mock, patch\...
# -*- coding: utf-8 -*- from .models import * from .attention import * from utils.infolog import log import numpy as np from utils.audio import inv_linear_spectrogram_tensorflow class Centaur: """Centaur Feature prediction Model. """ def __init__(self, params): self.params = params self....
[ "utils.infolog.log" ]
[((3778, 3844), 'utils.infolog.log', 'log', (['"""Initialized Centaur model. Dimensions (? = dynamic shape): """'], {}), "('Initialized Centaur model. Dimensions (? = dynamic shape): ')\n", (3781, 3844), False, 'from utils.infolog import log\n')]
# pylint: disable=bad-continuation, too-many-branches, too-many-statements # pylint: disable=too-many-locals r""" ╔════════════════════════════════════════════════════╗ ║ ╔═╗╦═╗╔═╗╔═╗╦ ╦╔═╗╔╗╔╔═╗ ╔╦╗╔═╗╔╦╗╔═╗╔╗╔╔═╗╔╦╗╔═╗ ║ ║ ║ ╦╠╦╝╠═╣╠═╝╠═╣║╣ ║║║║╣ ║║║║╣ ║ ╠═╣║║║║ ║ ║║║╣ ║ ║ ╚═╝╩╚═╩ ╩╩ ╩ ╩╚═╝╝╚╝╚═╝ ╩ ╩╚═╝ ╩ ...
[ "graphene_utils.two_tone", "json.loads", "random.choice", "graphene_utils.at", "graphene_sql.Sql", "time.sleep", "graphene_utils.it", "time.time", "random.randint", "graphene_constants.GrapheneConstants" ]
[((6384, 6395), 'time.time', 'time.time', ([], {}), '()\n', (6393, 6395), False, 'import time\n'), ((7705, 7724), 'graphene_constants.GrapheneConstants', 'GrapheneConstants', ([], {}), '()\n', (7722, 7724), False, 'from graphene_constants import GrapheneConstants\n'), ((8067, 8096), 'graphene_constants.GrapheneConstant...
# -*- coding: utf-8 -*- import base64 import hashlib def receive_line(s): data = b'' while b'\n' not in data: d = s.recv(4096) if not d: raise ConnectionResetError data += d data = data.splitlines() return data[0] def pub_from_priv(priv): priv = base64.b64deco...
[ "base64.b64encode", "base64.b64decode" ]
[((306, 344), 'base64.b64decode', 'base64.b64decode', (['priv'], {'altchars': "b'-~'"}), "(priv, altchars=b'-~')\n", (322, 344), False, 'import base64\n'), ((530, 567), 'base64.b64encode', 'base64.b64encode', (['pub'], {'altchars': "b'-~'"}), "(pub, altchars=b'-~')\n", (546, 567), False, 'import base64\n'), ((651, 679)...
#!/usr/local/CyberCP/bin/python import os import os.path import sys import django sys.path.append('/usr/local/CyberCP') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings") try: django.setup() except: pass import shutil from plogical import installUtilities import subprocess import shlex from pl...
[ "plogical.installUtilities.installUtilities.reStartLiteSpeed", "ApachController.ApacheVhosts.ApacheVhost.DeleteApacheVhost", "shlex.split", "plogical.processUtilities.ProcessUtilities.outputExecutioner", "websiteFunctions.models.ChildDomains.objects.count", "sys.path.append", "plogical.mysqlUtilities.my...
[((82, 119), 'sys.path.append', 'sys.path.append', (['"""/usr/local/CyberCP"""'], {}), "('/usr/local/CyberCP')\n", (97, 119), False, 'import sys\n'), ((120, 187), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""CyberCP.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'CyberCP.sett...
from plenum.common.constants import DOMAIN_LEDGER_ID, NYM from plenum.common.txn_util import get_txn_time from plenum.common.util import get_utc_epoch from plenum.test.helper import sdk_send_random_and_check from plenum.test.node_catchup.helper import waitNodeDataEquality from plenum.test.pool_transactions.helper impor...
[ "plenum.test.view_change.helper.start_stopped_node", "plenum.test.pool_transactions.helper.disconnect_node_and_ensure_disconnected", "plenum.test.test_node.get_master_primary_node", "plenum.common.txn_util.get_txn_time", "plenum.test.helper.sdk_send_random_and_check", "plenum.common.util.get_utc_epoch", ...
[((1310, 1397), 'plenum.test.pool_transactions.helper.disconnect_node_and_ensure_disconnected', 'disconnect_node_and_ensure_disconnected', (['looper', 'txnPoolNodeSet', 'node_to_disconnect'], {}), '(looper, txnPoolNodeSet,\n node_to_disconnect)\n', (1349, 1397), False, 'from plenum.test.pool_transactions.helper impo...
import torch.nn as nn from transformers import GPT2Model, GPT2PreTrainedModel from transformers.modeling_utils import SequenceSummary # GPT-2: # ---------------------------------------------- class GPT2ForSequenceRanking(GPT2PreTrainedModel): # ------------------------------------------ def __init__(self, con...
[ "transformers.GPT2Model", "torch.nn.Linear", "transformers.modeling_utils.SequenceSummary" ]
[((414, 431), 'transformers.GPT2Model', 'GPT2Model', (['config'], {}), '(config)\n', (423, 431), False, 'from transformers import GPT2Model, GPT2PreTrainedModel\n'), ((455, 510), 'torch.nn.Linear', 'nn.Linear', (['config.n_embd', 'config.vocab_size'], {'bias': '(False)'}), '(config.n_embd, config.vocab_size, bias=False...
#!/usr/bin/env python # -*- coding: utf-8 -*- import tensorflow as tf G = tf.get_default_graph() def p_ternarize(x, p): x = tf.tanh(x) shape = x.get_shape() thre = tf.get_variable('T', trainable=False, collections=[tf.GraphKeys.VARIABLES, 'thresholds'], initializer=0.05) flat_x = tf.res...
[ "tensorflow.scalar_summary", "tensorflow.get_variable", "tensorflow.ones", "tensorflow.tanh", "tensorflow.sign", "tensorflow.stop_gradient", "tensorflow.histogram_summary", "tensorflow.reshape", "tensorflow.get_default_graph", "tensorflow.zeros", "tensorflow.add_to_collection", "tensorflow.abs...
[((76, 98), 'tensorflow.get_default_graph', 'tf.get_default_graph', ([], {}), '()\n', (96, 98), True, 'import tensorflow as tf\n'), ((132, 142), 'tensorflow.tanh', 'tf.tanh', (['x'], {}), '(x)\n', (139, 142), True, 'import tensorflow as tf\n'), ((181, 292), 'tensorflow.get_variable', 'tf.get_variable', (['"""T"""'], {'...
#!/usr/bin/python3 # -*- coding: utf8 -*- # Copyright (c) 2021 Baidu, 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...
[ "Quanlse.QPlatform.Error.ArgumentError" ]
[((2441, 2498), 'Quanlse.QPlatform.Error.ArgumentError', 'Error.ArgumentError', (['"""QProcedure should not be operated!"""'], {}), "('QProcedure should not be operated!')\n", (2460, 2498), False, 'from Quanlse.QPlatform import Error\n'), ((2660, 2725), 'Quanlse.QPlatform.Error.ArgumentError', 'Error.ArgumentError', ([...
import sys sys.stdout.write('function CallFeedBuildCSS(settings) {\n') sys.stdout.write(' var o = "";\n') sys.stdout.write(' o+="&lt;style type=&quot;text/css&quot;&gt;\\n";\n') for line in open(sys.argv[1]).read().splitlines(): l = line.rstrip() if not l: continue l = l.replace('"', '...
[ "sys.stdout.write" ]
[((12, 71), 'sys.stdout.write', 'sys.stdout.write', (['"""function CallFeedBuildCSS(settings) {\n"""'], {}), "('function CallFeedBuildCSS(settings) {\\n')\n", (28, 71), False, 'import sys\n'), ((73, 110), 'sys.stdout.write', 'sys.stdout.write', (['""" var o = "";\n"""'], {}), '(\' var o = "";\\n\')\n', (89, 110),...
from flask import Blueprint from flask import flash, session, redirect, render_template, request, \ url_for from flask_babel import _ from app import constants from app.decorators import require_role from app.exceptions.base import DuplicateResourceException from app.forms.examination import EducationForm from app...
[ "app.decorators.require_role", "flask.render_template", "flask.request.args.get", "flask_babel._", "flask.flash", "app.forms.examination.EducationForm", "app.service.examination_service.count_examinations_by_education", "flask.url_for", "flask.redirect", "app.service.examination_service.add_educat...
[((397, 454), 'flask.Blueprint', 'Blueprint', (['"""education"""', '__name__'], {'url_prefix': '"""/education"""'}), "('education', __name__, url_prefix='/education')\n", (406, 454), False, 'from flask import Blueprint\n'), ((754, 791), 'app.decorators.require_role', 'require_role', (['Roles.EXAMINATION_WRITE'], {}), '...
# -*- coding: utf-8 -*- """ Created on Tue Oct 26 23:48:53 2021 @author: yoonseok """ import pandas as pd import os # Change to datafolder os.chdir(r"C:\data\car\\") # Report I 입력 dfA = pd.read_csv("car_1_reportTypeI_list.csv") del dfA["Unnamed: 0"] df1 = dfA[dfA["report_nm"].str.contains("(잠정)실적", regex=False) == ...
[ "os.chdir", "pandas.concat", "pandas.read_csv" ]
[((141, 170), 'os.chdir', 'os.chdir', (['"""C:\\\\data\\\\car\\\\\\\\"""'], {}), "('C:\\\\data\\\\car\\\\\\\\')\n", (149, 170), False, 'import os\n'), ((189, 230), 'pandas.read_csv', 'pd.read_csv', (['"""car_1_reportTypeI_list.csv"""'], {}), "('car_1_reportTypeI_list.csv')\n", (200, 230), True, 'import pandas as pd\n')...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os import numpy as np # Set the syspath f_name = "main.py" a_path = str(os.path.abspath(__file__)) new_sys_entry = a_path[0:len(a_path) - len(f_name)] print("Add " + new_sys_entry + "to sys path") sys.path.insert(0, new_sys_entry) from model.Program i...
[ "os.path.abspath", "sys.path.insert" ]
[((265, 298), 'sys.path.insert', 'sys.path.insert', (['(0)', 'new_sys_entry'], {}), '(0, new_sys_entry)\n', (280, 298), False, 'import sys\n'), ((139, 164), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (154, 164), False, 'import os\n')]
from django.conf.urls import include, url from .views import (EspecialidadeCrud, EspecialidadeMedicoCrud, EspecialidadeMedicoFilterView, PlanoSaudeCrud, TipoUsuarioCrud, UsuarioCrud, mudar_senha) app_name = 'usuarios' urlpatterns = [ url(r'^tipo_usuario/', include(TipoUsua...
[ "django.conf.urls.url" ]
[((533, 587), 'django.conf.urls.url', 'url', (['"""^mudar_senha/$"""', 'mudar_senha'], {'name': '"""mudar_senha"""'}), "('^mudar_senha/$', mudar_senha, name='mudar_senha')\n", (536, 587), False, 'from django.conf.urls import include, url\n')]
from django.contrib import admin from django.urls import include, path from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('',include('landing.urls')), path('products/',include('products.urls')), path('cart/',include('cart.ur...
[ "django.conf.urls.static.static", "django.urls.path", "django.urls.include" ]
[((168, 199), 'django.urls.path', 'path', (['"""admin/"""', 'admin.site.urls'], {}), "('admin/', admin.site.urls)\n", (172, 199), False, 'from django.urls import include, path\n'), ((560, 623), 'django.conf.urls.static.static', 'static', (['settings.STATIC_URL'], {'document_root': 'settings.STATIC_ROOT'}), '(settings.S...
from django.http import HttpResponseForbidden def verify_request(func): """ verify user request """ def wrapper(request): if not request.POST.get('uid', ''): return HttpResponseForbidden() return func(request) return wrapper
[ "django.http.HttpResponseForbidden" ]
[((204, 227), 'django.http.HttpResponseForbidden', 'HttpResponseForbidden', ([], {}), '()\n', (225, 227), False, 'from django.http import HttpResponseForbidden\n')]
import os import pytest from types import SimpleNamespace import git from mathlibtools.git_helpers import visit_ancestors @pytest.fixture def dummy_repo(tmp_path): r""" A -- B -- E -- I -- J -- L \ / / C --- F -- H \ / D ---- G --- K """ d ...
[ "pytest.mark.parametrize", "mathlibtools.git_helpers.visit_ancestors", "git.Repo.init" ]
[((1300, 1434), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (["['match', 'exp_found', 'exp_visited']", "[('L', 'L', ''), ('BFG', 'GF', 'LJHIE'), ('K', '', 'LJHGDIFCEBA')]"], {}), "(['match', 'exp_found', 'exp_visited'], [('L', 'L',\n ''), ('BFG', 'GF', 'LJHIE'), ('K', '', 'LJHGDIFCEBA')])\n", (1323, 1434),...
import importlib dtypes = dict() # input_type -> glue.{backend_name} glues = dict() # backend_name -> glue.{backend_name} def check_backend(b): func_names = ['get_pointer', 'get_ctype', 'dev_id', 'OpGen'] for name in func_names: assert hasattr(b, name), AttributeError( 'Attribute {} not...
[ "importlib.import_module" ]
[((584, 637), 'importlib.import_module', 'importlib.import_module', (["('.' + glue_name)", '__package__'], {}), "('.' + glue_name, __package__)\n", (607, 637), False, 'import importlib\n'), ((784, 814), 'importlib.import_module', 'importlib.import_module', (['sp[0]'], {}), '(sp[0])\n', (807, 814), False, 'import import...
import os import sys import json import time from distutils.version import LooseVersion import importlib import pip from enum import Enum import logging import csv import subprocess try: main = pip.main except AttributeError: # module 'pip' has no attribute 'main' from pip._internal import main apikey = ''...
[ "logging.basicConfig", "requests.post", "csv.DictReader", "logging.debug", "importlib.import_module", "logging.warning", "logging.info", "requests.get", "time.sleep", "logging.fatal", "steampy.client.SteamClient", "steampy.confirmation.ConfirmationExecutor", "pip._internal.main", "os._exit...
[((667, 678), 'time.time', 'time.time', ([], {}), '()\n', (676, 678), False, 'import time\n'), ((692, 703), 'time.time', 'time.time', ([], {}), '()\n', (701, 703), False, 'import time\n'), ((705, 871), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""trade.log"""', 'level': 'logging.DEBUG', 'format':...
#!/usr/bin/env python """ Created on March 1, 2016 @author: <NAME>, <EMAIL>, <NAME>, University of Chicago Use ./CalcP.py -h to see usage Credit for the arbfit code goes to Nablaquabla """ import numpy as np import matplotlib.pylab as plt from mpfit import mpfit VERSION="0.9" from scipy.stats import kendalltau from...
[ "numpy.sqrt", "argparse.ArgumentParser", "statsmodels.stats.multitest.multipletests", "scipy.stats.gamma.fit", "scipy.stats.gamma", "numpy.array", "numpy.sum", "pandas.read_table", "numpy.cumsum", "numpy.vectorize", "mpfit.mpfit" ]
[((922, 959), 'pandas.read_table', 'pd.read_table', (['fn_jtk'], {'index_col': '"""ID"""'}), "(fn_jtk, index_col='ID')\n", (935, 959), True, 'import pandas as pd\n'), ((1632, 1673), 'scipy.stats.gamma', 'ss.gamma', (['params[0]', 'params[1]', 'params[2]'], {}), '(params[0], params[1], params[2])\n', (1640, 1673), True,...
from distutils.core import Extension from astropy_helpers import setup_helpers def get_extensions(): exts = [] # malloc mac_incl_path = "/usr/include/malloc" cfg = setup_helpers.DistutilsExtensionArgs() cfg['include_dirs'].append('numpy') cfg['include_dirs'].append(mac_incl_path) cfg['inc...
[ "distutils.core.Extension", "astropy_helpers.setup_helpers.DistutilsExtensionArgs" ]
[((183, 221), 'astropy_helpers.setup_helpers.DistutilsExtensionArgs', 'setup_helpers.DistutilsExtensionArgs', ([], {}), '()\n', (219, 221), False, 'from astropy_helpers import setup_helpers\n'), ((609, 647), 'astropy_helpers.setup_helpers.DistutilsExtensionArgs', 'setup_helpers.DistutilsExtensionArgs', ([], {}), '()\n'...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Поиск файла python filem/samples/search_file.py --file путь_к_файлу [--create --no_clear_shell] """ # ###################################################################################################################### # Импорт необходимых инструментов # ##########...
[ "trml.shell.Shell.clear", "os.path.splitext", "argparse.ArgumentParser", "filem.file_manager.FileManager" ]
[((1050, 1075), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1073, 1075), False, 'import argparse\n'), ((1654, 1684), 'os.path.splitext', 'os.path.splitext', (["args['file']"], {}), "(args['file'])\n", (1670, 1684), False, 'import os\n'), ((1725, 1738), 'filem.file_manager.FileManager', 'Fil...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import cv2 import numpy as np import tensorflow as tf from src import utils box_size = 368 hm_factor = 8 joints_num = 21 scales = [1.0, 0.7] limb_parents = [1, 15, 1, 2, 3, 1, 5, 6, 14, 8, 9, 14, 11, 12, 14, 14, 1, 4, 7, 10, 13] with tf.Session() as sess: saver = ...
[ "numpy.hstack", "tensorflow.Session", "src.utils.extract_2d_joints_from_heatmaps", "cv2.imshow", "cv2.waitKey", "tensorflow.train.import_meta_graph", "src.utils.draw_limbs_2d", "src.utils.img_scale_squarify", "numpy.vstack", "cv2.destroyAllWindows", "tensorflow.train.latest_checkpoint", "cv2.i...
[((286, 298), 'tensorflow.Session', 'tf.Session', ([], {}), '()\n', (296, 298), True, 'import tensorflow as tf\n'), ((320, 381), 'tensorflow.train.import_meta_graph', 'tf.train.import_meta_graph', (['"""./models/tf_model/vnect_tf.meta"""'], {}), "('./models/tf_model/vnect_tf.meta')\n", (346, 381), True, 'import tensorf...
""" Example of defining a custom (image) transform using FFCV. For tutorial, see https://docs.ffcv.io/ffcv_examples/custom_transforms.html. """ import time import numpy as np import torchvision from ffcv.fields import IntField, RGBImageField from ffcv.fields.decoders import SimpleRGBImageDecoder from ffcv.loader impo...
[ "ffcv.fields.RGBImageField", "ffcv.transforms.ToTensor", "numpy.random.rand", "ffcv.fields.IntField", "ffcv.pipeline.compiler.Compiler.get_iterator", "ffcv.loader.Loader", "dataclasses.replace", "torchvision.datasets.CIFAR10", "ffcv.fields.decoders.SimpleRGBImageDecoder", "time.time", "ffcv.pipe...
[((1513, 1576), 'torchvision.datasets.CIFAR10', 'torchvision.datasets.CIFAR10', (['"""/tmp"""'], {'train': '(True)', 'download': '(True)'}), "('/tmp', train=True, download=True)\n", (1541, 1576), False, 'import torchvision\n'), ((1978, 2122), 'ffcv.loader.Loader', 'Loader', (['f"""/tmp/cifar.beton"""'], {'batch_size': ...
import sys, os from dpmModule.character.characterTemplate import get_template_generator from dpmModule.util.dpmgenerator import IndividualDPMGenerator from dpmModule.util.configurations import export_configuration from dpmModule.kernel import graph from dpmModule.jobs import jobMap from dpmModule.kernel import core ...
[ "dpmModule.jobs.jobMap.keys", "argparse.ArgumentParser", "dpmModule.util.dpmgenerator.IndividualDPMGenerator", "dpmModule.character.characterTemplate.get_template_generator", "dpmModule.util.configurations.export_configuration" ]
[((449, 493), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""DPM Test argument"""'], {}), "('DPM Test argument')\n", (472, 493), False, 'import argparse\n'), ((1234, 1247), 'dpmModule.jobs.jobMap.keys', 'jobMap.keys', ([], {}), '()\n', (1245, 1247), False, 'from dpmModule.jobs import jobMap\n'), ((1414, 14...
"""Create the mailboxes table Revision ID: e0a4da5dbe40 Revises: <PASSWORD> Create Date: 2020-01-21 16:15:00.257930 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "e0a4da5dbe40" down_revision = "<PASSWORD>" branch_labels = None depends_on = None def upgrade(...
[ "sqlalchemy.ForeignKeyConstraint", "sqlalchemy.true", "sqlalchemy.DateTime", "alembic.op.drop_table", "alembic.op.f", "sqlalchemy.Boolean", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Integer", "sqlalchemy.String" ]
[((1541, 1567), 'alembic.op.drop_table', 'op.drop_table', (['"""mailboxes"""'], {}), "('mailboxes')\n", (1554, 1567), False, 'from alembic import op\n'), ((929, 1028), 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["('domain_id',)", "['domains.id']"], {'onupdate': '"""CASCADE"""', 'ondelete': '"""CASCA...
# reproduced from 'https://github.com/oxwhirl/smac/blob/master/smac/examples/random_agents.py' from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import yaml import os from smix.src.components.episode_buffer import ReplayBuffer from smix.sr...
[ "smix.src.components.transforms.OneHot", "types.SimpleNamespace", "yaml.load", "smix.src.controllers.basic_controller.BasicMAC", "smix.src.components.episode_buffer.ReplayBuffer", "copy.deepcopy", "utils.logging.get_logger" ]
[((2517, 2534), 'types.SimpleNamespace', 'SN', ([], {}), '(**config_dict)\n', (2519, 2534), True, 'from types import SimpleNamespace as SN\n'), ((2603, 2615), 'utils.logging.get_logger', 'get_logger', ([], {}), '()\n', (2613, 2615), False, 'from utils.logging import get_logger\n'), ((3939, 4063), 'smix.src.components.e...
import unittest.mock from programy.clients.config import ClientConfigurationData from programy.clients.events.client import EventBotClient from programytest.clients.arguments import MockArgumentParser class MockEventBotClient(EventBotClient): def __init__(self, id, argument_parser=None): EventBotClient....
[ "programy.clients.config.ClientConfigurationData", "programy.clients.events.client.EventBotClient", "programytest.clients.arguments.MockArgumentParser", "programy.clients.events.client.EventBotClient.__init__" ]
[((305, 355), 'programy.clients.events.client.EventBotClient.__init__', 'EventBotClient.__init__', (['self', 'id', 'argument_parser'], {}), '(self, id, argument_parser)\n', (328, 355), False, 'from programy.clients.events.client import EventBotClient\n'), ((412, 445), 'programy.clients.config.ClientConfigurationData', ...