code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from pygameImporter import pygame from Frame.baseFunctions import * from Frame.gui.Gui import Gui class ProgressBar(Gui): def __init__(self, fillPercentage, fillColor, *args, **kwargs): super().__init__(*args, **kwargs) output("Progress Bar: Creating " + self.text + " progress bar...", "debug") ...
[ "pygameImporter.pygame.draw.polygon" ]
[((1171, 1235), 'pygameImporter.pygame.draw.polygon', 'pygame.draw.polygon', (['self.window.surface', 'self.fillColor', 'points'], {}), '(self.window.surface, self.fillColor, points)\n', (1190, 1235), False, 'from pygameImporter import pygame\n')]
from enums.enums import MediusEnum, CallbackStatus from utils import utils from medius.mediuspackets.disbandclanresponse import DisbandClanResponseSerializer class DisbandClanSerializer: data_dict = [ {'name': 'mediusid', 'n_bytes': 2, 'cast': None}, {'name': 'message_id', 'n_bytes': MediusEnum.MES...
[ "medius.mediuspackets.disbandclanresponse.DisbandClanResponseSerializer.build" ]
[((784, 873), 'medius.mediuspackets.disbandclanresponse.DisbandClanResponseSerializer.build', 'DisbandClanResponseSerializer.build', (["serialized['message_id']", 'CallbackStatus.SUCCESS'], {}), "(serialized['message_id'],\n CallbackStatus.SUCCESS)\n", (819, 873), False, 'from medius.mediuspackets.disbandclanrespons...
# coding=utf-8 from bs4 import BeautifulSoup import copy import time import json import LOGIN import MENU class PlannedCourseInfo: def __init__(self, main_num=None, name=None, code=None, margin=None, detail=None, url=None, course_dic=None): if course_dic is None: self.num = str(main_num) ...
[ "copy.deepcopy", "json.load", "json.dumps", "time.sleep", "time.time", "MENU.MENU", "LOGIN.Account", "bs4.BeautifulSoup" ]
[((15458, 15473), 'LOGIN.Account', 'LOGIN.Account', ([], {}), '()\n', (15471, 15473), False, 'import LOGIN\n'), ((1384, 1398), 'json.dumps', 'json.dumps', (['js'], {}), '(js)\n', (1394, 1398), False, 'import json\n'), ((1933, 1961), 'MENU.MENU', 'MENU.MENU', ([], {'menu_dic': 'menu_dic'}), '(menu_dic=menu_dic)\n', (194...
import os from bitfield import BitField from constance import config from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.core.validators import MaxValueValidator, MinValueValidator from django.db.models.signals import post_save import django.db.models.o...
[ "django.db.models.OneToOneField", "os.remove", "django.core.validators.MinValueValidator", "django.dispatch.receiver", "django.db.models.BooleanField", "os.path.isfile", "timezone_field.TimeZoneField", "bitfield.BitField", "django.core.validators.MaxValueValidator" ]
[((4974, 5006), 'django.dispatch.receiver', 'receiver', (['post_save'], {'sender': 'User'}), '(post_save, sender=User)\n', (4982, 5006), False, 'from django.dispatch import receiver\n'), ((597, 657), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'verbose_name': '"""публикация"""', 'default': '(True)'}),...
import os import numpy as np from frovedis.exrpc.server import FrovedisServer from frovedis.matrix.dvector import FrovedisDvector from frovedis.matrix.dense import FrovedisRowmajorMatrix FrovedisServer.initialize("mpirun -np 2 {}".format(os.environ['FROVEDIS_SERVER'])) dv = FrovedisDvector([1,2,3,4,5,6,7,8],dtype=np....
[ "frovedis.exrpc.server.FrovedisServer.shut_down", "frovedis.matrix.dvector.FrovedisDvector" ]
[((277, 336), 'frovedis.matrix.dvector.FrovedisDvector', 'FrovedisDvector', (['[1, 2, 3, 4, 5, 6, 7, 8]'], {'dtype': 'np.float64'}), '([1, 2, 3, 4, 5, 6, 7, 8], dtype=np.float64)\n', (292, 336), False, 'from frovedis.matrix.dvector import FrovedisDvector\n'), ((346, 372), 'frovedis.exrpc.server.FrovedisServer.shut_down...
from manageXML.management.commands._giella_xml import GiellaXML from django.core.management.base import BaseCommand, CommandError import os, glob, sys from manageXML.models import * from django.conf import settings from collections import defaultdict ignore_affiliations = False def create_lexeme(ll: GiellaXML.Item, ...
[ "os.path.basename", "os.path.isdir", "manageXML.management.commands._giella_xml.GiellaXML.parse_file", "collections.defaultdict", "django.core.management.base.CommandError", "os.path.join" ]
[((1595, 1625), 'manageXML.management.commands._giella_xml.GiellaXML.parse_file', 'GiellaXML.parse_file', (['filename'], {}), '(filename)\n', (1615, 1625), False, 'from manageXML.management.commands._giella_xml import GiellaXML\n'), ((1760, 1786), 'os.path.basename', 'os.path.basename', (['filename'], {}), '(filename)\...
import math import os import xml.etree.ElementTree import numpy as np import paddle import six from PIL import Image from utils import image_util class Settings(object): def __init__(self, label_file_path=None, resize_h=300, resize_w=300, mean_...
[ "numpy.random.uniform", "utils.image_util.sampler", "utils.image_util.crop_image", "utils.image_util.generate_batch_samples", "PIL.Image.open", "os.path.exists", "numpy.array", "numpy.swapaxes", "PIL.Image.fromarray", "utils.image_util.distort_image", "paddle.reader.multiprocess_reader", "nump...
[((3440, 3453), 'numpy.array', 'np.array', (['img'], {}), '(img)\n', (3448, 3453), True, 'import numpy as np\n'), ((6376, 6401), 'numpy.random.shuffle', 'np.random.shuffle', (['images'], {}), '(images)\n', (6393, 6401), True, 'import numpy as np\n'), ((3012, 3073), 'utils.image_util.generate_batch_samples', 'image_util...
#!/usr/bin/python3 # LED Test import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) LED = 13 GPIO.setup(LED, GPIO.OUT) try: print("LED is now flashing..") print("Exit with CTRL+C") while True: GPIO.output(LED,1) time.sleep(0.5) GPIO.output(LED,0) time.sleep(0.5) excep...
[ "RPi.GPIO.setmode", "RPi.GPIO.cleanup", "RPi.GPIO.setup", "time.sleep", "RPi.GPIO.output", "RPi.GPIO.setwarnings" ]
[((67, 89), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BCM'], {}), '(GPIO.BCM)\n', (79, 89), True, 'import RPi.GPIO as GPIO\n'), ((90, 113), 'RPi.GPIO.setwarnings', 'GPIO.setwarnings', (['(False)'], {}), '(False)\n', (106, 113), True, 'import RPi.GPIO as GPIO\n'), ((123, 148), 'RPi.GPIO.setup', 'GPIO.setup', (['LED', ...
from Script.import_emojis import Emojis from Script.import_functions import create_embed, int_to_str async def server_info(ctx): nb_humans = 0 for members in ctx.guild.members: if members.bot == 0: nb_humans += 1 nb_bots = 0 for members in ctx.guild.members: if members.bot ...
[ "Script.import_functions.int_to_str" ]
[((990, 1011), 'Script.import_functions.int_to_str', 'int_to_str', (['nb_humans'], {}), '(nb_humans)\n', (1000, 1011), False, 'from Script.import_functions import create_embed, int_to_str\n'), ((1038, 1057), 'Script.import_functions.int_to_str', 'int_to_str', (['nb_bots'], {}), '(nb_bots)\n', (1048, 1057), False, 'from...
# Copyright (c) 2011-2021, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions an...
[ "c2cgeoportal_commons.models.DBSession.query", "typing.cast", "c2cgeoportal_commons.models.DBSession.expunge", "c2cgeoportal_geoportal.lib.caching.get_region", "c2cgeoportal_commons.lib.url.get_url2", "c2cgeoportal_geoportal.views.proxy.Proxy.__init__", "pyramid.httpexceptions.HTTPBadRequest", "loggin...
[((1981, 1998), 'c2cgeoportal_geoportal.lib.caching.get_region', 'get_region', (['"""std"""'], {}), "('std')\n", (1991, 1998), False, 'from c2cgeoportal_geoportal.lib.caching import get_region\n'), ((2005, 2032), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2022, 2032), False, 'import ...
import numpy as np from napari.utils import nbscreenshot def test_nbscreenshot(viewer_factory): """Test taking a screenshot.""" view, viewer = viewer_factory() np.random.seed(0) data = np.random.random((10, 15)) viewer.add_image(data) rich_display_object = nbscreenshot(viewer) assert ha...
[ "numpy.random.random", "numpy.random.seed", "napari.utils.nbscreenshot" ]
[((176, 193), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (190, 193), True, 'import numpy as np\n'), ((205, 231), 'numpy.random.random', 'np.random.random', (['(10, 15)'], {}), '((10, 15))\n', (221, 231), True, 'import numpy as np\n'), ((286, 306), 'napari.utils.nbscreenshot', 'nbscreenshot', (['view...
import base64 import random import time from RGUtil.RGCodeUtil import RGResCode def get_data_with_request(_request): if _request.is_json: return _request.json return _request.values # if _request.method == "POST": # return _request.form # elif _request.json: # return _request....
[ "unicodedata.numeric", "time.time_ns" ]
[((1285, 1307), 'unicodedata.numeric', 'unicodedata.numeric', (['s'], {}), '(s)\n', (1304, 1307), False, 'import unicodedata\n'), ((3331, 3345), 'time.time_ns', 'time.time_ns', ([], {}), '()\n', (3343, 3345), False, 'import time\n')]
from ..files import ObjectReader from ..streams import EndianBinaryWriter from ..helpers import ImportHelper from .. import files from ..enums import FileType, ClassIDType import os from .. import environment def save_ptr(obj, writer: EndianBinaryWriter): if isinstance(obj, PPtr): writer.write_int(obj.file...
[ "os.path.join", "os.listdir" ]
[((1922, 1938), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (1932, 1938), False, 'import os\n'), ((2045, 2078), 'os.path.join', 'os.path.join', (['path', 'external_name'], {}), '(path, external_name)\n', (2057, 2078), False, 'import os\n')]
import os import numpy as np import torch import torch.nn as nn import matplotlib.pyplot as plt from medpy.metric import binary #use gpu if available device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class AE(nn.Module): def __init__(self, latent_size=100): super().__init__() self.init_...
[ "matplotlib.pyplot.title", "torch.nn.Dropout", "os.mkdir", "torch.cat", "numpy.mean", "torch.nn.Softmax", "torch.no_grad", "torch.nn.MSELoss", "numpy.copy", "medpy.metric.binary.dc", "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.c...
[((8627, 8663), 'matplotlib.pyplot.plot', 'plt.plot', (['losses', '"""-x"""'], {'label': '"""loss"""'}), "(losses, '-x', label='loss')\n", (8635, 8663), True, 'import matplotlib.pyplot as plt\n'), ((8666, 8685), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""epoch"""'], {}), "('epoch')\n", (8676, 8685), True, 'import ...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing 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/LICENS...
[ "bayeslite.core.bayesdb_generator_table", "bayeslite.backends.cgpm_backend.CGPM_Backend", "test_csv.bayesdb_csv_file", "bayeslite.bayesdb_open", "bayeslite.bayesdb_read_csv", "bayeslite.compiler.compile_query", "bayeslite.guess.bayesdb_guess_population", "StringIO.StringIO", "test_core.t1_data", "...
[((9123, 9159), 'stochastic.stochastic', 'stochastic', ([], {'max_runs': '(2)', 'min_passes': '(1)'}), '(max_runs=2, min_passes=1)\n', (9133, 9159), False, 'from stochastic import stochastic\n'), ((10593, 10629), 'stochastic.stochastic', 'stochastic', ([], {'max_runs': '(2)', 'min_passes': '(1)'}), '(max_runs=2, min_pa...
# -*- coding: utf-8 -*- """ Created on Fri Aug 30 20:15:18 2019 @author: autol """ #%% from plotxy import plot_gd_xy,iters_gd_plot,plot_gd_contour from initdata import init_data,init_data1,data_b,init_data_house from func import gradient_descent_f from varclass import VarSetX from sklearn.model_selection import Param...
[ "numpy.stack", "numpy.random.uniform", "varclass.VarSetX", "plotxy.plot_gd_contour", "numpy.ones", "initdata.data_b", "plotxy.iters_gd_plot", "numpy.amax", "initdata.init_data1", "func.gradient_descent_f", "matplotlib.pyplot.subplots" ]
[((402, 412), 'numpy.ones', 'np.ones', (['(2)'], {}), '(2)\n', (409, 412), True, 'import numpy as np\n'), ((419, 444), 'initdata.init_data1', 'init_data1', (['n', '(45)', 'w'], {'b': '(0)'}), '(n, 45, w, b=0)\n', (429, 444), False, 'from initdata import init_data, init_data1, data_b, init_data_house\n'), ((502, 511), '...
# ServiceSchema.py from __future__ import print_function from __future__ import absolute_import from optparse import OptionParser, OptionValueError import os import platform as plat import sys if sys.version_info >= (3, 8) and plat.system().lower() == "windows": # pylint: disable=no-member with os.add_dll_dir...
[ "blpapi.AuthUser.createWithManualOptions", "optparse.OptionParser", "blpapi.AuthOptions.createWithUserAndApp", "blpapi.AuthOptions.createWithUser", "blpapi.AuthOptions.createWithApp", "blpapi.SessionOptions", "blpapi.Name", "platform.system", "blpapi.Session", "blpapi.AuthUser.createWithActiveDire...
[((429, 465), 'blpapi.Name', 'blpapi.Name', (['"""ReferenceDataResponse"""'], {}), "('ReferenceDataResponse')\n", (440, 465), False, 'import blpapi\n'), ((2930, 2944), 'optparse.OptionParser', 'OptionParser', ([], {}), '()\n', (2942, 2944), False, 'from optparse import OptionParser, OptionValueError\n'), ((7587, 7610),...
from oraclecxcommerce.modules import ProfilesModule import pytest def test_instantiate_profile_module_class_should_return_not_implemented_error(): with pytest.raises(NotImplementedError): occ = ProfilesModule()
[ "oraclecxcommerce.modules.ProfilesModule", "pytest.raises" ]
[((158, 192), 'pytest.raises', 'pytest.raises', (['NotImplementedError'], {}), '(NotImplementedError)\n', (171, 192), False, 'import pytest\n'), ((208, 224), 'oraclecxcommerce.modules.ProfilesModule', 'ProfilesModule', ([], {}), '()\n', (222, 224), False, 'from oraclecxcommerce.modules import ProfilesModule\n')]
from aws_cdk import aws_iam, aws_sqs, core from common.common_stack import CommonStack from common.region_aware_stack import RegionAwareStack class SqsStack(RegionAwareStack): def __init__(self, scope: core.Construct, id: str, common_stack: CommonStack, **kwargs) -> None: super().__init__(scope, id, **kwa...
[ "aws_cdk.aws_iam.PolicyStatement", "aws_cdk.aws_sqs.Queue" ]
[((464, 507), 'aws_cdk.aws_sqs.Queue', 'aws_sqs.Queue', (['self', '"""integ_test_sqs_queue"""'], {}), "(self, 'integ_test_sqs_queue')\n", (477, 507), False, 'from aws_cdk import aws_iam, aws_sqs, core\n'), ((532, 689), 'aws_cdk.aws_iam.PolicyStatement', 'aws_iam.PolicyStatement', ([], {'effect': 'aws_iam.Effect.ALLOW',...
########################################################## # pytorch-kaldi v.0.1 # <NAME>, <NAME> # Mila, University of Montreal # October 2018 # # Description: This script generates kaldi ark files containing raw features. # The file list must be a file containing "snt_id file.wav". # Note that only wav files are supp...
[ "data_io.write_mat", "numpy.abs", "os.makedirs", "os.stat", "data_io.read_vec_int_ark", "numpy.asarray", "numpy.zeros", "math.floor" ]
[((1797, 1816), 'os.stat', 'os.stat', (['out_folder'], {}), '(out_folder)\n', (1804, 1816), False, 'import os\n'), ((3554, 3575), 'numpy.asarray', 'np.asarray', (['frame_all'], {}), '(frame_all)\n', (3564, 3575), True, 'import numpy as np\n'), ((3670, 3724), 'data_io.write_mat', 'write_mat', (['out_folder', 'out_file',...
#!/usr/bin/env python3 import re from .codes import codes class Emoji: def __init__(self, const): if len(const) == 1: self.__fromUnicode(const) elif const[0] == ":": self.__fromAlias(const) else: self.__fromEscape(const) self.aliases = codes[self.escape] self.alias = self.alia...
[ "re.sub" ]
[((1293, 1337), 're.sub', 're.sub', (['""":([^s:]?[\\\\w-]+):"""', 'replAlias', 'text'], {}), "(':([^s:]?[\\\\w-]+):', replAlias, text)\n", (1299, 1337), False, 'import re\n')]
# -*- coding:utf-8 -*- # __author__ = '<NAME>' # Link Model from flask_boilerplate.extensions import db # 表前缀 prefix = 'flask_boilerplate' class Link(db.Model): __tablename__ = '%s_link' % prefix id = db.Column(db.Integer, primary_key=True) sitename = db.Column(db.VARCHAR(30), nullable=False, default='...
[ "flask_boilerplate.extensions.db.Enum", "flask_boilerplate.extensions.db.Column", "flask_boilerplate.extensions.db.VARCHAR" ]
[((214, 253), 'flask_boilerplate.extensions.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (223, 253), False, 'from flask_boilerplate.extensions import db\n'), ((545, 593), 'flask_boilerplate.extensions.db.Column', 'db.Column', (['db.Integer'], {'nullable': '(F...
""" Download civil war ships and their complements from dbpedia """ from os import path import json from SPARQLWrapper import SPARQLWrapper, JSON sparql = SPARQLWrapper("http://dbpedia.org/sparql") sparql.setQuery(""" select distinct ?ship, ?complement where { { {?ship dcterms:subject category:Ships_of_the_Union_Navy...
[ "SPARQLWrapper.SPARQLWrapper" ]
[((157, 199), 'SPARQLWrapper.SPARQLWrapper', 'SPARQLWrapper', (['"""http://dbpedia.org/sparql"""'], {}), "('http://dbpedia.org/sparql')\n", (170, 199), False, 'from SPARQLWrapper import SPARQLWrapper, JSON\n')]
import autograd.numpy as np import autograd import os from autograd import grad from autograd import jacobian from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt from matplotlib import cm from scipy.linalg import pinv import argparse parser = argparse.ArgumentParser() parser.add_argument("--functio...
[ "autograd.numpy.arange", "argparse.ArgumentParser", "matplotlib.pyplot.plot", "autograd.numpy.zeros_like", "os.makedirs", "matplotlib.pyplot.legend", "autograd.numpy.meshgrid", "autograd.numpy.array", "autograd.grad", "matplotlib.pyplot.figure", "matplotlib.pyplot.rcParams.update", "matplotlib...
[((264, 289), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (287, 289), False, 'import argparse\n'), ((3820, 3858), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 14}"], {}), "({'font.size': 14})\n", (3839, 3858), True, 'import matplotlib.pyplot as plt\n'), ((3939...
import re import math from tld import get_tld from Levenshtein import distance from .suspicious import keywords, tlds def entropy(string: str) -> float: """ Calculates the Shannon entropy of a string Original code: https://github.com/x0rz/phishing_catcher/blob/master/catch_phishing.py """ prob = [...
[ "math.log", "re.split", "tld.get_tld" ]
[((1289, 1313), 're.split', 're.split', (['"""\\\\W+"""', 'domain'], {}), "('\\\\W+', domain)\n", (1297, 1313), False, 'import re\n'), ((1101, 1171), 'tld.get_tld', 'get_tld', (['domain'], {'as_object': '(True)', 'fail_silently': '(True)', 'fix_protocol': '(True)'}), '(domain, as_object=True, fail_silently=True, fix_pr...
import csv import sqlite3 from tkinter import * from tkinter import filedialog """Tool to compare two reports and provide specific information from matching lines""" class MatchTool: UNPLACED_RSL_TEXT = [ "Copy Required Report", "Ad Copy Status Report", "Unplaced Spots", "Required Spots", ] def __init__(...
[ "sqlite3.connect", "csv.reader", "tkinter.filedialog.askopenfilename" ]
[((13046, 13133), 'tkinter.filedialog.askopenfilename', 'filedialog.askopenfilename', ([], {'filetypes': "[('CSV File', '*.csv'), ('All Files', '*.*')]"}), "(filetypes=[('CSV File', '*.csv'), ('All Files',\n '*.*')])\n", (13072, 13133), False, 'from tkinter import filedialog\n'), ((5493, 5528), 'csv.reader', 'csv.re...
import argparse import numpy as np from scipy.io import wavfile from tqdm import trange from ar_model import ARmodel def correctSignal(signal, model, window_size, pred_size, step, treshold=3): """Correct signal using AR model Args: signal (np.array): signal to correct model (ARmodel): autoreg...
[ "numpy.abs", "argparse.ArgumentParser", "numpy.copy", "tqdm.trange", "numpy.std", "scipy.io.wavfile.read", "ar_model.ARmodel", "scipy.io.wavfile.write", "numpy.linspace" ]
[((711, 726), 'numpy.copy', 'np.copy', (['signal'], {}), '(signal)\n', (718, 726), True, 'import numpy as np\n'), ((741, 798), 'tqdm.trange', 'trange', (['(0)', '(input.shape[0] - window_size - pred_size)', 'step'], {}), '(0, input.shape[0] - window_size - pred_size, step)\n', (747, 798), False, 'from tqdm import trang...
import io import json import os from typing import Any, Dict, IO, Iterator, Optional, Tuple from altair_data_server import Provider from PIL import Image import pytest import selenium.webdriver from selenium.webdriver.remote.webdriver import WebDriver from altair_saver import HTMLSaver from altair_saver._utils import...
[ "os.geteuid", "io.StringIO", "io.BytesIO", "json.load", "os.path.dirname", "pytest.fixture", "altair_saver._utils.internet_connected", "json.dumps", "altair_data_server.Provider", "pytest.raises", "pytest.xfail", "altair_saver.HTMLSaver", "pytest.mark.parametrize", "os.path.join", "os.li...
[((382, 412), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (396, 412), False, 'import pytest\n'), ((475, 505), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (489, 505), False, 'import pytest\n'), ((612, 642), 'pytest.fixture', 'p...
from timeit import default_timer from parser import wikihandler import xml.sax as sax import utility def main(): # setting path to indices utility.setIndexPath() utility.setStatPath() # parser=sax.make_parser() # handler = wikihandler() # parser.setFeature(sax.handler.feature_namespaces,0) # parser.setContentHa...
[ "parser.wikihandler", "timeit.default_timer", "utility.setIndexPath", "utility.setStatPath", "xml.sax.make_parser" ]
[((141, 163), 'utility.setIndexPath', 'utility.setIndexPath', ([], {}), '()\n', (161, 163), False, 'import utility\n'), ((165, 186), 'utility.setStatPath', 'utility.setStatPath', ([], {}), '()\n', (184, 186), False, 'import utility\n'), ((1108, 1123), 'timeit.default_timer', 'default_timer', ([], {}), '()\n', (1121, 11...
import boto3 exceptions = boto3.client('elb').exceptions AccessPointNotFoundException = exceptions.AccessPointNotFoundException CertificateNotFoundException = exceptions.CertificateNotFoundException DependencyThrottleException = exceptions.DependencyThrottleException DuplicateAccessPointNameException = exceptions.Dup...
[ "boto3.client" ]
[((27, 46), 'boto3.client', 'boto3.client', (['"""elb"""'], {}), "('elb')\n", (39, 46), False, 'import boto3\n')]
# import os # # # path = '/home/yangyang/yangyang/DATA/gxw/dataset/DOTA_split/train' # # label_file_name = 'labelTxt' # # path = '/home/yangyang/yangyang/DATA/gxw/dataset/DOTA_demo/VOC2012' # label_file_name = 'Annotations' # # label_file_path = os.path.join(path, label_file_name) # filelist = os.listdir(label_file_pat...
[ "os.path.join", "os.listdir" ]
[((653, 680), 'os.listdir', 'os.listdir', (['label_file_path'], {}), '(label_file_path)\n', (663, 680), False, 'import os\n'), ((716, 746), 'os.path.join', 'os.path.join', (['path', '"""test.txt"""'], {}), "(path, 'test.txt')\n", (728, 746), False, 'import os\n')]
from pywire.signal import Signal from tkinter import * from tkinter.ttk import Separator from enum import Enum class BitState(Enum): TRUE = 1 FALSE = 2 TRUE_FORCED = 3 FALSE_FORCED = 4 UNDEFINED = 5 def bitsToInt(bit_array): for bit in bit_array: if bit.state == BitState.UNDEFINED: ...
[ "tkinter.ttk.Separator" ]
[((2652, 2690), 'tkinter.ttk.Separator', 'Separator', (['master'], {'orient': '"""horizontal"""'}), "(master, orient='horizontal')\n", (2661, 2690), False, 'from tkinter.ttk import Separator\n')]
# Copyright 2020, The TensorFlow 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 t...
[ "tensorflow.test.main", "functools.partial", "tensorflow.feature_column.numeric_column", "tensorflow_privacy.privacy.estimators.test_utils.make_input_fn", "tensorflow_privacy.privacy.estimators.test_utils.make_input_data", "tensorflow_privacy.privacy.estimators.v1.dnn.DNNClassifier", "absl.testing.param...
[((1157, 1263), 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (["('BinaryClassDNN', 2)", "('MultiClassDNN 3', 3)", "('MultiClassDNN 4', 4)"], {}), "(('BinaryClassDNN', 2), ('MultiClassDNN 3', 3\n ), ('MultiClassDNN 4', 4))\n", (1187, 1263), False, 'from absl.testing import paramete...
import unittest from numpy import hstack, max, abs, sqrt from cantera import Solution, gas_constant import numpy as np from spitfire import ChemicalMechanismSpec from os.path import join, abspath from subprocess import getoutput test_mech_directory = abspath(join('tests', 'test_mechanisms', 'old_xmls')) mechs = [x.rep...
[ "unittest.main", "spitfire.ChemicalMechanismSpec", "numpy.sum", "numpy.abs", "numpy.copy", "numpy.empty", "numpy.zeros", "numpy.ones", "numpy.hstack", "numpy.finfo", "cantera.Solution", "subprocess.getoutput", "os.path.join" ]
[((260, 304), 'os.path.join', 'join', (['"""tests"""', '"""test_mechanisms"""', '"""old_xmls"""'], {}), "('tests', 'test_mechanisms', 'old_xmls')\n", (264, 304), False, 'from os.path import join, abspath\n'), ((809, 829), 'numpy.copy', 'np.copy', (['rhs_chem_in'], {}), '(rhs_chem_in)\n', (816, 829), True, 'import numpy...
from django import forms from django.forms import ModelForm from django.conf import settings from members.models import User from .models import Unknowntag class SelectUserForm(forms.Form): user = forms.ModelChoiceField(queryset=User.objects.all()) activate_doors = forms.BooleanField(initial = True, help_text...
[ "django.forms.BooleanField", "members.models.User.objects.all" ]
[((276, 388), 'django.forms.BooleanField', 'forms.BooleanField', ([], {'initial': '(True)', 'help_text': '"""Also give this user door permits if they did not have it yet."""'}), "(initial=True, help_text=\n 'Also give this user door permits if they did not have it yet.')\n", (294, 388), False, 'from django import fo...
from storage_bucket.bucket import get_bucket def upload_file( *, file_content: bytes, storage_bucket_name: str, filename: str, content_type: str = 'application/octet-stream', **kwargs: dict, ) -> None: """ Upload content of file_data to a google cloud storage bucket. .. versionadd...
[ "storage_bucket.bucket.get_bucket" ]
[((720, 771), 'storage_bucket.bucket.get_bucket', 'get_bucket', ([], {'storage_bucket_name': 'storage_bucket_name'}), '(storage_bucket_name=storage_bucket_name)\n', (730, 771), False, 'from storage_bucket.bucket import get_bucket\n')]
import pytest import test.mock_data_gateway from blades_helper.mission_generator import _get_next_mission_type, _can_use_mission_type, _generate_base_missions from blades_helper.mission_generator_constants import MissionGeneratorConstants as con def setup_one_mission_base_build(mock, note, type): mock.mission_coun...
[ "pytest.raises", "blades_helper.mission_generator._can_use_mission_type", "blades_helper.mission_generator._generate_base_missions", "blades_helper.mission_generator._get_next_mission_type" ]
[((2326, 2375), 'blades_helper.mission_generator._can_use_mission_type', '_can_use_mission_type', (['con.SPECIAL', '[con.SPECIAL]'], {}), '(con.SPECIAL, [con.SPECIAL])\n', (2347, 2375), False, 'from blades_helper.mission_generator import _get_next_mission_type, _can_use_mission_type, _generate_base_missions\n'), ((2387...
from typing import Any, List from app.schemas.category import CategoryResponse from fastapi import APIRouter, Depends, status, HTTPException from sqlalchemy.orm import Session from app import crud, schemas from app.api import deps router = APIRouter() @router.get( "/", response_model=List[schemas.CategoryRespo...
[ "app.crud.create_category", "app.crud.get_category_by_name", "fastapi.HTTPException", "app.crud.read_categories", "fastapi.Depends", "fastapi.APIRouter" ]
[((243, 254), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (252, 254), False, 'from fastapi import APIRouter, Depends, status, HTTPException\n'), ((398, 418), 'fastapi.Depends', 'Depends', (['deps.get_db'], {}), '(deps.get_db)\n', (405, 418), False, 'from fastapi import APIRouter, Depends, status, HTTPException\...
"""Minimal example dumping whatever event it receives.""" import time import logging import argparse from proglove_streams.logging import init_logging from proglove_streams.client import Client from proglove_streams.gateway import Gateway, GatewayMessageHandler from proglove_streams.exception import ProgloveStreamsExc...
[ "logging.error", "argparse.ArgumentParser", "proglove_streams.gateway.GatewayMessageHandler", "time.sleep", "proglove_streams.gateway.Gateway", "logging.getLogger" ]
[((647, 674), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (664, 674), False, 'import logging\n'), ((4077, 4120), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""proglove_streams"""'], {}), "('proglove_streams')\n", (4100, 4120), False, 'import argparse\n'), ((4922, 5158), '...
""" Add an owner to a resource or resources Usage: add_owner {username} {resource list} """ from django.core.management.base import BaseCommand from django.contrib.auth.models import User from hs_core.models import BaseResource from hs_core.hydroshare.utils import get_resource_by_shortkey from hs_access_control.model...
[ "hs_core.models.BaseResource.objects.filter", "django.contrib.auth.models.User.objects.get", "hs_access_control.models.privilege.UserResourcePrivilege.share", "django.db.transaction.atomic", "hs_core.hydroshare.utils.get_resource_by_shortkey" ]
[((2177, 2224), 'django.contrib.auth.models.User.objects.get', 'User.objects.get', ([], {'username': "options['new_owner']"}), "(username=options['new_owner'])\n", (2193, 2224), False, 'from django.contrib.auth.models import User\n'), ((2241, 2275), 'django.contrib.auth.models.User.objects.get', 'User.objects.get', ([]...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test Primitive Data Real ------------------------ """ import unittest import struct import math from bacpypes.debugging import bacpypes_debugging, ModuleLogger, xtob from bacpypes.errors import InvalidTag from bacpypes.primitivedata import Real, Tag # some debuggin...
[ "bacpypes.primitivedata.Tag", "bacpypes.primitivedata.Real", "math.isnan", "bacpypes.debugging.xtob" ]
[((520, 527), 'bacpypes.debugging.xtob', 'xtob', (['x'], {}), '(x)\n', (524, 527), False, 'from bacpypes.debugging import bacpypes_debugging, ModuleLogger, xtob\n'), ((819, 824), 'bacpypes.primitivedata.Tag', 'Tag', ([], {}), '()\n', (822, 824), False, 'from bacpypes.primitivedata import Real, Tag\n'), ((1101, 1110), '...
import matplotlib, numpy, pprint # matplotlib.rcParams['pdf.fonttype'] = 42 # matplotlib.rcParams['ps.fonttype'] = 42 matplotlib.use('Agg') import matplotlib.pyplot as plot import gzip, csv, pylab from collections import namedtuple from rvs import * from patch import * """ task events table contains the following fie...
[ "matplotlib.pyplot.yscale", "csv.reader", "matplotlib.pyplot.step", "matplotlib.pyplot.figure", "numpy.mean", "numpy.arange", "matplotlib.pyplot.gca", "csv.writer", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend", "numpy.sort", "matplotlib.use", "matplotlib.pyplot.ylabel", "matplotlib...
[((118, 139), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (132, 139), False, 'import matplotlib, numpy, pprint\n'), ((2584, 2613), 'csv.writer', 'csv.writer', (['wf'], {'delimiter': '""","""'}), "(wf, delimiter=',')\n", (2594, 2613), False, 'import gzip, csv, pylab\n'), ((4766, 4794), 'collect...
#!/usr/bin/env python # -*-Python-*- import argparse import contextlib import datetime import ftplib import os import re import subprocess import tempfile def get_valid_filename(s): """ Return the given string converted to a string that can be used for a clean filename. Remove leading and trailing spaces...
[ "subprocess.Popen", "os.path.join", "os.path.basename", "contextlib.suppress", "datetime.datetime.now", "tempfile.TemporaryFile", "datetime.datetime.strptime", "datetime.timedelta", "ftplib.FTP", "os.path.expanduser", "re.sub" ]
[((588, 617), 're.sub', 're.sub', (['"""(?u)[^-\\\\w.]"""', '""""""', 's'], {}), "('(?u)[^-\\\\w.]', '', s)\n", (594, 617), False, 'import re\n'), ((2695, 2718), 'os.path.basename', 'os.path.basename', (['fname'], {}), '(fname)\n', (2711, 2718), False, 'import os\n'), ((2815, 2845), 'ftplib.FTP', 'ftplib.FTP', (['base_...
import glob from pathlib import Path from typing import List, Union ARCHIVE_EXTENSIONS = ['tar'] IMG_EXTENSIONS = ['jpeg', 'jpg', 'bmp', 'png'] VID_EXTENSIONS = ['mp4', 'avi', 'mov', 'mkv', 'mts', 'ts', 'webm'] def normalize_path(path: Union[str, Path]) -> Path: return Path(path).expanduser().resolve() def fi...
[ "pathlib.Path", "glob.glob" ]
[((682, 691), 'pathlib.Path', 'Path', (['dir'], {}), '(dir)\n', (686, 691), False, 'from pathlib import Path\n'), ((778, 816), 'glob.glob', 'glob.glob', (['search_path'], {'recursive': '(True)'}), '(search_path, recursive=True)\n', (787, 816), False, 'import glob\n'), ((893, 932), 'glob.glob', 'glob.glob', (['search_pa...
from bluetooth import * from time import sleep import re, uuid devices = set() devices_to_update = set() dev_mac = ':'.join(re.findall('..', '%012x' % uuid.getnode())).upper() print(dev_mac) def enable_ble(): print('enabling bluetooth') try: os.system('sudo systemctl start bluetooth.service && sudo ...
[ "uuid.getnode", "time.sleep" ]
[((2263, 2271), 'time.sleep', 'sleep', (['(5)'], {}), '(5)\n', (2268, 2271), False, 'from time import sleep\n'), ((153, 167), 'uuid.getnode', 'uuid.getnode', ([], {}), '()\n', (165, 167), False, 'import re, uuid\n')]
from functools import wraps from pastry.models import User from flask import request, abort, jsonify def parse_api_key(): key = None if request.args.get('api_key'): key = request.args.get('api_key') elif request.form.get('api_key'): key = request.form.get('api_key') return key def lo...
[ "flask.request.args.get", "flask.request.headers.get", "flask.request.form.get", "pastry.models.User.verify_auth_token", "flask.abort", "flask.jsonify", "pastry.models.User.verify_api_key", "functools.wraps" ]
[((146, 173), 'flask.request.args.get', 'request.args.get', (['"""api_key"""'], {}), "('api_key')\n", (162, 173), False, 'from flask import request, abort, jsonify\n'), ((342, 350), 'functools.wraps', 'wraps', (['f'], {}), '(f)\n', (347, 350), False, 'from functools import wraps\n'), ((189, 216), 'flask.request.args.ge...
"""Draw a imdt calendar image.""" from contextlib import contextmanager from functools import partial from imperial_calendar import GregorianDateTime, ImperialDateTime, ImperialYearMonth from imperial_calendar.transform import ( grdt_to_juld, imdt_to_imsn, imsn_to_imdt, imsn_to_mrsd, juld_to_grdt, ...
[ "functools.partial", "imperial_calendar.transform.imsn_to_mrsd", "imperial_calendar.transform.mrsd_to_tert", "imperial_calendar.transform.mrsd_to_imsn", "xml.etree.ElementTree.Element", "imperial_calendar.ImperialDateTime", "imperial_calendar.transform.tert_to_mrsd", "imperial_calendar.transform.juld_...
[((1404, 1422), 'imperial_calendar.transform.juld_to_tert', 'juld_to_tert', (['juld'], {}), '(juld)\n', (1416, 1422), False, 'from imperial_calendar.transform import grdt_to_juld, imdt_to_imsn, imsn_to_imdt, imsn_to_mrsd, juld_to_grdt, juld_to_tert, mrsd_to_imsn, mrsd_to_tert, tert_to_juld, tert_to_mrsd\n'), ((1434, 14...
""" NamedConf parser - file ``/etc/named.conf`` =========================================== NamedConf parser the file named configuration file. Named is a name server used by BIND. """ from insights.specs import Specs from insights.core.plugins import parser from insights.parsers import SkipException from insights.pa...
[ "insights.core.plugins.parser", "insights.parsers.SkipException" ]
[((367, 391), 'insights.core.plugins.parser', 'parser', (['Specs.named_conf'], {}), '(Specs.named_conf)\n', (373, 391), False, 'from insights.core.plugins import parser\n'), ((1395, 1445), 'insights.parsers.SkipException', 'SkipException', (['"""Syntax error of include directive"""'], {}), "('Syntax error of include di...
from readwrite import get_data import pandas as pd import matplotlib.pyplot as plt from scipy.stats import gaussian_kde import numpy as np def scatter(path, name): data = get_data(path) pd_data = pd.DataFrame(data) plt.title("column 0 " + name) plt.plot(pd_data[0]) plt.show() plt.title("column 1 " + name) plt...
[ "pandas.DataFrame", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.boxplot", "scipy.stats.gaussian_kde", "numpy.linspace", "readwrite.get_data" ]
[((173, 187), 'readwrite.get_data', 'get_data', (['path'], {}), '(path)\n', (181, 187), False, 'from readwrite import get_data\n'), ((199, 217), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (211, 217), True, 'import pandas as pd\n'), ((220, 249), 'matplotlib.pyplot.title', 'plt.title', (["('column 0 ...
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. import onnx from onnx import helper, TensorProto QUERY_TENSOR = helper.make_tensor_value_info('query_tensor', TensorProto.FLOAT, ['batch', 4]) ATTRIBUTE_TENSOR = helper.make_tensor_value_info('attribute_tensor', Ten...
[ "onnx.helper.make_node", "onnx.save", "onnx.helper.make_tensor_value_info", "onnx.OperatorSetIdProto", "onnx.helper.make_graph" ]
[((169, 247), 'onnx.helper.make_tensor_value_info', 'helper.make_tensor_value_info', (['"""query_tensor"""', 'TensorProto.FLOAT', "['batch', 4]"], {}), "('query_tensor', TensorProto.FLOAT, ['batch', 4])\n", (198, 247), False, 'from onnx import helper, TensorProto\n'), ((267, 343), 'onnx.helper.make_tensor_value_info', ...
import time current_time = time.localtime() hour = current_time.tm_hour print('The hour is', hour)
[ "time.localtime" ]
[((28, 44), 'time.localtime', 'time.localtime', ([], {}), '()\n', (42, 44), False, 'import time\n')]
from datetime import timedelta DEFAULT_REQUIRED_CONFIRMATIONS: int = 10 MAX_FILTER_INTERVAL: int = 100_000 DEFAULT_GAS_BUFFER_FACTOR: int = 10 DEFAULT_GAS_CHECK_BLOCKS: int = 100 KEEP_MRS_WITHOUT_CHANNEL: timedelta = timedelta(minutes=15) # A LockedTransfer message is roughly 1kb. Having 1000/min = 17/sec will be # h...
[ "datetime.timedelta" ]
[((218, 239), 'datetime.timedelta', 'timedelta', ([], {'minutes': '(15)'}), '(minutes=15)\n', (227, 239), False, 'from datetime import timedelta\n'), ((550, 570), 'datetime.timedelta', 'timedelta', ([], {'minutes': '(5)'}), '(minutes=5)\n', (559, 570), False, 'from datetime import timedelta\n')]
import re # TO-DO: refactor validators as below # https://pydantic-docs.helpmanual.io/usage/validators/ # Email regex mostly following RFC2822 specification. Covers ~99% of emails in use today # Allows groups of alphanumerics and some special characters separated by dots, # followed by a @, # followed by groups of al...
[ "re.compile" ]
[((402, 561), 're.compile', 're.compile', (['"""[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"""'], {}), '(\n "[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+...
#!/usr/bin/env python """ # Author: <NAME> # Created Time : Tue 29 Sep 2020 01:41:23 PM CST # File Name: function.py # Description: """ import torch import numpy as np import os import scanpy as sc from anndata import AnnData from .data import load_data from .net.vae import VAE from .net.utils import EarlyStopping ...
[ "scanpy.tl.umap", "numpy.random.seed", "os.makedirs", "torch.manual_seed", "torch.load", "scanpy.pp.neighbors", "scanpy.read_h5ad", "scanpy.pl.umap", "torch.save", "scanpy.tl.leiden", "sklearn.neighbors.KNeighborsClassifier", "torch.cuda.is_available", "torch.cuda.set_device", "anndata.Ann...
[((3790, 3810), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (3804, 3810), True, 'import numpy as np\n'), ((3822, 3845), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (3839, 3845), False, 'import torch\n'), ((3854, 3879), 'torch.cuda.is_available', 'torch.cuda.is_available'...
from vyperlogix.hash import lists code_error = -404 code_noUpdate = -100 code_isUpdate = 400 code_revoked = -500 code_updated = 100 code_accepted = 200 code_valid = 300 code_invalid = -301 _info_site_address = 'www.VyperLogix.com' d_responses = lists.HashedLists2({code_error:'Warning: Unable to process your Registra...
[ "vyperlogix.hash.lists.HashedLists2" ]
[((248, 979), 'vyperlogix.hash.lists.HashedLists2', 'lists.HashedLists2', (["{code_error: 'Warning: Unable to process your Registration.', code_invalid:\n 'Your registration is not valid. Please make sure your payment has processed.'\n , code_noUpdate: 'You have the latest version.', code_revoked:\n 'Your prod...
import os from distutils.core import setup from setuptools import find_packages, setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def requirements(fname): for line in open(os.path.join(os.path.dirname(__file__), fname)): yield line.strip() setup( name=...
[ "os.path.dirname", "setuptools.find_packages" ]
[((431, 446), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (444, 446), False, 'from setuptools import find_packages, setup\n'), ((239, 264), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (254, 264), False, 'import os\n'), ((136, 161), 'os.path.dirname', 'os.path.dirname', (...
# Generated by Django 2.2.13 on 2020-10-25 12:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stream', '0002_viewcounter_name'), ] operations = [ migrations.AlterField( model_name='view', name='token', ...
[ "django.db.models.CharField" ]
[((331, 375), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(20)', 'unique': '(True)'}), '(max_length=20, unique=True)\n', (347, 375), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Apr 10 14:19:04 2020 @author: corkep """ import numpy as np import numpy.testing as nt import unittest from math import pi import math from scipy.linalg import logm, expm from spatialmath.base.transformsNd import * from spatialmath.base.transforms3d ...
[ "unittest.main", "spatialmath.base.transforms3d.rotx", "spatialmath.base.transforms2d.ishom2", "spatialmath.base.transforms2d.isrot2", "numpy.testing.assert_almost_equal", "spatialmath.base.transforms2d.rot2", "numpy.zeros", "spatialmath.base.transforms3d.isrot", "spatialmath.base.transforms2d.trot2...
[((10322, 10337), 'unittest.main', 'unittest.main', ([], {}), '()\n', (10335, 10337), False, 'import unittest\n'), ((994, 1003), 'spatialmath.base.transforms3d.rotx', 'rotx', (['(0.3)'], {}), '(0.3)\n', (998, 1003), False, 'from spatialmath.base.transforms3d import trotx, transl, rotx, isrot, ishom\n'), ((1031, 1086), ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 27 16:40:49 2020 @author: krugefr1 """ import numpy as np import os try: import arthor except ImportError: arthor = None from rdkit import Chem from rdkit.Chem import rdSubstructLibrary import pickle import random import pandas as pd import...
[ "rdkit.Chem.PatternFingerprint", "os.mkdir", "pickle.dump", "numpy.argmax", "rdkit.Chem.MolToSmiles", "pandas.DataFrame", "os.path.exists", "random.seed", "rdkit.Chem.rdSubstructLibrary.PatternHolder", "copy.deepcopy", "automated_series_classification.Butinaclustering.ApplyButina", "automated_...
[((1502, 1653), 'automated_series_classification.utilsDataPrep.PrepareData', 'utilsDataPrep.PrepareData', (['self.proj', 'self.datapath', 'filename'], {'distMeasure': '"""Tanimoto"""', 'FP': '"""Morgan2"""', 'calcDists': 'self.calcDists', 'smilesCol': 'smilesCol'}), "(self.proj, self.datapath, filename, distMeasure=\n ...
import openliveq as olq import pytest import os from .test_base import TestBase class TestCollection(TestBase): def test_df(self, c): result = c.df assert result["社会保険事務所"] == 1 assert result["国民年金"] == 4 def test_cf(self, c): result = c.cf assert result["社会保険事務所"] > 1 ...
[ "openliveq.Collection", "openliveq.FeatureFactory" ]
[((427, 443), 'openliveq.Collection', 'olq.Collection', ([], {}), '()\n', (441, 443), True, 'import openliveq as olq\n'), ((583, 603), 'openliveq.FeatureFactory', 'olq.FeatureFactory', ([], {}), '()\n', (601, 603), True, 'import openliveq as olq\n')]
# Copyright (c) 2010 Resolver Systems Ltd. # All Rights Reserved # try: import unittest2 as unittest except ImportError: import unittest from functionaltest import FunctionalTest import key_codes from textwrap import dedent class Test_2734_ClearCells(FunctionalTest): def test_delete_key_clears_selected...
[ "textwrap.dedent" ]
[((3424, 3819), 'textwrap.dedent', 'dedent', (['"""\n worksheet.a1.error = \'harold puts a deliberate pointless error in\'\n\n worksheet.a1.clear()\n\n worksheet.b1.formula = str(worksheet.a1.value)\n worksheet.b2.formula = str(worksheet.a1.formula)\n worksheet.b3....
""" Helper script to create config files for BlenderProc. """ import os import yaml import random import numpy as np import binascii # these paths have to be manually set before creating a config BLENDERPROC_ROOT = '' # /path/to/BlenderProc SHAPENET_ROOT = '' # /path/to/ShapeNetCore.v2 SUNCG_ROOT = '' # /path/to/s...
[ "numpy.random.uniform", "yaml.load", "os.makedirs", "binascii.hexlify", "yaml.dump", "random.choice", "numpy.random.randint", "os.path.join", "os.urandom" ]
[((7027, 7051), 'numpy.random.randint', 'np.random.randint', (['(5)', '(12)'], {}), '(5, 12)\n', (7044, 7051), True, 'import numpy as np\n'), ((8462, 8476), 'os.urandom', 'os.urandom', (['(20)'], {}), '(20)\n', (8472, 8476), False, 'import os\n'), ((8497, 8528), 'binascii.hexlify', 'binascii.hexlify', (['output_prefix'...
import sys sys.setrecursionlimit(10000000) class LowestCommonAncedtor: def __init__(self, G, root): self.n = len(G) self.tour = [0] * (2 * self.n - 1) self.depth_list = [0] * (2 * self.n - 1) self.id = [0] * self.n self.visit_id = 0 self.dfs(G, root, -1, 0) ...
[ "sys.setrecursionlimit" ]
[((12, 43), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10000000)'], {}), '(10000000)\n', (33, 43), False, 'import sys\n')]
import h5py import numpy as np def load_data(fname): # load in an hdf5 file and return the X and y values data_file = h5py.File(fname) # load in X and y training data, fully into memory X = data_file['X'][:].reshape(-1, 1) # each row is a data point y = data_file['y'][:] return X, y def eval...
[ "h5py.File", "numpy.abs" ]
[((127, 143), 'h5py.File', 'h5py.File', (['fname'], {}), '(fname)\n', (136, 143), False, 'import h5py\n'), ((395, 418), 'numpy.abs', 'np.abs', (['(y_pred - y_true)'], {}), '(y_pred - y_true)\n', (401, 418), True, 'import numpy as np\n')]
import sys import os import urllib.parse import urllib.request import xml.etree.ElementTree as ET import shutil import sqlite3 def fetch_database(filename): r = urllib.request.urlopen('https://nzsl-assets.vuw.ac.nz/dnzsl/freelex/publicsearch?xmldump=1') with open(filename, "wb") as f: f.write(r.read())...
[ "os.makedirs", "os.unlink", "os.path.isdir", "os.rename", "os.path.dirname", "os.path.exists", "os.system", "os.path.isfile", "sqlite3.connect", "shutil.rmtree", "os.path.join" ]
[((3322, 3347), 'os.path.exists', 'os.path.exists', (['"""nzsl.db"""'], {}), "('nzsl.db')\n", (3336, 3347), False, 'import os\n'), ((3387, 3413), 'sqlite3.connect', 'sqlite3.connect', (['"""nzsl.db"""'], {}), "('nzsl.db')\n", (3402, 3413), False, 'import sqlite3\n'), ((3916, 3939), 'os.path.isdir', 'os.path.isdir', (['...
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='tweet analyzer', author='<NAME>', license='', )
[ "setuptools.find_packages" ]
[((81, 96), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (94, 96), False, 'from setuptools import find_packages, setup\n')]
import time import logging import cv2 import numpy as np from deep_sort_realtime.deep_sort import nn_matching from deep_sort_realtime.deep_sort.detection import Detection from deep_sort_realtime.deep_sort.tracker import Tracker from deep_sort_realtime.utils.nms import non_max_suppression log_level = logging.DEBUG d...
[ "deep_sort_realtime.deep_sort.tracker.Tracker", "deep_sort_realtime.utils.nms.non_max_suppression", "cv2.bitwise_and", "deep_sort_realtime.deep_sort.detection.Detection", "logging.StreamHandler", "numpy.zeros", "cv2.fillPoly", "logging.Formatter", "deep_sort_realtime.embedder.embedder_pytorch.Mobile...
[((336, 365), 'logging.getLogger', 'logging.getLogger', (['"""DeepSORT"""'], {}), "('DeepSORT')\n", (353, 365), False, 'import logging\n'), ((411, 434), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (432, 434), False, 'import logging\n'), ((475, 534), 'logging.Formatter', 'logging.Formatter', (['"...
import pymysql conn = pymysql.connect(host='127.0.0.1', user='root', passwd='<PASSWORD>', db='all0504') def get_user_set(): user_set = set() with open('../facebook/KOL_audience') as input_user_file: for line in input_user_file: if line.strip() == '': continue ...
[ "pymysql.connect" ]
[((23, 109), 'pymysql.connect', 'pymysql.connect', ([], {'host': '"""127.0.0.1"""', 'user': '"""root"""', 'passwd': '"""<PASSWORD>"""', 'db': '"""all0504"""'}), "(host='127.0.0.1', user='root', passwd='<PASSWORD>', db=\n 'all0504')\n", (38, 109), False, 'import pymysql\n')]
import pytest from cutadapt.__main__ import main, parse_cutoffs, parse_lengths, CommandLineError, setup_logging def test_help(): with pytest.raises(SystemExit) as e: main(["--help"]) assert e.value.args[0] == 0 def test_parse_cutoffs(): assert parse_cutoffs("5") == (0, 5) assert parse_cutof...
[ "cutadapt.__main__.parse_cutoffs", "cutadapt.__main__.main", "cutadapt.__main__.parse_lengths", "pytest.raises", "cutadapt.__main__.setup_logging", "logging.getLogger" ]
[((1244, 1271), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1261, 1271), False, 'import logging\n'), ((1276, 1363), 'cutadapt.__main__.setup_logging', 'setup_logging', (['logger'], {'log_to_stderr': '(False)', 'quiet': '(False)', 'minimal': '(False)', 'debug': '(False)'}), '(logger, l...
from pdf417 import encode, render_image, render_svg import io class BarcodeGen(): #OWN CLASS - BarcodeGen def generateBarcode(self, text): codes = encode(text, columns=7, security_level=4) image = render_image(codes, scale=4, ratio=3, fg_color="black", bg_color="#FFFFFF") image.show() def generateBarcodeForW...
[ "pdf417.render_image", "pdf417.encode" ]
[((152, 193), 'pdf417.encode', 'encode', (['text'], {'columns': '(7)', 'security_level': '(4)'}), '(text, columns=7, security_level=4)\n', (158, 193), False, 'from pdf417 import encode, render_image, render_svg\n'), ((204, 279), 'pdf417.render_image', 'render_image', (['codes'], {'scale': '(4)', 'ratio': '(3)', 'fg_col...
import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.style.use('seaborn-deep') # Importing the dataset dataset = pd.read_csv('Salary_Data.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, 1].values # Training/testing from sklearn.model_selection import train_test_split X_train, X_test,...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "pandas.read_csv", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.scatter", "sklearn.linear_model.LinearRegression", "matplotlib.pyplot.style.use", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((71, 100), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""seaborn-deep"""'], {}), "('seaborn-deep')\n", (84, 100), True, 'import matplotlib.pyplot as plt\n'), ((137, 167), 'pandas.read_csv', 'pd.read_csv', (['"""Salary_Data.csv"""'], {}), "('Salary_Data.csv')\n", (148, 167), True, 'import pandas as pd\n'), ((3...
"""Generated client library for firestore version v1beta1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from googlecloudsdk.third_party.apis.firestore.v1beta1 import firestore_v1beta1_messages as messages class FirestoreV1beta1(base_api.BaseApiClient): ...
[ "apitools.base.py.base_api.ApiMethodInfo" ]
[((2906, 3458), 'apitools.base.py.base_api.ApiMethodInfo', 'base_api.ApiMethodInfo', ([], {'flat_path': 'u"""v1beta1/projects/{projectsId}/databases/{databasesId}/documents:batchGet"""', 'http_method': 'u"""POST"""', 'method_id': 'u"""firestore.projects.databases.documents.batchGet"""', 'ordered_params': "[u'database']...
from django.conf.urls import url from .views import (subjectpool_index, manage_experiment_session, get_session_events, manage_participant_attendance, send_invitations, get_invitations_count, invite_email_preview, experiment_session_signup, submit_experiment_session_signup, cance...
[ "django.conf.urls.url" ]
[((436, 490), 'django.conf.urls.url', 'url', (['"""^$"""', 'subjectpool_index'], {'name': '"""subjectpool_index"""'}), "('^$', subjectpool_index, name='subjectpool_index')\n", (439, 490), False, 'from django.conf.urls import url\n'), ((497, 603), 'django.conf.urls.url', 'url', (['"""^session/manage/(?P<pk>\\\\-?\\\\d+)...
import math from vectors import Vector2 from vectors import Vector3 def get_car_facing_vector(car): pitch = float(car.rotation.pitch) yaw = float(car.rotation.yaw) facing_x = math.cos(pitch) * math.cos(yaw) facing_y = math.cos(pitch) * math.sin(yaw) return Vector2(facing_x, facing_y) def get_own...
[ "math.exp", "vectors.Vector2", "math.radians", "math.sin", "math.cos", "math.degrees", "vectors.Vector3" ]
[((280, 307), 'vectors.Vector2', 'Vector2', (['facing_x', 'facing_y'], {}), '(facing_x, facing_y)\n', (287, 307), False, 'from vectors import Vector2\n'), ((479, 519), 'vectors.Vector3', 'Vector3', (['field_info.goals[team].location'], {}), '(field_info.goals[team].location)\n', (486, 519), False, 'from vectors import ...
import cv2 import os import numpy as np from PIL import Image import picamera.array from picamera import PiCamera class Face(object): training_count = 5 threshold = 30 def __init__(self, casc_path, path="./passwords", camera_port=0): self.path = path self._cascade = cv2.CascadeClassifi...
[ "cv2.cv.cvtColor", "cv2.imwrite", "PIL.Image.open", "cv2.face.createLBPHFaceRecognizer", "numpy.array", "cv2.CascadeClassifier", "cv2.destroyAllWindows", "os.path.join", "os.listdir", "picamera.PiCamera" ]
[((301, 333), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['casc_path'], {}), '(casc_path)\n', (322, 333), False, 'import cv2\n'), ((399, 422), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n', (420, 422), False, 'import cv2\n'), ((2335, 2370), 'cv2.face.createLBPHFaceRecognizer', 'cv2.face.cre...
# -*- coding: utf-8 -*- ''' Mrknow TV Add-on Copyright (C) 2016 mrknow This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) an...
[ "resources.lib.lib.control.setting", "resources.lib.lib.control.log", "json.loads", "resources.lib.lib.control.addonInfo", "resources.lib.lib.control.lang", "resources.lib.lib.control.get_setting", "datetime.datetime.now", "time.sleep", "urlparse.urljoin", "datetime.timedelta", "urllib.urlencode...
[((4747, 4785), 'resources.lib.lib.control.setting', 'control.setting', (['"""pierwszatv.password"""'], {}), "('pierwszatv.password')\n", (4762, 4785), False, 'from resources.lib.lib import control\n'), ((1075, 1118), 'urlparse.urljoin', 'urlparse.urljoin', (['"""http://pierwsza.tv"""', 'url'], {}), "('http://pierwsza....
# Generated by Django 3.2.11 on 2022-02-02 01:04 import django.contrib.gis.db.models.fields from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Property', fiel...
[ "django.db.models.BigAutoField", "django.db.models.PositiveIntegerField", "django.db.models.CharField" ]
[((348, 444), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (367, 444), False, 'from django.db import migrations, m...
#!/usr/bin/env python import requests import re import sys import dlrnapi_client import influxdb_utils import json from promoter_utils import get_dlrn_instance_for_release from diskcache import Cache cache = Cache('/tmp/skipped_promotions_cache') cache.expire() promoter_skipping_regex = re.compile( ('.*promoter ...
[ "promoter_utils.get_dlrn_instance_for_release", "influxdb_utils.format_ts_from_str", "dlrnapi_client.Params2", "diskcache.Cache", "re.compile" ]
[((210, 248), 'diskcache.Cache', 'Cache', (['"""/tmp/skipped_promotions_cache"""'], {}), "('/tmp/skipped_promotions_cache')\n", (215, 248), False, 'from diskcache import Cache\n'), ((291, 401), 're.compile', 're.compile', (['""".*promoter Skipping promotion of (.*) from (.*) to (.*), missing successful jobs: (.*)"""'],...
from __future__ import print_function import argparse import os import csv import numpy as np import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader from data_utils.data_util import PointcloudScaleAndTran...
[ "os.mkdir", "torch.optim.lr_scheduler.StepLR", "argparse.ArgumentParser", "numpy.argmax", "models.rscnn.RSCNN", "data_utils.ModelNetDataLoader.ModelNetDataLoader", "models.pointnet.PointNetCls", "sys.path.append", "models.pointnet2.PointNet2ClsMsg", "random.randint", "torch.utils.data.DataLoader...
[((637, 662), 'sys.path.append', 'sys.path.append', (['"""./emd/"""'], {}), "('./emd/')\n", (652, 662), False, 'import sys\n'), ((882, 905), 'os.path.exists', 'os.path.exists', (['logname'], {}), '(logname)\n', (896, 905), False, 'import os\n'), ((4609, 4634), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], ...
import random from flask import Flask app = Flask(__name__) @app.route('/') def index(): a = random.randrange(1, 10) b = random.randrange(1, 10) return f'{a} * {b} = {a * b}'
[ "flask.Flask", "random.randrange" ]
[((46, 61), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (51, 61), False, 'from flask import Flask\n'), ((101, 124), 'random.randrange', 'random.randrange', (['(1)', '(10)'], {}), '(1, 10)\n', (117, 124), False, 'import random\n'), ((133, 156), 'random.randrange', 'random.randrange', (['(1)', '(10)'], {}...
"""Generate a summary of a previously trained vowel recognition model. """ import torch import wavetorch import argparse import yaml import os import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl try: from helpers.plot import mpl_set_latex mpl_set_latex() except ImportError: impor...
[ "matplotlib.ticker.MultipleLocator", "matplotlib.pyplot.show", "argparse.ArgumentParser", "torch.manual_seed", "yaml.dump", "wavetorch.io.load_model", "wavetorch.data.load_all_vowels", "helpers.plot.mpl_set_latex", "wavetorch.data.select_vowel_sample", "matplotlib.pyplot.figure", "matplotlib.tic...
[((457, 482), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (480, 482), False, 'import argparse\n'), ((275, 290), 'helpers.plot.mpl_set_latex', 'mpl_set_latex', ([], {}), '()\n', (288, 290), False, 'from helpers.plot import mpl_set_latex\n'), ((974, 1012), 'wavetorch.io.load_model', 'wavetorch...
import math import numpy as np import torch import torch.nn as nn import itertools class FuzzyLayer(nn.Module): def __init__(self, fuzzynum,channel): super(FuzzyLayer,self).__init__() self.n = fuzzynum self.channel = channel self.conv1 = nn.Conv2d(self.channel,1,3,padding=1) self.conv2 = nn.Conv2d(1,self.c...
[ "torch.nn.ReLU", "torch.nn.ConvTranspose2d", "math.sqrt", "torch.nn.Conv2d", "torch.randn", "torch.exp", "torch.nn.BatchNorm2d", "torch.nn.MaxPool2d" ]
[((249, 289), 'torch.nn.Conv2d', 'nn.Conv2d', (['self.channel', '(1)', '(3)'], {'padding': '(1)'}), '(self.channel, 1, 3, padding=1)\n', (258, 289), True, 'import torch.nn as nn\n'), ((302, 342), 'torch.nn.Conv2d', 'nn.Conv2d', (['(1)', 'self.channel', '(3)'], {'padding': '(1)'}), '(1, self.channel, 3, padding=1)\n', (...
import argparse import json from gensim.models import Word2Vec from tensorflow_core.python.keras.models import load_model import convert import extract import predict import vectorize from annotation import annotate def main(input_file: str, output_file: str): extracted_jsdoc = extract.extract_from_file(input_f...
[ "json.load", "argparse.ArgumentParser", "vectorize.df_to_vec", "extract.extract_from_file", "tensorflow_core.python.keras.models.load_model", "predict.predict", "convert.convert_func_to_df", "gensim.models.Word2Vec.load", "annotation.annotate.annotate" ]
[((287, 324), 'extract.extract_from_file', 'extract.extract_from_file', (['input_file'], {}), '(input_file)\n', (312, 324), False, 'import extract\n'), ((334, 377), 'convert.convert_func_to_df', 'convert.convert_func_to_df', (['extracted_jsdoc'], {}), '(extracted_jsdoc)\n', (360, 377), False, 'import convert\n'), ((398...
# coding=utf8 """ 方便调试使用 """ from lofka import LofkaHandler,LofkaAsyncHandler import logging import traceback handler = LofkaAsyncHandler() logger = logging.getLogger('test') logger.addHandler(handler) def __debug_method(): try: raise Exception("TestException") except Exception as ex: traceb...
[ "lofka.LofkaAsyncHandler", "traceback.format_exc", "logging.getLogger" ]
[((122, 141), 'lofka.LofkaAsyncHandler', 'LofkaAsyncHandler', ([], {}), '()\n', (139, 141), False, 'from lofka import LofkaHandler, LofkaAsyncHandler\n'), ((151, 176), 'logging.getLogger', 'logging.getLogger', (['"""test"""'], {}), "('test')\n", (168, 176), False, 'import logging\n'), ((314, 336), 'traceback.format_exc...
from bs4 import BeautifulSoup import requests #from webdriver import keep_alive import discord import time from discord.ext import commands bot = commands.Bot(command_prefix='!') bot.remove_command("help") @bot.event async def on_ready(): await bot.change_presence(status=discord.Status.online, activity=discord.Activ...
[ "discord.Activity", "discord.ext.commands.command", "time.sleep", "requests.get", "discord.ext.commands.Bot", "bs4.BeautifulSoup" ]
[((147, 179), 'discord.ext.commands.Bot', 'commands.Bot', ([], {'command_prefix': '"""!"""'}), "(command_prefix='!')\n", (159, 179), False, 'from discord.ext import commands\n'), ((412, 441), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""ebay"""'}), "(name='ebay')\n", (428, 441), False, 'from di...
import time # print( time.time()) def timmer(func): def wrapper(): start_time = time.time() func() stop_time = time.time() print("运行时间是 %s 秒 " % (stop_time - start_time)) return wrapper @timmer def i_can_sleep(): time.sleep(3) # start_time = time.time() i_can_sleep()...
[ "time.time", "time.sleep" ]
[((262, 275), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (272, 275), False, 'import time\n'), ((94, 105), 'time.time', 'time.time', ([], {}), '()\n', (103, 105), False, 'import time\n'), ((141, 152), 'time.time', 'time.time', ([], {}), '()\n', (150, 152), False, 'import time\n')]
#!/usr/bin/python3 import cv2 import cv2IP if __name__ == '__main__': IP = cv2IP.BaseIP() img = IP.ImRead("img/test.jpg") IP.ImWindow("foreGround") IP.ImShow("foreGround", img) cv2.waitKey(0) del IP
[ "cv2.waitKey", "cv2IP.BaseIP" ]
[((81, 95), 'cv2IP.BaseIP', 'cv2IP.BaseIP', ([], {}), '()\n', (93, 95), False, 'import cv2IP\n'), ((199, 213), 'cv2.waitKey', 'cv2.waitKey', (['(0)'], {}), '(0)\n', (210, 213), False, 'import cv2\n')]
from __future__ import print_function, division import torch import os import pandas as pd from skimage import io, transform import numpy as np from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils import sklearn import sklearn.metrics as sklm import csv import argparse import torc...
[ "pandas.read_csv", "numpy.empty", "torch.get_rng_state", "torch.cuda.device_count", "numpy.mean", "torchvision.transforms.Normalize", "numpy.nanmean", "torch.nn.BCELoss", "torch.utils.data.DataLoader", "torchvision.transforms.Scale", "numpy.std", "CXRDataset.CXRDataset", "torch.load", "os....
[((673, 698), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (696, 698), False, 'import torch\n'), ((885, 896), 'importlib.reload', 'reload', (['CXR'], {}), '(CXR)\n', (891, 896), False, 'from importlib import reload\n'), ((897, 906), 'importlib.reload', 'reload', (['E'], {}), '(E)\n', (903, 90...
# coding: utf-8 # # This code is part of lattpy. # # Copyright (c) 2021, <NAME> # # This code is licensed under the MIT License. The copyright notice in the # LICENSE file in the root directory and this permission notice shall # be included in all copies or substantial portions of the Software. """Contains miscellaneo...
[ "numpy.zeros_like", "numpy.abs", "logging.StreamHandler", "logging.getLogger", "logging.Formatter", "numpy.min_scalar_type", "numpy.min", "numpy.max", "numpy.unique" ]
[((851, 878), 'logging.getLogger', 'logging.getLogger', (['"""lattpy"""'], {}), "('lattpy')\n", (868, 878), False, 'import logging\n'), ((886, 909), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (907, 909), False, 'import logging\n'), ((1038, 1086), 'logging.Formatter', 'logging.Formatter', (['_FR...
# -*- coding: utf-8 -*- from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model from model_utils.models import TimeStampedModel from annoying.fields import JSONField from geolite2 import geolite2 from .utils ...
[ "django.db.models.URLField", "django.db.models.ForeignKey", "django.db.models.CharField", "geolite2.geolite2.close", "django.contrib.auth.get_user_model", "geolite2.geolite2.reader", "django.db.models.SlugField", "annoying.fields.JSONField", "django.urls.reverse", "django.db.models.IntegerField", ...
[((529, 590), 'django.db.models.SlugField', 'models.SlugField', ([], {'max_length': '(6)', 'primary_key': '(True)', 'unique': '(True)'}), '(max_length=6, primary_key=True, unique=True)\n', (545, 590), False, 'from django.db import models\n'), ((606, 650), 'django.db.models.URLField', 'models.URLField', ([], {'max_lengt...
from __future__ import annotations import decimal import logging from typing import Any, Callable, Dict, Mapping, Optional, Set import workflows MessageCallback = Callable[[Mapping[str, Any], Any], None] class CommonTransport: """A common transport class, containing e.g. the logic to manage subscriptions a...
[ "workflows.Error", "logging.getLogger" ]
[((536, 576), 'logging.getLogger', 'logging.getLogger', (['"""workflows.transport"""'], {}), "('workflows.transport')\n", (553, 576), False, 'import logging\n'), ((3795, 3860), 'workflows.Error', 'workflows.Error', (['"""Attempting to unsubscribe unknown subscription"""'], {}), "('Attempting to unsubscribe unknown subs...
import numpy as np import torch import torch.optim as optim import torch.nn as nn from torch.autograd import Variable import skimage.io as io import argparse import os import sys import time # Allow python3 to search for modules outside of this directory sys.path.append("../") from models.skip import skip3d from vo...
[ "argparse.ArgumentParser", "torch.randn", "torch.cos", "tools.Ops.volume_proj", "os.path.join", "tools.Ops.rotate_volume", "sys.path.append", "os.path.exists", "torch.zeros", "tools.Ops.load_binvox", "tools.Ops.tvloss3d", "torch.nn.ConstantPad3d", "torch.optim.Adam", "torch.clamp", "nump...
[((257, 279), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (272, 279), False, 'import sys\n'), ((714, 785), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Reconstruciton using deep prior."""'}), "(description='Reconstruciton using deep prior.')\n", (737, 785), ...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. """Logging related module.""" import os import logging from logging import _checkLevel from fastseq.config import FASTSEQ_DEFAULT_LOG_LEVEL, FASTSEQ_LOG_LEVEL, FASTSEQ_LOG_FORMAT def set_default_log_level(): """Set the default log level ...
[ "logging._checkLevel", "logging.getLogger", "logging.basicConfig" ]
[((619, 690), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'fastseq_log_level', 'format': 'FASTSEQ_LOG_FORMAT'}), '(level=fastseq_log_level, format=FASTSEQ_LOG_FORMAT)\n', (638, 690), False, 'import logging\n'), ((1017, 1035), 'logging._checkLevel', '_checkLevel', (['level'], {}), '(level)\n', (1028, 10...
#!/usr/bin/env python import argparse from ast import parse import numpy as np import bitstring def to_fixed(x, args): F = args.fixed_point_bits[0] - args.fixed_point_bits[1] return np.round(x * 2**F) def to_float(x, args): F = args.fixed_point_bits[0] - args.fixed_point_bits[1] return x * 2**-F def ...
[ "numpy.load", "numpy.save", "numpy.flip", "argparse.ArgumentParser", "bitstring.pack", "numpy.round" ]
[((191, 211), 'numpy.round', 'np.round', (['(x * 2 ** F)'], {}), '(x * 2 ** F)\n', (199, 211), True, 'import numpy as np\n'), ((1090, 1180), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Parse numpy file to FPGA testing for MP7 board"""'}), "(description=\n 'Parse numpy file to FPGA ...
""" @brief This file holds classes that store information about the endoscopic images that are going to be segmented. @author <NAME> (<EMAIL>). @date 25 Aug 2015. """ import numpy as np import os import cv2 # import caffe import sys import random import matplotlib.pyplot as plt import scipy.misc import imut...
[ "numpy.sum", "numpy.ones", "matplotlib.pyplot.figure", "numpy.arange", "common.randbin", "cv2.imencode", "cv2.filter2D", "cv2.cvtColor", "matplotlib.pyplot.imshow", "cv2.imwrite", "numpy.max", "cv2.LUT", "cv2.minEnclosingCircle", "numpy.flipud", "numpy.min", "cv2.createCLAHE", "numpy...
[((533, 553), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (547, 553), True, 'import numpy as np\n'), ((562, 587), 'numpy.arange', 'np.arange', (['(256)'], {'dtype': 'int'}), '(256, dtype=int)\n', (571, 587), True, 'import numpy as np\n'), ((594, 614), 'numpy.random.shuffle', 'np.random.shuffle', ...
#!/usr/bin/python2 import sys, os op = os.path.basename(sys.argv[0]) mypath = os.path.abspath(os.path.dirname(sys.argv[0])) PATH = os.getenv('PATH').split(':') if op == 'mv': # copy much cleaner than move in a build (immutable inputs) op = 'cp' # Delete ourselves from the PATH if mypath in PATH: del PATH...
[ "os.getpid", "os.path.basename", "os.getcwd", "os.path.dirname", "os.setpgid", "os.execvp", "os.getenv" ]
[((40, 69), 'os.path.basename', 'os.path.basename', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (56, 69), False, 'import sys, os\n'), ((410, 441), 'os.getenv', 'os.getenv', (['"""TRACE_LOG_LOCATION"""'], {}), "('TRACE_LOG_LOCATION')\n", (419, 441), False, 'import sys, os\n'), ((595, 611), 'os.setpgid', 'os.setpgid', (['(...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.python.ops.math_ops.argmin", "tensorflow.python.ipu.config.IPUConfig", "tensorflow.python.ops.math_ops.argmax", "numpy.argmax", "numpy.dtype", "numpy.argmin", "tensorflow.python.platform.googletest.main", "os.environ.get", "test_utils.ReportJSON", "tensorflow.python.framework.ops.devic...
[((1394, 1426), 'numpy.issubdtype', 'np.issubdtype', (['dtype', 'np.integer'], {}), '(dtype, np.integer)\n', (1407, 1426), True, 'import numpy as np\n'), ((1730, 1772), 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (['*TESTCASES'], {}), '(*TESTCASES)\n', (1760, 1772), False, 'from abs...
# coding=utf-8 """ 백준 11279번 : 최대 힙 """ import heapq import sys N = int(sys.stdin.readline()) heap = [] for _ in range(N): num = int(sys.stdin.readline()) if num == 0: if len(heap) != 0: print(heapq.heappop(heap)[1]) else: print(0) else: heapq.heappush(heap,...
[ "heapq.heappush", "sys.stdin.readline", "heapq.heappop" ]
[((73, 93), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (91, 93), False, 'import sys\n'), ((139, 159), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (157, 159), False, 'import sys\n'), ((300, 333), 'heapq.heappush', 'heapq.heappush', (['heap', '(-num, num)'], {}), '(heap, (-num, num))\...
import pyHiChi as pfc import numpy as np import math as ma def valueEx(x, y, z): Ex = 0 #for x or y #Ex=np.sin(z) #for z return Ex def valueEy(x, y, z): #Ey = 0 #for y or z #Ey = np.sin(x) #for x Ey = np.sin(x - z) #for xz return Ey def valueEz(x, y, z): Ez = 0 #for x or z or xz #Ez = np.sin(y) #for y retur...
[ "matplotlib.pyplot.show", "numpy.zeros", "pyHiChi.PeriodicalBC", "matplotlib.animation.FuncAnimation", "numpy.sin", "numpy.arange", "pyHiChi.vector3d", "pyHiChi.YeeGrid", "numpy.sqrt", "matplotlib.pyplot.subplots", "pyHiChi.FDTD" ]
[((902, 926), 'pyHiChi.vector3d', 'pfc.vector3d', (['(20)', '(20)', '(20)'], {}), '(20, 20, 20)\n', (914, 926), True, 'import pyHiChi as pfc\n'), ((939, 966), 'pyHiChi.vector3d', 'pfc.vector3d', (['(0.0)', '(0.0)', '(0.0)'], {}), '(0.0, 0.0, 0.0)\n', (951, 966), True, 'import pyHiChi as pfc\n'), ((979, 1024), 'pyHiChi....
""" * Copyright (c) 2021, NVIDIA CORPORATION. * * 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...
[ "tensorflow.nn.compute_average_loss", "hugectr_tf_ops.create_embedding", "hugectr_tf_ops.fprop_v4", "tensorflow.keras.layers.Dense", "tensorflow.keras.optimizers.SGD", "tensorflow.concat", "tensorflow.keras.losses.BinaryCrossentropy", "tensorflow.shape", "tensorflow.python.distribute.values.PerRepli...
[((5341, 5366), 'tensorflow.keras.optimizers.SGD', 'tf.keras.optimizers.SGD', ([], {}), '()\n', (5364, 5366), True, 'import tensorflow as tf\n'), ((5599, 5699), 'tensorflow.keras.losses.BinaryCrossentropy', 'tf.keras.losses.BinaryCrossentropy', ([], {'from_logits': '(False)', 'reduction': 'tf.keras.losses.Reduction.NON...