code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
import numpy as np from matplotlib import pyplot as pl from matplotlib import animation from scipy.fftpack import fft,ifft from Tkinter import * class Schrodinger(object): """ Class which implements a numerical solution of the time-dependent Schrodinger equation for an arbitrary potential """...
[ "scipy.fftpack.fft", "scipy.fftpack.ifft", "numpy.arange", "numpy.exp", "numpy.sqrt" ]
[((3784, 3803), 'scipy.fftpack.fft', 'fft', (['self.psi_mod_x'], {}), '(self.psi_mod_x)\n', (3787, 3803), False, 'from scipy.fftpack import fft, ifft\n'), ((3865, 3885), 'scipy.fftpack.ifft', 'ifft', (['self.psi_mod_k'], {}), '(self.psi_mod_k)\n', (3869, 3885), False, 'from scipy.fftpack import fft, ifft\n'), ((2640, 2...
from recsys.data import load_ecomm, train_test_split from recsys.models import association_rules_baseline from recsys.metrics import recall_at_k_baseline, mrr_at_k_baseline # load data sessions = load_ecomm() train, test, valid = train_test_split(sessions, test_size=1000) # Construct a co-occurrence matrix containing...
[ "recsys.data.train_test_split", "recsys.models.association_rules_baseline", "recsys.metrics.mrr_at_k_baseline", "recsys.metrics.recall_at_k_baseline", "recsys.data.load_ecomm" ]
[((197, 209), 'recsys.data.load_ecomm', 'load_ecomm', ([], {}), '()\n', (207, 209), False, 'from recsys.data import load_ecomm, train_test_split\n'), ((231, 273), 'recsys.data.train_test_split', 'train_test_split', (['sessions'], {'test_size': '(1000)'}), '(sessions, test_size=1000)\n', (247, 273), False, 'from recsys....
""" File contains tokenization classes - Vocab Class: for handling vocabulary and converting tokenized string to indices - Tokenizer Class: A simple unicode based tokenizer (Copyright 2018 The Google AI Language Team Authors from: https://github.com/google-research/bert/blob/master/tokenization.py). The tokeniz...
[ "unicodedata.normalize", "json.load", "re.split", "sentencepiece.SentencePieceProcessor", "sentencepiece.SentencePieceTrainer.train", "unicodedata.category", "re.match", "os.path.isfile", "re.search", "re.sub", "re.compile" ]
[((5011, 5051), 're.compile', 're.compile', (['"""#bos#|#eos#"""', 're.IGNORECASE'], {}), "('#bos#|#eos#', re.IGNORECASE)\n", (5021, 5051), False, 'import re\n'), ((8678, 8714), 're.search', 're.search', (['self.emoticon_regex', 'text'], {}), '(self.emoticon_regex, text)\n', (8687, 8714), False, 'import re\n'), ((9472,...
# MIT License # # Copyright (c) 2019 DARPA # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publis...
[ "geopandas.GeoDataFrame", "validation.score.out_of_voxel_error", "validation.score.in_voxel_error", "shapely.geometry.box" ]
[((1433, 1462), 'geopandas.GeoDataFrame', 'gpd.GeoDataFrame', ([], {'geometry': '[]'}), '(geometry=[])\n', (1449, 1462), True, 'import geopandas as gpd\n'), ((1487, 1516), 'geopandas.GeoDataFrame', 'gpd.GeoDataFrame', ([], {'geometry': '[]'}), '(geometry=[])\n', (1503, 1516), True, 'import geopandas as gpd\n'), ((1567,...
from typing import Any import toml from .base import File __all__ = ["TomlFile"] class TomlFile(File): def __init__(self, name: str, obj: Any): super().__init__(name) self.obj = obj def synth_content(self) -> str: return toml.dumps(self.obj)
[ "toml.dumps" ]
[((259, 279), 'toml.dumps', 'toml.dumps', (['self.obj'], {}), '(self.obj)\n', (269, 279), False, 'import toml\n')]
from collections import namedtuple from enum import Enum import traceback import logging from typing import List import attr from .. import repositories, entities, services logger = logging.getLogger(name=__name__) # TODO: Consider using DataPartition as a new name class SnapshotPartitionType(str, Enum): """Av...
[ "attr.ib", "attr.fields", "traceback.format_exc", "collections.namedtuple", "logging.getLogger" ]
[((185, 217), 'logging.getLogger', 'logging.getLogger', ([], {'name': '__name__'}), '(name=__name__)\n', (202, 217), False, 'import logging\n'), ((1060, 1069), 'attr.ib', 'attr.ib', ([], {}), '()\n', (1067, 1069), False, 'import attr\n'), ((1084, 1093), 'attr.ib', 'attr.ib', ([], {}), '()\n', (1091, 1093), False, 'impo...
#!/usr/bin/env python import display import time import time2colour from datetime import datetime def update_display(time): cols = time2colour.get_colours_for_time(time) display.set_hour_pixels(cols[0]) display.set_minute_pixels(cols[1]) display.set_second_pixels(cols[2]) while True: update_disp...
[ "display.set_hour_pixels", "time2colour.get_colours_for_time", "time.sleep", "display.set_minute_pixels", "datetime.datetime.now", "display.set_second_pixels" ]
[((137, 175), 'time2colour.get_colours_for_time', 'time2colour.get_colours_for_time', (['time'], {}), '(time)\n', (169, 175), False, 'import time2colour\n'), ((180, 212), 'display.set_hour_pixels', 'display.set_hour_pixels', (['cols[0]'], {}), '(cols[0])\n', (203, 212), False, 'import display\n'), ((217, 251), 'display...
import numpy as np from utils import read_graph class GreedyHeuristic: def __init__(self, graph, iterations_number=150, top_k=5): self.graph = graph self.strategies = [ self.largest_first, self.largest_first_randomized, self.smallest_degree_last_with_remove, ...
[ "utils.read_graph" ]
[((4404, 4451), 'utils.read_graph', 'read_graph', (['"""./DIMACS_all_ascii/c-fat200-1.clq"""'], {}), "('./DIMACS_all_ascii/c-fat200-1.clq')\n", (4414, 4451), False, 'from utils import read_graph\n')]
# Copyright 2014 NeuroData (http://neurodata.io) # Copyright 2016 The Johns Hopkins University Applied Physics Laboratory # # 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.ap...
[ "io.BytesIO", "ndingest.ndbucket.tilebucket.TileBucket.getBucketName", "ndingest.settings.settings.Settings.load", "ndingest.ndingestproj.ingestproj.IngestProj.load", "ndingest.ndbucket.tilebucket.TileBucket.buildArn" ]
[((806, 821), 'ndingest.settings.settings.Settings.load', 'Settings.load', ([], {}), '()\n', (819, 821), False, 'from ndingest.settings.settings import Settings\n'), ((914, 931), 'ndingest.ndingestproj.ingestproj.IngestProj.load', 'IngestProj.load', ([], {}), '()\n', (929, 931), False, 'from ndingest.ndingestproj.inges...
import base64 from guppyproxy.util import printable_data, qtprintable, textedit_highlight, DisableUpdates from guppyproxy.proxy import _parse_message, Headers from itertools import count from PyQt5.QtWidgets import QWidget, QTextEdit, QTableWidget, QVBoxLayout, QTableWidgetItem, QTabWidget, QStackedLayout, QLabel, QCom...
[ "PyQt5.QtWidgets.QTextEdit.focusOutEvent", "guppyproxy.util.textedit_highlight", "PyQt5.QtCore.QUrl", "base64.b64decode", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidgets.QTabWidget", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QWidget.__init__", "PyQt5.QtGui.QTextCursor", "pygments.lexers.TextLexer...
[((2670, 2680), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (2678, 2680), False, 'from PyQt5.QtCore import Qt, pyqtSlot, QUrl\n'), ((5782, 5790), 'PyQt5.QtGui.QImage', 'QImage', ([], {}), '()\n', (5788, 5790), False, 'from PyQt5.QtGui import QTextCursor, QTextCharFormat, QImage, QColor, QTextImageFormat, QTe...
import tempfile from typing import Any, Dict, Optional, Sequence from urllib.parse import urlencode import pytest import simplejson import yaml from determined.common import api from determined.common.api import authentication, certs from tests import config as conf from tests import experiment as exp @pytest.mark....
[ "tests.config.make_master_url", "tempfile.NamedTemporaryFile", "urllib.parse.urlencode", "tests.experiment.wait_for_experiment_state", "tests.config.tutorials_path", "yaml.dump", "pytest.fail", "simplejson.loads", "tests.config.load_config", "tests.config.set_profiling_enabled", "tests.experimen...
[((345, 369), 'pytest.mark.timeout', 'pytest.mark.timeout', (['(600)'], {}), '(600)\n', (364, 369), False, 'import pytest\n'), ((387, 599), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""framework_base_experiment,framework_timings_enabled"""', "[('tutorials/mnist_pytorch', True), ('tutorials/fashion_mnist_...
import os import sys import unittest sys.path.append(os.path.dirname(os.path.dirname(__file__))) class TestSkillEntry(unittest.TestCase): @classmethod def setUpClass(cls): if os.environ.get("GITHUB_TOKEN"): from ovos_skills_manager.session import set_github_token set_github_tok...
[ "unittest.main", "os.environ.get", "os.path.dirname", "ovos_skills_manager.utils.parse_python_dependencies" ]
[((1536, 1551), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1549, 1551), False, 'import unittest\n'), ((70, 95), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (85, 95), False, 'import os\n'), ((193, 223), 'os.environ.get', 'os.environ.get', (['"""GITHUB_TOKEN"""'], {}), "('GITHUB_TO...
import base64 import json import time from binascii import hexlify from os import urandom from typing import BinaryIO from uuid import UUID import aiohttp from . import Client from .utils import exceptions, objects class SubClient: def __init__(self, comId: str, client: Client): self.client = client ...
[ "os.urandom", "json.loads", "json.dumps", "time.time" ]
[((3414, 3430), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (3424, 3430), False, 'import json\n'), ((4407, 4539), 'json.dumps', 'json.dumps', (["{'userActiveTimeChunkList': [{'start': startTime, 'end': endTime}],\n 'optInAdsFlags': optInAdsFlags, 'timezone': tz}"], {}), "({'userActiveTimeChunkList': [{'s...
import numpy as np from medpy.filter.binary import largest_connected_component from skimage.exposure import rescale_intensity from skimage.transform import resize def dsc(y_pred, y_true, lcc=True): if lcc and np.any(y_pred): y_pred = np.round(y_pred).astype(int) y_true = np.round(y_true).astype(in...
[ "numpy.pad", "numpy.sum", "numpy.ceil", "numpy.std", "numpy.empty", "numpy.floor", "skimage.exposure.rescale_intensity", "numpy.nonzero", "numpy.percentile", "numpy.min", "numpy.mean", "skimage.transform.resize", "numpy.any", "medpy.filter.binary.largest_connected_component", "numpy.max"...
[((639, 663), 'numpy.nonzero', 'np.nonzero', (['z_projection'], {}), '(z_projection)\n', (649, 663), True, 'import numpy as np\n'), ((676, 693), 'numpy.min', 'np.min', (['z_nonzero'], {}), '(z_nonzero)\n', (682, 693), True, 'import numpy as np\n'), ((820, 844), 'numpy.nonzero', 'np.nonzero', (['y_projection'], {}), '(y...
import cfg2 import numpy as np import time #Controller Class Takes in the x,y, and radius pixels and determines the PWM #to send to the ESC. class Controller(object): def __init__(self): self.running=True self.PWM_Steering=0.0 self.PWMLast_Steering=cfg2.PWMMid_Steering self...
[ "numpy.arctan2", "time.time" ]
[((5062, 5073), 'time.time', 'time.time', ([], {}), '()\n', (5071, 5073), False, 'import time\n'), ((3257, 3268), 'time.time', 'time.time', ([], {}), '()\n', (3266, 3268), False, 'import time\n'), ((4765, 4813), 'numpy.arctan2', 'np.arctan2', (['center_distance', 'self.depth_distance'], {}), '(center_distance, self.dep...
from TekkenGameState import TekkenGameState from ButtonCommandEnum import Command from MoveInfoEnums import InputDirectionCodes from MoveInfoEnums import InputAttackCodes import time class MatchRecorder: NOTATION = { Command.HoldForward : 'F', Command.HoldBack: 'B', Command.Hold...
[ "time.strftime" ]
[((4751, 4787), 'time.strftime', 'time.strftime', (['"""%Y_%b_%d_%H.%M.%SS_"""'], {}), "('%Y_%b_%d_%H.%M.%SS_')\n", (4764, 4787), False, 'import time\n')]
#!/usr/bin/env python3.5 ''' Objective: do a little bit of practice with the book "Make Your Own Neural Network", by <NAME>. basically, this code will be from the first part. ''' # AROUND PAGE 69 import sys import numpy as np import matplotlib.pyplot as plt from klib import pad nl='\n' # just gonna generate a few poin...
[ "numpy.copy", "klib.pad", "numpy.array", "numpy.matmul", "numpy.round" ]
[((546, 571), 'numpy.array', 'np.array', (['[0.9, 0.1, 0.8]'], {}), '([0.9, 0.1, 0.8])\n', (554, 571), True, 'import numpy as np\n'), ((582, 643), 'numpy.array', 'np.array', (['[[0.9, 0.3, 0.4], [0.2, 0.8, 0.2], [0.1, 0.5, 0.6]]'], {}), '([[0.9, 0.3, 0.4], [0.2, 0.8, 0.2], [0.1, 0.5, 0.6]])\n', (590, 643), True, 'impor...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 24 12:45:31 2021 @author: antolin """ import numpy as np import torch class EarlyStopping(object): def __init__(self, optimizer, model, path, mode='min', min_delta=0, patience=5, percentage=False): self.model = model self.optim...
[ "numpy.isnan" ]
[((850, 867), 'numpy.isnan', 'np.isnan', (['metrics'], {}), '(metrics)\n', (858, 867), True, 'import numpy as np\n')]
#coding:utf-8 import json as Json from flask import Response,make_response from mantis.fundamental.errors import ErrorDefs,ValueEntry SUCC = 0 ERROR = 1 class CallReturn(object): def __init__(self,status=SUCC,errcode=0,errmsg='',result=None): self.status = status self.errcode = errcode s...
[ "flask.Response", "json.dumps" ]
[((938, 954), 'json.dumps', 'Json.dumps', (['data'], {}), '(data)\n', (948, 954), True, 'import json as Json\n'), ((1009, 1028), 'flask.Response', 'Response', (['self.json'], {}), '(self.json)\n', (1017, 1028), False, 'from flask import Response, make_response\n')]
# Generated by Django 3.0.7 on 2020-06-23 01:04 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='School', fields=[ ('id', models.AutoField(p...
[ "django.db.models.CharField", "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.AutoField" ]
[((302, 353), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)', 'serialize': '(False)'}), '(primary_key=True, serialize=False)\n', (318, 353), False, 'from django.db import migrations, models\n'), ((381, 477), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'db_...
from random import choice from os import listdir from os.path import isfile, join path = "../app/static/img/profile/default" print(listdir(path)) dirs = [f for f in listdir(path) if isfile(join(path, f))] print(path + "/" + choice(dirs)) pi = path.find("static") print(path[pi:])
[ "random.choice", "os.path.join", "os.listdir" ]
[((133, 146), 'os.listdir', 'listdir', (['path'], {}), '(path)\n', (140, 146), False, 'from os import listdir\n'), ((168, 181), 'os.listdir', 'listdir', (['path'], {}), '(path)\n', (175, 181), False, 'from os import listdir\n'), ((227, 239), 'random.choice', 'choice', (['dirs'], {}), '(dirs)\n', (233, 239), False, 'fro...
import torch import torch.nn as nn import torch.autograd as autograd import apex import logging from .cutmix import cutmix from .mixup import mixup LOGGER = logging.getLogger(__name__) class Trainer(object): @staticmethod def optimizer2devices(optimizer, devices): for state in opt...
[ "torch.autograd.detect_anomaly", "apex.amp.scale_loss", "torch.nn.functional.log_softmax", "torch.nn.DataParallel", "torch.no_grad", "logging.getLogger" ]
[((170, 197), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (187, 197), False, 'import logging\n'), ((1023, 1054), 'torch.nn.DataParallel', 'nn.DataParallel', (['model', 'devices'], {}), '(model, devices)\n', (1038, 1054), True, 'import torch.nn as nn\n'), ((1997, 2038), 'apex.amp.scale_...
""" SoftLayer.tests.managers.queue_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :license: MIT, see LICENSE for more details. """ import mock import SoftLayer from SoftLayer import consts from SoftLayer.managers import messaging from SoftLayer import testing QUEUE_1 = { 'expiration': 40000, 'message...
[ "mock.patch", "SoftLayer.managers.messaging.MessagingConnection", "SoftLayer.MessagingManager", "SoftLayer.managers.messaging.QueueAuth", "mock.MagicMock" ]
[((1924, 1980), 'mock.patch', 'mock.patch', (['"""SoftLayer.managers.messaging.requests.post"""'], {}), "('SoftLayer.managers.messaging.requests.post')\n", (1934, 1980), False, 'import mock\n'), ((2264, 2339), 'mock.patch', 'mock.patch', (['"""SoftLayer.managers.messaging.QueueAuth.auth"""', 'mocked_auth_call'], {}), "...
import csv import json import hashlib import os import shutil import subprocess import click import requests import gspread import argparse import sys import dateutil.parser from tqdm import tqdm from config import ASSIGNMENTS, API_BASE, python, master_sh def get_token(): return subprocess.call([python, 'ok', '--...
[ "os.mkdir", "tqdm.tqdm", "json.dump", "csv.reader", "csv.writer", "json.load", "click.option", "os.path.exists", "config.ASSIGNMENTS.index", "click.command", "subprocess.call", "requests.get", "os.listdir" ]
[((4199, 4214), 'click.command', 'click.command', ([], {}), '()\n', (4212, 4214), False, 'import click\n'), ((4216, 4307), 'click.option', 'click.option', (['"""--token"""'], {'prompt': '"""Ok Token (python3 ok --get-token) or copy from above"""'}), "('--token', prompt=\n 'Ok Token (python3 ok --get-token) or copy f...
"""802.1x implementation for FAUCET.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 <NAME>, <NAME> and <NAME>. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2017 The Contributors # # Licensed under the Apache License, Versi...
[ "eventlet.monkey_patch", "chewie.chewie.Chewie", "ryu.lib.hub.spawn" ]
[((838, 861), 'eventlet.monkey_patch', 'eventlet.monkey_patch', ([], {}), '()\n', (859, 861), False, 'import eventlet\n'), ((2389, 2548), 'chewie.chewie.Chewie', 'chewie.Chewie', (['dot1x_intf', 'self.logger', 'self.auth_handler', 'self.failure_handler', 'self.logoff_handler', 'radius_ip', 'radius_port', 'radius_secret...
from scipy.stats import norm import torch from torch.autograd import Function, Variable, gradcheck class NormalCDF(Function): @staticmethod def forward(ctx, input): ctx.save_for_backward(input) input_np = input.data if isinstance(input, Variable) else input input_np = (input_np.cpu()...
[ "torch.autograd.gradcheck", "torch.autograd.Variable", "torch.randn", "scipy.stats.norm.pdf", "scipy.stats.norm.cdf", "torch.from_numpy" ]
[((1317, 1388), 'torch.autograd.gradcheck', 'gradcheck', (['NormalCDF.apply', '(input,)'], {'eps': '(0.0001)', 'atol': '(0.001)', 'rtol': '(0.01)'}), '(NormalCDF.apply, (input,), eps=0.0001, atol=0.001, rtol=0.01)\n', (1326, 1388), False, 'from torch.autograd import Function, Variable, gradcheck\n'), ((385, 403), 'scip...
import dschema # specifying defaults in a nested property # will completely fill the property tree # if it does not exist in your data schema = { 'a': { 'b': { 'c': dschema.prop(default='d') } } } r = dschema.Validator(schema).validate({}, namespace=True) print(r.a.b.c) # -> pri...
[ "dschema.prop", "dschema.Validator" ]
[((1414, 1459), 'dschema.prop', 'dschema.prop', ([], {'default': '(1)', 'type': '(lambda x: x + 1)'}), '(default=1, type=lambda x: x + 1)\n', (1426, 1459), False, 'import dschema\n'), ((240, 265), 'dschema.Validator', 'dschema.Validator', (['schema'], {}), '(schema)\n', (257, 265), False, 'import dschema\n'), ((611, 63...
import re from utils.subprocess import get_output # [^a-zA-Z] before g++ patterns is there to exclude clang++ from matching, so that /g++ or \g++.exe can only match. # it could be done by splitting path, and taking only last part _command_candidate_patterns = ['gcc(\.exe)?$','gcc-[0-9]{1}[A-Za-z0-9]*(\.exe)?$', '[^a-z...
[ "re.search", "utils.subprocess.get_output" ]
[((562, 596), 'utils.subprocess.get_output', 'get_output', (["[command, '--version']"], {}), "([command, '--version'])\n", (572, 596), False, 'from utils.subprocess import get_output\n'), ((607, 645), 're.search', 're.search', (['_apple_llvm_pattern', 'output'], {}), '(_apple_llvm_pattern, output)\n', (616, 645), False...
import ctypes # used for accessing the dynamic library import graph_partitioning.partitioners.utils as putils # used for some of the utilities functions class LibScotch(putils.CLibInterface): def __init__(self, libraryPath = None): super().__init__(libraryPath=libraryPath) def _getDefaultLibPath(self...
[ "ctypes.c_int", "graph_partitioning.partitioners.utils.defaultSCOTCHLibraryPath", "ctypes.POINTER" ]
[((338, 371), 'graph_partitioning.partitioners.utils.defaultSCOTCHLibraryPath', 'putils.defaultSCOTCHLibraryPath', ([], {}), '()\n', (369, 371), True, 'import graph_partitioning.partitioners.utils as putils\n'), ((4159, 4174), 'ctypes.c_int', 'ctypes.c_int', (['(0)'], {}), '(0)\n', (4171, 4174), False, 'import ctypes\n...
from setuptools import setup, find_packages from os.path import join, dirname setup( name='soft_raspberry', version='1.0', packages=find_packages(), long_description=open(join(dirname(__file__), 'README.md')).read(), install_requires=['ffmpeg', 'sox', 'pyaudio', 'portaudio19-dev'], )
[ "os.path.dirname", "setuptools.find_packages" ]
[((145, 160), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (158, 160), False, 'from setuptools import setup, find_packages\n'), ((193, 210), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (200, 210), False, 'from os.path import join, dirname\n')]
import configparser from config import path config = configparser.ConfigParser() config.read([f"{path}/Configurações/Principal.ini", f"{path}/Configurações/session.info", f"{path}/Configurações/TTS.ini"]) ######################################################### def pytts(...
[ "os.remove", "pyttsx3.init", "gtts.gTTS", "pygame.mixer.init", "pygame.mixer.music.play", "pygame.init", "ibm_watson.TextToSpeechV1", "pygame.mixer.music.stop", "pygame.mixer.music.unload", "pygame.mixer.music.get_busy", "contextlib.redirect_stdout", "pygame.time.Clock", "pygame.mixer.music....
[((57, 84), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (82, 84), False, 'import configparser\n'), ((1028, 1059), 'pyttsx3.init', 'pyttsx3.init', ([], {'driverName': 'engine'}), '(driverName=engine)\n', (1040, 1059), False, 'import pyttsx3\n'), ((4878, 4899), 'ibm_cloud_sdk_core.authenti...
# All rights reserved # Licensed under the Apache license (see LICENSE) import typer from tests.app import bar NOT_A_COMMAND = "not-a-command" my_app = typer.Typer(add_completion=False) my_app.add_typer(bar.app, name="bar") @my_app.command() def foo(): pass # pragma: no cover @my_app.callback() def cli(): ...
[ "typer.Typer" ]
[((155, 188), 'typer.Typer', 'typer.Typer', ([], {'add_completion': '(False)'}), '(add_completion=False)\n', (166, 188), False, 'import typer\n')]
import cherrypy from ingredients_http.request_methods import RequestMethods from ingredients_http.route import Route from deli.counter.http.mounts.root.routes.location.v1.validation_models.zones import RequestCreateZone, ResponseZone, \ ParamsZone, ParamsListZone, RequestZoneSchedule from deli.counter.http.router ...
[ "cherrypy.tools.model_params", "cherrypy.tools.model_out", "cherrypy.tools.resource_object", "ingredients_http.route.Route", "deli.counter.http.mounts.root.routes.location.v1.validation_models.zones.ResponseZone.from_database", "cherrypy.tools.enforce_permission", "cherrypy.HTTPError", "deli.kubernete...
[((639, 675), 'ingredients_http.route.Route', 'Route', ([], {'methods': '[RequestMethods.POST]'}), '(methods=[RequestMethods.POST])\n', (644, 675), False, 'from ingredients_http.route import Route\n'), ((681, 727), 'cherrypy.tools.model_in', 'cherrypy.tools.model_in', ([], {'cls': 'RequestCreateZone'}), '(cls=RequestCr...
import gaptrain as gt import os here = os.path.abspath(os.path.dirname(__file__)) h2o = gt.Molecule(os.path.join(here, 'data', 'h2o.xyz')) methane = gt.Molecule(os.path.join(here, 'data', 'methane.xyz')) def test_gap(): water_dimer = gt.System(box_size=[3.0, 3.0, 3.0]) water_dimer.add_molecules(h2o, n=2) ...
[ "gaptrain.gap.SolventIntraGAP", "gaptrain.System", "gaptrain.GAP", "os.path.dirname", "gaptrain.Data", "os.path.join", "gaptrain.gap.SoluteIntraGAP" ]
[((56, 81), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (71, 81), False, 'import os\n'), ((101, 138), 'os.path.join', 'os.path.join', (['here', '"""data"""', '"""h2o.xyz"""'], {}), "(here, 'data', 'h2o.xyz')\n", (113, 138), False, 'import os\n'), ((162, 203), 'os.path.join', 'os.path.join'...
import os import argparse import time import numpy as np import re from pathlib import Path from datetime import datetime import config as cfg from metadata import grid from utils import audio from model import model from utils import log import warnings warnings.filterwarnings('ignore') ROUNDDIGITS = 3 ###########...
[ "argparse.ArgumentParser", "model.model.predict", "os.walk", "os.path.isfile", "pathlib.Path", "metadata.grid.getSpeciesLists", "model.model.buildNet", "os.path.join", "model.model.prepareInput", "os.path.exists", "utils.audio.specsFromFile", "utils.log.p", "datetime.datetime.now", "re.sub...
[((257, 290), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (280, 290), False, 'import warnings\n'), ((467, 487), 'os.path.isfile', 'os.path.isfile', (['path'], {}), '(path)\n', (481, 487), False, 'import os\n'), ((956, 1012), 'model.model.loadSnapshot', 'model.loadSnapsh...
import re import requests from .constants import * import uuid import pytz import datetime from .models import WeatherPayload def set_key_value(dump): try: if not dump: raise Exception('No data found') month_season_data = dict(zip(MONTH_OR_SEASON, dump)) return month_season_data,'Success' except Exception a...
[ "re.split", "random.randint", "datetime.datetime.now", "requests.get", "re.search" ]
[((2152, 2171), 'random.randint', 'randint', (['(1000)', '(9999)'], {}), '(1000, 9999)\n', (2159, 2171), False, 'from random import randint\n'), ((2232, 2255), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (2253, 2255), False, 'import datetime\n'), ((489, 517), 'requests.get', 'requests.get', (['m...
import unittest from country import Country class CountryDataTypeTest(unittest.TestCase): def setUp(self): surnames = ["bakken", "Normann", "Trå", "Lund", "Tokerud"] female_names = ["lise", "Oda", "Kari", "Mari", "Line", "Frida"] male_names = ["per", "Peder", "Espen", "Ola", "Marius", "Håvard"] cities = ["os...
[ "unittest.main", "country.Country" ]
[((1099, 1114), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1112, 1114), False, 'import unittest\n'), ((681, 714), 'country.Country', 'Country', ([], {}), '(**self.keyword_arguments)\n', (688, 714), False, 'from country import Country\n')]
""" Copyright 2013 <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 writing, software distrib...
[ "numpy.random.seed", "cvxpy.Parameter", "numpy.random.randn", "numpy.logspace", "time.time", "cvxpy.Problem", "cvxpy.norm", "cvxpy.Variable", "cvxpy.sum_squares" ]
[((959, 979), 'numpy.random.seed', 'numpy.random.seed', (['(1)'], {}), '(1)\n', (976, 979), False, 'import numpy\n'), ((992, 1016), 'numpy.random.randn', 'numpy.random.randn', (['n', 'm'], {}), '(n, m)\n', (1010, 1016), False, 'import numpy\n'), ((1029, 1050), 'numpy.random.randn', 'numpy.random.randn', (['n'], {}), '(...
# -*- coding: utf-8 -*- """ Auth* related model. This is where the models used by the authentication stack are defined. It's perfectly fine to re-use this definition in the inviteExportmail application, though. """ import os from datetime import datetime from hashlib import sha256 __all__ = ['SysMUser', 'SysMUserExp...
[ "inviteexportmail.model.DBSession.query", "inviteexportmail.model.DBSession.merge", "sqlalchemy.ForeignKey", "sqlalchemy.types.Unicode", "inviteexportmail.model.DBSession.flush", "inviteexportmail.model.DBSession.execute", "sqlalchemy.Column", "sqlalchemy.orm.relation", "inviteexportmail.model.DBSes...
[((648, 715), 'sqlalchemy.Column', 'Column', (['"""ID_USER"""', 'BigInteger'], {'autoincrement': '(True)', 'primary_key': '(True)'}), "('ID_USER', BigInteger, autoincrement=True, primary_key=True)\n", (654, 715), False, 'from sqlalchemy import Table, ForeignKey, Column\n'), ((915, 941), 'sqlalchemy.orm.relation', 'rela...
# Copyright 2017 Battelle Energy Alliance, 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 agreed t...
[ "warnings.simplefilter", "utils.utils.findCrowModule" ]
[((969, 1021), 'warnings.simplefilter', 'warnings.simplefilter', (['"""default"""', 'DeprecationWarning'], {}), "('default', DeprecationWarning)\n", (990, 1021), False, 'import warnings\n'), ((1473, 1512), 'utils.utils.findCrowModule', 'utils.findCrowModule', (['"""interpolationND"""'], {}), "('interpolationND')\n", (1...
import copy import locale import os from os.path import abspath, dirname, join from sys import platform from pelican.settings import (DEFAULT_CONFIG, DEFAULT_THEME, _printf_s_to_format_field, coerce_overrides, configure_settings, ...
[ "copy.deepcopy", "pelican.settings.read_settings", "locale.getdefaultlocale", "os.path.dirname", "pelican.settings.configure_settings", "pelican.settings._printf_s_to_format_field", "pelican.settings.coerce_overrides", "pelican.settings.handle_deprecated_settings", "locale.setlocale", "os.path.spl...
[((5240, 5303), 'pelican.tests.support.unittest.skipIf', 'unittest.skipIf', (["(platform == 'win32')", '"""Doesn\'t work on Windows"""'], {}), '(platform == \'win32\', "Doesn\'t work on Windows")\n', (5255, 5303), False, 'from pelican.tests.support import unittest\n'), ((680, 711), 'locale.setlocale', 'locale.setlocale...
import math import tensorflow as tf import matplotlib.pyplot as plt @tf.function def constant_schedule_with_warmup(epoch, warmup_epochs=0, lr_start=1e-4, lr_max=1e-3): """ Create a schedule with a constant learning rate preceded by a warmup period during which the learning rate increases linearly between {lr_...
[ "tensorflow.math.maximum", "tensorflow.math.cos" ]
[((2799, 2826), 'tensorflow.math.maximum', 'tf.math.maximum', (['lr_min', 'lr'], {}), '(lr_min, lr)\n', (2814, 2826), True, 'import tensorflow as tf\n'), ((1133, 1160), 'tensorflow.math.maximum', 'tf.math.maximum', (['lr_min', 'lr'], {}), '(lr_min, lr)\n', (1148, 1160), True, 'import tensorflow as tf\n'), ((2030, 2057)...
import dowser from flask import Flask, render_template app = Flask(__name__) @app.route('/') def ready(): app_version = 'N/A' with open('version.txt') as reader: app_version = reader.read() return "Flask server is ready! And current version is " + app_version @app.route('/divine') def divine(): ...
[ "flask.Flask", "flask.render_template", "dowser.StringsDowser" ]
[((62, 77), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (67, 77), False, 'from flask import Flask, render_template\n'), ((329, 351), 'dowser.StringsDowser', 'dowser.StringsDowser', ([], {}), '()\n', (349, 351), False, 'import dowser\n'), ((485, 532), 'flask.render_template', 'render_template', (['"""ind...
from .Detector import ( Detector, SoftwareLiveDetector, TriggeredDetector, BurstDetector) from ..environment import env from ..environment import macro import time import numpy as np try: import PyTango except ModuleNotFoundError: pass import os from h5py import VirtualSource, VirtualLayout class LimaDet...
[ "h5py.VirtualSource", "PyTango.DeviceProxy", "h5py.VirtualLayout", "time.sleep", "os.path.join" ]
[((4500, 4542), 'PyTango.DeviceProxy', 'PyTango.DeviceProxy', (['self.lima_device_name'], {}), '(self.lima_device_name)\n', (4519, 4542), False, 'import PyTango\n'), ((4605, 4646), 'PyTango.DeviceProxy', 'PyTango.DeviceProxy', (['self.det_device_name'], {}), '(self.det_device_name)\n', (4624, 4646), False, 'import PyTa...
import qsbot # This would be the code for a basic bot that will welcome members to the server, display a presence, # and give/remove a role from members when they react/remove reaction with a certain emoji in a specific channel # Creates the client. Keep in mind this is a sub class of discord.ext.commands.Bot client ...
[ "qsbot.client" ]
[((322, 336), 'qsbot.client', 'qsbot.client', ([], {}), '()\n', (334, 336), False, 'import qsbot\n')]
from body import System from body import Body import math class TwoBodyWithCenter: _center_mass = None _mass = 0.0 _position = None _speeds = 0.0 _angles = None _continue_condition = None def __init__(self, center_mass, mass, position, speeds, angles, continue_condition): self._c...
[ "body.Body", "math.cos", "math.sin" ]
[((772, 902), 'body.Body', 'Body', ([], {'mass': 'self._center_mass', 'position': '[0.0, 0.0, 0.0]', 'velocity': '[0.0, 0.0, 0.0]', 'continue_condition': 'self._continue_condition'}), '(mass=self._center_mass, position=[0.0, 0.0, 0.0], velocity=[0.0, 0.0, \n 0.0], continue_condition=self._continue_condition)\n', (77...
import linecache import random import re import numpy as np from py2neo import Graph, Node, Relationship f = open('data/common_sense_sentences.dataset', 'r') graph = Graph('http://localhost:7474', auth=('neo4j', '<PASSWORD>')) import os def test(num): lines = [] # print(os.path.getsize('data/common_sense_s...
[ "random.randint", "linecache.getline", "linecache.clearcache", "random.random", "re.findall", "py2neo.Graph", "re.compile" ]
[((168, 228), 'py2neo.Graph', 'Graph', (['"""http://localhost:7474"""'], {'auth': "('neo4j', '<PASSWORD>')"}), "('http://localhost:7474', auth=('neo4j', '<PASSWORD>'))\n", (173, 228), False, 'from py2neo import Graph, Node, Relationship\n'), ((912, 934), 'linecache.clearcache', 'linecache.clearcache', ([], {}), '()\n',...
""" Utility functions. """ import numpy as np import os import random import tensorflow as tf from tensorflow.contrib.layers.python import layers as tf_layers from tensorflow.python.platform import flags FLAGS = flags.FLAGS ## Image helper def get_images(paths, labels, nb_samples=None, shuffle=True): if nb_samples...
[ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.contrib.layers.python.layers.batch_norm", "random.shuffle", "random.sample", "tensorflow.reshape", "tensorflow.nn.max_pool", "tensorflow.nn.conv2d", "tensorflow.contrib.layers.python.layers.layer_norm", "tensorflow.square", "os.path.jo...
[((764, 839), 'tensorflow.contrib.layers.python.layers.batch_norm', 'tf_layers.batch_norm', (['x'], {'activation_fn': 'tf.nn.relu', 'reuse': 'reuse', 'scope': 'scope'}), '(x, activation_fn=tf.nn.relu, reuse=reuse, scope=scope)\n', (784, 839), True, 'from tensorflow.contrib.layers.python import layers as tf_layers\n'), ...
# -*- coding: utf-8 -*- """ jokk.tests.test_crossdomain ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cross-Domain tests for Jokk. :copyright: (c) 2014-2015 <NAME>, All rights reserved. :license: BSD, see LICENSE for more details. """ import os from jokk._compat import to_unicode from . import TestBase class Tes...
[ "os.path.abspath", "jokk._compat.to_unicode", "os.path.join" ]
[((454, 500), 'os.path.join', 'os.path.join', (['path', '"""data"""', '"""basic"""', 'file_name'], {}), "(path, 'data', 'basic', file_name)\n", (466, 500), False, 'import os\n'), ((412, 437), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (427, 437), False, 'import os\n'), ((893, 913), 'jokk....
import boto3 import base64 def decrypt(event, context): encrypted = bytes(event['secret'], 'ascii') decoded = base64.b64decode(encrypted) kms = boto3.client('kms') decrypted = kms.decrypt(CiphertextBlob=decoded) return decrypted['Plaintext']
[ "base64.b64decode", "boto3.client" ]
[((119, 146), 'base64.b64decode', 'base64.b64decode', (['encrypted'], {}), '(encrypted)\n', (135, 146), False, 'import base64\n'), ((157, 176), 'boto3.client', 'boto3.client', (['"""kms"""'], {}), "('kms')\n", (169, 176), False, 'import boto3\n')]
import click import pytz import tzlocal from timezonefinder import TimezoneFinder def to_stdout(message): click.echo(message) def to_stderr(message): click.echo(message, err=True) def report_error(message): to_stderr(f"{click.style('ERROR:', fg='red')} {message}") def report_warning(message): cl...
[ "tzlocal.get_localzone", "timezonefinder.TimezoneFinder", "click.echo", "pytz.timezone", "click.style" ]
[((112, 131), 'click.echo', 'click.echo', (['message'], {}), '(message)\n', (122, 131), False, 'import click\n'), ((162, 191), 'click.echo', 'click.echo', (['message'], {'err': '(True)'}), '(message, err=True)\n', (172, 191), False, 'import click\n'), ((2138, 2154), 'timezonefinder.TimezoneFinder', 'TimezoneFinder', ([...
import os late = globals()["late"] name = "%s" version = "1.4.5" _data = { # Allzpark "label": "%s", "icon": "{root}/resources/icon.png" } requires = [ # pipeline "reveries", # pipeline tools "~avalon", # Apps "~maya-2018|2020", # utils "~terminal-1", ] @late() def p...
[ "os.getcwd", "getpass.getuser", "pymongo.MongoClient" ]
[((1723, 1734), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1732, 1734), False, 'import os\n'), ((432, 471), 'pymongo.MongoClient', 'MongoClient', (["os.environ['AVALON_MONGO']"], {}), "(os.environ['AVALON_MONGO'])\n", (443, 471), False, 'from pymongo import MongoClient\n'), ((1154, 1171), 'getpass.getuser', 'getpass....
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('buildconfig', views.buildconfig, name='buildconfig'), path('ipxe/<uuid:node_id>', views.ipxe, name='ipxe'), path('esxibootcfg/<uuid:node_id>', views.bootcfg, name='bootcfg'), path('esxiks/<u...
[ "django.urls.path" ]
[((71, 106), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (75, 106), False, 'from django.urls import path\n'), ((112, 170), 'django.urls.path', 'path', (['"""buildconfig"""', 'views.buildconfig'], {'name': '"""buildconfig"""'}), "('buildconfig', ...
import telebot import datetime class WPTelegramBot: def __init__(self, token: str, chat_ids: list): # apihelper.proxy = {'https': 'socks5h://400426223:<EMAIL>Es<EMAIL>@<EMAIL>.s5.open<EMAIL>:999'} # apihelper.proxy = {"http": "https://5.39.91.73:3128"} self.bot = telebot.TeleBot(token=toke...
[ "telebot.TeleBot", "datetime.datetime.now" ]
[((294, 322), 'telebot.TeleBot', 'telebot.TeleBot', ([], {'token': 'token'}), '(token=token)\n', (309, 322), False, 'import telebot\n'), ((646, 669), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (667, 669), False, 'import datetime\n')]
import random from catalog import * from flask import Flask # If `entrypoint` is not defined in app.yaml, App Engine will look for an app # called `app` in `main.py`. app = Flask(__name__) #Catalog service @app.route('/catalog',methods=['GET', 'POST']) def catalog(): return {} @app.route('/catalog/<int:id>'...
[ "flask.Flask" ]
[((178, 193), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (183, 193), False, 'from flask import Flask\n')]
#this sample code reproduces a backward derivative by convolution from absl import app import jax from jax._src.numpy.lax_numpy import argsort, interp, zeros_like import jax.numpy as jnp from jaxopt import implicit_diff from jaxopt import linear_solve from jaxopt import OptaxSolver, GradientDescent from matplotlib.pypl...
[ "jax.random.uniform", "flax.linen.Conv", "jax.numpy.array", "jax.numpy.concatenate", "jax.random.PRNGKey", "jax.random.split" ]
[((1054, 1075), 'jax.random.PRNGKey', 'jax.random.PRNGKey', (['(1)'], {}), '(1)\n', (1072, 1075), False, 'import jax\n'), ((1085, 1122), 'jax.random.uniform', 'jax.random.uniform', (['rng', '[1, h, w, 3]'], {}), '(rng, [1, h, w, 3])\n', (1103, 1122), False, 'import jax\n'), ((1138, 1159), 'jax.random.split', 'jax.rando...
from django.db import models # Create your models here. from users.models import User class Message(models.Model): created = models.DateTimeField(auto_now_add=True) sender = models.ForeignKey(User, related_name='sender', default=None, on_delete=models.CASCADE) receiver = models.ForeignKey(User, related_n...
[ "django.db.models.ForeignKey", "django.db.models.DateTimeField", "django.db.models.CharField", "django.db.models.Manager" ]
[((132, 171), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (152, 171), False, 'from django.db import models\n'), ((185, 276), 'django.db.models.ForeignKey', 'models.ForeignKey', (['User'], {'related_name': '"""sender"""', 'default': 'None', 'on_del...
import json import pytest from indy_common.auth import Authoriser from plenum.common.exceptions import RequestRejectedException from plenum.test.helper import sdk_sign_request_from_dict, sdk_send_and_check, sdk_send_signed_requests, \ sdk_get_bad_response from indy_node.test.anon_creds.conftest import claim_def ...
[ "plenum.test.helper.sdk_get_bad_response", "pytest.fixture", "plenum.test.helper.sdk_sign_request_from_dict", "json.dumps" ]
[((322, 352), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (336, 352), False, 'import pytest\n'), ((1132, 1202), 'plenum.test.helper.sdk_sign_request_from_dict', 'sdk_sign_request_from_dict', (['looper', 'sdk_wallet_trust_anchor', 'claim_def'], {}), '(looper, sdk_wallet_tru...
from flask import Flask, render_template, jsonify, redirect import sqlalchemy import pymysql import numpy as np import pandas as pd from sqlalchemy.ext.automap import automap_base from sqlalchemy import create_engine, inspect from sqlalchemy.orm import Session #flask setup app = Flask(__name__) from flask_sqlalchemy ...
[ "sqlalchemy.inspect", "numpy.ravel", "flask.Flask", "sqlalchemy.orm.Session", "flask.jsonify", "flask.render_template", "pandas.read_sql_query", "sqlalchemy.create_engine", "sqlalchemy.ext.automap.automap_base" ]
[((281, 296), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (286, 296), False, 'from flask import Flask, render_template, jsonify, redirect\n'), ((363, 422), 'sqlalchemy.create_engine', 'create_engine', (['"""sqlite:///belly_button_biodiversity.sqlite"""'], {}), "('sqlite:///belly_button_biodiversity.sqli...
#!/usr/bin/env python3 import logging logging.basicConfig(level = logging.INFO,format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger().setLevel(logging.INFO) logger = logging.getLogger(__name__) import math import time import rospy from std_msgs.msg import String from sensor_msgs.msg import...
[ "rospy.Subscriber", "cv2.medianBlur", "logging.getLogger", "json.dumps", "cv2.boxPoints", "numpy.sin", "cv2.minAreaRect", "cv2.inRange", "numpy.linalg.solve", "cv2.contourArea", "json.loads", "cv2.dilate", "cv2.cvtColor", "rospy.init_node", "math.cos", "numpy.int0", "math.ceil", "m...
[((38, 145), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s - %(name)s - %(levelname)s - %(message)s"""'}), "(level=logging.INFO, format=\n '%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n", (57, 145), False, 'import logging\n'), ((196, 223), 'logging....
# ecc related defines from ecc_domain_para import ecc_para_sec2 import bnCalc def str2bn(hexstr): return int(hexstr.replace(" ",""),16) class EccPoint(): def __init__(self,x=None,y=None,inf=False): self.x = x self.y = y self.inf = inf def is_inf(self): return self.inf cla...
[ "bnCalc.mod_inv_gcd" ]
[((1883, 1931), 'bnCalc.mod_inv_gcd', 'bnCalc.mod_inv_gcd', (['(2 * eccpa.y % self.p)', 'self.p'], {}), '(2 * eccpa.y % self.p, self.p)\n', (1901, 1931), False, 'import bnCalc\n'), ((2187, 2243), 'bnCalc.mod_inv_gcd', 'bnCalc.mod_inv_gcd', (['((eccpa.x - eccpb.x) % self.p)', 'self.p'], {}), '((eccpa.x - eccpb.x) % self...
import logging from typing import Any, Optional, Union import numpy as np import pandas as pd from ...support.MyTools import checkClassBalance, getAdaptedCrossVal from ..EstimatorPools.EstimatorPool import EstimatorPool from ..EstimatorPools.EstimatorPoolCV import EstimatorPoolCV from ..MetaModel import MetaModel pd...
[ "pandas.DataFrame", "logging.info" ]
[((835, 849), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (847, 849), True, 'import pandas as pd\n'), ((1120, 1151), 'logging.info', 'logging.info', (['"""Training models"""'], {}), "('Training models')\n", (1132, 1151), False, 'import logging\n')]
# Serial implementation for sampling a single chunk of a spectrum, namely one or two spectroscopic lines. import multiprocessing as mp import argparse parser = argparse.ArgumentParser(prog="single.py", description="Run Starfish fitting model in parallel.") parser.add_argument("-r", "--run_index", help="All data will ...
[ "numpy.fft.rfft", "numpy.sum", "argparse.ArgumentParser", "numpy.empty", "gc.collect", "numpy.sin", "shutil.rmtree", "shutil.copy", "multiprocessing.cpu_count", "scipy.interpolate.InterpolatedUnivariateSpline", "numpy.fft.irfft", "os.path.exists", "itertools.chain", "Starfish.spectrum.Data...
[((162, 263), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""single.py"""', 'description': '"""Run Starfish fitting model in parallel."""'}), "(prog='single.py', description=\n 'Run Starfish fitting model in parallel.')\n", (185, 263), False, 'import argparse\n'), ((3335, 3411), 'Starfish.sp...
import numpy as np def median(input_list: list) -> float: """ 中位数 href: https://baike.baidu.com/item/%E4%B8%AD%E4%BD%8D%E5%80%BC/9501969?fr=aladdin input_list: list[int] 数值型数据列表 returns: float: 中位值 """ if not input_list: raise ValueError("你输入的是个空列表") input_list.sort() num =...
[ "numpy.median" ]
[((520, 541), 'numpy.median', 'np.median', (['input_list'], {}), '(input_list)\n', (529, 541), True, 'import numpy as np\n')]
# Generated by Django 3.1.7 on 2021-03-20 12:12 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='language_types', fields=[ ...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.EmailField", "django.db.models.AutoField", "django.db.models.IntegerField" ]
[((354, 385), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)'}), '(max_length=50)\n', (370, 385), False, 'from django.db import migrations, models\n'), ((423, 488), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)', 'primary_key': '(True)', 'serialize': '(False)...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ###Author #<NAME> #2018-l0-19 #<EMAIL> ### """ Given an input file containing record names, one per row, indicates whether the record exists by outputting a 1 if it exists and a 0 if it doesn't. The input file of record names will be first sorted and deduplicated. """ im...
[ "argparse.ArgumentParser" ]
[((431, 527), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'argparse.RawTextHelpFormatter'}), '(description=__doc__, formatter_class=argparse.\n RawTextHelpFormatter)\n', (454, 527), False, 'import argparse\n')]
from deepharmony.graph import Graph, get_default_graph from deepharmony.tensorOps.cnn import conv2D, maxPool, flatten, matmul, addBias, batch_norm, reorg, concat, leakyReLU from deepharmony import get_tensor import logging from deepharmony.scalar.dtypes import FQDtype, FixedPoint from deepharmony import get_tensor ...
[ "deepharmony.tensorOps.cnn.conv2D", "deepharmony.tensorOps.cnn.leakyReLU", "deepharmony.get_tensor", "deepharmony.graph.get_default_graph", "deepharmony.tensorOps.cnn.batch_norm", "deepharmony.scalar.dtypes.FixedPoint", "deepharmony.tensorOps.cnn.maxPool", "deepharmony.graph.Graph" ]
[((557, 662), 'deepharmony.get_tensor', 'get_tensor', ([], {'shape': '(filters, kernel_size, kernel_size, input_channels)', 'name': '"""weights"""', 'dtype': 'w_dtype'}), "(shape=(filters, kernel_size, kernel_size, input_channels), name=\n 'weights', dtype=w_dtype)\n", (567, 662), False, 'from deepharmony import get...
import os import sys from pathlib import Path import pytest _root = Path(__file__).parent.parent sys.path.append(str(_root / 'lib')) sys.path.append(str(_root / 'src' / 'ploomber_scaffold' / 'template')) @pytest.fixture def root(): return Path(_root) @pytest.fixture def tmp_directory(tmp_path): old = os.g...
[ "os.getcwd", "pathlib.Path", "os.chdir" ]
[((247, 258), 'pathlib.Path', 'Path', (['_root'], {}), '(_root)\n', (251, 258), False, 'from pathlib import Path\n'), ((316, 327), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (325, 327), False, 'import os\n'), ((332, 350), 'os.chdir', 'os.chdir', (['tmp_path'], {}), '(tmp_path)\n', (340, 350), False, 'import os\n'), ((...
# Copyright 2017-2021 EPAM Systems, Inc. (https://www.epam.com/) # # 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 appli...
[ "pipeline.log.logger.RunLogger", "pipeline.log.logger.LocalLogger", "pipeline.utils.path.mkdir", "traceback.print_exc", "pipeline.utils.package.install_package", "pipeline.api.PipelineAPI", "traceback.format_exc", "pipeline.log.logger.LevelLogger", "os.path.join", "os.getenv", "pipeline.log.logg...
[((1234, 1256), 'os.getenv', 'os.getenv', (['"""parent_id"""'], {}), "('parent_id')\n", (1243, 1256), False, 'import os\n'), ((1276, 1324), 'os.getenv', 'os.getenv', (['"""cluster_role"""', '_MANAGER_CLUSTER_ROLE'], {}), "('cluster_role', _MANAGER_CLUSTER_ROLE)\n", (1285, 1324), False, 'import os\n'), ((1442, 1496), 'o...
import os from dotenv import load_dotenv from deepext.layers.backbone_key import BackBoneKey from deepext.models.base import SegmentationModel, DetectionModel, ClassificationModel, AttentionClassificationModel from deepext.models.segmentation import UNet, ResUNet, ShelfNet from deepext.models.object_detection import E...
[ "deepext.camera.RealtimeAttentionClassification", "deepext.camera.RealtimeDetection", "dotenv.load_dotenv", "os.environ.get", "deepext.camera.RealtimeClassification", "deepext.camera.RealtimeSegmentation", "deepext.models.classification.MobileNetV3", "deepext.utils.dataset_util.create_label_list_and_d...
[((691, 732), 'dotenv.load_dotenv', 'load_dotenv', (['"""envs/camera_prediction.env"""'], {}), "('envs/camera_prediction.env')\n", (702, 732), False, 'from dotenv import load_dotenv\n'), ((748, 783), 'os.environ.get', 'os.environ.get', (['"""MODEL_WEIGHT_PATH"""'], {}), "('MODEL_WEIGHT_PATH')\n", (762, 783), False, 'im...
from pymoo.algorithms.rvea import RVEA from pymoo.factory import get_problem, get_reference_directions from pymoo.optimize import minimize from pymoo.visualization.scatter import Scatter problem = get_problem("dtlz1", n_obj=3) ref_dirs = get_reference_directions("das-dennis", 3, n_partitions=12) algorithm = RVEA(ref...
[ "pymoo.algorithms.rvea.RVEA", "pymoo.factory.get_reference_directions", "pymoo.visualization.scatter.Scatter", "pymoo.optimize.minimize", "pymoo.factory.get_problem" ]
[((198, 227), 'pymoo.factory.get_problem', 'get_problem', (['"""dtlz1"""'], {'n_obj': '(3)'}), "('dtlz1', n_obj=3)\n", (209, 227), False, 'from pymoo.factory import get_problem, get_reference_directions\n'), ((240, 298), 'pymoo.factory.get_reference_directions', 'get_reference_directions', (['"""das-dennis"""', '(3)'],...
#------------------------------------------------------------------------------ # # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions d...
[ "traits.api.Enum", "traits.api.provides", "wx.MessageDialog" ]
[((1078, 1102), 'traits.api.provides', 'provides', (['IMessageDialog'], {}), '(IMessageDialog)\n', (1086, 1102), False, 'from traits.api import Enum, provides, Unicode\n'), ((1455, 1494), 'traits.api.Enum', 'Enum', (['"""information"""', '"""warning"""', '"""error"""'], {}), "('information', 'warning', 'error')\n", (14...
import torch import torch.nn as nn import torch.nn.functional as F def _pairwise_distance_squared(x, y): xx = torch.sum(torch.pow(x, 2), 1).view(-1, 1) yy = torch.sum(torch.pow(y, 2), 1).view(1, -1) pdist = xx + yy - 2.0 * torch.mm(x, torch.t(y)) return pdist class HardTripletLoss(nn.Module): de...
[ "torch.mean", "torch.t", "torch.clamp", "torch.pow", "torch.arange", "torch.min" ]
[((628, 655), 'torch.arange', 'torch.arange', (['(0)', 'batch_size'], {}), '(0, batch_size)\n', (640, 655), False, 'import torch\n'), ((825, 844), 'torch.min', 'torch.min', (['pdist', '(1)'], {}), '(pdist, 1)\n', (834, 844), False, 'import torch\n'), ((864, 913), 'torch.clamp', 'torch.clamp', (['(d_pos - d_neg + self.m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @time: 2017/2/20 9:18 @author: yl """ import re # 处理HanLP的分词结果:① 过滤1个字的词语;② 选择词性为’ns’,’nsf’,’nz’的词语。 class SegPro(object): def __init__(self): pass def process(self, sourcefile, resultfile, tag, filterlength=1): ''' :param sourcefile:...
[ "re.sub" ]
[((748, 773), 're.sub', 're.sub', (['"""([^一-鿕])"""', '""""""', 's'], {}), "('([^一-鿕])', '', s)\n", (754, 773), False, 'import re\n')]
""" This module defines the protocol used for asynchronous operations in udiskie. """ import asyncio import traceback from functools import partial from subprocess import CalledProcessError, PIPE from asyncio.subprocess import create_subprocess_exec from .common import wraps __all__ = [ 'pack', 'to_coro', ...
[ "functools.partial", "traceback.print_exc", "asyncio.get_event_loop", "subprocess.CalledProcessError", "asyncio.Lock", "asyncio.subprocess.create_subprocess_exec" ]
[((1120, 1134), 'asyncio.Lock', 'asyncio.Lock', ([], {}), '()\n', (1132, 1134), False, 'import asyncio\n'), ((2253, 2295), 'asyncio.subprocess.create_subprocess_exec', 'create_subprocess_exec', (['*argv'], {'stdout': 'PIPE'}), '(*argv, stdout=PIPE)\n', (2275, 2295), False, 'from asyncio.subprocess import create_subproc...
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-16 17:55 from __future__ import unicode_literals from django.conf import settings import django.contrib.auth.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True ...
[ "django.db.models.OneToOneField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.IntegerField", "django.db.models.DateField" ]
[((524, 617), '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", (540, 617), False, 'from django.db import migrations, models\...
import argparse import os import sys from head_breaker import breaker from head_breaker import version args = None def arg_parser(): parser = argparse.ArgumentParser(prog='h-breaker', description="version %s : %s"%(version.__version__, version.__descriptrion__)) parser.add_argument("path", help="待处理...
[ "head_breaker.breaker.break_head", "argparse.ArgumentParser", "os.path.exists", "head_breaker.breaker.recover_tail", "head_breaker.breaker.break_tail", "head_breaker.breaker.recover_head", "sys.exit" ]
[((157, 284), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""h-breaker"""', 'description': "('version %s : %s' % (version.__version__, version.__descriptrion__))"}), "(prog='h-breaker', description='version %s : %s' % (\n version.__version__, version.__descriptrion__))\n", (180, 284), False,...
import random import pygame from model.entity import Entity from particles.blood import Blood from particles.wall_particle import Wall from utils.collision import check_collision from utils.vector import Vector class Enemy(Entity): """ Classe représentant un ennemi. Paramètres: scene: la scene ...
[ "pygame.Surface", "random.randint", "random.choice", "utils.collision.check_collision", "utils.vector.Vector" ]
[((834, 858), 'pygame.Surface', 'pygame.Surface', (['[20, 20]'], {}), '([20, 20])\n', (848, 858), False, 'import pygame\n'), ((1916, 2025), 'utils.collision.check_collision', 'check_collision', (['self.scene.map_group', 'old_rect', 'self.rect', 'self.right', 'self.left', 'self.top', 'self.bottom'], {}), '(self.scene.ma...
import tkinter as tk from tkinter import messagebox import threading from os import system as runcmd root = tk.Tk() root.title("Bejelentkezés") def openMainScreen(): runcmd("python mainscreen.py " + phoneField.get() + " " + passwordField.get()) def login(): mainScreenThread = threading.Thread(target=openMainSc...
[ "tkinter.Button", "threading.Thread", "tkinter.Entry", "tkinter.Tk" ]
[((109, 116), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (114, 116), True, 'import tkinter as tk\n'), ((368, 392), 'tkinter.Entry', 'tk.Entry', (['root'], {'width': '(15)'}), '(root, width=15)\n', (376, 392), True, 'import tkinter as tk\n'), ((427, 461), 'tkinter.Entry', 'tk.Entry', (['root'], {'show': '"""*"""', 'width'...
from datetime import date from guardian.shortcuts import ( get_objects_for_user as guardian_get_objects_for_user, ) from costcentre.models import ( CostCentre, ) from forecast.models import ( ForecastEditState, UnlockedForecastEditor, ) def can_view_forecasts(user): """Checks view permission, i...
[ "costcentre.models.CostCentre.objects.all", "forecast.models.ForecastEditState.objects.get", "datetime.date.today", "forecast.models.UnlockedForecastEditor.objects.filter", "costcentre.models.CostCentre.objects.get", "guardian.shortcuts.get_objects_for_user" ]
[((607, 638), 'forecast.models.ForecastEditState.objects.get', 'ForecastEditState.objects.get', ([], {}), '()\n', (636, 638), False, 'from forecast.models import ForecastEditState, UnlockedForecastEditor\n'), ((831, 862), 'forecast.models.ForecastEditState.objects.get', 'ForecastEditState.objects.get', ([], {}), '()\n'...
#!bin/python from flask import Flask,jsonify,abort from flask import make_response app = Flask(__name__) tasks_iniciais = [ { 'id': 1, 'title': u'Fazer compras', 'description': u'Leite, queijo, pizza, frutas', 'done': False }, { 'id': 2, 'title': u'Aprender...
[ "flask.request.json.get", "flask.jsonify", "flask.Flask", "flask.request.args.get" ]
[((91, 106), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (96, 106), False, 'from flask import Flask, jsonify, abort\n'), ((927, 941), 'flask.jsonify', 'jsonify', (['tasks'], {}), '(tasks)\n', (934, 941), False, 'from flask import Flask, jsonify, abort\n'), ((1417, 1447), 'flask.jsonify', 'jsonify', (["{...
# (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP # # 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 ap...
[ "monascastatsd.common.update_dimensions", "monascastatsd.common.update_name" ]
[((2603, 2657), 'monascastatsd.common.update_dimensions', 'common.update_dimensions', (['self._dimensions', 'dimensions'], {}), '(self._dimensions, dimensions)\n', (2627, 2657), False, 'from monascastatsd import common\n'), ((2825, 2861), 'monascastatsd.common.update_name', 'common.update_name', (['self._name', 'name']...
from pandas import Series, DataFrame data = {"open": [737, 750], "high": [755, 780], "low": [700, 710], "close": [750, 770]} df = DataFrame(data) s = Series([300, 400]) df["volume"] = s print(df)
[ "pandas.DataFrame", "pandas.Series" ]
[((132, 147), 'pandas.DataFrame', 'DataFrame', (['data'], {}), '(data)\n', (141, 147), False, 'from pandas import Series, DataFrame\n'), ((153, 171), 'pandas.Series', 'Series', (['[300, 400]'], {}), '([300, 400])\n', (159, 171), False, 'from pandas import Series, DataFrame\n')]
from sys import argv import ast import astunparse import visitors if len(argv) != 3: raise IOError(f"Expected two arguments formatted like [filename] [input file's name] [output file's name] but got {len(argv)} arguments") file_to_open = argv[1] file_to_write = argv[2] with open(file_to_open, "r") as f: con...
[ "visitors.create_knowledgebase", "astunparse.unparse" ]
[((351, 415), 'visitors.create_knowledgebase', 'visitors.create_knowledgebase', (['"""nodes"""', '"""KnowledgeBase"""', 'content'], {}), "('nodes', 'KnowledgeBase', content)\n", (380, 415), False, 'import visitors\n'), ((467, 495), 'astunparse.unparse', 'astunparse.unparse', (['new_tree'], {}), '(new_tree)\n', (485, 49...
## # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
[ "pandas.DataFrame", "pyarrow.ipc.open_stream", "pyarrow.allocate_buffer", "os.makedirs", "pycylon.net.comm_ops.gather_buffer", "os.path.isdir", "os.path.realpath", "os.path.dirname", "pyarrow.parquet.read_metadata", "glob.glob", "pyarrow._parquet._reconstruct_filemetadata", "pycylon.net.comm_o...
[((2684, 2730), 'pycylon.net.comm_ops.allgather_buffer', 'allgather_buffer', ([], {'buf': 'buf', 'context': 'env.context'}), '(buf=buf, context=env.context)\n', (2700, 2730), False, 'from pycylon.net.comm_ops import allgather_buffer, gather_buffer\n'), ((3960, 3993), 'os.path.join', 'os.path.join', (['dir_path', 'file_...
import urllib.request import shutil import os import os.path import sys import copy from bs4 import BeautifulSoup def import_data(link: str, novel: str, limited: int): #link = 'https://www.wuxiaworld.com/novel/child-of-light' print(link) file_name = 'import.html' url = urllib.request.Request( link, data=None, ...
[ "bs4.BeautifulSoup", "os.remove", "shutil.copyfileobj" ]
[((654, 685), 'bs4.BeautifulSoup', 'BeautifulSoup', (['f', '"""html.parser"""'], {}), "(f, 'html.parser')\n", (667, 685), False, 'from bs4 import BeautifulSoup\n'), ((3040, 3060), 'os.remove', 'os.remove', (['file_name'], {}), '(file_name)\n', (3049, 3060), False, 'import os\n'), ((564, 602), 'shutil.copyfileobj', 'shu...
import unittest import cscl_examples.smt_qfbv_solver.sorts as sorts import cscl_examples.smt_qfbv_solver.syntactic_scope as synscope import cscl_examples.smt_qfbv_solver.ast as ast class TestSyntacticFunctionScope(unittest.TestCase): def test_has_added_signature(self): sort_ctx = sorts.SortContext() ...
[ "cscl_examples.smt_qfbv_solver.sorts.SortContext", "cscl_examples.smt_qfbv_solver.ast.FunctionDeclaration", "cscl_examples.smt_qfbv_solver.syntactic_scope.SyntacticFunctionScope" ]
[((295, 314), 'cscl_examples.smt_qfbv_solver.sorts.SortContext', 'sorts.SortContext', ([], {}), '()\n', (312, 314), True, 'import cscl_examples.smt_qfbv_solver.sorts as sorts\n'), ((490, 525), 'cscl_examples.smt_qfbv_solver.ast.FunctionDeclaration', 'ast.FunctionDeclaration', (['"""foo"""', 'sig'], {}), "('foo', sig)\n...
import random import binascii import set2_challenge9 as pkcs7 from Crypto.Cipher import AES import os import collections prefix = os.urandom(random.randint(1, 16)) key = bytes([random.randint(0,255) for i in range(16)]) # find block_size through code string_to_decrypt = b'Um9sbGluJyBpbiBteSA1LjAKV2l0aCBteSByYWctdG9wIG...
[ "os.path.commonprefix", "random.randint", "Crypto.Cipher.AES.new", "binascii.a2b_base64", "collections.deque" ]
[((142, 163), 'random.randint', 'random.randint', (['(1)', '(16)'], {}), '(1, 16)\n', (156, 163), False, 'import random\n'), ((1876, 1895), 'collections.deque', 'collections.deque', ([], {}), '()\n', (1893, 1895), False, 'import collections\n'), ((178, 200), 'random.randint', 'random.randint', (['(0)', '(255)'], {}), '...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 <NAME> <<EMAIL>> # # Distributed under terms of the MIT license. from argparse import ArgumentParser from sys import stdin def parse_args(): p = ArgumentParser() p.add_argument('columns', nargs='*', type=int, ...
[ "argparse.ArgumentParser" ]
[((237, 253), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (251, 253), False, 'from argparse import ArgumentParser\n')]
import mock import pytest from cvfm import models from cvfm.exceptions import DPGCreationError from cvfm.services import DistributedPortGroupService @pytest.fixture def vcenter_api_client(): return mock.Mock() @pytest.fixture def dpg_service(vcenter_api_client, vnc_api_client, database): return Distributed...
[ "cvfm.models.DistributedPortGroupModel", "mock.patch", "pytest.raises", "mock.Mock", "pytest.mark.parametrize", "cvfm.services.DistributedPortGroupService" ]
[((2297, 2360), 'mock.patch', 'mock.patch', (['"""cvfm.database.Database.get_vm_models_by_host_name"""'], {}), "('cvfm.database.Database.get_vm_models_by_host_name')\n", (2307, 2360), False, 'import mock\n'), ((2362, 2425), 'mock.patch', 'mock.patch', (['"""cvfm.database.Database.get_vm_models_by_dpg_model"""'], {}), "...
# -*- coding: utf-8 -*- import hashlib import inspect import os # noqa: F401 import shutil import time import unittest import uuid from configparser import ConfigParser from os import environ from unittest.mock import patch import requests from installed_clients.AbstractHandleClient import AbstractHandle as HandleSe...
[ "os.mkdir", "installed_clients.WorkspaceClient.Workspace", "os.remove", "installed_clients.AssemblyUtilClient.AssemblyUtil", "shutil.rmtree", "os.path.join", "shutil.copy", "installed_clients.authclient.KBaseAuth", "unittest.mock.patch.object", "kb_quast.kb_quastServer.MethodContext", "os.path.e...
[((4044, 4087), 'unittest.mock.patch.object', 'patch.object', (['kb_quast', '"""TWENTY_MB"""'], {'new': '(10)'}), "(kb_quast, 'TWENTY_MB', new=10)\n", (4056, 4087), False, 'from unittest.mock import patch\n'), ((6594, 6637), 'unittest.mock.patch.object', 'patch.object', (['kb_quast', '"""TWENTY_MB"""'], {'new': '(10)'}...
#---------------------------------------------------------------------- # Name: wx.lib.utils # Purpose: Miscelaneous utility functions # # Author: <NAME> # # Created: 18-Jan-2009 # Copyright: (c) 2009-2020 Total Control Software # Licence: wxWidgets license # # Tags: phoenix-port, unitt...
[ "wx.Display.GetFromPoint", "wx.Size", "wx.Display" ]
[((1451, 1489), 'wx.Display.GetFromPoint', 'wx.Display.GetFromPoint', (['rect.Position'], {}), '(rect.Position)\n', (1474, 1489), False, 'import wx\n'), ((2407, 2423), 'wx.Size', 'wx.Size', (['*adjust'], {}), '(*adjust)\n', (2414, 2423), False, 'import wx\n'), ((1551, 1570), 'wx.Display', 'wx.Display', (['dispidx'], {}...
#!/usr/bin/python import gspread from oauth2client.service_account import ServiceAccountCredentials import requests import csv from operator import itemgetter scope = ['https://spreadsheets.google.com/feeds'] creds = ServiceAccountCredentials.from_json_keyfile_name('client-secret.json', scope) client = gspread.autho...
[ "oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name", "gspread.authorize", "operator.itemgetter" ]
[((220, 297), 'oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name', 'ServiceAccountCredentials.from_json_keyfile_name', (['"""client-secret.json"""', 'scope'], {}), "('client-secret.json', scope)\n", (268, 297), False, 'from oauth2client.service_account import ServiceAccountCredentials\n'), (...
# Copyright 2017 The Kubernetes 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 or agreed to ...
[ "kubernetes.config.load_incluster_config", "kubernetes.client.CoreV1Api" ]
[((1518, 1548), 'kubernetes.config.load_incluster_config', 'config.load_incluster_config', ([], {}), '()\n', (1546, 1548), False, 'from kubernetes import client, config\n'), ((1559, 1577), 'kubernetes.client.CoreV1Api', 'client.CoreV1Api', ([], {}), '()\n', (1575, 1577), False, 'from kubernetes import client, config\n'...
""" # Dress TF nodes up for serving on the web When the TF kernel has retrieved data, it comes in the form of nodes. But the kernel is the one that is able to dress those nodes up with meaningful data. That dressing up is happening in this module, it has the higher level functions for composing tables and passages. ...
[ "pickle.loads", "flask.redirect", "markdown.markdown", "flask.jsonify", "flask.render_template", "flask.make_response" ]
[((5002, 5024), 'pickle.loads', 'pickle.loads', (['passages'], {}), '(passages)\n', (5014, 5024), False, 'import pickle\n'), ((5112, 5151), 'flask.jsonify', 'jsonify', ([], {'table': 'table', 'passages': 'passages'}), '(table=table, passages=passages)\n', (5119, 5151), False, 'from flask import jsonify, redirect, rende...
import logging from typing import Optional from common_primitives.column_parser import ColumnParserPrimitive from common_primitives.construct_predictions import ConstructPredictionsPrimitive from common_primitives.dataset_to_dataframe import DatasetToDataFramePrimitive from common_primitives.denormalize import Denorma...
[ "d3m.metadata.pipeline.Pipeline", "d3m.primitives.data_cleaning.column_type_profiler.Simon.metadata.query", "logging.basicConfig", "common_primitives.extract_columns_semantic_types.ExtractColumnsBySemanticTypesPrimitive.metadata.query", "common_primitives.text_reader.TextReaderPrimitive.metadata.query", "...
[((755, 795), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (774, 795), False, 'import logging\n'), ((1704, 1714), 'd3m.metadata.pipeline.Pipeline', 'Pipeline', ([], {}), '()\n', (1712, 1714), False, 'from d3m.metadata.pipeline import Pipeline, PrimitiveStep,...
"""Tests for ensemble models """ from django.test import TestCase from espressodb.base.exceptions import ConsistencyError from lattedb.utilities.tests import ObjectParser from lattedb.ensemble.models import Ensemble from lattedb.gaugeconfig.models import Nf211 from lattedb.gaugeconfig.tests import Nf211HisqParser ...
[ "lattedb.gaugeconfig.tests.Nf211HisqParser.create_instance", "lattedb.gaugeconfig.models.Nf211.objects.all", "lattedb.ensemble.models.Ensemble.objects.create", "lattedb.gaugeconfig.tests.Nf211HisqParser.get_parameters" ]
[((776, 818), 'lattedb.ensemble.models.Ensemble.objects.create', 'Ensemble.objects.create', ([], {}), '(**self.parameters)\n', (799, 818), False, 'from lattedb.ensemble.models import Ensemble\n'), ((843, 876), 'lattedb.gaugeconfig.tests.Nf211HisqParser.create_instance', 'Nf211HisqParser.create_instance', ([], {}), '()\...
import configparser # CONFIG config = configparser.ConfigParser() config.read('dwh.cfg') # DROP TABLES staging_events_table_drop = "DROP TABLE IF EXISTS staging_events" staging_songs_table_drop = "DROP TABLE IF EXISTS staging_songs" songplay_table_drop = "DROP TABLE IF EXISTS songplays cascade" user_table_dr...
[ "configparser.ConfigParser" ]
[((40, 67), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (65, 67), False, 'import configparser\n')]
import time class Monitoring(object): def __init__(self, redis_client): self.req_rate_bucket_durations = [24*3600,3600,60] self.r = redis_client def redis_bucket(self, duration): return ('openrefine_wikidata:monitoring:%d:%d' % (duration,time.time() // duration)) a...
[ "time.time" ]
[((1261, 1272), 'time.time', 'time.time', ([], {}), '()\n', (1270, 1272), False, 'import time\n'), ((288, 299), 'time.time', 'time.time', ([], {}), '()\n', (297, 299), False, 'import time\n')]
import dht from machine import Pin, deepsleep, RTC from micropython import const from collections import namedtuple from config import pins, sys, location, DISPLAY_JUST_REPAINT, VARIANT_2DAYS, DISPLAY_REFRESH_DIV, ui from ltime import Time from var import display from buzzer ...
[ "machine.deepsleep", "micropython.const", "buzzer.play", "ltime.Time", "machine.RTC", "collections.namedtuple", "log.log", "machine.Pin" ]
[((1292, 1300), 'micropython.const', 'const', (['(1)'], {}), '(1)\n', (1297, 1300), False, 'from micropython import const\n'), ((1315, 1323), 'micropython.const', 'const', (['(2)'], {}), '(2)\n', (1320, 1323), False, 'from micropython import const\n'), ((1338, 1346), 'micropython.const', 'const', (['(3)'], {}), '(3)\n'...