code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
import struct import h5py # type: ignore import numpy as np import pyBigWig # type: ignore from CRADLE.correctbiasutils import CORRECTED_RC_TEMP_FILE_STRUCT_FORMAT, SONICATION_SHEAR_BIAS_OFFSET, START_INDEX_ADJUSTMENT, outputCorrectedTmpFile from CRADLE.correctbiasutils.cython import coalesceSections # type: ignore ...
[ "numpy.nansum", "numpy.zeros", "struct.pack", "numpy.isnan", "numpy.finfo", "numpy.rint", "numpy.where", "pyBigWig.open", "numpy.arange", "CRADLE.correctbiasutils.outputCorrectedTmpFile", "CRADLE.correctbiasutils.cython.coalesceSections", "numpy.intersect1d", "numpy.delete" ]
[((2131, 2160), 'pyBigWig.open', 'pyBigWig.open', (['trainingBWName'], {}), '(trainingBWName)\n', (2144, 2160), False, 'import pyBigWig\n'), ((5537, 5592), 'numpy.zeros', 'np.zeros', (['(analysisEnd - analysisStart)'], {'dtype': 'np.float32'}), '(analysisEnd - analysisStart, dtype=np.float32)\n', (5545, 5592), True, 'i...
# author: <NAME> # code: https://github.com/mahmudahsan/thinkdiff # blog: http://thinkdiff.net # http://pythonbangla.com # MIT License # -------------------------- # Unit Test # -------------------------- ''' This test module test msmath and msstring module from mspack package Common testing methods by TestCase:...
[ "unittest.main", "mspack.msmath.division", "mspack.msmath.multiplication", "mspack.msmath.subtract", "mspack.msmath.sum", "mspack.msstring.MsName" ]
[((1738, 1753), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1751, 1753), False, 'import unittest\n'), ((555, 572), 'mspack.msmath.sum', 'msmath.sum', (['(8)', '(12)'], {}), '(8, 12)\n', (565, 572), False, 'from mspack import msmath\n'), ((662, 685), 'mspack.msmath.subtract', 'msmath.subtract', (['(109)', '(9)'...
from pybees.utils.combinatorial_single_obj import tour_distance import numpy as np import pytest # ============================================================================= # tour_distance # ============================================================================= @pytest.mark.parametrize( "bee_permutatio...
[ "numpy.random.seed", "numpy.allclose", "pybees.utils.combinatorial_single_obj.tour_distance", "pytest.raises", "numpy.random.randint", "numpy.array", "numpy.random.rand" ]
[((858, 875), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (872, 875), True, 'import numpy as np\n'), ((1578, 1622), 'pybees.utils.combinatorial_single_obj.tour_distance', 'tour_distance', (['bee_permutations', 'coordinates'], {}), '(bee_permutations, coordinates)\n', (1591, 1622), False, 'from pybees...
from nut import Print, aes128 from nsz import Header, SectionFs, BlockDecompressorReader from nsz import FileExistingChecks import os import json import Fs import Fs.Pfs0 import Fs.Type import Fs.Nca import Fs.Type import subprocess from contextlib import closing import zstandard from time import sleep from tqdm import...
[ "Fs.Pfs0.Pfs0Stream", "os.path.abspath", "tqdm.tqdm", "zstandard.ZstdDecompressor", "os.path.basename", "nsz.BlockDecompressorReader.BlockDecompressorReader", "hashlib.sha256", "nsz.FileExistingChecks.ExtractHashes", "nsz.Header.Section", "Fs.factory", "nut.aes128.AESCTR", "nut.Print.info", ...
[((1069, 1111), 'nsz.FileExistingChecks.ExtractHashes', 'FileExistingChecks.ExtractHashes', (['filePath'], {}), '(filePath)\n', (1101, 1111), False, 'from nsz import FileExistingChecks\n'), ((1126, 1151), 'os.path.abspath', 'os.path.abspath', (['filePath'], {}), '(filePath)\n', (1141, 1151), False, 'import os\n'), ((11...
import msgpack MSGID = 1 MSG_REQUEST = 0 MSG_RESPONSE = 1 MSG_NOTIFY = 2 def data_unpack(data): def convert(x): if isinstance(x, bytes): return x.decode('utf-8') return x return msgpack.unpackb( data, encoding='utf-8', object_hook=lambda obj: {convert(k):...
[ "msgpack.packb" ]
[((457, 476), 'msgpack.packb', 'msgpack.packb', (['data'], {}), '(data)\n', (470, 476), False, 'import msgpack\n')]
""" for login/logout operations.""" from functools import wraps from logging import getLogger from flask import abort from flask import current_app as app from flask import g, make_response, redirect, render_template, request, url_for from flask_login import current_user from flask_login import login_user as flask_log...
[ "app.main.models.users.User.query.filter_by", "app.main.util.password_reset.confirm_reset_token", "flask_login.login_user", "flask.abort", "app.main.util.email_verification.generate_confirmation_token", "flask_login.logout_user", "flask.current_app._get_current_object", "flask.url_for", "app.main.ut...
[((688, 707), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (697, 707), False, 'from logging import getLogger\n'), ((784, 792), 'functools.wraps', 'wraps', (['f'], {}), '(f)\n', (789, 792), False, 'from functools import wraps\n'), ((9485, 9499), 'app.main.util.forms.PasswordForm', 'PasswordForm'...
"""Added Tabs model Revision ID: <KEY> Revises: 8fa899742973 Create Date: 2018-03-24 18:48:24.636225 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '8fa899742973' branch_labels = None depends_on = None def upgrade():...
[ "alembic.op.drop_table", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.ForeignKeyConstraint", "sqlalchemy.String", "sqlalchemy.Integer" ]
[((921, 947), 'alembic.op.drop_table', 'op.drop_table', (['"""SongsTabs"""'], {}), "('SongsTabs')\n", (934, 947), False, 'from alembic import op\n'), ((669, 742), 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["['SongID']", "['Songs.SongID']"], {'ondelete': '"""CASCADE"""'}), "(['SongID'], ['Songs.Song...
# encoding: utf-8 """ Application environment related tasks for Invoke. """ try: from invoke import ctask as task except ImportError: # Invoke 0.13 renamed ctask to task from invoke import task @task def enter(context, install_dependencies=True, upgrade_db=True): """ Enter into IPython notebook shel...
[ "app.create_app", "werkzeug.script.make_shell" ]
[((801, 817), 'app.create_app', 'app.create_app', ([], {}), '()\n', (815, 817), False, 'import app\n'), ((1025, 1075), 'werkzeug.script.make_shell', 'script.make_shell', (['shell_context'], {'use_ipython': '(True)'}), '(shell_context, use_ipython=True)\n', (1042, 1075), False, 'from werkzeug import script\n')]
#!/usr/bin/env python3.7 """ This file contains code to carry out a simple estimate of the amount of Fortran code 'handled' by for2py. COMMAND-LINE INVOCATION: python3.7 measure-coverage.py <directory with Fortran code files> ADDING HANDLED LANGUAGE CONSTRUCTS: As the set of language featur...
[ "os.path.abspath", "os.path.isdir", "os.path.splitext", "sys.stderr.write", "os.listdir", "sys.exit" ]
[((6504, 6528), 'os.path.abspath', 'os.path.abspath', (['dirname'], {}), '(dirname)\n', (6519, 6528), False, 'import os\n'), ((6590, 6609), 'os.listdir', 'os.listdir', (['dirname'], {}), '(dirname)\n', (6600, 6609), False, 'import os\n'), ((7524, 7588), 'sys.stderr.write', 'sys.stderr.write', (['"""Usage: measure-cover...
# -*- coding: utf8 -*- """pystalkd - A beanstalkd Client Library for Python3 - Based on https://github.com/earl/beanstalkc""" from contextlib import contextmanager import socket from datetime import timedelta from .Job import Job __license__ = ''' Copyright (C) 2008-2014 <NAME> Copyright (c) 2019 <NAME> MIT License ...
[ "socket.getdefaulttimeout", "socket.socket", "yaml.load" ]
[((2574, 2600), 'socket.getdefaulttimeout', 'socket.getdefaulttimeout', ([], {}), '()\n', (2598, 2600), False, 'import socket\n'), ((2997, 3046), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (3010, 3046), False, 'import socket\n'), ((14127, ...
""" 함수의 미분2 도함수의 오차와 검증 """ import numpy as np import matplotlib.pyplot as plt # 데이터 간격 h h = 1.0 def f(x): return np.sin(x) def g(func, xmin, xmax, h=0.01): x = np.arange(xmin, xmax, h) y = [] y0 = func(xmin) for _x in x: y0 += func(_x + h) - func(_x) y.append(y0) return x...
[ "matplotlib.pyplot.show", "numpy.sin", "numpy.arange", "numpy.array", "numpy.linspace", "matplotlib.pyplot.grid" ]
[((123, 132), 'numpy.sin', 'np.sin', (['x'], {}), '(x)\n', (129, 132), True, 'import numpy as np\n'), ((176, 200), 'numpy.arange', 'np.arange', (['xmin', 'xmax', 'h'], {}), '(xmin, xmax, h)\n', (185, 200), True, 'import numpy as np\n'), ((371, 402), 'numpy.linspace', 'np.linspace', (['(0)', '(np.pi * 10)', '(100)'], {}...
import logging import logging.config from database import Database import neo4j # Get the logger specified in the file logger = logging.getLogger(__name__) files_to_complete = [] def connect_to_database(bolt_url: str, username: str, password: str) -> Database: logging.info( f"Connecting to neo4j database...
[ "logging.info", "database.Database", "logging.getLogger" ]
[((128, 155), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (145, 155), False, 'import logging\n'), ((268, 386), 'logging.info', 'logging.info', (['f"""Connecting to neo4j database at {bolt_url} with username {username} and password {password}"""'], {}), "(\n f'Connecting to neo4j dat...
import dis import sys import unittest from io import StringIO from _pydevd_frame_eval.pydevd_modify_bytecode import insert_code TRACE_MESSAGE = "Trace called" def tracing(): print(TRACE_MESSAGE) def call_tracing(): tracing() def bar(a, b): return a + b class TestInsertCode(unittest.TestCase): ...
[ "dis._unpack_opargs", "_pydevd_frame_eval.pydevd_modify_bytecode.insert_code", "io.StringIO", "sys.stdout.getvalue" ]
[((941, 992), '_pydevd_frame_eval.pydevd_modify_bytecode.insert_code', 'insert_code', (['code_orig', 'code_to_insert', 'line_number'], {}), '(code_orig, code_to_insert, line_number)\n', (952, 992), False, 'from _pydevd_frame_eval.pydevd_modify_bytecode import insert_code\n'), ((1370, 1421), '_pydevd_frame_eval.pydevd_m...
#!/usr/bin/env python """ Contains class PerfData and its subclasses, which are objects for collecting and computing model performance metrics and predictions """ import sklearn.metrics import deepchem as dc import numpy as np import tensorflow as tf from sklearn.metrics import roc_auc_score, confusion_matrix, avera...
[ "numpy.argmax", "numpy.empty", "sklearn.metrics.accuracy_score", "sklearn.metrics.r2_score", "numpy.isnan", "numpy.mean", "deepchem.trans.undo_transforms", "numpy.std", "sklearn.metrics.log_loss", "sklearn.metrics.average_precision_score", "numpy.intersect1d", "sklearn.metrics.mean_squared_err...
[((1094, 1128), 'sklearn.metrics.mean_squared_error', 'mean_squared_error', (['y_real', 'y_pred'], {}), '(y_real, y_pred)\n', (1112, 1128), False, 'from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error\n'), ((20098, 20128), 'numpy.intersect1d', 'np.intersect1d', (['nzrows', 'pos_ki'], {}), '(nzr...
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, unicode_literals, division import contextlib import os from unittest import TestCase from typed_env.read_dot_env import read_file_values @contextlib.contextmanager def existing_file(fname, contents): with open('1.txt', 'w') as f: ...
[ "os.remove", "typed_env.read_dot_env.read_file_values" ]
[((377, 393), 'os.remove', 'os.remove', (['fname'], {}), '(fname)\n', (386, 393), False, 'import os\n'), ((600, 623), 'typed_env.read_dot_env.read_file_values', 'read_file_values', (['fname'], {}), '(fname)\n', (616, 623), False, 'from typed_env.read_dot_env import read_file_values\n'), ((866, 889), 'typed_env.read_dot...
from sklearn.utils.metaestimators import if_delegate_has_method from collections import defaultdict from sklearn.pipeline import _name_estimators from imblearn import pipeline __all__ = ['Pipeline', 'make_pipeline'] class Pipeline(pipeline.Pipeline): @property def feature_importances_(self): ret...
[ "sklearn.pipeline._name_estimators" ]
[((1673, 1696), 'sklearn.pipeline._name_estimators', '_name_estimators', (['steps'], {}), '(steps)\n', (1689, 1696), False, 'from sklearn.pipeline import _name_estimators\n')]
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
[ "pyramid.predicates.HeaderPredicate", "pyramid.util.is_same_domain", "pyramid.exceptions.ConfigurationError" ]
[((1118, 1158), 'pyramid.util.is_same_domain', 'is_same_domain', (['request.domain', 'self.val'], {}), '(request.domain, self.val)\n', (1132, 1158), False, 'from pyramid.util import is_same_domain\n'), ((1271, 1342), 'pyramid.exceptions.ConfigurationError', 'ConfigurationError', (['"""Excpected at least one value in he...
import sys import json import binascii import hmac import hashlib import difflib import requests import git import re import yaml from sparkle import Sparkle from git import Repo import argparse def make_argument_parser(): parser = argparse.ArgumentParser(description="deploy files from current directory, based o...
[ "argparse.ArgumentParser", "re.match", "git.Repo", "sparkle.Sparkle", "binascii.unhexlify", "yaml.safe_load", "requests.get", "re.compile" ]
[((239, 352), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""deploy files from current directory, based on the deploy-listing file"""'}), "(description=\n 'deploy files from current directory, based on the deploy-listing file')\n", (262, 352), False, 'import argparse\n'), ((1358, 1419...
### Pre-reqs: # snowflake.snowpark # pip install boto3 awscli json # Set AWS credentials via environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY ### from snowflake.snowpark.session import Session import json import boto3 from botocore.exceptions import ClientError # Load Snowflake connection details f...
[ "boto3.session.Session", "snowflake.snowpark.session.Session.builder.configs" ]
[((473, 496), 'boto3.session.Session', 'boto3.session.Session', ([], {}), '()\n', (494, 496), False, 'import boto3\n'), ((1860, 1906), 'snowflake.snowpark.session.Session.builder.configs', 'Session.builder.configs', (['connection_parameters'], {}), '(connection_parameters)\n', (1883, 1906), False, 'from snowflake.snowp...
import torch import torchsparse_backend from torch.autograd import Function from torch.cuda.amp import custom_fwd, custom_bwd from torchsparse.nn.functional.hash import * __all__ = ['spvoxelize'] class VoxelizeGPU(Function): @staticmethod @custom_fwd(cast_inputs=torch.half) def forward(ctx, feat, idx, cn...
[ "torch.cuda.amp.custom_fwd" ]
[((251, 285), 'torch.cuda.amp.custom_fwd', 'custom_fwd', ([], {'cast_inputs': 'torch.half'}), '(cast_inputs=torch.half)\n', (261, 285), False, 'from torch.cuda.amp import custom_fwd, custom_bwd\n')]
# __BEGIN_LICENSE__ # Copyright (C) 2008-2010 United States Government as represented by # the Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # __END_LICENSE__ from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.template i...
[ "django.forms.PasswordInput", "django.contrib.auth.logout", "django.contrib.auth.authenticate", "django.http.HttpResponseRedirect", "django.forms.CharField", "django.contrib.auth.login", "django.template.RequestContext" ]
[((457, 472), 'django.contrib.auth.logout', 'logout', (['request'], {}), '(request)\n', (463, 472), False, 'from django.contrib.auth import authenticate, login, logout\n'), ((484, 509), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""/"""'], {}), "('/')\n", (504, 509), False, 'from django.http import ...
import random def bogosort(array): random.shuffle(array) while array != sorted(array): random.shuffle(array) return array numbers = [2,4,6,8,10,9,7,5,3,1] print(numbers) numbers = bogosort(numbers) print(numbers)
[ "random.shuffle" ]
[((40, 61), 'random.shuffle', 'random.shuffle', (['array'], {}), '(array)\n', (54, 61), False, 'import random\n'), ((102, 123), 'random.shuffle', 'random.shuffle', (['array'], {}), '(array)\n', (116, 123), False, 'import random\n')]
import os import logging import itertools import json import shutil import torch import torch.nn as nn import torch.jit as jit from tqdm import tqdm from collections import deque from tensorboardX import SummaryWriter from torch.utils.data import DataLoader, Dataset from torch.optim import Adam from open_couplet.mod...
[ "json.dump", "tensorboardX.SummaryWriter", "json.load", "itertools.dropwhile", "os.makedirs", "torch.utils.data.DataLoader", "os.path.join", "open_couplet.models.loss.Perplexity", "os.path.exists", "torch.nn.NLLLoss", "train.data.Seq2seqCollectWrapper", "shutil.rmtree", "torch.no_grad", "t...
[((9248, 9263), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (9261, 9263), False, 'import torch\n'), ((1338, 1390), 'open_couplet.models.loss.Perplexity', 'Perplexity', ([], {'ignore_index': 'self.tokenizer.pad_token_id'}), '(ignore_index=self.tokenizer.pad_token_id)\n', (1348, 1390), False, 'from open_couplet.m...
import unittest import iteround from collections import OrderedDict class TestSafeRoundMethods(unittest.TestCase): def setUp(self): self.in_list = [4.0001, 3.2345, 3.2321, 6.4523, 5.3453, 7.3422] self.in_dict = {'foo': 60.19012964572332, 'bar': 15.428802458406679, ...
[ "unittest.main", "collections.OrderedDict", "iteround.saferound" ]
[((3031, 3046), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3044, 3046), False, 'import unittest\n'), ((387, 412), 'collections.OrderedDict', 'OrderedDict', (['self.in_dict'], {}), '(self.in_dict)\n', (398, 412), False, 'from collections import OrderedDict\n'), ((1424, 1476), 'collections.OrderedDict', 'Ordere...
# -*- coding: utf-8 -*- # Copyright © 2018 PyHelp Project Contributors # https://github.com/jnsebgosselin/gwhat # # This file is part of PyHelp. # Licensed under the terms of the GNU General Public License. # ---- Standard Library Imports import os import os.path as osp # ---- Third Party Imports import numpy as n...
[ "os.remove", "pyhelp.help_utils.read_monthly_help_output", "numpy.abs", "os.path.basename", "os.path.dirname", "pyhelp.HELP3O.run_simulation", "os.path.exists", "numpy.array_equal", "os.path.join" ]
[((677, 698), 'os.path.dirname', 'osp.dirname', (['__file__'], {}), '(__file__)\n', (688, 698), True, 'import os.path as osp\n'), ((718, 746), 'os.path.join', 'osp.join', (['dirname', '"""RCRA.D4"""'], {}), "(dirname, 'RCRA.D4')\n", (726, 746), True, 'import os.path as osp\n'), ((766, 794), 'os.path.join', 'osp.join', ...
from __future__ import print_function from builtins import str import re import collections import time import warnings from androguard.core.androconf import is_ascii_problem from androguard.core.bytecodes import dvm import logging from androguard.core import bytecode import networkx as nx log = logging.getLogger("and...
[ "androguard.core.bytecode.FormatNameToPython", "builtins.str", "androguard.core.bytecodes.dvm.determineNext", "networkx.DiGraph", "androguard.core.bytecode.FormatClassToPython", "re.match", "time.time", "collections.defaultdict", "androguard.core.bytecode.FormatDescriptorToPython", "androguard.cor...
[((298, 338), 'logging.getLogger', 'logging.getLogger', (['"""androguard.analysis"""'], {}), "('androguard.analysis')\n", (315, 338), False, 'import logging\n'), ((415, 428), 're.compile', 're.compile', (['i'], {}), '(i)\n', (425, 428), False, 'import re\n'), ((10128, 10174), 'androguard.core.bytecodes.dvm.determineExc...
from __future__ import unicode_literals from frappe import _ def get_data(): return[ { "label": _("Licences"), "icon": "octicon octicon-organization", "items": [ { "type": "doctype", "name": "Licences", ...
[ "frappe._" ]
[((122, 135), 'frappe._', '_', (['"""Licences"""'], {}), "('Licences')\n", (123, 135), False, 'from frappe import _\n'), ((350, 363), 'frappe._', '_', (['"""Licences"""'], {}), "('Licences')\n", (351, 363), False, 'from frappe import _\n'), ((503, 516), 'frappe._', '_', (['"""Licences"""'], {}), "('Licences')\n", (504,...
import rclpy from rclpy.node import Node from sensor_msgs.msg import Joy from nav_msgs.msg import Odometry from waypoint_interfaces.srv import TerminateWaypointLogging, ToggleWaypointLogging, GetWaypointLogState from .wp_logging import WaypointLogger, LogState from rclpy.qos import qos_profile_sensor_data import numpy...
[ "rclpy.init", "rclpy.spin", "rclpy.shutdown" ]
[((5157, 5178), 'rclpy.init', 'rclpy.init', ([], {'args': 'args'}), '(args=args)\n', (5167, 5178), False, 'import rclpy\n'), ((5216, 5232), 'rclpy.spin', 'rclpy.spin', (['node'], {}), '(node)\n', (5226, 5232), False, 'import rclpy\n'), ((5261, 5277), 'rclpy.shutdown', 'rclpy.shutdown', ([], {}), '()\n', (5275, 5277), F...
import os import re import subprocess import pytest from invoke import run import tests root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) source_dir = os.path.join(root_dir, "jsonmodels") tests_dir = os.path.join(root_dir, "tests") @pytest.mark.skipif(not tests.LINT, reason="No lint tests."...
[ "os.path.isdir", "os.path.dirname", "pytest.mark.skipif", "invoke.run", "subprocess.call", "re.search", "os.path.join", "os.listdir" ]
[((178, 214), 'os.path.join', 'os.path.join', (['root_dir', '"""jsonmodels"""'], {}), "(root_dir, 'jsonmodels')\n", (190, 214), False, 'import os\n'), ((227, 258), 'os.path.join', 'os.path.join', (['root_dir', '"""tests"""'], {}), "(root_dir, 'tests')\n", (239, 258), False, 'import os\n'), ((262, 321), 'pytest.mark.ski...
""" OAuth2 / OpenID Connect authentication related view handler and supporting utilities. NOTE: for Google provider, set up via https://console.developers.google.com/apis/dashboard """ from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ = "<NAME> ...
[ "traceback.format_exception", "json.loads", "django.contrib.auth.models.User.objects.get", "requests_oauthlib.OAuth2Session", "re.match", "django.contrib.auth.authenticate", "sys.exc_info", "django.contrib.auth.login", "logging.getLogger" ]
[((517, 544), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (534, 544), False, 'import logging\n'), ((2707, 2827), 'requests_oauthlib.OAuth2Session', 'OAuth2Session', ([], {'client_id': "provider_data['client_id']", 'scope': 'self._scope', 'state': 'state', 'redirect_uri': 'self._redirec...
import click, time from pyfiglet import Figlet from halo import Halo from ipcqueue import posixmq import signal, pickle from multiprocessing import shared_memory import os def pass_handler(signal, frame): pass def execute_command(command_type, parameters): pid = os.getpid() message_queue = posixmq.Q...
[ "pickle.loads", "ipcqueue.posixmq.Queue", "os.getpid", "pyfiglet.Figlet", "signal.pause", "click.option", "click.echo", "halo.Halo", "signal.signal", "click.group", "click.secho", "click.style" ]
[((751, 764), 'click.group', 'click.group', ([], {}), '()\n', (762, 764), False, 'import click, time\n'), ((1862, 1912), 'click.option', 'click.option', (['"""--query"""', '"""-q"""'], {'help': '"""Search query"""'}), "('--query', '-q', help='Search query')\n", (1874, 1912), False, 'import click, time\n'), ((2485, 2538...
import argparse import tensorflow as tf from keras import utils from sklearn.metrics import accuracy_score from bert_serving.client import BertClient from sklearn.metrics import precision_recall_fscore_support from config import * from features import * from model import * from loss import cross_entropy from data imp...
[ "argparse.ArgumentParser", "tensorflow.reset_default_graph", "tensorflow.Variable", "tensorflow.InteractiveSession", "bert_serving.client.BertClient", "tensorflow.check_numerics", "tensorflow.placeholder_with_default", "tensorflow.train.get_or_create_global_step", "tensorflow.set_random_seed", "te...
[((378, 403), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (401, 403), False, 'import argparse\n'), ((537, 561), 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), '()\n', (559, 561), True, 'import tensorflow as tf\n'), ((580, 601), 'tensorflow.set_random_seed', 'tf.set_ran...
from .timer import Timer shared_registry = {} def aggregate_registry_timers(): """Returns a list of aggregate timing information for registered timers. Each element is a 3-tuple of - timer description - aggregate elapsed time - number of calls The list is sorted by the first s...
[ "itertools.groupby", "datetime.datetime.now" ]
[((496, 543), 'itertools.groupby', 'itertools.groupby', (['timers'], {'key': '(lambda t: t.desc)'}), '(timers, key=lambda t: t.desc)\n', (513, 543), False, 'import itertools\n'), ((2007, 2030), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (2028, 2030), False, 'import datetime\n')]
import pygame from pygame.locals import * import sys import random FPS = 30 WINDOWWIDTH = 640 WINDOWHEIGHT = 480 REVEALSPEED = 8 BOXSIZE = 40 GAPSIZE = 10 BOARDWIDTH = 10 BOARDHEIGHT = 7 assert (BOARDWIDTH * BOARDHEIGHT) % 2 == 0, 'Board needs to have an even number of boxes for pairs of matches.' XMARGIN = int((WINDO...
[ "pygame.draw.ellipse", "pygame.quit", "pygame.draw.line", "pygame.draw.circle", "pygame.draw.rect", "pygame.display.set_mode", "random.shuffle", "pygame.event.get", "pygame.Rect", "pygame.init", "pygame.time.wait", "pygame.display.update", "pygame.draw.polygon", "pygame.display.set_caption...
[((1171, 1184), 'pygame.init', 'pygame.init', ([], {}), '()\n', (1182, 1184), False, 'import pygame\n'), ((1200, 1219), 'pygame.time.Clock', 'pygame.time.Clock', ([], {}), '()\n', (1217, 1219), False, 'import pygame\n'), ((1238, 1290), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(WINDOWWIDTH, WINDOWHEIGHT)...
"""Stubs for tests using common's usb handling.""" import binascii import signal import string import sys import time from mock import mock from common import TcpHandle, UsbHandle from usb_exceptions import TcpTimeoutException PRINTABLE_DATA = set(string.printable) - set(string.whitespace) def _Dotify(data): if ...
[ "binascii.hexlify", "signal.signal", "mock.mock.MagicMock", "usb_exceptions.TcpTimeoutException" ]
[((710, 744), 'usb_exceptions.TcpTimeoutException', 'TcpTimeoutException', (['"""End of time"""'], {}), "('End of time')\n", (729, 744), False, 'from usb_exceptions import TcpTimeoutException\n'), ((882, 933), 'signal.signal', 'signal.signal', (['signal.SIGALRM', 'self._signal_handler'], {}), '(signal.SIGALRM, self._si...
import sys from orderbook.src.common.priceTree import PriceTree from orderbook.src.common.ptreeIterator import ComplexIterator class OrderBook(object): def __init__(self): self.bids = PriceTree('Bids') self.asks = PriceTree('Asks') def process_order(self, curr_order, printout=False): ...
[ "sys.stdout.write", "orderbook.src.common.priceTree.PriceTree" ]
[((198, 215), 'orderbook.src.common.priceTree.PriceTree', 'PriceTree', (['"""Bids"""'], {}), "('Bids')\n", (207, 215), False, 'from orderbook.src.common.priceTree import PriceTree\n'), ((236, 253), 'orderbook.src.common.priceTree.PriceTree', 'PriceTree', (['"""Asks"""'], {}), "('Asks')\n", (245, 253), False, 'from orde...
from website import create_app app = create_app() if __name__ == '__main__': app.run() #'debug = True' rerun automatico del ws
[ "website.create_app" ]
[((40, 52), 'website.create_app', 'create_app', ([], {}), '()\n', (50, 52), False, 'from website import create_app\n')]
import re from mbq.metrics import Collector, _env, _service DIGIT_ID_REGEX = re.compile(r'/[0-9]+') UUID_REGEX = re.compile(r'/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}') def _sluggified_path(path): path = re.sub(UUID_REGEX, '/:id', path) path = re.sub(DIGIT_ID_REGEX, '/:id', path) ...
[ "mbq.metrics.Collector", "re.sub", "re.compile" ]
[((80, 101), 're.compile', 're.compile', (['"""/[0-9]+"""'], {}), "('/[0-9]+')\n", (90, 101), False, 'import re\n'), ((116, 191), 're.compile', 're.compile', (['"""/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"""'], {}), "('/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')\n", (126, 191), ...
# Copyright (c) 2020 HITCON Agent Contributors # See CONTRIBUTORS file for the list of HITCON Agent Contributors # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includin...
[ "concurrent.futures.ThreadPoolExecutor", "signal.signal", "socket.create_connection", "multiprocessing.Pool" ]
[((1536, 1580), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'signal.SIG_IGN'], {}), '(signal.SIGINT, signal.SIG_IGN)\n', (1549, 1580), False, 'import signal\n'), ((1598, 1653), 'concurrent.futures.ThreadPoolExecutor', 'futures.ThreadPoolExecutor', ([], {'max_workers': '(threadCount + 1)'}), '(max_workers=threa...
# Copyright <NAME> 2017-2018 # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) #------------------------------------------------------------------------------- # filter #-----------------------...
[ "cuppa.utility.types.is_string", "cuppa.colourise.as_notice", "fnmatch.translate", "SCons.Script.Flatten" ]
[((626, 640), 'SCons.Script.Flatten', 'Flatten', (['nodes'], {}), '(nodes)\n', (633, 640), False, 'from SCons.Script import Flatten\n'), ((766, 791), 'SCons.Script.Flatten', 'Flatten', (['[match_patterns]'], {}), '([match_patterns])\n', (773, 791), False, 'from SCons.Script import Flatten\n'), ((1036, 1063), 'SCons.Scr...
import pandas as pd import pytest from dialogy.plugins import ListSearchPlugin from dialogy.types import KeywordEntity from dialogy.workflow import Workflow from tests import EXCEPTIONS, load_tests class EntMocker: def __init__(self, token, label): self.text = token self.label_ = label def _...
[ "dialogy.plugins.ListSearchPlugin", "dialogy.workflow.Workflow", "tests.EXCEPTIONS.get", "pytest.fail", "pytest.raises", "tests.load_tests" ]
[((923, 1070), 'dialogy.plugins.ListSearchPlugin', 'ListSearchPlugin', ([], {'access': '(lambda w: (w.input,))', 'mutate': 'mutate', 'fuzzy_threshold': '(0.4)', 'fuzzy_dp_config': "{'en': {'location': {'delhi': 'Delhi'}}}"}), "(access=lambda w: (w.input,), mutate=mutate,\n fuzzy_threshold=0.4, fuzzy_dp_config={'en':...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Routines to help interpret large binary buffers as arrays of numbers, stored as consecutive sequences of bytes, all with the same length and byte order. """ import array import sys from typing import Iterable _BIG_ENDIAN = sys.byteorder == 'big' _TYPE_CODES = { ...
[ "array.array" ]
[((320, 334), 'array.array', 'array.array', (['t'], {}), '(t)\n', (331, 334), False, 'import array\n'), ((828, 863), 'array.array', 'array.array', (['_TYPE_CODES[blocksize]'], {}), '(_TYPE_CODES[blocksize])\n', (839, 863), False, 'import array\n'), ((1693, 1728), 'array.array', 'array.array', (['_TYPE_CODES[blocksize]'...
# ============================================================================= # SIMULATION-BASED ENGINEERING LAB (SBEL) - http://sbel.wisc.edu # University of Wisconsin-Madison # # Copyright (c) 2020 SBEL # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # at http...
[ "numpy.linalg.eigvals", "numpy.multiply", "numpy.sum", "numpy.power", "numpy.zeros", "time.time", "numpy.array", "numpy.linalg.norm", "numpy.matmul", "numpy.dot", "numpy.eye", "numpy.add", "buildB.buildB", "numpy.random.ranf", "solvers.solver" ]
[((1505, 1529), 'numpy.zeros', 'np.zeros', (['(3 * n_contacts)'], {}), '(3 * n_contacts)\n', (1513, 1529), True, 'import numpy as np\n'), ((1667, 1700), 'numpy.eye', 'np.eye', (['(3 * n_contacts)'], {'dtype': '"""d"""'}), "(3 * n_contacts, dtype='d')\n", (1673, 1700), True, 'import numpy as np\n'), ((1709, 1732), 'nump...
#!/usr/bin/python # This program monitors the UPS state, and logs any interesting transition # to /mnt/logs/ups.log import smbus import time import logging import logging.handlers DEVICE_ADDRESS = 0x69 LOGGING_FILE = "/mnt/logs/ups.log" def formatString(string): return "%s - %s" % (time.asctime(), string) d...
[ "time.asctime", "time.sleep", "logging.handlers.RotatingFileHandler", "logging.getLogger", "smbus.SMBus" ]
[((525, 540), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (535, 540), False, 'import time\n'), ((1070, 1102), 'logging.getLogger', 'logging.getLogger', (['"""UPS_Monitor"""'], {}), "('UPS_Monitor')\n", (1087, 1102), False, 'import logging\n'), ((1146, 1237), 'logging.handlers.RotatingFileHandler', 'logging....
# Webscraping with Python # Extract articles from Al Jazeera by using the JSON endpoint # Load packages import requests import json import urllib.parse import pandas as pd # Searchterms terms = ['Turkey','China','Germany','USA','Ukraine'] # Empty result list results = [] # Download data for term in terms: pr...
[ "pandas.DataFrame", "requests.get", "json.dumps" ]
[((1114, 1135), 'pandas.DataFrame', 'pd.DataFrame', (['results'], {}), '(results)\n', (1126, 1135), True, 'import pandas as pd\n'), ((780, 825), 'requests.get', 'requests.get', (['url'], {'headers': "{'wp-site': 'aje'}"}), "(url, headers={'wp-site': 'aje'})\n", (792, 825), False, 'import requests\n'), ((526, 547), 'jso...
from __init__ import create_app app = create_app() app.run(debug=True)
[ "__init__.create_app" ]
[((39, 51), '__init__.create_app', 'create_app', ([], {}), '()\n', (49, 51), False, 'from __init__ import create_app\n')]
""" This is the requires side of the interface layer, for use in charms that wish to request integration with OpenStack native features. The integration will be provided by the OpenStack integration charm, which allows the requiring charm to not require cloud credentials itself and not have a lot of OpenStack specific...
[ "charms.reactive.when_not", "charms.reactive.when" ]
[((2753, 2793), 'charms.reactive.when', 'when', (['"""endpoint.{endpoint_name}.changed"""'], {}), "('endpoint.{endpoint_name}.changed')\n", (2757, 2793), False, 'from charms.reactive import when, when_not\n'), ((3214, 3257), 'charms.reactive.when_not', 'when_not', (['"""endpoint.{endpoint_name}.joined"""'], {}), "('end...
""" Copyright: <NAME> 2017-2018 Author: <NAME> Email: <EMAIL> Created Date: Oct 15th 2018 Improved train/benchmark/infer script Type --helpfull to get full doc. """ # Import models in development try: from Exp import * except ImportError as ex: pass import tensorflow as tf from importlib import import_module...
[ "VSR.Tools.Run.run", "importlib.import_module", "tensorflow.flags.DEFINE_enum", "VSR.Tools.EvalDataDirectory.evaluate", "VSR.Tools.EvalModelCheckpoint.evaluate", "tensorflow.app.run" ]
[((409, 478), 'tensorflow.flags.DEFINE_enum', 'tf.flags.DEFINE_enum', (['"""mode"""', '"""run"""', "('run', 'eval')", '"""tools to use."""'], {}), "('mode', 'run', ('run', 'eval'), 'tools to use.')\n", (429, 478), True, 'import tensorflow as tf\n'), ((1461, 1477), 'tensorflow.app.run', 'tf.app.run', (['main'], {}), '(m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = '<NAME>' import re, logging from urllib import request, error from urllib.parse import quote from config import configs from models import today, round_float def current_shanghai_index_info(): result = False try: with request.urlopen('http:...
[ "models.today", "logging.error", "urllib.request.urlopen", "urllib.parse.quote", "models.round_float" ]
[((9410, 9426), 'models.round_float', 'round_float', (['fee'], {}), '(fee)\n', (9421, 9426), False, 'from models import today, round_float\n'), ((911, 918), 'models.today', 'today', ([], {}), '()\n', (916, 918), False, 'from models import today, round_float\n'), ((7033, 7084), 'urllib.request.urlopen', 'request.urlopen...
# Copyright 2016 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ "lcm.pub.exceptions.NSLCMException", "lcm.pub.msapi.sdc_run_catalog.query_vnfpackage_by_id", "lcm.pub.database.models.NfInstModel.objects.filter", "json.JSONDecoder", "lcm.ns_vnfs.biz.grant_vnf.vim_connections_get", "lcm.pub.utils.values.ignore_case_get", "logging.getLogger" ]
[((939, 966), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (956, 966), False, 'import logging\n'), ((1439, 1480), 'lcm.pub.utils.values.ignore_case_get', 'ignore_case_get', (['self.data', '"""addResource"""'], {}), "(self.data, 'addResource')\n", (1454, 1480), False, 'from lcm.pub.utils...
"""Private miscellaneous utilities.""" from __future__ import annotations import re from typing import Iterable, Pattern, Text def _isplit( text: Text, pattern: Pattern[Text], include_separators: bool = False ) -> Iterable[Text]: r""" Split text into parts separated by the given pattern. This yield...
[ "re.finditer" ]
[((793, 819), 're.finditer', 're.finditer', (['pattern', 'text'], {}), '(pattern, text)\n', (804, 819), False, 'import re\n')]
import unittest from typing import cast from unittest.mock import MagicMock from waves_gateway.service import PendingAttemptListSelectorService from waves_gateway.storage import TransactionAttemptListStorage class PendingAttemptListSelectorServiceTest(unittest.TestCase): def setUp(self): self._attempt_li...
[ "typing.cast", "unittest.mock.MagicMock" ]
[((333, 344), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (342, 344), False, 'from unittest.mock import MagicMock\n'), ((832, 843), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (841, 843), False, 'from unittest.mock import MagicMock\n'), ((438, 501), 'typing.cast', 'cast', (['TransactionAttem...
# # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ "orchestra.google.marketing_platform.sensors.display_video_360.GoogleDisplayVideo360ReportSensor", "orchestra.google.marketing_platform.operators.display_video_360.GoogleDisplayVideo360DeleteReportOperator", "algo_readiness_factory_dag.build_dag_id", "airflow.DAG", "datetime.datetime.today", "orchestra.go...
[((1721, 1737), 'gps.utils.resource_helpers.ResourceLoader', 'ResourceLoader', ([], {}), '()\n', (1735, 1737), False, 'from gps.utils.resource_helpers import ResourceLoader\n'), ((2716, 2761), 'airflow.DAG', 'DAG', ([], {'dag_id': 'dag_id', 'default_args': 'default_args'}), '(dag_id=dag_id, default_args=default_args)\n...
import var import draw class UI(): title_text = [2, 2] start_text = [4, 4] mode_text = [6, 4] about_text = [8, 4] cursor = [[4, 2], [6, 2], [8, 2]] version_text = [27, 2] about_rect = [4, 10, 22, 76] def loop(): display() def display(): var.window.erase() var.window.border('#...
[ "var.window.addstr", "var.window.border", "var.window.erase", "draw.draw_rect" ]
[((277, 295), 'var.window.erase', 'var.window.erase', ([], {}), '()\n', (293, 295), False, 'import var\n'), ((300, 357), 'var.window.border', 'var.window.border', (['"""#"""', '"""#"""', '"""#"""', '"""#"""', '"""#"""', '"""#"""', '"""#"""', '"""#"""'], {}), "('#', '#', '#', '#', '#', '#', '#', '#')\n", (317, 357), Fal...
__doc__ = """ Use the classifier that you downloaded from the dash-interactive-image-segmentation webapp. Specify files to use on the command line like so: CLF_PATH=path/to/classifier.json \\ IMG_PATH=path/to/image/to/classify.some_image_ending \\ OUT_IMG_PATH=path/to/where/to/put/classified/image.some_ima...
[ "shapes_to_segmentations.label_to_colors", "json.load", "image_segmentation.trainable_segmentation", "base64.b64decode", "plot_common.img_array_to_pil_image" ]
[((986, 1059), 'image_segmentation.trainable_segmentation', 'image_segmentation.trainable_segmentation', (['img'], {'clf': 'clf'}), '(img, clf=clf, **segmenter_args)\n', (1027, 1059), False, 'import image_segmentation\n'), ((1076, 1144), 'shapes_to_segmentations.label_to_colors', 'shapes_to_segmentations.label_to_color...
import numpy as np from headerfile import * from art import * # bricks shape and sizes : bricks = np.array(["[####]","[$$$$]","[++++]","[IIII]","[::::]"]) # Ball : ball_graphic = "O" # Paddle : PADDLE_SIZE = np.array([7,9,13,7,9,13]) paddle_graphic = np.array(['<======>','<=======>','<===========>','|======|','|===...
[ "numpy.array" ]
[((100, 160), 'numpy.array', 'np.array', (["['[####]', '[$$$$]', '[++++]', '[IIII]', '[::::]']"], {}), "(['[####]', '[$$$$]', '[++++]', '[IIII]', '[::::]'])\n", (108, 160), True, 'import numpy as np\n'), ((212, 242), 'numpy.array', 'np.array', (['[7, 9, 13, 7, 9, 13]'], {}), '([7, 9, 13, 7, 9, 13])\n', (220, 242), True...
import os from semantic_release.errors import CiVerificationError def checker(func): """ A decorator that will convert AssertionErrors into CiVerificationError. :param func: A function that will raise AssertionError """ def func_wrapper(*args, **kwargs): try: func(*args,...
[ "os.environ.get", "semantic_release.errors.CiVerificationError" ]
[((773, 804), 'os.environ.get', 'os.environ.get', (['"""TRAVIS_BRANCH"""'], {}), "('TRAVIS_BRANCH')\n", (787, 804), False, 'import os\n'), ((826, 863), 'os.environ.get', 'os.environ.get', (['"""TRAVIS_PULL_REQUEST"""'], {}), "('TRAVIS_PULL_REQUEST')\n", (840, 863), False, 'import os\n'), ((1141, 1170), 'os.environ.get'...
import logging from symbolic.cvc_expr.integer import CVCInteger from symbolic.cvc_expr.string import CVCString from symbolic.symbolic_types import SymbolicInteger, SymbolicStr, SymbolicBytes from symbolic.symbolic_types.symbolic_type import SymbolicObject import utils import codecs log = logging.getLogger("se.cvc_ex...
[ "symbolic.cvc_expr.string.CVCString.variable", "symbolic.cvc_expr.integer.CVCInteger.constant", "utils.crash", "pdb.set_trace", "symbolic.cvc_expr.integer.CVCInteger.variable", "logging.getLogger" ]
[((292, 336), 'logging.getLogger', 'logging.getLogger', (['"""se.cvc_expr.exprbuilder"""'], {}), "('se.cvc_expr.exprbuilder')\n", (309, 336), False, 'import logging\n'), ((1656, 1694), 'symbolic.cvc_expr.integer.CVCInteger.variable', 'CVCInteger.variable', (['name', 'self.solver'], {}), '(name, self.solver)\n', (1675, ...
from django.contrib.gis import geos from django.db import models from rest_framework.response import Response from rest_framework import viewsets, mixins, filters, status from rest_framework.decorators import list_route, detail_route from claim.models import Claim, Organization,\ OrganizationType from geoinfo.mod...
[ "claim.models.OrganizationType.objects.get", "rest_framework.decorators.detail_route", "claim.models.OrganizationType.objects.all", "api.serializers.OrganizationTypeSerializer", "geoinfo.models.Polygon.objects.get", "claim.models.Organization.objects.get", "rest_framework.decorators.list_route", "clai...
[((1380, 1394), 'rest_framework.decorators.detail_route', 'detail_route', ([], {}), '()\n', (1392, 1394), False, 'from rest_framework.decorators import list_route, detail_route\n'), ((3945, 3971), 'claim.models.Organization.objects.all', 'Organization.objects.all', ([], {}), '()\n', (3969, 3971), False, 'from claim.mod...
from typing import Any from boa3.builtin import public from boa3.builtin.interop.binary import deserialize @public def deserialize_arg(arg: bytes) -> Any: return deserialize(arg)
[ "boa3.builtin.interop.binary.deserialize" ]
[((169, 185), 'boa3.builtin.interop.binary.deserialize', 'deserialize', (['arg'], {}), '(arg)\n', (180, 185), False, 'from boa3.builtin.interop.binary import deserialize\n')]
#!/usr/bin/env python # # Copyright (c) 2014-2016 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. 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. Redistribution...
[ "builtins_generator.BuiltinsGenerator.mangledNameForFunction", "builtins_generator.BuiltinsGenerator.__init__", "logging.getLogger", "string.Template" ]
[((1620, 1647), 'logging.getLogger', 'logging.getLogger', (['"""global"""'], {}), "('global')\n", (1637, 1647), False, 'import logging\n'), ((1747, 1786), 'builtins_generator.BuiltinsGenerator.__init__', 'BuiltinsGenerator.__init__', (['self', 'model'], {}), '(self, model)\n', (1773, 1786), False, 'from builtins_genera...
#!/usr/bin/env python import socket as S import os # Shutdown storm print("Shutting down STORM") s = S.socket(S.AF_INET,S.SOCK_DGRAM) # Shutdown s.sendto("SHUTDOWN",('stormc',9999)) os.system('ping -c 10 stormc') # Shutdown mystiquec print("Shutting down MYSTIQUE") os.system('ssh -t mystiquec sudo shutdown -h now') ...
[ "socket.socket", "os.system" ]
[((103, 136), 'socket.socket', 'S.socket', (['S.AF_INET', 'S.SOCK_DGRAM'], {}), '(S.AF_INET, S.SOCK_DGRAM)\n', (111, 136), True, 'import socket as S\n'), ((184, 214), 'os.system', 'os.system', (['"""ping -c 10 stormc"""'], {}), "('ping -c 10 stormc')\n", (193, 214), False, 'import os\n'), ((269, 319), 'os.system', 'os....
# Generated by Django 3.1.2 on 2020-11-03 12:43 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('art', '0006_auto_20201103_1104'), ('spirsa', '0003_auto_20201029_1904'), ] operations = [ migrations.RenameModel( old_name='Abou...
[ "django.db.migrations.RenameModel" ]
[((270, 370), 'django.db.migrations.RenameModel', 'migrations.RenameModel', ([], {'old_name': '"""AbountContactInformation"""', 'new_name': '"""AboutContactInformation"""'}), "(old_name='AbountContactInformation', new_name=\n 'AboutContactInformation')\n", (292, 370), False, 'from django.db import migrations\n')]
from meta import Meta from data import ProfileData class Profile: def __init__(self, meta, shared): self.meta = Meta(meta) self.data = ProfileData(shared)
[ "meta.Meta", "data.ProfileData" ]
[((134, 144), 'meta.Meta', 'Meta', (['meta'], {}), '(meta)\n', (138, 144), False, 'from meta import Meta\n'), ((166, 185), 'data.ProfileData', 'ProfileData', (['shared'], {}), '(shared)\n', (177, 185), False, 'from data import ProfileData\n')]
from skimage.metrics import structural_similarity as ssim import glob import numpy as np from skimage import * from skimage.transform import resize import imageio import os import cv2 import tensorflow as tf #import io import numpy from skimage import io import tensorflow as tf def log10(x): numerator = tf.log(x...
[ "tensorflow.Session", "tensorflow.constant", "cv2.imread", "numpy.array", "tensorflow.squared_difference", "tensorflow.log", "glob.iglob" ]
[((1548, 1568), 'glob.iglob', 'glob.iglob', (['location'], {}), '(location)\n', (1558, 1568), False, 'import glob\n'), ((312, 321), 'tensorflow.log', 'tf.log', (['x'], {}), '(x)\n', (318, 321), True, 'import tensorflow as tf\n'), ((1578, 1598), 'cv2.imread', 'cv2.imread', (['filename'], {}), '(filename)\n', (1588, 1598...
from couchbase.cluster import Cluster from couchbase.cluster import PasswordAuthenticator from couchbase.n1ql import N1QLQuery ######## Update this to your cluster endpoint = 'cb.e207a530-a469-492f-89d4-a5392e265c10.dp.cloud.couchbase.com' username = 'user' password = 'password' bucket_name = 'couchbasecloudbucket' ##...
[ "couchbase.cluster.Cluster", "couchbase.n1ql.N1QLQuery", "couchbase.cluster.PasswordAuthenticator" ]
[((384, 438), 'couchbase.cluster.Cluster', 'Cluster', (["('couchbases://' + endpoint + '?ssl=no_verify')"], {}), "('couchbases://' + endpoint + '?ssl=no_verify')\n", (391, 438), False, 'from couchbase.cluster import Cluster\n'), ((486, 527), 'couchbase.cluster.PasswordAuthenticator', 'PasswordAuthenticator', (['usernam...
from django.test import TestCase from herbie_core.services.utils import BusinessEntityUtils class BusinessEntityUtilsTestCase(TestCase): def test_snake_to_camel(self): self.assertEqual("", BusinessEntityUtils.snake_to_camel("")) self.assertEqual("Customer", BusinessEntityUtils.snake_to_camel("cus...
[ "herbie_core.services.utils.BusinessEntityUtils.snake_to_camel", "herbie_core.services.utils.BusinessEntityUtils.camel_to_snake" ]
[((204, 242), 'herbie_core.services.utils.BusinessEntityUtils.snake_to_camel', 'BusinessEntityUtils.snake_to_camel', (['""""""'], {}), "('')\n", (238, 242), False, 'from herbie_core.services.utils import BusinessEntityUtils\n'), ((281, 327), 'herbie_core.services.utils.BusinessEntityUtils.snake_to_camel', 'BusinessEnti...
import numpy as np import random class RandomAgent: """A completely random soaring agent. This is used to document the api for all agents.""" def get_action(self, observation): """Returns the action the agents intends to do at the moment. - 0: Decrease bank angle by five degrees. ...
[ "numpy.argmax", "numpy.deg2rad", "numpy.zeros", "random.choice", "random.random", "numpy.max", "numpy.random.rand", "numpy.round" ]
[((413, 437), 'random.choice', 'random.choice', (['[0, 1, 2]'], {}), '([0, 1, 2])\n', (426, 437), False, 'import random\n'), ((1655, 1684), 'numpy.random.rand', 'np.random.rand', (['(2)', '(7)', '(2)', '(2)', '(3)'], {}), '(2, 7, 2, 2, 3)\n', (1669, 1684), True, 'import numpy as np\n'), ((2096, 2142), 'numpy.argmax', '...
from ...exceptions import BadRequestException from ...utils import get_temp_dir from biosimulators_utils.combine.io import CombineArchiveReader from biosimulators_utils.combine.utils import get_sedml_contents from biosimulators_utils.sedml.data_model import ( # noqa: F401 Model, ModelChange, ModelAttribute...
[ "traceback.print_exc", "biosimulators_utils.combine.utils.get_sedml_contents", "biosimulators_utils.sedml.io.SedmlSimulationReader", "copy.copy", "biosimulators_utils.combine.io.CombineArchiveReader", "requests.get", "os.path.join" ]
[((1952, 1994), 'os.path.join', 'os.path.join', (['temp_dirname', '"""archive.omex"""'], {}), "(temp_dirname, 'archive.omex')\n", (1964, 1994), False, 'import os\n'), ((2681, 2718), 'os.path.join', 'os.path.join', (['temp_dirname', '"""archive"""'], {}), "(temp_dirname, 'archive')\n", (2693, 2718), False, 'import os\n'...
from cms.models import CMSPlugin from django.db.models import Q from django.dispatch.dispatcher import receiver from django.utils import timezone from aldryn_search.helpers import get_plugin_index_data from aldryn_search.signals import add_to_index, remove_from_index from aldryn_search.utils import clean_join, get_ind...
[ "aldryn_search.signals.remove_from_index.send", "django.utils.timezone.now", "aldryn_search.utils.clean_join", "django.db.models.Q", "aldryn_search.utils.get_index_base", "aldryn_search.signals.add_to_index.send", "aldryn_search.helpers.get_plugin_index_data", "django.dispatch.dispatcher.receiver", ...
[((467, 483), 'aldryn_search.utils.get_index_base', 'get_index_base', ([], {}), '()\n', (481, 483), False, 'from aldryn_search.utils import clean_join, get_index_base\n'), ((3879, 3945), 'django.dispatch.dispatcher.receiver', 'receiver', (['post_publish_article'], {'dispatch_uid': '"""publish_cms_article"""'}), "(post_...
########################################################################### # # Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/...
[ "starthinker_ui.recipe.forms_fields.TimezoneField" ]
[((1459, 1488), 'starthinker_ui.recipe.forms_fields.TimezoneField', 'TimezoneField', ([], {'required': '(False)'}), '(required=False)\n', (1472, 1488), False, 'from starthinker_ui.recipe.forms_fields import ListChoiceField, ListChoiceIntegerField, TimezoneField\n')]
from gevent import monkey monkey.patch_all() import requests import gevent from gevent.pool import Pool def run_task(url): print('Visit---> %s' % url) try: response = requests.get(url) print('%d bytes received from %s.' %(len(response.text), url)) except Exception as e: print(e) ...
[ "gevent.pool.Pool", "gevent.monkey.patch_all", "requests.get", "gevent.spawn", "gevent.joinall" ]
[((26, 44), 'gevent.monkey.patch_all', 'monkey.patch_all', ([], {}), '()\n', (42, 44), False, 'from gevent import monkey\n'), ((522, 547), 'gevent.joinall', 'gevent.joinall', (['greenlets'], {}), '(greenlets)\n', (536, 547), False, 'import gevent\n'), ((602, 609), 'gevent.pool.Pool', 'Pool', (['(2)'], {}), '(2)\n', (60...
import asyncio from copy import deepcopy import json import logging from random import choice as rand_choice import clashroyale import discord from redbot.core import commands, checks, Config from redbot.core.data_manager import bundled_data_path, cog_data_path # Replace this with test server id while debugging legen...
[ "discord.utils.get", "json.load", "discord.Embed", "asyncio.sleep", "discord.Color.red", "redbot.core.commands.guild_only", "random.choice", "discord.Color.green", "redbot.core.data_manager.bundled_data_path", "redbot.core.data_manager.cog_data_path", "redbot.core.commands.command", "redbot.co...
[((506, 543), 'logging.getLogger', 'logging.getLogger', (['"""red.cogs.welcome"""'], {}), "('red.cogs.welcome')\n", (523, 543), False, 'import logging\n'), ((28352, 28375), 'redbot.core.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (28373, 28375), False, 'from redbot.core import commands, checks, C...
import sys sys.path.append('.') sys.path.append('..') sys.path.append('../../') sys.path.append('../../../') import argparse from model.task1.neural_models import train_ei_reg, train_ei_oc, \ train_v_reg, train_v_oc, train_e_c ############################################################################## # Comma...
[ "sys.path.append", "argparse.ArgumentParser", "model.task1.neural_models.train_v_reg", "model.task1.neural_models.train_v_oc", "model.task1.neural_models.train_ei_reg", "model.task1.neural_models.train_ei_oc", "model.task1.neural_models.train_e_c" ]
[((12, 32), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (27, 32), False, 'import sys\n'), ((33, 54), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (48, 54), False, 'import sys\n'), ((55, 80), 'sys.path.append', 'sys.path.append', (['"""../../"""'], {}), "('../../')\n", (7...
#!/usr/bin/env python # -*- coding: utf-8 -*- # #Created on Fri Apr 21 11:13:09 2017 # #author: <NAME> # import numpy as np import math import scipy.linalg from scipy.special import gammaln,iv import os import h5py import warnings import time def cholupdate(chol, point): ''' Update the lower triangular Cholesk...
[ "math.hypot", "numpy.sum", "numpy.empty", "numpy.reciprocal", "numpy.mean", "numpy.arange", "numpy.finfo", "numpy.linalg.det", "math.log", "numpy.cov", "numpy.var", "numpy.diagonal", "h5py.File", "numpy.asarray", "numpy.square", "numpy.dot", "numpy.log", "numpy.zeros", "time.time...
[((1128, 1162), 'numpy.empty', 'np.empty', (['(n_components, dim, dim)'], {}), '((n_components, dim, dim))\n', (1136, 1162), True, 'import numpy as np\n'), ((1692, 1714), 'numpy.zeros', 'np.zeros', (['n_components'], {}), '(n_components)\n', (1700, 1714), True, 'import numpy as np\n'), ((4397, 4417), 'scipy.special.iv'...
#! /usr/bin/env python2 ''' This script converts the Ensembl.dat file to the GO reference file used in the topGO R program. #Example input: ID 1 standard; DNA; HTG; 122678785 BP. XX AC chromosome:CanFam3.1:1:1:122678785:1 XX SV 1.CanFam3.1 XX DT 4-SEP-2018 XX DE Canis lupus familiaris chromosome 1 CanFam...
[ "calls.CommandLineParser" ]
[((8081, 8106), 'calls.CommandLineParser', 'calls.CommandLineParser', ([], {}), '()\n', (8104, 8106), False, 'import calls\n')]
from torch import nn from torchvision.models.resnet import ResNet, Bottleneck class ResNetEncoder(ResNet): """ ResNetEncoder inherits from torchvision's official ResNet. It is modified to use dilation on the last block to maintain output stride 16, and deleted the global average pooling layer and the ...
[ "torch.nn.Conv2d" ]
[((999, 1046), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_channels', '(64)', '(7)', '(2)', '(3)'], {'bias': '(False)'}), '(in_channels, 64, 7, 2, 3, bias=False)\n', (1008, 1046), False, 'from torch import nn\n')]
# -*- coding: utf-8 -*- __author__ = '<NAME>' import sys import struct import cv2 import numpy as np class improc: def __init__(self): pass def doProc(self, path, featureSize): img = cv2.imread(path) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) des = None sift = cv2...
[ "cv2.cvtColor", "cv2.imread", "cv2.imshow", "cv2.SIFT" ]
[((212, 228), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (222, 228), False, 'import cv2\n'), ((244, 281), 'cv2.cvtColor', 'cv2.cvtColor', (['img', 'cv2.COLOR_BGR2GRAY'], {}), '(img, cv2.COLOR_BGR2GRAY)\n', (256, 281), False, 'import cv2\n'), ((317, 329), 'cv2.SIFT', 'cv2.SIFT', (['(40)'], {}), '(40)\n', (3...
import FWCore.ParameterSet.Config as cms # Despite the name of the generator, this generates particles whose # distribution is flat in log(Pt). generator = cms.EDProducer("FlatRandomOneOverPtGunProducer", PGunParameters = cms.PSet( # This specifies range in 1/Pt # It coresponds to Pt = 0.1 to 2000...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.double", "FWCore.ParameterSet.Config.vint32", "FWCore.ParameterSet.Config.bool", "FWCore.ParameterSet.Config.untracked.uint32" ]
[((637, 659), 'FWCore.ParameterSet.Config.untracked.int32', 'cms.untracked.int32', (['(0)'], {}), '(0)\n', (656, 659), True, 'import FWCore.ParameterSet.Config as cms\n'), ((717, 753), 'FWCore.ParameterSet.Config.string', 'cms.string', (['"""single mu pt 0.1to1000"""'], {}), "('single mu pt 0.1to1000')\n", (727, 753), ...
from django.conf.urls.defaults import patterns, url from urls import urlpatterns as main_patterns ALL_VERSIONS_RE = '(?P<version>.+)' urlpatterns = patterns( '', # base view, flake8 complains if it is on the previous line. url('^$', 'djangome.views.redirect_home', {'version': 'latest'}), ...
[ "django.conf.urls.defaults.url" ]
[((235, 299), 'django.conf.urls.defaults.url', 'url', (['"""^$"""', '"""djangome.views.redirect_home"""', "{'version': 'latest'}"], {}), "('^$', 'djangome.views.redirect_home', {'version': 'latest'})\n", (238, 299), False, 'from django.conf.urls.defaults import patterns, url\n'), ((322, 416), 'django.conf.urls.defaults...
import discord class PaginatorButtons(discord.ui.Button): def __init__(self, view, **kwargs): super().__init__(**kwargs) self.help = view.help self.mapping = view.mapping self.homepage = view.homepage self.page = view.page self.mbeds = view.mbeds async def callb...
[ "discord.ui.Button", "discord.ui.button", "discord.Permissions", "discord.Embed" ]
[((7299, 7374), 'discord.ui.button', 'discord.ui.button', ([], {'emoji': '"""🏠"""', 'label': '"""Home"""', 'style': 'discord.ButtonStyle.green'}), "(emoji='🏠', label='Home', style=discord.ButtonStyle.green)\n", (7316, 7374), False, 'import discord\n'), ((7535, 7610), 'discord.ui.button', 'discord.ui.button', ([], {'e...
from treadmill.infra import vpc, constants import click import re import pkg_resources _IPA_PASSWORD_RE = re.compile('.{8,}') _URL_RE = re.compile('https?|www.*') def convert_to_vpc_id(ctx, param, value): """Returns VPC ID from Name""" if not value: return value try: return vpc.VPC.get_i...
[ "click.BadParameter", "re.compile", "pkg_resources.resource_string", "treadmill.infra.vpc.VPC.get_id_from_name", "click.prompt" ]
[((107, 126), 're.compile', 're.compile', (['""".{8,}"""'], {}), "('.{8,}')\n", (117, 126), False, 'import re\n'), ((137, 163), 're.compile', 're.compile', (['"""https?|www.*"""'], {}), "('https?|www.*')\n", (147, 163), False, 'import re\n'), ((473, 504), 'treadmill.infra.vpc.VPC.get_id_from_name', 'vpc.VPC.get_id_from...
import re def parsefile(original_array, form, correction_form): correction_array = [] correction_array.extend(original_array) for line in correction_array: #iterate through array of lines and do a raw_input prompt current_index = correction_array.index(line) if (line.find(form) >...
[ "re.finditer" ]
[((369, 392), 're.finditer', 're.finditer', (['form', 'line'], {}), '(form, line)\n', (380, 392), False, 'import re\n')]
import os import textwrap import unittest from conans.client.importer import IMPORTS_MANIFESTS from conans.model.manifest import FileTreeManifest from conans.test.utils.test_files import temp_folder from conans.test.utils.tools import TestClient from conans.util.files import mkdir conanfile = """ from conans import C...
[ "conans.util.files.mkdir", "textwrap.dedent", "conans.test.utils.test_files.temp_folder", "conans.test.utils.tools.TestClient", "os.path.join", "os.listdir", "conans.model.manifest.FileTreeManifest.loads" ]
[((1222, 1234), 'conans.test.utils.tools.TestClient', 'TestClient', ([], {}), '()\n', (1232, 1234), False, 'from conans.test.utils.tools import TestClient\n'), ((1991, 2004), 'conans.test.utils.test_files.temp_folder', 'temp_folder', ([], {}), '()\n', (2002, 2004), False, 'from conans.test.utils.test_files import temp_...
from setuptools import setup setup(name='muller_brown', version='0.0.1', install_requires=['gym','numpy','matplotlib'] )
[ "setuptools.setup" ]
[((30, 126), 'setuptools.setup', 'setup', ([], {'name': '"""muller_brown"""', 'version': '"""0.0.1"""', 'install_requires': "['gym', 'numpy', 'matplotlib']"}), "(name='muller_brown', version='0.0.1', install_requires=['gym',\n 'numpy', 'matplotlib'])\n", (35, 126), False, 'from setuptools import setup\n')]
import pandas as pd import numpy as np def get_rating_summary(df,num_users = None, num_items = None): ''' print summary of user-item matrix args: df: data frame which contains userId & itemId columns ''' if num_users == None: num_users = len(df['userId'].unique()) if num_items ...
[ "pandas.DataFrame", "pandas.merge" ]
[((3301, 3353), 'pandas.DataFrame', 'pd.DataFrame', (["{'tag': tag_list, 'tagId': tagId_list}"], {}), "({'tag': tag_list, 'tagId': tagId_list})\n", (3313, 3353), True, 'import pandas as pd\n'), ((3595, 3657), 'pandas.DataFrame', 'pd.DataFrame', (["{'itemId': old_itemId, 'new_itemId': new_itemId}"], {}), "({'itemId': ol...
from django.contrib.auth.models import AnonymousUser from django.shortcuts import redirect def login_required(func): def newfunc(request, *args, **kwargs): if not request.user == AnonymousUser: return redirect('/admin/login') return func(request, *args, **kwargs) newfunc.__name__ =...
[ "django.shortcuts.redirect" ]
[((227, 251), 'django.shortcuts.redirect', 'redirect', (['"""/admin/login"""'], {}), "('/admin/login')\n", (235, 251), False, 'from django.shortcuts import redirect\n')]
#!/usr/bin/env python3 import os import sys import subprocess os.environ[ 'TERM' ] = 'xterm' def main( ): cmd = 'make sample'.split( ) res = subprocess.run( cmd, stdout = subprocess.PIPE, cwd = 'hippo-ai') if res: text = res.stdout.decode( 'utf-8' ) text = '.'.join( text.split( '.' )[1:] ...
[ "subprocess.run" ]
[((152, 211), 'subprocess.run', 'subprocess.run', (['cmd'], {'stdout': 'subprocess.PIPE', 'cwd': '"""hippo-ai"""'}), "(cmd, stdout=subprocess.PIPE, cwd='hippo-ai')\n", (166, 211), False, 'import subprocess\n')]
from torch import nn, zeros import torch from hw_asr.base import BaseModel from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence class LstmModel(BaseModel): def __init__(self, n_feats, n_class, layer_dim, fc_hidden=512, *args, **kwargs): super(LstmModel, self).__init__(n_feats, n_class,...
[ "torch.nn.LSTM", "torch.nn.utils.rnn.pad_packed_sequence", "torch.nn.Linear" ]
[((430, 506), 'torch.nn.LSTM', 'nn.LSTM', (['n_feats', 'fc_hidden', 'layer_dim'], {'bidirectional': '(True)', 'batch_first': '(True)'}), '(n_feats, fc_hidden, layer_dim, bidirectional=True, batch_first=True)\n', (437, 506), False, 'from torch import nn, zeros\n'), ((525, 558), 'torch.nn.Linear', 'nn.Linear', (['(fc_hid...
import Entities_Player as Player import Entities_Warp as Warp import Utils_Scene as Scene import Utils_Intersect as Intersect import Utils_Rotation as Rotation import Entities_Plante as Plante class WarpScript: def __init__(self): self.player = None self.scenes = [] self.__purge ...
[ "Utils_Intersect.intersectXY" ]
[((625, 720), 'Utils_Intersect.intersectXY', 'Intersect.intersectXY', (['self.player.position', 'self.player.colBox', 'warp.warppos', 'warp.colBox'], {}), '(self.player.position, self.player.colBox, warp.\n warppos, warp.colBox)\n', (646, 720), True, 'import Utils_Intersect as Intersect\n')]
# coding: utf-8 from pyspark import SparkContext, SparkConf def create_spark_context(): spark_conf = SparkConf().setAppName("WordCount")\ .set("spark.ui.showConsoleProgress", "false") # 设置不要显示spark执行进度 sc = SparkContext(conf=spark_conf) print('master:{}'.format(sc.master)) set_logger(sc) ...
[ "pyspark.SparkContext", "pyspark.SparkConf" ]
[((228, 257), 'pyspark.SparkContext', 'SparkContext', ([], {'conf': 'spark_conf'}), '(conf=spark_conf)\n', (240, 257), False, 'from pyspark import SparkContext, SparkConf\n'), ((109, 120), 'pyspark.SparkConf', 'SparkConf', ([], {}), '()\n', (118, 120), False, 'from pyspark import SparkContext, SparkConf\n')]
# Generated by Django 2.2.7 on 2020-09-24 06:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('classroom', '0005_auto_20200917_1241'), ] operations = [ migrations.AlterField( model_name='quiz', name='date', ...
[ "django.db.models.DateField" ]
[((334, 372), 'django.db.models.DateField', 'models.DateField', ([], {'default': '"""2020-09-24"""'}), "(default='2020-09-24')\n", (350, 372), False, 'from django.db import migrations, models\n'), ((491, 529), 'django.db.models.DateField', 'models.DateField', ([], {'default': '"""2020-09-24"""'}), "(default='2020-09-24...
import math from ..builder import BACKBONES from ..utils import ResLayer from .resnet import Bottleneck as _Bottleneck from .resnet import ResNet from torch.nn.modules.utils import _pair, _single from mmcv.ops.deform_conv import deform_conv2d from mmcv.cnn import (build_conv_layer, build_norm_layer, build_plugin_layer...
[ "torch.nn.AdaptiveAvgPool2d", "torch.nn.ReLU", "torch.where", "torch.split", "torch.nn.Conv2d", "math.floor", "mmcv.cnn.kaiming_init", "torch.max", "mmcv.cnn.build_conv_layer", "mmcv.cnn.build_norm_layer", "mmcv.ops.deform_conv.deform_conv2d" ]
[((904, 1107), 'torch.nn.Conv2d', 'nn.Conv2d', (['channels', '(self.deform_groups * 2 * self.kernel_size[0] * self.kernel_size[1])'], {'kernel_size': 'self.kernel_size', 'stride': 'self.stride', 'padding': 'self.padding', 'dilation': 'self.dilation', 'bias': '(True)'}), '(channels, self.deform_groups * 2 * self.kernel_...
from __future__ import unicode_literals from django.utils.encoding import python_2_unicode_compatible from django.db import models from django.forms import ModelForm from django.contrib.auth.models import User from django.db.models.functions import Concat from django.db.models.signals import post_delete, pre_delete fro...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.IntegerField", "django.db.models.DecimalField", "django.db.models.DateField", "django.dispatch.dispatcher.receiver" ]
[((2763, 2803), 'django.dispatch.dispatcher.receiver', 'receiver', (['post_delete'], {'sender': 'SingleBook'}), '(post_delete, sender=SingleBook)\n', (2771, 2803), False, 'from django.dispatch.dispatcher import receiver\n'), ((472, 503), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(15)'}), '(...
import logging import contextlib import collections from dataclasses import dataclass from typing import List, Any, Optional, Dict, Callable, Coroutine, AsyncIterable, Tuple, Iterator, AsyncIterator, \ Iterable from aiorpc import IAIORPCNode, ConnectionPool, HistoricCollectionStatus, iter_unreachable, unpack_histo...
[ "aiorpc.service.get_inventory_path", "aiorpc.unpack_historic_data", "koder_utils.async_wait_cycle", "aiorpc.service.get_http_conn_pool_from_cfg", "collections.Counter", "aiorpc.iter_unreachable", "collections.defaultdict", "cephlib.RadosDF.from_json", "aiorpc.service.get_config", "logging.getLogge...
[((697, 725), 'logging.getLogger', 'logging.getLogger', (['"""collect"""'], {}), "('collect')\n", (714, 725), False, 'import logging\n'), ((832, 860), 'aiorpc.service.get_config', 'get_aiorpc_config', ([], {'path': 'None'}), '(path=None)\n', (849, 860), True, 'from aiorpc.service import get_config as get_aiorpc_config,...
from .models import Concept, ConceptText, ConceptDocumentRelationship, Relation, RelationGroup from ...document.models import Document from ...common.formatter import clean_df import itertools """ # makes concept lists for only documents that have at least two dictionaries that contain concepts. Must be done server s...
[ "itertools.combinations" ]
[((3090, 3138), 'itertools.combinations', 'itertools.combinations', (['document_concepts_set', '(2)'], {}), '(document_concepts_set, 2)\n', (3112, 3138), False, 'import itertools\n')]
import numpy as np print(np.__version__) a = np.reshape(np.arange(1,21), (4,5)) print(a) print(f'a[1] => {a[1]}') print(f'a[3] => {a[1]}') print(f'a[-1] => {a[-1]}') print(f'a[1,2] => {a[1,2]}') print(f'a[1][2] => {a[1][2]}') print(list(np.ndenumerate(a))) print(f'a[0:2] => {a[0:2]}') print(f'a[2:] => {a...
[ "numpy.arange", "numpy.ndenumerate" ]
[((59, 75), 'numpy.arange', 'np.arange', (['(1)', '(21)'], {}), '(1, 21)\n', (68, 75), True, 'import numpy as np\n'), ((246, 263), 'numpy.ndenumerate', 'np.ndenumerate', (['a'], {}), '(a)\n', (260, 263), True, 'import numpy as np\n')]
import time import platform import logging from config import Config from telegraph import Telegraph from tronx.pyrogramx.methods import Methods from pyrogram import __version__ as pyro_version from tronx.database import Database from tronx.helpers import Helpers class Utils(Methods, Config, Database, Helpers): ...
[ "platform.python_version", "logging.basicConfig", "telegraph.Telegraph", "time.time", "logging.getLogger" ]
[((687, 698), 'time.time', 'time.time', ([], {}), '()\n', (696, 698), False, 'import time\n'), ((870, 923), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s %(message)s"""'}), "(format='%(asctime)s %(message)s')\n", (889, 923), False, 'import logging\n'), ((931, 955), 'logging.getLogger', '...
""" (c) RIKEN 2015. All rights reserved. Author: <NAME> This software is released under the new BSD License; see LICENSE. """ import StringIO import os import re from yamtbx import util from libtbx.utils import null_out from cctbx import sgtbx from cctbx import crystal from yamtbx.dataproc.xds import xds_ascii point...
[ "cctbx.crystal.symmetry", "os.remove", "libtbx.utils.null_out", "cctbx.sgtbx.change_of_basis_op", "os.path.basename", "os.path.dirname", "yamtbx.util.call", "yamtbx.dataproc.xds.xds_ascii.XDS_ASCII", "os.path.isfile", "cctbx.sgtbx.space_group_info", "re.compile" ]
[((354, 514), 're.compile', 're.compile', (['"""([0-9]+\\\\.[0-9][0-9]) *([0-9]+\\\\.[0-9][0-9]) *([0-9]+\\\\.[0-9][0-9]) +([0-9]+\\\\.[0-9][0-9]) *([0-9]+\\\\.[0-9][0-9]) *([0-9]+\\\\.[0-9][0-9])"""'], {}), "(\n '([0-9]+\\\\.[0-9][0-9]) *([0-9]+\\\\.[0-9][0-9]) *([0-9]+\\\\.[0-9][0-9]) +([0-9]+\\\\.[0-9][0-9]) *([0...
import io import codecs import csv from collections import Counter try: import web store = web.storage except: # borrowed from web.py storage class class store(dict): def __getattr__(self, key): try: return self[key] except KeyError as k: ...
[ "io.StringIO", "csv.reader", "codecs.open", "csv.writer", "collections.Counter", "cStringIO.StringIO" ]
[((3051, 3094), 'csv.reader', 'csv.reader', (['data'], {'dialect': 'dialect'}), '(data, dialect=dialect, **kwargs)\n', (3061, 3094), False, 'import csv\n'), ((5576, 5596), 'io.StringIO', 'io.StringIO', (['encoded'], {}), '(encoded)\n', (5587, 5596), False, 'import io\n'), ((6521, 6541), 'cStringIO.StringIO', 'cStringIO...