code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import os PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) MODEL_PATH = os.path.join(PROJECT_ROOT, 'models') DATA_PATH = os.path.join(PROJECT_ROOT, 'data')
[ "os.path.abspath", "os.path.join" ]
[((100, 136), 'os.path.join', 'os.path.join', (['PROJECT_ROOT', '"""models"""'], {}), "(PROJECT_ROOT, 'models')\n", (112, 136), False, 'import os\n'), ((149, 183), 'os.path.join', 'os.path.join', (['PROJECT_ROOT', '"""data"""'], {}), "(PROJECT_ROOT, 'data')\n", (161, 183), False, 'import os\n'), ((59, 84), 'os.path.abs...
import FWCore.ParameterSet.Config as cms from CondCore.DBCommon.CondDBCommon_cfi import * PoolDBESSourcebtagMuJetsWpNoTtbar = cms.ESSource("PoolDBESSource", CondDBCommon, toGet = cms.VPSet( # # working points # cms.PSet( record = cms.stri...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.untracked.string" ]
[((312, 350), 'FWCore.ParameterSet.Config.string', 'cms.string', (['"""PerformancePayloadRecord"""'], {}), "('PerformancePayloadRecord')\n", (322, 350), True, 'import FWCore.ParameterSet.Config as cms\n'), ((362, 453), 'FWCore.ParameterSet.Config.string', 'cms.string', (['"""PerformancePayloadFromBinnedTFormula_MUJETSW...
import os import sys import pytest import mfr HERE = os.path.dirname(os.path.abspath(__file__)) # Pydocx .3.14 does not support python 3 if not sys.version_info >= (3, 0): from mfr.ext.docx import Handler as DocxFileHandler from mfr.ext.docx.render import render_docx @pytest.mark.skipif(sys.version_info ...
[ "mfr.ext.docx.render.render_docx", "os.path.join", "mfr.ext.docx.Handler", "pytest.mark.skipif", "os.path.abspath", "mfr.register_filehandler" ]
[((284, 380), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(sys.version_info >= (3, 0))'], {'reason': '"""pydocx 0.3.14 does not support py3"""'}), "(sys.version_info >= (3, 0), reason=\n 'pydocx 0.3.14 does not support py3')\n", (302, 380), False, 'import pytest\n'), ((471, 567), 'pytest.mark.skipif', 'pytest.mar...
#!/usr/bin/env python3 # --coding: utf-8 -- import argparse from random import randint MAX_NUMBER_OF_NUMBERS = 5 # 构成算式的数字的最大数量 MAX_NUMBER_LIMIT = 100000 # 构成算式中的数字的最大值上限 MIN_NUMBER_LIMIT = -100000 # 构成算式中的数字的最小值下限 MAX_QUANTITY = 200 # 生成题目的最大数量 def gen_operation_symbol(): """随机生成运算符号 随机生成'+'或'-',用于构建...
[ "random.randint", "argparse.ArgumentParser" ]
[((4793, 4847), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""生成指定数量的简单加减法数学题"""'}), "(description='生成指定数量的简单加减法数学题')\n", (4816, 4847), False, 'import argparse\n'), ((835, 866), 'random.randint', 'randint', (['min_number', 'max_number'], {}), '(min_number, max_number)\n', (842, 866), Fa...
from collections import defaultdict class Graph(): def __init__(self, num_of_vertices): self.graph = defaultdict(list) self.num_of_vertices = num_of_vertices def addEdge(self, src_node, dest_node): self.graph[src_node].append(dest_node) def isCyclicUtil(self, cur_node_idx, visi...
[ "collections.defaultdict" ]
[((115, 132), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (126, 132), False, 'from collections import defaultdict\n')]
from simple_NER.utils.log import LOG from simple_NER.rules import RuleNER from simple_NER import Entity from os.path import expanduser, isdir, join from os import makedirs try: from padatious import IntentContainer except ImportError: LOG.error("padatious not found, run") LOG.error("pip install fann2==1.0....
[ "simple_NER.Entity", "os.makedirs", "simple_NER.utils.log.LOG.error", "os.path.join", "os.path.isdir", "pprint.pprint", "os.path.expanduser" ]
[((244, 281), 'simple_NER.utils.log.LOG.error', 'LOG.error', (['"""padatious not found, run"""'], {}), "('padatious not found, run')\n", (253, 281), False, 'from simple_NER.utils.log import LOG\n'), ((286, 323), 'simple_NER.utils.log.LOG.error', 'LOG.error', (['"""pip install fann2==1.0.7"""'], {}), "('pip install fann...
"""Drug Response Predictor @author: <NAME> This module centralizes the domain adaptation strategy towards biology-aware drug response prediction on in-vivo dataset. Example ------- Examples are given in the vignettes. Notes ------- Examples are given in the vignette References ------- [1] <NAME>., <NAME>., ...
[ "scipy.stats.pearsonr", "precise.pipeline_routine.FlowProjector", "sklearn.linear_model.ElasticNet", "precise.pipeline_routine.GeodesicMatrixComputer", "numpy.memmap", "sklearn.linear_model.Ridge", "sklearn.preprocessing.StandardScaler", "numpy.array", "numpy.zeros", "precise.intermediate_factors....
[((6854, 6946), 'precise.principal_vectors.PVComputation', 'PVComputation', (['self.n_factors', 'self.n_pv', 'self.dim_reduction', 'self.dim_reduction_target'], {}), '(self.n_factors, self.n_pv, self.dim_reduction, self.\n dim_reduction_target)\n', (6867, 6946), False, 'from precise.principal_vectors import PVComput...
from collections import OrderedDict from datetime import datetime from moto.core import BaseBackend, BaseModel from moto.core.utils import BackendDict from moto.utilities.paginator import paginate from .exceptions import RecipeAlreadyExistsException, RecipeNotFoundException class DataBrewBackend(BaseBackend): PA...
[ "moto.core.utils.BackendDict", "datetime.datetime.now", "collections.OrderedDict", "moto.utilities.paginator.paginate" ]
[((2305, 2345), 'moto.core.utils.BackendDict', 'BackendDict', (['DataBrewBackend', '"""databrew"""'], {}), "(DataBrewBackend, 'databrew')\n", (2316, 2345), False, 'from moto.core.utils import BackendDict\n'), ((1253, 1296), 'moto.utilities.paginator.paginate', 'paginate', ([], {'pagination_model': 'PAGINATION_MODEL'}),...
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, <NAME> <<EMAIL>> 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...
[ "numpy.testing.assert_allclose", "pytest.raises" ]
[((1428, 1466), 'numpy.testing.assert_allclose', 'assert_allclose', (['Ts_sums_calc', 'Ts_sums'], {}), '(Ts_sums_calc, Ts_sums)\n', (1443, 1466), False, 'from numpy.testing import assert_allclose\n'), ((1658, 1702), 'numpy.testing.assert_allclose', 'assert_allclose', (['diffs_sums_calc', 'diffs_sums'], {}), '(diffs_sum...
#!/usr/bin/env python from setuptools import setup, find_packages from csvhandler import VERSION setup(name='csvhandler', version=VERSION, url='https://github.com/bantalon/csvhandler', author="<NAME>", author_email="<EMAIL>", description="A command-line utility and Python API for manipul...
[ "setuptools.find_packages" ]
[((505, 538), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['tests*']"}), "(exclude=['tests*'])\n", (518, 538), False, 'from setuptools import setup, find_packages\n')]
import random from hfo import MOVE_TO, DRIBBLE_TO, KICK_TO, NOOP, SHOOT, PASS from agents.base.hfo_attacking_player import HFOAttackingPlayer from agents.agent_module_simple_q.features.discrete_features import \ DiscreteFeatures1Teammate class DiscreteActionsModule: """ This class uniforms Move and Dribble ...
[ "random.choice" ]
[((3609, 3640), 'random.choice', 'random.choice', (['[0.17, 0, -0.17]'], {}), '([0.17, 0, -0.17])\n', (3622, 3640), False, 'import random\n'), ((4509, 4540), 'random.choice', 'random.choice', (['[0.17, 0, -0.17]'], {}), '([0.17, 0, -0.17])\n', (4522, 4540), False, 'import random\n')]
#!/usr/bin/env python # # Purpose: Helper script to identify the required data fields for a particular # secret template that is used to create secrets in a Thycotic Secret Server # instance. # # Requirements: # - This script depends on the file ../test_args/thycotic_secret.json # to exist and have valid URL endpoi...
[ "argparse.ArgumentParser", "yaml.dump", "suds.client.Client", "os.path.dirname", "json.load" ]
[((841, 945), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Get and format the required parameters for a Secret Template"""'}), "(description=\n 'Get and format the required parameters for a Secret Template')\n", (864, 945), False, 'import argparse\n'), ((1355, 1402), 'suds.client.Cl...
"""Generate coil geometries. This module provides functions to generate various coil geometries that can be used in conjuction with the eppy module to calculate eddy currents in flat plates. """ import numpy as np import numpy.typing as npt # ---------------------------------------------------------------------- #...
[ "numpy.tile", "numpy.ceil", "numpy.sqrt", "numpy.cross", "numpy.hstack", "numpy.column_stack", "numpy.array", "numpy.zeros", "numpy.linspace", "numpy.empty", "numpy.cos", "numpy.dot", "numpy.linalg.norm", "numpy.sin", "numpy.vstack" ]
[((1045, 1067), 'numpy.array', 'np.array', (['[start, end]'], {}), '([start, end])\n', (1053, 1067), True, 'import numpy as np\n'), ((1079, 1095), 'numpy.array', 'np.array', (['[0, 1]'], {}), '([0, 1])\n', (1087, 1095), True, 'import numpy as np\n'), ((1129, 1156), 'numpy.linalg.norm', 'np.linalg.norm', (['(end - start...
from setuptools import setup, find_packages, Extension ####################################### # Prepare list of compiled extensions # ####################################### extensions = [] # C extension called via ctypes extensions.append( Extension( # "name" defines the location of the compile...
[ "Cython.Build.cythonize", "numpy.distutils.core.Extension", "setuptools.find_packages" ]
[((1549, 1577), 'Cython.Build.cythonize', 'cythonize', (['cython_extensions'], {}), '(cython_extensions)\n', (1558, 1577), False, 'from Cython.Build import cythonize\n'), ((253, 470), 'numpy.distutils.core.Extension', 'Extension', ([], {'name': '"""pypkgexample.mymodule_c_with_ctypes.hellofcctyp"""', 'sources': "['pypk...
import configparser import json import os from typing import List import requests class GroupDoesntExistException(Exception): pass class Group(object): def __init__(self, name, group_id): self._name = name self._group_id = group_id @property def name(self) -> str: return s...
[ "json.loads", "configparser.ConfigParser", "json.dumps", "requests.get", "requests.put", "os.path.abspath" ]
[((908, 935), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (933, 935), False, 'import configparser\n'), ((2919, 2950), 'requests.put', 'requests.put', (['uri', 'payload_json'], {}), '(uri, payload_json)\n', (2931, 2950), False, 'import requests\n'), ((1775, 1805), 'requests.get', 'request...
import logging import datetime from django.utils import timezone from plotly.offline import plot from plotly.graph_objs import Layout, Bar, Histogram, Histogram2d, Scatter, XAxis, Margin logger = logging.getLogger(__name__) COLOR_PRIMARY = '#26ad81' COLOR_INFO = '#1d8362' COLOR_SUCCESS = '#3fad46' COLOR_WARNING = '#...
[ "logging.getLogger", "plotly.offline.plot", "plotly.graph_objs.Margin" ]
[((198, 225), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (215, 225), False, 'import logging\n'), ((1218, 1334), 'plotly.offline.plot', 'plot', ([], {'figure_or_data': 'figure_or_data', 'show_link': '(False)', 'output_type': '"""div"""', 'include_plotlyjs': '(False)', 'auto_open': '(Fa...
import os import sys import collections import typing import re from json import JSONDecoder from typing import List import pandas as pd import requests from d3m.primitive_interfaces.transformer import TransformerPrimitiveBase from d3m.primitive_interfaces.base import CallResult from d3m import container, utils from d...
[ "collections.OrderedDict", "d3m.container.DataFrame", "d3m.metadata.hyperparams.UniformInt", "requests.get", "os.path.dirname", "json.JSONDecoder", "re.sub" ]
[((1314, 1610), 'd3m.metadata.hyperparams.UniformInt', 'hyperparams.UniformInt', ([], {'lower': '(1)', 'upper': 'sys.maxsize', 'default': '(100)', 'semantic_types': "['https://metadata.datadrivendiscovery.org/types/TuningParameter']", 'description': '"""timeout, how much time to give elastic search database to startup,...
from bokeh.io import output_file from bokeh.models import ColumnDataSource,\ CategoricalColorMapper, NumeralTickFormatter from bokeh.layouts import gridplot from bokeh.plotting import figure, show from read_nba_data import nuggets_2 output_file('nugget_scatter.html', title='Nuggets Statistics') nugget_stats = Co...
[ "bokeh.io.output_file", "bokeh.models.CategoricalColorMapper", "bokeh.plotting.figure", "bokeh.plotting.show", "bokeh.layouts.gridplot", "bokeh.models.NumeralTickFormatter", "bokeh.models.ColumnDataSource" ]
[((239, 301), 'bokeh.io.output_file', 'output_file', (['"""nugget_scatter.html"""'], {'title': '"""Nuggets Statistics"""'}), "('nugget_scatter.html', title='Nuggets Statistics')\n", (250, 301), False, 'from bokeh.io import output_file\n'), ((318, 345), 'bokeh.models.ColumnDataSource', 'ColumnDataSource', (['nuggets_2']...
# -*- coding: utf-8 -*- # (c) Copyright 2020 Sensirion AG, Switzerland ############################################################################## ############################################################################## # _____ _ _ _______ _____ ____ _ _ # / ____| ...
[ "logging.getLogger", "struct.pack" ]
[((1167, 1194), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1184, 1194), False, 'import logging\n'), ((1969, 1987), 'struct.pack', 'pack', (['""">B"""', 'handle'], {}), "('>B', handle)\n", (1973, 1987), False, 'from struct import pack, unpack\n')]
'Test of label scope and label exporter' import numpy as np from videocore.assembler import qpu, get_label_positions from videocore.driver import Driver @qpu def given_jmp(asm): mov(ra0, uniform) mov(r0, 0) L.entry jmp(reg=ra0) nop() nop() nop() iadd(r0, r0, 1) L.test iadd...
[ "videocore.driver.Driver", "videocore.assembler.get_label_positions", "numpy.all" ]
[((497, 527), 'videocore.assembler.get_label_positions', 'get_label_positions', (['given_jmp'], {}), '(given_jmp)\n', (516, 527), False, 'from videocore.assembler import qpu, get_label_positions\n'), ((709, 717), 'videocore.driver.Driver', 'Driver', ([], {}), '()\n', (715, 717), False, 'from videocore.driver import Dri...
from __future__ import print_function,division import os,sys,re import numpy as np import matplotlib.pyplot as plt import pandas as pd import h5py from scipy.ndimage.filters import gaussian_filter from scipy.ndimage import median_filter from scipy.optimize import leastsq, curve_fit from scipy.signal import lombscargl...
[ "numpy.log10", "scipy.ndimage.filters.gaussian_filter", "numpy.polyfit", "acor.function", "numpy.argsort", "numpy.array", "numpy.arange", "matplotlib.pyplot.plot", "numpy.polyval", "pandas.DataFrame", "logging.warning", "numpy.argmax", "numpy.isnan", "numpy.atleast_1d", "scipy.optimize.c...
[((641, 657), 'numpy.atleast_1d', 'np.atleast_1d', (['t'], {}), '(t)\n', (654, 657), True, 'import numpy as np\n'), ((675, 691), 'numpy.atleast_1d', 'np.atleast_1d', (['f'], {}), '(f)\n', (688, 691), True, 'import numpy as np\n'), ((3081, 3108), 'matplotlib.pyplot.plot', 'plt.plot', (['lag', 'ac'], {}), '(lag, ac, **kw...
"""Summation of primes The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. """ from euler.solutions import solution_3 def prime_sum(limit): """Compute the sum of all primes below the given limit. Arguments: limit (int): The limit below which prime...
[ "euler.solutions.solution_3.sieve_of_eratosthenes" ]
[((449, 488), 'euler.solutions.solution_3.sieve_of_eratosthenes', 'solution_3.sieve_of_eratosthenes', (['limit'], {}), '(limit)\n', (481, 488), False, 'from euler.solutions import solution_3\n')]
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from collections import defaultdict from logging import getLogger import os from os.path import join from subprocess import CalledProcessError, check_call import sys from traceback import format_exc import warnin...
[ "logging.getLogger", "cytoolz.itertoolz.concatv", "traceback.format_exc", "subprocess.check_call", "os.path.join", "os.environ.copy", "collections.defaultdict" ]
[((1894, 1913), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (1903, 1913), False, 'from logging import getLogger\n'), ((2002, 2051), 'os.path.join', 'join', (['extracted_package_dir', '"""info"""', '"""index.json"""'], {}), "(extracted_package_dir, 'info', 'index.json')\n", (2006, 2051), False,...
# coding=utf-8 from functools import partial from logging import addLevelName, getLogger as _getLogger, setLoggerClass, \ FileHandler, Filter, Formatter, Logger, LogRecord, StreamHandler, CRITICAL, DEBUG, ERROR, INFO, NOTSET, WARNING from string import Template from typing import cast, Any, Callable, Iterable, Mapp...
[ "logging.getLogger", "logging.setLoggerClass", "logging.StreamHandler", "string.Template", "logging.Formatter", "functools.partial", "logging.FileHandler", "logging.addLevelName", "colorama.init" ]
[((706, 740), 'string.Template', 'Template', (['"""[$level_name] $message"""'], {}), "('[$level_name] $message')\n", (714, 740), False, 'from string import Template\n'), ((765, 785), 'string.Template', 'Template', (['"""$message"""'], {}), "('$message')\n", (773, 785), False, 'from string import Template\n'), ((1714, 1...
# Copyright 2018 Catalyst Cloud Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ "oslo_utils.timeutils.utcnow", "keystone.notifications.register_event_callback", "oslo_utils.timeutils.parse_isotime", "keystone.i18n._", "oslo_utils.timeutils.normalize_time", "keystone.exception.ReceiptNotFound", "keystone.common.cache.get_memoization_decorator", "keystone.common.cache.create_region...
[((1042, 1065), 'oslo_log.log.getLogger', 'log.getLogger', (['__name__'], {}), '(__name__)\n', (1055, 1065), False, 'from oslo_log import log\n'), ((1123, 1159), 'keystone.common.cache.create_region', 'cache.create_region', ([], {'name': '"""receipts"""'}), "(name='receipts')\n", (1142, 1159), False, 'from keystone.com...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ utils ~~~~~ Provides miscellaneous utility methods """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) import requests from ijson import items def get_records(**kwargs): ...
[ "ijson.items", "requests.get" ]
[((436, 483), 'requests.get', 'requests.get', (['url'], {'stream': '(True)', 'headers': 'headers'}), '(url, stream=True, headers=headers)\n', (448, 483), False, 'import requests\n'), ((496, 528), 'ijson.items', 'items', (['r.raw', "kwargs['LOCATION']"], {}), "(r.raw, kwargs['LOCATION'])\n", (501, 528), False, 'from ijs...
import time import logging import numpy as np from supervised.callbacks.callback import Callback from supervised.exceptions import AutoMLException from supervised.utils.config import LOG_LEVEL log = logging.getLogger(__name__) log.setLevel(LOG_LEVEL) class TotalTimeConstraint(Callback): def __init__(self, params...
[ "logging.getLogger", "time.time", "numpy.round", "supervised.exceptions.AutoMLException" ]
[((200, 227), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (217, 227), False, 'import logging\n'), ((727, 738), 'time.time', 'time.time', ([], {}), '()\n', (736, 738), False, 'import time\n'), ((1116, 1127), 'time.time', 'time.time', ([], {}), '()\n', (1125, 1127), False, 'import time\n...
import logging import time from abc import ABCMeta, abstractmethod from .endpoints.objects_v2.uuid.set_uuid import SetUuid from .endpoints.objects_v2.channel.get_all_channels import GetAllChannels from .endpoints.objects_v2.channel.get_channel import GetChannel from .endpoints.objects_v2.channel.remove_channel import...
[ "logging.getLogger", "time.time" ]
[((3589, 3616), 'logging.getLogger', 'logging.getLogger', (['"""pubnub"""'], {}), "('pubnub')\n", (3606, 3616), False, 'import logging\n'), ((10647, 10658), 'time.time', 'time.time', ([], {}), '()\n', (10656, 10658), False, 'import time\n')]
import numbers import warnings from typing import Union from copy import deepcopy from abc import ABC, abstractmethod import torch import numpy as np import SimpleITK as sitk from .. import TypeData, INTENSITY, DATA from ..data.image import Image from ..data.subject import Subject from ..data.dataset import ImagesDat...
[ "torch.rand", "torch.from_numpy", "numpy.errstate", "copy.deepcopy", "warnings.warn", "torch.cat" ]
[((2031, 2047), 'copy.deepcopy', 'deepcopy', (['sample'], {}), '(sample)\n', (2039, 2047), False, 'from copy import deepcopy\n'), ((2062, 2086), 'numpy.errstate', 'np.errstate', ([], {'all': '"""raise"""'}), "(all='raise')\n", (2073, 2086), True, 'import numpy as np\n'), ((2361, 2378), 'torch.cat', 'torch.cat', (['imag...
"""Script for creating a SQLite database from csv files.""" # Standard library imports import sqlite3 from pathlib import Path from glob import glob # Third party imports import pandas as pd conn = sqlite3.connect("steelprofiles.db") assets = Path(__file__).parent.parent / "assets" for f in glob(f"{str(assets)}/*.c...
[ "sqlite3.connect", "pandas.read_csv", "pathlib.Path" ]
[((201, 236), 'sqlite3.connect', 'sqlite3.connect', (['"""steelprofiles.db"""'], {}), "('steelprofiles.db')\n", (216, 236), False, 'import sqlite3\n'), ((335, 349), 'pandas.read_csv', 'pd.read_csv', (['f'], {}), '(f)\n', (346, 349), True, 'import pandas as pd\n'), ((367, 374), 'pathlib.Path', 'Path', (['f'], {}), '(f)\...
# -*- coding: utf-8 -*- # @Time : 2021/8/25 8:15 # @Author : pixb # @Email : <EMAIL> # @File : test_main_view.py # @Software: PyCharm # @Description: from view.main_view import main_view def test_main_back(): main_view().click_back() def test_click_enter(): main_view().click_enter() def test_add_sp...
[ "view.main_view.main_view" ]
[((224, 235), 'view.main_view.main_view', 'main_view', ([], {}), '()\n', (233, 235), False, 'from view.main_view import main_view\n'), ((278, 289), 'view.main_view.main_view', 'main_view', ([], {}), '()\n', (287, 289), False, 'from view.main_view import main_view\n'), ((331, 342), 'view.main_view.main_view', 'main_view...
import logging import unittest import uuid from gaia_sdk.graphql import PerceiveDataImpulse from gaia_sdk.graphql.request.input.CancelSkillBuildJobImpulse import CancelSkillBuildJobImpulse from gaia_sdk.graphql.request.input.CreateSkillBuildJobImpulse import CreateSkillBuildJobImpulse from gaia_sdk.tests.mock import M...
[ "logging.basicConfig", "gaia_sdk.graphql.request.input.CancelSkillBuildJobImpulse.CancelSkillBuildJobImpulse", "gaia_sdk.tests.mock.MockResponse", "gaia_sdk.graphql.request.input.CreateSkillBuildJobImpulse.CreateSkillBuildJobImpulse", "unittest.main" ]
[((379, 419), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (398, 419), False, 'import logging\n'), ((2544, 2559), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2557, 2559), False, 'import unittest\n'), ((610, 944), 'gaia_sdk.tests.mock.MockResponse', ...
#!/usr/bin/env python3 import roslib import rospy import tf from nav_msgs.msg import Odometry from std_msgs.msg import Header from geometry_msgs.msg import PoseWithCovarianceStamped from geometry_msgs.msg import PoseWithCovariance from geometry_msgs.msg import Vector3, Point, PoseStamped, TwistStamped, PointStamped f...
[ "tf.TransformBroadcaster", "rospy.Publisher", "rospy.logwarn", "rospy.init_node", "rospy.get_param", "rospy.Time.now", "geometry_msgs.msg.PoseStamped", "rospy.spin", "rospy.Subscriber", "rospy.loginfo" ]
[((2925, 2973), 'rospy.init_node', 'rospy.init_node', (['"""apriltag_norm"""'], {'anonymous': '(True)'}), "('apriltag_norm', anonymous=True)\n", (2940, 2973), False, 'import rospy\n'), ((3006, 3046), 'rospy.loginfo', 'rospy.loginfo', (['"""intialize apriltag norm"""'], {}), "('intialize apriltag norm')\n", (3019, 3046)...
#Imports from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains from time import sleep import smtplib import sys import credentials #The file which stores passwords and guest id's #All the rides with fastpasses: ak = animal kingd...
[ "selenium.webdriver.Chrome", "selenium.webdriver.ChromeOptions", "time.sleep", "sys.exit" ]
[((5786, 5811), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (5809, 5811), False, 'from selenium import webdriver\n'), ((5905, 5951), 'selenium.webdriver.Chrome', 'webdriver.Chrome', (['chrome_path'], {'options': 'options'}), '(chrome_path, options=options)\n', (5921, 5951), False, '...
""" Implements DEIMOS-specific functions, including reading in slitmask design files. """ import glob import re import os import numpy as np import warnings from scipy import interpolate from astropy.io import fits from pypeit import msgs from pypeit import telescopes from pypeit.core import parse from pypeit.core ...
[ "numpy.radians", "pypeit.par.pypeitpar.PypeItPar", "pypeit.par.pypeitpar.DetectorPar", "scipy.interpolate.interp1d", "numpy.array", "astropy.io.fits.open", "numpy.sin", "pypeit.core.framematch.check_frame_exptime", "pypeit.core.parse.load_sections", "pypeit.msgs.error", "pypeit.spectrographs.opt...
[((919, 948), 'pypeit.telescopes.KeckTelescopePar', 'telescopes.KeckTelescopePar', ([], {}), '()\n', (946, 948), False, 'from pypeit import telescopes\n'), ((9511, 9532), 'pypeit.par.pypeitpar.PypeItPar', 'pypeitpar.PypeItPar', ([], {}), '()\n', (9530, 9532), False, 'from pypeit.par import pypeitpar\n'), ((15945, 16003...
# tests/artclass/test_train.py # Test artclass/train.py unit components. import numpy as np from artclass import train def test_find_best_threshold(): y_true = np.array([[1, 0], [0, 1], [0, 0], [1, 1]]) y_prob = np.array([[0.75, 0.25], [0.25, 0.75], [0.25, 0.25], [0.75, 0.75]]) assert train.find_best_th...
[ "numpy.array", "artclass.train.find_best_threshold" ]
[((168, 210), 'numpy.array', 'np.array', (['[[1, 0], [0, 1], [0, 0], [1, 1]]'], {}), '([[1, 0], [0, 1], [0, 0], [1, 1]])\n', (176, 210), True, 'import numpy as np\n'), ((224, 290), 'numpy.array', 'np.array', (['[[0.75, 0.25], [0.25, 0.75], [0.25, 0.25], [0.75, 0.75]]'], {}), '([[0.75, 0.25], [0.25, 0.75], [0.25, 0.25],...
#!/usr/bin/env python3 from aws_cdk import core from runner.runner_stack import RunnerStack import os app = core.App() region = os.environ.get("AWS_REGION", "us-west-1") account_id = os.environ.get("AWS_ACCOUNT_ID","566086065616") env = core.Environment(region=region, account=account_id) RunnerStack(app, "runner"...
[ "aws_cdk.core.Environment", "runner.runner_stack.RunnerStack", "os.environ.get", "aws_cdk.core.App" ]
[((111, 121), 'aws_cdk.core.App', 'core.App', ([], {}), '()\n', (119, 121), False, 'from aws_cdk import core\n'), ((133, 174), 'os.environ.get', 'os.environ.get', (['"""AWS_REGION"""', '"""us-west-1"""'], {}), "('AWS_REGION', 'us-west-1')\n", (147, 174), False, 'import os\n'), ((188, 236), 'os.environ.get', 'os.environ...
# Copyright (c) Facebook, Inc. and its affiliates. from minihack import MiniHackNavigation from minihack.level_generator import PATH_DAT_DIR from gym.envs import registration from nle.nethack import Command from nle import nethack import os MOVE_ACTIONS = tuple(nethack.CompassDirection) APPLY_ACTIONS = tuple(list(MOVE...
[ "gym.envs.registration.register", "os.path.join" ]
[((4127, 4249), 'gym.envs.registration.register', 'registration.register', ([], {'id': '"""MiniHack-KeyRoom-Fixed-S5-v0"""', 'entry_point': '"""minihack.envs.keyroom:MiniHackKeyRoom5x5Fixed"""'}), "(id='MiniHack-KeyRoom-Fixed-S5-v0', entry_point=\n 'minihack.envs.keyroom:MiniHackKeyRoom5x5Fixed')\n", (4148, 4249), F...
# app.py from dataclasses import dataclass, field from venusian import Scanner from wired import ServiceRegistry from . import models @dataclass class App: registry: ServiceRegistry = field(default_factory=ServiceRegistry) def scan(self): # Look for decorators scanner = Scanner(registry=sel...
[ "venusian.Scanner", "dataclasses.field" ]
[((192, 230), 'dataclasses.field', 'field', ([], {'default_factory': 'ServiceRegistry'}), '(default_factory=ServiceRegistry)\n', (197, 230), False, 'from dataclasses import dataclass, field\n'), ((300, 331), 'venusian.Scanner', 'Scanner', ([], {'registry': 'self.registry'}), '(registry=self.registry)\n', (307, 331), Fa...
from setuptools import setup setup( name='live-plotter', version='1.0', packages=[ 'live_plotter', 'live_plotter.base', 'live_plotter.proxy' ], url='https://github.com/DeveloperHacker/Live-Plotter', license='MIT', author='HackerMadCat', author_email='<EMAIL>', ...
[ "setuptools.setup" ]
[((30, 360), 'setuptools.setup', 'setup', ([], {'name': '"""live-plotter"""', 'version': '"""1.0"""', 'packages': "['live_plotter', 'live_plotter.base', 'live_plotter.proxy']", 'url': '"""https://github.com/DeveloperHacker/Live-Plotter"""', 'license': '"""MIT"""', 'author': '"""HackerMadCat"""', 'author_email': '"""<EM...
# aws stt import time import boto3 import requests import json import os from constants.constants import AWS_UPLOAD_BUCKET_URL import api.stt.util as util def get_client(): print("Using AWS for STT client") return boto3.client("transcribe") def transcribe_storage_uri(client, uploaded_file, locale): # m...
[ "time.ctime", "boto3.client", "os.path.join", "time.sleep", "requests.get", "api.stt.util.Word" ]
[((225, 251), 'boto3.client', 'boto3.client', (['"""transcribe"""'], {}), "('transcribe')\n", (237, 251), False, 'import boto3\n'), ((439, 489), 'os.path.join', 'os.path.join', (['AWS_UPLOAD_BUCKET_URL', 'uploaded_file'], {}), '(AWS_UPLOAD_BUCKET_URL, uploaded_file)\n', (451, 489), False, 'import os\n'), ((1006, 1081),...
import os from subprocess import CalledProcessError from loguru import logger from .util.cmd import cmd from .util.globbing import matches_any def _instance_zone(instance_data): """Removes most of a zone URI and returns the 'canonical' zone identifier situated at the very end of the URI path..""" zone = ins...
[ "loguru.logger.warning", "os.getenv" ]
[((1337, 1463), 'loguru.logger.warning', 'logger.warning', (['f"""Instance {instance_data[\'name\']} has several external IPs. The first one will be arbitrarily used"""'], {}), '(\n f"Instance {instance_data[\'name\']} has several external IPs. The first one will be arbitrarily used"\n )\n', (1351, 1463), False, ...
__all__ = [ 'Scattering2D', 'Scattering', 'Scattering1D' ] from .scattering2d.scattering2d import Scattering2D from .scattering1d import Scattering1D from .datasets import fetch_fsdd from .caching import get_cache_dir # Make sure that DeprecationWarning within this p...
[ "warnings.warn", "re.escape" ]
[((662, 791), 'warnings.warn', 'warnings.warn', (['"""Scattering is deprecated in release 0.2. Please use Scattering2D instead."""'], {'category': 'DeprecationWarning'}), "(\n 'Scattering is deprecated in release 0.2. Please use Scattering2D instead.'\n , category=DeprecationWarning)\n", (675, 791), False, 'impor...
import pytest from webbpsf import wfirst from numpy import allclose def test_WFI_psf(): """ Just test that instantiating WFI works and can compute a PSF without raising any exceptions """ wi = wfirst.WFI() wi.calc_psf(fov_pixels=4) def test_WFI_filters(): wi = wfirst.WFI() filter_lis...
[ "webbpsf.wfirst.poppy.display_psf", "webbpsf.wfirst.WFI", "pytest.raises", "webbpsf.wfirst.FieldDependentAberration", "webbpsf.wfirst.CGI" ]
[((215, 227), 'webbpsf.wfirst.WFI', 'wfirst.WFI', ([], {}), '()\n', (225, 227), False, 'from webbpsf import wfirst\n'), ((293, 305), 'webbpsf.wfirst.WFI', 'wfirst.WFI', ([], {}), '()\n', (303, 305), False, 'from webbpsf import wfirst\n'), ((547, 590), 'webbpsf.wfirst.FieldDependentAberration', 'wfirst.FieldDependentAbe...
import pandas as pd from tsfresh import extract_features from tsfresh import select_features from tsfresh.utilities.dataframe_functions import impute from tsfresh.examples.robot_execution_failures import download_robot_execution_failures, \ load_robot_execution_failures from tsfresh import extract_relevant_feature...
[ "pandas.read_csv", "tsfresh.select_features", "tsfresh.extract_features", "tsfresh.examples.robot_execution_failures.load_robot_execution_failures", "tsfresh.examples.robot_execution_failures.download_robot_execution_failures", "tsfresh.utilities.dataframe_functions.impute", "pandas.DataFrame" ]
[((716, 763), 'pandas.read_csv', 'pd.read_csv', (["(location + 'joined_timeseries.csv')"], {}), "(location + 'joined_timeseries.csv')\n", (727, 763), True, 'import pandas as pd\n'), ((866, 941), 'pandas.read_csv', 'pd.read_csv', (["(location + 'joined_y.csv')"], {'index_col': '(0)', 'header': '(0)', 'squeeze': '(True)'...
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2022 # <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Software Foundation, either ...
[ "warnings.warn", "re.match", "typing.TypeVar" ]
[((1335, 1348), 'typing.TypeVar', 'TypeVar', (['"""RT"""'], {}), "('RT')\n", (1342, 1348), False, 'from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, TypeVar, Union\n'), ((8609, 8743), 'warnings.warn', 'warnings.warn', (['"""allow_edited is deprecated. See https://git.io/fxJuV for more info"""', '...
# encoding: utf-8 from django.utils.translation import ugettext_lazy as _ class EntryTypeMetadata(object): __slots__ = [ 'name', 'message', 'email_body_template', 'email_reply_to', ] def __init__( self, name, message=lambda entry: _('An event of ty...
[ "django.utils.translation.ugettext_lazy" ]
[((303, 352), 'django.utils.translation.ugettext_lazy', '_', (['"""An event of type {entry.entry_type} occurred"""'], {}), "('An event of type {entry.entry_type} occurred')\n", (304, 352), True, 'from django.utils.translation import ugettext_lazy as _\n')]
"""Auth module role settings.""" import os import sys import json import datetime from cachetools import TTLCache from six.moves import StringIO import gramex from gramex import variables from gramex.cache import SQLiteStore path = os.path.join(variables.GRAMEXDATA, 'auth.user.db') user_info = SQLiteStore(path, table=...
[ "os.path.exists", "six.moves.StringIO", "os.path.join", "cachetools.TTLCache", "gramex.cache.open", "gramex.cache.SQLiteStore" ]
[((233, 283), 'os.path.join', 'os.path.join', (['variables.GRAMEXDATA', '"""auth.user.db"""'], {}), "(variables.GRAMEXDATA, 'auth.user.db')\n", (245, 283), False, 'import os\n'), ((296, 327), 'gramex.cache.SQLiteStore', 'SQLiteStore', (['path'], {'table': '"""user"""'}), "(path, table='user')\n", (307, 327), False, 'fr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 31 22:52:40 2021 @author: ikaheia1 Tests for argument loader. 1) setup_pd should return a pandas dataframe 2) setup_ps should return a pandas series 3) setup_np shoulf return a numpy array """ import numpy as np import pandas as pd f...
[ "tscfat.Utils.argument_loader.setup_np", "tscfat.Utils.argument_loader.setup_pd", "tscfat.Utils.argument_loader.setup_ps" ]
[((628, 638), 'tscfat.Utils.argument_loader.setup_pd', 'setup_pd', ([], {}), '()\n', (636, 638), False, 'from tscfat.Utils.argument_loader import setup_pd, setup_np, setup_ps\n'), ((902, 912), 'tscfat.Utils.argument_loader.setup_ps', 'setup_ps', ([], {}), '()\n', (910, 912), False, 'from tscfat.Utils.argument_loader im...
from django.template import Library from django.urls import resolve register = Library() @register.simple_tag def nav_active(request, url): """ In template: {% nav_active request "url_name_here" %} """ url_name = resolve(request.path).url_name if url_name == url: return "active" else:...
[ "django.urls.resolve", "django.template.Library" ]
[((80, 89), 'django.template.Library', 'Library', ([], {}), '()\n', (87, 89), False, 'from django.template import Library\n'), ((232, 253), 'django.urls.resolve', 'resolve', (['request.path'], {}), '(request.path)\n', (239, 253), False, 'from django.urls import resolve\n')]
# Copyright (C) 2016 Bouygues Telecom. # # 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 ...
[ "os_ken.lib.addrconv.ipv6.text_to_bin", "struct.calcsize", "struct.pack", "os_ken.lib.addrconv.ipv6.bin_to_text", "random.randint", "struct.unpack_from" ]
[((5382, 5417), 'struct.calcsize', 'struct.calcsize', (['_DHCPV6_UNPACK_STR'], {}), '(_DHCPV6_UNPACK_STR)\n', (5397, 5417), False, 'import struct\n'), ((5453, 5494), 'struct.calcsize', 'struct.calcsize', (['_DHCPV6_RELAY_UNPACK_STR'], {}), '(_DHCPV6_RELAY_UNPACK_STR)\n', (5468, 5494), False, 'import struct\n'), ((10670...
import logging from spaceone.core.error import * from spaceone.core import pygrpc from spaceone.core import utils from spaceone.core.transaction import Transaction from spaceone.core.handler import BaseMutationHandler _LOGGER = logging.getLogger(__name__) class SpaceONEMutationHandler(BaseMutationHandler): def...
[ "logging.getLogger", "spaceone.core.utils.parse_grpc_uri" ]
[((230, 257), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (247, 257), False, 'import logging\n'), ((447, 487), 'spaceone.core.utils.parse_grpc_uri', 'utils.parse_grpc_uri', (["self.config['uri']"], {}), "(self.config['uri'])\n", (467, 487), False, 'from spaceone.core import utils\n')]
# python app.py --config_file config_baseline.json --framework TF --machine a100_shared --n_gpus 1 --n_epochs 2 --batch_size 64 --mixed_precision 0 # python app.py --config_file config_tfdataopt.json --framework TF --machine a100_shared --n_gpus 1 --n_epochs 2 --batch_size 64 --mixed_precision 1 # python app.py --confi...
[ "proxy_apps.utils.file_reader.read_config", "argparse.ArgumentParser", "time.perf_counter", "proxy_apps.ProxyTSPRD", "sys.path.append" ]
[((814, 836), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (829, 836), False, 'import sys\n'), ((1061, 1126), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Run Time Series Prediction"""'}), "(description='Run Time Series Prediction')\n", (1084, 1126), False, '...
#! /usr/bin/env python -u # coding=utf-8 __author__ = 'xl' import sys from operator import add from pyspark import SparkContext import re if __name__ == "__main__": if len(sys.argv) != 3: print("Usage: wordcount <input> <output>") exit(-1) sc = SparkContext(appName="PythonWordCount") com...
[ "pyspark.SparkContext", "re.split" ]
[((273, 312), 'pyspark.SparkContext', 'SparkContext', ([], {'appName': '"""PythonWordCount"""'}), "(appName='PythonWordCount')\n", (285, 312), False, 'from pyspark import SparkContext\n'), ((485, 538), 're.split', 're.split', (['"""[ \\\\t,;\\\\.\\\\?!-:@\\\\[\\\\]\\\\(\\\\){}_\\\\*/]+"""', 'x'], {}), "('[ \\\\t,;\\\\....
#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# """A small cache that keeps track of unhealthy hosts and backs off from using them""" ...
[ "logging.warning", "logging.debug", "time.time" ]
[((409, 448), 'logging.warning', 'logging.warning', (['"""HH:SHOU %s"""', 'hostname'], {}), "('HH:SHOU %s', hostname)\n", (424, 448), False, 'import logging\n'), ((734, 745), 'time.time', 'time.time', ([], {}), '()\n', (743, 745), False, 'import time\n'), ((848, 885), 'logging.debug', 'logging.debug', (['"""HH:SHOH %s"...
import random import pathlib import sys test_d = pathlib.Path(sys.argv[0]).parent sfr_addrs = { "P0" : 0x80, "TCON ": 0x88, "IE ": 0xA8, "IP ": 0xB8, "PSW ": 0xD0, "ACC ": 0xE0, "B ": 0xF0, } # MOV, A, #immed def X_74(): for x in range(256): print("MOV A,#{}".format(x)) ...
[ "random.choice", "pathlib.Path" ]
[((49, 74), 'pathlib.Path', 'pathlib.Path', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (61, 74), False, 'import pathlib\n'), ((15600, 15616), 'random.choice', 'random.choice', (['s'], {}), '(s)\n', (15613, 15616), False, 'import random\n'), ((15570, 15591), 'random.choice', 'random.choice', (['s[2:8]'], {}), '(s[2:8])\n...
################################################################################ # # Copyright (c) 2020, NVIDIA CORPORATION. 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...
[ "ft_tensorflow_quantization.python.layers.tensor_quantizer.QuantDescriptor", "copy.deepcopy" ]
[((1067, 1091), 'ft_tensorflow_quantization.python.layers.tensor_quantizer.QuantDescriptor', 'QuantDescriptor', (['"""input"""'], {}), "('input')\n", (1082, 1091), False, 'from ft_tensorflow_quantization.python.layers.tensor_quantizer import QuantDescriptor\n'), ((1122, 1156), 'ft_tensorflow_quantization.python.layers....
from project_code.annotation_plot import main # read in test data locus_file = 'chr5.cs.snps.txt' ann_paths_file = 'peak.paths.txt' output = 'test_output' xlab = 'test_xlab' def test_read_of_locus_file(): # Check that locus file has been formatted properly header = main(locus_file, ann_paths_file, output, xlab) ...
[ "project_code.annotation_plot.main" ]
[((272, 318), 'project_code.annotation_plot.main', 'main', (['locus_file', 'ann_paths_file', 'output', 'xlab'], {}), '(locus_file, ann_paths_file, output, xlab)\n', (276, 318), False, 'from project_code.annotation_plot import main\n'), ((460, 506), 'project_code.annotation_plot.main', 'main', (['locus_file', 'ann_paths...
import pytest import random from fidesops.graph.graph import DatasetGraph from fidesops.models.privacy_request import ExecutionLog, PrivacyRequest from fidesops.task import graph_task from tests.graph.graph_test_util import assert_rows_match, records_matching_fields @pytest.mark.saas_connector def test_saas_access_r...
[ "fidesops.graph.graph.DatasetGraph", "tests.graph.graph_test_util.assert_rows_match", "fidesops.task.graph_task.run_access_request", "tests.graph.graph_test_util.records_matching_fields", "fidesops.models.privacy_request.ExecutionLog.query", "random.randint" ]
[((760, 786), 'fidesops.graph.graph.DatasetGraph', 'DatasetGraph', (['merged_graph'], {}), '(merged_graph)\n', (772, 786), False, 'from fidesops.graph.graph import DatasetGraph\n'), ((796, 924), 'fidesops.task.graph_task.run_access_request', 'graph_task.run_access_request', (['privacy_request', 'policy', 'graph', '[con...
import asyncio import os from functools import partial, wraps from io import BytesIO from time import time from typing import Callable, Coroutine, List, Union import httpx import spotipy from lyricspy.aio import Letras, Musixmatch from PIL import Image from selenium import webdriver from selenium.webdriver.chrome.webd...
[ "db.get", "spotipy.Spotify", "io.BytesIO", "yarl.URL", "os.remove", "functools.wraps", "asyncio.get_event_loop", "selenium.webdriver.Firefox", "lyricspy.aio.Letras", "httpx.AsyncClient", "db.add_user", "time.time", "selenium.webdriver.ChromeOptions", "PIL.Image.open", "selenium.webdriver...
[((581, 605), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (603, 605), False, 'import asyncio\n'), ((619, 648), 'httpx.AsyncClient', 'httpx.AsyncClient', ([], {'http2': '(True)'}), '(http2=True)\n', (636, 648), False, 'import httpx\n'), ((3927, 3964), 'lyricspy.aio.Musixmatch', 'Musixmatch', ([...
from .. import models from django.shortcuts import redirect from django.http import HttpResponse import json from django.shortcuts import get_object_or_404 def question_form(request): if request.method == "POST": data = request.POST is_update = data.get("question_id", False) answers_info =...
[ "django.shortcuts.redirect", "django.shortcuts.get_object_or_404" ]
[((1235, 1297), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['models.QuestionBank'], {'pk': "question_info['id']"}), "(models.QuestionBank, pk=question_info['id'])\n", (1252, 1297), False, 'from django.shortcuts import get_object_or_404\n'), ((2393, 2456), 'django.shortcuts.redirect', 'redirect', (['"""...
import importlib module = importlib.import_module("07_the_sum_of_its_parts") find_steps_order = module.find_steps_order parse_instructions = module.parse_instructions instructions = [ "Step C must be finished before step A can begin.", "Step C must be finished before step F can begin.", "Step A must be fi...
[ "importlib.import_module" ]
[((27, 77), 'importlib.import_module', 'importlib.import_module', (['"""07_the_sum_of_its_parts"""'], {}), "('07_the_sum_of_its_parts')\n", (50, 77), False, 'import importlib\n')]
##################################### # Convert quakeml catalogs to pandas # and vice versa import pandas import lxml.etree as le #TODO: publicID in quakeml should refer to webservice address #TODO: add second nodal plane!? def event2utc(event): ''' given event returns UTC string ''' d=event.fillna(0)...
[ "lxml.etree.Element", "lxml.etree.SubElement", "lxml.etree.fromstring", "pandas.DataFrame", "lxml.etree.tostring" ]
[((1136, 1168), 'lxml.etree.SubElement', 'le.SubElement', (['parent', 'childname'], {}), '(parent, childname)\n', (1149, 1168), True, 'import lxml.etree as le\n'), ((1176, 1205), 'lxml.etree.SubElement', 'le.SubElement', (['child', '"""value"""'], {}), "(child, 'value')\n", (1189, 1205), True, 'import lxml.etree as le\...
import pickle import numpy as np import pytest from sklearn.neighbors._quad_tree import _QuadTree from sklearn.utils import check_random_state def test_quadtree_boundary_computation(): # Introduce a point into a quad tree with boundaries not easy to compute. Xs = [] # check a random case ...
[ "sklearn.utils.check_random_state", "numpy.isclose", "pickle.dumps", "pytest.mark.parametrize", "numpy.array", "pickle.loads", "sklearn.neighbors._quad_tree._QuadTree" ]
[((2471, 2518), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""n_dimensions"""', '(2, 3)'], {}), "('n_dimensions', (2, 3))\n", (2494, 2518), False, 'import pytest\n'), ((2521, 2567), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""protocol"""', '(0, 1, 2)'], {}), "('protocol', (0, 1, 2))\n", (2...
import functools import torch import torch.nn as nn import torch.nn.functional as F import models.modules.module_util as mutil from utils.util import opt_get class ResidualDenseBlock_3C(nn.Module): def __init__(self, nf=64, gc=32, bias=True): super(ResidualDenseBlock_3C, self).__init__() # gc: gro...
[ "models.modules.module_util.initialize_weights", "torch.nn.LeakyReLU", "torch.nn.Conv2d", "utils.util.opt_get", "functools.partial", "torch.nn.functional.interpolate", "models.modules.module_util.make_layer", "torch.cat" ]
[((381, 418), 'torch.nn.Conv2d', 'nn.Conv2d', (['nf', 'gc', '(3)', '(1)', '(1)'], {'bias': 'bias'}), '(nf, gc, 3, 1, 1, bias=bias)\n', (390, 418), True, 'import torch.nn as nn\n'), ((440, 482), 'torch.nn.Conv2d', 'nn.Conv2d', (['(nf + gc)', 'gc', '(3)', '(1)', '(1)'], {'bias': 'bias'}), '(nf + gc, gc, 3, 1, 1, bias=bia...
from setuptools import setup setup( name='graphsage', version='0.0.1', install_requires=['networkx','ase','pandas'] )
[ "setuptools.setup" ]
[((30, 122), 'setuptools.setup', 'setup', ([], {'name': '"""graphsage"""', 'version': '"""0.0.1"""', 'install_requires': "['networkx', 'ase', 'pandas']"}), "(name='graphsage', version='0.0.1', install_requires=['networkx',\n 'ase', 'pandas'])\n", (35, 122), False, 'from setuptools import setup\n')]
import os import sys root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(root) sys.path.append(root + "/Driver") sys.path.append(root + "/Estimator") sys.path.append(root + "/CongManager") sys.path.append(root + "/Util") sys.path.append(root + "/Default") print("WUHU")
[ "os.path.abspath", "sys.path.append" ]
[((88, 109), 'sys.path.append', 'sys.path.append', (['root'], {}), '(root)\n', (103, 109), False, 'import sys\n'), ((110, 143), 'sys.path.append', 'sys.path.append', (["(root + '/Driver')"], {}), "(root + '/Driver')\n", (125, 143), False, 'import sys\n'), ((144, 180), 'sys.path.append', 'sys.path.append', (["(root + '/...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'login.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Fo...
[ "PyQt5.QtWidgets.QWidget", "PyQt5.QtWidgets.QLineEdit", "Sz_Label.SzLabel", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtCore.QSize" ]
[((491, 518), 'PyQt5.QtWidgets.QHBoxLayout', 'QtWidgets.QHBoxLayout', (['Form'], {}), '(Form)\n', (512, 518), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((605, 628), 'PyQt5.QtWidgets.QWidget', 'QtWidgets.QWidget', (['Form'], {}), '(Form)\n', (622, 628), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'...
from __future__ import absolute_import from query.models import Query from ServerChecker.celery import app @app.task def process(urls): """ Task for processing a lot of queries via multithreading. Run with celery. """ # pool = Pool(cpu_count()) # pool.map(process_query, urls) for url in ur...
[ "query.models.Query", "ServerChecker.celery.app.task" ]
[((355, 397), 'ServerChecker.celery.app.task', 'app.task', ([], {'max_retries': '(3)', 'retry_jitter': '(True)'}), '(max_retries=3, retry_jitter=True)\n', (363, 397), False, 'from ServerChecker.celery import app\n'), ((448, 462), 'query.models.Query', 'Query', ([], {'url': 'url'}), '(url=url)\n', (453, 462), False, 'fr...
from ubinascii import hexlify from bitcoin import bip32, bip39, script # NETWORKS contains all constants for HD keys and addresses from bitcoin.networks import NETWORKS # we will use testnet: network = NETWORKS["test"] entropy = b'\x64\xd3\xe4\xa0\xa3\x87\xe2\x80\x21\xdf\x55\xa5\x1d\x45\x4d\xcf' recovery_phrase = bip...
[ "ubinascii.hexlify", "bitcoin.script.p2wpkh", "bitcoin.script.p2pkh", "bitcoin.bip39.mnemonic_to_seed", "bitcoin.bip39.mnemonic_from_bytes", "bitcoin.bip32.HDKey.from_seed", "bitcoin.bip39.mnemonic_is_valid" ]
[((317, 351), 'bitcoin.bip39.mnemonic_from_bytes', 'bip39.mnemonic_from_bytes', (['entropy'], {}), '(entropy)\n', (342, 351), False, 'from bitcoin import bip32, bip39, script\n'), ((698, 760), 'bitcoin.bip39.mnemonic_to_seed', 'bip39.mnemonic_to_seed', (['recovery_phrase'], {'password': '"""<PASSWORD>"""'}), "(recovery...
# Copyright (c) 2017 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ "nnef_tools.shape_inference.shape_inference.reshape", "numpy.array", "nnef_tools.core.utils.inverse_permutation", "functools.partial", "nnef_tools.core.utils.key_value_swapped", "six.iteritems", "nnef_tools.shape_inference.shape_inference.transpose" ]
[((1003, 1070), 'nnef_tools.core.utils.key_value_swapped', 'utils.key_value_swapped', (['tf_pb_to_tf_py._tf_py_dtype_by_tf_pb_dtype'], {}), '(tf_pb_to_tf_py._tf_py_dtype_by_tf_pb_dtype)\n', (1026, 1070), False, 'from nnef_tools.core import utils\n'), ((6749, 6774), 'six.iteritems', 'six.iteritems', (['converters'], {})...
# -*- coding: utf-8 -*- # @Author: luoling # @Date: 2019-12-06 10:41:34 # @Last Modified by: luoling # @Last Modified time: 2019-12-18 17:52:49 import torch import torch.nn.functional as F import torch.nn as nn def cross_entropy2d(input, target, weight=None, reduction='none'): n, c, h, w = input.size() n...
[ "torch.nn.CrossEntropyLoss", "torch.unsqueeze", "torch.Tensor", "torch.tensor", "torch.sum", "torch.nn.functional.cross_entropy", "torch.nn.functional.interpolate", "torch.nn.functional.softmax" ]
[((747, 835), 'torch.nn.functional.cross_entropy', 'F.cross_entropy', (['input', 'target'], {'weight': 'weight', 'reduction': 'reduction', 'ignore_index': '(250)'}), '(input, target, weight=weight, reduction=reduction,\n ignore_index=250)\n', (762, 835), True, 'import torch.nn.functional as F\n'), ((446, 518), 'torc...
from django import forms from sic_financeiro.core.models.tipo_despesa import TipoDespesa class TipoDespesaForm(forms.ModelForm): class Meta: model = TipoDespesa fields = ['nome', 'cor_layout'] labels = { 'nome': 'Nome', 'cor_layout': 'Cor' } widgets...
[ "django.forms.TextInput" ]
[((345, 411), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form-control', 'required': True}"}), "(attrs={'class': 'form-control', 'required': True})\n", (360, 411), False, 'from django import forms\n')]
from flask_restful import reqparse from .base import ControllerBase from wafec.fi.hypothesis.services import TestService __all__ = [ "TestController" ] class TestController(ControllerBase): def __init__(self): ControllerBase.__init__(self) self.test_service = TestService() def post(self...
[ "wafec.fi.hypothesis.services.TestService", "flask_restful.reqparse.RequestParser" ]
[((288, 301), 'wafec.fi.hypothesis.services.TestService', 'TestService', ([], {}), '()\n', (299, 301), False, 'from wafec.fi.hypothesis.services import TestService\n'), ((340, 364), 'flask_restful.reqparse.RequestParser', 'reqparse.RequestParser', ([], {}), '()\n', (362, 364), False, 'from flask_restful import reqparse...
from manim import * from manim_ml.neural_network.layers import TripletLayer, triplet from manim_ml.neural_network.layers.feed_forward import FeedForwardLayer from manim_ml.neural_network.neural_network import NeuralNetwork config.pixel_height = 720 config.pixel_width = 1280 config.frame_height = 6.0 config.frame_width...
[ "manim_ml.neural_network.layers.feed_forward.FeedForwardLayer", "manim_ml.neural_network.layers.TripletLayer.from_paths" ]
[((581, 668), 'manim_ml.neural_network.layers.TripletLayer.from_paths', 'TripletLayer.from_paths', (['anchor_path', 'positive_path', 'negative_path'], {'grayscale': '(False)'}), '(anchor_path, positive_path, negative_path,\n grayscale=False)\n', (604, 668), False, 'from manim_ml.neural_network.layers import TripletL...
import tweepy import time import cv2 import numpy as np from urllib.request import urlopen import requests from io import BytesIO import threading consumer_key = "your_consumer_key" # get twitter api access for these consumer_secret = "your_consumer_secret" access_token = "your_access_token" access_token_sec...
[ "requests.post", "threading.Timer", "time.strftime", "cv2.imshow", "tweepy.API", "cv2.imdecode", "cv2.cvtColor", "cv2.resize", "urllib.request.urlopen", "tweepy.OAuthHandler" ]
[((548, 598), 'tweepy.OAuthHandler', 'tweepy.OAuthHandler', (['consumer_key', 'consumer_secret'], {}), '(consumer_key, consumer_secret)\n', (567, 598), False, 'import tweepy\n'), ((663, 679), 'tweepy.API', 'tweepy.API', (['auth'], {}), '(auth)\n', (673, 679), False, 'import tweepy\n'), ((1283, 1306), 'cv2.imdecode', 'c...
import typing from pycspr.crypto import KeyAlgorithm from pycspr.factory import create_public_key from pycspr.serialisation.cl_type_from_bytes import decode as cl_type_from_bytes from pycspr.serialisation.cl_value_from_bytes import decode as cl_value_from_bytes from pycspr.types import Timestamp from pycspr.types impo...
[ "pycspr.types.DeployArgument", "pycspr.types.StoredContractByHashVersioned", "pycspr.crypto.KeyAlgorithm", "pycspr.types.cl_types.CL_Type_ByteArray", "pycspr.types.Transfer", "pycspr.serialisation.cl_value_from_bytes.decode", "pycspr.types.ModuleBytes", "pycspr.serialisation.cl_type_from_bytes.decode"...
[((1983, 2007), 'pycspr.crypto.KeyAlgorithm', 'KeyAlgorithm', (['bstream[0]'], {}), '(bstream[0])\n', (1995, 2007), False, 'from pycspr.crypto import KeyAlgorithm\n'), ((3085, 3137), 'pycspr.serialisation.cl_type_from_bytes.decode', 'cl_type_from_bytes', (['bstream[val_bytes_length.value:]'], {}), '(bstream[val_bytes_l...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import concurrent.futures import os import tempfile import zipfile from bs4 import BeautifulSoup from furigana4epub import yomituki from furigana4epub.version import version def unzippen(filename, dst_path): input_file = zipfile.ZipFile(filename, 'r') input_file...
[ "furigana4epub.yomituki.point_ruby_to_blod", "tempfile.TemporaryDirectory", "os.path.getsize", "argparse.ArgumentParser", "zipfile.ZipFile", "os.path.splitext", "os.path.join", "os.path.isfile", "furigana4epub.yomituki.RubySoup", "os.walk", "os.path.relpath" ]
[((275, 305), 'zipfile.ZipFile', 'zipfile.ZipFile', (['filename', '"""r"""'], {}), "(filename, 'r')\n", (290, 305), False, 'import zipfile\n'), ((1108, 1120), 'os.walk', 'os.walk', (['dir'], {}), '(dir)\n', (1115, 1120), False, 'import os\n'), ((3798, 3946), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'...
# coding=utf-8 """ The Voicemail API endpoint get Documentation: https://voip.ms/m/apidocs.php """ from voipms.baseapi import BaseApi from voipms.helpers import validate_date class VoicemailGet(BaseApi): """ Get for the Voicemail endpoint. """ def __init__(self, *args, **kwargs): """ ...
[ "voipms.helpers.validate_date" ]
[((6634, 6668), 'voipms.helpers.validate_date', 'validate_date', (["kwargs['date_from']"], {}), "(kwargs['date_from'])\n", (6647, 6668), False, 'from voipms.helpers import validate_date\n'), ((6951, 6983), 'voipms.helpers.validate_date', 'validate_date', (["kwargs['date_to']"], {}), "(kwargs['date_to'])\n", (6964, 6983...
import csv from Title_Counter import all_titles from Hour_Cutter import all_hours myData = [[all_titles()],[all_hours()]] myFile = open('TheData.csv', 'w') with myFile: writer = csv.writer(myFile) writer.writerows(myData)
[ "csv.writer", "Hour_Cutter.all_hours", "Title_Counter.all_titles" ]
[((192, 210), 'csv.writer', 'csv.writer', (['myFile'], {}), '(myFile)\n', (202, 210), False, 'import csv\n'), ((98, 110), 'Title_Counter.all_titles', 'all_titles', ([], {}), '()\n', (108, 110), False, 'from Title_Counter import all_titles\n'), ((113, 124), 'Hour_Cutter.all_hours', 'all_hours', ([], {}), '()\n', (122, 1...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Class for the Chirp capacitive soil moisture sensor made by Catnip Electronics, <NAME> Links to Chirp: https://github.com/Miceuz/i2c-moisture-sensor https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/ Python Class by <NAME>. https://github.com/ageir/chir...
[ "datetime.datetime.now", "smbus.SMBus", "time.sleep", "sys.exit" ]
[((3151, 3167), 'smbus.SMBus', 'smbus.SMBus', (['bus'], {}), '(bus)\n', (3162, 3167), False, 'import smbus\n'), ((8897, 8911), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (8909, 8911), False, 'from datetime import datetime\n'), ((9673, 9687), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (96...
from xml.dom import minidom from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL class XmlReader: settings = {} log_mapping = { 'debug': DEBUG, 'info': INFO, 'warning': WARNING, 'error': ERROR, 'critical': CRITICAL } servizi_dns = ['serveo', 'pagekite'] ...
[ "xml.dom.minidom.parse" ]
[((366, 389), 'xml.dom.minidom.parse', 'minidom.parse', (['filename'], {}), '(filename)\n', (379, 389), False, 'from xml.dom import minidom\n')]
import asyncio import logging import os import pathlib import yaml from typing import Dict, Optional from chia.consensus.default_constants import DEFAULT_CONSTANTS from chia.consensus.constants import ConsensusConstants from chia.util.chia_logging import initialize_logging from chia.util.default_root import DEFAULT_R...
[ "logging.getLogger", "pathlib.Path", "chia.util.config.load_config", "chia.consensus.default_constants.DEFAULT_CONSTANTS.replace_str_to_bytes", "os.getcwd", "yaml.safe_load", "asyncio.sleep", "pool.store.sqlite_store.SqlitePoolStore" ]
[((1596, 1641), 'chia.util.config.load_config', 'load_config', (['DEFAULT_ROOT_PATH', '"""config.yaml"""'], {}), "(DEFAULT_ROOT_PATH, 'config.yaml')\n", (1607, 1641), False, 'from chia.util.config import load_config\n'), ((1763, 1814), 'chia.consensus.default_constants.DEFAULT_CONSTANTS.replace_str_to_bytes', 'DEFAULT_...
try: from normatrix.source import color from normatrix.source.context import Context except ModuleNotFoundError: from src.normatrix.source import color from src.normatrix.source.context import Context import os import sys import subprocess #thanks to https://stackoverflow.com/a/234329 def walklevel(so...
[ "subprocess.run", "os.path.join", "sys.stderr.write", "os.path.isdir", "src.normatrix.source.color.print_color", "os.walk" ]
[((393, 416), 'os.path.isdir', 'os.path.isdir', (['some_dir'], {}), '(some_dir)\n', (406, 416), False, 'import os\n'), ((488, 505), 'os.walk', 'os.walk', (['some_dir'], {}), '(some_dir)\n', (495, 505), False, 'import os\n'), ((697, 754), 'subprocess.run', 'subprocess.run', (["['make', '-C', path]"], {'capture_output': ...
from datetime import datetime import pytest from triggers.record_feedback import RecordFeedbackTrigger pytestmark = [pytest.mark.django_db] @pytest.fixture def order(order, record): order.set_item(record) order.setattr_and_save('paid', datetime(2032, 12, 1, 15, 13)) return order @pytest.fixture def ...
[ "triggers.record_feedback.RecordFeedbackTrigger", "datetime.datetime" ]
[((347, 375), 'triggers.record_feedback.RecordFeedbackTrigger', 'RecordFeedbackTrigger', (['order'], {}), '(order)\n', (368, 375), False, 'from triggers.record_feedback import RecordFeedbackTrigger\n'), ((249, 278), 'datetime.datetime', 'datetime', (['(2032)', '(12)', '(1)', '(15)', '(13)'], {}), '(2032, 12, 1, 15, 13)...
from Calculator.Square import square from Calculator.Division import division from Statistics.Mean import mean def variance(num): try: mean_value = mean(num) num_value = len(num) x = 0 for i in num: x = x + square(i - mean_value) return round(division(x, num_val...
[ "Calculator.Square.square", "Statistics.Mean.mean", "Calculator.Division.division" ]
[((162, 171), 'Statistics.Mean.mean', 'mean', (['num'], {}), '(num)\n', (166, 171), False, 'from Statistics.Mean import mean\n'), ((301, 323), 'Calculator.Division.division', 'division', (['x', 'num_value'], {}), '(x, num_value)\n', (309, 323), False, 'from Calculator.Division import division\n'), ((257, 279), 'Calcula...
"""Spell checking system calls to Hunspell.""" import glob import os import subprocess import tempfile def hunspell_spellcheck( content, language_dicts, personal_dicts=None, encoding=None, ): """Call hunspell for spellchecing. Args: content (str): Content to check for words not inclu...
[ "subprocess.run", "os.path.isfile", "os.path.isdir", "tempfile.gettempdir", "os.mkdir", "tempfile.NamedTemporaryFile", "os.mknod", "glob.glob", "os.remove" ]
[((2533, 2637), 'subprocess.run', 'subprocess.run', (['command'], {'universal_newlines': '(True)', 'input': 'content', 'stdout': 'subprocess.PIPE', 'check': '(True)'}), '(command, universal_newlines=True, input=content, stdout=\n subprocess.PIPE, check=True)\n', (2547, 2637), False, 'import subprocess\n'), ((2741, 2...
#!/usr/bin/env python3 from dbus.mainloop.glib import DBusGMainLoop from gi.repository import GLib import argparse import logging import sys import os # our own packages sys.path.insert(1, os.path.join(os.path.dirname(__file__), '../ext/velib_python')) from dbusdummyservice import DbusDummyService # Argument parsing...
[ "logging.basicConfig", "argparse.ArgumentParser", "dbus.mainloop.glib.DBusGMainLoop", "gi.repository.GLib.MainLoop", "os.path.dirname", "dbusdummyservice.DbusDummyService", "logging.info" ]
[((330, 387), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""dummy dbus service"""'}), "(description='dummy dbus service')\n", (353, 387), False, 'import argparse\n'), ((670, 710), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', ...
# Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import unittest from core import results_merger class ResultMergerTest(unittest.TestCase): def setUp(self): self.sample_json_string = '''...
[ "json.loads", "core.results_merger.merge_test_results" ]
[((600, 623), 'json.loads', 'json.loads', (['json_string'], {}), '(json_string)\n', (610, 623), False, 'import json\n'), ((1039, 1062), 'json.loads', 'json.loads', (['json_string'], {}), '(json_string)\n', (1049, 1062), False, 'import json\n'), ((1409, 1444), 'json.loads', 'json.loads', (['self.sample_json_string'], {}...
#!/usr/bin/env python # vim: set fileencoding=utf-8 ts=4 sts=4 sw=4 et tw=80 : # # This script is written to investigate what (if any) mathematical # relationship exists among the orders that could be used to simplify # fitting and reduce jitter. # # <NAME> # Created: 2018-05-08 # Last modified: 2018-12-24 #-----...
[ "numpy.sqrt", "theil_sen.linefit", "sys.exit", "copy.deepcopy", "nres_extraction.TraceIO", "numpy.arange", "numpy.abs", "matplotlib.pyplot.gcf", "imp.reload", "os.path.isfile", "sys.stderr.write", "matplotlib.pyplot.draw", "numpy.copy", "numpy.median", "os.getenv", "matplotlib.pyplot.f...
[((2113, 2136), 'imp.reload', 'reload', (['nres_extraction'], {}), '(nres_extraction)\n', (2119, 2136), False, 'from imp import reload\n'), ((2144, 2169), 'nres_extraction.TraceIO', 'nres_extraction.TraceIO', ([], {}), '()\n', (2167, 2169), False, 'import nres_extraction\n'), ((6979, 7002), 'theil_sen.linefit', 'ts.lin...
from comments.views import create_comment from django.urls import path app_name = "comments" urlpatterns = [ path('createcomment', create_comment, name="createcomment") ]
[ "django.urls.path" ]
[((112, 171), 'django.urls.path', 'path', (['"""createcomment"""', 'create_comment'], {'name': '"""createcomment"""'}), "('createcomment', create_comment, name='createcomment')\n", (116, 171), False, 'from django.urls import path\n')]
import discord import importlib import discordbot.cogs.account from loguru import logger from dynaconf import settings as dyna_settings from discord.ext.commands import Bot from discordbot.gdpk_assistant import GDKPABot logger.info("Starting GDKP Assistant") discord_bot_handle = GDKPABot() logger.info(discord_bot_h...
[ "discordbot.gdpk_assistant.GDKPABot", "loguru.logger.info" ]
[((224, 262), 'loguru.logger.info', 'logger.info', (['"""Starting GDKP Assistant"""'], {}), "('Starting GDKP Assistant')\n", (235, 262), False, 'from loguru import logger\n'), ((284, 294), 'discordbot.gdpk_assistant.GDKPABot', 'GDKPABot', ([], {}), '()\n', (292, 294), False, 'from discordbot.gdpk_assistant import GDKPA...
""" This is a wrapper for executing various parallel map routines in a consistent way. The primary routines are: work_orders(): Calls a function with args or kwargs. def _do_work(i, foo=None): print(i, foo) results = zap.work_orders([ dict(fn=_do_work, args=(i,), foo=i*10) ...
[ "logging.getLogger", "os.kill", "concurrent.futures.thread._threads_queues.clear", "concurrent.futures.ThreadPoolExecutor", "os.environ.get", "multiprocessing.cpu_count", "random.seed", "concurrent.futures.as_completed", "plaster.tools.utils.utils.listi", "numpy.array", "psutil.virtual_memory", ...
[((3031, 3058), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (3048, 3058), False, 'import logging\n'), ((3281, 3313), 'os.environ.get', 'os.environ.get', (['"""ZAP_DEBUG_MODE"""'], {}), "('ZAP_DEBUG_MODE')\n", (3295, 3313), False, 'import os\n'), ((7342, 7353), 'multiprocessing.cpu_coun...
import os import shutil import tempfile import lbryum.wallet from decimal import Decimal from collections import defaultdict from twisted.trial import unittest from twisted.internet import threads, defer from lbrynet.core.Error import InsufficientFundsError from lbrynet.core.Wallet import Wallet, LBRYumWallet, Reserv...
[ "twisted.internet.threads.deferToThread", "lbrynet.core.Wallet.ReservedPoints", "os.path.join", "lbryum.commands.Commands", "os.path.dirname", "lbrynet.core.Wallet.InMemoryStorage", "collections.defaultdict", "tempfile.mkdtemp", "decimal.Decimal", "twisted.internet.defer.succeed" ]
[((1021, 1034), 'decimal.Decimal', 'Decimal', (['(10.0)'], {}), '(10.0)\n', (1028, 1034), False, 'from decimal import Decimal\n'), ((1072, 1084), 'decimal.Decimal', 'Decimal', (['(0.0)'], {}), '(0.0)\n', (1079, 1084), False, 'from decimal import Decimal\n'), ((1116, 1136), 'collections.defaultdict', 'defaultdict', (['D...
# This file is part of the clacks framework. # # http://clacks-project.org # # Copyright: # (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de # # License: # GPL-2: http://www.gnu.org/licenses/gpl-2.0.html # # See the LICENSE file in the project's top-level directory for details. import unittest import os f...
[ "clacks.agent.acl.ACL", "os.path.realpath", "clacks.agent.acl.ACLResolver", "clacks.common.Environment.reset", "clacks.agent.acl.ACLRoleEntry", "unittest.main", "clacks.common.Environment.getInstance", "clacks.agent.acl.ACLSet", "clacks.agent.acl.ACLRole" ]
[((449, 468), 'clacks.common.Environment.reset', 'Environment.reset', ([], {}), '()\n', (466, 468), False, 'from clacks.common import Environment\n'), ((23397, 23412), 'unittest.main', 'unittest.main', ([], {}), '()\n', (23410, 23412), False, 'import unittest\n'), ((519, 545), 'os.path.realpath', 'os.path.realpath', ([...
""" This is the basic config file, encapsulating all configuration options ALL FILES SHOULD LOAD THEIR CONFIGURATIONS FROM THIS CENTRAL LOCATION """ from __future__ import print_function import os import json # ---- Helper Functions ---- def path_relative_to_file(rel_path): dir_name = os.path.dirname(__file__) ...
[ "json.load", "os.path.dirname", "os.path.join" ]
[((291, 316), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (306, 316), False, 'import os\n'), ((328, 360), 'os.path.join', 'os.path.join', (['dir_name', 'rel_path'], {}), '(dir_name, rel_path)\n', (340, 360), False, 'import os\n'), ((466, 486), 'json.load', 'json.load', (['json_file'], {}),...
"""Spherical harmonic vector wind computations.""" # Copyright (c) 2012-2016 <NAME> # # 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 rig...
[ "spharm.gaussian_lats_wts", "spharm.Spharmt", "numpy.ones", "numpy.linspace", "numpy.deg2rad", "numpy.isnan", "numpy.arange" ]
[((4311, 4371), 'spharm.Spharmt', 'Spharmt', (['nlon', 'nlat'], {'gridtype': 'self.gridtype', 'rsphere': 'rsphere'}), '(nlon, nlat, gridtype=self.gridtype, rsphere=rsphere)\n', (4318, 4371), False, 'from spharm import Spharmt, gaussian_lats_wts\n'), ((8759, 8782), 'spharm.gaussian_lats_wts', 'gaussian_lats_wts', (['nla...
"""Define networks for dannce.""" from tensorflow.keras.models import Model from tensorflow.keras.layers import Input, concatenate, Conv2D, MaxPooling2D from tensorflow.keras.layers import Conv2DTranspose, Conv3D, Lambda from tensorflow.keras.layers import MaxPooling3D, Conv3DTranspose from tensorflow.keras.layers impo...
[ "tensorflow.keras.layers.Conv3D", "tensorflow.keras.layers.BatchNormalization", "dannce.engine.ops.InstanceNormalization", "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Conv2D", "dannce.engine.ops.spatial_softmax", "tensorflow.keras.utils.multi_gpu_model", "tensorflow.keras.models.Model", ...
[((1283, 1313), 'tensorflow.keras.layers.Input', 'Input', (['(None, None, input_dim)'], {}), '((None, None, input_dim))\n', (1288, 1313), False, 'from tensorflow.keras.layers import Input, concatenate, Conv2D, MaxPooling2D\n'), ((5074, 5104), 'tensorflow.keras.layers.Input', 'Input', (['(None, None, input_dim)'], {}), ...
from xml.sax.saxutils import unescape from Cogs import DL from Cogs import Nullify def setup(bot): # Not a cog return def find_last_between( source, start_sep, end_sep ): result=[] tmp=source.split(start_sep) for par in tmp: if end_sep in par: result.append(par.split(end_sep)[0]) if len(resul...
[ "Cogs.DL.async_text", "Cogs.Nullify.clean", "xml.sax.saxutils.unescape" ]
[((5789, 5811), 'Cogs.Nullify.clean', 'Nullify.clean', (['partout'], {}), '(partout)\n', (5802, 5811), False, 'from Cogs import Nullify\n'), ((3205, 3250), 'Cogs.DL.async_text', 'DL.async_text', (['url', "{'user-agent': 'Mozilla'}"], {}), "(url, {'user-agent': 'Mozilla'})\n", (3218, 3250), False, 'from Cogs import DL\n...
from pymodm import EmbeddedMongoModel from pymodm import fields from sklearn.ensemble import GradientBoostingClassifier from .learner import Learner class Parameters(EmbeddedMongoModel): learning_rate = fields.FloatField( verbose_name="Learning rate", required=True, default=0.1 ) ...
[ "pymodm.fields.FloatField", "pymodm.fields.EmbeddedDocumentField", "pymodm.fields.CharField", "pymodm.fields.IntegerField" ]
[((210, 285), 'pymodm.fields.FloatField', 'fields.FloatField', ([], {'verbose_name': '"""Learning rate"""', 'required': '(True)', 'default': '(0.1)'}), "(verbose_name='Learning rate', required=True, default=0.1)\n", (227, 285), False, 'from pymodm import fields\n'), ((436, 483), 'pymodm.fields.IntegerField', 'fields.In...