code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import uuid from django.test import TestCase from abidria.exceptions import EntityDoesNotExistException from people.models import ORMPerson, ORMAuthToken, ORMConfirmationToken from people.repositories import PersonRepo, AuthTokenRepo, ConfirmationTokenRepo from people.entities import Person class PersonRepoTestCase...
[ "people.repositories.AuthTokenRepo", "people.models.ORMPerson.objects.get", "people.models.ORMConfirmationToken.objects.filter", "uuid.uuid4", "people.repositories.ConfirmationTokenRepo", "people.models.ORMPerson.objects.filter", "people.repositories.PersonRepo", "people.entities.Person", "people.mo...
[((1852, 1878), 'people.models.ORMPerson.objects.create', 'ORMPerson.objects.create', ([], {}), '()\n', (1876, 1878), False, 'from people.models import ORMPerson, ORMAuthToken, ORMConfirmationToken\n'), ((1989, 2092), 'people.entities.Person', 'Person', ([], {'id': 'self.orm_person.id', 'is_registered': '(True)', 'user...
__author__ = "<NAME> (jdamador)" __credits__ = ["UNAD, Pasto - Colombia", "TEC, San Carlos - Costa Rica"] __license__ = "Apache 2.0" __version__ = "1.0" __maintainer__ = "jdamador" __email__ = "<EMAIL>" import time # Serial Port Settings import serial DWM = serial.Serial(port="/dev/ttyACM0",baudrate=115200) print("C...
[ "serial.Serial", "time.sleep" ]
[((261, 312), 'serial.Serial', 'serial.Serial', ([], {'port': '"""/dev/ttyACM0"""', 'baudrate': '(115200)'}), "(port='/dev/ttyACM0', baudrate=115200)\n", (274, 312), False, 'import serial\n'), ((373, 386), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (383, 386), False, 'import time\n'), ((415, 428), 'time.sleep'...
from datetime import date, datetime from pyws.functions.args import DictOf from pyws.functions.register import register # = add simple ================================================================ @register() @register('add_integers', return_type=int, args=((int, 0), (int, 0))) @register('add_floats', return_typ...
[ "pyws.functions.register.register", "pyws.functions.args.DictOf" ]
[((205, 215), 'pyws.functions.register.register', 'register', ([], {}), '()\n', (213, 215), False, 'from pyws.functions.register import register\n'), ((217, 285), 'pyws.functions.register.register', 'register', (['"""add_integers"""'], {'return_type': 'int', 'args': '((int, 0), (int, 0))'}), "('add_integers', return_ty...
# -*- coding: utf-8 -*- import sys import unittest import locale import threading from datetime import date from contextlib import contextmanager from orgmode.py3compat.unicode_compatibility import * sys.path.append(u'../ftplugin') from orgmode.liborgmode.orgdate import OrgDate class OrgDateUtf8TestCase(unittest.T...
[ "sys.path.append", "orgmode.liborgmode.orgdate.OrgDate", "threading.Lock", "unittest.TestLoader", "locale.setlocale" ]
[((204, 235), 'sys.path.append', 'sys.path.append', (['u"""../ftplugin"""'], {}), "(u'../ftplugin')\n", (219, 235), False, 'import sys\n'), ((398, 414), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (412, 414), False, 'import threading\n'), ((526, 557), 'locale.setlocale', 'locale.setlocale', (['locale.LC_ALL']...
from django.contrib import messages from django.core.exceptions import ValidationError from django.http import HttpResponseRedirect, Http404 from django.shortcuts import render, get_object_or_404 from django_filters.views import FilterView from django_tables2 import SingleTableMixin from app.mixins import TabsV...
[ "reimbursement.forms.ReceiptSubmissionReceipt", "reimbursement.emails.create_reimbursement_email", "reimbursement.models.Reimbursement.objects.filter", "applications.emails.send_batch_emails", "reimbursement.forms.RejectReceiptForm", "django.contrib.messages.error", "reimbursement.forms.EditReimbursemen...
[((970, 1000), 'app.utils.hacker_tabs', 'hacker_tabs', (['self.request.user'], {}), '(self.request.user)\n', (981, 1000), False, 'from app.utils import reverse, hacker_tabs\n'), ((2418, 2447), 'app.utils.reverse', 'reverse', (['"""reimbursement_list"""'], {}), "('reimbursement_list')\n", (2425, 2447), False, 'from app....
import numpy from copy import deepcopy from barracuda.neurontype import neuron_type import json class _Neuron(object): def __init__(self): self.input = None self.output = None def forward(self,input_data): raise NotImplementedError def backward(self,output_error, learning_rate): ...
[ "numpy.dot", "numpy.random.uniform", "numpy.array", "json.dumps" ]
[((609, 677), 'numpy.random.uniform', 'numpy.random.uniform', ([], {'low': '(-1)', 'high': '(1)', 'size': '(input_size, output_size)'}), '(low=-1, high=1, size=(input_size, output_size))\n', (629, 677), False, 'import numpy\n'), ((709, 768), 'numpy.random.uniform', 'numpy.random.uniform', ([], {'low': '(-1)', 'high': '...
#!/usr/bin/env python # encoding: utf-8 # <NAME>, 2005-2008 (ita) """ The class task_gen encapsulates the creation of task objects (low-level code) The instances can have various parameters, but the creation of task nodes (Task.py) is delayed. To achieve this, various methods are called from the method "apply" The cl...
[ "Task.task_type_from_func", "Utils.to_list", "Logs.warn", "Utils.WafError", "Logs.debug", "Utils.DefaultDict", "os.path.splitext", "traceback.print_stack", "Utils.h_fun", "Task.update_outputs", "Task.simple_task_type", "Task.always_run", "Utils.WscriptError" ]
[((2989, 3012), 'Utils.DefaultDict', 'Utils.DefaultDict', (['list'], {}), '(list)\n', (3006, 3012), False, 'import Build, Task, Utils, Logs, Options\n'), ((3023, 3045), 'Utils.DefaultDict', 'Utils.DefaultDict', (['set'], {}), '(set)\n', (3040, 3045), False, 'import Build, Task, Utils, Logs, Options\n'), ((10260, 10281)...
#!/usr/bin/env python3 """The setup script.""" from setuptools import setup, find_packages try: # pip version >= 10.0 from pip._internal.req import parse_requirements from pip._internal.download import PipSession except ImportError: # pip version < 10.0 from pip.req import parse_requirements from pip...
[ "pip.download.PipSession", "setuptools.find_packages" ]
[((530, 542), 'pip.download.PipSession', 'PipSession', ([], {}), '()\n', (540, 542), False, 'from pip.download import PipSession\n'), ((931, 961), 'setuptools.find_packages', 'find_packages', ([], {'include': "['neo']"}), "(include=['neo'])\n", (944, 961), False, 'from setuptools import setup, find_packages\n')]
# 🚨 Don't change the code below 👇 age = input("What is your current age?") # 🚨 Don't change the code above 👆 expected_remaining_years = 90 - int(age) year_days, year_weeks, year_months = [ conv * expected_remaining_years for conv in [365, 52, 12]] print(f"You have {year_days} days, {year_weeks} weeks, " f...
[ "unittest.main", "os.remove", "io.StringIO", "unittest.mock.patch", "testing_copy.test_func" ]
[((1883, 1921), 'unittest.main', 'unittest.main', ([], {'verbosity': '(1)', 'exit': '(False)'}), '(verbosity=1, exit=False)\n', (1896, 1921), False, 'import unittest\n'), ((1923, 1951), 'os.remove', 'os.remove', (['"""testing_copy.py"""'], {}), "('testing_copy.py')\n", (1932, 1951), False, 'import os\n'), ((1006, 1056)...
""" This module hears to estimation messages and response back to them by using predictive machine/deep learning """ from jira_client import JiraClient from settings import config import random class EstimationMessage: def __init__(self, bot): self.bot = bot self.jira_client = JiraClient() ...
[ "random.choice", "jira_client.JiraClient", "settings.config.get" ]
[((301, 313), 'jira_client.JiraClient', 'JiraClient', ([], {}), '()\n', (311, 313), False, 'from jira_client import JiraClient\n'), ((647, 679), 'random.choice', 'random.choice', (['self.story_points'], {}), '(self.story_points)\n', (660, 679), False, 'import random\n'), ((723, 751), 'random.choice', 'random.choice', (...
from datetime import date import pytest from envinorma.models import Regime from envinorma.parametrization import AndCondition, Equal, Greater, Littler, OrCondition, ParameterEnum, Range from back_office.components.condition_form import _AND_ID from back_office.components.condition_form.helpers import ( CONDITION...
[ "envinorma.parametrization.Equal", "back_office.components.condition_form.helpers.build_condition", "envinorma.parametrization.Greater", "back_office.components.condition_form.helpers._assert_strictly_below", "datetime.date", "back_office.components.condition_form.helpers.CONDITION_VARIABLES.values", "e...
[((790, 806), 'datetime.date', 'date', (['(2010)', '(1)', '(1)'], {}), '(2010, 1, 1)\n', (794, 806), False, 'from datetime import date\n'), ((816, 832), 'datetime.date', 'date', (['(2020)', '(1)', '(1)'], {}), '(2020, 1, 1)\n', (820, 832), False, 'from datetime import date\n'), ((1039, 1064), 'envinorma.parametrization...
import random from collections import defaultdict player_names = [] player_scores = [] # word_to_guess = None letters_missed = [] def players(): print("----------------------") print("Welcome to Hangman!") print("----------------------") while(True): try: players = int(input("\nH...
[ "collections.defaultdict", "random.choice" ]
[((3346, 3366), 'random.choice', 'random.choice', (['words'], {}), '(words)\n', (3359, 3366), False, 'import random\n'), ((5450, 5467), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5461, 5467), False, 'from collections import defaultdict\n')]
# Generated by Django 3.1.12 on 2021-06-23 04:42 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('bus_driver', '0001_initial'), ] ...
[ "django.db.models.ForeignKey", "django.db.models.UUIDField", "django.db.models.BooleanField", "django.db.models.PositiveSmallIntegerField" ]
[((742, 776), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (761, 776), False, 'from django.db import migrations, models\n'), ((802, 893), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'default': 'uuid.uuid4', 'editable': '(False)', 'primary_key': '...
from plivo import exceptions from tests.base import PlivoResourceTestCase from tests.decorators import with_response class LookupTest(PlivoResourceTestCase): @with_response(200) def test_get(self): number = '+14154305555' resp = self.client.lookup.get(number) self.assertResponseMatches...
[ "tests.decorators.with_response" ]
[((165, 183), 'tests.decorators.with_response', 'with_response', (['(200)'], {}), '(200)\n', (178, 183), False, 'from tests.decorators import with_response\n')]
#!/usr/bin/env python ############################################################################## # Copyright (c) 2015 Ericsson AB and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distrib...
[ "unittest.main", "yardstick.benchmark.scenarios.networking.vtc_instantiation_validation.VtcInstantiationValidation" ]
[((1601, 1616), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1614, 1616), False, 'import unittest\n'), ((1415, 1484), 'yardstick.benchmark.scenarios.networking.vtc_instantiation_validation.VtcInstantiationValidation', 'vtc_instantiation_validation.VtcInstantiationValidation', (['scenario', '""""""'], {}), "(sce...
import imp, glob, numpy imp.load_source('common_functions','common_functions.py') import common_functions as cf def dirty_cont_image(config,config_raw,config_file,logger): """ Generates a dirty image of each science target including the continuum emission. Checks that the pixel size and image size are set ...
[ "common_functions.read_config", "common_functions.diff_pipeline_params", "common_functions.makedir", "imp.load_source", "numpy.array", "common_functions.check_casaversion", "glob.glob", "common_functions.check_casalog", "common_functions.rmdir", "common_functions.backup_pipeline_params" ]
[((24, 82), 'imp.load_source', 'imp.load_source', (['"""common_functions"""', '"""common_functions.py"""'], {}), "('common_functions', 'common_functions.py')\n", (39, 82), False, 'import imp, glob, numpy\n'), ((7308, 7335), 'common_functions.read_config', 'cf.read_config', (['config_file'], {}), '(config_file)\n', (732...
import logging from pathlib import Path import numpy as np import pandas as pd import plotly.express as px import pyarrow.parquet as pq from scipy.stats import betabinom as sp_betabinom # import dashboard from remade import dashboard as dashboard def clip_df(df, column): if column in df.columns: df["_" ...
[ "pandas.wide_to_long", "numpy.abs", "remade.dashboard.utils.log_transform_slider", "numpy.clip", "pathlib.Path", "numpy.max", "remade.dashboard.utils.is_log_transform_column", "pyarrow.parquet.read_table", "numpy.log10", "pandas.concat", "scipy.stats.betabinom" ]
[((1080, 1131), 'pandas.concat', 'pd.concat', (['[group_long_forward, group_long_reverse]'], {}), '([group_long_forward, group_long_reverse])\n', (1089, 1131), True, 'import pandas as pd\n'), ((11801, 11823), 'pathlib.Path', 'Path', (['"""./data/results"""'], {}), "('./data/results')\n", (11805, 11823), False, 'from pa...
import sys from pyspark import SparkConf, SparkContext def save_in_local_file(rdd_of_pairs, output_file_name): file = open(output_file_name, "w") file.write("Number of Spanish airports by type: " + "\n") for line in rdd_of_pairs: file.write(str(line) + "\n") file.close() def main(file_na...
[ "pyspark.SparkContext", "pyspark.SparkConf" ]
[((356, 367), 'pyspark.SparkConf', 'SparkConf', ([], {}), '()\n', (365, 367), False, 'from pyspark import SparkConf, SparkContext\n'), ((388, 417), 'pyspark.SparkContext', 'SparkContext', ([], {'conf': 'spark_conf'}), '(conf=spark_conf)\n', (400, 417), False, 'from pyspark import SparkConf, SparkContext\n')]
from gae_handlers import RestHandler from model import Classroom from permission import owns def RelatedQuery(model, relationship_property): """Generates handlers for relationship-based queries.""" allow = 'GET, HEAD' class RelatedQueryHandler(RestHandler): """Dynamically generated handler for l...
[ "permission.owns" ]
[((720, 738), 'permission.owns', 'owns', (['user', 'rel_id'], {}), '(user, rel_id)\n', (724, 738), False, 'from permission import owns\n')]
# -*- coding: utf-8 -*- import json from .base import BaseApi from collections import OrderedDict class PackageApi(BaseApi): def list(self, account=None, instance=None, in_memory=None): """ 取得所有的软件包""" if not account: account = self.account_name if not instance: instance = self.instance_na...
[ "json.loads", "json.dumps" ]
[((468, 520), 'json.loads', 'json.loads', (['resp.text'], {'object_pairs_hook': 'OrderedDict'}), '(resp.text, object_pairs_hook=OrderedDict)\n', (478, 520), False, 'import json\n'), ((894, 946), 'json.loads', 'json.loads', (['resp.text'], {'object_pairs_hook': 'OrderedDict'}), '(resp.text, object_pairs_hook=OrderedDict...
# Copyright (c) 2008-2011 testtools developers. See LICENSE for details. import os import tempfile import unittest from testtools import TestCase from testtools.compat import ( _b, _u, StringIO, ) from testtools.content import ( attach_file, Content, content_from_file, content_from_str...
[ "os.remove", "os.close", "unittest.TestLoader", "testtools.matchers.Equals", "os.path.join", "testtools.content.content_from_file", "testtools.content.Content", "tempfile.mkdtemp", "testtools.content.TracebackContent", "testtools.compat._b", "testtools.matchers.MatchesException", "os.path.base...
[((621, 649), 'testtools.matchers.MatchesException', 'MatchesException', (['ValueError'], {}), '(ValueError)\n', (637, 649), False, 'from testtools.matchers import Equals, MatchesException, Raises, raises\n'), ((1090, 1115), 'testtools.content_type.ContentType', 'ContentType', (['"""foo"""', '"""bar"""'], {}), "('foo',...
from padertorch.data.segment import Segmenter import numpy as np import torch def test_simple_case(): segmenter = Segmenter(length=32000, include_keys=('x', 'y'), shift=16000) ex = {'x': np.arange(65000), 'y': np.arange(65000), 'num_samples': 65000, 'gender': 'm'} segme...
[ "numpy.random.randn", "padertorch.data.segment.Segmenter", "numpy.arange", "numpy.testing.assert_equal", "torch.tensor" ]
[((120, 181), 'padertorch.data.segment.Segmenter', 'Segmenter', ([], {'length': '(32000)', 'include_keys': "('x', 'y')", 'shift': '(16000)'}), "(length=32000, include_keys=('x', 'y'), shift=16000)\n", (129, 181), False, 'from padertorch.data.segment import Segmenter\n'), ((701, 773), 'padertorch.data.segment.Segmenter'...
#python3 #steven 05/04/2020 Sierpiński triangle #random start random points polygon #ratio of getRatioPoint() indicate the division of line import matplotlib.pyplot as plt import numpy as np import math def plotXY(x,y,color='k',ax=None): c=color if ax: ax.plot(x,y,color=c) else: plt.plot(x,...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.axes", "math.sin", "numpy.random.random", "numpy.array", "math.cos", "numpy.linspace", "numpy.sqrt" ]
[((598, 636), 'numpy.linspace', 'np.linspace', (['startPt[0]', 'stopPt[0]', '(30)'], {}), '(startPt[0], stopPt[0], 30)\n', (609, 636), True, 'import numpy as np\n'), ((2171, 2195), 'numpy.sqrt', 'np.sqrt', (['(r ** 2 - x ** 2)'], {}), '(r ** 2 - x ** 2)\n', (2178, 2195), True, 'import numpy as np\n'), ((2334, 2368), 'n...
import tensorflow.compat.v1 as tf tf.disable_v2_behavior() class PostProcessor(tf.keras.layers.Layer): def __init__(self, config): self.config = config super(PostProcessor, self).__init__(config) def call(self, model_output): """ sigmoid the x & y, exp the w and h :par...
[ "tensorflow.compat.v1.sigmoid", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.disable_v2_behavior", "tensorflow.compat.v1.placeholder" ]
[((34, 58), 'tensorflow.compat.v1.disable_v2_behavior', 'tf.disable_v2_behavior', ([], {}), '()\n', (56, 58), True, 'import tensorflow.compat.v1 as tf\n'), ((516, 530), 'tensorflow.compat.v1.sigmoid', 'tf.sigmoid', (['xy'], {}), '(xy)\n', (526, 530), True, 'import tensorflow.compat.v1 as tf\n'), ((546, 597), 'tensorflo...
"""Authors: <NAME> Copyright (C) 2021 Onedata.org This software is released under the MIT license cited in 'LICENSE.txt' """ import os import random import string import pytest from botocore.config import Config import boto3 import uuid # # Uncomment to trace boto3 requests # # import logging # boto3.set_stream_logge...
[ "uuid.uuid4", "random.randint", "random.choice", "botocore.config.Config", "os.getenv" ]
[((402, 442), 'random.randint', 'random.randint', (['lower_bound', 'upper_bound'], {}), '(lower_bound, upper_bound)\n', (416, 442), False, 'import random\n'), ((1587, 1698), 'botocore.config.Config', 'Config', ([], {'region_name': '"""us-east-1"""', 'signature_version': '"""s3v4"""', 'retries': "{'max_attempts': 1, 'mo...
""" Will open a port in your router for Home Assistant and provide statistics. For more details about this component, please refer to the documentation at https://home-assistant.io/components/upnp/ """ import asyncio from ipaddress import ip_address import aiohttp import voluptuous as vol from homeassistant.config_e...
[ "voluptuous.Any", "voluptuous.Optional", "homeassistant.helpers.dispatcher.async_dispatcher_send", "voluptuous.All" ]
[((5037, 5105), 'homeassistant.helpers.dispatcher.async_dispatcher_send', 'dispatcher.async_dispatcher_send', (['hass', 'SIGNAL_REMOVE_SENSOR', 'device'], {}), '(hass, SIGNAL_REMOVE_SENSOR, device)\n', (5069, 5105), False, 'from homeassistant.helpers import dispatcher\n'), ((1216, 1269), 'voluptuous.Optional', 'vol.Opt...
import os import sys import time import pickle import scipy.io as sio import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Activation from keras.optimizers import SGD, RMSprop, Adagrad, Adadelta, Adam, Adamax from keras.constraints import maxnorm, nonneg import numpy import scipy fr...
[ "keras.optimizers.Adadelta", "keras.optimizers.Adamax", "keras.optimizers.SGD", "keras.layers.Dropout", "keras.optimizers.Adagrad", "keras.optimizers.Adam", "scipy.io.savemat", "keras.layers.Dense", "keras.models.Sequential", "keras.optimizers.RMSprop", "keras.constraints.nonneg" ]
[((1279, 1368), 'scipy.io.savemat', 'sio.savemat', (['output_filename', "{'rmse': rmse, 'correlation_2': corr, 'weights': final}"], {}), "(output_filename, {'rmse': rmse, 'correlation_2': corr,\n 'weights': final})\n", (1290, 1368), True, 'import scipy.io as sio\n'), ((1558, 1570), 'keras.models.Sequential', 'Sequen...
#!/usr/bin/env python3 from typing import List from bip32 import BIP32 from connectrum.client import StratumClient from tqdm import tqdm import scripts from descriptors import ScriptIterator, Path from scripts import ScriptType class Utxo: """ Data needed to spend a currently unspent transaction output. ...
[ "scripts.sha256", "descriptors.ScriptIterator" ]
[((857, 909), 'descriptors.ScriptIterator', 'ScriptIterator', (['master_key', 'address_gap', 'account_gap'], {}), '(master_key, address_gap, account_gap)\n', (871, 909), False, 'from descriptors import ScriptIterator, Path\n'), ((3051, 3073), 'scripts.sha256', 'scripts.sha256', (['script'], {}), '(script)\n', (3065, 30...
from unittest.mock import create_autospec import pytest from h.services.annotation_moderation import AnnotationModerationService from h.services.groupfinder import GroupfinderService from h.services.links import LinksService from h.services.nipsa import NipsaService from h.services.search_index import SearchIndexServ...
[ "unittest.mock.create_autospec" ]
[((1618, 1683), 'unittest.mock.create_autospec', 'create_autospec', (['GroupfinderService'], {'instance': '(True)', 'spec_set': '(True)'}), '(GroupfinderService, instance=True, spec_set=True)\n', (1633, 1683), False, 'from unittest.mock import create_autospec\n'), ((722, 796), 'unittest.mock.create_autospec', 'create_a...
# https://deeplearningcourses.com/c/artificial-intelligence-reinforcement-learning-in-python # https://www.udemy.com/artificial-intelligence-reinforcement-learning-in-python from __future__ import print_function, division from builtins import range # Note: you may need to update your version of future # sudo pip instal...
[ "numpy.abs", "grid_world.windy_grid", "builtins.range" ]
[((487, 500), 'builtins.range', 'range', (['g.rows'], {}), '(g.rows)\n', (492, 500), False, 'from builtins import range\n'), ((783, 796), 'builtins.range', 'range', (['g.rows'], {}), '(g.rows)\n', (788, 796), False, 'from builtins import range\n'), ((1553, 1565), 'grid_world.windy_grid', 'windy_grid', ([], {}), '()\n',...
import matplotlib.pyplot as plt import matplotlib import numpy as np from get_radar_loc_gt import yaw, rotToYawPitchRoll def getRotDiff(r1, r2): C1 = yaw(r1) C2 = yaw(r2) C_err = np.matmul(C2.transpose(), C1) yaw_err, _, _ = rotToYawPitchRoll(C_err) return abs(yaw_err) if __name__ == "__main__": ...
[ "matplotlib.pyplot.hist", "numpy.median", "matplotlib.rcParams.update", "numpy.savetxt", "get_radar_loc_gt.rotToYawPitchRoll", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "numpy.array", "numpy.arange", "matplotlib.pyplot.ylabel", "get_radar_loc_gt.yaw", "matplotlib.pyplot.grid", ...
[((155, 162), 'get_radar_loc_gt.yaw', 'yaw', (['r1'], {}), '(r1)\n', (158, 162), False, 'from get_radar_loc_gt import yaw, rotToYawPitchRoll\n'), ((172, 179), 'get_radar_loc_gt.yaw', 'yaw', (['r2'], {}), '(r2)\n', (175, 179), False, 'from get_radar_loc_gt import yaw, rotToYawPitchRoll\n'), ((242, 266), 'get_radar_loc_g...
r""" Support for embedded TeX expressions in Matplotlib. Requirements: * LaTeX. * \*Agg backends: dvipng>=1.6. * PS backend: PSfrag, dvips, and Ghostscript>=9.0. * PDF and SVG backends: if LuaTeX is present, it will be used to speed up some post-processing steps, but note that it is not used to parse the T...
[ "matplotlib.get_cachedir", "matplotlib.cbook._pformat_subprocess", "matplotlib.dviread.Dvi", "hashlib.md5", "numpy.empty", "subprocess.check_output", "packaging.version.parse", "os.path.exists", "matplotlib.colors.to_rgb", "pathlib.Path", "matplotlib._api.deprecate_privatize_attribute", "funct...
[((996, 1023), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1013, 1023), False, 'import logging\n'), ((3660, 3701), 'matplotlib._api.deprecate_privatize_attribute', '_api.deprecate_privatize_attribute', (['"""3.5"""'], {}), "('3.5')\n", (3694, 3701), False, 'from matplotlib import _api...
""" Settings and global config values for ricecooker. """ import atexit import hashlib import logging.config import os import shutil import socket import tempfile import requests from requests_file import FileAdapter UPDATE = False COMPRESS = False THUMBNAILS = False PUBLISH = False PROGRESS_MANAGER = None SUSHI_BAR...
[ "os.getenv", "os.makedirs", "os.getcwd", "requests.Session", "os.path.exists", "socket.setdefaulttimeout", "shutil.rmtree", "os.path.join", "requests_file.FileAdapter" ]
[((767, 795), 'socket.setdefaulttimeout', 'socket.setdefaulttimeout', (['(20)'], {}), '(20)\n', (791, 795), False, 'import socket\n'), ((4377, 4406), 'os.getenv', 'os.getenv', (['"""STUDIO_URL"""', 'None'], {}), "('STUDIO_URL', None)\n", (4386, 4406), False, 'import os\n'), ((4786, 4819), 'os.getenv', 'os.getenv', (['"...
import datetime import json import os import bcrypt from flask import session from pymongo import MongoClient if "credentials.json" not in os.listdir('.'): data = {"mongo_URI" : os.environ['mongo_URI']} else: data = json.load(open("credentials.json", "r")) client = MongoClient(data["mongo_URI"]) class User...
[ "pymongo.MongoClient", "bcrypt.gensalt", "datetime.datetime.utcnow", "os.listdir", "bcrypt.hashpw" ]
[((278, 308), 'pymongo.MongoClient', 'MongoClient', (["data['mongo_URI']"], {}), "(data['mongo_URI'])\n", (289, 308), False, 'from pymongo import MongoClient\n'), ((141, 156), 'os.listdir', 'os.listdir', (['"""."""'], {}), "('.')\n", (151, 156), False, 'import os\n'), ((1940, 1956), 'bcrypt.gensalt', 'bcrypt.gensalt', ...
""" test_core.py Created by <NAME> on 2009-08-09 """ import unittest import os import sys import tempfile import shutil import keyring.backend import keyring.core PASSWORD_TEXT = "<PASSWORD>" PASSWORD_TEXT_2 = "<PASSWORD>" KEYRINGRC = "keyringrc.cfg" class TestKeyring(keyring.backend.KeyringBackend): """A faked...
[ "unittest.main", "os.path.expanduser", "os.remove", "os.path.abspath", "unittest.TestSuite", "os.getcwd", "os.rename", "os.path.exists", "unittest.makeSuite", "tempfile.mkdtemp", "shutil.rmtree", "os.path.join", "os.chdir" ]
[((3320, 3340), 'unittest.TestSuite', 'unittest.TestSuite', ([], {}), '()\n', (3338, 3340), False, 'import unittest\n'), ((3442, 3481), 'unittest.main', 'unittest.main', ([], {'defaultTest': '"""test_suite"""'}), "(defaultTest='test_suite')\n", (3455, 3481), False, 'import unittest\n'), ((2181, 2201), 'os.remove', 'os....
# # Copyright (c) 2022 Airbyte, Inc., all rights reserved. # import re from base64 import b64decode from unittest import mock import pytest import responses from airbyte_cdk.models import SyncMode from freezegun import freeze_time from pytest import raises from requests.exceptions import ConnectionError from source_a...
[ "unittest.mock.MagicMock", "requests.exceptions.ConnectionError", "responses.add", "source_amazon_ads.schemas.profile.AccountInfo", "base64.b64decode", "pytest.raises", "pytest.mark.parametrize", "freezegun.freeze_time", "source_amazon_ads.spec.AmazonAdsConfig", "re.compile" ]
[((1295, 1447), 'base64.b64decode', 'b64decode', (['"""\n<KEY>\nCxPWzQOK68I1KQE11ergMNrExNTAxNTCiBSTYXrwGmxqYGloYmJhTJKb4ZrwGm1kbGhuaGRAmqPh\nmvAabWFpamxgZmBiQIrRcE1go7liAYX9dsTHAQAA\n"""'], {}), '(\n """\n<KEY>\nCxPWzQOK68I1KQE11ergMNrExNTAxNTCiBSTYXrwGmxqYGloYmJhTJKb4ZrwGm1kbGhuaGRAmqPh\nmvAabWFpamxgZmBiQIrRcE1go7...
from flask import Flask, render_template, redirect, url_for, request, session, flash, Markup import os from collections import defaultdict import inspect import pandas as pd import numpy as np from scipy import stats import re from graphviz import Digraph import plotly from plotly.subplots import make_subplots import p...
[ "json.dump", "flask.flash", "flask.session.pop", "flask.request.args.get", "warnings.filterwarnings", "flask.Flask", "os.system", "werkzeug.utils.secure_filename", "uuid.uuid1", "flask.url_for", "flask.request.form.to_dict", "numpy.array", "functools.wraps", "flask.render_template", "os....
[((924, 957), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (947, 957), False, 'import warnings\n'), ((965, 980), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (970, 980), False, 'from flask import Flask, render_template, redirect, url_for, request, session,...
import torch from torch import nn class SwishImplementation(torch.autograd.Function): @staticmethod def forward(ctx, i): result = i * torch.sigmoid(i) ctx.save_for_backward(i) return result @staticmethod def backward(ctx, grad_output): i = ctx.saved_variab...
[ "torch.sigmoid" ]
[((348, 364), 'torch.sigmoid', 'torch.sigmoid', (['i'], {}), '(i)\n', (361, 364), False, 'import torch\n'), ((159, 175), 'torch.sigmoid', 'torch.sigmoid', (['i'], {}), '(i)\n', (172, 175), False, 'import torch\n'), ((625, 641), 'torch.sigmoid', 'torch.sigmoid', (['x'], {}), '(x)\n', (638, 641), False, 'import torch\n')...
# -*- coding: utf-8 -*- """ .. Authors <NAME> <<EMAIL>> A set of tools to help with automatic API documentation of XICSRT. Description ----------- XICSRT uses sphinx for documentation, and API docs are based on the idea of code self documentation though `python` doc strings. This module contains a set of decorato...
[ "inspect.getmro", "inspect.getdoc" ]
[((1730, 1749), 'inspect.getmro', 'inspect.getmro', (['cls'], {}), '(cls)\n', (1744, 1749), False, 'import inspect\n'), ((1928, 1967), 'inspect.getdoc', 'inspect.getdoc', (['ancestor.default_config'], {}), '(ancestor.default_config)\n', (1942, 1967), False, 'import inspect\n')]
from ddtrace import tracer from ddtrace.propagation.b3 import B3HTTPPropagator tracer.configure( http_propagator=B3HTTPPropagator, hostname="ingest.lightstep.com", port=443, https=True ) tracer.set_tags( { "lightstep.service_name": "lightstep-py", "lightstep.access_token": "<access-...
[ "uuid.uuid4", "kitchen_consumer.KitchenConsumer", "ddtrace.tracer.set_tags", "flask.Flask", "flask.request.form.keys", "flask.render_template", "ddtrace.tracer.configure", "kitchen_service.KitchenService", "donut.Donut" ]
[((80, 190), 'ddtrace.tracer.configure', 'tracer.configure', ([], {'http_propagator': 'B3HTTPPropagator', 'hostname': '"""ingest.lightstep.com"""', 'port': '(443)', 'https': '(True)'}), "(http_propagator=B3HTTPPropagator, hostname=\n 'ingest.lightstep.com', port=443, https=True)\n", (96, 190), False, 'from ddtrace i...
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from app.models.base_model_ import Model from app import util class Transaction(Model): """NOTE: This class is auto generated by the swagger code generator progra...
[ "app.util.deserialize_model" ]
[((3324, 3357), 'app.util.deserialize_model', 'util.deserialize_model', (['dikt', 'cls'], {}), '(dikt, cls)\n', (3346, 3357), False, 'from app import util\n')]
import tornado.ioloop import tornado.web import tornado.template import tornado.httpserver import datetime import pytz from SQL.table_user import User class BaseHandler(tornado.web.RequestHandler): def get_current_user(self): # Sets current_user in every template name = self.get_secure_cookie('...
[ "datetime.datetime.now" ]
[((702, 733), 'datetime.datetime.now', 'datetime.datetime.now', (['pytz.utc'], {}), '(pytz.utc)\n', (723, 733), False, 'import datetime\n')]
from django.db import models from usuarios.models import Usuario from jornadas.models import Jornada_Corporacion class Votacion_Log(models.Model): jornada_corporacion = models.ForeignKey(Jornada_Corporacion) usuario = models.ForeignKey(Usuario) fecha_votacion = models.DateTimeField(auto_now_add=True, bla...
[ "django.db.models.ForeignKey", "django.db.models.DateTimeField", "django.db.models.BooleanField" ]
[((176, 214), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Jornada_Corporacion'], {}), '(Jornada_Corporacion)\n', (193, 214), False, 'from django.db import models\n'), ((229, 255), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Usuario'], {}), '(Usuario)\n', (246, 255), False, 'from django.db import m...
import logging import threading import schedule import time from fetch_papers import fetch_papers_main from twitter_daemon import main_twitter_fetcher from fetch_citations_and_references import update_all_papers from logger import logger_config def run_threaded(job_func): job_thread = threading.Thread(target=job...
[ "schedule.run_pending", "threading.Thread", "time.sleep", "logger.logger_config", "schedule.every", "logging.getLogger" ]
[((293, 326), 'threading.Thread', 'threading.Thread', ([], {'target': 'job_func'}), '(target=job_func)\n', (309, 326), False, 'import threading\n'), ((382, 433), 'logger.logger_config', 'logger_config', ([], {'info_filename': '"""background_tasks.log"""'}), "(info_filename='background_tasks.log')\n", (395, 433), False,...
from benchmark import Benchmark, benchmark import astropy.units as u import pytest @benchmark( { "log.final.star.LXUVStellar": {"value": 3.120390e21, "unit": u.W}, "log.final.b.EnvelopeMass": {"value": 0, "unit": u.Mearth}, "log.final.b.Radius": {"value": 6.378100e06, "unit": u.m}, ...
[ "benchmark.benchmark" ]
[((86, 469), 'benchmark.benchmark', 'benchmark', (["{'log.final.star.LXUVStellar': {'value': 3.12039e+21, 'unit': u.W},\n 'log.final.b.EnvelopeMass': {'value': 0, 'unit': u.Mearth},\n 'log.final.b.Radius': {'value': 6378100.0, 'unit': u.m},\n 'log.final.c.EnvelopeMass': {'value': 3.298788, 'unit': u.Mearth},\n...
# Generated by Django 3.2.1 on 2021-05-10 01:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('annotation', '0030_auto_20210429_1528'), ] operations = [ migrations.AddField( model_name='variantannotationversion', ...
[ "django.db.models.IntegerField" ]
[((357, 390), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(5000)'}), '(default=5000)\n', (376, 390), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python from flask import Blueprint, render_template, flash, redirect, url_for, request, abort from flask_bootstrap import __version__ as FLASK_BOOTSTRAP_VERSION from flask_login import ( LoginManager, current_user, login_required, login_user, logout_user, ) from flask_nav.elements imp...
[ "flask.flash", "flask.Blueprint", "urllib.parse.urljoin", "flask.request.form.get", "flask_login.login_user", "flask_nav.elements.View", "flask_login.logout_user", "flask.url_for", "flask.render_template", "user.User.find", "nav.nav.register_element", "urllib.parse.urlparse" ]
[((774, 805), 'flask.Blueprint', 'Blueprint', (['"""frontend"""', '__name__'], {}), "('frontend', __name__)\n", (783, 805), False, 'from flask import Blueprint, render_template, flash, redirect, url_for, request, abort\n'), ((1573, 1630), 'nav.nav.register_element', 'nav.register_element', (['"""frontend_top"""', 'crea...
# Computes expected results for `testGRU()` in `Tests/TensorFlowTests/LayerTests.swift`. # Requires 'tensorflow>=2.0.0a0' (e.g. "pip install tensorflow==2.2.0"). import sys import numpy import tensorflow as tf # Set random seed for repetable results tf.random.set_seed(0) def indented(s): return '\n'.join([' '...
[ "tensorflow.random.set_seed", "tensorflow.reduce_sum", "numpy.format_float_positional", "tensorflow.keras.layers.GRU", "tensorflow.keras.Input", "numpy.array2string", "tensorflow.keras.Model", "tensorflow.keras.initializers.GlorotUniform", "tensorflow.GradientTape" ]
[((252, 273), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['(0)'], {}), '(0)\n', (270, 273), True, 'import tensorflow as tf\n'), ((973, 1155), 'tensorflow.keras.layers.GRU', 'tf.keras.layers.GRU', ([], {'input_dim': 'input_dim', 'units': 'units', 'activation': '"""tanh"""', 'recurrent_activation': '"""sigmoid"...
import matplotlib.pyplot as plt from skimage import exposure import numpy as np def plot_img_and_mask(img, mask): img = np.array(img) img = (img - img.min()) / (img.max() - img.min()) img = exposure.equalize_adapthist(img) fig, ax = plt.subplots(1, 1, figsize=(10, 10)) ax.set_title('Input image')...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.yticks", "numpy.array", "matplotlib.pyplot.xticks", "matplotlib.pyplot.subplots", "skimage.exposure.equalize_adapthist" ]
[((126, 139), 'numpy.array', 'np.array', (['img'], {}), '(img)\n', (134, 139), True, 'import numpy as np\n'), ((204, 236), 'skimage.exposure.equalize_adapthist', 'exposure.equalize_adapthist', (['img'], {}), '(img)\n', (231, 236), False, 'from skimage import exposure\n'), ((252, 288), 'matplotlib.pyplot.subplots', 'plt...
import chex import jax.numpy as jnp import jax.random as jr import numpyro import numpyro.distributions as dist import pytest from numpyro.contrib.tfp import distributions as tfd from numpyro.distributions import constraints from gpjax.gps import Prior from gpjax.interfaces.numpyro import add_constraints, add_priors, ...
[ "gpjax.interfaces.numpyro.add_priors", "numpyro.contrib.tfp.distributions.LogNormal", "numpyro.contrib.tfp.distributions.Gamma", "numpyro.distributions.Gamma", "numpyro.distributions.LogNormal", "gpjax.parameters.initialise", "gpjax.interfaces.numpyro.numpyro_dict_params", "chex.assert_equal", "nump...
[((2852, 2929), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""variable"""', "['lengthscale', 'obs_noise', 'variance']"], {}), "('variable', ['lengthscale', 'obs_noise', 'variance'])\n", (2875, 2929), False, 'import pytest\n'), ((3821, 3898), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""vari...
#!/usr/bin/env python3 # The MIT License (MIT) # Copyright (c) 2016,2017 Massachusetts Institute of Technology # # Author: <NAME> # This software has been created in projects supported by the US National # Science Foundation and NASA (PI: Pankratius) # # Permission is hereby granted, free of charge, to any person obta...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "skdaccess.geo.groundwater.DataFetcher.getStationMetadata" ]
[((1799, 1823), 'skdaccess.geo.groundwater.DataFetcher.getStationMetadata', 'WDF.getStationMetadata', ([], {}), '()\n', (1821, 1823), True, 'from skdaccess.geo.groundwater import DataFetcher as WDF\n'), ((2140, 2181), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""Median Depth to Water Level"""'], {}), "('Median Depth...
import os STOCK_DIR = os.path.dirname(os.path.realpath(__file__))
[ "os.path.realpath" ]
[((39, 65), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (55, 65), False, 'import os\n')]
# coding: utf-8 """ Copyright 2016 SmartBear Software 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 applica...
[ "six.iteritems" ]
[((15395, 15424), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (15404, 15424), False, 'from six import iteritems\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2015-11-08 23:28 from django.conf import settings from django.db import migrations, models from django.utils.translation.trans_real import get_supported_language_variant import pybb.util from pybb.compat import get_image_field_class class Migration(migrations....
[ "pybb.compat.get_image_field_class", "django.db.models.GenericIPAddressField", "django.db.models.FloatField", "django.utils.translation.trans_real.get_supported_language_variant" ]
[((529, 627), 'django.db.models.GenericIPAddressField', 'models.GenericIPAddressField', ([], {'blank': '(True)', 'default': '"""0.0.0.0"""', 'null': '(True)', 'verbose_name': '"""User IP"""'}), "(blank=True, default='0.0.0.0', null=True,\n verbose_name='User IP')\n", (557, 627), False, 'from django.db import migrati...
import msvcrt import multiprocessing as mp import os import queue import time import psutil from datetime import datetime, timedelta from rlbot import version from rlbot.botmanager.helper_process_manager import HelperProcessManager from rlbot.base_extension import BaseExtension from rlbot.botmanager.bot_manager_flatbu...
[ "rlbot.utils.class_importer.import_class_with_base", "multiprocessing.Queue", "rlbot.parsing.rlbot_config_parser.parse_configurations", "msvcrt.kbhit", "rlbot.version.print_current_release_notes", "rlbot.utils.process_configuration.configure_processes", "rlbot.parsing.rlbot_config_parser.create_bot_conf...
[((1093, 1124), 'os.path.realpath', 'os.path.realpath', (['"""./rlbot.cfg"""'], {}), "('./rlbot.cfg')\n", (1109, 1124), False, 'import os\n'), ((1490, 1516), 'rlbot.utils.logging_utils.get_logger', 'get_logger', (['DEFAULT_LOGGER'], {}), '(DEFAULT_LOGGER)\n', (1500, 1516), False, 'from rlbot.utils.logging_utils import ...
import sys import os import glob import numpy as np import pytest from pyDeltaRCM.model import DeltaModel from pyDeltaRCM import shared_tools # utilities for file writing def create_temporary_file(tmp_path, file_name): d = tmp_path / 'configs' d.mkdir(parents=True, exist_ok=True) p = d / file_name ...
[ "pyDeltaRCM.model.DeltaModel", "numpy.zeros", "pytest.fixture", "pyDeltaRCM.shared_tools.get_random_uniform", "os.path.join" ]
[((1390, 1422), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (1404, 1422), False, 'import pytest\n'), ((3169, 3193), 'pyDeltaRCM.model.DeltaModel', 'DeltaModel', ([], {'input_file': 'p'}), '(input_file=p)\n', (3179, 3193), False, 'from pyDeltaRCM.model import DeltaModel...
#!/usr/bin/env python # Сконвертировать .env файл в строку для gclou import re import sys from pathlib import Path BASE_DIR = Path(__file__).parent.parent.absolute() def convert(filename): result = {} r = re.compile(r"^[\w]*=.*") for line in open(filename, "r").readlines(): if re.match(r, line):...
[ "pathlib.Path", "re.match", "sys.exit", "re.compile" ]
[((217, 241), 're.compile', 're.compile', (['"""^[\\\\w]*=.*"""'], {}), "('^[\\\\w]*=.*')\n", (227, 241), False, 'import re\n'), ((593, 604), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (601, 604), False, 'import sys\n'), ((302, 319), 're.match', 're.match', (['r', 'line'], {}), '(r, line)\n', (310, 319), False, 'i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of OTC Tool released under MIT license. # Copyright (C) 2016 T-systems <NAME>, <NAME> from otcclient.core.OtcConfig import OtcConfig import requests requests.packages.urllib3.disable_warnings() # @UndefinedVariable def delete( requestUrl): ...
[ "requests.session", "requests.packages.urllib3.disable_warnings" ]
[((218, 262), 'requests.packages.urllib3.disable_warnings', 'requests.packages.urllib3.disable_warnings', ([], {}), '()\n', (260, 262), False, 'import requests\n'), ((2053, 2071), 'requests.session', 'requests.session', ([], {}), '()\n', (2069, 2071), False, 'import requests\n')]
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
[ "pulumi.get", "pulumi.getter", "pulumi.set", "pulumi.InvokeOptions", "pulumi.runtime.invoke" ]
[((3141, 3179), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""marketplaceOffer"""'}), "(name='marketplaceOffer')\n", (3154, 3179), False, 'import pulumi\n'), ((3369, 3411), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""marketplacePublisher"""'}), "(name='marketplacePublisher')\n", (3382, 3411), False, 'impo...
import json import logging import boto3 import botocore from django.conf import settings logger = logging.getLogger(__name__) def s3_resource(): return boto3.resource( 's3', aws_access_key_id=settings.AWS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_KEY ) def dynamo_client(): retur...
[ "boto3.resource", "logging.getLogger", "boto3.client" ]
[((100, 127), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (117, 127), False, 'import logging\n'), ((159, 269), 'boto3.resource', 'boto3.resource', (['"""s3"""'], {'aws_access_key_id': 'settings.AWS_KEY_ID', 'aws_secret_access_key': 'settings.AWS_SECRET_KEY'}), "('s3', aws_access_key_id...
import logging from typing import Any, Callable, Dict logger = logging.getLogger('dependency injection') class Injector: providers: Dict[Any, Callable] = {} def provide(self, token: Any, provider: Callable): self.providers[token] = provider def get(self, token: Any): if token not in se...
[ "logging.getLogger" ]
[((64, 105), 'logging.getLogger', 'logging.getLogger', (['"""dependency injection"""'], {}), "('dependency injection')\n", (81, 105), False, 'import logging\n')]
from app import settings from app.utils.nessus import Batch from sqlalchemy import create_engine server = settings.NESSUS_SERVER username = settings.NESSUS_USERNAME password = settings.NESSUS_PASSWORD folder_exclude = settings.NESSUS_FOLDER_EXCLUDE scan_exclude = settings.NESSUS_SCAN_EXCLUDE nessus_table = settings.OM...
[ "sqlalchemy.create_engine", "app.utils.nessus.Batch.run_batch" ]
[((447, 497), 'sqlalchemy.create_engine', 'create_engine', (["('sqlite:///' + database)"], {'echo': '(False)'}), "('sqlite:///' + database, echo=False)\n", (460, 497), False, 'from sqlalchemy import create_engine\n'), ((497, 758), 'app.utils.nessus.Batch.run_batch', 'Batch.run_batch', ([], {'engine': 'engine', 'nessus_...
# for more up to date documentation go to https://automation.trendmicro.com/xdr/home # Tested with XDR V2.0 API, Trend Micro XDR Product Manager Team, November 2nd 2020 import requests import json import tmconfig # tmconfig.py with your api keys / tokens url_base = tmconfig.region['us'] # use the right region ...
[ "requests.get", "json.dumps" ]
[((573, 643), 'requests.get', 'requests.get', (['(url_base + url_path)'], {'params': 'query_params', 'headers': 'header'}), '(url_base + url_path, params=query_params, headers=header)\n', (585, 643), False, 'import requests\n'), ((5530, 5554), 'json.dumps', 'json.dumps', (['wb'], {'indent': '(4)'}), '(wb, indent=4)\n',...
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # # Invenio-Records-Resources is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """File schema.""" from marshmallow import Schema from marshmallow.fields import UUID, Dict, Number, ...
[ "marshmallow_utils.fields.SanitizedUnicode", "marshmallow_utils.fields.GenMethod", "marshmallow.fields.Dict", "marshmallow.fields.UUID", "marshmallow.fields.Number", "marshmallow_utils.fields.Links", "marshmallow.fields.Str" ]
[((471, 503), 'marshmallow_utils.fields.SanitizedUnicode', 'SanitizedUnicode', ([], {'dump_only': '(True)'}), '(dump_only=True)\n', (487, 503), False, 'from marshmallow_utils.fields import GenMethod, Links, SanitizedUnicode\n'), ((518, 537), 'marshmallow.fields.Str', 'Str', ([], {'dump_only': '(True)'}), '(dump_only=Tr...
#!/usr/bin/env python # coding: utf-8 # Many thanks for <EMAIL> & <EMAIL> for their orginal work and allowing me to share! import argparse import numpy as np import torch import torch.nn as nn import joblib from sklearn.metrics import roc_auc_score from sklearn.preprocessing import RobustScaler from torch.utils.data i...
[ "numpy.load", "uda_model.UDAModel", "argparse.ArgumentParser", "numpy.argmax", "joblib.dump", "numpy.argmin", "matplotlib.pyplot.figure", "numpy.mean", "numpy.exp", "uproot3.newtree", "torch.no_grad", "argparse.ArgumentTypeError", "matplotlib.rcParams.update", "torch.optim.lr_scheduler.Red...
[((631, 682), 'numpy.where', 'np.where', (['(pred_tags > 0.5)', '(1 - pred_tags)', 'pred_tags'], {}), '(pred_tags > 0.5, 1 - pred_tags, pred_tags)\n', (639, 682), True, 'import numpy as np\n'), ((2200, 2227), 'torch.manual_seed', 'torch.manual_seed', (['(25031992)'], {}), '(25031992)\n', (2217, 2227), False, 'import to...
""" The ComputationalBasisPOVMEffect class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTE...
[ "pygsti.modelmembers.povms.effect.POVMEffect.__init__", "numpy.empty", "numpy.allclose", "pygsti.baseobjs.basis.Basis.cast", "pygsti.baseobjs.polynomial.Polynomial", "pygsti.evotypes.Evotype.cast", "pygsti.baseobjs.statespace.StateSpace.cast", "numpy.array", "pygsti.modelmembers.term.RankOnePolynomi...
[((3858, 3899), 'itertools.product', '_itertools.product', (['*([(0, 1)] * nqubits)'], {}), '(*([(0, 1)] * nqubits))\n', (3876, 3899), True, 'import itertools as _itertools\n'), ((5581, 5622), 'itertools.product', '_itertools.product', (['*([(0, 1)] * nqubits)'], {}), '(*([(0, 1)] * nqubits))\n', (5599, 5622), True, 'i...
"""2. Predict with pre-trained Faster RCNN models ============================================== This article shows how to play with pre-trained Faster RCNN model. First let's import some necessary libraries: """ from matplotlib import pyplot as plt import gluoncv from gluoncv import model_zoo, data, utils ########...
[ "gluoncv.model_zoo.get_model", "matplotlib.pyplot.show", "gluoncv.utils.viz.plot_bbox", "gluoncv.utils.download", "gluoncv.data.transforms.presets.rcnn.load_test" ]
[((725, 793), 'gluoncv.model_zoo.get_model', 'model_zoo.get_model', (['"""faster_rcnn_resnet50_v2a_voc"""'], {'pretrained': '(True)'}), "('faster_rcnn_resnet50_v2a_voc', pretrained=True)\n", (744, 793), False, 'from gluoncv import model_zoo, data, utils\n'), ((1625, 1753), 'gluoncv.utils.download', 'utils.download', ([...
#!/usr/bin/env python3 """ Class ManageOutput """ import logging import utils.load_yaml from language.translate import Translate import jsonpickle import utils.logging logger = logging.getLogger(utils.logging.getLoggerName(__name__)) # from jinja2 import Environment, FileSystemLoader, select_autoescape # env = Envir...
[ "language.translate.Translate.localise", "jsonpickle.encode" ]
[((1012, 1079), 'language.translate.Translate.localise', 'Translate.localise', (['self.templated_texts', 'text_key', 'template_values'], {}), '(self.templated_texts, text_key, template_values)\n', (1030, 1079), False, 'from language.translate import Translate\n'), ((1242, 1309), 'language.translate.Translate.localise',...
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
[ "typing.TypeVar", "warnings.warn", "logging.getLogger" ]
[((2630, 2664), 'logging.getLogger', 'logging.getLogger', (['"""elasticsearch"""'], {}), "('elasticsearch')\n", (2647, 2664), False, 'import logging\n'), ((2678, 2722), 'typing.TypeVar', 't.TypeVar', (['"""SelfType"""'], {'bound': '"""Elasticsearch"""'}), "('SelfType', bound='Elasticsearch')\n", (2687, 2722), True, 'im...
"""The module for Genomic Uncertain Deletion Validation.""" from typing import List, Optional, Dict, Tuple import logging from ga4gh.vrs import models from ga4gh.vrsatile.pydantic.vrs_models import RelativeCopyClass from variation.schemas.app_schemas import Endpoint from variation.validators.duplication_deletion_base...
[ "ga4gh.vrs.models.Number", "logging.getLogger" ]
[((693, 723), 'logging.getLogger', 'logging.getLogger', (['"""variation"""'], {}), "('variation')\n", (710, 723), False, 'import logging\n'), ((9553, 9592), 'ga4gh.vrs.models.Number', 'models.Number', ([], {'value': 'end', 'type': '"""Number"""'}), "(value=end, type='Number')\n", (9566, 9592), False, 'from ga4gh.vrs im...
import FWCore.ParameterSet.Config as cms import copy process = cms.Process("ProcessOne") ## ## MessageLogger ## process.load('FWCore.MessageService.MessageLogger_cfi') process.MessageLogger.cerr.enable = False process.MessageLogger.AlignPCLThresholdsWriter=dict() process.MessageLogger.AlignPCLThresholds=dict() ...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.uint64", "copy.deepcopy", "FWCore.ParameterSet.Config.double", "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.untracked.string", "FWCore.ParameterSet.Config.untracked.bool", "FWCore.ParameterSet.Config.Process"...
[((65, 90), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""ProcessOne"""'], {}), "('ProcessOne')\n", (76, 90), True, 'import FWCore.ParameterSet.Config as cms\n'), ((2341, 2374), 'copy.deepcopy', 'copy.deepcopy', (['Thresholds.default'], {}), '(Thresholds.default)\n', (2354, 2374), False, 'import copy\n'), ...
import click from ghutil.types import Issue @click.command() @click.option('-d', '--delete', is_flag=True, help='Remove the given labels') @click.option('--set', is_flag=True, help='Replace the current labels') @Issue.argument('issue') @click.argument('label', nargs=-1) @click.pass_context def cli(ctx, issue, label,...
[ "ghutil.types.Issue.argument", "click.option", "click.argument", "click.command" ]
[((48, 63), 'click.command', 'click.command', ([], {}), '()\n', (61, 63), False, 'import click\n'), ((65, 141), 'click.option', 'click.option', (['"""-d"""', '"""--delete"""'], {'is_flag': '(True)', 'help': '"""Remove the given labels"""'}), "('-d', '--delete', is_flag=True, help='Remove the given labels')\n", (77, 141...
import unittest import numpy as np import pystan from pystan._compat import PY2 from pystan.tests.helper import get_model class TestArgs(unittest.TestCase): @classmethod def setUpClass(cls): model_code = 'parameters {real x;real y;real z;} model {x ~ normal(0,1);y ~ normal(0,1);z ~ normal(0,1);}' ...
[ "pystan.tests.helper.get_model", "pystan.misc.stansummary" ]
[((338, 385), 'pystan.tests.helper.get_model', 'get_model', (['"""standard_normals_model"""', 'model_code'], {}), "('standard_normals_model', model_code)\n", (347, 385), False, 'from pystan.tests.helper import get_model\n'), ((1178, 1206), 'pystan.misc.stansummary', 'pystan.misc.stansummary', (['fit'], {}), '(fit)\n', ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
[ "openstack_dashboard.api.keystone.role_list", "django.core.urlresolvers.reverse", "garr_horizon.content.garr_users.models.User.objects.all", "garr_horizon.content.garr_users.models.Project.objects.get", "garr_horizon.content.garr_users.tables.UsersTable", "horizon.messages.info", "garr_horizon.content.g...
[((1608, 1635), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1625, 1635), False, 'import logging\n'), ((1790, 1809), 'django.utils.translation.ugettext_lazy', '_', (['"""External Users"""'], {}), "('External Users')\n", (1791, 1809), True, 'from django.utils.translation import ugettext...
import os import sys sys.path.append("../") from paper_hook import paper_hook def recurse_print(t, prefix) : for elem in t : if elem == "v" : print("{0} = {1}".format(prefix, t["v"])) continue recurse_print(t[elem], "{0} {1}".format(prefix, elem)) def printout(t) : recurse_print(t, "t ") print("\n** \n...
[ "sys.path.append", "paper_hook.paper_hook" ]
[((21, 43), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (36, 43), False, 'import sys\n'), ((492, 526), 'paper_hook.paper_hook', 'paper_hook', ([], {'m': '(1)', 'gamma': '(3)', 'k': '(7)', 'L': 'L'}), '(m=1, gamma=3, k=7, L=L)\n', (502, 526), False, 'from paper_hook import paper_hook\n'), ((5...
import data as d from multiprocessing import Process d.init() def foo(): d.add_num(132) p =Process(target=foo) print("starting process") p.start() d.out() print('joining') p.join() d.out() print('done')
[ "data.out", "multiprocessing.Process", "data.init", "data.add_num" ]
[((54, 62), 'data.init', 'd.init', ([], {}), '()\n', (60, 62), True, 'import data as d\n'), ((97, 116), 'multiprocessing.Process', 'Process', ([], {'target': 'foo'}), '(target=foo)\n', (104, 116), False, 'from multiprocessing import Process\n'), ((154, 161), 'data.out', 'd.out', ([], {}), '()\n', (159, 161), True, 'imp...
import numpy as np import torch.nn as nn from .layer_ops import ModuleOperation from .simple_model import SimpleModel, SimpleModelOperation from src.utils import param_sizes, weight_vector class ElbowModel(ModuleOperation): def __init__(self, w_1=None, w_2=None, w_3=None): self.w_1 = w_1 if not w_1 is No...
[ "numpy.random.random" ]
[((601, 619), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (617, 619), True, 'import numpy as np\n'), ((635, 653), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (651, 653), True, 'import numpy as np\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-27 03:29 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20160326_1958'), ] operations = [ migrations.AlterModelOpt...
[ "django.db.models.CharField", "django.db.migrations.AlterModelOptions" ]
[((296, 469), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""cluster"""', 'options': "{'ordering': ('label',), 'verbose_name': 'centro de interesse',\n 'verbose_name_plural': 'centros de interesse'}"}), "(name='cluster', options={'ordering': ('label',\n ), 'verbose_nam...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * from typing import Any, Tuple, Optional """ CONSTANT VARIABLES """ CONTEXT_PREFIX = "TAXII2" COMPLEX_OBSERVATION_MODE_SKIP = "Skip indicators with more than a single observation" COMPLEX_OBSERVATION_MODE_CREATE_ALL =...
[ "demistomock.info", "demistomock.args", "demistomock.setIntegrationContext", "demistomock.getIntegrationContext", "demistomock.command", "demistomock.params", "demistomock.createIndicators", "demistomock.results" ]
[((6808, 6841), 'demistomock.setIntegrationContext', 'demisto.setIntegrationContext', (['{}'], {}), '({})\n', (6837, 6841), True, 'import demistomock as demisto\n'), ((7931, 7947), 'demistomock.params', 'demisto.params', ([], {}), '()\n', (7945, 7947), True, 'import demistomock as demisto\n'), ((7959, 7973), 'demistomo...
""" Title: Making new layers and models via subclassing Author: [fchollet](https://twitter.com/fchollet) Date created: 2019/03/01 Last modified: 2020/04/13 Description: Complete guide to writing `Layer` and `Model` objects from scratch. """ """ ## Setup """ import tensorflow as tf from tensorflow import keras """ ## ...
[ "tensorflow.reduce_sum", "tensorflow.keras.layers.Dense", "tensorflow.keras.metrics.Mean", "tensorflow.keras.backend.random_normal", "tensorflow.matmul", "tensorflow.keras.metrics.BinaryAccuracy", "tensorflow.keras.regularizers.l2", "tensorflow.nn.softmax", "tensorflow.nn.relu", "tensorflow.keras....
[((1342, 1357), 'tensorflow.ones', 'tf.ones', (['(2, 2)'], {}), '((2, 2))\n', (1349, 1357), True, 'import tensorflow as tf\n'), ((2132, 2147), 'tensorflow.ones', 'tf.ones', (['(2, 2)'], {}), '((2, 2))\n', (2139, 2147), True, 'import tensorflow as tf\n'), ((2825, 2840), 'tensorflow.ones', 'tf.ones', (['(2, 2)'], {}), '(...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "platform.processor", "os.mkdir", "os.remove", "os.unlink", "os.walk", "yaml.dump", "collections.defaultdict", "os.path.isfile", "yaml.safe_load", "absl.flags.DEFINE_boolean", "glob.glob", "shutil.rmtree", "os.path.join", "shutil.copy", "os.path.dirname", "os.path.exists", "re.findal...
[((1484, 1583), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""hub_username"""', 'None', '"""Dockerhub username, only used with --upload_to_hub"""'], {}), "('hub_username', None,\n 'Dockerhub username, only used with --upload_to_hub')\n", (1503, 1583), False, 'from absl import flags\n'), ((1601, 1768), 'ab...
import torch import torch.nn.functional as F from torch import nn from deeppipeline.common.modules import Identity, conv_block_3x3, conv_block_1x1 class SEBlock(nn.Module): def __init__(self, n_features, r=16): super(SEBlock, self).__init__() self.scorer = nn.Sequential(nn.AdaptiveAvgPool2d(1), ...
[ "torch.nn.AdaptiveAvgPool2d", "torch.ones", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.cat", "deeppipeline.common.modules.conv_block_3x3", "deeppipeline.common.modules.Identity", "deeppipeline.common.modules.conv_block_1x1", "torch.arange", "torch.nn.functional.max_pool2d" ]
[((813, 854), 'deeppipeline.common.modules.conv_block_1x1', 'conv_block_1x1', (['n_inp', '(n_out // 2)', '"""relu"""'], {}), "(n_inp, n_out // 2, 'relu')\n", (827, 854), False, 'from deeppipeline.common.modules import Identity, conv_block_3x3, conv_block_1x1\n'), ((875, 921), 'deeppipeline.common.modules.conv_block_3x3...
# -*- coding: utf-8 -*- """ Module implementing MainWindow. """ import os from .RadarUI import Ui_MainWindow from PyQt5.QtCore import * from PyQt5.QtWidgets import * from PyQt5 import QtWidgets from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QMainWindow from ..io import read_auto from ..io.util import ra...
[ "json.dump", "json.load", "os.path.basename", "os.path.dirname", "os.path.exists", "matplotlib.figure.Figure", "PyQt5.QtCore.pyqtSlot", "PyQt5.QtWidgets.QApplication", "os.path.join", "sys.exit" ]
[((3787, 3797), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (3795, 3797), False, 'from PyQt5.QtCore import pyqtSlot\n'), ((4072, 4082), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (4080, 4082), False, 'from PyQt5.QtCore import pyqtSlot\n'), ((4211, 4221), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], ...
import torch import torch.nn as nn from models.SpectralNorm import set_spectral_norm class FCDiscriminator(nn.Module): def __init__(self, input_dim, spectral_norm=True, preprocess_func=None): ''' Fully connected discriminator network :param input_dim: Number of inputs :param spectr...
[ "torch.squeeze", "torch.nn.Linear", "torch.nn.LeakyReLU", "torch.nn.Sigmoid" ]
[((823, 837), 'torch.nn.LeakyReLU', 'nn.LeakyReLU', ([], {}), '()\n', (835, 837), True, 'import torch.nn as nn\n'), ((871, 883), 'torch.nn.Sigmoid', 'nn.Sigmoid', ([], {}), '()\n', (881, 883), True, 'import torch.nn as nn\n'), ((1158, 1177), 'torch.squeeze', 'torch.squeeze', (['x', '(1)'], {}), '(x, 1)\n', (1171, 1177)...
#!/usr/bin/env python import os, logging, gym from baselines import logger from baselines.common import set_global_seeds from baselines import bench from baselines.a2c.a2c import learn from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv from baselines.common.atari_wrappers import make_atari, wrap_deepmin...
[ "gym.logger.setLevel", "baselines.common.atari_wrappers.make_atari", "argparse.ArgumentParser", "baselines.logger.get_dir", "baselines.common.atari_wrappers.wrap_deepmind", "baselines.common.set_global_seeds", "baselines.logger.configure" ]
[((791, 813), 'baselines.common.set_global_seeds', 'set_global_seeds', (['seed'], {}), '(seed)\n', (807, 813), False, 'from baselines.common import set_global_seeds\n'), ((1210, 1289), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), '(formatter_...
#!/usr/bin/python # # Copyright (c) 2016 <NAME>, <<EMAIL>> # <NAME>, <<EMAIL>> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version'...
[ "ansible.module_utils.azure_rm_common.CIDR_PATTERN.match" ]
[((8368, 8394), 'ansible.module_utils.azure_rm_common.CIDR_PATTERN.match', 'CIDR_PATTERN.match', (['prefix'], {}), '(prefix)\n', (8386, 8394), False, 'from ansible.module_utils.azure_rm_common import AzureRMModuleBase, CIDR_PATTERN\n')]
import tkinter from tkinter import ttk from tkinter import font import threading import time import collections import likeyoubot_worker import queue import pickle import sys import os import likeyoubot_message import likeyoubot_rohan as LYBROHAN from likeyoubot_configure import LYBConstant as lybconstant import date...
[ "tkinter.ttk.Label", "tkinter.StringVar", "tkinter.Text", "webbrowser.open_new", "pickle.dump", "random.choices", "os.path.isfile", "tkinter.BooleanVar", "tkinter.ttk.LabelFrame", "os.path.abspath", "likeyoubot_license.LYBLicense", "os.path.exists", "tkinter.ttk.Frame", "traceback.format_e...
[((1110, 1149), 'likeyoubot_logger.LYBLogger.getLogger', 'likeyoubot_logger.LYBLogger.getLogger', ([], {}), '()\n', (1147, 1149), False, 'import likeyoubot_logger\n'), ((1367, 1378), 'time.time', 'time.time', ([], {}), '()\n', (1376, 1378), False, 'import time\n'), ((1408, 1419), 'time.time', 'time.time', ([], {}), '()...
from django.db import models from django.contrib.auth.models import User from students.models import Class class BaseAbstractPost(models.Model): posted_on = models.DateTimeField(auto_now_add=True) edited = models.BooleanField(default=False) last_edited_on = models.DateTimeField(auto_now=True) class ...
[ "django.db.models.TextField", "django.db.models.URLField", "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((164, 203), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (184, 203), False, 'from django.db import models\n'), ((217, 251), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (236, 251), Fal...
"""@file numpy_float_array_as_tfrecord_writer.py contains the NumpyFloatArrayAsTfrecordWriter class""" import numpy as np import tensorflow as tf import tfwriter class NumpyFloatArrayAsTfrecordWriter(tfwriter.TfWriter): """a TfWriter to write numpy float arrays""" def _get_example(self, data): """wr...
[ "tensorflow.train.Features" ]
[((764, 837), 'tensorflow.train.Features', 'tf.train.Features', ([], {'feature': "{'shape': shape_feature, 'data': data_feature}"}), "(feature={'shape': shape_feature, 'data': data_feature})\n", (781, 837), True, 'import tensorflow as tf\n')]
# -*- coding: utf-8 -*- # Copyright 2015 moco_beta # # 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 agr...
[ "codecs.open" ]
[((7687, 7724), 'codecs.open', 'codecs.open', (['filename', 'mode', 'encoding'], {}), '(filename, mode, encoding)\n', (7698, 7724), False, 'import codecs\n')]
# Test the MQTT module # (c) Copyright <NAME>, Jul 2020 # # VERSION 1.1 import sys,time from miot import mqtt def on_error( broker, error ): try: err=str(error['id']) print( '# ERROR ('+err+'): '+error['message']+", "+broker.error( err ) ) except Exception as e: print(e) def on_connec...
[ "miot.mqtt.broker", "sys.exit" ]
[((1138, 1151), 'miot.mqtt.broker', 'mqtt.broker', ([], {}), '()\n', (1149, 1151), False, 'from miot import mqtt\n'), ((2255, 2265), 'sys.exit', 'sys.exit', ([], {}), '()\n', (2263, 2265), False, 'import sys, time\n')]
import numpy as np import os import pandas as pd from ..utils import (drop_tseconds_volume, read_ndata, write_ndata,compute_FD,generate_mask,interpolate_masked_data) from nipype.interfaces.base import (traits, TraitedSpec, BaseInterfaceInputSpec, File, SimpleInterface ) from nipype import loggin...
[ "pandas.DataFrame", "numpy.divide", "numpy.sum", "pandas.read_csv", "nipype.interfaces.base.traits.Float", "os.getcwd", "numpy.savetxt", "nipype.interfaces.base.File", "numpy.where", "numpy.loadtxt", "nipype.interfaces.base.traits.Either" ]
[((441, 505), 'nipype.interfaces.base.File', 'File', ([], {'exists': '(True)', 'mandatory': '(True)', 'desc': '""" either bold or nifti """'}), "(exists=True, mandatory=True, desc=' either bold or nifti ')\n", (445, 505), False, 'from nipype.interfaces.base import traits, TraitedSpec, BaseInterfaceInputSpec, File, Simp...
import ast import datetime import hashlib import json import os import secrets from urllib.parse import urlencode from django.conf import settings from django.core import exceptions from django.core.handlers.wsgi import WSGIRequest from django.http import QueryDict try: import stripe except ImportError: print...
[ "django.core.exceptions.ImproperlyConfigured", "json.loads", "urllib.parse.urlencode", "secrets.token_hex", "stripe.Customer.create", "stripe.PaymentIntent.create", "ast.literal_eval", "stripe.Charge.create", "datetime.datetime.now", "django.core.exceptions.ObjectDoesNotExist" ]
[((1532, 1552), 'secrets.token_hex', 'secrets.token_hex', (['n'], {}), '(n)\n', (1549, 1552), False, 'import secrets\n'), ((1686, 1706), 'secrets.token_hex', 'secrets.token_hex', (['(2)'], {}), '(2)\n', (1703, 1706), False, 'import secrets\n'), ((6180, 6208), 'ast.literal_eval', 'ast.literal_eval', (['user_infos'], {})...
# coding=utf-8 # Copyright 2018 The Dopamine Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ "os.path.dirname", "setuptools.find_packages" ]
[((840, 862), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (852, 862), False, 'from os import path\n'), ((1368, 1399), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['docs']"}), "(exclude=['docs'])\n", (1381, 1399), False, 'from setuptools import find_packages\n')]
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
[ "megengine.data.transform.vision.functional.pad", "megengine.data.transform.vision.functional.resize", "numpy.clip", "numpy.random.randint", "numpy.random.normal", "cv2.cvtColor", "cv2.split", "numpy.rollaxis", "numpy.random.choice", "math.log", "numpy.uint8", "math.sqrt", "numpy.asarray", ...
[((5400, 5438), 'numpy.concatenate', 'np.concatenate', (['(minxy, maxxy)'], {'axis': '(1)'}), '((minxy, maxxy), axis=1)\n', (5414, 5438), True, 'import numpy as np\n'), ((5724, 5775), 'numpy.concatenate', 'np.concatenate', (['(trans_coords, visibility)'], {'axis': '(-1)'}), '((trans_coords, visibility), axis=-1)\n', (5...
# -*- coding: utf-8 -*- """ Created on Wed Apr 1 12:27:23 2020 @author: robi """ # call new main from pathlib import Path, PurePath import image_bbox_slicer.image_bbox_slicer local = PurePath(Path.cwd()) #print(local) home_path = Path.home() print(repr(home_path))
[ "pathlib.Path.cwd", "pathlib.Path.home" ]
[((236, 247), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (245, 247), False, 'from pathlib import Path, PurePath\n'), ((196, 206), 'pathlib.Path.cwd', 'Path.cwd', ([], {}), '()\n', (204, 206), False, 'from pathlib import Path, PurePath\n')]
# -*- coding: utf-8 -*- """Utility functions for grouping sub-graphs by citation.""" from collections import defaultdict from .utils import cleanup from ...constants import CITATION, CITATION_REFERENCE, CITATION_TYPE __all__ = [ 'get_subgraphs_by_citation', ] def get_subgraphs_by_citation(graph): """Strat...
[ "collections.defaultdict" ]
[((452, 481), 'collections.defaultdict', 'defaultdict', (['graph.fresh_copy'], {}), '(graph.fresh_copy)\n', (463, 481), False, 'from collections import defaultdict\n')]
#============================================================================== # # This code was developed as part of the Astronomy Data and Computing Services # (ADACS; https:#adacs.org.au) 2017B Software Support program. # # Written by: <NAME>, <NAME>, <NAME> # Date: December 2017 # # It is distributed under t...
[ "django.forms.Select", "django.forms.TextInput", "gbkfit_web.models.PSF.objects.get", "django.utils.translation.ugettext_lazy", "gbkfit_web.models.Job.objects.get" ]
[((1788, 1845), 'django.forms.Select', 'forms.Select', ([], {'attrs': "{'class': 'form-control has-popover'}"}), "(attrs={'class': 'form-control has-popover'})\n", (1800, 1845), False, 'from django import forms\n'), ((1876, 1936), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form-control has-...
import cgi from paste.urlparser import PkgResourcesParser from pylons import request from pylons.controllers.util import forward from pylons.middleware import error_document_template from webhelpers.html.builder import literal from pylonstest.lib.base import BaseController class ErrorController(BaseController): ...
[ "pylons.request.GET.get", "pylons.request.environ.get", "webhelpers.html.builder.literal", "paste.urlparser.PkgResourcesParser" ]
[((738, 785), 'pylons.request.environ.get', 'request.environ.get', (['"""pylons.original_response"""'], {}), "('pylons.original_response')\n", (757, 785), False, 'from pylons import request\n'), ((804, 822), 'webhelpers.html.builder.literal', 'literal', (['resp.body'], {}), '(resp.body)\n', (811, 822), False, 'from web...
"""Support for Kodak Smart Home.""" from datetime import timedelta import logging from kodaksmarthome import KodakSmartHome import voluptuous as vol from homeassistant.const import ( CONF_PASSWORD, CONF_REGION, CONF_SCAN_INTERVAL, CONF_USERNAME, ) import homeassistant.helpers.config_validation as cv f...
[ "voluptuous.Optional", "homeassistant.helpers.event.track_time_interval", "voluptuous.Required", "homeassistant.helpers.dispatcher.dispatcher_send", "datetime.timedelta", "kodaksmarthome.KodakSmartHome", "logging.getLogger" ]
[((451, 478), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (468, 478), False, 'import logging\n'), ((874, 895), 'datetime.timedelta', 'timedelta', ([], {'seconds': '(10)'}), '(seconds=10)\n', (883, 895), False, 'from datetime import timedelta\n'), ((2760, 2819), 'homeassistant.helpers.e...