code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import numpy as np from PIL import Image import matplotlib.pyplot as plt import histogram_module import dist_module def rgb2gray(rgb): r, g, b = rgb[:, :, 0], rgb[:, :, 1], rgb[:, :, 2] gray = 0.2989 * r + 0.5870 * g + 0.1140 * b return gray # model_images - list of file names of model images # query_...
[ "PIL.Image.open", "histogram_module.is_grayvalue_hist", "histogram_module.get_hist_by_name", "numpy.argsort", "numpy.array", "matplotlib.pyplot.figure", "numpy.argmin", "matplotlib.pyplot.title", "dist_module.get_dist_by_name", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show" ]
[((866, 911), 'histogram_module.is_grayvalue_hist', 'histogram_module.is_grayvalue_hist', (['hist_type'], {}), '(hist_type)\n', (900, 911), False, 'import histogram_module\n'), ((1708, 1728), 'numpy.array', 'np.array', (['best_match'], {}), '(best_match)\n', (1716, 1728), True, 'import numpy as np\n'), ((2953, 2965), '...
################################################################################ # Copyright (c) 2015-2018 Skymind, Inc. # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0. # # Unless...
[ "ctypes.POINTER", "numpy.array", "ctypes.cast", "warnings.warn", "numpy.dtype" ]
[((4456, 4486), 'ctypes.POINTER', 'ctypes.POINTER', (['mapping[dtype]'], {}), '(mapping[dtype])\n', (4470, 4486), False, 'import ctypes\n'), ((4501, 4530), 'ctypes.cast', 'ctypes.cast', (['address', 'Pointer'], {}), '(address, Pointer)\n', (4512, 4530), False, 'import ctypes\n'), ((2678, 2771), 'warnings.warn', 'warnin...
import os from typing import Tuple import torchaudio from torch import Tensor from torch.utils.data import Dataset from torchaudio.datasets.utils import ( download_url, extract_archive, walk_files, ) URL = "train-clean-100" FOLDER_IN_ARCHIVE = "LibriTTS" _CHECKSUMS = { "http://www.openslr.org/60/dev-c...
[ "torchaudio.load", "os.path.join", "torchaudio.datasets.utils.extract_archive", "os.path.isfile", "os.path.isdir", "os.path.basename", "torchaudio.datasets.utils.download_url", "torchaudio.datasets.utils.walk_files" ]
[((1270, 1329), 'os.path.join', 'os.path.join', (['path', 'speaker_id', 'chapter_id', 'normalized_text'], {}), '(path, speaker_id, chapter_id, normalized_text)\n', (1282, 1329), False, 'import os\n'), ((1403, 1460), 'os.path.join', 'os.path.join', (['path', 'speaker_id', 'chapter_id', 'original_text'], {}), '(path, spe...
# coding: utf-8 ######################################################################### # 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> # # author yeeku.H.lee <EMAIL> # # # # version 1.0 ...
[ "matplotlib.pyplot.text", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((2039, 2068), 'matplotlib.pyplot.title', 'plt.title', (['"""Java与Android图书对比"""'], {}), "('Java与Android图书对比')\n", (2048, 2068), True, 'import matplotlib.pyplot as plt\n'), ((2084, 2100), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""销量"""'], {}), "('销量')\n", (2094, 2100), True, 'import matplotlib.pyplot as plt\n'),...
#! /usr/bin/Python from gensim.models.keyedvectors import KeyedVectors from scipy import spatial from numpy import linalg import argparse import sys vector_file = sys.argv[1] if len(sys.argv) != 6: print('arguments wrong!') print(len(sys.argv)) exit() else: words = [sys.argv[2], sys.argv[3], sys.arg...
[ "gensim.models.keyedvectors.KeyedVectors.load_word2vec_format", "scipy.spatial.distance.cosine", "numpy.linalg.norm" ]
[((366, 425), 'gensim.models.keyedvectors.KeyedVectors.load_word2vec_format', 'KeyedVectors.load_word2vec_format', (['vector_file'], {'binary': '(True)'}), '(vector_file, binary=True)\n', (399, 425), False, 'from gensim.models.keyedvectors import KeyedVectors\n'), ((709, 724), 'numpy.linalg.norm', 'linalg.norm', (['w1'...
import numpy as np import scipy as sp import scipy.sparse.linalg as splinalg def eig2_nL(g, tol_eigs = 1.0e-6, normalize:bool = True, dim:int=1): """ DESCRIPTION ----------- Computes the eigenvector that corresponds to the second smallest eigenvalue of the normalized Laplacian matrix ...
[ "numpy.real", "scipy.sparse.identity", "scipy.sparse.linalg.eigsh" ]
[((1613, 1667), 'scipy.sparse.linalg.eigsh', 'splinalg.eigsh', (['L'], {'which': '"""SM"""', 'k': '(1 + dim)', 'tol': 'tol_eigs'}), "(L, which='SM', k=1 + dim, tol=tol_eigs)\n", (1627, 1667), True, 'import scipy.sparse.linalg as splinalg\n'), ((1677, 1694), 'numpy.real', 'np.real', (['p[:, 1:]'], {}), '(p[:, 1:])\n', (...
# Copyright 2020 XAMES3. 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 applicable law or agree...
[ "setuptools.find_packages" ]
[((2309, 2324), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (2322, 2324), False, 'from setuptools import find_packages, setup\n')]
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ "logging.getLogger", "logging.Formatter", "logging.StreamHandler", "inspect.stack" ]
[((1186, 1217), 'logging.Formatter', 'logging.Formatter', (['fmt', 'datefmt'], {}), '(fmt, datefmt)\n', (1203, 1217), False, 'import logging\n'), ((1587, 1610), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (1604, 1610), False, 'import logging\n'), ((1669, 1702), 'logging.StreamHandler', 'loggin...
#!/usr/bin/env python import sys import re from subprocess import Popen, PIPE import argparse from pbxproj import XcodeProject, TreeType from pbxproj import FileOptions def main(): parser = argparse.ArgumentParser(description="MpireNxusMeasurement post build iOS script") parser.add_argument('ios_project_path...
[ "pbxproj.FileOptions", "argparse.ArgumentParser", "re.compile", "subprocess.Popen", "pbxproj.XcodeProject.load", "sys.exit", "re.search" ]
[((197, 283), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""MpireNxusMeasurement post build iOS script"""'}), "(description=\n 'MpireNxusMeasurement post build iOS script')\n", (220, 283), False, 'import argparse\n'), ((1328, 1339), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (13...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ "json.loads", "ghapp_token.GitHub", "argparse.ArgumentParser", "subprocess.run", "json.dumps", "base64.b64decode", "requests.request", "os.chmod", "os.environ.get", "time.sleep", "sys.exit" ]
[((1077, 1229), 'subprocess.run', 'subprocess.run', (['f"""kubectl get route -n {NAMESPACE} -l pipelines-as-code/route=controller -o json"""'], {'shell': '(True)', 'check': '(True)', 'capture_output': '(True)'}), "(\n f'kubectl get route -n {NAMESPACE} -l pipelines-as-code/route=controller -o json'\n , shell=True...
import torch import torch.nn as nn import torch.nn.functional as F class PGDModel(nn.Module): """ code adapted from https://github.com/karandwivedi42/adversarial/blob/master/main.py """ def __init__(self, basic_net, config): super(PGDModel, self).__init__() self.basic_net = basic_...
[ "torch.enable_grad", "torch.autograd.grad", "torch.nn.functional.cross_entropy", "torch.zeros_like", "torch.clamp" ]
[((1317, 1337), 'torch.clamp', 'torch.clamp', (['x', '(0)', '(1)'], {}), '(x, 0, 1)\n', (1328, 1337), False, 'import torch\n'), ((911, 930), 'torch.enable_grad', 'torch.enable_grad', ([], {}), '()\n', (928, 930), False, 'import torch\n'), ((998, 1047), 'torch.nn.functional.cross_entropy', 'F.cross_entropy', (['logits',...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ "pulumi.get", "pulumi.getter", "pulumi.set", "pulumi.InvokeOptions", "pulumi.runtime.invoke" ]
[((2465, 2496), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""cryptoKey"""'}), "(name='cryptoKey')\n", (2478, 2496), False, 'import pulumi\n'), ((3044, 3081), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""protectionLevel"""'}), "(name='protectionLevel')\n", (3057, 3081), False, 'import pulumi\n'), ((3448, 3...
#!/usr/bin/env python3 import itertools # Constants NUMBERS = range(0, 10) # Main Execution def main(): count = 0 for length in range(0, len(NUMBERS) + 1): for subset in itertools.combinations(NUMBERS, length): if sum(subset) % 3 == 0: count += 1 print(count) if __...
[ "itertools.combinations" ]
[((191, 230), 'itertools.combinations', 'itertools.combinations', (['NUMBERS', 'length'], {}), '(NUMBERS, length)\n', (213, 230), False, 'import itertools\n')]
# -*- coding: utf-8 -*- from lite_tools import get_md5, get_sha, get_sha3, get_b64e, get_b64d # about hashlib ==> get_md5, get_sha, get_sha3 || default mode=256 s = "test_information" # 这里只能丢字符串 print(get_md5(s)) # 5414ffd88fcb58417e64ecec51bb3a6b print(get_md5(s, upper=True)) # 5414FFD88FCB5841...
[ "lite_tools.get_b64d", "lite_tools.get_md5", "lite_tools.get_sha", "lite_tools.get_sha3", "lite_tools.get_b64e" ]
[((1394, 1405), 'lite_tools.get_b64e', 'get_b64e', (['s'], {}), '(s)\n', (1402, 1405), False, 'from lite_tools import get_md5, get_sha, get_sha3, get_b64e, get_b64d\n'), ((1493, 1517), 'lite_tools.get_b64e', 'get_b64e', (['s'], {'to_bin': '(True)'}), '(s, to_bin=True)\n', (1501, 1517), False, 'from lite_tools import ge...
# Fast large file synchronization inspired by rsync. # # Author: <NAME> <<EMAIL>> # Last Change: March 6, 2020 # URL: https://pdiffcopy.readthedocs.io """Parallel hashing of files using :mod:`multiprocessing` and :mod:`pdiffcopy.mp`.""" # Standard library modules. import functools import hashlib import os # External...
[ "os.path.getsize", "functools.partial", "hashlib.new" ]
[((1188, 1207), 'hashlib.new', 'hashlib.new', (['method'], {}), '(method)\n', (1199, 1207), False, 'import hashlib\n'), ((815, 906), 'functools.partial', 'functools.partial', (['hash_worker'], {'block_size': 'block_size', 'filename': 'filename', 'method': 'method'}), '(hash_worker, block_size=block_size, filename=filen...
import pytest from moz_library.rental_books import RentalBooks class TestRentalBooks: @pytest.fixture() def books1(self): return RentalBooks() def test_can_extend_period_1(self, books1): assert books1._can_extend_period("延長できません") is False def test_can_extend_period_2(self, books1): ...
[ "pytest.fixture", "moz_library.rental_books.RentalBooks" ]
[((93, 109), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (107, 109), False, 'import pytest\n'), ((147, 160), 'moz_library.rental_books.RentalBooks', 'RentalBooks', ([], {}), '()\n', (158, 160), False, 'from moz_library.rental_books import RentalBooks\n')]
#!/usr/bin/python3 ## write2cly.py - reads json (generated by sml_reader.py) from stdin ## - writes values to Corlysis time series InfluxDB ## ## Writes data from smart meter to time series database (InfluxDB) ## at Corlysis.com [1]. You need to configure your database and token ## in the config secti...
[ "json.load", "sys.stderr.write", "requests.post", "time.time" ]
[((1073, 1093), 'json.load', 'json.load', (['sys.stdin'], {}), '(sys.stdin)\n', (1082, 1093), False, 'import json, sys, requests\n'), ((1669, 1730), 'requests.post', 'requests.post', (['cly_base_url'], {'params': 'cly_parameters', 'data': 'line'}), '(cly_base_url, params=cly_parameters, data=line)\n', (1682, 1730), Fal...
#!/usr/bin/env python # -*- coding: utf-8 -*- import random import numpy as np # Generic data augmentation class Augmenter: """ Generic data augmentation class with chained operations """ def __init__(self, ops=[]): if not isinstance(ops, list): print("Error: ops must be a list of fu...
[ "numpy.random.normal", "random.random" ]
[((712, 727), 'random.random', 'random.random', ([], {}), '()\n', (725, 727), False, 'import random\n'), ((873, 888), 'random.random', 'random.random', ([], {}), '()\n', (886, 888), False, 'import random\n'), ((1058, 1073), 'random.random', 'random.random', ([], {}), '()\n', (1071, 1073), False, 'import random\n'), ((1...
import logging import json import asyncio from google.protobuf import json_format from umbra.common.protobuf.umbra_grpc import MonitorBase from umbra.common.protobuf.umbra_pb2 import Instruction, Snapshot from umbra.monitor.tools import Tools logger = logging.getLogger(__name__) logging.getLogger("hpack").setLevel(...
[ "logging.getLogger", "umbra.monitor.tools.Tools", "logging.debug", "google.protobuf.json_format.MessageToDict", "umbra.common.protobuf.umbra_pb2.Snapshot" ]
[((256, 283), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (273, 283), False, 'import logging\n'), ((284, 310), 'logging.getLogger', 'logging.getLogger', (['"""hpack"""'], {}), "('hpack')\n", (301, 310), False, 'import logging\n'), ((418, 425), 'umbra.monitor.tools.Tools', 'Tools', ([],...
import numpy as np def rot_to_angle(rot): return np.arccos(0.5*np.trace(rot)-0.5) def rot_to_heading(rot): # This function calculates the heading angle of the rot matrix w.r.t. the y-axis new_rot = rot[0:3:2, 0:3:2] # remove the mid row and column corresponding to the y-axis new_rot = new_rot/np.li...
[ "numpy.trace", "numpy.arctan2", "numpy.linalg.det" ]
[((349, 389), 'numpy.arctan2', 'np.arctan2', (['new_rot[1, 0]', 'new_rot[0, 0]'], {}), '(new_rot[1, 0], new_rot[0, 0])\n', (359, 389), True, 'import numpy as np\n'), ((315, 337), 'numpy.linalg.det', 'np.linalg.det', (['new_rot'], {}), '(new_rot)\n', (328, 337), True, 'import numpy as np\n'), ((69, 82), 'numpy.trace', '...
import logging logger = logging.getLogger(__name__) import random import chainercv import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D # NOQA from pose.hand_dataset.geometry_utils import normalize_joint_zyx from pose.hand_dataset.image_utils import normalize_depth # Dec...
[ "logging.getLogger", "chainercv.visualizations.vis_image", "matplotlib.pyplot.savefig", "numpy.asarray", "matplotlib.pyplot.figure", "pose.hand_dataset.geometry_utils.normalize_joint_zyx", "numpy.expand_dims", "matplotlib.pyplot.show" ]
[((25, 52), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (42, 52), False, 'import logging\n'), ((946, 963), 'numpy.asarray', 'np.asarray', (['point'], {}), '(point)\n', (956, 963), True, 'import numpy as np\n'), ((3562, 3588), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '...
import os import skimage.io from torch.nn import Module import torch.nn from torchvision.models import resnet18 from nn.speaker_dataset import Dataset # @UnusedImport os.environ['TORCH_MODEL_ZOO'] = '../data/' VIDTIMIT_PATH = '../data/vidtimit/' skimage.io.use_plugin('pil') class Net(Module): def __init__(s...
[ "torchvision.models.resnet18" ]
[((371, 396), 'torchvision.models.resnet18', 'resnet18', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (379, 396), False, 'from torchvision.models import resnet18\n')]
from typing import List, Tuple, Union import numpy as np import scipy.special from PIL import Image, ImageFilter class RandomBetaMorphology: def __init__( self, filter_size_min: int, filter_size_max: int, alpha: float, beta: float ) -> None: assert filter_size_min % 2 != 0, "Filter size must ...
[ "argparse.FileType", "PIL.Image.open", "argparse.ArgumentParser", "numpy.random.choice", "PIL.Image.new", "PIL.ImageFilter.MinFilter", "numpy.asarray", "PIL.ImageOps.invert", "PIL.ImageFilter.MaxFilter" ]
[((2926, 2951), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2949, 2951), False, 'import argparse\n'), ((1328, 1370), 'numpy.asarray', 'np.asarray', (['filter_probs'], {'dtype': 'np.float32'}), '(filter_probs, dtype=np.float32)\n', (1338, 1370), True, 'import numpy as np\n'), ((1536, 1592), ...
# Copyright (c) 2014, Fundacion Dr. <NAME> # 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 and...
[ "unittest.main", "barf.arch.x86.parser.X86Parser" ]
[((4163, 4178), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4176, 4178), False, 'import unittest\n'), ((1610, 1637), 'barf.arch.x86.parser.X86Parser', 'X86Parser', (['ARCH_X86_MODE_32'], {}), '(ARCH_X86_MODE_32)\n', (1619, 1637), False, 'from barf.arch.x86.parser import X86Parser\n'), ((3386, 3413), 'barf.arch...
'''Analysis utility functions. :Author: <NAME> <<EMAIL>> :Date: 2016-03-26 :Copyright: 2016-2018, Karr Lab :License: MIT ''' # TODO(Arthur): IMPORTANT: refactor and replace from matplotlib import pyplot from matplotlib import ticker from wc_lang import Model, Submodel from scipy.constants import Avogadro import nump...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.gca", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "re.match", "numpy.max", "matplotlib.pyplot.close", "numpy.zeros", "matplotlib.pyplot.figure", "matplotlib.ticker.ScalarFormatter", "numpy.min", "matplotlib.p...
[((362, 373), 'numpy.zeros', 'np.zeros', (['(0)'], {}), '(0)\n', (370, 373), True, 'import numpy as np\n'), ((411, 422), 'numpy.zeros', 'np.zeros', (['(0)'], {}), '(0)\n', (419, 422), True, 'import numpy as np\n'), ((447, 458), 'numpy.zeros', 'np.zeros', (['(0)'], {}), '(0)\n', (455, 458), True, 'import numpy as np\n')...
# -*- coding: utf-8 -*- """ Handles the tournament logic """ import datetime from chess.utils.utils import get_new_id from chess.models.actors import Player from chess.models.round import Round TOURNAMENT_ID_WIDTH = 8 NB_ROUND = 4 NB_PLAYERS = 8 NB_MATCH = 4 class Tournament: """ The class Tournament is t...
[ "chess.utils.utils.get_new_id", "datetime.date.today", "chess.models.actors.Player", "chess.models.round.Round" ]
[((513, 575), 'chess.utils.utils.get_new_id', 'get_new_id', (['Tournament.last_tournament_id', 'TOURNAMENT_ID_WIDTH'], {}), '(Tournament.last_tournament_id, TOURNAMENT_ID_WIDTH)\n', (523, 575), False, 'from chess.utils.utils import get_new_id\n'), ((1608, 1666), 'chess.models.round.Round', 'Round', (['num_round', 'self...
# !/usr/bin python """ # # set-config - a small python program to setup the configuration environment for data-collect.py # data-collect.py contain the python program to gather Metrics from vROps # Author <NAME> <<EMAIL>> # """ # Importing the required modules import json import base64 import os,sys # Getting the ...
[ "os.path.realpath", "base64.b64encode", "json.dump" ]
[((785, 815), 'base64.b64encode', 'base64.b64encode', (['serverpasswd'], {}), '(serverpasswd)\n', (801, 815), False, 'import base64\n'), ((1773, 1876), 'json.dump', 'json.dump', (['final_data', 'outfile'], {'sort_keys': '(True)', 'indent': '(2)', 'separators': "(',', ':')", 'ensure_ascii': '(False)'}), "(final_data, ou...
# CoDVote plugin for BigBrotherBot(B3) (www.bigbrotherbot.net) # Copyright (C) 2015 ph03n1x # # 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 2 of the License, or # (at your optio...
[ "threading.Timer" ]
[((5453, 5506), 'threading.Timer', 'threading.Timer', (['(self._votetime - 5)', 'self.voteMessage'], {}), '(self._votetime - 5, self.voteMessage)\n', (5468, 5506), False, 'import b3, threading\n'), ((5657, 5691), 'threading.Timer', 'threading.Timer', (['(10)', 'self.denyVote'], {}), '(10, self.denyVote)\n', (5672, 5691...
""" Script updates `README.md` with respect to files at ./easy and ./medium folders. """ import os curr_dir = os.path.dirname(__file__) with open(os.path.join(curr_dir, "README.md"), 'w') as readme: readme.write("# LeetCode\nDeliberate practice in coding.\n") langs = [l for l in os.listdir(curr_dir) if os.path...
[ "os.path.dirname", "os.listdir", "os.path.join" ]
[((111, 136), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (126, 136), False, 'import os\n'), ((147, 182), 'os.path.join', 'os.path.join', (['curr_dir', '"""README.md"""'], {}), "(curr_dir, 'README.md')\n", (159, 182), False, 'import os\n'), ((289, 309), 'os.listdir', 'os.listdir', (['curr_...
# -*- coding: utf-8 -*- #retriever import csv from pkg_resources import parse_version from retriever.lib.models import Table from retriever.lib.templates import Script try: from retriever.lib.defaults import VERSION try: from retriever.lib.tools import open_fr, open_fw, open_csvw except ImportEr...
[ "retriever.lib.templates.Script.__init__", "csv.writer", "retriever.lib.models.Table", "pkg_resources.parse_version", "retriever.lib.templates.Script.download" ]
[((520, 551), 'retriever.lib.templates.Script.__init__', 'Script.__init__', (['self'], {}), '(self, **kwargs)\n', (535, 551), False, 'from retriever.lib.templates import Script\n'), ((1681, 1717), 'retriever.lib.templates.Script.download', 'Script.download', (['self', 'engine', 'debug'], {}), '(self, engine, debug)\n',...
from django.db import models # Create your models here. class Schema(models.Model): name = models.CharField(max_length=200) description = models.TextField() class Code(models.Model): name = models.CharField(max_length=200) description = models.TextField() active_instances = models.Posit...
[ "django.db.models.FloatField", "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.PositiveIntegerField", "django.db.models.DateTimeField", "django.db.models.Q", "django.db.models.CharField" ]
[((101, 133), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)'}), '(max_length=200)\n', (117, 133), False, 'from django.db import models\n'), ((152, 170), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (168, 170), False, 'from django.db import models\n'), ((215, 247), '...
# Generated by Django 3.2.3 on 2021-05-27 13:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user_profile', '0002_auto_20210526_1747'), ] operations = [ migrations.AddField( model_name='order', name='payment_m...
[ "django.db.models.CharField" ]
[((346, 448), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('cash', 'cash'), ('wallet', 'wallet')]", 'default': '"""cash"""', 'max_length': '(10)'}), "(choices=[('cash', 'cash'), ('wallet', 'wallet')], default=\n 'cash', max_length=10)\n", (362, 448), False, 'from django.db import migrations,...
# Copyright 2015 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.sparse_ops.serialize_many_sparse", "numpy.testing.assert_equal", "tensorflow.python.ops.variables.global_variables_initializer", "tensorflow.python.framework.sparse_tensor.SparseTensorValue", "numpy.array", "tensorflow.python.ops.variables.Variable", "numpy.arange", "tensorflow....
[((10045, 10056), 'tensorflow.python.platform.test.main', 'test.main', ([], {}), '()\n', (10054, 10056), False, 'from tensorflow.python.platform import test\n'), ((2231, 2283), 'tensorflow.python.framework.sparse_tensor.SparseTensorValue', 'sparse_tensor_lib.SparseTensorValue', (['ind', 'val', 'shape'], {}), '(ind, val...
import json from typing import Dict, Optional import requests from federation.hostmeta.parsers import ( parse_nodeinfo_document, parse_nodeinfo2_document, parse_statisticsjson_document, parse_mastodon_document, parse_matrix_document, parse_misskey_document) from federation.utils.network import fetch_document ...
[ "json.loads", "requests.post", "federation.hostmeta.parsers.parse_misskey_document", "federation.hostmeta.parsers.parse_matrix_document", "federation.hostmeta.parsers.parse_statisticsjson_document", "federation.hostmeta.parsers.parse_mastodon_document", "federation.utils.network.fetch_document", "fede...
[((429, 479), 'federation.utils.network.fetch_document', 'fetch_document', ([], {'host': 'host', 'path': '"""/api/v1/instance"""'}), "(host=host, path='/api/v1/instance')\n", (443, 479), False, 'from federation.utils.network import fetch_document\n'), ((609, 643), 'federation.hostmeta.parsers.parse_mastodon_document', ...
# -*- encoding: utf-8 -*- # Copyright (c) 2017 Servionica # # 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 l...
[ "datetime.datetime.utcnow", "mock.Mock", "mock.patch.object", "freezegun.freeze_time", "mock.MagicMock" ]
[((872, 923), 'freezegun.freeze_time', 'freezegun.freeze_time', (['"""2016-10-18T09:52:05.219414"""'], {}), "('2016-10-18T09:52:05.219414')\n", (893, 923), False, 'import freezegun\n'), ((1078, 1116), 'mock.patch.object', 'mock.patch.object', (['rpc', '"""get_notifier"""'], {}), "(rpc, 'get_notifier')\n", (1095, 1116),...
import torch from torch import nn from torch.nn.parameter import Parameter from einops import rearrange, reduce, repeat class dca_offsets_layer(nn.Module): """Constructs a Offset Generation module. """ def __init__(self, channel, n_offsets): super(dca_offsets_layer, self).__init__() self....
[ "torch.bmm", "torch.topk", "torch.stack", "torch.arange" ]
[((773, 804), 'torch.bmm', 'torch.bmm', (['proj_query', 'proj_key'], {}), '(proj_query, proj_key)\n', (782, 804), False, 'import torch\n'), ((1006, 1051), 'torch.topk', 'torch.topk', (['cov_matrix', 'self.n_offsets'], {'dim': '(1)'}), '(cov_matrix, self.n_offsets, dim=1)\n', (1016, 1051), False, 'import torch\n'), ((11...
#!/usr/bin/env python # coding: utf-8 # In[ ]: import pysam import os import pandas as pd import numpy as np import time import argparse import sys from multiprocessing import Pool # In[ ]: # ##arguments for testing # bam_file_path = '/fh/scratch/delete90/ha_g/realigned_bams/cfDNA_MBC_ULP_hg38/realign_bam_pa...
[ "pandas.Series", "os.path.exists", "argparse.ArgumentParser", "pandas.read_csv", "pysam.AlignmentFile", "numpy.array_split", "numpy.random.randint", "multiprocessing.Pool", "os.mkdir", "pandas.DataFrame", "sys.stdout.flush", "time.time", "pysam.FastaFile" ]
[((762, 787), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (785, 787), False, 'import argparse\n'), ((2901, 2949), 'pandas.read_csv', 'pd.read_csv', (['mapable_path'], {'sep': '"""\t"""', 'header': 'None'}), "(mapable_path, sep='\\t', header=None)\n", (2912, 2949), True, 'import pandas as pd\...
import discord from discord.ext import commands arrow = "<a:right:877425183839891496>" kwee = "<:kannawee:877036162122924072>" kdance = "<a:kanna_dance:877038778798207016>" kbored = "<:kanna_bored:877036162827583538>" ksmug = "<:kanna_smug:877038777896427560>" heart = "<a:explosion_heart:877426228775227392>" class Se...
[ "discord.ext.commands.Cog.listener", "discord.ext.commands.is_owner", "discord.Embed", "discord.ext.commands.command", "discord.File" ]
[((449, 467), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (465, 467), False, 'from discord.ext import commands\n'), ((473, 492), 'discord.ext.commands.is_owner', 'commands.is_owner', ([], {}), '()\n', (490, 492), False, 'from discord.ext import commands\n'), ((2653, 2671), 'discord.ext.command...
import numpy as np import network def main(): x = np.array([2, 3]) nw = network.NeuralNetwork() print(nw.feedforward(x)) if __name__ == "__main__": main()
[ "numpy.array", "network.NeuralNetwork" ]
[((56, 72), 'numpy.array', 'np.array', (['[2, 3]'], {}), '([2, 3])\n', (64, 72), True, 'import numpy as np\n'), ((82, 105), 'network.NeuralNetwork', 'network.NeuralNetwork', ([], {}), '()\n', (103, 105), False, 'import network\n')]
""" Generates Tisserand plots """ from enum import Enum import numpy as np from astropy import units as u from matplotlib import pyplot as plt from poliastro.plotting._base import BODY_COLORS from poliastro.twobody.mean_elements import get_mean_elements from poliastro.util import norm class TisserandKind(Enum): ...
[ "poliastro.util.norm", "numpy.sqrt", "poliastro.twobody.mean_elements.get_mean_elements", "numpy.linspace", "numpy.cos", "numpy.meshgrid", "matplotlib.pyplot.subplots" ]
[((2191, 2245), 'numpy.linspace', 'np.linspace', (['vinf_span[0]', 'vinf_span[-1]', 'num_contours'], {}), '(vinf_span[0], vinf_span[-1], num_contours)\n', (2202, 2245), True, 'import numpy as np\n'), ((2268, 2311), 'numpy.linspace', 'np.linspace', (['alpha_lim[0]', 'alpha_lim[-1]', 'N'], {}), '(alpha_lim[0], alpha_lim[...
from KeyValueTree import KeyValueTree from truth.models import KeyValue as TruthKeyValue, Truth from systems.models import KeyValue as KeyValue from django.test.client import RequestFactory from api_v2.keyvalue_handler import KeyValueHandler import json factory = RequestFactory() class Rack: rack_name = None ...
[ "api_v2.keyvalue_handler.KeyValueHandler", "systems.models.KeyValue.objects.select_related", "django.test.client.RequestFactory", "truth.models.Truth.objects.select_related" ]
[((265, 281), 'django.test.client.RequestFactory', 'RequestFactory', ([], {}), '()\n', (279, 281), False, 'from django.test.client import RequestFactory\n'), ((994, 1011), 'api_v2.keyvalue_handler.KeyValueHandler', 'KeyValueHandler', ([], {}), '()\n', (1009, 1011), False, 'from api_v2.keyvalue_handler import KeyValueHa...
from __future__ import absolute_import from __future__ import print_function import datetime import os import random import sys import uuid import base64 import yaml import re try: import en except: print("DOWNLOD NODECUBE") print("""wget https://www.nodebox.net/code/data/media/linguistics.zip unzip lingui...
[ "uuid.uuid5", "random.choice", "en.verb.present_participle", "uuid.uuid4", "en.verb.present", "en.noun.plural", "re.sub", "random.randint", "en.verb.past" ]
[((9349, 9372), 're.sub', 're.sub', (['"""<.*?>"""', '""" """', 'p'], {}), "('<.*?>', ' ', p)\n", (9355, 9372), False, 'import re\n'), ((4448, 4488), 'uuid.uuid5', 'uuid.uuid5', (['uuid.NAMESPACE_DNS', 'seed_str'], {}), '(uuid.NAMESPACE_DNS, seed_str)\n', (4458, 4488), False, 'import uuid\n'), ((5150, 5172), 'random.ra...
# 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 t...
[ "openstack.block_storage.v2._proxy.Proxy" ]
[((967, 993), 'openstack.block_storage.v2._proxy.Proxy', '_proxy.Proxy', (['self.session'], {}), '(self.session)\n', (979, 993), False, 'from openstack.block_storage.v2 import _proxy\n')]
"""Support for Purrsong LavvieBot S""" import asyncio import logging import voluptuous as vol from lavviebot import LavvieBotApi import homeassistant.helpers.config_validation as cv from homeassistant import config_entries from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.exceptions import Co...
[ "logging.getLogger" ]
[((449, 476), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (466, 476), False, 'import logging\n')]
from mars import main_loop import numpy as np from mars.settings import * class Problem: """ Synopsis -------- User class for the Kelvin-Helmholtz instability Args ---- None Methods ------- initialise Set all variables in each cell to initialise the simulation. i...
[ "numpy.random.random", "numpy.meshgrid", "numpy.absolute" ]
[((1932, 1970), 'numpy.meshgrid', 'np.meshgrid', (['g.x1', 'g.x2'], {'indexing': '"""ij"""'}), "(g.x1, g.x2, indexing='ij')\n", (1943, 1970), True, 'import numpy as np\n'), ((2043, 2087), 'numpy.meshgrid', 'np.meshgrid', (['g.x1', 'g.x2', 'g.x3'], {'indexing': '"""ij"""'}), "(g.x1, g.x2, g.x3, indexing='ij')\n", (2054,...
import numpy as np from scipy.signal import savgol_filter import matplotlib.pyplot as plt import MadDog x = [] y = [] def generate(): # Generate random data base = np.linspace(0, 5, 11) # base = np.random.randint(0, 10, 5) outliers = np.random.randint(10, 20, 2) data = np.concatenate((base, outli...
[ "matplotlib.pyplot.imshow", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.legend", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.clf", "matplotlib.pyplot.plot", "numpy.array", "numpy.linspace", "numpy.random.randint", "matplotlib.pyplot.figure", "numpy.concatenate",...
[((175, 196), 'numpy.linspace', 'np.linspace', (['(0)', '(5)', '(11)'], {}), '(0, 5, 11)\n', (186, 196), True, 'import numpy as np\n'), ((253, 281), 'numpy.random.randint', 'np.random.randint', (['(10)', '(20)', '(2)'], {}), '(10, 20, 2)\n', (270, 281), True, 'import numpy as np\n'), ((293, 325), 'numpy.concatenate', '...
import pytest from pyminhash import MinHash from pyminhash.datasets import load_data def test__sparse_vector(): df = load_data() myMinHasher = MinHash(10) res = myMinHasher._sparse_vectorize(df, 'name') assert res.columns.tolist() == ['name', 'sparse_vector'] assert res['sparse_vector'].dtype == ...
[ "pyminhash.MinHash", "pyminhash.datasets.load_data" ]
[((124, 135), 'pyminhash.datasets.load_data', 'load_data', ([], {}), '()\n', (133, 135), False, 'from pyminhash.datasets import load_data\n'), ((154, 165), 'pyminhash.MinHash', 'MinHash', (['(10)'], {}), '(10)\n', (161, 165), False, 'from pyminhash import MinHash\n'), ((406, 437), 'pyminhash.MinHash', 'MinHash', ([], {...
from datetime import datetime, timedelta from typing import final from tools import localize_time RSS_URL_PREFIX: final = 'https://www.youtube.com/feeds/videos.xml?channel_id={0}' LOCATION_ARGUMENT_PREFIX: final = '--location=' CHANNEL_ARGUMENT_PREFIX: final = '--channels=' LAST_CHECK_ARGUMENT_PREFIX: final = '--last...
[ "datetime.datetime.now", "datetime.timedelta" ]
[((401, 415), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (413, 415), False, 'from datetime import datetime, timedelta\n'), ((418, 451), 'datetime.timedelta', 'timedelta', ([], {'days': 'TWO_WEEKS_IN_DAYS'}), '(days=TWO_WEEKS_IN_DAYS)\n', (427, 451), False, 'from datetime import datetime, timedelta\n')]
# SPDX-License-Identifier: BSD-3-Clause from amaranth import Elaboratable, Module, Signal, ResetInserter, EnableInserter __all__ = ( 'PIC16Caravel', ) class PIC16Caravel(Elaboratable): def elaborate(self, platform): from .pic16 import PIC16 from .soc.busses.qspi import QSPIBus m = Module() reset = Signal() ...
[ "amaranth.EnableInserter", "amaranth.ResetInserter", "amaranth.Signal", "amaranth.Module" ]
[((292, 300), 'amaranth.Module', 'Module', ([], {}), '()\n', (298, 300), False, 'from amaranth import Elaboratable, Module, Signal, ResetInserter, EnableInserter\n'), ((311, 319), 'amaranth.Signal', 'Signal', ([], {}), '()\n', (317, 319), False, 'from amaranth import Elaboratable, Module, Signal, ResetInserter, EnableI...
from mrs.bucket import WriteBucket from mrs import BinWriter, HexWriter def test_writebucket(): b = WriteBucket(0, 0) b.addpair((4, 'test')) b.collect([(3, 'a'), (1, 'This'), (2, 'is')]) values = ' '.join(value for key, value in b) assert values == 'test a This is' b.sort() values = ' '.j...
[ "mrs.bucket.WriteBucket" ]
[((105, 122), 'mrs.bucket.WriteBucket', 'WriteBucket', (['(0)', '(0)'], {}), '(0, 0)\n', (116, 122), False, 'from mrs.bucket import WriteBucket\n'), ((421, 438), 'mrs.bucket.WriteBucket', 'WriteBucket', (['(0)', '(0)'], {}), '(0, 0)\n', (432, 438), False, 'from mrs.bucket import WriteBucket\n'), ((735, 790), 'mrs.bucke...
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and ...
[ "sys.exc_info", "re.compile" ]
[((7896, 7948), 're.compile', 're.compile', (['"""^.*\\\\$({(\\\\+|-?)(\\\\d+),(\\\\d+),(.)}).*$"""'], {}), "('^.*\\\\$({(\\\\+|-?)(\\\\d+),(\\\\d+),(.)}).*$')\n", (7906, 7948), False, 'import re\n'), ((7969, 8010), 're.compile', 're.compile', (['"""^.*\\\\$({(\\\\+|-?)(\\\\d+)}).*$"""'], {}), "('^.*\\\\$({(\\\\+|-?)(\...
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
[ "signal.signal", "swift.common.utils.validate_configuration", "sys.exit", "os.kill", "swift.common.utils.disable_fallocate", "swift.common.utils.capture_stdio", "time.tzset", "os.waitpid", "swift.common.utils.get_logger", "time.sleep", "swift.common.utils.get_hub", "os.killpg", "os._exit", ...
[((10760, 10795), 'swift.common.utils.modify_priority', 'utils.modify_priority', (['conf', 'logger'], {}), '(conf, logger)\n', (10781, 10795), False, 'from swift.common import utils\n'), ((11474, 11486), 'time.tzset', 'time.tzset', ([], {}), '()\n', (11484, 11486), False, 'import time\n'), ((1586, 1628), 'swift.common....
import resource_files resources = resource_files.ResourceFiles() # sample use case of getting yamls print(resources.get_yaml("Pod", "jumpy-shark-gbapp-frontend-844fdccf55-ggkbf", "default", "mycluster")) # sample use case of getting events print(resources.get_events('mycluster','default','78abd8c9-ac06-11e9-b68f-0e7...
[ "resource_files.ResourceFiles" ]
[((35, 65), 'resource_files.ResourceFiles', 'resource_files.ResourceFiles', ([], {}), '()\n', (63, 65), False, 'import resource_files\n')]
""" Project: flask-rest Author: <NAME> Description: Handle auth endpoints such as auth/signup, auth/login """ from api.v1 import make_json_ok_response, SageController, SageMethod from api.v1.fundamentals import helper from .auth_controller import AuthController def sage_auth_signup_function(self, resource, **kwargs):...
[ "api.v1.fundamentals.helper.parse_args_for_model", "api.v1.SageController" ]
[((378, 417), 'api.v1.fundamentals.helper.parse_args_for_model', 'helper.parse_args_for_model', (['_UserModel'], {}), '(_UserModel)\n', (405, 417), False, 'from api.v1.fundamentals import helper\n'), ((1116, 1194), 'api.v1.SageController', 'SageController', (['sage_auth_signup_function', 'SageMethod.POST'], {'authentic...
import random as rn import numpy as np # open system dynamics of a qubit and compare numerical results with the analytical calculations # NOTE these are also TUTORIALS of the library, so see the Tutorials for what these are doing and analytical # calculations. # currently includes 2 cases: (i) decay only, and (ii) un...
[ "numpy.exp", "random.random" ]
[((587, 598), 'random.random', 'rn.random', ([], {}), '()\n', (596, 598), True, 'import random as rn\n'), ((634, 690), 'numpy.exp', 'np.exp', (['(-(1e-05 * (decayRateSM + 1) * 2 + 1.0j) * 50 * t)'], {}), '(-(1e-05 * (decayRateSM + 1) * 2 + 1.0j) * 50 * t)\n', (640, 690), True, 'import numpy as np\n')]
#!/usr/bin/env python #=============================================================================# # # # NAME: do_RMsynth_1D.py # # ...
[ "math.sqrt", "RMutils.util_misc.toscalar", "numpy.isfinite", "sys.exit", "numpy.nanmin", "os.path.exists", "RMutils.util_misc.create_frac_spectra", "argparse.ArgumentParser", "numpy.diff", "os.path.split", "numpy.max", "numpy.linspace", "numpy.nanmax", "numpy.min", "RMutils.util_plotTk.p...
[((6474, 6508), 'os.path.splitext', 'os.path.splitext', (['args.dataFile[0]'], {}), '(args.dataFile[0])\n', (6490, 6508), False, 'import os\n'), ((7816, 7980), 'RMutils.util_misc.create_frac_spectra', 'create_frac_spectra', ([], {'freqArr': 'freqArr_GHz', 'IArr': 'IArr', 'QArr': 'QArr', 'UArr': 'UArr', 'dIArr': 'dIArr'...
# coding=utf-8 import ee from . import utils import json import csv from .. import tools def fromShapefile(filename, crs=None, start=None, end=None): """ Convert an ESRI file (.shp and .dbf must be present) to a ee.FeatureCollection At the moment only works for shapes with less than 1000 records and does...
[ "shapefile.Reader", "ee.feature.Feature", "csv.DictWriter", "json.loads", "ee.FeatureCollection", "ee.List", "ee.batch.data.getAssetRoots", "ee.Geometry", "ee.Feature", "os.path.join", "json.dumps", "os.getcwd", "ee.batch.Export.table.toAsset", "ee.Projection" ]
[((637, 663), 'ee.Projection', 'ee.Projection', (['"""EPSG:4326"""'], {}), "('EPSG:4326')\n", (650, 663), False, 'import ee\n'), ((701, 727), 'shapefile.Reader', 'shapefile.Reader', (['filename'], {}), '(filename)\n', (717, 727), False, 'import shapefile\n'), ((2313, 2343), 'ee.FeatureCollection', 'ee.FeatureCollection...
""" Contains functions to generate and combine a clustering ensemble. """ import numpy as np import pandas as pd from sklearn.metrics import pairwise_distances from sklearn.metrics import adjusted_rand_score as ari from sklearn.metrics import adjusted_mutual_info_score as ami from sklearn.metrics import normalized_mutu...
[ "numpy.mean", "numpy.median", "numpy.unique", "clustering.utils.reset_estimator", "sklearn.metrics.pairwise_distances", "concurrent.futures.as_completed", "numpy.array", "numpy.isnan", "concurrent.futures.ProcessPoolExecutor", "numpy.std", "pandas.DataFrame", "clustering.utils.compare_arrays" ...
[((4500, 4596), 'sklearn.metrics.pairwise_distances', 'pairwise_distances', (['ensemble.T'], {'metric': '_compare', 'n_jobs': 'n_jobs', 'force_all_finite': '"""allow-nan"""'}), "(ensemble.T, metric=_compare, n_jobs=n_jobs,\n force_all_finite='allow-nan')\n", (4518, 4596), False, 'from sklearn.metrics import pairwise...
import logging from django.db import transaction, connection from django.utils import timezone from django.utils.timezone import localtime from chart.application.enums.department_type import DepartmentType from chart.application.enums.gender_type import GenderType from chart.application.service.app_logic_base import ...
[ "chart.models.Departments.objects.all", "chart.models.Employees.objects.filter", "chart.models.Employees", "django.db.transaction.atomic", "chart.models.Departments.objects.filter", "django.utils.timezone.now", "django.db.connection.cursor", "chart.models.Departments" ]
[((542, 562), 'django.db.transaction.atomic', 'transaction.atomic', ([], {}), '()\n', (560, 562), False, 'from django.db import transaction, connection\n'), ((1209, 1229), 'django.db.transaction.atomic', 'transaction.atomic', ([], {}), '()\n', (1227, 1229), False, 'from django.db import transaction, connection\n'), ((1...
from flask import render_template def home(): return render_template('upload.html') def about(): return render_template('about.html')
[ "flask.render_template" ]
[((59, 89), 'flask.render_template', 'render_template', (['"""upload.html"""'], {}), "('upload.html')\n", (74, 89), False, 'from flask import render_template\n'), ((116, 145), 'flask.render_template', 'render_template', (['"""about.html"""'], {}), "('about.html')\n", (131, 145), False, 'from flask import render_templat...
# Copyright 2016 - Nokia, ZTE # # 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...
[ "vitrage.utils.file.list_files", "vitrage.utils.file.load_yaml_file", "oslo_log.log.getLogger" ]
[((997, 1020), 'oslo_log.log.getLogger', 'log.getLogger', (['__name__'], {}), '(__name__)\n', (1010, 1020), False, 'from oslo_log import log\n'), ((2380, 2443), 'vitrage.utils.file.list_files', 'file_utils.list_files', (['self.cfg.static.directory', '""".yaml"""', '(True)'], {}), "(self.cfg.static.directory, '.yaml', T...
from django.core.exceptions import NON_FIELD_ERRORS from rest_framework import status, viewsets, serializers from rest_framework.decorators import list_route from rest_framework.response import Response from rest_framework.serializers import ModelSerializer from jet_django.filters.model_aggregate import AggregateFilte...
[ "rest_framework.serializers.IntegerField", "rest_framework.decorators.list_route", "jet_django.filters.model_aggregate.AggregateFilter", "jet_django.serializers.reorder.reorder_serializer_factory", "rest_framework.response.Response", "rest_framework.serializers.CharField", "rest_framework.serializers.Mo...
[((648, 674), 'rest_framework.serializers.IntegerField', 'serializers.IntegerField', ([], {}), '()\n', (672, 674), False, 'from rest_framework import status, viewsets, serializers\n'), ((931, 954), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {}), '()\n', (952, 954), False, 'from rest_framework...
""" Weather functions. """ from ursina import color, window, time from nMap import nMap class Weather: def __init__(this, rate=1): this.red = 0 this.green = 200 this.blue = 211 this.darkling = 0 this.rate = rate this.towardsNight = 1 def setSky(this): ...
[ "nMap.nMap", "ursina.color.rgb" ]
[((325, 365), 'nMap.nMap', 'nMap', (['this.darkling', '(0)', '(100)', '(0)', 'this.red'], {}), '(this.darkling, 0, 100, 0, this.red)\n', (329, 365), False, 'from nMap import nMap\n'), ((374, 416), 'nMap.nMap', 'nMap', (['this.darkling', '(0)', '(100)', '(0)', 'this.green'], {}), '(this.darkling, 0, 100, 0, this.green)\...
import functools import gc from abc import ABC from sources.datasets.client_dataset_definitions.client_dataset_loaders.client_dataset_loader import ClientDatasetLoader, DatasetComponents from sources.datasets.client_dataset_definitions.client_dataset_processors.client_dataset_processor import ClientDatasetProcessor fr...
[ "gc.collect", "functools.wraps", "sources.utils.exception_definitions.OutsideOfContextError" ]
[((434, 455), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (449, 455), False, 'import functools\n'), ((5595, 5607), 'gc.collect', 'gc.collect', ([], {}), '()\n', (5605, 5607), False, 'import gc\n'), ((560, 845), 'sources.utils.exception_definitions.OutsideOfContextError', 'OutsideOfContextError', (...
import requests import os from PyInquirer import style_from_dict, Token, prompt import sys import utils.config as config import utils.ends as ends from utils.colorfy import * from auto.testing import test_trans import time import json style = style_from_dict({ Token.QuestionMark: '#E91E63 bold', Token.Selected: '#673...
[ "json.loads", "requests.post", "PyInquirer.prompt", "requests.get", "os.popen", "auto.testing.test_trans", "os.system", "PyInquirer.style_from_dict" ]
[((243, 442), 'PyInquirer.style_from_dict', 'style_from_dict', (["{Token.QuestionMark: '#E91E63 bold', Token.Selected: '#673AB7 bold', Token.\n Instruction: '#<PASSWORD>', Token.Answer: '#<PASSWORD> bold', Token.\n Question: '#<PASSWORD>16 bold'}"], {}), "({Token.QuestionMark: '#E91E63 bold', Token.Selected:\n ...
""" Provides a class that handles the fits metadata required by PypeIt. .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ import os import io import string from copy import deepcopy import datetime from IPython import embed import numpy as np import yaml fr...
[ "pypeit.core.framematch.FrameTypeBitMask", "astropy.table.Table", "pypeit.io.dict_to_lines", "pypeit.core.parse.str2list", "numpy.logical_not", "pypeit.msgs.newline", "numpy.isin", "numpy.argsort", "numpy.array", "pypeit.core.meta.convert_radec", "copy.deepcopy", "numpy.arange", "pypeit.msgs...
[((78727, 78740), 'numpy.all', 'np.all', (['match'], {}), '(match)\n', (78733, 78740), True, 'import numpy as np\n'), ((4634, 4663), 'pypeit.core.framematch.FrameTypeBitMask', 'framematch.FrameTypeBitMask', ([], {}), '()\n', (4661, 4663), False, 'from pypeit.core import framematch\n'), ((11930, 11956), 'pypeit.core.met...
from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from cms.models.fields import PlaceholderField from cms.utils import get_language_from_request from cms.utils.urlutils import admin_reverse from hvad.models import TranslatableModel,...
[ "django.db.models.DateField", "cms.models.fields.PlaceholderField", "django.core.urlresolvers.reverse", "cms.utils.get_language_from_request", "django.db.models.SlugField", "cms.utils.urlutils.admin_reverse", "django.db.models.CharField" ]
[((544, 587), 'django.db.models.CharField', 'models.CharField', (['u"""char_1"""'], {'max_length': '(255)'}), "(u'char_1', max_length=255)\n", (560, 587), False, 'from django.db import models\n'), ((601, 644), 'django.db.models.CharField', 'models.CharField', (['u"""char_2"""'], {'max_length': '(255)'}), "(u'char_2', m...
# Copyright 2017 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ "mock.patch", "repokid.role.Role", "time.time" ]
[((1527, 1572), 'mock.patch', 'patch', (['"""repokid.utils.roledata.expand_policy"""'], {}), "('repokid.utils.roledata.expand_policy')\n", (1532, 1572), False, 'from mock import patch\n'), ((1578, 1636), 'mock.patch', 'patch', (['"""repokid.utils.roledata.get_actions_from_statement"""'], {}), "('repokid.utils.roledata....
import rospy from sensor_msgs.msg import Image from std_msgs.msg import String from cv_bridge import CvBridge import cv2 import numpy as np import tensorflow as tf import classify_image class RosTensorFlow(): def __init__(self): classify_image.maybe_download_and_extract() self._session = tf.Sessio...
[ "rospy.Publisher", "rospy.Subscriber", "cv2.imencode", "rospy.init_node", "tensorflow.Session", "rospy.get_param", "numpy.squeeze", "cv_bridge.CvBridge", "rospy.spin", "classify_image.setup_args", "classify_image.NodeLookup", "classify_image.create_graph", "classify_image.maybe_download_and_...
[((1726, 1753), 'classify_image.setup_args', 'classify_image.setup_args', ([], {}), '()\n', (1751, 1753), False, 'import classify_image\n'), ((1758, 1790), 'rospy.init_node', 'rospy.init_node', (['"""rostensorflow"""'], {}), "('rostensorflow')\n", (1773, 1790), False, 'import rospy\n'), ((243, 286), 'classify_image.may...
import numpy as np def segment_Y(Y, **params): Y_segments = params.get("Y_segments") Y_quantile = params.get("Y_quantile") print("segmenting Y") Y = Y.values.reshape(-1) Y_quantile = np.quantile(Y, Y_quantile, axis = 0) bigger_mask = (Y > Y_quantile).copy() smaller_mask = (Y <= Y_quantile).copy() Y[bigger_...
[ "numpy.quantile" ]
[((191, 225), 'numpy.quantile', 'np.quantile', (['Y', 'Y_quantile'], {'axis': '(0)'}), '(Y, Y_quantile, axis=0)\n', (202, 225), True, 'import numpy as np\n')]
import mysql.connector import random from voice import synthetize_voice, delete_wav def AllQuestionAI(id_theme): i = 0 #CONNEXION A LA BDD conn = mysql.connector.connect(host="localhost", user="phpmyadmin", password="<PASSWORD>", datab...
[ "voice.delete_wav", "random.randint", "voice.synthetize_voice" ]
[((3440, 3469), 'voice.synthetize_voice', 'synthetize_voice', (['question[0]'], {}), '(question[0])\n', (3456, 3469), False, 'from voice import synthetize_voice, delete_wav\n'), ((3685, 3697), 'voice.delete_wav', 'delete_wav', ([], {}), '()\n', (3695, 3697), False, 'from voice import synthetize_voice, delete_wav\n'), (...
import numpy def lax_friedrichs(cons_minus, cons_plus, simulation, tl): alpha = tl.grid.dx / tl.dt flux = numpy.zeros_like(cons_minus) prim_minus, aux_minus = simulation.model.cons2all(cons_minus, tl.prim) prim_plus, aux_plus = simulation.model.cons2all(cons_plus , tl.prim) f_minus = simulation.m...
[ "numpy.zeros_like" ]
[((115, 143), 'numpy.zeros_like', 'numpy.zeros_like', (['cons_minus'], {}), '(cons_minus)\n', (131, 143), False, 'import numpy\n'), ((666, 694), 'numpy.zeros_like', 'numpy.zeros_like', (['cons_minus'], {}), '(cons_minus)\n', (682, 694), False, 'import numpy\n')]
from terra_sdk.exceptions import LCDResponseError from terrakg import logger # Logging from terrakg.client import ClientContainer logger = logger.get_logger(__name__) class Rates: """ Access the most recent rates. """ def __init__(self, client: ClientContainer): self.client = client de...
[ "terrakg.logger.get_logger", "terrakg.logger.warning" ]
[((142, 169), 'terrakg.logger.get_logger', 'logger.get_logger', (['__name__'], {}), '(__name__)\n', (159, 169), False, 'from terrakg import logger\n'), ((1272, 1318), 'terrakg.logger.warning', 'logger.warning', (['f"""Issue with price query: {e}"""'], {}), "(f'Issue with price query: {e}')\n", (1286, 1318), False, 'fro...
import bpy import os, glob from pathlib import Path from enum import Enum from abc import ABC, abstractmethod import csv from . import keying_module def export_tracking_data(self, context): clip = context.space_data.clip clip_name = os.path.splitext(clip.name)[0] tracker_name = context.scene.tracking_loca...
[ "bpy.props.PointerProperty", "bpy.utils.unregister_class", "bpy.props.StringProperty", "csv.writer", "bpy.props.FloatProperty", "os.path.splitext", "os.path.join", "bpy.utils.register_class" ]
[((563, 594), 'csv.writer', 'csv.writer', (['file'], {'delimiter': '""","""'}), "(file, delimiter=',')\n", (573, 594), False, 'import csv\n'), ((1251, 1350), 'bpy.props.StringProperty', 'bpy.props.StringProperty', ([], {'name': '"""Track name"""', 'description': '"""Name of the tracker for data export"""'}), "(name='Tr...
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * def GetViewTemplate(view): if not view: return None elif hasattr(view, "ViewTemplateId"): if view.ViewTemplateId.IntegerValue == -1: return None else: return view.Document.GetElement(view.ViewTemplateId) else: return None views = UnwrapEle...
[ "clr.AddReference" ]
[((11, 39), 'clr.AddReference', 'clr.AddReference', (['"""RevitAPI"""'], {}), "('RevitAPI')\n", (27, 39), False, 'import clr\n')]
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mail', '0108_auto_20171130_1004'), ] operations = [ migrations.AlterModelOptions( name='relaysenderwhitelist', ...
[ "django.db.migrations.AlterModelOptions" ]
[((248, 348), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""relaysenderwhitelist"""', 'options': "{'verbose_name': '中继发件人白名单'}"}), "(name='relaysenderwhitelist', options={\n 'verbose_name': '中继发件人白名单'})\n", (276, 348), False, 'from django.db import models, migrations\n')...
#!/usr/bin/env python """Schema validation of ansible-core's ansible_builtin_runtime.yml and collection's meta/runtime.yml""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import datetime import os import re import sys from distutils.version import StrictVersion, LooseVersion ...
[ "ansible.utils.version.SemanticVersion", "voluptuous.humanize.humanize_error", "voluptuous.Required", "distutils.version.StrictVersion", "ansible.release.__version__.split", "datetime.datetime.strptime", "re.match", "voluptuous.Any", "voluptuous.Invalid", "sys.stdin.read", "yaml.safe_load", "o...
[((1510, 1531), 'datetime.date.today', 'datetime.date.today', ([], {}), '()\n', (1529, 1531), False, 'import datetime\n'), ((2513, 2525), 'voluptuous.Invalid', 'Invalid', (['msg'], {}), '(msg)\n', (2520, 2525), False, 'from voluptuous import Required, Schema, Invalid\n'), ((4884, 4918), 'ansible.utils.version.SemanticV...
#!/usr/bin/env python3 """Find unicode control characters in source files By default the script takes one or more files or directories and looks for unicode control characters in all text files. To narrow down the files, provide a config file with the -c command line, defining a scan_exclude list, which should be a l...
[ "os.listdir", "argparse.ArgumentParser", "importlib.util.spec_from_file_location", "os.path.join", "magic.detect_from_filename", "unicodedata.category", "importlib.util.module_from_spec", "os.stat", "re.search" ]
[((2859, 2888), 'magic.detect_from_filename', 'magic.detect_from_filename', (['f'], {}), '(f)\n', (2885, 2888), False, 'import sys, os, argparse, re, unicodedata, magic\n'), ((3872, 3885), 'os.listdir', 'os.listdir', (['d'], {}), '(d)\n', (3882, 3885), False, 'import sys, os, argparse, re, unicodedata, magic\n'), ((414...
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) from __future__ import unicode_literals import time from datetime import datetime import mock import pytest from mock import MagicMock from pyVmomi import vim from datadog_checks.vsphere import VSphereCheck from...
[ "mock.patch", "pyVmomi.vim.event.HostEventArgument", "datetime.datetime.utcnow", "pyVmomi.vim.event.VmBeingHotMigratedEvent", "pyVmomi.vim.event.AlarmEventArgument", "mock.patch.object", "datadog_checks.vsphere.vsphere.SHORT_ROLLUP.items", "pyVmomi.vim.event.ManagedEntityEventArgument", "pyVmomi.vim...
[((1225, 1277), 'datadog_checks.vsphere.VSphereCheck', 'VSphereCheck', (['"""vsphere"""', 'init_config', '{}', '[instance]'], {}), "('vsphere', init_config, {}, [instance])\n", (1237, 1277), False, 'from datadog_checks.vsphere import VSphereCheck\n'), ((2031, 2074), 'datadog_checks.vsphere.VSphereCheck', 'VSphereCheck'...
# File taken from https://github.com/Ouranosinc/pavics-vdb/blob/master/catalog/tds.py """Utility function to parse metadata from a THREDDS Data Server catalog.""" def walk(cat, depth=1): """Return a generator walking a THREDDS data catalog for datasets. Parameters ---------- cat : TDSCatalog T...
[ "requests.get" ]
[((1578, 1595), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (1590, 1595), False, 'import requests\n')]
import numpy as np import random from collections import namedtuple def generate_prob_matrix(n): matrix = np.random.rand(n, n) for i in range(n): matrix[i][i] = 0 for i in range(n): matrix[i] = (1/np.sum(matrix[i]))*matrix[i] return matrix def categorical(p): return np.random...
[ "collections.namedtuple", "numpy.random.rand", "numpy.subtract", "numpy.sum", "numpy.zeros", "numpy.linalg.norm", "random.random" ]
[((357, 397), 'collections.namedtuple', 'namedtuple', (['"""Drone"""', '"""speed probability"""'], {}), "('Drone', 'speed probability')\n", (367, 397), False, 'from collections import namedtuple\n'), ((405, 435), 'collections.namedtuple', 'namedtuple', (['"""Site"""', '"""location"""'], {}), "('Site', 'location')\n", (...
#-*- coding:utf-8 -*- # &Author AnFany # 引入方法 import Kmeans_AnFany as K_Af # AnFany import Kmeans_Sklearn as K_Sk # Sklearn import matplotlib.pyplot as plt from pylab import mpl # 作图显示中文 mpl.rcParams['font.sans-serif'] = ['FangSong'] # 设置中文字体新宋体 mpl.rcParams['axes.unicode_minus'] = False import numpy as...
[ "numpy.mean", "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.legend", "matplotlib.pyplot.xlabel", "sklearn.datasets.make_blobs", "numpy.array", "numpy.sum", "Kmeans_AnFany.op_kmeans", "matplotlib.pyplot.scatter", "matplotlib.pyplot.axis", "Kmeans_Sklearn.KMeans", "...
[((393, 443), 'sklearn.datasets.make_blobs', 'make_blobs', ([], {'n_samples': '(600)', 'centers': '(6)', 'n_features': '(2)'}), '(n_samples=600, centers=6, n_features=2)\n', (403, 443), False, 'from sklearn.datasets import make_blobs\n'), ((964, 993), 'Kmeans_AnFany.op_kmeans', 'K_Af.op_kmeans', (['X'], {'countcen': '(...
#!/usr/bin/env python """ Control panel file """ import pddl_solver as pddl import ik import rospy from get_object_position import get_object_position import time from constants import * from spawn_models import reset_model_position, reset_all, spawn_model, spawn_all_models from delete_models import delete_all, de...
[ "spawn_models.reset_model_position", "spawn_models.spawn_model", "spawn_models.reset_all", "ik.MoveGroupPythonIntefaceTutorial", "get_object_position.get_object_position", "delete_models.delete_all", "rospy.sleep", "delete_models.delete_model" ]
[((365, 401), 'ik.MoveGroupPythonIntefaceTutorial', 'ik.MoveGroupPythonIntefaceTutorial', ([], {}), '()\n', (399, 401), False, 'import ik\n'), ((533, 560), 'get_object_position.get_object_position', 'get_object_position', (['bottle'], {}), '(bottle)\n', (552, 560), False, 'from get_object_position import get_object_pos...
from Enigma.Rotor import Rotor from Enigma.Reflector import Reflector from Enigma.Plugboard import Plugboard class Enigma: def __init__(self , rotors = [ Rotor(0,"IC") , Rotor(0,"IIC") , Rotor(0,"IIIC") ] , plugboard = Plugboard() , reflector = Reflector("A")): self.rotors = rotors for i in r...
[ "Enigma.Plugboard.Plugboard", "Enigma.Rotor.Rotor", "Enigma.Reflector.Reflector" ]
[((229, 240), 'Enigma.Plugboard.Plugboard', 'Plugboard', ([], {}), '()\n', (238, 240), False, 'from Enigma.Plugboard import Plugboard\n'), ((255, 269), 'Enigma.Reflector.Reflector', 'Reflector', (['"""A"""'], {}), "('A')\n", (264, 269), False, 'from Enigma.Reflector import Reflector\n'), ((164, 178), 'Enigma.Rotor.Roto...
import math from django.contrib.auth import get_user_model from django.contrib.sites.shortcuts import get_current_site from django.core.mail import send_mail from django.template import loader from magicauth import settings as magicauth_settings from django.conf import settings as django_settings from magicauth.model...
[ "django.contrib.auth.get_user_model", "magicauth.models.MagicToken.objects.create", "math.floor", "sendgrid.helpers.mail.Mail", "sendgrid.SendGridAPIClient", "django.template.loader.render_to_string", "django.contrib.sites.shortcuts.get_current_site" ]
[((441, 501), 'sendgrid.SendGridAPIClient', 'sendgrid.SendGridAPIClient', (['django_settings.SENDGRID_API_KEY'], {}), '(django_settings.SENDGRID_API_KEY)\n', (467, 501), False, 'import sendgrid\n'), ((678, 714), 'magicauth.models.MagicToken.objects.create', 'MagicToken.objects.create', ([], {'user': 'user'}), '(user=us...
import argparse from deploy_tix.bugzilla_rest_client import BugzillaRESTClient from deploy_tix.release_notes import ReleaseNotes from output_helper import OutputHelper def main(args=None): parser = argparse.ArgumentParser( description='Scripts for creating / updating deployment tickets in \ Bugzi...
[ "deploy_tix.release_notes.ReleaseNotes", "output_helper.OutputHelper", "deploy_tix.bugzilla_rest_client.BugzillaRESTClient", "argparse.ArgumentParser" ]
[((205, 379), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Scripts for creating / updating deployment tickets in Bugzilla"""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description=\n 'Scripts for creating / updating deployment tickets in Bugzi...
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
[ "numba.np.numpy_support.from_dtype", "numba.np.numpy_support.as_dtype", "numba.core.errors.TypingError", "numpy.find_common_type" ]
[((7400, 7457), 'numpy.find_common_type', 'numpy.find_common_type', (['np_array_dtypes', 'np_scalar_dtypes'], {}), '(np_array_dtypes, np_scalar_dtypes)\n', (7422, 7457), False, 'import numpy\n'), ((7483, 7524), 'numba.np.numpy_support.from_dtype', 'numpy_support.from_dtype', (['np_common_dtype'], {}), '(np_common_dtype...
import argparse import numpy as np import os import sys import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from saliency.visualizer.smiles_visualizer import SmilesVisualizer def visualize(dir_path): ...
[ "matplotlib.pyplot.ylabel", "argparse.ArgumentParser", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.max", "matplotlib.pyplot.close", "matplotlib.pyplot.scatter", "numpy.min", "numpy.concatenate", "matplotlib.pyplot.ylim", "numpy.abs", "matplotlib.pyplot.savefig", "matplotlib....
[((76, 97), 'matplotlib.use', 'matplotlib.use', (['"""agg"""'], {}), "('agg')\n", (90, 97), False, 'import matplotlib\n'), ((336, 361), 'os.path.dirname', 'os.path.dirname', (['dir_path'], {}), '(dir_path)\n', (351, 361), False, 'import os\n'), ((611, 629), 'saliency.visualizer.smiles_visualizer.SmilesVisualizer', 'Smi...
import numpy as np from PySide2.QtCore import QSignalBlocker, Signal from PySide2.QtWidgets import QGridLayout, QWidget from hexrd.ui.scientificspinbox import ScientificDoubleSpinBox DEFAULT_ENABLED_STYLE_SHEET = 'background-color: white' DEFAULT_DISABLED_STYLE_SHEET = 'background-color: #F0F0F0' INVALID_MATRIX_STY...
[ "hexrd.ui.scientificspinbox.ScientificDoubleSpinBox", "PySide2.QtWidgets.QGridLayout", "numpy.ones", "PySide2.QtCore.QSignalBlocker", "PySide2.QtCore.Signal", "PySide2.QtWidgets.QApplication", "numpy.array_equal", "sys.exit", "PySide2.QtWidgets.QVBoxLayout", "PySide2.QtWidgets.QDialog" ]
[((407, 415), 'PySide2.QtCore.Signal', 'Signal', ([], {}), '()\n', (413, 415), False, 'from PySide2.QtCore import QSignalBlocker, Signal\n'), ((6248, 6269), 'numpy.ones', 'np.ones', (['(rows, cols)'], {}), '((rows, cols))\n', (6255, 6269), True, 'import numpy as np\n'), ((6281, 6303), 'PySide2.QtWidgets.QApplication', ...
from typing import Tuple, Union, Any, Sequence from collections import deque, defaultdict, OrderedDict from ...validators.one import JustLen from ...functional.mixins import CompositionClassMixin from ..one import Just dict_keys = type({}.keys()) odict_keys = type(OrderedDict({}).keys()) dict_values = type({}.values()...
[ "collections.OrderedDict" ]
[((266, 281), 'collections.OrderedDict', 'OrderedDict', (['{}'], {}), '({})\n', (277, 281), False, 'from collections import deque, defaultdict, OrderedDict\n'), ((342, 357), 'collections.OrderedDict', 'OrderedDict', (['{}'], {}), '({})\n', (353, 357), False, 'from collections import deque, defaultdict, OrderedDict\n'),...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class OptionsConfig(AppConfig): name = 'rdmo.options' verbose_name = _('Options')
[ "django.utils.translation.ugettext_lazy" ]
[((169, 181), 'django.utils.translation.ugettext_lazy', '_', (['"""Options"""'], {}), "('Options')\n", (170, 181), True, 'from django.utils.translation import ugettext_lazy as _\n')]
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from main import models class Admin(UserAdmin): list_display = ("id", "username", "email", "date_joined", "last_login") admin.site.register(models.User, Admin) class DocumentAdmin(admin.ModelAdmin): list_display = ("id", "ti...
[ "django.contrib.admin.site.register" ]
[((210, 249), 'django.contrib.admin.site.register', 'admin.site.register', (['models.User', 'Admin'], {}), '(models.User, Admin)\n', (229, 249), False, 'from django.contrib import admin\n'), ((328, 379), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Document', 'DocumentAdmin'], {}), '(models.Do...
import json import logging import joblib import pandas as pd from flask import Flask, jsonify, request from flask_cors import CORS, cross_origin app = Flask(__name__) CORS(app) @app.route("/api/machinePrediction", methods=['GET']) def home(): incomingMachineId = request.args.get('machineId') modelPath = requ...
[ "flask.request.args.get", "json.loads", "flask_cors.CORS", "flask.Flask", "joblib.load", "pandas.DataFrame", "flask.jsonify" ]
[((153, 168), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (158, 168), False, 'from flask import Flask, jsonify, request\n'), ((169, 178), 'flask_cors.CORS', 'CORS', (['app'], {}), '(app)\n', (173, 178), False, 'from flask_cors import CORS, cross_origin\n'), ((270, 299), 'flask.request.args.get', 'reques...
import pytest from PySide2.QtGui import QVector3D from nexus_constructor.model.component import Component from nexus_constructor.model.dataset import Dataset from nexus_constructor.model.instrument import Instrument from nexus_constructor.model.value_type import ValueTypes values = Dataset( name="scalar_value", ...
[ "nexus_constructor.model.component.Component", "nexus_constructor.model.dataset.Dataset", "PySide2.QtGui.QVector3D", "nexus_constructor.model.instrument.Instrument" ]
[((285, 382), 'nexus_constructor.model.dataset.Dataset', 'Dataset', ([], {'name': '"""scalar_value"""', 'type': 'ValueTypes.DOUBLE', 'size': '[1]', 'values': '(90.0)', 'parent_node': 'None'}), "(name='scalar_value', type=ValueTypes.DOUBLE, size=[1], values=90.0,\n parent_node=None)\n", (292, 382), False, 'from nexus...
import pygame from loguru import logger from somegame.osd import OSD class FpsOSD(OSD): def __init__(self, game): super().__init__(game) logger.info('Loading font') self.font = pygame.font.Font(pygame.font.get_default_font(), 32) def draw(self, surface): fps = self.game.get_a...
[ "pygame.font.get_default_font", "loguru.logger.info" ]
[((160, 187), 'loguru.logger.info', 'logger.info', (['"""Loading font"""'], {}), "('Loading font')\n", (171, 187), False, 'from loguru import logger\n'), ((225, 255), 'pygame.font.get_default_font', 'pygame.font.get_default_font', ([], {}), '()\n', (253, 255), False, 'import pygame\n')]
import json import tornado.gen import traceback from base64 import b64encode from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPError from settings import Settings from mongo_db_controller import ZoomUserDB @tornado.gen.coroutine def zoomRefresh(zoom_user): url = "https://zoom.us/oauth/token" p...
[ "json.loads", "tornado.httpclient.HTTPRequest", "mongo_db_controller.ZoomUserDB.db.delete_user", "mongo_db_controller.ZoomUserDB.db.insert_user", "tornado.httpclient.AsyncHTTPClient", "traceback.print_exc" ]
[((820, 882), 'tornado.httpclient.HTTPRequest', 'HTTPRequest', (['url'], {'method': '"""POST"""', 'headers': 'headers', 'body': 'payload'}), "(url, method='POST', headers=headers, body=payload)\n", (831, 882), False, 'from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPError\n'), ((901, 918), 'tornado.http...
import sqlite3 from random import randint, choice import numpy as np conn = sqlite3.connect('ej.db') c = conn.cursor() #OBTENIENDO TAMAnOS MAXIMOS MINIMOS Y PROMEDIO# c.execute('SELECT MAX(alto) FROM features') resultado = c.fetchone() if resultado: altoMax = resultado[0] c.execute('SELECT MIN(alto) FROM featu...
[ "numpy.random.randint", "sqlite3.connect" ]
[((78, 102), 'sqlite3.connect', 'sqlite3.connect', (['"""ej.db"""'], {}), "('ej.db')\n", (93, 102), False, 'import sqlite3\n'), ((1413, 1448), 'numpy.random.randint', 'np.random.randint', (['(1)', 'rand_alto_min'], {}), '(1, rand_alto_min)\n', (1430, 1448), True, 'import numpy as np\n'), ((1450, 1486), 'numpy.random.ra...
# nuScenes dev-kit. # Code written by <NAME> & <NAME>, 2018. # Licensed under the Creative Commons [see licence.txt] import argparse import json import os import random import time from typing import Tuple, Dict, Any import numpy as np from nuscenes import NuScenes from nuscenes.eval.detection.algo import accumulate...
[ "nuscenes.eval.detection.config.config_factory", "nuscenes.eval.detection.algo.calc_ap", "argparse.ArgumentParser", "nuscenes.eval.detection.data_classes.MetricDataList", "nuscenes.NuScenes", "nuscenes.eval.detection.loaders.filter_eval_boxes", "os.path.isdir", "os.mkdir", "nuscenes.eval.detection.d...
[((9836, 9971), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Evaluate nuScenes result submission."""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description='Evaluate nuScenes result submission.',\n formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n", (...
# Copyright (c) 2014 <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, softwar...
[ "spdx.parsers.tagvaluebuilders.Builder", "spdx.parsers.loggers.StandardLogger", "spdx.version.Version", "spdx.parsers.lexers.tagvalue.Lexer", "sys.stdout.getvalue", "io.StringIO" ]
[((929, 936), 'spdx.parsers.lexers.tagvalue.Lexer', 'Lexer', ([], {}), '()\n', (934, 936), False, 'from spdx.parsers.lexers.tagvalue import Lexer\n'), ((16093, 16103), 'io.StringIO', 'StringIO', ([], {}), '()\n', (16101, 16103), False, 'from io import StringIO\n'), ((13202, 13211), 'spdx.parsers.tagvaluebuilders.Builde...
# Standard library imports from subprocess import call as subprocess_call from utility import fileexists from time import sleep as time_sleep from datetime import datetime mount_try = 1 not_yet = True done = False start_time = datetime.now() if fileexists("/home/rpi4-sftp/usb/drive_present.txt"): when_usba...
[ "datetime.datetime.now", "subprocess.call", "time.sleep", "utility.fileexists" ]
[((237, 251), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (249, 251), False, 'from datetime import datetime\n'), ((256, 307), 'utility.fileexists', 'fileexists', (['"""/home/rpi4-sftp/usb/drive_present.txt"""'], {}), "('/home/rpi4-sftp/usb/drive_present.txt')\n", (266, 307), False, 'from utility import f...