code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
import geopandas as gpd import pandas as pd from shapely.geometry.polygon import Polygon from shapely.geometry.multipolygon import MultiPolygon from shapely.geometry import Point import numpy as np import rasterio from rasterio.warp import calculate_default_transform, reproject, Resampling from rasterio.transform impor...
[ "math.asin", "pandas.read_csv", "geopandas.sjoin", "shapely.geometry.Point", "math.fmod", "math.pow", "math.radians", "urllib.request.urlopen", "geopandas.GeoDataFrame", "rasterio.features.shapes", "pandas.concat", "re.sub", "rasterio.warp.transform_geom", "matplotlib.pyplot.show", "math...
[((5829, 5842), 'urllib.request.urlopen', 'urlopen', (['link'], {}), '(link)\n', (5836, 5842), False, 'from urllib.request import urlopen\n'), ((6507, 6525), 'numpy.flipud', 'np.flipud', (['OPeNDAP'], {}), '(OPeNDAP)\n', (6516, 6525), True, 'import numpy as np\n'), ((6544, 6598), 'rasterio.transform.from_origin', 'from...
'''OpenGL extension APPLE.aux_depth_stencil This module customises the behaviour of the OpenGL.raw.GL.APPLE.aux_depth_stencil to provide a more Python-friendly API Overview (from the spec) Normally, each OpenGL drawable allocates at most one depth buffer and one stencil buffer, regardless of how many a...
[ "OpenGL.extensions.hasGLExtension" ]
[((2077, 2119), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['_EXTENSION_NAME'], {}), '(_EXTENSION_NAME)\n', (2102, 2119), False, 'from OpenGL import extensions\n')]
""" Created on 8 Jul 2021 @author: <NAME> (<EMAIL>) """ from collections import OrderedDict from scs_core.data.datum import Datum from scs_core.data.json import JSONable # -------------------------------------------------------------------------------------------------------------------- class PressureDatum(JSONa...
[ "collections.OrderedDict", "scs_core.data.datum.Datum.float" ]
[((1240, 1268), 'scs_core.data.datum.Datum.float', 'Datum.float', (['actual_press', '(1)'], {}), '(actual_press, 1)\n', (1251, 1268), False, 'from scs_core.data.datum import Datum\n'), ((1310, 1334), 'scs_core.data.datum.Datum.float', 'Datum.float', (['sl_press', '(1)'], {}), '(sl_press, 1)\n', (1321, 1334), False, 'fr...
# # Copyright (c) 2008-10, <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: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the f...
[ "llvmpy.api.llvm.Type.getFloatTy", "llvmpy.api.llvm.ConstantExpr.getPtrToInt", "llvmpy.api.llvm.ConstantExpr.getSizeOf", "llvmpy.api.llvm.ConstantExpr.getXor", "llvmpy.api.llvm.ConstantExpr.getUIToFP", "llvmpy.api.llvm.ConstantDataArray.getString", "llvmpy.api.llvm.Attributes.get", "llvmpy.api.llvm.Ty...
[((84840, 84873), 'llvmpy.api.llvm.InitializeNativeTarget', 'api.llvm.InitializeNativeTarget', ([], {}), '()\n', (84871, 84873), False, 'from llvmpy import api\n'), ((84929, 84972), 'llvmpy.api.llvm.InitializeNativeTargetAsmPrinter', 'api.llvm.InitializeNativeTargetAsmPrinter', ([], {}), '()\n', (84970, 84972), False, ...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ "grpc.insecure_channel", "pytest.mark.parametrize", "google.auth.credentials.AnonymousCredentials", "google.cloud.gaming_v1beta.services.game_server_deployments_service.transports.GameServerDeploymentsServiceGrpcAsyncIOTransport", "google.cloud.gaming_v1beta.services.game_server_deployments_service.transpor...
[((3559, 3681), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""client_class"""', '[GameServerDeploymentsServiceClient, GameServerDeploymentsServiceAsyncClient]'], {}), "('client_class', [GameServerDeploymentsServiceClient,\n GameServerDeploymentsServiceAsyncClient])\n", (3582, 3681), False, 'import pyte...
# This script contains imports to all Python libraries provided by components. # Use this script by importing it from your Python script. # e.g., # > import falconspy # import paths to all Python libraries provided by components # > import worldState # import worldState from worldModel # > ws = worldState.WorldSta...
[ "sys.path.append" ]
[((732, 803), 'sys.path.append', 'sys.path.append', (["(FALCONS_CODE_PATH + '/packages/facilities/rtdb/python')"], {}), "(FALCONS_CODE_PATH + '/packages/facilities/rtdb/python')\n", (747, 803), False, 'import sys\n'), ((849, 902), 'sys.path.append', 'sys.path.append', (["(FALCONS_CODE_PATH + '/build/codegen')"], {}), "...
import logging import logging.config logging.config.fileConfig('file.conf') # create logger logger = logging.getLogger('simpleExample') # 'application' code logger.debug('debug message') logger.info('info message') logger.warn('warn message') logger.error('error message') logger.critical('critical message') # Note ...
[ "logging.config.fileConfig", "logging.getLogger" ]
[((38, 76), 'logging.config.fileConfig', 'logging.config.fileConfig', (['"""file.conf"""'], {}), "('file.conf')\n", (63, 76), False, 'import logging\n'), ((103, 137), 'logging.getLogger', 'logging.getLogger', (['"""simpleExample"""'], {}), "('simpleExample')\n", (120, 137), False, 'import logging\n')]
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 """Main entry point for main.py execution which is executed from within AWS CodeBuild in the Master Account """ import os from thread import PropagatingThread import boto3 from botocore.exceptions import Clien...
[ "cloudformation.CloudFormation", "config.Config", "thread.PropagatingThread", "parameter_store.ParameterStore", "organizations.Organizations", "stepfunctions.StepFunctions", "s3.S3", "logger.configure_logger", "organization_policy.OrganizationPolicy", "cache.Cache", "sts.STS" ]
[((1038, 1064), 'logger.configure_logger', 'configure_logger', (['__name__'], {}), '(__name__)\n', (1054, 1064), False, 'from logger import configure_logger\n'), ((2382, 2448), 'parameter_store.ParameterStore', 'ParameterStore', (['deployment_account_region', 'deployment_account_role'], {}), '(deployment_account_region...
import os import glob import shutil import pytest import mumaxc as mc import discretisedfield as df import pytest @pytest.mark.oommf def test_stdprob4(): name = "stdprob4" # Remove any previous simulation directories. if os.path.exists(name): shutil.rmtree(name) L, d, th = 500e-9, 125e-9, 3e...
[ "shutil.rmtree", "mumaxc.TimeDriver", "os.path.exists", "mumaxc.Demag", "mumaxc.MinDriver", "mumaxc.Exchange", "os.path.isfile", "mumaxc.Zeeman", "mumaxc.Mesh", "mumaxc.Precession", "mumaxc.System", "os.path.join", "mumaxc.Damping", "discretisedfield.Field" ]
[((236, 256), 'os.path.exists', 'os.path.exists', (['name'], {}), '(name)\n', (250, 256), False, 'import os\n'), ((383, 423), 'mumaxc.Mesh', 'mc.Mesh', (['(0, 0, 0)', '(L, d, th)', 'cellsize'], {}), '((0, 0, 0), (L, d, th), cellsize)\n', (390, 423), True, 'import mumaxc as mc\n'), ((438, 458), 'mumaxc.System', 'mc.Syst...
import argparse import os import cv2 import numpy as np import pickle import pdb def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--fx', type=float, default=572.41140) parser.add_argument('--fy', type=float, default=573.57043) parser.add_argument('--px', type=float, default=325...
[ "cv2.line", "numpy.matrix", "cv2.bitwise_not", "argparse.ArgumentParser", "cv2.threshold", "numpy.float32", "numpy.zeros", "numpy.nonzero", "pickle.load", "numpy.array", "numpy.mean", "cv2.floodFill", "numpy.argwhere", "numpy.dot", "os.path.join", "os.listdir" ]
[((113, 138), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (136, 138), False, 'import argparse\n'), ((2840, 2931), 'numpy.matrix', 'np.matrix', (['[[args.fx, 0, args.px], [0, args.fy, args.py], [0, 0, 1]]'], {'dtype': 'np.float32'}), '([[args.fx, 0, args.px], [0, args.fy, args.py], [0, 0, 1]]...
import argparse parser = argparse.ArgumentParser() parser.add_argument('square', type=int, help='display a square of a given number') parser.add_argument('-v', '--verbosity', type=int, choices=[0, 1, 2], help='increase output verbosity') args = parser.parse_args() answer = args.s...
[ "argparse.ArgumentParser" ]
[((25, 50), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (48, 50), False, 'import argparse\n')]
# Authors: <NAME> (http://falexwolf.de) # <NAME> """Plotting functions for AnnData. """ import numpy as np import pandas as pd from scipy.sparse import issparse from matplotlib import pyplot as pl from matplotlib import rcParams from matplotlib.colors import is_color_like import seaborn as sns from .. import...
[ "numpy.abs", "scipy.sparse.issparse", "numpy.ones", "numpy.argsort", "matplotlib.pyplot.figure", "numpy.arange", "seaborn.FacetGrid", "numpy.unique", "pandas.DataFrame", "numpy.max", "matplotlib.colors.is_color_like", "seaborn.set_style", "matplotlib.pyplot.ylim", "numpy.median", "matplo...
[((12907, 13010), 'matplotlib.pyplot.figure', 'pl.figure', ([], {'figsize': "(n_cols * rcParams['figure.figsize'][0], n_rows * rcParams['figure.figsize'][1]\n )"}), "(figsize=(n_cols * rcParams['figure.figsize'][0], n_rows *\n rcParams['figure.figsize'][1]))\n", (12916, 13010), True, 'from matplotlib import pyplo...
#!/usr/bin/python3 """ 「現在確認している不具合について」の情報更新をチェックする """ import argparse import logging from pathlib import Path import difflib import configparser import sys import json from bs4 import BeautifulSoup import requests from discordwebhook import Discord logger = logging.getLogger(__name__) inifile = "fgoupdate.ini" bas...
[ "json.dump", "json.load", "argparse.ArgumentParser", "logging.basicConfig", "difflib.context_diff", "pathlib.Path", "requests.get", "bs4.BeautifulSoup", "configparser.ConfigParser", "logging.getLogger", "discordwebhook.Discord" ]
[((263, 290), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (280, 290), False, 'import logging\n'), ((459, 486), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (484, 486), False, 'import configparser\n'), ((744, 768), 'discordwebhook.Discord', 'Discord', ([],...
# Copyright 2019 <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 i...
[ "pathlib.Path.home" ]
[((805, 816), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (814, 816), False, 'from pathlib import Path\n')]
#!/usr/bin/env python3 # # This script accepts the name of a DSDL definition, or a DSDL namespace followed by a glob asterisk, # and prints its LaTeX representation into stdout. Usage examples: # # ./render_dsdl.py uavcan.node.* --index-only # Prints an index table of the namespace "uavcan.node". The in...
[ "functools.partial", "re.split", "pydsdl.read_namespace", "os.path.dirname", "subprocess.check_output", "sys.argv.remove", "collections.OrderedDict", "fnmatch.fnmatch", "os.path.join", "os.listdir" ]
[((1251, 1294), 'os.path.join', 'os.path.join', (['SOURCE_ROOT_DIRECTORY', '"""dsdl"""'], {}), "(SOURCE_ROOT_DIRECTORY, 'dsdl')\n", (1263, 1294), False, 'import os\n'), ((6026, 6039), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (6037, 6039), False, 'from collections import OrderedDict\n'), ((1191, 1216)...
# Calibration process # Generating quantization_stats.yaml in logs for static quantization import sys import subprocess as sp DATA_DIR = 'cifar10' model = 'preact_resnet20_cifar' pretrained_model = "checkpoint/preact_resnet20_cifar187_checkpoint.pth.tar" out_dir = 'logs' exp_name = 'calibration' if __name__ == "__...
[ "subprocess.call" ]
[((748, 804), 'subprocess.call', 'sp.call', (["(['python', 'classifier.py'] + args + extra_args)"], {}), "(['python', 'classifier.py'] + args + extra_args)\n", (755, 804), True, 'import subprocess as sp\n')]
from eos import CubicEosBase from scipy.constants import gas_constant import numpy as np class IsobaricIsothermalState: """ Constant pressure-temperature state for PR EoS """ def __init__(self, A, B): """ Parameters ---------- A : float Reduced attraction parameter...
[ "numpy.log" ]
[((1864, 1877), 'numpy.log', 'np.log', (['(z - B)'], {}), '(z - B)\n', (1870, 1877), True, 'import numpy as np\n')]
"""Register models with the Django admin.""" from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.conf import settings from .models import User, Notice, MediaImage from .admin_forms import NoticeAdminForm, UserCreati...
[ "django.contrib.admin.site.register", "django.contrib.admin.site.unregister" ]
[((2453, 2489), 'django.contrib.admin.site.register', 'admin.site.register', (['User', 'UserAdmin'], {}), '(User, UserAdmin)\n', (2472, 2489), False, 'from django.contrib import admin\n'), ((2490, 2530), 'django.contrib.admin.site.register', 'admin.site.register', (['Notice', 'NoticeAdmin'], {}), '(Notice, NoticeAdmin)...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='History', fields=[ ...
[ "django.db.models.CharField", "django.db.models.DateTimeField", "django.db.models.IntegerField", "django.db.models.AutoField" ]
[((332, 383), 'django.db.models.AutoField', 'models.AutoField', ([], {'serialize': '(False)', 'primary_key': '(True)'}), '(serialize=False, primary_key=True)\n', (348, 383), False, 'from django.db import migrations, models\n'), ((414, 445), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(10)'}),...
from random import randrange from .modular import jacobi from .util import descend, xxrange def solovayStrassen(n, a = None, trace = False, **kargs): """ Perform the Solovay-Strassen primality testing algorithm. Returns True if n is determined to be composite. Returns False if n is not determined to b...
[ "random.randrange" ]
[((631, 650), 'random.randrange', 'randrange', (['(2)', '(n - 1)'], {}), '(2, n - 1)\n', (640, 650), False, 'from random import randrange\n'), ((1574, 1593), 'random.randrange', 'randrange', (['(2)', '(n - 1)'], {}), '(2, n - 1)\n', (1583, 1593), False, 'from random import randrange\n')]
from flask import Flask, request from flask_cors import CORS, cross_origin import json from ad_search import AdSearch from ad_search import neuroSearch app = Flask(__name__) CORS(app) @app.route('/') def index(): return 'Hello' @app.route('/get') @cross_origin() def get(): search = AdSearch(request.args.get('v...
[ "flask.request.args.get", "flask_cors.CORS", "flask.Flask", "flask_cors.cross_origin", "ad_search.AdSearch", "ad_search.neuroSearch.predict_with_parse" ]
[((161, 176), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (166, 176), False, 'from flask import Flask, request\n'), ((177, 186), 'flask_cors.CORS', 'CORS', (['app'], {}), '(app)\n', (181, 186), False, 'from flask_cors import CORS, cross_origin\n'), ((256, 270), 'flask_cors.cross_origin', 'cross_origin',...
from __future__ import unicode_literals import os import dvc.logger as logger from dvc.command.base import CmdBase class CmdRoot(CmdBase): def run_cmd(self): return self.run() def run(self): logger.info(os.path.relpath(self.repo.root_dir)) return 0 def add_parser(subparsers, paren...
[ "os.path.relpath" ]
[((232, 267), 'os.path.relpath', 'os.path.relpath', (['self.repo.root_dir'], {}), '(self.repo.root_dir)\n', (247, 267), False, 'import os\n')]
import numpy as np import pandas as pd import ipaddress from .engineobj import SqPandasEngine class EvpnvniObj(SqPandasEngine): @staticmethod def table_name(): return 'evpnVni' def get(self, **kwargs) -> pd.DataFrame: """Class-specific to extract info from addnl tables""" drop_...
[ "pandas.DataFrame", "numpy.where", "ipaddress.IPv4Network" ]
[((11613, 11647), 'ipaddress.IPv4Network', 'ipaddress.IPv4Network', (['"""0.0.0.0/0"""'], {}), "('0.0.0.0/0')\n", (11634, 11647), False, 'import ipaddress\n'), ((3190, 3240), 'numpy.where', 'np.where', (["(df['vrf'] == '')", "df['master']", "df['vrf']"], {}), "(df['vrf'] == '', df['master'], df['vrf'])\n", (3198, 3240)...
from django.views.generic.detail import DetailView from pari.article.models import Author, get_author_articles from pari.article.mixins import ArticleListMixin class AuthorDetail(ArticleListMixin, DetailView): context_object_name = "author" model = Author def get_article_list_queryset(self): ret...
[ "pari.article.models.get_author_articles" ]
[((324, 356), 'pari.article.models.get_author_articles', 'get_author_articles', (['self.object'], {}), '(self.object)\n', (343, 356), False, 'from pari.article.models import Author, get_author_articles\n')]
import pygame import Person import Track class Game: def __init__(self, screen=(540, 840)): self.SCREEN = screen pygame.init() self.logo = pygame.image.load('images.jpg') pygame.display.set_icon(self.logo) pygame.display.set_caption('run') self.screen = pygame.disp...
[ "pygame.display.set_icon", "pygame.display.set_mode", "Track.Track", "pygame.init", "pygame.display.flip", "Track.Obstacle", "pygame.image.load", "pygame.display.set_caption", "Person.Person" ]
[((135, 148), 'pygame.init', 'pygame.init', ([], {}), '()\n', (146, 148), False, 'import pygame\n'), ((169, 200), 'pygame.image.load', 'pygame.image.load', (['"""images.jpg"""'], {}), "('images.jpg')\n", (186, 200), False, 'import pygame\n'), ((209, 243), 'pygame.display.set_icon', 'pygame.display.set_icon', (['self.lo...
import matplotlib.pyplot as plt import cv2 def visualize_bb(self, text_arr, bbs): ta = text_arr.copy() for r in bbs: cv2.rectangle(ta, (r[0], r[1]), (r[0] + r[2], r[1] + r[3]), color=128, thickness=1) plt.imshow(ta, cmap='gray') plt.show()
[ "matplotlib.pyplot.imshow", "matplotlib.pyplot.show", "cv2.rectangle" ]
[((268, 295), 'matplotlib.pyplot.imshow', 'plt.imshow', (['ta'], {'cmap': '"""gray"""'}), "(ta, cmap='gray')\n", (278, 295), True, 'import matplotlib.pyplot as plt\n'), ((300, 310), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (308, 310), True, 'import matplotlib.pyplot as plt\n'), ((136, 223), 'cv2.rectangl...
from meross_iot.supported_devices.power_plugs import Mss310 def build_wrapper( token, key, user_id, device_type, # type: str device_specs # type: dict ): if device_type.lower() == "mss310": return Mss310(token, key, user_id,**device_specs) else: return ...
[ "meross_iot.supported_devices.power_plugs.Mss310" ]
[((252, 295), 'meross_iot.supported_devices.power_plugs.Mss310', 'Mss310', (['token', 'key', 'user_id'], {}), '(token, key, user_id, **device_specs)\n', (258, 295), False, 'from meross_iot.supported_devices.power_plugs import Mss310\n')]
from rest_framework import serializers from people_control.models import Neoson from .models import DayOfWeek, Request, RequestType, Schedule, TimeSlot from people_control.serializers import NeosonSerializer class DayOfWeekSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = DayOfWeek ...
[ "people_control.serializers.NeosonSerializer", "people_control.models.Neoson.objects.all" ]
[((1264, 1296), 'people_control.serializers.NeosonSerializer', 'NeosonSerializer', ([], {'read_only': '(True)'}), '(read_only=True)\n', (1280, 1296), False, 'from people_control.serializers import NeosonSerializer\n'), ((2294, 2326), 'people_control.serializers.NeosonSerializer', 'NeosonSerializer', ([], {'read_only': ...
"""add class for comment Revision ID: <KEY> Revises: <KEY> Create Date: 2019-03-05 18:35:21.130131 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '<KEY>' branch_labels = None depends_on = None def upgrade(): # ### commands auto ge...
[ "sqlalchemy.String", "alembic.op.drop_column", "sqlalchemy.VARCHAR" ]
[((454, 502), 'alembic.op.drop_column', 'op.drop_column', (['"""comments"""', '"""comments_sentences"""'], {}), "('comments', 'comments_sentences')\n", (468, 502), False, 'from alembic import op\n'), ((750, 787), 'alembic.op.drop_column', 'op.drop_column', (['"""comments"""', '"""comment"""'], {}), "('comments', 'comme...
import rumps import os from subprocess import call FILE_NAME_STATUS = "gapak" class Gapa(rumps.App): def __init__(self, name): super().__init__(name, icon='images/circle.png', menu=['Toggle Desktop Items', None, 'Quit'], quit_button=None) try: with open(FILE_NAME_STATUS, "r") as fil...
[ "os.path.expanduser", "subprocess.call", "rumps.quit_application", "rumps.clicked" ]
[((469, 506), 'rumps.clicked', 'rumps.clicked', (['"""Toggle Desktop Items"""'], {}), "('Toggle Desktop Items')\n", (482, 506), False, 'import rumps\n'), ((856, 877), 'rumps.clicked', 'rumps.clicked', (['"""Quit"""'], {}), "('Quit')\n", (869, 877), False, 'import rumps\n'), ((1020, 1044), 'rumps.quit_application', 'rum...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
[ "pulumi.get", "pulumi.getter", "pulumi.set", "pulumi.InvokeOptions", "pulumi.runtime.invoke" ]
[((4047, 4078), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""autoRenew"""'}), "(name='autoRenew')\n", (4060, 4078), False, 'import pulumi\n'), ((5011, 5050), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""creationTimestamp"""'}), "(name='creationTimestamp')\n", (5024, 5050), False, 'import pulumi\n'), ((548...
from bxcommon.test_utils.abstract_test_case import AbstractTestCase from bxcommon.test_utils import helpers from bxcommon.utils import convert from bxgateway import eth_constants from bxgateway.utils.eth import crypto_utils from bxgateway.utils.eth.crypto_utils import generate_random_private_key_hex_str class Crypto...
[ "bxgateway.utils.eth.crypto_utils.recover_public_key", "bxcommon.utils.convert.hex_to_bytes", "bxgateway.utils.eth.crypto_utils.get_padded_len_16", "bxgateway.utils.eth.crypto_utils.sign", "bxgateway.utils.eth.crypto_utils.get_sha3_calculator", "bxgateway.utils.eth.crypto_utils.decode_signature", "bxcom...
[((526, 579), 'bxgateway.utils.eth.crypto_utils.private_to_public_key', 'crypto_utils.private_to_public_key', (['dummy_private_key'], {}), '(dummy_private_key)\n', (560, 579), False, 'from bxgateway.utils.eth import crypto_utils\n'), ((627, 658), 'bxcommon.test_utils.helpers.generate_bytearray', 'helpers.generate_bytea...
try: from setuptools import setup from setuptools import Extension except ImportError: from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize import os setup( ext_modules = cythonize("BeliefMapCython.pyx") )
[ "Cython.Build.cythonize" ]
[((252, 284), 'Cython.Build.cythonize', 'cythonize', (['"""BeliefMapCython.pyx"""'], {}), "('BeliefMapCython.pyx')\n", (261, 284), False, 'from Cython.Build import cythonize\n')]
import json def readFile(path): fopen = open(path, 'r', encoding='UTF-8') content = fopen.read() fopen.close() return content def readJsonFile(path): fopen = open(path, 'r', encoding='UTF-8') content = json.loads(fopen.read()) fopen.close() return content def saveFile(path, content...
[ "json.dumps" ]
[((534, 573), 'json.dumps', 'json.dumps', (['content'], {'ensure_ascii': '(False)'}), '(content, ensure_ascii=False)\n', (544, 573), False, 'import json\n')]
from PIL import Image import os CHARS = ["#", "?", "%", ".", "S", "+", "*", ":", ",", "@"] def resize(img, new_width=25): """ Resize the image to a new width. """ (old_width, old_height) = img.size aspect_ratio = float(old_height) / float(old_width) new_height = int(aspect_ratio * new_width) ...
[ "os.path.splitext", "PIL.Image.open" ]
[((1008, 1024), 'PIL.Image.open', 'Image.open', (['path'], {}), '(path)\n', (1018, 1024), False, 'from PIL import Image\n'), ((1038, 1060), 'os.path.splitext', 'os.path.splitext', (['path'], {}), '(path)\n', (1054, 1060), False, 'import os\n')]
from unittest import TestCase from robot import Robot class RobotTestCase(TestCase): def setUp(self): pass def tearDown(self): pass # Test default def test_default_load(self): robot = Robot() self.assertEqual(robot.right_motor_speed, 0) self.assertEqual(robot...
[ "robot.Robot" ]
[((228, 235), 'robot.Robot', 'Robot', ([], {}), '()\n', (233, 235), False, 'from robot import Robot\n'), ((454, 461), 'robot.Robot', 'Robot', ([], {}), '()\n', (459, 461), False, 'from robot import Robot\n'), ((950, 957), 'robot.Robot', 'Robot', ([], {}), '()\n', (955, 957), False, 'from robot import Robot\n')]
import os import sys import time import this import math import RPi.GPIO as gp import cv2 import subprocess fps = 30 gp.setwarnings(False) gp.setmode(gp.BOARD) gp.setup(7, gp.OUT) gp.setup(11, gp.OUT) gp.setup(12, gp.OUT) i2c ="i2cset -y 1 0x70 0x00 0x04" os.system(i2c) gp.output(7, False) gp.output(11, False) gp....
[ "RPi.GPIO.setmode", "RPi.GPIO.setup", "cv2.waitKey", "os.system", "time.sleep", "cv2.VideoCapture", "cv2.destoryAllWindows", "RPi.GPIO.output", "cv2.imshow", "RPi.GPIO.setwarnings", "cv2.namedWindow" ]
[((120, 141), 'RPi.GPIO.setwarnings', 'gp.setwarnings', (['(False)'], {}), '(False)\n', (134, 141), True, 'import RPi.GPIO as gp\n'), ((142, 162), 'RPi.GPIO.setmode', 'gp.setmode', (['gp.BOARD'], {}), '(gp.BOARD)\n', (152, 162), True, 'import RPi.GPIO as gp\n'), ((163, 182), 'RPi.GPIO.setup', 'gp.setup', (['(7)', 'gp.O...
"""Very low-level nginx config parser based on pyparsing.""" # Forked from https://github.com/fatiherikli/nginxparser (MIT Licensed) import copy import logging from pyparsing import ( Literal, White, Forward, Group, Optional, OneOrMore, QuotedString, Regex, ZeroOrMore, Combine) from pyparsing import stringEnd from...
[ "copy.deepcopy", "pyparsing.Regex", "pyparsing.White", "pyparsing.OneOrMore", "pyparsing.ZeroOrMore", "pyparsing.QuotedString", "pyparsing.Forward", "pyparsing.Group", "pyparsing.Literal", "logging.getLogger" ]
[((370, 397), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (387, 397), False, 'import logging\n'), ((845, 914), 'pyparsing.QuotedString', 'QuotedString', (['"""\\""""'], {'multiline': '(True)', 'unquoteResults': '(False)', 'escChar': '"""\\\\"""'}), '(\'"\', multiline=True, unquoteResul...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : <NAME> # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD from ipywidgets import (HBox, VBox, Dropdown, Button, Output, Checkbox) fr...
[ "matplotlib.pyplot.show", "ipywidgets.Button", "pandas.read_csv", "src.ipycbm.utils.config.read", "ipywidgets.Output", "ipywidgets.Dropdown", "ipywidgets.HBox", "ipywidgets.VBox", "matplotlib.dates.DateFormatter", "pandas.to_datetime", "matplotlib.pyplot.figure", "datetime.timedelta", "glob....
[((576, 589), 'src.ipycbm.utils.config.read', 'config.read', ([], {}), '()\n', (587, 589), False, 'from src.ipycbm.utils import config, data_options\n'), ((7629, 7705), 'ipywidgets.Checkbox', 'Checkbox', ([], {'value': '(True)', 'description': '"""Cloud free"""', 'disabled': '(False)', 'indent': '(False)'}), "(value=Tr...
import numpy as np import sklearn.cluster from ._query import ApproximateRangeQuery NOISE = 0 class DBSCAN: def __init__(self, metric, eps, min_samples): self.eps = eps self.min_samples = min_samples self.metric = metric def _pairwise_distance_matrix(self, data): n = len(da...
[ "numpy.zeros" ]
[((346, 362), 'numpy.zeros', 'np.zeros', (['(n, n)'], {}), '((n, n))\n', (354, 362), True, 'import numpy as np\n')]
import time import simdjson parser = simdjson.Parser() from fastapi import FastAPI from fastapi.responses import HTMLResponse app = FastAPI() with open('./result.json', 'rb') as fin: pj = parser.parse(fin.read()) messages = pj['messages'].as_list() @app.get("/") async def root(): return {"message": "H...
[ "time.time", "fastapi.responses.HTMLResponse", "simdjson.Parser", "fastapi.FastAPI" ]
[((38, 55), 'simdjson.Parser', 'simdjson.Parser', ([], {}), '()\n', (53, 55), False, 'import simdjson\n'), ((135, 144), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (142, 144), False, 'from fastapi import FastAPI\n'), ((447, 458), 'time.time', 'time.time', ([], {}), '()\n', (456, 458), False, 'import time\n'), ((618...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-18 13:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quizard', '0002_auto_20170811_2336'), ] operations = [ migrations.AddField(...
[ "django.db.models.BooleanField" ]
[((419, 452), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(True)'}), '(default=True)\n', (438, 452), False, 'from django.db import migrations, models\n')]
""" 生成指定长度的验证码,由大小写字母和数字组成 """ import random def generate_code(code_len=4): """ 生成指定长度的验证码 :param code_len: 验证码的长度(默认4个字符) :return: 由大小写英文字母和数字构成的随机验证码 """ all_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' last_pos = len(all_chars) - 1 code = ''...
[ "random.randint" ]
[((369, 396), 'random.randint', 'random.randint', (['(0)', 'last_pos'], {}), '(0, last_pos)\n', (383, 396), False, 'import random\n')]
from datetime import timedelta import logging from django.utils.timezone import now from django.core.management.base import BaseCommand from TWLight.users.models import Editor from TWLight.users.helpers.editor_data import ( editor_global_userinfo, editor_valid, editor_enough_edits, editor_not_blocked, ...
[ "TWLight.users.helpers.editor_data.editor_not_blocked", "TWLight.users.helpers.editor_data.editor_global_userinfo", "TWLight.users.helpers.editor_data.editor_account_old_enough", "django.utils.timezone.now", "TWLight.users.helpers.editor_data.editor_valid", "TWLight.users.helpers.editor_data.editor_bundle...
[((391, 418), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (408, 418), False, 'import logging\n'), ((1918, 1923), 'django.utils.timezone.now', 'now', ([], {}), '()\n', (1921, 1923), False, 'from django.utils.timezone import now\n'), ((2029, 2049), 'TWLight.users.models.Editor.objects.al...
import sympy import pytest import numpy as np from sympy import Symbol from devito import (Constant, Dimension, Grid, Function, solve, TimeFunction, Eq, # noqa Operator, SubDimension, norm, Le, Ge, Gt, Lt) from devito.ir import Expression, FindNodes from devito.symbolics import (retrieve_functions...
[ "devito.types.Array", "devito.solve", "devito.SubDimension.left", "devito.symbolics.retrieve_indexed", "devito.SubDimension.middle", "pytest.mark.parametrize", "devito.Ge", "devito.Constant", "devito.Function", "devito.symbolics.FieldFromComposite", "devito.TimeFunction", "pytest.raises", "d...
[((1012, 1135), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""dtype,expected"""', "[(np.float32, 'float r0 = 1.0F/h_x;'), (np.float64, 'double r0 = 1.0/h_x;')]"], {}), "('dtype,expected', [(np.float32,\n 'float r0 = 1.0F/h_x;'), (np.float64, 'double r0 = 1.0/h_x;')])\n", (1035, 1135), False, 'import py...
from django.contrib.auth import views as auth_views from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm from django.contrib.auth.models import User from django.contrib.auth.tokens import default_token_generator from django.utils.encoding import force_bytes from django.utils.http import urlsafe_base...
[ "django.utils.encoding.force_bytes", "django.contrib.auth.models.User.objects.create", "django.urls.reverse", "django.urls.resolve", "django.contrib.auth.tokens.default_token_generator.make_token" ]
[((511, 545), 'django.urls.reverse', 'reverse', (['"""accounts:password_reset"""'], {}), "('accounts:password_reset')\n", (518, 545), False, 'from django.urls import reverse, resolve\n'), ((611, 628), 'django.urls.resolve', 'resolve', (['self.url'], {}), '(self.url)\n', (618, 628), False, 'from django.urls import rever...
# [h] switch glyph dialog # imports from mojo.roboFont import AllFonts, CurrentFont, CurrentGlyph from mojo.UI import CurrentGlyphWindow, OpenGlyphWindow from mojo.events import addObserver, removeObserver from vanilla import * from hTools2 import hDialog from hTools2.modules.fontutils import get_full_name, get_glyp...
[ "mojo.roboFont.CurrentFont", "mojo.roboFont.CurrentGlyph", "mojo.UI.OpenGlyphWindow", "mojo.events.removeObserver", "mojo.UI.CurrentGlyphWindow", "hTools2.modules.fontutils.get_glyphs", "hTools2.modules.fontutils.get_full_name", "mojo.events.addObserver", "mojo.roboFont.AllFonts" ]
[((5142, 5152), 'mojo.roboFont.AllFonts', 'AllFonts', ([], {}), '()\n', (5150, 5152), False, 'from mojo.roboFont import AllFonts, CurrentFont, CurrentGlyph\n'), ((6471, 6491), 'mojo.UI.CurrentGlyphWindow', 'CurrentGlyphWindow', ([], {}), '()\n', (6489, 6491), False, 'from mojo.UI import CurrentGlyphWindow, OpenGlyphWin...
import matplotlib.pyplot as plt from typing import List from modules.Simbad import DataBank, SpaceObject db = DataBank() db.LoadDB("./db.sdb") print("[DB] Loaded " + str(len(db.objs)) + " entries") # Add new stars STAR_COUNT = 2000 STEP = 1 newStars = 0 for i in range(1, STAR_COUNT * STEP + 1, STEP): id = "HD "...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.axis", "modules.Simbad.DataBank", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((111, 121), 'modules.Simbad.DataBank', 'DataBank', ([], {}), '()\n', (119, 121), False, 'from modules.Simbad import DataBank, SpaceObject\n'), ((600, 632), 'matplotlib.pyplot.axis', 'plt.axis', (['[40000, 2000, 15, -10]'], {}), '([40000, 2000, 15, -10])\n', (608, 632), True, 'import matplotlib.pyplot as plt\n'), ((66...
# Generated by Django 3.1.1 on 2020-12-26 21:50 import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboard', '0034_auto_20201226_2150'), ] operations = [ migrations.AddField( model_name='sleepnight...
[ "django.db.models.ForeignKey" ]
[((366, 457), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""dashboard.csvdata"""'}), "(on_delete=django.db.models.deletion.CASCADE, to=\n 'dashboard.csvdata')\n", (383, 457), False, 'from django.db import migrations, models\n'), ((613, 704), 'dj...
#!/usr/bin/python3 """ The use of continuum solvation methods such as APBS requires accurate and complete structural data as well as force field parameters such as atomic charges and radii. Unfortunately, the limiting step in continuum electrostatics calculations is often the addition of missing atomic coordinates to ...
[ "setuptools.find_packages" ]
[((2603, 2678), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['pdb2pka', '*.pdb2pka', 'pdb2pka.*', '*.pdb2pka.*']"}), "(exclude=['pdb2pka', '*.pdb2pka', 'pdb2pka.*', '*.pdb2pka.*'])\n", (2616, 2678), False, 'from setuptools import find_packages, setup\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : <NAME>, <NAME> # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD import json import psycopg2 import psycopg2.extras import logging im...
[ "json.load", "logging.debug", "json.loads", "pandas.to_datetime", "scripts.db.conn", "pandas.read_sql_query", "pandas.DateOffset" ]
[((703, 725), 'scripts.db.conn', 'db.conn', (["dataset['db']"], {}), "(dataset['db'])\n", (710, 725), False, 'from scripts import db\n'), ((3016, 3038), 'scripts.db.conn', 'db.conn', (["dataset['db']"], {}), "(dataset['db'])\n", (3023, 3038), False, 'from scripts import db\n'), ((5269, 5291), 'scripts.db.conn', 'db.con...
import threading import time from functools import wraps from trashguy import TrashGuy class Anim: def __init__(self, text: str = 'Loading', speed: int = 0.2): self.text: str = text self.speed: int = speed self.thread: threading.Thread = threading.Thread() self.trash_anim: TrashG...
[ "threading.Thread", "trashguy.TrashGuy", "functools.wraps", "time.sleep" ]
[((270, 288), 'threading.Thread', 'threading.Thread', ([], {}), '()\n', (286, 288), False, 'import threading\n'), ((325, 344), 'trashguy.TrashGuy', 'TrashGuy', (['self.text'], {}), '(self.text)\n', (333, 344), False, 'from trashguy import TrashGuy\n'), ((943, 979), 'threading.Thread', 'threading.Thread', ([], {'target'...
from tokenizers import Tokenizer from megatron.tokenizer.tokenizer import HFTokenizer filepath = 'data/tokenizer/20B_tokenizer.json' tokenizer = HFTokenizer(filepath) hello_ids = tokenizer.tokenize("hello") print(hello_ids) ids = tokenizer.tokenize('}{') print(ids) ids = tokenizer.tokenize('---') print(ids) start_id...
[ "megatron.tokenizer.tokenizer.HFTokenizer" ]
[((147, 168), 'megatron.tokenizer.tokenizer.HFTokenizer', 'HFTokenizer', (['filepath'], {}), '(filepath)\n', (158, 168), False, 'from megatron.tokenizer.tokenizer import HFTokenizer\n')]
import torch import time import numpy as np import os from mesh_net import network from mesh_net.mesh import Mesh import pickle from config import config torch.backends.cudnn.enabled = False def data_pad(input_arr, target_length, val=0, dim=1): shp = input_arr.shape npad = [(0, 0) for _ in range(len(shp))] ...
[ "numpy.pad", "mesh_net.network.define_classifier", "torch.save", "os.path.isfile", "pickle.load", "numpy.array", "numpy.loadtxt", "mesh_net.mesh.Mesh", "torch.device", "torch.no_grad" ]
[((375, 446), 'numpy.pad', 'np.pad', (['input_arr'], {'pad_width': 'npad', 'mode': '"""constant"""', 'constant_values': 'val'}), "(input_arr, pad_width=npad, mode='constant', constant_values=val)\n", (381, 446), True, 'import numpy as np\n'), ((1110, 1134), 'numpy.loadtxt', 'np.loadtxt', (['classes_file'], {}), '(class...
#!/usr/bin/env python3 """geojson2kml.py: Convert geometry data from a JSON format into KML format suitable for editing in Google Maps KML viewer. The user can provide one or more JSON feature IDs as arguments to the script, and each geometric entity will be exported into the KML file. Usage: geojson2k...
[ "sys.stderr.write", "re.fullmatch", "json.loads", "sys.exit" ]
[((984, 1069), 're.fullmatch', 're.fullmatch', (['"""\\\\s*(\\\\w+)\\\\s*=\\\\s*(.*);\\\\s*"""', 'fullfile', '(re.MULTILINE | re.DOTALL)'], {}), "('\\\\s*(\\\\w+)\\\\s*=\\\\s*(.*);\\\\s*', fullfile, re.MULTILINE | re.DOTALL\n )\n", (996, 1069), False, 'import re\n'), ((1117, 1136), 'json.loads', 'json.loads', (['var...
import argparse from loader import BioDataset import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from tqdm import tqdm import numpy as np from model import GNN from sklearn.metrics import roc_auc_score import pandas as pd from util import ExtractSubstructureContextPair ...
[ "tqdm.tqdm", "torch.nn.BCEWithLogitsLoss", "argparse.ArgumentParser", "numpy.random.seed", "torch_geometric.nn.global_add_pool", "torch.manual_seed", "util.ExtractSubstructureContextPair", "torch.cat", "torch_geometric.nn.global_mean_pool", "torch.cuda.manual_seed_all", "model.GNN", "torch.cud...
[((822, 844), 'torch.nn.BCEWithLogitsLoss', 'nn.BCEWithLogitsLoss', ([], {}), '()\n', (842, 844), True, 'import torch.nn as nn\n'), ((774, 793), 'torch.arange', 'torch.arange', (['shift'], {}), '(shift)\n', (786, 793), False, 'import torch\n'), ((4507, 4614), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {...
import os RELEASE_FILE_PATH = "RELEASE.md" GITHUB_SHA = os.environ["GITHUB_SHA"] GITHUB_EVENT_PATH = os.environ["GITHUB_EVENT_PATH"] GITHUB_WORKSPACE = os.environ["GITHUB_WORKSPACE"] GITHUB_TOKEN = os.environ.get("BOTBERRY_GITHUB_TOKEN", os.environ["GITHUB_TOKEN"])
[ "os.environ.get" ]
[((200, 267), 'os.environ.get', 'os.environ.get', (['"""BOTBERRY_GITHUB_TOKEN"""', "os.environ['GITHUB_TOKEN']"], {}), "('BOTBERRY_GITHUB_TOKEN', os.environ['GITHUB_TOKEN'])\n", (214, 267), False, 'import os\n')]
# Generated by Django 3.0.3 on 2020-05-29 22:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('registration', '0007_auto_20200525_1208'), ('likes', '0004_auto_20200529_1840'), ] operations = [ m...
[ "django.db.models.ForeignKey" ]
[((416, 510), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""registration.Profile"""'}), "(on_delete=django.db.models.deletion.CASCADE, to=\n 'registration.Profile')\n", (433, 510), False, 'from django.db import migrations, models\n')]
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ "knack.arguments.CLIArgumentType" ]
[((629, 723), 'knack.arguments.CLIArgumentType', 'CLIArgumentType', ([], {'options_list': '"""--init-name-name"""', 'help': '"""Name of the Init."""', 'id_part': '"""name"""'}), "(options_list='--init-name-name', help='Name of the Init.',\n id_part='name')\n", (644, 723), False, 'from knack.arguments import CLIArgum...
from rest_framework import serializers from app_idea_feed.serializers import IdeaFeedItemSerializer from user_profiles_api.serializers import UserProfileSerializer from app_user_actions.serializers import UserLikedIdeasSerializer, \ IdeaLikedByUsersSerializer, IdeaCommentByUsersSerializer from app_user_actions.mo...
[ "app_user_actions.serializers.IdeaLikedByUsersSerializer", "app_idea_feed.serializers.IdeaFeedItemSerializer", "app_user_actions.serializers.IdeaCommentByUsersSerializer", "user_profiles_api.serializers.UserProfileSerializer" ]
[((534, 557), 'user_profiles_api.serializers.UserProfileSerializer', 'UserProfileSerializer', ([], {}), '()\n', (555, 557), False, 'from user_profiles_api.serializers import UserProfileSerializer\n'), ((574, 598), 'app_idea_feed.serializers.IdeaFeedItemSerializer', 'IdeaFeedItemSerializer', ([], {}), '()\n', (596, 598)...
import json import logging import logging.handlers import pytest from ethereum import slogging @pytest.mark.parametrize('level_name', ['critical', 'error', 'warning', 'info', 'debug', 'trace']) def test_basic(caplog, level_name): slogging.configure(":trace") log = slogging.get_logger() with caplog.at_leve...
[ "ethereum.slogging.get_logger", "ethereum.slogging.set_level", "ethereum.slogging.configure", "ethereum.slogging.LogRecorder", "logging.Filter", "ethereum.slogging.DEBUG", "ethereum.slogging.getLogger", "ethereum.slogging.get_logger_names", "pytest.mark.parametrize", "ethereum.slogging.log_listene...
[((98, 199), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""level_name"""', "['critical', 'error', 'warning', 'info', 'debug', 'trace']"], {}), "('level_name', ['critical', 'error', 'warning',\n 'info', 'debug', 'trace'])\n", (121, 199), False, 'import pytest\n'), ((6136, 6293), 'pytest.mark.parametrize...
# Generated by Django 3.2.6 on 2021-09-06 03:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('checklist', '0009_auto_20210826_2336'), ] operations = [ migrations.AddField( model_name='card', name='poke_sprite',...
[ "django.db.models.ImageField" ]
[((339, 381), 'django.db.models.ImageField', 'models.ImageField', ([], {'default': '(1)', 'upload_to': '""""""'}), "(default=1, upload_to='')\n", (356, 381), False, 'from django.db import migrations, models\n'), ((505, 547), 'django.db.models.ImageField', 'models.ImageField', ([], {'default': '(1)', 'upload_to': '"""""...
from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph.functions as fn __all__ = ['ArrowItem'] class ArrowItem(QtGui.QGraphicsPolygonItem): """ For displaying scale-invariant arrows. For arrows pointing to a location on a curve, see CurveArrow """ def __init__(self, **opts): ...
[ "pyqtgraph.Qt.QtGui.QGraphicsPolygonItem.paint", "pyqtgraph.functions.mkBrush", "pyqtgraph.functions.mkPen", "pyqtgraph.Qt.QtGui.QPolygonF", "pyqtgraph.Qt.QtCore.QPointF" ]
[((1983, 2031), 'pyqtgraph.Qt.QtGui.QGraphicsPolygonItem.paint', 'QtGui.QGraphicsPolygonItem.paint', (['self', 'p', '*args'], {}), '(self, p, *args)\n', (2015, 2031), False, 'from pyqtgraph.Qt import QtGui, QtCore\n'), ((887, 911), 'pyqtgraph.functions.mkPen', 'fn.mkPen', (["defOpts['pen']"], {}), "(defOpts['pen'])\n",...
import imp import os import io import sys from mock import patch from gp_unittest import GpTestCase class GpSshTestCase(GpTestCase): def setUp(self): # because gpssh does not have a .py extension, we have to use imp to import it # if we had a gpssh.py, this is equivalent to: # import g...
[ "imp.load_source", "os.path.dirname", "io.BytesIO", "mock.patch" ]
[((630, 647), 'mock.patch', 'patch', (['"""sys.exit"""'], {}), "('sys.exit')\n", (635, 647), False, 'from mock import patch\n'), ((1091, 1108), 'mock.patch', 'patch', (['"""sys.exit"""'], {}), "('sys.exit')\n", (1096, 1108), False, 'from mock import patch\n'), ((465, 501), 'imp.load_source', 'imp.load_source', (['"""gp...
from zope.app.locales.extract import POTMaker, POTEntry from zope.app.locales.extract import py_strings from zope.app.locales.extract import tal_strings from babel.messages.pofile import normalize from zope.i18nmessageid import Message from zope.app.locales.pygettext import make_escapes make_escapes(1) class CCPOTEnt...
[ "zope.app.locales.extract.py_strings", "zope.app.locales.pygettext.make_escapes", "babel.messages.pofile.normalize", "zope.app.locales.extract.tal_strings" ]
[((289, 304), 'zope.app.locales.pygettext.make_escapes', 'make_escapes', (['(1)'], {}), '(1)\n', (301, 304), False, 'from zope.app.locales.pygettext import make_escapes\n'), ((1695, 1729), 'zope.app.locales.extract.py_strings', 'py_strings', (['"""cc/engine/"""', '"""cc_org"""'], {}), "('cc/engine/', 'cc_org')\n", (170...
import numpy as np import random import torch def setup_determinism(seed): torch.backends.cudnn.deterministic = True torch.backends.cudnn.benchmark = False torch.manual_seed(seed) np.random.seed(seed) random.seed(seed)
[ "torch.manual_seed", "random.seed", "numpy.random.seed" ]
[((170, 193), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (187, 193), False, 'import torch\n'), ((198, 218), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (212, 218), True, 'import numpy as np\n'), ((223, 240), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (234...
import komand from .schema import ListTasksInput, ListTasksOutput # Custom imports below import json import requests class ListTasks(komand.Action): def __init__(self): super(self.__class__, self).__init__( name="list_tasks", description="Returns list of tasks", input=...
[ "requests.get" ]
[((980, 1002), 'requests.get', 'requests.get', (['endpoint'], {}), '(endpoint)\n', (992, 1002), False, 'import requests\n')]
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## 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 ## ## h...
[ "twisted.python.log.startLogging", "autobahn.wamp1.protocol.WampClientFactory", "autobahn.twisted.websocket.connectWS", "autobahn.wamp1.protocol.exportRpc", "twisted.internet.reactor.run", "time.localtime" ]
[((1124, 1144), 'autobahn.wamp1.protocol.exportRpc', 'exportRpc', (['"""getTime"""'], {}), "('getTime')\n", (1133, 1144), False, 'from autobahn.wamp1.protocol import exportRpc, WampClientFactory, WampClientProtocol\n'), ((1495, 1552), 'autobahn.wamp1.protocol.WampClientFactory', 'WampClientFactory', (['"""ws://localhos...
import face_alignment from ..Abstract import FaceDetector, LandmarksDetector class Adrian_Face(FaceDetector, LandmarksDetector): S3FD = 'sfd' BlazeFace = 'blazeface' ''' Dlib = 'dlib' I can't use it on my device(I guess some bugs related to dlib-gpu version occurred) ''' Landmarks_2D = fa...
[ "face_alignment.FaceAlignment" ]
[((508, 603), 'face_alignment.FaceAlignment', 'face_alignment.FaceAlignment', (['landmarksType'], {'flip_input': '(False)', 'face_detector': 'face_detector'}), '(landmarksType, flip_input=False, face_detector\n =face_detector)\n', (536, 603), False, 'import face_alignment\n')]
# -*- coding: utf-8 -*- """ Kubios Import & Export ---------------------- This module provides functions to export NN/RR interval series in KUBIOS readable formats and import KUBIOS HRV results from KUBIOS report files in .TXT format. Notes ----- .. This module is part of the master thesis "Development of an Open-S...
[ "numpy.load", "json.load", "datetime.datetime.now", "os.path.isfile", "os.path.split", "os.path.join" ]
[((4230, 4253), 'os.path.split', 'os.path.split', (['__file__'], {}), '(__file__)\n', (4243, 4253), False, 'import os\n'), ((5786, 5813), 'numpy.load', 'np.load', (['"""SampleSeries.npy"""'], {}), "('SampleSeries.npy')\n", (5793, 5813), True, 'import numpy as np\n'), ((4326, 4338), 'json.load', 'json.load', (['j'], {})...
# !/usr/bin/python3.6 # -*- coding: UTF-8 -*- from __future__ import print_function import sys module_path = r'/home/alex/桌面/Python' sys.path.append(module_path) import time import Project.Tools.namespace_utils as namespace_utils from Project.deep_learning.data_processing.convert_score_to_bt_format import convert2forma...
[ "sys.stdout.write", "tensorflow.reset_default_graph", "os.walk", "tensorflow.ConfigProto", "tensorflow.global_variables", "sys.stdout.flush", "tensorflow.get_default_graph", "os.path.join", "sys.path.append", "os.path.dirname", "os.path.exists", "tensorflow.variable_scope", "tensorflow.summa...
[((133, 161), 'sys.path.append', 'sys.path.append', (['module_path'], {}), '(module_path)\n', (148, 161), False, 'import sys\n'), ((560, 593), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (583, 593), False, 'import warnings\n'), ((1319, 1369), 'datetime.datetime.strptime...
import sys import logging from .handler import LogLoopStreamHandler from .formatter import ColorFormatter DEBUG_FORMAT = ("[%(asctime)s] %(levelname)s %(name)s:%(lineno)d" "(%(funcName)s): %(message)s") INFO_FORMAT = ("[%(asctime)s] %(message)s") COLOR_FORMAT = ("[%(asctime)s] %(color)s%(message)s") ...
[ "logging.basicConfig", "logging.root.addHandler", "logging.getLogger", "sys.stdout.isatty", "logging.root.setLevel" ]
[((458, 477), 'sys.stdout.isatty', 'sys.stdout.isatty', ([], {}), '()\n', (475, 477), False, 'import sys\n'), ((905, 934), 'logging.root.addHandler', 'logging.root.addHandler', (['hdlr'], {}), '(hdlr)\n', (928, 934), False, 'import logging\n'), ((943, 975), 'logging.root.setLevel', 'logging.root.setLevel', (['log_level...
import json from django.views.generic import View from django.http import JsonResponse, Http404 from .. import models, factories __all__ = [ 'PublicIpView', 'NetworkInterfaceView', 'SubNetworkView', ] class PublicIpView(View): """ See https://docs.microsoft.com/en-us/rest/api/network/virtualnetwo...
[ "django.http.Http404", "json.loads", "django.http.JsonResponse" ]
[((848, 866), 'django.http.JsonResponse', 'JsonResponse', (['data'], {}), '(data)\n', (860, 866), False, 'from django.http import JsonResponse, Http404\n'), ((953, 977), 'json.loads', 'json.loads', (['request.body'], {}), '(request.body)\n', (963, 977), False, 'import json\n'), ((1602, 1620), 'django.http.JsonResponse'...
from django.conf.urls import include, url from .views import check_auth, check_auth_info from django.contrib.auth.views import login urlpatterns = [ url(r'^$', check_auth, name='auth-check'), url(r'^info/$', check_auth_info, name='auth-info'), url(r'^info/(?P<zo...
[ "django.conf.urls.url" ]
[((154, 194), 'django.conf.urls.url', 'url', (['"""^$"""', 'check_auth'], {'name': '"""auth-check"""'}), "('^$', check_auth, name='auth-check')\n", (157, 194), False, 'from django.conf.urls import include, url\n'), ((226, 275), 'django.conf.urls.url', 'url', (['"""^info/$"""', 'check_auth_info'], {'name': '"""auth-info...
"""Serializers for the users app.""" from django.contrib.auth.models import User from django.contrib.auth.validators import UnicodeUsernameValidator from rest_framework.fields import ( CharField, CurrentUserDefault, EmailField, HiddenField, URLField ) from rest_framework.pagination import BasePagination from rest...
[ "rest_framework.fields.EmailField", "reader.models.Series.objects.only", "django.contrib.auth.models.User.objects.filter", "rest_framework.fields.CurrentUserDefault", "rest_framework.fields.URLField", "django.contrib.auth.validators.UnicodeUsernameValidator", "rest_framework.fields.CharField", "rest_f...
[((2045, 2146), 'rest_framework.fields.CharField', 'CharField', ([], {'source': '"""user.first_name"""', 'max_length': '(150)', 'required': '(False)', 'help_text': '"""Your first name."""'}), "(source='user.first_name', max_length=150, required=False,\n help_text='Your first name.')\n", (2054, 2146), False, 'from re...
from csr.csr import CentralSubjectRegistry, SubjectEntity from csr.entity_writer import EntityWriter from csr.snake_case import camel_case_to_snake_case class SubjectRegistryWriter(EntityWriter): """Writer that writes Central Subject Registry (CSR) data to tab delimited files. """ def __init__(self, outp...
[ "csr.entity_writer.EntityWriter.__init__", "csr.snake_case.camel_case_to_snake_case" ]
[((342, 381), 'csr.entity_writer.EntityWriter.__init__', 'EntityWriter.__init__', (['self', 'output_dir'], {}), '(self, output_dir)\n', (363, 381), False, 'from csr.entity_writer import EntityWriter\n'), ((606, 636), 'csr.snake_case.camel_case_to_snake_case', 'camel_case_to_snake_case', (['name'], {}), '(name)\n', (630...
from HiParTIPy.PtiCffi import pti,PTI import os class VecBuff: def __init__(self,size): self.nthreads = (int)(os.popen('grep -c cores /proc/cpuinfo').read()) print(self.nthreads) self.address = pti.cast("ptiValueVector *", PTI.malloc(self.nthreads * pti.sizeof(pti.new("ptiValueVector *"))))...
[ "HiParTIPy.PtiCffi.PTI.ptiFreeVecBuff", "os.popen", "HiParTIPy.PtiCffi.PTI.ptiMakeMatrixBuff", "HiParTIPy.PtiCffi.pti.new", "HiParTIPy.PtiCffi.PTI.ptiMakeVectorBuff" ]
[((329, 370), 'HiParTIPy.PtiCffi.PTI.ptiMakeVectorBuff', 'PTI.ptiMakeVectorBuff', (['self.address', 'size'], {}), '(self.address, size)\n', (350, 370), False, 'from HiParTIPy.PtiCffi import pti, PTI\n'), ((400, 432), 'HiParTIPy.PtiCffi.PTI.ptiFreeVecBuff', 'PTI.ptiFreeVecBuff', (['self.address'], {}), '(self.address)\n...
from django.contrib import admin from .models import BlogPost @admin.register(BlogPost) class BlogPostAdmin(admin.ModelAdmin): list_display = ( 'id', 'title', 'created', 'updated', )
[ "django.contrib.admin.register" ]
[((65, 89), 'django.contrib.admin.register', 'admin.register', (['BlogPost'], {}), '(BlogPost)\n', (79, 89), False, 'from django.contrib import admin\n')]
import sys from PyQt4.QtCore import Qt from lldbvis.settings import constants from lldbvis.util.vectors import Vector3, Vector2 class Keyboard: def __init__(self): pass def key_press(self, event): pass def key_release(self, event): pass class Mouse: def __init__(self, mou...
[ "lldbvis.util.vectors.Vector3.unitZ", "lldbvis.util.vectors.Vector3.unitX", "lldbvis.util.vectors.Vector3.unitY", "lldbvis.util.vectors.Vector2", "lldbvis.util.vectors.Vector3", "sys.exit" ]
[((635, 644), 'lldbvis.util.vectors.Vector2', 'Vector2', ([], {}), '()\n', (642, 644), False, 'from lldbvis.util.vectors import Vector3, Vector2\n'), ((1283, 1294), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1291, 1294), False, 'import sys\n'), ((1362, 1371), 'lldbvis.util.vectors.Vector3', 'Vector3', ([], {}), '...
from gensim.models import Word2Vec from gensim.models.fasttext import FastText from gensim.models import KeyedVectors from gensim import corpora from gensim.matutils import softcossim from gensim.utils import simple_preprocess from gensim.test.utils import datapath, get_tmpfile from nltk.tokenize import sent_tokenize f...
[ "gensim.models.fasttext.FastText.load", "tensorflow_hub.Module", "gensim.models.KeyedVectors.load_word2vec_format", "tensorflow.tables_initializer", "bert_serving.client.BertClient", "gensim.models.Word2Vec.load", "bert_serving.server.BertServer", "gensim.models.doc2vec.Doc2Vec.load", "gensim.corpor...
[((882, 906), 'gensim.corpora.Dictionary', 'corpora.Dictionary', (['docs'], {}), '(docs)\n', (900, 906), False, 'from gensim import corpora\n'), ((1059, 1100), 'gensim.matutils.softcossim', 'softcossim', (['bow1', 'bow2', 'similarity_matrix'], {}), '(bow1, bow2, similarity_matrix)\n', (1069, 1100), False, 'from gensim....
from mindstorms import MSHub, Motor, MotorPair, ColorSensor, DistanceSensor, App from mindstorms.control import wait_for_seconds, wait_until, Timer from mindstorms.operator import greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to import math # driving with Tricky wheel_r...
[ "mindstorms.Motor", "mindstorms.MSHub", "mindstorms.MotorPair" ]
[((419, 426), 'mindstorms.MSHub', 'MSHub', ([], {}), '()\n', (424, 426), False, 'from mindstorms import MSHub, Motor, MotorPair, ColorSensor, DistanceSensor, App\n'), ((484, 494), 'mindstorms.Motor', 'Motor', (['"""C"""'], {}), "('C')\n", (489, 494), False, 'from mindstorms import MSHub, Motor, MotorPair, ColorSensor, ...
from PIL import Image from time import sleep import pygame # ascii characters used to build the output text ASCII_CHARS = ["@", "#", "S", "%", "?", "*", "+", ";", ":", ",", "."] # the variable of sleep while prints frames after printing frame. time_sleep = 0.034444 # for ordinary using #time_sleep = 0.0330215 # f...
[ "pygame.mixer.init", "pygame.mixer.music.play", "time.sleep", "PIL.Image.open", "pygame.mixer.music.load" ]
[((2793, 2812), 'pygame.mixer.init', 'pygame.mixer.init', ([], {}), '()\n', (2810, 2812), False, 'import pygame\n'), ((2821, 2861), 'pygame.mixer.music.load', 'pygame.mixer.music.load', (['"""bad_apple.mp3"""'], {}), "('bad_apple.mp3')\n", (2844, 2861), False, 'import pygame\n'), ((2870, 2895), 'pygame.mixer.music.play...
import math import torch import torch.nn as nn import torch.nn.functional as F from torchvision.models.resnet import resnet101 class Linear(nn.Module): __constants__ = ['bias', 'in_features', 'out_features'] def __init__(self, in_features, out_features, bias=False): super(Linear, self).__init__() ...
[ "torch.nn.init._calculate_fan_in_and_fan_out", "torch.where", "torch.zeros_like", "math.sqrt", "torch.nn.init.uniform_", "math.sin", "torch.Tensor", "torch.pow", "math.cos", "torchvision.models.resnet.resnet101", "torch.nn.functional.normalize" ]
[((1389, 1441), 'torchvision.models.resnet.resnet101', 'resnet101', ([], {'pretrained': '(False)', 'num_classes': 'vector_size'}), '(pretrained=False, num_classes=vector_size)\n', (1398, 1441), False, 'from torchvision.models.resnet import resnet101\n'), ((1562, 1578), 'math.cos', 'math.cos', (['self.m'], {}), '(self.m...
"""Make unit test for addmul128() in multiply_32.c""" from common import counter, make_main, split64 def make_test(t, a, b0, b1): if b0 == -1: b0 = 0xFFFFFFFF if b1 == -1: b1 = 0xFFFFFFFF # What we expect the function to compute result = t + a*(b0 + (b1 << 64)) # Turn a[] and t[...
[ "common.make_main", "common.split64" ]
[((2124, 2135), 'common.make_main', 'make_main', ([], {}), '()\n', (2133, 2135), False, 'from common import counter, make_main, split64\n'), ((358, 368), 'common.split64', 'split64', (['a'], {}), '(a)\n', (365, 368), False, 'from common import counter, make_main, split64\n'), ((380, 390), 'common.split64', 'split64', (...
import numpy as np class DummyRegressor: """Implements dummy model that always predict as response the average of the labels in the training set. Parameters ---------- Y : `numpy.array` (n_examples,) Targets of the training set. No features are needed to fit the model classif...
[ "numpy.mean", "numpy.ones" ]
[((554, 564), 'numpy.mean', 'np.mean', (['Y'], {}), '(Y)\n', (561, 564), True, 'import numpy as np\n'), ((826, 844), 'numpy.ones', 'np.ones', (['n_samples'], {}), '(n_samples)\n', (833, 844), True, 'import numpy as np\n')]
""" A pytest module to benchmark forward-error correction encoding/decoding. """ import pytest import numpy as np import galois class Base: # Placeholder variables code_sys = galois.ReedSolomon(63, 55) code_non_sys = galois.ReedSolomon(63, 55, systematic=False) GF = code_sys.field N = 1_000 ...
[ "galois.ReedSolomon", "galois.BCH", "numpy.random.seed", "pytest.mark.benchmark" ]
[((1164, 1215), 'pytest.mark.benchmark', 'pytest.mark.benchmark', ([], {'group': '"""BCH(63, 39): N=1_000"""'}), "(group='BCH(63, 39): N=1_000')\n", (1185, 1215), False, 'import pytest\n'), ((1364, 1414), 'pytest.mark.benchmark', 'pytest.mark.benchmark', ([], {'group': '"""RS(63, 55): N=1_000"""'}), "(group='RS(63, 55)...
from autoarray.structures import arrays import numpy as np # TODO : The way these work dpeending on if the input array (e.g. the weight map) are an auto array or not is a bit # TODO : clunky. For example, we can currently overwrite pixel_scales. We need to decade how we approach this. def array_using_correct_dimens...
[ "numpy.abs", "numpy.seterr", "autoarray.structures.arrays.Array.manual_1d", "autoarray.structures.arrays.Array.manual_2d", "numpy.sqrt" ]
[((1558, 1584), 'numpy.seterr', 'np.seterr', ([], {'divide': '"""ignore"""'}), "(divide='ignore')\n", (1567, 1584), True, 'import numpy as np\n'), ((505, 631), 'autoarray.structures.arrays.Array.manual_1d', 'arrays.Array.manual_1d', ([], {'array': 'array', 'shape_2d': 'array.shape_2d', 'pixel_scales': 'pixel_scales', '...
# AutoTransform # Large scale, component based code modification library # # Licensed under the MIT License <http://opensource.org/licenses/MIT> # SPDX-License-Identifier: MIT # Copyright (c) 2022-present <NAME> <http://github.com/nathro> # @black_format """The implementation for regex based filters, including RegexF...
[ "re.search" ]
[((1374, 1407), 're.search', 're.search', (['self.pattern', 'item.key'], {}), '(self.pattern, item.key)\n', (1383, 1407), False, 'import re\n')]
import asyncio import pytest from opentrons.drivers.rpi_drivers.types import USBPort from opentrons.hardware_control import ExecutionManager from opentrons.hardware_control.emulation.app import THERMOCYCLER_PORT from opentrons.hardware_control.modules import Thermocycler @pytest.fixture async def thermocycler(loop: ...
[ "opentrons.hardware_control.ExecutionManager", "opentrons.drivers.rpi_drivers.types.USBPort" ]
[((431, 453), 'opentrons.hardware_control.ExecutionManager', 'ExecutionManager', (['loop'], {}), '(loop)\n', (447, 453), False, 'from opentrons.hardware_control import ExecutionManager\n'), ((611, 679), 'opentrons.drivers.rpi_drivers.types.USBPort', 'USBPort', ([], {'name': '""""""', 'port_number': '(1)', 'sub_names': ...
import haiku as hk from jax.scipy.special import logsumexp from gym.spaces import Discrete from ..utils import is_stochastic from ._base import BaseTDLearningQ class SoftQLearning(BaseTDLearningQ): r""" TD-learning with soft Q-learning updates. The :math:`n`-step bootstrapped target is constructed as: ...
[ "haiku.PRNGSequence", "jax.scipy.special.logsumexp" ]
[((3024, 3044), 'haiku.PRNGSequence', 'hk.PRNGSequence', (['rng'], {}), '(rng)\n', (3039, 3044), True, 'import haiku as hk\n'), ((3430, 3477), 'jax.scipy.special.logsumexp', 'logsumexp', (['(Q_s_next / self.temperature)'], {'axis': '(-1)'}), '(Q_s_next / self.temperature, axis=-1)\n', (3439, 3477), False, 'from jax.sci...
# Generated by Django 4.0 on 2022-01-04 21:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='order', name='city', ), ...
[ "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((221, 276), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""order"""', 'name': '"""city"""'}), "(model_name='order', name='city')\n", (243, 276), False, 'from django.db import migrations, models\n'), ((420, 533), 'django.db.models.CharField', 'models.CharField', ([], {'choices': ...
from django.views.generic.base import TemplateView from apps.muni_scales.api import MscaleResource from apps.mds_auth.api import UserResource class HomeView(TemplateView): template_name = "index.html" def get_context_data(self, **kwargs): context = super(HomeView, self).get_context_data(**kwargs) ...
[ "apps.muni_scales.api.MscaleResource", "apps.mds_auth.api.UserResource" ]
[((593, 609), 'apps.muni_scales.api.MscaleResource', 'MscaleResource', ([], {}), '()\n', (607, 609), False, 'from apps.muni_scales.api import MscaleResource\n'), ((1206, 1220), 'apps.mds_auth.api.UserResource', 'UserResource', ([], {}), '()\n', (1218, 1220), False, 'from apps.mds_auth.api import UserResource\n')]
# Generated by Django 3.2.7 on 2021-10-17 22:34 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('places', '0012_alter_image_image'), ] operations = [ migrations.RenameField( model_name='image', old_name='location', ...
[ "django.db.migrations.RenameField" ]
[((225, 311), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""image"""', 'old_name': '"""location"""', 'new_name': '"""place"""'}), "(model_name='image', old_name='location', new_name=\n 'place')\n", (247, 311), False, 'from django.db import migrations\n')]
from collections import namedtuple from enum import Enum from typing import List, Tuple, Set, TYPE_CHECKING import logging import rules if TYPE_CHECKING: from stratgey import Strategy ModelStats = namedtuple( 'ModelStats', [ 'name', 'movement', 'weapon_skill', 'ballistic_skill', 'strength', '...
[ "rules.roll_d", "collections.namedtuple" ]
[((204, 363), 'collections.namedtuple', 'namedtuple', (['"""ModelStats"""', "['name', 'movement', 'weapon_skill', 'ballistic_skill', 'strength',\n 'toughness', 'wounds', 'attacks', 'leadership', 'armour']"], {}), "('ModelStats', ['name', 'movement', 'weapon_skill',\n 'ballistic_skill', 'strength', 'toughness', 'w...
import hasy_tools import numpy as np from keras.callbacks import CSVLogger, ModelCheckpoint from keras.layers import Activation, Dense, Flatten from keras.models import Sequential # data loading data = hasy_tools.load_data() data['x_train'] = hasy_tools.preprocess(data['x_train']) data['y_train'] = np.eye(369)[data['y...
[ "hasy_tools.preprocess", "numpy.eye", "keras.layers.Activation", "keras.models.Sequential", "keras.layers.Flatten", "keras.layers.Dense", "hasy_tools.load_data" ]
[((203, 225), 'hasy_tools.load_data', 'hasy_tools.load_data', ([], {}), '()\n', (223, 225), False, 'import hasy_tools\n'), ((244, 282), 'hasy_tools.preprocess', 'hasy_tools.preprocess', (["data['x_train']"], {}), "(data['x_train'])\n", (265, 282), False, 'import hasy_tools\n'), ((453, 465), 'keras.models.Sequential', '...
import numpy as np import torch from nnAudio.Spectrogram import CQT1992v2 from PIL import Image from sklearn.preprocessing import MinMaxScaler import config def idx2path(idx, is_train=True): path = config.data_dir if is_train: path += 'train/' + idx[0] +'/'+ idx[1] +'/'+ idx[2] +'/'+ idx +'.npy'...
[ "numpy.load", "nnAudio.Spectrogram.CQT1992v2", "numpy.zeros", "sklearn.preprocessing.MinMaxScaler", "PIL.Image.fromarray", "torch.from_numpy" ]
[((464, 517), 'nnAudio.Spectrogram.CQT1992v2', 'CQT1992v2', ([], {'sr': '(2048)', 'fmin': '(20)', 'fmax': '(1024)', 'hop_length': '(64)'}), '(sr=2048, fmin=20, fmax=1024, hop_length=64)\n', (473, 517), False, 'from nnAudio.Spectrogram import CQT1992v2\n'), ((589, 602), 'numpy.load', 'np.load', (['path'], {}), '(path)\n...
# python std lib # rediscluster imports import pytest from yaaredis.commands.cluster import parse_cluster_slots from yaaredis.exceptions import ClusterDownError from yaaredis.exceptions import RedisClusterException from yaaredis.utils import b from yaaredis.utils import blocked_command from yaaredis.utils import clust...
[ "yaaredis.utils.blocked_command", "yaaredis.exceptions.ClusterDownError", "yaaredis.utils.list_keys_to_dict", "yaaredis.utils.b", "yaaredis.commands.cluster.parse_cluster_slots", "pytest.raises", "pytest.mark.asyncio", "yaaredis.utils.merge_result", "yaaredis.utils.dict_merge", "yaaredis.utils.fir...
[((5281, 5325), 'pytest.mark.asyncio', 'pytest.mark.asyncio', ([], {'forbid_global_loop': '(True)'}), '(forbid_global_loop=True)\n', (5300, 5325), False, 'import pytest\n'), ((2244, 2287), 'yaaredis.commands.cluster.parse_cluster_slots', 'parse_cluster_slots', (['extended_mock_response'], {}), '(extended_mock_response)...
import argparse import sys from qsy import __version__ from .error import QsyASMError from .log import print_error from .program import QsyASMProgram def main(): argparser = argparse.ArgumentParser(description='qsyasm assembly runner') argparser.add_argument('filename', type=str, help='qsyasm file to execu...
[ "argparse.ArgumentParser", "sys.exit" ]
[((182, 243), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""qsyasm assembly runner"""'}), "(description='qsyasm assembly runner')\n", (205, 243), False, 'import argparse\n'), ((1513, 1525), 'sys.exit', 'sys.exit', (['(-1)'], {}), '(-1)\n', (1521, 1525), False, 'import sys\n')]
import argparse import sys import torch from torch import nn import numpy as np from util import unpack_npz, view_classify Show_pics = False def evaluate(): print("Evaluating until hitting the ceiling") parser = argparse.ArgumentParser(description='Training arguments') parser.add_argument('--model', type...
[ "argparse.ArgumentParser", "torch.load", "util.unpack_npz", "torch.nn.NLLLoss", "torch.exp", "numpy.mean", "torch.no_grad" ]
[((223, 280), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Training arguments"""'}), "(description='Training arguments')\n", (246, 280), False, 'import argparse\n'), ((594, 616), 'torch.load', 'torch.load', (['args.model'], {}), '(args.model)\n', (604, 616), False, 'import torch\n'), (...
from __future__ import unicode_literals import warnings from django.apps import apps from django.http import HttpResponse, Http404 from django.template import loader from django.contrib.sites.shortcuts import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnI...
[ "django.utils.translation.ugettext", "django.core.urlresolvers.reverse", "django.http.HttpResponse", "django.apps.apps.get_model", "django.contrib.sites.shortcuts.get_current_site", "django.template.loader.render_to_string", "django.utils.six.itervalues", "django.http.Http404", "warnings.warn" ]
[((877, 1028), 'warnings.warn', 'warnings.warn', (['"""Geo Sitemaps are deprecated. Use plain sitemaps from django.contrib.sitemaps instead"""', 'RemovedInDjango18Warning'], {'stacklevel': '(2)'}), "(\n 'Geo Sitemaps are deprecated. Use plain sitemaps from django.contrib.sitemaps instead'\n , RemovedInDjango18War...