code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# -*- coding: utf-8 -*- import pprint import pymongo import yaml from elasticsearch import Elasticsearch, helpers from tqdm import tqdm pp = pprint.PrettyPrinter(indent=4) es = Elasticsearch() client = pymongo.MongoClient('localhost', 27017) db = client.cz4034 parsed_tweets_collection = db.tweets_parsed es.indices...
[ "elasticsearch.Elasticsearch", "pymongo.MongoClient", "tqdm.tqdm", "elasticsearch.helpers.bulk", "pprint.PrettyPrinter", "yaml.safe_load" ]
[((143, 173), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (163, 173), False, 'import pprint\n'), ((180, 195), 'elasticsearch.Elasticsearch', 'Elasticsearch', ([], {}), '()\n', (193, 195), False, 'from elasticsearch import Elasticsearch, helpers\n'), ((206, 245), 'pymongo.Mon...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from lottery.branch import base import models.registry from pruning.mask import Mask from pruning.pruned_model import PrunedModel...
[ "pruning.mask.Mask", "numpy.argmax", "utils.tensor_utils.mutual_coherence", "utils.tensor_utils.gradient_mean", "numpy.argsort", "torch.no_grad", "pruning.pruned_model.PrunedModel.to_mask_name", "utils.tensor_utils.shuffle_tensor", "torch.linalg.norm", "pruning.mask.Mask.load", "utils.tensor_uti...
[((834, 860), 'pruning.mask.Mask.load', 'Mask.load', (['self.level_root'], {}), '(self.level_root)\n', (843, 860), False, 'from pruning.mask import Mask\n'), ((881, 887), 'pruning.mask.Mask', 'Mask', ([], {}), '()\n', (885, 887), False, 'from pruning.mask import Mask\n'), ((1344, 1369), 'copy.deepcopy', 'copy.deepcopy'...
import numpy as np import torch import torch.optim as optim from model import GestureClassifier from data_loader import Dataset from torch.utils.data import DataLoader import torch.nn.functional as F import matplotlib.pyplot as plt device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') losses = [] PA...
[ "matplotlib.pyplot.title", "model.GestureClassifier", "matplotlib.pyplot.show", "torch.utils.data.DataLoader", "matplotlib.pyplot.ylim", "data_loader.Dataset", "torch.nn.functional.cross_entropy", "torch.save", "torch.cuda.is_available", "torch.no_grad" ]
[((1518, 1564), 'data_loader.Dataset', 'Dataset', ([], {'data_dir': '"""data/train"""', 'transform': 'None'}), "(data_dir='data/train', transform=None)\n", (1525, 1564), False, 'from data_loader import Dataset\n'), ((1584, 1656), 'torch.utils.data.DataLoader', 'DataLoader', (['dataset_train'], {'batch_size': '(1000)', ...
import sys sys.path.append('.') sys.path.append('..') from networks.engine.eval_manager import Evaluator import importlib def main(): import argparse parser = argparse.ArgumentParser(description="Test CFBI") parser.add_argument('--gpu_id', type=int, default=7) parser.add_argument('--config', type=str, ...
[ "sys.path.append", "networks.engine.eval_manager.Evaluator", "argparse.ArgumentParser", "importlib.import_module" ]
[((11, 31), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (26, 31), False, 'import sys\n'), ((32, 53), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (47, 53), False, 'import sys\n'), ((168, 216), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '""...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ "sources.MessengerApplication", "subprocess.Popen", "os.popen", "time.strftime" ]
[((1406, 1454), 'sources.MessengerApplication', 'service.MessengerApplication', (['dir_logs', 'name_obj'], {}), '(dir_logs, name_obj)\n', (1434, 1454), True, 'import sources as service\n'), ((1791, 1819), 'time.strftime', 'time_os.strftime', (['"""%d.%m.%Y"""'], {}), "('%d.%m.%Y')\n", (1807, 1819), True, 'import time a...
from flask import Blueprint api = Blueprint('api', __name__) from . import login, user, decorator, notification, tweet, repost, comment, follow
[ "flask.Blueprint" ]
[((35, 61), 'flask.Blueprint', 'Blueprint', (['"""api"""', '__name__'], {}), "('api', __name__)\n", (44, 61), False, 'from flask import Blueprint\n')]
import time import config from sys import argv from pymongo import MongoClient, DESCENDING, GEOSPHERE, TEXT, GEO2D from pymongo.errors import OperationFailure class RemoteDB(object): def __init__(self, dbname='bittiger'): self.db = None self.dbname = dbname def connect(self): # Conne...
[ "pymongo.MongoClient", "time.time" ]
[((389, 441), 'pymongo.MongoClient', 'MongoClient', (['config.MONGO_ADDRESS', 'config.MONGO_PORT'], {}), '(config.MONGO_ADDRESS, config.MONGO_PORT)\n', (400, 441), False, 'from pymongo import MongoClient, DESCENDING, GEOSPHERE, TEXT, GEO2D\n'), ((1294, 1305), 'time.time', 'time.time', ([], {}), '()\n', (1303, 1305), Fa...
import torch import torch.nn as nn import torch.utils.data as data import pytorch_lightning as pl from test_utils import TestLearner import sys sys.path.append('..') from torchdyn.models import *; from torchdyn.data_utils import * from torchdyn import * def test_adjoint_autograd(): """Compare ODE Adjoint vs Autog...
[ "sys.path.append", "torch.nn.Tanh", "torch.nn.CrossEntropyLoss", "torch.Tensor", "torch.cuda.is_available", "torch.utils.data.TensorDataset", "torch.nn.Linear", "torch.abs" ]
[((145, 166), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (160, 166), False, 'import sys\n'), ((638, 674), 'torch.utils.data.TensorDataset', 'data.TensorDataset', (['X_train', 'y_train'], {}), '(X_train, y_train)\n', (656, 674), True, 'import torch.utils.data as data\n'), ((1153, 1174), 'torch...
# Patterns used in spaCy matching # Called by nlp.py from utilities import family_members DEP = 'DEP' ENT_TYPE = 'ENT_TYPE' LEFT_ID = 'LEFT_ID' ORTH = 'ORTH' RIGHT_ID = 'RIGHT_ID' RIGHT_ATTRS = 'RIGHT_ATTRS' REL_OP = 'REL_OP' # "born ... on ... in ..." born_date_pattern = [ # anchor token: born { RIGHT_ID: '...
[ "utilities.family_members.keys" ]
[((1205, 1226), 'utilities.family_members.keys', 'family_members.keys', ([], {}), '()\n', (1224, 1226), False, 'from utilities import family_members\n')]
""" yandex_tts.py ------------- This module contains provides ability to perform TTS and STT with Yandex TTS and STT services. It contains these functions: * generate_audio_file_from_text() - returns wav audio synthesized from input text * generate_text_from_speech() - returns text generated from input ogg audio * ch...
[ "wave.open", "os.path.getsize", "json.dumps", "src.check_wav_length.convert_from_ogg_to_wav", "subprocess.call", "src.check_wav_length.split_into_files_less_than_1m", "requests.post", "pydub.AudioSegment.from_ogg", "os.getenv" ]
[((2335, 2357), 'os.getenv', 'os.getenv', (['"""IAM_TOKEN"""'], {}), "('IAM_TOKEN')\n", (2344, 2357), False, 'import os\n'), ((2587, 2633), 'requests.post', 'requests.post', (['url'], {'headers': 'headers', 'data': 'data'}), '(url, headers=headers, data=data)\n', (2600, 2633), False, 'import requests\n'), ((3194, 3216)...
from typing import Tuple, Union import pandas as pd import tensorflow as tf from pocmon.preprocessing import one_hot, standardization from sui.dl.initializers import get_init from sui.dl.optimizers import get_opti class FM: def __init__(self, categorical_feats: Union[list, tuple] = None, numerical_feats: Union[...
[ "tensorflow.einsum", "pandas.read_csv", "tensorflow.keras.metrics.Mean", "sui.dl.optimizers.get_opti", "pocmon.preprocessing.standardization", "pocmon.preprocessing.one_hot", "tensorflow.reduce_mean", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.cast", "tensorflow.Variable", "tensor...
[((6316, 6356), 'pandas.read_csv', 'pd.read_csv', (['"""../../../data/titanic.csv"""'], {}), "('../../../data/titanic.csv')\n", (6327, 6356), True, 'import pandas as pd\n'), ((1006, 1027), 'sui.dl.initializers.get_init', 'get_init', (['initializer'], {}), '(initializer)\n', (1014, 1027), False, 'from sui.dl.initializer...
# Generated by Django 3.2.4 on 2021-08-02 21:38 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_cryptography.fields class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_ma...
[ "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.TimeField", "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.EmailField", "django.db.models.AutoField", "django.db.models.IntegerField", "django.db.mod...
[((8299, 8402), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""bookstore.promotion"""'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n to='bookstore.promotion')\n", (8316, 8402), False, 'from django.db import migr...
import json import requests from shorty.exception_handlers.providers_exception import ProvidersException from shorty.providers.bitly import Bitly TOKEN = "<KEY>" class TinyUrl: @classmethod def shorten_url(cls, url): try: headers = { 'Authorization': f'Bearer {TOKEN}', ...
[ "json.dumps", "shorty.exception_handlers.providers_exception.ProvidersException" ]
[((610, 720), 'shorty.exception_handlers.providers_exception.ProvidersException', 'ProvidersException', (['"""TinyUrl seems to be unavailable at the moment. Please try a different provider"""'], {}), "(\n 'TinyUrl seems to be unavailable at the moment. Please try a different provider'\n )\n", (628, 720), False, '...
# -*- coding: utf-8 -*- """ Tic Toe Using pygame , numpy and sys with Graphical User Interface """ import pygame import sys from pygame.locals import * import numpy as np # ------ # constants # ------- width = 800 height = 800 #row and columns board_rows = 3 board_columns = 3 cross_width = 25 square_si...
[ "pygame.quit", "pygame.draw.line", "pygame.event.get", "pygame.display.set_mode", "numpy.zeros", "pygame.init", "pygame.display.update", "pygame.font.Font", "pygame.display.set_caption", "sys.exit" ]
[((608, 621), 'pygame.init', 'pygame.init', ([], {}), '()\n', (619, 621), False, 'import pygame\n'), ((632, 672), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(height, width)'], {}), '((height, width))\n', (655, 672), False, 'import pygame\n'), ((674, 716), 'pygame.display.set_caption', 'pygame.display.set_...
# -*- coding: utf-8 -*- # # Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ "googlecloudsdk.command_lib.compute.org_security_policies.flags.AddArgsCopyRules", "googlecloudsdk.calliope.base.ReleaseTracks", "googlecloudsdk.command_lib.compute.org_security_policies.flags.OrgSecurityPolicyArgument" ]
[((1156, 1223), 'googlecloudsdk.calliope.base.ReleaseTracks', 'base.ReleaseTracks', (['base.ReleaseTrack.ALPHA', 'base.ReleaseTrack.BETA'], {}), '(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA)\n', (1174, 1223), False, 'from googlecloudsdk.calliope import base\n'), ((1658, 1735), 'googlecloudsdk.command_lib.compute.o...
import requests import xmltodict def get_wufoo_textfile(url, zip_file=False): if zip_file == True: data = requests.get(url) return data else: data = requests.get(url) data.encoding = 'utf-8' data = data.text return data def BBF_to_seq(URL): biobrick = xmltod...
[ "requests.get" ]
[((119, 136), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (131, 136), False, 'import requests\n'), ((182, 199), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (194, 199), False, 'import requests\n')]
import random import numpy as np import heapq as hp import time from k_shortest_path import k_shortest_path_algorithm, k_shortest_path_all_destination def simulated_annealing_unsplittable_flows(graph, commodity_list, nb_iterations=10**5, nb_k_shortest_paths=10, verbose=0): nb_nodes = len(graph) nb_commoditie...
[ "random.randint", "heapq.heappush", "k_shortest_path.k_shortest_path_all_destination", "heapq.heappop", "random.random", "numpy.array", "numpy.exp", "numpy.arange", "numpy.random.choice" ]
[((2006, 2043), 'random.randint', 'random.randint', (['(0)', '(nb_commodities - 1)'], {}), '(0, nb_commodities - 1)\n', (2020, 2043), False, 'import random\n'), ((3400, 3435), 'numpy.exp', 'np.exp', (['((fitness - new_fitness) / T)'], {}), '((fitness - new_fitness) / T)\n', (3406, 3435), True, 'import numpy as np\n'), ...
import os from exception.crawler_exception import CrawlerException from neo4jrestclient.client import GraphDatabase from vfb_neo4j.vfb.uk.ac.ebi.vfb.neo4j.neo4j_tools import neo4j_connect from vfb_neo4j.vfb.uk.ac.ebi.vfb.neo4j.KB_tools import KB_pattern_writer from vfb_neo4j.vfb.uk.ac.ebi.vfb.neo4j.KB_tools import kb_o...
[ "neo4jrestclient.client.GraphDatabase", "vfb_neo4j.vfb.uk.ac.ebi.vfb.neo4j.KB_tools.kb_owl_edge_writer", "exception.crawler_exception.CrawlerException", "vfb_neo4j.vfb.uk.ac.ebi.vfb.neo4j.neo4j_tools.neo4j_connect", "vfb_neo4j.vfb.uk.ac.ebi.vfb.neo4j.KB_tools.KB_pattern_writer", "os.getenv" ]
[((704, 725), 'os.getenv', 'os.getenv', (['"""KBserver"""'], {}), "('KBserver')\n", (713, 725), False, 'import os\n'), ((750, 769), 'os.getenv', 'os.getenv', (['"""KBuser"""'], {}), "('KBuser')\n", (759, 769), False, 'import os\n'), ((798, 821), 'os.getenv', 'os.getenv', (['"""KBpassword"""'], {}), "('KBpassword')\n", ...
import re from unidecode import unidecode from ..utils import squeeze, translation, check_empty, check_str from .phonetic_algorithm import PhoneticAlgorithm class FuzzySoundex(PhoneticAlgorithm): def __init__(self): super().__init__() self.translations = translation( 'ABCDEFGHIJKLMNO...
[ "unidecode.unidecode", "re.sub" ]
[((2078, 2108), 're.sub', 're.sub', (['rule[0]', 'rule[1]', 'word'], {}), '(rule[0], rule[1], word)\n', (2084, 2108), False, 'import re\n'), ((1312, 1327), 'unidecode.unidecode', 'unidecode', (['word'], {}), '(word)\n', (1321, 1327), False, 'from unidecode import unidecode\n')]
# -*- coding: utf-8 -*- """ Created on Mon Aug 22 13:25:49 2016 @author: Administrator """ from flask import Blueprint auth = Blueprint('auth',__name__) from . import views
[ "flask.Blueprint" ]
[((136, 163), 'flask.Blueprint', 'Blueprint', (['"""auth"""', '__name__'], {}), "('auth', __name__)\n", (145, 163), False, 'from flask import Blueprint\n')]
import sys import os from mpl_toolkits import mplot3d import numpy as np import matplotlib.pyplot as plt filePath_gt = sys.argv[1] filePath_results = sys.argv[2] gt = np.genfromtxt(filePath_gt, delimiter=",", names=["x", "y", "timestamp"]) results = np.genfromtxt(filePath_results, delimiter=",", names=["x", "y", "t...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.xlim", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.genfromtxt", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((171, 243), 'numpy.genfromtxt', 'np.genfromtxt', (['filePath_gt'], {'delimiter': '""","""', 'names': "['x', 'y', 'timestamp']"}), "(filePath_gt, delimiter=',', names=['x', 'y', 'timestamp'])\n", (184, 243), True, 'import numpy as np\n'), ((254, 331), 'numpy.genfromtxt', 'np.genfromtxt', (['filePath_results'], {'delim...
from configuration.dataset_configuration import DatasetConfiguration from configuration.experiment_configuration import ExperimentConfiguration from configuration.mmd_configuration import MMDConfiguration from configuration.optimization_configuration import OptimizationConfiguration from configuration.sklearn_configura...
[ "configuration.tree_search_configuration.TreeSearchConfiguration", "argparse.ArgumentParser", "configuration.experiment_configuration.ExperimentConfiguration", "configuration.mmd_configuration.MMDConfiguration", "configuration.torch_configuration.TorchConfiguration", "mf_tree.experiment_configurer.Default...
[((704, 841), 'configuration.dataset_configuration.DatasetConfiguration', 'DatasetConfiguration', ([], {'dataset_path': 'args.dataset_path', 'columns_to_censor': 'args.columns_to_censor', 'experiment_type': 'args.experiment_type'}), '(dataset_path=args.dataset_path, columns_to_censor=args\n .columns_to_censor, exper...
#!/usr/bin/env python from sys import argv import json #Create a fake JSON config file, as should be received when running the pipeline on the web. script, out_f = argv #Define dictionary with options options = { "assembly" : "GRCh37", #options: GRCh37 | GRCh38 "input_type" : "single", #options: single | interval #...
[ "json.dump", "json.load" ]
[((2784, 2834), 'json.dump', 'json.dump', (['options', 'out'], {'indent': '(4)', 'sort_keys': '(False)'}), '(options, out, indent=4, sort_keys=False)\n', (2793, 2834), False, 'import json\n'), ((2898, 2913), 'json.load', 'json.load', (['db_h'], {}), '(db_h)\n', (2907, 2913), False, 'import json\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import os import re import time import shutil import argparse import subprocess DESCRIPTION = "Priroda runner" TASKS = {"Hessian": "Hes", "Optimize": "Opt"} def wait_timeout(process, timeout=0, interval=1): ""...
[ "subprocess.Popen", "argparse.ArgumentParser", "time.time", "time.sleep", "re.findall", "shutil.copyfile", "os.path.split" ]
[((401, 412), 'time.time', 'time.time', ([], {}), '()\n', (410, 412), False, 'import time\n'), ((859, 913), 'subprocess.Popen', 'subprocess.Popen', (['process_args'], {'stdout': 'subprocess.PIPE'}), '(process_args, stdout=subprocess.PIPE)\n', (875, 913), False, 'import subprocess\n'), ((1159, 1183), 'os.path.split', 'o...
""" Utilities for the :class:`~django_mri.analysis.interfaces.dmriprep.dmriprep.DmriPrep` interface. """ from niworkflows.utils.spaces import Reference, SpatialReferences #: TheBase-specific KWARGS THE_BASE_BIDS_IDENTIFIERS = dict( dwi_identifier={"direction": "ap"}, fmap_identifier={"acquisition": "dwi"}, ...
[ "niworkflows.utils.spaces.Reference", "niworkflows.utils.spaces.SpatialReferences" ]
[((579, 603), 'niworkflows.utils.spaces.Reference', 'Reference', (['"""OASIS30ANTs"""'], {}), "('OASIS30ANTs')\n", (588, 603), False, 'from niworkflows.utils.spaces import Reference, SpatialReferences\n'), ((616, 687), 'niworkflows.utils.spaces.SpatialReferences', 'SpatialReferences', ([], {'spaces': "['MNI152NLin2009c...
""" Module for guiding construction of the Wavelength Image .. include common links, assuming primary doc root is up one directory .. include:: ../links.rst """ import inspect import numpy as np import os from pypeit import msgs from pypeit import utils from pypeit import datamodel from IPython import embed class...
[ "numpy.zeros_like", "numpy.ones_like", "numpy.invert", "pypeit.msgs.error", "pypeit.datamodel.DataContainer.__init__", "pypeit.utils.func_val", "inspect.currentframe", "inspect.stack", "pypeit.msgs.info" ]
[((997, 1040), 'pypeit.datamodel.DataContainer.__init__', 'datamodel.DataContainer.__init__', (['self'], {'d': 'd'}), '(self, d=d)\n', (1029, 1040), False, 'from pypeit import datamodel\n'), ((4079, 4104), 'numpy.zeros_like', 'np.zeros_like', (['self.tilts'], {}), '(self.tilts)\n', (4092, 4104), True, 'import numpy as ...
# -*- coding: utf-8 -*- """ Created on Mon Jun 14 16:15:24 2021 @author: travis.czechorski Email: <EMAIL> <EMAIL> Advisor: <EMAIL> Github: https://github.com/tjczec01 """ from fipy import CellVariable, Grid1D, TransientTerm, VanLeerConvectionTerm, DiffusionTerm, Im...
[ "fipy.CellVariable", "fipy.Grid1D", "fipy.DiffusionTerm", "fipy.ImplicitSourceTerm", "fipy.Viewer", "fipy.ConvectionTerm", "fipy.tools.numerix.random.seed", "fipy.VanLeerConvectionTerm", "fipy.tools.numerix.random.random", "fipy.input", "fipy.TransientTerm", "fipy.tools.numerix.log" ]
[((1209, 1229), 'fipy.Grid1D', 'Grid1D', ([], {'nx': 'nx', 'dx': 'dx'}), '(nx=nx, dx=dx)\n', (1215, 1229), False, 'from fipy import CellVariable, Grid1D, TransientTerm, VanLeerConvectionTerm, DiffusionTerm, ImplicitSourceTerm, ConvectionTerm, CentralDifferenceConvectionTerm, Viewer\n'), ((1243, 1295), 'fipy.CellVariabl...
#!/usr/bin/python # -*- coding: utf-8 -*- import socketIO_client class WikiNamespace(socketIO_client.BaseNamespace): def on_change(self, change): print('%(user)s edited %(title)s' % change) def on_connect(self): self.emit('subscribe', '*.wikipedia.org') socketIO = socketIO_client.SocketIO('s...
[ "socketIO_client.SocketIO" ]
[((293, 345), 'socketIO_client.SocketIO', 'socketIO_client.SocketIO', (['"""stream.wikimedia.org"""', '(80)'], {}), "('stream.wikimedia.org', 80)\n", (317, 345), False, 'import socketIO_client\n')]
from typing import Optional, Dict, Any from sqlalchemy import Column, Enum as EnumType, String, Integer from frangiclave.compendium.base import Base, Session from frangiclave.compendium.ending_flavour import EndingFlavour from frangiclave.compendium.file import File from frangiclave.compendium.game_content import Gam...
[ "frangiclave.compendium.utils.get", "sqlalchemy.Enum", "sqlalchemy.Column" ]
[((437, 470), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (443, 470), False, 'from sqlalchemy import Column, Enum as EnumType, String, Integer\n'), ((493, 520), 'sqlalchemy.Column', 'Column', (['String'], {'unique': '(True)'}), '(String, unique=True)\n', (49...
#!/usr/bin/env python from ATK.Core import DoubleInPointerFilter, DoubleOutPointerFilter from ATK.Delay import DoubleUniversalVariableDelayLineFilter from ATK.EQ import DoubleSecondOrderLowPassFilter from ATK.Tools import DoubleWhiteNoiseGeneratorFilter import matplotlib.pyplot as plt sample_rate = 96000 def filter...
[ "ATK.Core.DoubleInPointerFilter", "ATK.Delay.DoubleUniversalVariableDelayLineFilter", "ATK.EQ.DoubleSecondOrderLowPassFilter", "ATK.Core.DoubleOutPointerFilter", "ATK.Tools.DoubleWhiteNoiseGeneratorFilter", "numpy.zeros", "numpy.savetxt", "numpy.sin", "numpy.arange" ]
[((397, 436), 'numpy.zeros', 'np.zeros', (['input.shape'], {'dtype': 'np.float64'}), '(input.shape, dtype=np.float64)\n', (405, 436), True, 'import numpy as np\n'), ((451, 486), 'ATK.Core.DoubleInPointerFilter', 'DoubleInPointerFilter', (['input', '(False)'], {}), '(input, False)\n', (472, 486), False, 'from ATK.Core i...
import cv2 import numpy as np import skfmm import skimage from numpy import ma def get_mask(sx, sy, scale, step_size): size = int(step_size // scale) * 2 + 1 mask = np.zeros((size, size)) for i in range(size): for j in range(size): if ((i + 0.5) - (size // 2 + sx)) ** 2 + \ ...
[ "numpy.pad", "numpy.ma.masked_values", "skfmm.distance", "numpy.zeros", "skimage.morphology.disk", "numpy.argmin", "numpy.rint", "numpy.max", "cv2.resize" ]
[((175, 197), 'numpy.zeros', 'np.zeros', (['(size, size)'], {}), '((size, size))\n', (183, 197), True, 'import numpy as np\n'), ((737, 759), 'numpy.zeros', 'np.zeros', (['(size, size)'], {}), '((size, size))\n', (745, 759), True, 'import numpy as np\n'), ((1898, 1939), 'numpy.ma.masked_values', 'ma.masked_values', (['(...
#-*-coding: utf-8*- from sys import argv from optparse import OptionParser as opt from pyperclip import copy def banner(): print(''' _____________ | | | Taco | | & | | Salsa | |_____________| [+]Github: https://github.com/binarioGH ''') def loadContent(file, hashf="unk...
[ "pyperclip.copy", "optparse.OptionParser" ]
[((956, 994), 'optparse.OptionParser', 'opt', (['"""Usage: %prog [options] [values]"""'], {}), "('Usage: %prog [options] [values]')\n", (959, 994), True, 'from optparse import OptionParser as opt\n'), ((2382, 2403), 'pyperclip.copy', 'copy', (['content[o.hash]'], {}), '(content[o.hash])\n', (2386, 2403), False, 'from p...
import requests, lxml from bs4 import BeautifulSoup # TODO: add list of countries Google domain as an optional argument: "google.br/google.uk/google.au", etc. # TODO: add corresponding language ("hl" param) to defined Google domain. Example: if google.br -> hl:es (spanish) # TODO: loop through all domains with appropr...
[ "bs4.BeautifulSoup", "requests.get" ]
[((1181, 1258), 'requests.get', 'requests.get', (['"""https://www.google.com/search"""'], {'params': 'params', 'headers': 'headers'}), "('https://www.google.com/search', params=params, headers=headers)\n", (1193, 1258), False, 'import requests, lxml\n'), ((1274, 1306), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html.text...
from graph import GrapheFortementConnexe as gfc, TestGraph def main(): test = TestGraph() for i, G in enumerate(test): print("------------------------------------------------------------------------------------------") print("") print("Graphe", i + 1, ":") test.demo(G) ...
[ "graph.TestGraph" ]
[((84, 95), 'graph.TestGraph', 'TestGraph', ([], {}), '()\n', (93, 95), False, 'from graph import GrapheFortementConnexe as gfc, TestGraph\n')]
from .emailBot import MailBot from .weatherBot import WheaterBot from .utils import generateEmail from datetime import datetime from .validations import EmailValidation from time import sleep valid = EmailValidation() class ForecastBot: def __init__(self, cityCoords = ['-22.739651', '-47.174052'], mai...
[ "datetime.datetime.now", "time.sleep" ]
[((586, 600), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (598, 600), False, 'from datetime import datetime\n'), ((616, 630), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (628, 630), False, 'from datetime import datetime\n'), ((1549, 1558), 'time.sleep', 'sleep', (['(15)'], {}), '(15)\n', (...
import unittest import subprocess import sys import os class TestExamples(unittest.TestCase): def run_example_file(self, name, root): cmd = [sys.executable, '-m', 'examples.' + name] try: p = subprocess.Popen(cmd, cwd=root, stdout=subprocess.DEVNULL) ...
[ "subprocess.Popen", "os.path.split", "os.path.join", "os.path.splitext" ]
[((227, 285), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'cwd': 'root', 'stdout': 'subprocess.DEVNULL'}), '(cmd, cwd=root, stdout=subprocess.DEVNULL)\n', (243, 285), False, 'import subprocess\n'), ((607, 637), 'os.path.join', 'os.path.join', (['root', '"""examples"""'], {}), "(root, 'examples')\n", (619, 637), ...
import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("127.0.0.1", 14900)) msg = sock.recv(16384) print(msg.decode("utf-8")) sock.close()
[ "socket.socket" ]
[((22, 71), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (35, 71), False, 'import socket\n')]
from email import header import pandas as pd dt = pd.read_json("Data/user_gee_datasets.json") dt = dt[["name", "id"]] res = "`" + dt.name + " <https://code.earthengine.google.com/?asset=" + dt.id + ">`_" res.to_csv("docs/source/user_gee_datasets.csv", index=False, header=False)
[ "pandas.read_json" ]
[((51, 94), 'pandas.read_json', 'pd.read_json', (['"""Data/user_gee_datasets.json"""'], {}), "('Data/user_gee_datasets.json')\n", (63, 94), True, 'import pandas as pd\n')]
import os import logging import requests import pandas as pd import time import sys import math from datetime import datetime import json from dataactbroker.helpers.pandas_helper import check_dataframe_diff from dataactcore.interfaces.db import GlobalDB from dataactcore.config import CONFIG_BROKER from dataactcore.lo...
[ "json.dump", "os.remove", "dataactcore.interfaces.db.GlobalDB.db", "os.path.join", "dataactcore.logging.configure_logging", "pandas.read_csv", "math.floor", "dataactbroker.helpers.pandas_helper.check_dataframe_diff", "dataactvalidator.scripts.loader_utils.clean_data", "time.time", "requests.get"...
[((562, 589), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (579, 589), False, 'import logging\n'), ((3221, 3235), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (3233, 3235), False, 'from datetime import datetime\n'), ((5695, 5714), 'dataactcore.logging.configure_logging', '...
from CNS_UDP_FAST import CNS import numpy as np import time import random class ENVCNS(CNS): def __init__(self, Name, IP, PORT, Monitoring_ENV=None): super(ENVCNS, self).__init__(threrad_name=Name, CNS_IP=IP, CNS_Port=PORT, Remote_I...
[ "numpy.array", "random.randint", "time.time" ]
[((2121, 2136), 'numpy.array', 'np.array', (['state'], {}), '(state)\n', (2129, 2136), True, 'import numpy as np\n'), ((7354, 7365), 'time.time', 'time.time', ([], {}), '()\n', (7363, 7365), False, 'import time\n'), ((7046, 7067), 'random.randint', 'random.randint', (['(0)', '(20)'], {}), '(0, 20)\n', (7060, 7067), Fal...
import dash_bootstrap_components as dbc from dash import html from .util import make_subheading breadcrumb = html.Div( [ make_subheading("Breadcrumb", "breadcrumb"), dbc.Breadcrumb( items=[ {"label": "Docs", "href": "/docs", "external_link": True}, { ...
[ "dash_bootstrap_components.Breadcrumb" ]
[((188, 395), 'dash_bootstrap_components.Breadcrumb', 'dbc.Breadcrumb', ([], {'items': "[{'label': 'Docs', 'href': '/docs', 'external_link': True}, {'label':\n 'Components', 'href': '/docs/components', 'external_link': True}, {\n 'label': 'Breadcrumb', 'active': True}]"}), "(items=[{'label': 'Docs', 'href': '/doc...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import traceback from typing import List import ray from ray.experimental.serve import SingleQuery def batched_input(func): """Decorator to mark an actor method as accepting only a single input. By ...
[ "ray.worker.global_worker.put_object", "traceback.format_exc" ]
[((755, 777), 'traceback.format_exc', 'traceback.format_exc', ([], {}), '()\n', (775, 777), False, 'import traceback\n'), ((1583, 1645), 'ray.worker.global_worker.put_object', 'ray.worker.global_worker.put_object', (['inp.result_object_id', 'res'], {}), '(inp.result_object_id, res)\n', (1618, 1645), False, 'import ray\...
import argparse import math import os from datetime import datetime import h5py import numpy as np import plyfile from matplotlib import cm import rospy import rospkg import ros_numpy import math import sys import cv2 from sensor_msgs.msg import PointCloud from geometry_msgs.msg import Point32 import sensor_msgs.poin...
[ "numpy.load", "argparse.ArgumentParser", "rospy.Time.now", "std_msgs.msg.Header", "os.path.isdir", "numpy.zeros", "rospy.Publisher", "rospy.Rate", "sensor_msgs.point_cloud2.create_cloud_xyz32", "numpy.array", "rospy.init_node", "os.path.join", "os.listdir" ]
[((465, 508), 'rospy.init_node', 'rospy.init_node', (['"""tutorial"""'], {'anonymous': '(True)'}), "('tutorial', anonymous=True)\n", (480, 508), False, 'import rospy\n'), ((530, 544), 'rospy.Rate', 'rospy.Rate', (['(10)'], {}), '(10)\n', (540, 544), False, 'import rospy\n'), ((564, 624), 'rospy.Publisher', 'rospy.Publi...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-27 09:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pet', '0006_auto_20171127_1157'), ] operations = [ migrations.AlterField( ...
[ "django.db.models.CharField" ]
[((395, 440), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'unique': '(True)'}), '(max_length=100, unique=True)\n', (411, 440), False, 'from django.db import migrations, models\n')]
import json from bson import json_util from flask import Blueprint, jsonify, request, session from src.database.mongo import Mongo from src.database.util import doc_to_dict from src.model.User import User from src.model.UserLeague import UserLeague from src.util.util import get_required_params, json_err api_module =...
[ "src.model.UserLeague.UserLeague.get_all", "flask.Blueprint", "src.util.util.json_err", "src.model.UserLeague.UserLeague", "src.database.mongo.Mongo", "src.util.util.get_required_params", "flask.jsonify", "src.model.User.User" ]
[((321, 366), 'flask.Blueprint', 'Blueprint', (['"""api"""', '__name__'], {'url_prefix': '"""/api"""'}), "('api', __name__, url_prefix='/api')\n", (330, 366), False, 'from flask import Blueprint, jsonify, request, session\n'), ((372, 379), 'src.database.mongo.Mongo', 'Mongo', ([], {}), '()\n', (377, 379), False, 'from ...
# Generated by Django 3.0.7 on 2020-09-27 21:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api_customer', '0001_initial'), ] operations = [ migrations.CreateModel( name='Assignments', fields=[ ...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.AutoField", "django.db.models.SmallIntegerField", "django.db.models.IntegerField", "django.db.models.DecimalField" ]
[((329, 422), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (345, 422), False, 'from django.db import migrations, models\...
from time import sleep print('************************** <NAME> **************************') print('NOTAS DÍSPONIVEIS [R$ 50], [R$ 20], [R$ 10], [R$ 01]') x = int(input('Digite o valor a ser sacado: ')) print('*******************************************************************') print('Contando notas...') sleep(2) nota...
[ "time.sleep" ]
[((307, 315), 'time.sleep', 'sleep', (['(2)'], {}), '(2)\n', (312, 315), False, 'from time import sleep\n')]
"""Gaussian process regression using JAX. """ import jax import jax.numpy as np import kernels #------------------------------------------------------------------------------- def mu_post(xs, xs_train, ys_train, kernel, hparams): """ Posterior mean conditioned on xs. Note: a numerical jitter term of 1e-...
[ "jax.numpy.array", "jax.numpy.linalg.inv", "matplotlib.pyplot.plot", "kernels.cov_map", "jax.numpy.linspace", "pdb.set_trace", "jax.numpy.diag", "jax.numpy.sin" ]
[((570, 616), 'kernels.cov_map', 'kernels.cov_map', (['kernel', 'hparams', 'xs', 'xs_train'], {}), '(kernel, hparams, xs, xs_train)\n', (585, 616), False, 'import kernels\n'), ((958, 998), 'kernels.cov_map', 'kernels.cov_map', (['kernel', 'hparams', 'xs', 'xs'], {}), '(kernel, hparams, xs, xs)\n', (973, 998), False, 'i...
import collections import json from typing import OrderedDict from unitmeasure.measurement import Measurement from unitmeasure.unit import Unit def from_json(payload, dimension=None): data = json.loads(payload) if dimension is None: return Measurement(data["value"], Unit(data["unit"]["symbol"])) ...
[ "json.loads", "unitmeasure.unit.Unit" ]
[((198, 217), 'json.loads', 'json.loads', (['payload'], {}), '(payload)\n', (208, 217), False, 'import json\n'), ((286, 314), 'unitmeasure.unit.Unit', 'Unit', (["data['unit']['symbol']"], {}), "(data['unit']['symbol'])\n", (290, 314), False, 'from unitmeasure.unit import Unit\n')]
import csv import codecs import os from libs.catch_execption import catch_exceptions_util from libs.db_context import DBContext from libs.web_logs import ins_log from models.gdpr_data import GdprData @catch_exceptions_util def gdpr_sync_cmdb(): """gdpr合规性检查数据入库""" name = list(os.walk("/var/www/cmdb-complianc...
[ "csv.reader", "codecs.open", "libs.db_context.DBContext", "os.walk", "models.gdpr_data.GdprData" ]
[((424, 482), 'codecs.open', 'codecs.open', ([], {'filename': 'filename', 'mode': '"""r"""', 'encoding': '"""utf-8"""'}), "(filename=filename, mode='r', encoding='utf-8')\n", (435, 482), False, 'import codecs\n'), ((506, 519), 'csv.reader', 'csv.reader', (['f'], {}), '(f)\n', (516, 519), False, 'import csv\n'), ((751, ...
#!/usr/bin/python # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "google.colab.html._provide.create", "uuid.uuid4", "google.colab.html._resources.get_data", "json.dumps", "string.Template", "google.colab.output.register_callback", "IPython.get_ipython" ]
[((3756, 4484), 'string.Template', 'string.Template', (['"""\n$deps\n<$tag id="$guid">\n $children\n</$tag>\n<script>\n (function() {\n async function init() {\n const name = \'_google_colab_output_html\';\n let script = document.getElementById(name);\n if (!script) {\n script = document.crea...
from django.db.models import Q import datetime import json from .utils import date_transfer from .abstract import AbstractApi from apps.dailytrans.models import DailyTran class Api(AbstractApi): # Settings API_NAME = 'feed' ZFILL = True ROC_FORMAT = False SEP = '/' # Filters DATE_FILTER ...
[ "django.db.models.Q", "json.loads" ]
[((2276, 2319), 'json.loads', 'json.loads', (['response'], {'object_hook': 'self.hook'}), '(response, object_hook=self.hook)\n', (2286, 2319), False, 'import json\n'), ((2575, 2598), 'django.db.models.Q', 'Q', ([], {'date__exact': 'obj.date'}), '(date__exact=obj.date)\n', (2576, 2598), False, 'from django.db.models imp...
# -*- coding: utf-8 -*- import os import numpy as np import pydicom.filereader import torch import torchvision.transforms as transforms class My_Compose(transforms.Compose): '''继承torchvision.transforms.Compose类''' def __init__(self, transforms): super().__init__(self) self.transforms = tran...
[ "torchvision.transforms.functional.normalize", "os.listdir" ]
[((1132, 1200), 'torchvision.transforms.functional.normalize', 'transforms.functional.normalize', (['image'], {'mean': 'self.mean', 'std': 'self.std'}), '(image, mean=self.mean, std=self.std)\n', (1163, 1200), True, 'import torchvision.transforms as transforms\n'), ((1734, 1755), 'os.listdir', 'os.listdir', (['LDCT_roo...
""" Pseudorandomly distributed subsets """ __version__ = "$Revision: 1.3 $" import Split import sys, os sys.path.append("..") try: import xml.etree.cElementTree as ET except ImportError: import cElementTree as ET import Utils.ElementTreeUtils as ETUtils import Utils.InteractionXML.CorpusElements as CorpusEleme...
[ "sys.path.append", "optparse.OptionParser", "os.path.basename", "cElementTree.Element", "Utils.InteractionXML.CorpusElements.loadCorpus", "Utils.ElementTreeUtils.write" ]
[((105, 126), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (120, 126), False, 'import sys, os\n'), ((404, 443), 'optparse.OptionParser', 'OptionParser', ([], {'usage': '"""%prog [options]\n"""'}), "(usage='%prog [options]\\n')\n", (416, 443), False, 'from optparse import OptionParser\n'), ((883...
"""Evaluate model by NAS-Bench-201""" from xnas.core.config import cfg import xnas.logger.logging as logging logger = logging.get_logger(__name__) try: from nas_201_api import NASBench201API as API api = API(cfg.BENCHMARK.NB201PATH) except ImportError: print('Could not import NASBench201.') exit(1) ...
[ "xnas.logger.logging.get_logger", "nas_201_api.NASBench201API" ]
[((120, 148), 'xnas.logger.logging.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (138, 148), True, 'import xnas.logger.logging as logging\n'), ((216, 244), 'nas_201_api.NASBench201API', 'API', (['cfg.BENCHMARK.NB201PATH'], {}), '(cfg.BENCHMARK.NB201PATH)\n', (219, 244), True, 'from nas_201_api ...
# users/forms.py from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django.forms import ModelForm from .models import Profile from captcha.fields import ReCaptchaField from captcha.widgets import ReCaptchaV2Checkbox class CustomUserCreationForm(UserCreationForm): ...
[ "django.contrib.auth.models.User.objects.filter", "captcha.fields.ReCaptchaField" ]
[((333, 375), 'captcha.fields.ReCaptchaField', 'ReCaptchaField', ([], {'widget': 'ReCaptchaV2Checkbox'}), '(widget=ReCaptchaV2Checkbox)\n', (347, 375), False, 'from captcha.fields import ReCaptchaField\n'), ((561, 596), 'django.contrib.auth.models.User.objects.filter', 'User.objects.filter', ([], {'email': 'username'})...
import numpy as np import pandas as pd def mrd(a, b, M): ''' Calculate the Multiresolution Decomposition for a given timeseries of two variables Howell and Mahrt, 1997; Vickers and Mahrt, 2003; Vickers and Mahrt 2006 Args: a (array) : Array for timeseries "a" b (array) : Array for tim...
[ "numpy.sum", "numpy.flip", "numpy.zeros", "numpy.split", "numpy.arange", "numpy.array" ]
[((542, 553), 'numpy.zeros', 'np.zeros', (['M'], {}), '(M)\n', (550, 553), True, 'import numpy as np\n'), ((562, 573), 'numpy.zeros', 'np.zeros', (['M'], {}), '(M)\n', (570, 573), True, 'import numpy as np\n'), ((639, 655), 'numpy.arange', 'np.arange', (['(M + 1)'], {}), '(M + 1)\n', (648, 655), True, 'import numpy as ...
from django_filters.rest_framework import DjangoFilterBackend from rest_framework import filters from rest_fuzzysearch.search import RankedFuzzySearchFilter from boundlexx.api.common.filters import ( DedupedFilter, LocalizationFilterSet, SkillFilterSet, ) from boundlexx.api.common.viewsets import Boundlexx...
[ "boundlexx.api.utils.get_base_url", "boundlexx.api.schemas.DescriptiveAutoSchema", "boundlexx.boundless.models.Skill.objects.all", "boundlexx.boundless.models.SkillGroup.objects.all", "boundlexx.api.utils.get_list_example" ]
[((2192, 2230), 'boundlexx.api.schemas.DescriptiveAutoSchema', 'DescriptiveAutoSchema', ([], {'tags': "['skills']"}), "(tags=['skills'])\n", (2213, 2230), False, 'from boundlexx.api.schemas import DescriptiveAutoSchema\n'), ((630, 644), 'boundlexx.api.utils.get_base_url', 'get_base_url', ([], {}), '()\n', (642, 644), F...
""" python3 py/compare_pdfs.py -f data/test_pdfs/00026_04_fda-K071597_test_data.pdf data/test_pdfs/small_test/copied_data.pdf """ import os import re import sys import json import math import pickle import hashlib import time import unicodedata import datetime import itertools import subprocess from path...
[ "numpy.maximum", "argparse.ArgumentParser", "json.dumps", "numpy.argsort", "pathlib.Path", "pickle.load", "os.path.exists", "datetime.datetime.now", "json.dump", "numpy.minimum", "os.path.realpath", "fitz.open", "pydivsufsort.kasai", "json.load", "warnings.filterwarnings", "time.time",...
[((566, 604), 'fitz.TOOLS.mupdf_display_errors', 'fitz.TOOLS.mupdf_display_errors', (['(False)'], {}), '(False)\n', (597, 604), False, 'import fitz\n'), ((623, 656), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (646, 656), False, 'import warnings\n'), ((2506, 2531), 'pyd...
# encoding: utf-8 import numpy as np from scipy.special import expit from keras.datasets import mnist from keras.utils import to_categorical np.random.seed(7) inputs_units = 784 hidden_units = 256 output_units = 10 class MlpNumpy(object): def __init__(self): self.__hidden_weight = np.random.randn(hidden...
[ "numpy.random.seed", "numpy.random.randn", "keras.datasets.mnist.load_data", "numpy.square", "scipy.special.expit", "numpy.dot", "keras.utils.to_categorical" ]
[((142, 159), 'numpy.random.seed', 'np.random.seed', (['(7)'], {}), '(7)\n', (156, 159), True, 'import numpy as np\n'), ((298, 341), 'numpy.random.randn', 'np.random.randn', (['hidden_units', 'inputs_units'], {}), '(hidden_units, inputs_units)\n', (313, 341), True, 'import numpy as np\n'), ((373, 416), 'numpy.random.ra...
import streamlit as st from bokeh.models.widgets import Button from bokeh.models import CustomJS from streamlit_bokeh_events import streamlit_bokeh_events stt_button = Button(label="Speak", width=100) stt_button.js_on_event("button_click", CustomJS(code=""" var recognition = new webkitSpeechRecognition(); rec...
[ "streamlit_bokeh_events.streamlit_bokeh_events", "bokeh.models.widgets.Button", "bokeh.models.CustomJS" ]
[((169, 201), 'bokeh.models.widgets.Button', 'Button', ([], {'label': '"""Speak"""', 'width': '(100)'}), "(label='Speak', width=100)\n", (175, 201), False, 'from bokeh.models.widgets import Button\n'), ((808, 941), 'streamlit_bokeh_events.streamlit_bokeh_events', 'streamlit_bokeh_events', (['stt_button'], {'events': '"...
"""The Business Model.""" from __future__ import annotations from typing import Optional from enum import Enum, EnumMeta, auto from .db import db class BaseMeta(EnumMeta): """Meta class for the enum.""" def __contains__(self, other): # pylint: disable=C0203 """Return True if 'in' the Enum.""" ...
[ "enum.auto" ]
[((1161, 1167), 'enum.auto', 'auto', ([], {}), '()\n', (1165, 1167), False, 'from enum import Enum, EnumMeta, auto\n'), ((1185, 1191), 'enum.auto', 'auto', ([], {}), '()\n', (1189, 1191), False, 'from enum import Enum, EnumMeta, auto\n')]
from __future__ import unicode_literals, print_function __metaclass__ = type if bytes is not str: unicode = str import argparse from collections import OrderedDict try: from pathlib import Path except ImportError: from pathlib2 import Path try: from urllib.parse import urlparse, urljoin, quote from...
[ "rdflib.Graph", "json.load", "csv.DictReader", "rdflib_jsonld.parser.to_rdf", "urllib2.quote", "json.dumps", "urlparse.urljoin", "rdflib_jsonld.serializer.from_rdf", "urlparse.urlparse", "collections.OrderedDict", "pathlib2.Path", "time.strptime", "urllib2.urlopen", "rdflib.ConjunctiveGrap...
[((8600, 8618), 'rdflib.ConjunctiveGraph', 'ConjunctiveGraph', ([], {}), '()\n', (8616, 8618), False, 'from rdflib import ConjunctiveGraph, Graph, RDF, URIRef\n'), ((9560, 9567), 'rdflib.Graph', 'Graph', ([], {}), '()\n', (9565, 9567), False, 'from rdflib import ConjunctiveGraph, Graph, RDF, URIRef\n'), ((9685, 9726), ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "argparse.ArgumentParser", "logging.basicConfig", "importlib.import_module", "common.fit.fit", "common.fit.add_fit_args", "mxnet.io.NDArrayIter", "mxnet.gluon.data.vision.CIFAR10", "os.path.join" ]
[((916, 956), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (935, 956), False, 'import logging\n'), ((3012, 3111), 'mxnet.gluon.data.vision.CIFAR10', 'mx.gluon.data.vision.CIFAR10', ([], {'root': '"""~/.mxnet/datasets/cifar10"""', 'train': '(True)', 'transfor...
""" Serializer for user API """ from rest_framework import serializers from rest_framework.reverse import reverse from common.djangoapps.student.models import CourseEnrollment, User from common.djangoapps.util.course import get_encoded_course_sharing_utm_params, get_link_for_about_page from lms.djangoapps.certificat...
[ "rest_framework.serializers.SerializerMethodField", "common.djangoapps.util.course.get_link_for_about_page", "rest_framework.serializers.ReadOnlyField", "rest_framework.reverse.reverse", "openedx.features.course_duration_limits.access.get_user_course_expiration_date", "common.djangoapps.util.course.get_en...
[((3600, 3635), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', ([], {}), '()\n', (3633, 3635), False, 'from rest_framework import serializers\n'), ((3663, 3698), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', ([], {}), '()\n', (3696, 36...
import binascii from xpxchain.util.hashlib.keccak import crypto from xpxchain.util.hashlib.keccak import fallback from tests import harness from .helper import * def generate_testcase(bits, full_hexdigest): name = "keccak_{}".format(bits) digest_size = bits // 8 crypto_func = getattr(crypto, name) fa...
[ "binascii.unhexlify" ]
[((1083, 1117), 'binascii.unhexlify', 'binascii.unhexlify', (['full_hexdigest'], {}), '(full_hexdigest)\n', (1101, 1117), False, 'import binascii\n')]
import discord from discord import guild import wavelink from discord.ext import commands class Player(wavelink.Player): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) class Music(commands.Cog, wavelink.WavelinkMixin): def __init__(self, bot): self.bot = bot se...
[ "wavelink.WavelinkMixin.listener", "wavelink.Client", "discord.ext.commands.Cog.listener" ]
[((493, 516), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (514, 516), False, 'from discord.ext import commands\n'), ((775, 808), 'wavelink.WavelinkMixin.listener', 'wavelink.WavelinkMixin.listener', ([], {}), '()\n', (806, 808), False, 'import wavelink\n'), ((334, 358), 'wavelink.Cli...
import logging log = logging.getLogger('onegov.onboarding') # noqa log.addHandler(logging.NullHandler()) # noqa from translationstring import TranslationStringFactory _ = TranslationStringFactory('onegov.onboarding') # noqa from onegov.onboarding.app import OnboardingApp __all__ = ['_', 'log', 'OnboardingApp']
[ "translationstring.TranslationStringFactory", "logging.getLogger", "logging.NullHandler" ]
[((21, 59), 'logging.getLogger', 'logging.getLogger', (['"""onegov.onboarding"""'], {}), "('onegov.onboarding')\n", (38, 59), False, 'import logging\n'), ((174, 219), 'translationstring.TranslationStringFactory', 'TranslationStringFactory', (['"""onegov.onboarding"""'], {}), "('onegov.onboarding')\n", (198, 219), False...
# Copyright 2020 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ "column.Column", "mariadb.connect", "sys.exit" ]
[((860, 975), 'mariadb.connect', 'mariadb.connect', ([], {'host': 'self.host', 'user': 'self.user', 'password': 'self.password', 'database': 'self.database', 'port': 'self.port'}), '(host=self.host, user=self.user, password=self.password,\n database=self.database, port=self.port)\n', (875, 975), False, 'import maria...
from showcase import showcase def setup(): return showcase.setup()
[ "showcase.showcase.setup" ]
[((56, 72), 'showcase.showcase.setup', 'showcase.setup', ([], {}), '()\n', (70, 72), False, 'from showcase import showcase\n')]
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ "enum.IntEnum" ]
[((1617, 1649), 'enum.IntEnum', 'IntEnum', (['"""FontFamilyEnum"""', '_dict'], {}), "('FontFamilyEnum', _dict)\n", (1624, 1649), False, 'from enum import IntEnum\n')]
import numpy as np from stocklab.node import * from stocklab.crawler import CrawlerTrigger from stocklab.core.runtime import TWSECrawler from stocklab_twse.error import InvalidDateRequested from stocklab_twse.utils.datetime import Date, date_to_timestamp class DateTrades(DataNode): TWSE_FIRST_DAY = Date('2010010...
[ "stocklab_twse.utils.datetime.Date", "stocklab.crawler.CrawlerTrigger", "stocklab_twse.error.InvalidDateRequested", "stocklab_twse.utils.datetime.Date.today" ]
[((307, 323), 'stocklab_twse.utils.datetime.Date', 'Date', (['"""20100104"""'], {}), "('20100104')\n", (311, 323), False, 'from stocklab_twse.utils.datetime import Date, date_to_timestamp\n'), ((729, 822), 'stocklab_twse.error.InvalidDateRequested', 'InvalidDateRequested', (["('Date requested eariler than' + 'the earli...
import whitebox import ast import json import os import sys wbt = whitebox.WhiteboxTools() # wbt.set_verbose_mode(True) # print(wbt.version()) # print(wbt.help()) # tools = wbt.list_tools(['dem']) # for index, tool in enumerate(tools): # print("{}. {}: {}".format(index, tool, tools[tool])) # def get_tool_para...
[ "whitebox.WhiteboxTools" ]
[((67, 91), 'whitebox.WhiteboxTools', 'whitebox.WhiteboxTools', ([], {}), '()\n', (89, 91), False, 'import whitebox\n')]
from discord.ext import commands INVITE = "https://discordapp.com/oauth2/authorize?client_id={0}&scope=bot&permissions=104066247" class Base(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() @commands.is_owner() async def stop(self, ctx): """Stops the Bot saf...
[ "discord.ext.commands.command", "discord.ext.commands.is_owner" ]
[((217, 235), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (233, 235), False, 'from discord.ext import commands\n'), ((241, 260), 'discord.ext.commands.is_owner', 'commands.is_owner', ([], {}), '()\n', (258, 260), False, 'from discord.ext import commands\n'), ((393, 411), 'discord.ext.commands....
import numpy as np from flow.core import rewards from flow.core.util import calculate_human_rl_timesteps_spent_in_simulation from flow.envs import BottleneckEnv from flow.envs.multiagent import MultiEnv from gym.spaces import Box MAX_LANES = 4 # base number of largest number of lanes in the network EDGE_LIST = ["1", ...
[ "flow.core.rewards.desired_velocity", "numpy.asarray", "flow.core.util.calculate_human_rl_timesteps_spent_in_simulation", "numpy.mean", "numpy.array", "gym.spaces.Box", "numpy.concatenate" ]
[((2644, 2698), 'gym.spaces.Box', 'Box', ([], {'low': '(0)', 'high': '(1)', 'shape': '(num_obs,)', 'dtype': 'np.float32'}), '(low=0, high=1, shape=(num_obs,), dtype=np.float32)\n', (2647, 2698), False, 'from gym.spaces import Box\n'), ((15147, 15215), 'gym.spaces.Box', 'Box', ([], {'low': '(-2000)', 'high': '(2000)', '...
import yaml import numpy as np def load(path): with open('config/default_values.yaml', 'r') as f: default_cfg = yaml.load(f, yaml.FullLoader) with open(path, 'r') as f: cfg = yaml.load(f, yaml.FullLoader) default_cfg.update(cfg) cfg = default_cfg cfg['data_bounding_box'] = np.arr...
[ "yaml.load", "numpy.array" ]
[((314, 348), 'numpy.array', 'np.array', (["cfg['data_bounding_box']"], {}), "(cfg['data_bounding_box'])\n", (322, 348), True, 'import numpy as np\n'), ((125, 154), 'yaml.load', 'yaml.load', (['f', 'yaml.FullLoader'], {}), '(f, yaml.FullLoader)\n', (134, 154), False, 'import yaml\n'), ((201, 230), 'yaml.load', 'yaml.lo...
# Created July 2015 # TEASER Development Team """TeaserXML_input This module contains function to load Projects in the proprietary TEASER file format .tXML """ import xml.etree.ElementTree as element_tree import warnings from teaser.logic.buildingobjects.building import Building from teaser.logic.archetypebuildings....
[ "teaser.logic.buildingobjects.buildingphysics.innerwall.InnerWall", "teaser.logic.archetypebuildings.bmvbs.singlefamilydwelling.SingleFamilyDwelling", "teaser.logic.buildingobjects.buildingsystems.buildingahu.BuildingAHU", "teaser.logic.buildingobjects.buildingphysics.ceiling.Ceiling", "teaser.logic.buildin...
[((1981, 2005), 'xml.etree.ElementTree.parse', 'element_tree.parse', (['path'], {}), '(path)\n', (1999, 2005), True, 'import xml.etree.ElementTree as element_tree\n'), ((2099, 2164), 'warnings.warn', 'warnings.warn', (['"""You are using an old version of project XML file"""'], {}), "('You are using an old version of pr...
from rest_framework.views import exception_handler from rest_framework.exceptions import APIException from rest_framework import status """ from django_restframework.exceptions import exception raise exception.myException400({ "success": False, "msg": "邮箱验证码不能为空" }) """ def...
[ "rest_framework.views.exception_handler" ]
[((375, 406), 'rest_framework.views.exception_handler', 'exception_handler', (['exc', 'context'], {}), '(exc, context)\n', (392, 406), False, 'from rest_framework.views import exception_handler\n')]
import pickle import numpy as np import pandas as pd from collections import Counter def get_xy(dist, normed=False): counter = Counter(dist) x=[];y=[] for xval in sorted(counter.keys()): x.append(xval) y.append(counter[xval]) y = np.array(y) if normed: y = y/y.sum() ret...
[ "pickle.dump", "pandas.read_csv", "pickle.load", "numpy.array", "collections.Counter" ]
[((3245, 3339), 'pandas.read_csv', 'pd.read_csv', (['"""../data/original/Nodes_2015_country_degree_bc_B_Z_P.csv"""'], {'encoding': '"""latin-1"""'}), "('../data/original/Nodes_2015_country_degree_bc_B_Z_P.csv',\n encoding='latin-1')\n", (3256, 3339), True, 'import pandas as pd\n'), ((133, 146), 'collections.Counter'...
#!/usr/bin/python2.4 # # Copyright 2009 Google 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...
[ "google.appengine.api.apiproxy_stub_map.APIProxyStubMap" ]
[((1443, 1478), 'google.appengine.api.apiproxy_stub_map.APIProxyStubMap', 'apiproxy_stub_map.APIProxyStubMap', ([], {}), '()\n', (1476, 1478), False, 'from google.appengine.api import apiproxy_stub_map\n')]
#!/usr/bin/env python3 import os import re import socket from struct import pack, unpack from ctypes import * from enum import Enum, auto, unique from . import DebugAdapter class DEBUG_STATUS(Enum): NO_CHANGE = 0 GO = 1 GO_HANDLED = 2 GO_NOT_HANDLED = 3 STEP_OVER = 4 STEP_INTO = 5 BREAK = 6 NO_DEBUGGEE = 7 S...
[ "os.path.abspath", "os.path.dirname", "os.path.join" ]
[((767, 792), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (782, 792), False, 'import os\n'), ((803, 825), 'os.path.dirname', 'os.path.dirname', (['fpath'], {}), '(fpath)\n', (818, 825), False, 'import os\n'), ((836, 887), 'os.path.join', 'os.path.join', (['fpath', '"""dbgengadapt\\\\dbgeng...
''' .. module:: skrf.plotting ======================================== plotting (:mod:`skrf.plotting`) ======================================== This module provides general plotting functions. Plots and Charts ------------------ .. autosummary:: :toctree: generated/ smith plot_smith plot_rectangu...
[ "pylab.isinteractive", "numpy.abs", "numpy.angle", "matplotlib.pyplot.quiver", "numpy.imag", "pylab.subplots", "pylab.tight_layout", "pylab.figure", "pylab.linspace", "pylab.gcf", "pylab.cm.get_cmap", "pylab.get_fignums", "pylab.draw", "numpy.real", "pylab.array", "matplotlib.patches.C...
[((4918, 4973), 'matplotlib.patches.Circle', 'Circle', (['[0, 0]', 'smithR'], {'ec': '"""k"""', 'fc': '"""None"""', 'visible': '(True)'}), "([0, 0], smithR, ec='k', fc='None', visible=True)\n", (4924, 4973), False, 'from matplotlib.patches import Circle\n'), ((9732, 9751), 'pylab.isinteractive', 'plb.isinteractive', ([...
import argparse from typing import Optional from stopots_bot.dictionary import dictionary_menu from stopots_bot.utils import is_a_valid_username, is_a_valid_id def command_line() -> Optional[argparse.Namespace]: """ Define a interface da linha de comando. :return: argumentos enviados """ parser = argparse....
[ "stopots_bot.utils.is_a_valid_username", "stopots_bot.utils.is_a_valid_id", "stopots_bot.dictionary.dictionary_menu", "argparse.ArgumentParser" ]
[((311, 387), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""Stopots Bot"""', 'description': '"""auto play stopots"""'}), "(prog='Stopots Bot', description='auto play stopots')\n", (334, 387), False, 'import argparse\n'), ((1784, 1801), 'stopots_bot.dictionary.dictionary_menu', 'dictionary_menu...
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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....
[ "os.unlink", "json.loads", "tempfile.mkstemp", "context.app.APP.test_client", "os.close" ]
[((938, 956), 'tempfile.mkstemp', 'tempfile.mkstemp', ([], {}), '()\n', (954, 956), False, 'import tempfile\n'), ((1007, 1028), 'context.app.APP.test_client', 'app.APP.test_client', ([], {}), '()\n', (1026, 1028), False, 'from context import app\n'), ((1420, 1447), 'json.loads', 'json.loads', (['rest_value.data'], {}),...
import os import torch from itertools import combinations import six import collections from tqdm import tqdm, trange import numpy as np np.set_printoptions(threshold=10010) def check_uniqueness(iterable_list): flag = 0 for array1, array2 in combinations(iterable_list, 2): for i in range(len(array1)):...
[ "numpy.set_printoptions", "tqdm.trange", "numpy.asarray", "torch.cat", "numpy.linalg.eigvalsh", "itertools.combinations", "torch.zeros" ]
[((138, 174), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'threshold': '(10010)'}), '(threshold=10010)\n', (157, 174), True, 'import numpy as np\n'), ((252, 282), 'itertools.combinations', 'combinations', (['iterable_list', '(2)'], {}), '(iterable_list, 2)\n', (264, 282), False, 'from itertools import combin...
"""3D Bar plot of a TOF camera with hexagonal pixels""" from vedo import * import numpy as np settings.defaultFont = "Glasgo" settings.useParallelProjection = True vals = np.abs(np.random.randn(4*6)) # pixel heights cols = colorMap(vals, "summer") k = 0 items = [__doc__] for i in range(4): for j in range(6): ...
[ "numpy.random.randn" ]
[((180, 202), 'numpy.random.randn', 'np.random.randn', (['(4 * 6)'], {}), '(4 * 6)\n', (195, 202), True, 'import numpy as np\n')]
""" Implements ZOO (Zero-Order Optimization) Attack. This code is based on the L2-attack from the original implementation of the attack: https://github.com/huanzhang12/ZOO-Attack/blob/master/l2_attack_black.py Usage: >>> import json >>> from code_soup.ch5.models.zoo_attack import ZOOAttack >>> config = js...
[ "numpy.abs", "numpy.sum", "numpy.argmax", "numpy.empty", "numpy.ones", "numpy.prod", "torch.square", "numpy.arctanh", "numpy.copy", "numpy.power", "numpy.max", "numpy.random.choice", "torch.log", "cv2.resize", "numpy.repeat", "numpy.minimum", "torch.zeros_like", "torch.max", "num...
[((2303, 2329), 'numpy.prod', 'np.prod', (['input_image_shape'], {}), '(input_image_shape)\n', (2310, 2329), True, 'import numpy as np\n'), ((2498, 2534), 'numpy.zeros', 'np.zeros', (['var_size'], {'dtype': 'np.float32'}), '(var_size, dtype=np.float32)\n', (2506, 2534), True, 'import numpy as np\n'), ((2557, 2593), 'nu...
import io import patsy.database from patsy.model import Base, Transfer from patsy.batch_stats import get_stats_for_batch, output_batch_stats_entries, batch_stats import unittest from .utils import AccessionBuilder, TransferBuilder, create_perfect_match, create_test_engine from patsy.perfect_matches import find_perfect_...
[ "patsy.utils.get_batch_names", "io.StringIO", "patsy.batch_stats.get_stats_for_batch", "patsy.batch_stats.output_batch_stats_entries", "patsy.model.Base.metadata.create_all", "patsy.utils.get_accessions", "patsy.transfer_matches.find_transfer_matches" ]
[((614, 646), 'patsy.model.Base.metadata.create_all', 'Base.metadata.create_all', (['engine'], {}), '(engine)\n', (638, 646), False, 'from patsy.model import Base, Transfer\n'), ((742, 781), 'patsy.batch_stats.get_stats_for_batch', 'get_stats_for_batch', (['session', '"""no_data"""'], {}), "(session, 'no_data')\n", (76...
from flask import Blueprint home = Blueprint('home', __name__) manage = Blueprint('manage', __name__)
[ "flask.Blueprint" ]
[((37, 64), 'flask.Blueprint', 'Blueprint', (['"""home"""', '__name__'], {}), "('home', __name__)\n", (46, 64), False, 'from flask import Blueprint\n'), ((74, 103), 'flask.Blueprint', 'Blueprint', (['"""manage"""', '__name__'], {}), "('manage', __name__)\n", (83, 103), False, 'from flask import Blueprint\n')]
# ------------------------------------------------------------------------- # App modules # ------------------------------------------------------------------------- from src.lib.windowaction import moveResizeWindow from src.lib.positioncalclator import PositionCalclator # ---------------------------------------------...
[ "src.lib.windowaction.moveResizeWindow", "src.lib.positioncalclator.PositionCalclator" ]
[((656, 675), 'src.lib.positioncalclator.PositionCalclator', 'PositionCalclator', ([], {}), '()\n', (673, 675), False, 'from src.lib.positioncalclator import PositionCalclator\n'), ((1079, 1122), 'src.lib.windowaction.moveResizeWindow', 'moveResizeWindow', (['hwnd', 'x', 'y', 'width', 'height'], {}), '(hwnd, x, y, widt...
# =============================================================================== # Copyright 2018 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
[ "subprocess.call" ]
[((1382, 1397), 'subprocess.call', 'call', (['rasterize'], {}), '(rasterize)\n', (1386, 1397), False, 'from subprocess import call\n')]
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2018, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
[ "unittest.main", "os.path.abspath", "warnings.simplefilter", "biom.table.Table", "q2_chemistree.match_table", "q2_chemistree.collate_fingerprint", "q2_chemistree.make_hierarchy", "warnings.catch_warnings", "biom.load_table", "os.path.join" ]
[((1874, 1880), 'unittest.main', 'main', ([], {}), '()\n', (1878, 1880), False, 'from unittest import TestCase, main\n'), ((673, 690), 'biom.table.Table', 'Table', (['{}', '[]', '[]'], {}), '({}, [], [])\n', (678, 690), False, 'from biom.table import Table\n'), ((742, 772), 'biom.table.Table', 'Table', (['{}', "['a', '...
# Copyright 2021 AIPlan4EU project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ "unified_planning.walkers.handles", "unified_planning.walkers.DagWalker.__init__" ]
[((1066, 1095), 'unified_planning.walkers.handles', 'walkers.handles', (['OperatorKind'], {}), '(OperatorKind)\n', (1081, 1095), True, 'import unified_planning.walkers as walkers\n'), ((872, 904), 'unified_planning.walkers.DagWalker.__init__', 'walkers.DagWalker.__init__', (['self'], {}), '(self)\n', (898, 904), True, ...
#!/usr/bin/env python # encoding: utf-8 import os import tempfile # 配置java环境变量,这个是本机的jarsigner文件位置 java_home_sign = '/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin/jarsigner' # 重新打包的apk输出路径 outputdir = "/Users/nick/Desktop/H5output" outputapk = "/Users/nick/Desktop/H5output/new.apk" new_icon_na...
[ "tempfile.gettempdir" ]
[((427, 448), 'tempfile.gettempdir', 'tempfile.gettempdir', ([], {}), '()\n', (446, 448), False, 'import tempfile\n')]
import sys import signal from lead.helpers.logging import log_error from lead.helpers.DockerHelper import DockerHelper dockerHelper = DockerHelper() def clean_arguments(cli_input): args = list() opts = dict() vals = dict() # print("##### ARGS") for index, k in enumerate(cli_input): # prin...
[ "lead.helpers.DockerHelper.DockerHelper", "signal.signal", "lead.helpers.logging.log_error", "sys.exit" ]
[((135, 149), 'lead.helpers.DockerHelper.DockerHelper', 'DockerHelper', ([], {}), '()\n', (147, 149), False, 'from lead.helpers.DockerHelper import DockerHelper\n'), ((1278, 1289), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1286, 1289), False, 'import sys\n'), ((1326, 1370), 'signal.signal', 'signal.signal', (['s...
#!/usr/bin/env python import io from setuptools import setup, find_packages exec(open("trio_mysql/_version.py", encoding="utf-8").read()) version = '.'.join(str(x) for x in VERSION[:-1]) if VERSION[-1] is not None: version += "_" + VERSION[-1] with io.open('./README.rst', encoding='utf-8') as f: readme = f.r...
[ "setuptools.find_packages", "io.open" ]
[((256, 297), 'io.open', 'io.open', (['"""./README.rst"""'], {'encoding': '"""utf-8"""'}), "('./README.rst', encoding='utf-8')\n", (263, 297), False, 'import io\n'), ((812, 866), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['tests*', 'trio_mysql.tests*']"}), "(exclude=['tests*', 'trio_mysql.tests*'])...
from orchestrators import Orchestrator from printers import Printer from jobs import Job import threading import time class TestUser(): def __init__(self): self.username = 'tom' p = Printer('Duplicator i3', '192.168.0.201', 'B5A36115A3DC49148EFC52012E7EBCD9', 'Hackspace', 'duplicat...
[ "printers.Printer" ]
[((212, 340), 'printers.Printer', 'Printer', (['"""Duplicator i3"""', '"""192.168.0.201"""', '"""B5A36115A3DC49148EFC52012E7EBCD9"""', '"""Hackspace"""', '"""duplicator"""', '"""PLA"""', '"""black"""'], {}), "('Duplicator i3', '192.168.0.201',\n 'B5A36115A3DC49148EFC52012E7EBCD9', 'Hackspace', 'duplicator', 'PLA',\n...
import tensorflow as tf from tf_siren import siren class SIRENModel(tf.keras.Model): def __init__(self, units: int, final_units: int, final_activation: str = "linear", num_layers: int = 1, w0: float = 30.0, w0_initial: float = 30.0, ...
[ "tf_siren.siren.ScaledSinusodialRepresentationDense", "tf_siren.siren.SinusodialRepresentationDense", "tensorflow.keras.Sequential" ]
[((2122, 2155), 'tensorflow.keras.Sequential', 'tf.keras.Sequential', (['siren_layers'], {}), '(siren_layers)\n', (2141, 2155), True, 'import tensorflow as tf\n'), ((2183, 2294), 'tf_siren.siren.SinusodialRepresentationDense', 'siren.SinusodialRepresentationDense', (['final_units'], {'activation': 'final_activation', '...
from typing import Set, Optional, List, Dict import jwt from django.utils.translation import ugettext as _ from rest_framework import exceptions from .auth_means import BaseAuthMean from .jwt_decode import jwt_multi_decode from mds.authent.public_api import get_revocation_list class RemoteUser: """ Inspire...
[ "django.utils.translation.ugettext", "rest_framework.exceptions.AuthenticationFailed", "mds.authent.public_api.get_revocation_list" ]
[((1870, 1891), 'mds.authent.public_api.get_revocation_list', 'get_revocation_list', ([], {}), '()\n', (1889, 1891), False, 'from mds.authent.public_api import get_revocation_list\n'), ((2776, 2824), 'django.utils.translation.ugettext', '_', (['"""Invalid payload, missing fields: %(fields)s"""'], {}), "('Invalid payloa...
""" Models for managing file uploads. """ import os from django.conf import settings from django.db import models class File(models.Model): """ Model for files uploaded to TinyDevCRM. """ file_id = models.AutoField(primary_key=True) file = models.FileField( upload_to='concrete-data', ...
[ "django.db.models.FileField", "django.db.models.AutoField" ]
[((218, 252), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (234, 252), False, 'from django.db import models\n'), ((264, 332), 'django.db.models.FileField', 'models.FileField', ([], {'upload_to': '"""concrete-data"""', 'blank': '(False)', 'null': '(False)'}),...