code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from .pyast import transform_function_block, get_fn, get_ln, \ extract_arg_name_order_from_fn import inspect import _kratos class FunctionCall: cache_ordering = {} def __init__(self, fn): self.__fn = fn def __call__(self, *args): # notice that we need to get self from the upper local...
[ "inspect.currentframe" ]
[((334, 356), 'inspect.currentframe', 'inspect.currentframe', ([], {}), '()\n', (354, 356), False, 'import inspect\n')]
# -*- coding: utf-8 -*- #BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class SubdataSelectionTester: ''' Module Name: SubdataSelectionTester Module Description: A KBase module: SubdataSelectionTester ''' ######## WARNING FOR GEVENT USERS ###...
[ "biokbase.workspace.client.Workspace" ]
[((1490, 1545), 'biokbase.workspace.client.Workspace', 'workspaceService', (['self.workspaceURL'], {'token': "ctx['token']"}), "(self.workspaceURL, token=ctx['token'])\n", (1506, 1545), True, 'from biokbase.workspace.client import Workspace as workspaceService\n')]
# -*- coding: utf-8 -*- """ Created on Sun Jan 12 22:12:50 2020 @author: Warmachine """ from __future__ import print_function, division import os,sys pwd = os.getcwd() sys.path.insert(0,pwd) #%% print('-'*30) print(os.getcwd()) print('-'*30) #%% import pytube import pandas as pd import os from gl...
[ "pandas.DataFrame", "os.mkdir", "pytube.YouTube", "os.getcwd", "pandas.read_csv", "os.path.isdir", "sys.path.insert", "os.path.isfile" ]
[((169, 180), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (178, 180), False, 'import os\n'), ((182, 205), 'sys.path.insert', 'sys.path.insert', (['(0)', 'pwd'], {}), '(0, pwd)\n', (197, 205), False, 'import os, sys\n'), ((909, 950), 'pandas.read_csv', 'pd.read_csv', (['meta_video_path'], {'header': 'None'}), '(meta_vid...
from app.models.common import DateTimeModelMixin, IDModelMixin from app.models.domain.base import BaseDomainModel from app.services import security class User(BaseDomainModel): username: str email: str first_name: str last_name: str is_active: bool is_project_manager: bool photo: bytes | N...
[ "app.services.security.generate_salt", "app.services.security.verify_password", "app.services.security.get_password_hash" ]
[((500, 568), 'app.services.security.verify_password', 'security.verify_password', (['(self.salt + password)', 'self.hashed_password'], {}), '(self.salt + password, self.hashed_password)\n', (524, 568), False, 'from app.services import security\n'), ((646, 670), 'app.services.security.generate_salt', 'security.generate...
__author__ = "<NAME>" __since__ = "April 2020" __email__ = "<EMAIL>" from typing import Tuple from unittest import TestCase, main class Function: def __init__(self, x: int, y: int, z: int) -> None: self.__x: int = x self.__y: int = y self.__z: int = z def __call__(self, multiplier: ...
[ "unittest.main" ]
[((930, 936), 'unittest.main', 'main', ([], {}), '()\n', (934, 936), False, 'from unittest import TestCase, main\n')]
import copy import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import random import time class DDPG(): def __init__(self, actor, critic, args): self.recurrent = args.recurrent self.actor = actor self.critic = critic self.target_actor = copy.deepcopy(actor) se...
[ "copy.deepcopy", "torch.nn.functional.mse_loss", "torch.no_grad" ]
[((293, 313), 'copy.deepcopy', 'copy.deepcopy', (['actor'], {}), '(actor)\n', (306, 313), False, 'import copy\n'), ((339, 360), 'copy.deepcopy', 'copy.deepcopy', (['critic'], {}), '(critic)\n', (352, 360), False, 'import copy\n'), ((1679, 1710), 'torch.nn.functional.mse_loss', 'F.mse_loss', (['current_q', 'target_q'], ...
"""Tests for certbot_dns_clouddns.dns_clouddns.""" from certbot import errors import pytest from certbot_dns_clouddns import dns_clouddns @pytest.fixture(scope="session") def access_token(login_server): return login_server.RequestHandlerClass.ACCESS_TOKEN @pytest.fixture(scope="session") def clientid(api_serve...
[ "certbot_dns_clouddns.dns_clouddns._CloudDNSClient", "pytest.raises", "pytest.fixture" ]
[((142, 173), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (156, 173), False, 'import pytest\n'), ((266, 297), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (280, 297), False, 'import pytest\n'), ((379, 410), 'pytest.fixture'...
#!/usr/bin/env python3 ''' All methods here ''' import sys sys.path.append(".") import matplotlib.pyplot as plt import numpy as np import sympy as sy from fractions import Fraction as frac sy.init_printing() from typing import Callable, Tuple, List, NewType import pandas as pd import matplotlib.pyplot as plt impo...
[ "sys.path.append", "sympy.Symbol", "pandas.DataFrame", "sympy.diff", "sympy.init_printing", "typing.NewType", "sympy.Function" ]
[((61, 81), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (76, 81), False, 'import sys\n'), ((193, 211), 'sympy.init_printing', 'sy.init_printing', ([], {}), '()\n', (209, 211), True, 'import sympy as sy\n'), ((363, 385), 'typing.NewType', 'NewType', (['"""step"""', 'float'], {}), "('step', float)...
# Generated by Django 2.1.2 on 2018-11-13 14:00 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('librarian', '0008_auto_20181113_1927'), ] operations = [ migrations.RenameModel( old_name='dblib', new_name='l...
[ "django.db.migrations.RenameModel" ]
[((241, 303), 'django.db.migrations.RenameModel', 'migrations.RenameModel', ([], {'old_name': '"""dblib"""', 'new_name': '"""librarian"""'}), "(old_name='dblib', new_name='librarian')\n", (263, 303), False, 'from django.db import migrations\n')]
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T E X A M P L E S # # www.pagebot.io # Licensed under MIT conditions # # ----------------------------------------------------------------------------- # E14_Dis...
[ "pagebot.fonttoolbox.objects.font.findFont", "pagebot.getContext", "pagebot.document.Document", "pagebot.toolbox.color.color", "pagebot.toolbox.transformer.path2FileName", "pagebot.toolbox.units.pt" ]
[((915, 922), 'pagebot.toolbox.units.pt', 'pt', (['(500)'], {}), '(500)\n', (917, 922), False, 'from pagebot.toolbox.units import p, pt\n'), ((933, 943), 'pagebot.toolbox.units.pt', 'pt', (['(4 * 12)'], {}), '(4 * 12)\n', (935, 943), False, 'from pagebot.toolbox.units import p, pt\n'), ((949, 976), 'pagebot.fonttoolbox...
from setuptools import setup, find_packages setup( name="airbnb", version="0.0.1", description="Python Spark csv file processor", url="https://github.com/rkanniah/airbnb-py-spark", test_suite = "tests", packages=["airbnb_py_spark"], entry_points={"console_scripts": ["airbnb=airbnb_py_spark....
[ "setuptools.setup" ]
[((45, 578), 'setuptools.setup', 'setup', ([], {'name': '"""airbnb"""', 'version': '"""0.0.1"""', 'description': '"""Python Spark csv file processor"""', 'url': '"""https://github.com/rkanniah/airbnb-py-spark"""', 'test_suite': '"""tests"""', 'packages': "['airbnb_py_spark']", 'entry_points': "{'console_scripts': ['air...
import machine, utime from microbit import * for fred in range(5): pin1.write_digital(0) pin15.write_analog(512) pin8.write_digital(0) pin16.write_analog(512) utime.sleep_ms(500)
[ "utime.sleep_ms" ]
[((192, 211), 'utime.sleep_ms', 'utime.sleep_ms', (['(500)'], {}), '(500)\n', (206, 211), False, 'import machine, utime\n')]
#!/usr/bin/env python from dateutil.parser import parse # import pytz import unittest from ottoengine.model import condition_objects PT_TZ = 'America/Los_Angeles' class TestConditionObjects(unittest.TestCase): def setUp(self): print() def test_time_condition(self): # ( # conditi...
[ "unittest.main", "dateutil.parser.parse", "ottoengine.model.condition_objects.TimeCondition.from_dict" ]
[((3790, 3805), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3803, 3805), False, 'import unittest\n'), ((593, 627), 'dateutil.parser.parse', 'parse', (['"""2018-01-01 09:10:00-08:00"""'], {}), "('2018-01-01 09:10:00-08:00')\n", (598, 627), False, 'from dateutil.parser import parse\n'), ((818, 852), 'dateutil.pa...
# coding: utf-8 """ Trend Micro Deep Security API Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate De...
[ "six.iteritems" ]
[((20991, 21024), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (21004, 21024), False, 'import six\n')]
#! /usr/bin/env python3 import socket import argparse def receive_all(sock: socket.socket, max_length: int = 0, max_timeouts: int = 1): if not sock: return response = b'' bytes_received: int = 0 timeouts: int = 0 while max_length == 0 or (max_length > 0 and bytes_received < max_length):...
[ "socket.socket", "argparse.ArgumentParser" ]
[((562, 612), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Echo client"""'}), "(description='Echo client')\n", (585, 612), False, 'import argparse\n'), ((1529, 1578), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A wrapper around ssh for common operations on a CrOS-based device""" import logging import os import re import subprocess import sys import time import...
[ "os.path.expanduser", "tempfile.NamedTemporaryFile", "subprocess.Popen", "os.path.abspath", "logging.debug", "re.match", "time.sleep", "telemetry.core.util.WaitFor", "re.sub" ]
[((1163, 1264), 'subprocess.Popen', 'subprocess.Popen', ([], {'args': 'args', 'cwd': 'cwd', 'stdout': 'devnull', 'stderr': 'devnull', 'stdin': 'devnull', 'shell': '(False)'}), '(args=args, cwd=cwd, stdout=devnull, stderr=devnull, stdin=\n devnull, shell=False)\n', (1179, 1264), False, 'import subprocess\n'), ((1935,...
from waflib import Configure import os import re class FreeBSD(Configure.ConfigurationContext.Platform): NAME = 'FreeBSD' SUPPORTED_TARGETS = ( re.compile('.*-freebsd[0-9\.]*'), re.compile('^freebsd[0-9\.]*'), ) def __init__(self): Configure.ConfigurationContext.Platform.__ini...
[ "os.path.isdir", "os.path.dirname", "waflib.Configure.ConfigurationContext.Platform.__init__", "os.path.join", "os.listdir", "re.compile" ]
[((162, 195), 're.compile', 're.compile', (['""".*-freebsd[0-9\\\\.]*"""'], {}), "('.*-freebsd[0-9\\\\.]*')\n", (172, 195), False, 'import re\n'), ((204, 235), 're.compile', 're.compile', (['"""^freebsd[0-9\\\\.]*"""'], {}), "('^freebsd[0-9\\\\.]*')\n", (214, 235), False, 'import re\n'), ((275, 329), 'waflib.Configure....
import click, os, sys, tabulate, yaml from cw.models import db, Pipeline @click.group() def cli(): pass @click.command(short_help="add a pipeline") @click.argument("name", required=True, nargs=1) @click.argument("wdl", required=True, nargs=1) @click.option("--imports", "-i", required=False, help="Imports zip fil...
[ "click.argument", "cw.models.db.session.add", "cw.models.Pipeline.query.all", "click.option", "os.path.exists", "cw.models.Pipeline", "click.command", "tabulate.tabulate", "sys.stderr.write", "click.group", "cw.models.db.session.commit" ]
[((76, 89), 'click.group', 'click.group', ([], {}), '()\n', (87, 89), False, 'import click, os, sys, tabulate, yaml\n'), ((112, 154), 'click.command', 'click.command', ([], {'short_help': '"""add a pipeline"""'}), "(short_help='add a pipeline')\n", (125, 154), False, 'import click, os, sys, tabulate, yaml\n'), ((156, 2...
import pygame #importing pygame library pygame.init() #initialize the pygame modules
[ "pygame.init" ]
[((43, 56), 'pygame.init', 'pygame.init', ([], {}), '()\n', (54, 56), False, 'import pygame\n')]
import re from ast import literal_eval import dask.dataframe as dd import pyssdeep from fastsearch import FastSearch COLON_PATTERN = re.compile(':') class FastFuzzySearch: def __init__(self, ngram_length, train_step_size=1000, similarity_threshold=70, utilize_disk=False, minimal_appearances=1): self.ngra...
[ "dask.dataframe.read_csv", "pyssdeep.compare", "fastsearch.FastSearch", "ast.literal_eval", "re.compile" ]
[((135, 150), 're.compile', 're.compile', (['""":"""'], {}), "(':')\n", (145, 150), False, 'import re\n'), ((417, 461), 'fastsearch.FastSearch', 'FastSearch', (['COLON_PATTERN', 'self.ngram_length'], {}), '(COLON_PATTERN, self.ngram_length)\n', (427, 461), False, 'from fastsearch import FastSearch\n'), ((3263, 3307), '...
# Generated by Django 3.1.12 on 2021-08-03 13:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("aidants_connect_web", "0062_auto_20210712_1644"), ] operations = [ migrations.AlterField( model_name="connection", ...
[ "django.db.models.CharField" ]
[((360, 625), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('SHORT', 'pour une durée de 1 jour'), ('SEMESTER',\n 'pour une durée de six mois (182) jours'), ('LONG',\n 'pour une durée de 1 an'), ('EUS_03_20',\n 'jusqu’à la fin de l’état d’urgence sanitaire ')]", 'max_length': '(16)', 'nu...
#!/usr/bin/env python # Importation of all the modules needed to work with ros import rospy,time,serial # Importation of all the messages type of the node from std_msgs.msg import String from hexapod.msg import serial_frame # Definition of the Serial communication with the ArbotiX on port USB0 at 38400 bps port = "/...
[ "serial.Serial", "hexapod.msg.serial_frame", "rospy.Subscriber", "time.sleep", "rospy.is_shutdown", "rospy.init_node" ]
[((352, 388), 'serial.Serial', 'serial.Serial', (['port', 'baud'], {'timeout': '(1)'}), '(port, baud, timeout=1)\n', (365, 388), False, 'import rospy, time, serial\n'), ((405, 419), 'hexapod.msg.serial_frame', 'serial_frame', ([], {}), '()\n', (417, 419), False, 'from hexapod.msg import serial_frame\n'), ((3167, 3210),...
from django.contrib import admin from .models import FacilityCode class FacilityCodeAdmin(admin.ModelAdmin): list_display = ["code", "created_at"] list_filter = ["code", "created_at"] admin.site.register(FacilityCode, FacilityCodeAdmin)
[ "django.contrib.admin.site.register" ]
[((197, 249), 'django.contrib.admin.site.register', 'admin.site.register', (['FacilityCode', 'FacilityCodeAdmin'], {}), '(FacilityCode, FacilityCodeAdmin)\n', (216, 249), False, 'from django.contrib import admin\n')]
import numpy as np import input_data from sklearn.utils import shuffle np.random.seed(9999) mnist = input_data.read_data_sets('../MNIST_data', one_hot=True) X_train = mnist.train.images t_train = mnist.train.labels X_test = mnist.test.images t_test = mnist.test.labels X_train, t_train = shuffle(X_train, t_train) ...
[ "input_data.read_data_sets", "numpy.save", "numpy.zeros_like", "numpy.random.seed", "numpy.maximum", "numpy.random.randn", "numpy.max", "sklearn.utils.shuffle", "numpy.sqrt" ]
[((73, 93), 'numpy.random.seed', 'np.random.seed', (['(9999)'], {}), '(9999)\n', (87, 93), True, 'import numpy as np\n'), ((103, 159), 'input_data.read_data_sets', 'input_data.read_data_sets', (['"""../MNIST_data"""'], {'one_hot': '(True)'}), "('../MNIST_data', one_hot=True)\n", (128, 159), False, 'import input_data\n'...
def arena(argv): import argparse parser = argparse.ArgumentParser(description='fighting between two players') parser.add_argument('game', help='a game name i.e. checkers') parser.add_argument('p1', nargs='?', default='human', help='player 1 settings') parser.add_argument('p2', nargs='?', default='mi...
[ "util.arena.Arena", "util.player.newPlayer", "argparse.ArgumentParser", "util.game.importState" ]
[((50, 117), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""fighting between two players"""'}), "(description='fighting between two players')\n", (73, 117), False, 'import argparse\n'), ((769, 805), 'util.player.newPlayer', 'player.newPlayer', (['args.game', 'args.p1'], {}), '(args.game,...
from django.contrib import admin # Register your models here. from .models import ( Service, AuthToken, Invitation, ) class AuthTokenAdmin(admin.ModelAdmin): list_display = ('service', 'is_token_refreshable', 'is_token_accessor', 'use_for...
[ "django.contrib.admin.site.register" ]
[((762, 804), 'django.contrib.admin.site.register', 'admin.site.register', (['Service', 'ServiceAdmin'], {}), '(Service, ServiceAdmin)\n', (781, 804), False, 'from django.contrib import admin\n'), ((805, 851), 'django.contrib.admin.site.register', 'admin.site.register', (['AuthToken', 'AuthTokenAdmin'], {}), '(AuthToke...
import pygame pygame.init() SCREEN_WIDTH = 800 SCREEN_HEIGHT = int(SCREEN_WIDTH * 0.8) screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) pygame.display.set_caption('ArenaBattle') x = 200 y = 200 run = True while run: for event in pygame.event.get(): #quit game ...
[ "pygame.quit", "pygame.event.get", "pygame.display.set_mode", "pygame.init", "pygame.display.set_caption" ]
[((17, 30), 'pygame.init', 'pygame.init', ([], {}), '()\n', (28, 30), False, 'import pygame\n'), ((106, 160), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(SCREEN_WIDTH, SCREEN_HEIGHT)'], {}), '((SCREEN_WIDTH, SCREEN_HEIGHT))\n', (129, 160), False, 'import pygame\n'), ((162, 203), 'pygame.display.set_captio...
# ビット全探索 from itertools import product N = int(input()) F = [list(map(int, input().split())) for _ in range(N)] P = [list(map(int, input().split())) for _ in range(N)] result = -float('inf') for i in product([True, False], repeat=10): if i.count(False) == 10: continue t = 0 for j in range(N): ...
[ "itertools.product" ]
[((202, 235), 'itertools.product', 'product', (['[True, False]'], {'repeat': '(10)'}), '([True, False], repeat=10)\n', (209, 235), False, 'from itertools import product\n')]
import numpy as np from matplotlib import pyplot as plt from matplotlib.collections import LineCollection from koala import graph_color, plotting from koala import graph_color def rotate(vector, angle): rm = np.array([ [np.cos(angle), -np.sin(angle)], [np.sin(angle), np.cos(angle)] ]) return...
[ "matplotlib.pyplot.show", "numpy.sum", "numpy.zeros", "numpy.sin", "numpy.array", "numpy.arange", "numpy.linspace", "koala.graph_color.edge_color", "numpy.cos", "numpy.concatenate" ]
[((4982, 5018), 'koala.graph_color.edge_color', 'graph_color.edge_color', (['adjacency', '(3)'], {}), '(adjacency, 3)\n', (5004, 5018), False, 'from koala import graph_color\n'), ((5070, 5108), 'numpy.array', 'np.array', (['[color_dict[c] for c in out]'], {}), '([color_dict[c] for c in out])\n', (5078, 5108), True, 'im...
# Python library for make_sparse operation import os.path import tensorflow as tf from tensorflow.python.framework import ops # Getting the functions from the shared library _make_sparse_module = tf.load_op_library(os.path.join( tf.resource_loader.get_data_files_path(), 'make_sparse.so')) make_sparse = _make_sp...
[ "tensorflow.python.framework.ops.NotDifferentiable", "tensorflow.resource_loader.get_data_files_path", "tensorflow.python.framework.ops.RegisterGradient" ]
[((563, 602), 'tensorflow.python.framework.ops.NotDifferentiable', 'ops.NotDifferentiable', (['"""MakeSparseGrad"""'], {}), "('MakeSparseGrad')\n", (584, 602), False, 'from tensorflow.python.framework import ops\n'), ((606, 640), 'tensorflow.python.framework.ops.RegisterGradient', 'ops.RegisterGradient', (['"""MakeSpar...
from __future__ import print_function, absolute_import, division, unicode_literals # Requirements: import numpy as np, glob, os, sys #from scipy import misc import imageio import tensorflow as tf import pdb from spit.utils import one_hot_encoded sys.dont_write_bytecode = True def load_linear_pngs(instr, data_typ...
[ "imageio.imread", "tensorflow.data.Dataset.from_tensor_slices", "numpy.array", "pdb.set_trace", "glob.glob", "os.getenv" ]
[((398, 420), 'os.getenv', 'os.getenv', (['"""SPIT_DATA"""'], {}), "('SPIT_DATA')\n", (407, 420), False, 'import numpy as np, glob, os, sys\n'), ((5059, 5077), 'numpy.array', 'np.array', (['raw_data'], {}), '(raw_data)\n', (5067, 5077), True, 'import numpy as np, glob, os, sys\n'), ((5285, 5301), 'numpy.array', 'np.arr...
# Copyright 2016 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ "voluptuous.Optional", "voluptuous.Any", "cloud99.utils.ssh.SSH", "voluptuous.Required", "time.sleep", "subprocess.call" ]
[((2477, 2516), 'cloud99.utils.ssh.SSH', 'SSH', (['ip_or_hostname', 'username', 'password'], {}), '(ip_or_hostname, username, password)\n', (2480, 2516), False, 'from cloud99.utils.ssh import SSH\n'), ((3066, 3091), 'time.sleep', 'time.sleep', (['cool_down_max'], {}), '(cool_down_max)\n', (3076, 3091), False, 'import t...
from unittest.mock import Mock, patch from django.http import HttpResponse from django.urls import reverse from okta_oauth2.exceptions import TokenExpired from okta_oauth2.middleware import OktaMiddleware from okta_oauth2.tests.utils import build_id_token, update_okta_settings def test_no_token_redirects_to_login(rf...
[ "django.http.HttpResponse", "unittest.mock.Mock", "django.urls.reverse", "okta_oauth2.tests.utils.update_okta_settings", "unittest.mock.patch", "okta_oauth2.tests.utils.build_id_token" ]
[((1354, 1381), 'okta_oauth2.tests.utils.build_id_token', 'build_id_token', ([], {'nonce': 'nonce'}), '(nonce=nonce)\n', (1368, 1381), False, 'from okta_oauth2.tests.utils import build_id_token, update_okta_settings\n'), ((1918, 1924), 'unittest.mock.Mock', 'Mock', ([], {}), '()\n', (1922, 1924), False, 'from unittest....
import os from pathlib import Path from bs4 import BeautifulSoup import re from lxml.html.clean import clean_html import lxml.html import io import html2text import requests part_pattern = re.compile( "(?s)(?i)(?m)> +Part|>Part|^Part", re.IGNORECASE + re.MULTILINE ) item_pattern = re.compile( "(?s)(?i)(?m)> +...
[ "html2text.HTML2Text", "pathlib.Path", "requests.get", "bs4.BeautifulSoup", "os.path.join", "re.compile" ]
[((191, 266), 're.compile', 're.compile', (['"""(?s)(?i)(?m)> +Part|>Part|^Part"""', '(re.IGNORECASE + re.MULTILINE)'], {}), "('(?s)(?i)(?m)> +Part|>Part|^Part', re.IGNORECASE + re.MULTILINE)\n", (201, 266), False, 'import re\n'), ((288, 363), 're.compile', 're.compile', (['"""(?s)(?i)(?m)> +Item|>Item|^Item"""', '(re....
import datetime from threading import Thread from queue import Empty from tfs_chatclient.back_end.tfs_rest import ( TFS_Chat_Exception, get_my_user_id, get_room_messages, get_room_info, get_users, join_room, leave_room ) from tfs_chatclient.core.config_reader import get_base_url class Roo...
[ "datetime.datetime.strptime", "threading.Thread.__init__", "tfs_chatclient.core.config_reader.get_base_url", "datetime.date" ]
[((441, 462), 'threading.Thread.__init__', 'Thread.__init__', (['self'], {}), '(self)\n', (456, 462), False, 'from threading import Thread\n'), ((694, 719), 'datetime.date', 'datetime.date', (['(1970)', '(1)', '(1)'], {}), '(1970, 1, 1)\n', (707, 719), False, 'import datetime\n'), ((2321, 2387), 'datetime.datetime.strp...
import logging import pytest from dvc.exceptions import NoMetricsFoundError, NoMetricsParsedError from tests.func.metrics.utils import _write_json @pytest.mark.parametrize( "diff, metric_value", ( ( lambda repo, target, rev: repo.metrics.diff( targets=[target], a_rev=rev ...
[ "pytest.raises", "tests.func.metrics.utils._write_json" ]
[((694, 743), 'tests.func.metrics.utils._write_json', '_write_json', (['tmp_dir', 'metric_value', '"""metric.json"""'], {}), "(tmp_dir, metric_value, 'metric.json')\n", (705, 743), False, 'from tests.func.metrics.utils import _write_json\n'), ((1341, 1376), 'pytest.raises', 'pytest.raises', (['NoMetricsParsedError'], {...
import os from netbruter.argv import retrieve_command_line def restore_script(script_file="resume.sh"): """ If 'resume.sh' does not exists, create it to easily resume the attack If it exists, delete it. :param script_file: :return: None """ if os.path.isfile(script_file): os.remove...
[ "os.path.isfile", "os.chmod", "netbruter.argv.retrieve_command_line", "os.remove" ]
[((274, 301), 'os.path.isfile', 'os.path.isfile', (['script_file'], {}), '(script_file)\n', (288, 301), False, 'import os\n'), ((461, 487), 'os.chmod', 'os.chmod', (['script_file', '(493)'], {}), '(script_file, 493)\n', (469, 487), False, 'import os\n'), ((311, 333), 'os.remove', 'os.remove', (['script_file'], {}), '(s...
from django.test import TestCase from functional_tests.factory import FaceFactory class Facetest(TestCase): def setUp(self): self.face = FaceFactory(title='Lokesh') def test_title_to_share_returns_meet_Lokesh__farmer_from_sivaganga_tamil_nadu(self): self.assertEqual(self.face.title_to_share,'...
[ "functional_tests.factory.FaceFactory" ]
[((151, 178), 'functional_tests.factory.FaceFactory', 'FaceFactory', ([], {'title': '"""Lokesh"""'}), "(title='Lokesh')\n", (162, 178), False, 'from functional_tests.factory import FaceFactory\n')]
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import HttpCase, tagged @tagged('post_install', '-at_install') class TestSitemap(HttpCase): def setUp(self): super(TestSitemap, self).setUp() self.cats = self.env['product.public.category'].create([{ ...
[ "odoo.tests.tagged" ]
[((119, 156), 'odoo.tests.tagged', 'tagged', (['"""post_install"""', '"""-at_install"""'], {}), "('post_install', '-at_install')\n", (125, 156), False, 'from odoo.tests import HttpCase, tagged\n')]
from django.test import TestCase from registros.models import Empresa, Produto, Moeda, Configuracao from .models import Transacao, ItemDeLinha class ProdutoTests(TestCase): @classmethod def setUpTestData(cls): cls.pontual = Empresa.objects.create(nome="Pontual") cls.cctc = Empresa.objects.crea...
[ "registros.models.Produto.objects.create", "registros.models.Configuracao.objects.create", "registros.models.Empresa.objects.create", "registros.models.Moeda.objects.create" ]
[((242, 280), 'registros.models.Empresa.objects.create', 'Empresa.objects.create', ([], {'nome': '"""Pontual"""'}), "(nome='Pontual')\n", (264, 280), False, 'from registros.models import Empresa, Produto, Moeda, Configuracao\n'), ((300, 335), 'registros.models.Empresa.objects.create', 'Empresa.objects.create', ([], {'n...
''' Created on Apr 16, 2014 @author: eichhorn ''' import serialinterface import cambrionix class Port(object): portModeConstants = {'O': 'off', 'S': 'sync', 'B': 'biased', 'I': 'idle', 'P': 'profiling', 'C': 'charging', ...
[ "serialinterface.TableResponseHandler", "cambrionix.CambrionixException" ]
[((1569, 1607), 'serialinterface.TableResponseHandler', 'serialinterface.TableResponseHandler', ([], {}), '()\n', (1605, 1607), False, 'import serialinterface\n'), ((1662, 1781), 'cambrionix.CambrionixException', 'cambrionix.CambrionixException', (["('requesting state for one port should return only one port. Got %s' %...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyramid.view import view_config, view_defaults from pyramid.httpexceptions import HTTPFound, HTTPOk from pyramid.httpexceptions import HTTPNotFound, HTTPBadRequest, HTTPRequestTimeout # # BACnet Driver # from driver.bacnet import BACnetSimpleClient from driver.bacnet ...
[ "jsonschema.validate", "driver.bacnet.BACnetSimpleClient", "pyramid.httpexceptions.HTTPRequestTimeout", "driver.bacnet.definition.getProperties", "pyramid.httpexceptions.HTTPOk", "driver.bacnet.definition.getObjects", "pyramid.httpexceptions.HTTPNotFound", "pyramid.view.view_config", "pyramid.httpex...
[((394, 454), 'pyramid.view.view_config', 'view_config', ([], {'route_name': '"""api::bacnet:index"""', 'renderer': '"""json"""'}), "(route_name='api::bacnet:index', renderer='json')\n", (405, 454), False, 'from pyramid.view import view_config, view_defaults\n'), ((623, 716), 'pyramid.view.view_config', 'view_config', ...
# -*- coding: utf-8 -*- """ Created on Thu Dec 19 19:33:17 2019 @author: Mysia """ import numpy as np def nnloss(x,t,dzdy): instanceWeights=np.ones(len(x)) res=x-t if(dzdy==0): y = (1/2) * instanceWeights * np.power(res,2) else: y = res return y
[ "numpy.power" ]
[((251, 267), 'numpy.power', 'np.power', (['res', '(2)'], {}), '(res, 2)\n', (259, 267), True, 'import numpy as np\n')]
# Python Verstion: 2.7 # imports import urlparse import urllib2 # An LFU web cache class cache(): # static members block_delimiter = chr(0x07) key_delimiter = chr(0x13) # cache: Integer, String String -> cache # Returns: a cache of the given capacity(in bytes) initialized # with the contents of the given fi...
[ "urlparse.urlunparse", "urllib2.urlopen" ]
[((1522, 1587), 'urlparse.urlunparse', 'urlparse.urlunparse', (["('http', self.origin_name, path, '', '', '')"], {}), "(('http', self.origin_name, path, '', '', ''))\n", (1541, 1587), False, 'import urlparse\n'), ((1597, 1617), 'urllib2.urlopen', 'urllib2.urlopen', (['url'], {}), '(url)\n', (1612, 1617), False, 'import...
import logging from fonduer._version import __version__ from fonduer.candidates import CandidateExtractor, OmniFigures, OmniNgrams from fonduer.candidates.matchers import ( DateMatcher, DictionaryMatch, Intersect, Inverse, LambdaFunctionFigureMatcher, LambdaFunctionMatcher, LocationMatcher,...
[ "logging.getLogger", "logging.NullHandler" ]
[((982, 1003), 'logging.NullHandler', 'logging.NullHandler', ([], {}), '()\n', (1001, 1003), False, 'import logging\n'), ((943, 970), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (960, 970), False, 'import logging\n')]
# Copyright 2017 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "imgtools.BindMount", "os.path.isabs", "imgtools.LoopDev", "os.makedirs", "os.unlink", "os.rename", "imgtools.resize_part", "shutil.copy", "os.path.exists", "contextlib.ExitStack", "imgtools.Mount", "subprocess.call", "imgtools.resize2fs", "imgtools.get_partition_info", "sys.exit", "os...
[((2239, 2285), 'os.path.join', 'os.path.join', (['root_mnt', '"""etc"""', '"""ld.so.preload"""'], {}), "(root_mnt, 'etc', 'ld.so.preload')\n", (2251, 2285), False, 'import os\n'), ((2426, 2481), 'os.path.join', 'os.path.join', (['root_mnt', '"""usr"""', '"""bin"""', '"""qemu-arm-static"""'], {}), "(root_mnt, 'usr', 'b...
# -*- coding: utf-8 -*- """ Created on Sun Nov 21 13:23:58 2021 @author: 91703 """ import screen import anim from tkinter import* from tkinter import ttk from PIL import Image,ImageTk import time from win10toast import ToastNotifier import webbrowser def changeOnHover(button, colorOnHover, colorOnLeave...
[ "pyttsx3.init", "PIL.Image.open", "time.sleep", "speech_recognition.Microphone", "win10toast.ToastNotifier", "datetime.datetime.now", "speech_recognition.Recognizer" ]
[((18738, 18751), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (18748, 18751), False, 'import time\n'), ((10774, 10789), 'win10toast.ToastNotifier', 'ToastNotifier', ([], {}), '()\n', (10787, 10789), False, 'from win10toast import ToastNotifier\n'), ((11462, 11477), 'win10toast.ToastNotifier', 'ToastNotifier', (...
#!/usr/bin/env python3 from versiongrid import get_app if __name__ == "__main__": get_app().run(port=8080, debug=True)
[ "versiongrid.get_app" ]
[((88, 97), 'versiongrid.get_app', 'get_app', ([], {}), '()\n', (95, 97), False, 'from versiongrid import get_app\n')]
import numpy as np import torch from torch.autograd import Variable def data_generator(T, mem_length, b_size): """ Generate data for the copying memory task :param T: The total blank time length :param mem_length: The length of the memory to be recalled :param b_size: The batch size :return: I...
[ "torch.zeros", "torch.ones", "numpy.random.randint", "torch.cat" ]
[((455, 479), 'torch.zeros', 'torch.zeros', (['(b_size, T)'], {}), '((b_size, T))\n', (466, 479), False, 'import torch\n'), ((553, 586), 'torch.zeros', 'torch.zeros', (['(b_size, mem_length)'], {}), '((b_size, mem_length))\n', (564, 586), False, 'import torch\n'), ((596, 638), 'torch.cat', 'torch.cat', (['(seq, zeros[:...
#!/usr/bin/python # # This file illustrates the example to request OMMlevel2 data using marketByPriceRequest # The example data output is mentioned below: # # REFRESH/IMAGE: # {'MTYPE': 'REFRESH', 'RIC': 'ANZ.CHA', 'SERVICE': 'NIP'} # {'ORDER_SIDE': 'BID', 'ORDER_TONE': '', 'SERVICE': 'NIP', # 'ORDER_PRC': 20.9...
[ "pyrfa.Pyrfa" ]
[((1016, 1029), 'pyrfa.Pyrfa', 'pyrfa.Pyrfa', ([], {}), '()\n', (1027, 1029), False, 'import pyrfa\n')]
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import json from frappe.utils import cstr, flt, cint from frappe import msgprint, _ from frappe.model.mapper import get_mapped_doc...
[ "frappe.whitelist", "frappe.msgprint", "frappe.utils.flt" ]
[((1188, 1206), 'frappe.whitelist', 'frappe.whitelist', ([], {}), '()\n', (1204, 1206), False, 'import frappe\n'), ((1272, 1317), 'frappe.msgprint', 'frappe.msgprint', (['"""make_purchase_receipt_pinv"""'], {}), "('make_purchase_receipt_pinv')\n", (1287, 1317), False, 'import frappe\n'), ((1381, 1393), 'frappe.utils.fl...
# Generated by Django 3.2.7 on 2022-01-20 23:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0017_scroll_identifier'), ] operations = [ migrations.RenameField( model_name='review', old_name='fil...
[ "django.db.models.TextField", "django.db.migrations.RenameField", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.IntegerField", "django.db.models.DateField" ]
[((238, 316), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""review"""', 'old_name': '"""file"""', 'new_name': '"""zfile"""'}), "(model_name='review', old_name='file', new_name='zfile')\n", (260, 316), False, 'from django.db import migrations, models\n'), ((483, 570), 'django.db.m...
import numpy as np x = np.array([1., 2.]) x /= np.sqrt(np.sum(x**2 ,axis=-1))[..., np.newaxis] print(x) print(x[0]+x[1])
[ "numpy.array", "numpy.sum" ]
[((24, 44), 'numpy.array', 'np.array', (['[1.0, 2.0]'], {}), '([1.0, 2.0])\n', (32, 44), True, 'import numpy as np\n'), ((56, 79), 'numpy.sum', 'np.sum', (['(x ** 2)'], {'axis': '(-1)'}), '(x ** 2, axis=-1)\n', (62, 79), True, 'import numpy as np\n')]
############################################################################### # Name: pascal.py # # Purpose: Define Pascal syntax for highlighting and other features # # Author: <NAME> <<EMAIL>> # # Copyright: (c) 2...
[ "syndata.SyntaxDataBase.__init__" ]
[((3847, 3892), 'syndata.SyntaxDataBase.__init__', 'syndata.SyntaxDataBase.__init__', (['self', 'langid'], {}), '(self, langid)\n', (3878, 3892), False, 'import syndata\n')]
from __future__ import absolute_import, print_function import asyncio from ..otel_ot_shim_tracer import MockTracer from ..testcase import OpenTelemetryTestCase class TestAsyncio(OpenTelemetryTestCase): def setUp(self): self.tracer = MockTracer() self.loop = asyncio.get_event_loop() def test...
[ "asyncio.get_event_loop" ]
[((282, 306), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (304, 306), False, 'import asyncio\n')]
import re from django import forms from formidable.forms.field_builder import FieldBuilder from formidable.serializers.fields import FieldSerializer, BASE_FIELDS from formidable.forms.fields import ParametrizedFieldMixin, CharField from formidable.forms.widgets import TextInput COLOR_RE = re.compile('^#(?:[0-9a-fA-...
[ "django.forms.ValidationError", "re.compile" ]
[((294, 334), 're.compile', 're.compile', (['"""^#(?:[0-9a-fA-F]{3}){1,2}$"""'], {}), "('^#(?:[0-9a-fA-F]{3}){1,2}$')\n", (304, 334), False, 'import re\n'), ((2110, 2156), 'django.forms.ValidationError', 'forms.ValidationError', (['"""Invalid color format."""'], {}), "('Invalid color format.')\n", (2131, 2156), False, ...
''' Copyright 2011 Acknack Ltd 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 dis...
[ "settingsTools.generateKey", "sessionTools.put", "waveapi.simplejson.loads", "settingsTools.put" ]
[((1520, 1599), 'settingsTools.put', 'settingsTools.put', (['settings', 'session.wave_id', 'session.wavelet_id', 'session.email'], {}), '(settings, session.wave_id, session.wavelet_id, session.email)\n', (1537, 1599), False, 'import settingsTools\n'), ((1723, 1748), 'sessionTools.put', 'sessionTools.put', (['session'],...
from cryptography.fernet import Fernet as Fer # import os text = [] encryptedText = [] # Define key out of loop key = None # Determines if we generate a random key or not rKey = None try: # Open file and examine the contents and add them to a list to be encrypted with open("test.txt", "rb") as decryptedFile...
[ "cryptography.fernet.Fernet", "cryptography.fernet.Fernet.generate_key" ]
[((1752, 1760), 'cryptography.fernet.Fernet', 'Fer', (['key'], {}), '(key)\n', (1755, 1760), True, 'from cryptography.fernet import Fernet as Fer\n'), ((1712, 1730), 'cryptography.fernet.Fernet.generate_key', 'Fer.generate_key', ([], {}), '()\n', (1728, 1730), True, 'from cryptography.fernet import Fernet as Fer\n')]
from classify_utils import setup_args, setup, get_basemodel, get_data, get_logger, setup_args_preprocessing, setup_args_getE from util import Logger import argparse import torch import numpy as np from statsmodels.stats.proportion import proportion_confint import scipy.stats as sps from collections import Counter impor...
[ "classify_utils.get_data", "classify_utils.get_logger", "torchvision.transforms.functional.center_crop", "classify_utils.setup_args_getE", "argparse.ArgumentParser", "classify_utils.setup_args", "torchvision.transforms.functional.resize", "numpy.expand_dims", "classify_utils.setup_args_preprocessing...
[((516, 541), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (539, 541), False, 'import argparse\n'), ((551, 569), 'classify_utils.setup_args', 'setup_args', (['parser'], {}), '(parser)\n', (561, 569), False, 'from classify_utils import setup_args, setup, get_basemodel, get_data, get_logger, se...
""" some OS dependent constants """ from platform import system as os_name import os import Biscuit OSNAMEMAP = {'Windows': 'WIN', 'Linux': 'LNX', 'Darwin': 'MAC'} # TODO: confirm on other ios versions class OSConstMap(): """ Class which provides values of constants in an OS-depende...
[ "platform.system", "os.path.expanduser", "os.getenv" ]
[((2283, 2315), 'os.path.expanduser', 'os.path.expanduser', (['"""~/.Biscuit"""'], {}), "('~/.Biscuit')\n", (2301, 2315), False, 'import os\n'), ((2181, 2204), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (2199, 2204), False, 'import os\n'), ((2087, 2107), 'os.getenv', 'os.getenv', (['"""AP...
''' Created on 2018年3月28日 @author: <NAME> ''' import numpy as np import Lib.RFLib as RFLib def kernalTransfrom(dataMatrix, vector, kTup): if kTup[0] == "lin": return vector * dataMatrix.transpose() elif kTup[0] == "rbf": delta = dataMatrix - vector K = np.matrix(np.diag(delta * delta.t...
[ "numpy.matrix", "numpy.abs", "numpy.multiply", "numpy.zeros", "numpy.nonzero", "numpy.random.randint", "numpy.exp" ]
[((5294, 5329), 'numpy.matrix', 'np.matrix', (['trainSet'], {'dtype': 'np.float'}), '(trainSet, dtype=np.float)\n', (5303, 5329), True, 'import numpy as np\n'), ((573, 609), 'numpy.matrix', 'np.matrix', (['dataMatIn'], {'dtype': 'np.float'}), '(dataMatIn, dtype=np.float)\n', (582, 609), True, 'import numpy as np\n'), (...
import hashlib import binascii HASH_ALGORITHM = 'sha256' HASH_ITERATION_COUNT = 100000 def get_user_password_hash(user_id, password, salt): hash = hashlib.pbkdf2_hmac( HASH_ALGORITHM, (user_id + password).encode(), salt.encode(), HASH_ITERATION_COUNT ) return binascii.hex...
[ "binascii.hexlify" ]
[((308, 330), 'binascii.hexlify', 'binascii.hexlify', (['hash'], {}), '(hash)\n', (324, 330), False, 'import binascii\n')]
from django.db import models from modelcluster.fields import ParentalKey from .abstract_advanced_form_field import AbstractAdvancedFormField class EmailFormField(AbstractAdvancedFormField): page = ParentalKey( 'wagtail_advanced_form_builder.EmailFormPage', on_delete=models.CASCADE, relat...
[ "modelcluster.fields.ParentalKey" ]
[((205, 322), 'modelcluster.fields.ParentalKey', 'ParentalKey', (['"""wagtail_advanced_form_builder.EmailFormPage"""'], {'on_delete': 'models.CASCADE', 'related_name': '"""form_fields"""'}), "('wagtail_advanced_form_builder.EmailFormPage', on_delete=models\n .CASCADE, related_name='form_fields')\n", (216, 322), Fals...
# Copyright 2017 Catalyst IT Limited # # 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...
[ "oslo_db.options.set_defaults", "qinling.exceptions.DBError", "qinling.utils.thread_local.set_thread_local", "qinling.context.get_ctx", "qinling.utils.thread_local.get_thread_local", "oslo_db.sqlalchemy.session.EngineFacade.from_config", "functools.wraps" ]
[((913, 985), 'oslo_db.options.set_defaults', 'db_options.set_defaults', (['cfg.CONF'], {'connection': '"""sqlite:///qinling.sqlite"""'}), "(cfg.CONF, connection='sqlite:///qinling.sqlite')\n", (936, 985), True, 'from oslo_db import options as db_options\n'), ((1592, 1652), 'qinling.utils.thread_local.get_thread_local'...
'''OpenGL extension OES.required_internalformat This module customises the behaviour of the OpenGL.raw.GLES1.OES.required_internalformat to provide a more Python-friendly API Overview (from the spec) The ES 1.1 API allows an implementation to store texture data internally with arbitrary precision, regardless of...
[ "OpenGL.extensions.hasGLExtension" ]
[((3610, 3652), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['_EXTENSION_NAME'], {}), '(_EXTENSION_NAME)\n', (3635, 3652), False, 'from OpenGL import extensions\n')]
from ddcz.models import Author, CommonArticle, UserProfile def get_valid_article_chain(): user = UserProfile(nick_uzivatele="Author", email_uzivatele="<EMAIL>") author = Author(id=1, user=user, author_type=Author.USER_TYPE) article = CommonArticle( author=author, jmeno="Test Article", ...
[ "ddcz.models.UserProfile", "ddcz.models.CommonArticle", "ddcz.models.Author" ]
[((104, 167), 'ddcz.models.UserProfile', 'UserProfile', ([], {'nick_uzivatele': '"""Author"""', 'email_uzivatele': '"""<EMAIL>"""'}), "(nick_uzivatele='Author', email_uzivatele='<EMAIL>')\n", (115, 167), False, 'from ddcz.models import Author, CommonArticle, UserProfile\n'), ((182, 235), 'ddcz.models.Author', 'Author',...
""" Speculation and negation examples """ __version__ = "$Revision: 1.12 $" import sys, os import types thisPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.abspath(os.path.join(thisPath,".."))) from ExampleBuilder import ExampleBuilder import Utils.Libraries.PorterStemmer as PorterStemmer fro...
[ "os.path.abspath", "types.sort", "Utils.Libraries.PorterStemmer.stem", "ExampleBuilder.ExampleBuilder.__init__", "Evaluators.EvaluateInteractionXML.mapEntities", "Core.IdSet.IdSet", "os.path.join", "Core.ExampleUtils.appendExamples" ]
[((132, 157), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (147, 157), False, 'import sys, os\n'), ((191, 219), 'os.path.join', 'os.path.join', (['thisPath', '""".."""'], {}), "(thisPath, '..')\n", (203, 219), False, 'import sys, os\n'), ((3255, 3306), 'ExampleBuilder.ExampleBuilder.__init_...
# name=Ableton Push 2 # url=https://github.com/flstudio-midi-scripts/AbletonPush2 import playlist import channels import mixer import patterns import arrangement import transport import device import general import launchMapPages import ui import midi import utils from constants import * def getClosestColor(color):...
[ "channels.getChannelColor", "transport.record", "general.undoUp", "channels.selectChannel", "mixer.trackNumber", "transport.globalTransport", "ui.snapMode", "mixer.getTrackVolume", "device.isAssigned", "ui.getSnapMode", "ui.up", "utils.ColorToRGB", "transport.isPlaying", "channels.channelC...
[((944, 967), 'utils.ColorToRGB', 'utils.ColorToRGB', (['color'], {}), '(color)\n', (960, 967), False, 'import utils\n'), ((7098, 7116), 'transport.record', 'transport.record', ([], {}), '()\n', (7114, 7116), False, 'import transport\n'), ((7208, 7231), 'transport.setLoopMode', 'transport.setLoopMode', ([], {}), '()\n'...
# -*- coding: utf-8 -*- """ @Time: 2021/7/19 15:22 @Author: zzhang <EMAIL> @File: plan_task_work_date_check.py @desc: """ from collect.service_imp.request_rules.check import CheckData class WorkDateCheck(CheckData): def handler(self, params, config_params, template=None): from collect.service.template_se...
[ "collect.service.template_service.TemplateService" ]
[((368, 405), 'collect.service.template_service.TemplateService', 'TemplateService', ([], {'op_user': 'self.op_user'}), '(op_user=self.op_user)\n', (383, 405), False, 'from collect.service.template_service import TemplateService\n')]
from django.conf.urls import include, url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^users/', include('users.urls', namespace='users')), url(r'^teams/', include('teams.urls'...
[ "django.conf.settings.MEDIA_URL.replace", "django.conf.urls.url", "django.conf.urls.include" ]
[((189, 220), 'django.conf.urls.url', 'url', (['"""^admin/"""', 'admin.site.urls'], {}), "('^admin/', admin.site.urls)\n", (192, 220), False, 'from django.conf.urls import include, url\n'), ((476, 512), 'django.conf.urls.url', 'url', (['"""^$"""', 'views.index'], {'name': '"""index"""'}), "('^$', views.index, name='ind...
from setuptools import setup from Cython.Build import cythonize import sys # compile and link flags if sys.platform.startswith('win'): # to compile this package on windows you need MSVC compile_args = ['/openmp', '/fp:fast'] link_args = ['/openmp'] elif sys.platform.startswith('darwin'): # use real gcc...
[ "sys.platform.startswith", "Cython.Build.cythonize" ]
[((104, 134), 'sys.platform.startswith', 'sys.platform.startswith', (['"""win"""'], {}), "('win')\n", (127, 134), False, 'import sys\n'), ((267, 300), 'sys.platform.startswith', 'sys.platform.startswith', (['"""darwin"""'], {}), "('darwin')\n", (290, 300), False, 'import sys\n'), ((584, 681), 'Cython.Build.cythonize', ...
# Some basic setup: # Setup detectron2 logger import imp import detectron2 from detectron2.utils.logger import setup_logger setup_logger() # import some common libraries import numpy as np import os, json, cv2, random, sys # import some common detectron2 utilities from detectron2 import model_zoo from detectron2.engin...
[ "detectron2.model_zoo.get_config_file", "detectron2.engine.DefaultPredictor", "detectron2.utils.logger.setup_logger", "detectron2.evaluation.COCOEvaluator", "detectron2.config.get_cfg", "detectron2.engine.DefaultTrainer", "detectron2.data.MetadataCatalog.get", "detectron2.data.build_detection_test_loa...
[((124, 138), 'detectron2.utils.logger.setup_logger', 'setup_logger', ([], {}), '()\n', (136, 138), False, 'from detectron2.utils.logger import setup_logger\n'), ((1191, 1200), 'detectron2.config.get_cfg', 'get_cfg', ([], {}), '()\n', (1198, 1200), False, 'from detectron2.config import get_cfg\n'), ((1358, 1398), 'dete...
"""Concat module. - Author: <NAME> - Contact: <EMAIL> """ # pylint: disable=useless-super-delegation from typing import List, Tuple, Union import torch from torch import nn class Concat(nn.Module): """Concatenation module. Arguments: [dimension] """ def __init__(self, dimension: int = 1) -> None:...
[ "torch.cat" ]
[((604, 632), 'torch.cat', 'torch.cat', (['x', 'self.dimension'], {}), '(x, self.dimension)\n', (613, 632), False, 'import torch\n')]
from django.db import models # Create your models here. from utils import constants class User(models.Model): """用户表""" name = models.CharField(verbose_name='用户名', max_length=128, unique=True) up_name = models.ForeignKey('self', verbose_name='上级主管', blank=True, null=True, on_delete=models.CASCAD...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.SmallIntegerField", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((146, 211), 'django.db.models.CharField', 'models.CharField', ([], {'verbose_name': '"""用户名"""', 'max_length': '(128)', 'unique': '(True)'}), "(verbose_name='用户名', max_length=128, unique=True)\n", (162, 211), False, 'from django.db import models\n'), ((227, 326), 'django.db.models.ForeignKey', 'models.ForeignKey', ([...
from typing import Optional import tensorflow as tf from transformers import ( PretrainedConfig, TFAutoModelForPreTraining, TFAutoModelForQuestionAnswering, ) def get_initializer(stddev): return tf.keras.initializers.TruncatedNormal(stddev=stddev) def load_qa_from_pretrained( model: Optional[tf...
[ "tensorflow.keras.initializers.TruncatedNormal", "transformers.TFAutoModelForPreTraining.from_config", "transformers.TFAutoModelForQuestionAnswering.from_pretrained", "transformers.TFAutoModelForQuestionAnswering.from_config" ]
[((214, 266), 'tensorflow.keras.initializers.TruncatedNormal', 'tf.keras.initializers.TruncatedNormal', ([], {'stddev': 'stddev'}), '(stddev=stddev)\n', (251, 266), True, 'import tensorflow as tf\n'), ((1067, 1135), 'transformers.TFAutoModelForQuestionAnswering.from_config', 'TFAutoModelForQuestionAnswering.from_config...
import onnxruntime as ort class SimpleModelRunner: """Runs an onnx model with a set of inputs and outputs.""" def __init__(self, filename, preprocess_function=None): """ Generates function to run ONNX model with one set of inputs and outputs. Args: filename (str): Path to ...
[ "onnxruntime.InferenceSession" ]
[((787, 822), 'onnxruntime.InferenceSession', 'ort.InferenceSession', (['self.filename'], {}), '(self.filename)\n', (807, 822), True, 'import onnxruntime as ort\n')]
import csv import logging from collections import Counter from time import monotonic from django.core.management.base import BaseCommand from django.db.models import Count, Min, Q from logs.logic.reimport import ( find_import_batches_to_reimport, reimport_import_batch_with_fa, SourceFileMissingError, ...
[ "logs.logic.reimport.has_source_data_file", "logs.logic.reimport.reimport_mdu_batch", "sushi.models.SushiCredentials.objects.filter", "django.db.models.Min", "django.db.models.Q", "time.monotonic", "logs.logic.reimport.find_import_batches_to_reimport", "logs.logic.reimport.reimport_import_batch_with_f...
[((456, 483), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (473, 483), False, 'import logging\n'), ((2226, 2229), 'django.db.models.Q', 'Q', ([], {}), '()\n', (2227, 2229), False, 'from django.db.models import Count, Min, Q\n'), ((2759, 2794), 'logs.models.ImportBatch.objects.filter', '...
""" solver/cryptominisat.py - a python wrapper for cryptominisat. ------ This file is part of NODE - the NORX Differential-Search Engine. :copyright: (c) 2014 <NAME> <<EMAIL>> :license: BSD (3-Clause), see LICENSE """ import subprocess from src.utils import which NAME = 'cryptominisat' SIGNAL = ...
[ "subprocess.Popen", "src.utils.which" ]
[((467, 478), 'src.utils.which', 'which', (['NAME'], {}), '(NAME)\n', (472, 478), False, 'from src.utils import which\n'), ((504, 583), 'subprocess.Popen', 'subprocess.Popen', (['([path] + flags)'], {'stdout': 'subprocess.PIPE', 'stdin': 'subprocess.PIPE'}), '([path] + flags, stdout=subprocess.PIPE, stdin=subprocess.PI...
import os import copy import pandas as pd import numpy as np import random from sklearn.preprocessing import StandardScaler # from imblearn.over_sampling import SMOTE from sklearn.decomposition import PCA from sklearn.metrics import mean_squared_error as mse import matplotlib.pyplot as plt from evaluation import heatm...
[ "numpy.stack", "copy.deepcopy", "sklearn.preprocessing.StandardScaler", "os.path.isdir", "numpy.corrcoef", "pandas.read_table", "numpy.array", "sklearn.decomposition.PCA", "evaluation.heatmap", "matplotlib.pyplot.subplots" ]
[((3364, 3390), 'numpy.stack', 'np.stack', (['feat_all'], {'axis': '(0)'}), '(feat_all, axis=0)\n', (3372, 3390), True, 'import numpy as np\n'), ((3719, 3742), 'numpy.corrcoef', 'np.corrcoef', (['feat_all.T'], {}), '(feat_all.T)\n', (3730, 3742), True, 'import numpy as np\n'), ((3757, 3771), 'matplotlib.pyplot.subplots...
import numpy as np import cv2 from skimage.feature import hog class FeatureExtractor(): def __init__(self, config): self.conf = config def calc_hog_features(self, img): hog_features = [] for channel in range(img.shape[2]): winSize = (img.shape[0], img.shape[1]) ...
[ "cv2.resize", "numpy.ravel", "skimage.feature.hog", "numpy.histogram", "cv2.HOGDescriptor", "numpy.concatenate" ]
[((1537, 1559), 'numpy.ravel', 'np.ravel', (['hog_features'], {}), '(hog_features)\n', (1545, 1559), True, 'import numpy as np\n'), ((2102, 2158), 'numpy.histogram', 'np.histogram', (['img[:, :, 0]'], {'bins': 'nbins', 'range': 'bins_range'}), '(img[:, :, 0], bins=nbins, range=bins_range)\n', (2114, 2158), True, 'impor...
import argparse import logging import pixoo as p from PIL import Image import os from datetime import datetime import time from surrortg.inputs import Joystick, Directions from surrortg.inputs import Switch from surrortg import Game class GameJoystick(Joystick): def __init__(self, game, jid): self.game =...
[ "PIL.Image.new", "argparse.ArgumentParser", "os.path.dirname", "time.sleep", "pixoo.Pixoo", "logging.info", "datetime.datetime.now" ]
[((6639, 6680), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""Pixoo Art Game"""'], {}), "('Pixoo Art Game')\n", (6662, 6680), False, 'import argparse\n'), ((870, 912), 'PIL.Image.new', 'Image.new', (['"""RGBA"""', '(16, 16)'], {'color': '"""black"""'}), "('RGBA', (16, 16), color='black')\n", (879, 912), F...
#! /usr/bin/env python """ Takes SAM in CSV format as input. Assumes that these data have been through remap.py (but not strictly necessary!). Merges paired-end reads and outputs aligned sequences (with insertions and deletions, minus soft clips). """ import argparse import collections from csv import DictReader, D...
[ "os.putenv", "argparse.ArgumentParser", "unittest.TestSuite", "unittest.TextTestRunner", "os.unsetenv", "csv.DictReader", "re.match", "collections.defaultdict", "re.findall", "csv.DictWriter", "argparse.FileType", "micall.tests.sam2aln_test.CigarTest", "re.compile" ]
[((1547, 1578), 're.compile', 're.compile', (['"""[0-9]+[MIDNSHPX=]"""'], {}), "('[0-9]+[MIDNSHPX=]')\n", (1557, 1578), False, 'import re\n'), ((1601, 1620), 're.compile', 're.compile', (['"""^[-]+"""'], {}), "('^[-]+')\n", (1611, 1620), False, 'import re\n'), ((618, 705), 'argparse.ArgumentParser', 'argparse.ArgumentP...
"""Turn local URLs into CDN URLs.""" from nose.tools import set_trace import urlparse from s3 import S3Uploader def cdnify(url, cdns): if not cdns: # No CDNs configured return url scheme, netloc, path, query, fragment = urlparse.urlsplit(url) if netloc == 's3.amazonaws.com': # Thi...
[ "s3.S3Uploader.bucket_and_filename", "urlparse.urlunsplit", "urlparse.urlsplit" ]
[((246, 268), 'urlparse.urlsplit', 'urlparse.urlsplit', (['url'], {}), '(url)\n', (263, 268), False, 'import urlparse\n'), ((737, 764), 'urlparse.urlsplit', 'urlparse.urlsplit', (['cdn_host'], {}), '(cdn_host)\n', (754, 764), False, 'import urlparse\n'), ((776, 844), 'urlparse.urlunsplit', 'urlparse.urlunsplit', (['(cd...
import pyperclip import sys TEXT = { "agree": "Yes, I agree. That sounds fine to me.", "busy": "Sorry, can we do this later this week or next week?", "upsell": "Would you consider making this a monthly donation?", } if len(sys.argv) < 2: print("Usage: python mclip.py [keyphrase] - copy phrase text") ...
[ "pyperclip.copy", "sys.exit" ]
[((323, 333), 'sys.exit', 'sys.exit', ([], {}), '()\n', (331, 333), False, 'import sys\n'), ((386, 417), 'pyperclip.copy', 'pyperclip.copy', (['TEXT[keyphrase]'], {}), '(TEXT[keyphrase])\n', (400, 417), False, 'import pyperclip\n')]
# -*- coding: utf-8 -*- # Copyright (c) 2018, ErickLopez and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Facturas(Document): pass @frappe.whitelist() def anulardoc(doc_name): # frappe.db.sql("""...
[ "frappe.whitelist", "frappe.get_doc" ]
[((257, 275), 'frappe.whitelist', 'frappe.whitelist', ([], {}), '()\n', (273, 275), False, 'import frappe\n'), ((374, 410), 'frappe.get_doc', 'frappe.get_doc', (['"""Facturas"""', 'doc_name'], {}), "('Facturas', doc_name)\n", (388, 410), False, 'import frappe\n')]
from django.urls import path from expen.config import app_config from expen import views app_name = app_config['name'] urlpatterns = [ path('', views.ListView.as_view(), name='list'), path('<int:pk>/', views.DetailView.as_view(), name='item'), path(app_config['group_entity'] + '/<int:pk>/', views.ProjectVi...
[ "expen.views.ProjectView.as_view", "expen.views.DetailView.as_view", "expen.views.ListView.as_view" ]
[((149, 173), 'expen.views.ListView.as_view', 'views.ListView.as_view', ([], {}), '()\n', (171, 173), False, 'from expen import views\n'), ((211, 237), 'expen.views.DetailView.as_view', 'views.DetailView.as_view', ([], {}), '()\n', (235, 237), False, 'from expen import views\n'), ((305, 332), 'expen.views.ProjectView.a...
from django.db import models from django.conf import settings from teleband.assignments.models import Assignment class Submission(models.Model): assignment = models.ForeignKey(Assignment, on_delete=models.PROTECT) submitted = models.DateTimeField(auto_now_add=True) content = models.TextField(blank=True)...
[ "django.db.models.FileField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.FloatField", "django.db.models.DateTimeField" ]
[((166, 221), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Assignment'], {'on_delete': 'models.PROTECT'}), '(Assignment, on_delete=models.PROTECT)\n', (183, 221), False, 'from django.db import models\n'), ((238, 277), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), ...
from aiogram.dispatcher import FSMContext from aiogram.types import KeyboardButton, Message, ReplyKeyboardMarkup from delivery_bots.api.moltin.entry.entry import ( fetch_all_entries, find_nearest_pizzeria, parse_all_entries_response, ) from delivery_bots.bots.tgbot.checkout.delivery.keyboards import ( ...
[ "aiogram.types.ReplyKeyboardMarkup", "delivery_bots.api.moltin.entry.entry.find_nearest_pizzeria", "aiogram.types.KeyboardButton", "delivery_bots.bots.tgbot.states.BotState.delivery.set", "delivery_bots.api.moltin.entry.entry.fetch_all_entries", "delivery_bots.bots.tgbot.states.BotState.geo.set", "deliv...
[((598, 656), 'aiogram.types.KeyboardButton', 'KeyboardButton', (['"""Отправить локацию"""'], {'request_location': '(True)'}), "('Отправить локацию', request_location=True)\n", (612, 656), False, 'from aiogram.types import KeyboardButton, Message, ReplyKeyboardMarkup\n'), ((799, 817), 'delivery_bots.bots.tgbot.states.B...
# Generated by Django 3.2.7 on 2021-11-12 11:28 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Home', '0005_userbook'), ] operations = [ migrations.AlterModelOptions( name='userbook', options={'verbose_name': 'UserBook'...
[ "django.db.migrations.AlterModelOptions" ]
[((214, 337), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""userbook"""', 'options': "{'verbose_name': 'UserBook', 'verbose_name_plural': 'UserBooks'}"}), "(name='userbook', options={'verbose_name':\n 'UserBook', 'verbose_name_plural': 'UserBooks'})\n", (242, 337), False...
from typing import Optional import matplotlib.pyplot as plt import pandas as pd import scattermap # source obtained from: https://gist.github.com/lukauskas/f2f43aad6078a8b5d71b986174487b8c SETTINGS = { # INPUT FILE SETTINGS # Write the input Excel file and sheet name here. 'input_file': 'sample_data.xl...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots", "pandas.read_excel", "scattermap.scattermap", "matplotlib.pyplot.tight_layout" ]
[((2043, 2119), 'pandas.read_excel', 'pd.read_excel', (['input_file'], {'sheet_name': 'sheet_name', 'index_col': '(0)', 'header': '[0, 1]'}), '(input_file, sheet_name=sheet_name, index_col=0, header=[0, 1])\n', (2056, 2119), True, 'import pandas as pd\n'), ((2652, 2689), 'matplotlib.pyplot.subplots', 'plt.subplots', ([...
# Generated by Django 3.0.4 on 2020-03-20 10:41 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('rate', '0005_auto_20200320_1039'), ] operations = [ migrations.AlterField( model_name='review',...
[ "django.db.models.ForeignKey" ]
[((366, 462), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""rate.Courses"""'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n to='rate.Courses')\n", (383, 462), False, 'from django.db import migrations, models\n')...
import warnings from typing import Dict, List, Union import numpy as np import pandas as pd from loguru import logger from sklearn.ensemble import RandomForestClassifier from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LogisticRegression from sklearn.metrics import f1_score, matthews_...
[ "sklearn.ensemble.RandomForestClassifier", "sklearn.preprocessing.StandardScaler", "warnings.filterwarnings", "pandas.read_csv", "numpy.asarray", "loguru.logger.warning", "numpy.zeros", "sklearn.model_selection.KFold", "sklearn.metrics.roc_auc_score", "sklearn.tree.DecisionTreeClassifier", "logu...
[((1938, 1981), 'loguru.logger.info', 'logger.info', (['f"""Training Ensemble Model ..."""'], {}), "(f'Training Ensemble Model ...')\n", (1949, 1981), False, 'from loguru import logger\n'), ((2292, 2314), 'pandas.read_csv', 'pd.read_csv', (['data_path'], {}), '(data_path)\n', (2303, 2314), True, 'import pandas as pd\n'...
import random from pathlib import Path from typing import Iterator import numpy as np import torch.utils.data from torch import nn from torch.utils.data.dataset import T_co from torch.nn import functional as F class RandomShiftsAug(nn.Module): def __init__(self, pad): super().__init__() self.pad ...
[ "numpy.load", "torch.nn.functional.grid_sample", "random.sample", "random.choices", "random.choice", "pathlib.Path", "numpy.random.rand", "torch.nn.functional.pad" ]
[((457, 487), 'torch.nn.functional.pad', 'F.pad', (['x', 'padding', '"""replicate"""'], {}), "(x, padding, 'replicate')\n", (462, 487), True, 'from torch.nn import functional as F\n'), ((1274, 1339), 'torch.nn.functional.grid_sample', 'F.grid_sample', (['x', 'grid'], {'padding_mode': '"""zeros"""', 'align_corners': '(F...
""" Ptrack Tracker: TrackingPixel registry and tracker """ import inspect import ptrack class Tracker(object): """ A Tracker object encapsulates an instance of the Django ptrack application, ready to be hooked in to your URLconf. TrackingPixel callbacks are registered with the Tracker PtrackSite using...
[ "inspect.isclass" ]
[((658, 697), 'inspect.isclass', 'inspect.isclass', (['trackingpixel_callback'], {}), '(trackingpixel_callback)\n', (673, 697), False, 'import inspect\n')]
import secrets from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives.hashes import Hash, SHA512 tmp_key=rsa.generate_private_key(public_exponent=65537, key_size=1024, backend=default_backend()) p=tmp_key.private_numbers()....
[ "cryptography.hazmat.backends.default_backend", "random.randint" ]
[((273, 290), 'cryptography.hazmat.backends.default_backend', 'default_backend', ([], {}), '()\n', (288, 290), False, 'from cryptography.hazmat.backends import default_backend\n'), ((1174, 1198), 'random.randint', 'random.randint', (['(2)', '(p - 2)'], {}), '(2, p - 2)\n', (1188, 1198), False, 'import random\n')]
import random from time import sleep itens = ('Pedra', 'Papel', 'Tesoura') print('{:=^40}'.format(' Vamos jogar JO KEN PO !!!! ')) j=int(input('[0] Pedra\n[1] Papel\n[2] Tesoura\nQual é a sua jogada? ')) print('-='*20) c=random.randint(0,2) print('Você jogou {}'.format(itens[j])) #é o item... tem posição 0, 1 e 2 print...
[ "random.randint", "time.sleep" ]
[((221, 241), 'random.randint', 'random.randint', (['(0)', '(2)'], {}), '(0, 2)\n', (235, 241), False, 'import random\n'), ((390, 398), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (395, 398), False, 'from time import sleep\n'), ((412, 420), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (417, 420), False, 'from time...
# -*- coding: utf-8 -*- """ Inferface for our typesystems. Some requirements: * The typesystem must allow us to switch between low-level representations. For instance, we may want to represent an array as a NumPy ndarray, a Py_buffer, or some other representation. * The sizes of atom types (e.g. int) mu...
[ "functools.partial", "struct.pack", "struct.calcsize", "weakref.WeakKeyDictionary", "weakref.WeakValueDictionary" ]
[((2939, 2961), 'struct.calcsize', 'struct_.calcsize', (['"""@P"""'], {}), "('@P')\n", (2955, 2961), True, 'import struct as struct_\n'), ((2966, 2986), 'struct.pack', 'struct_.pack', (['"""i"""', '(1)'], {}), "('i', 1)\n", (2978, 2986), True, 'import struct as struct_\n'), ((6113, 6152), 'functools.partial', 'partial'...
# Generated by Django 2.2.11 on 2021-06-12 14:33 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('facility', ...
[ "django.db.models.TextField", "django.db.migrations.swappable_dependency", "django.db.models.UUIDField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField" ]
[((240, 297), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (271, 297), False, 'from django.db import migrations, models\n'), ((483, 576), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
from collections import defaultdict import networkx as nx import pandas as pd from typing import Tuple, Dict def load_combo_se(combo_path: str = 'bio-decagon-combo.csv') -> \ Tuple[nx.Graph, Dict[str, str], Dict[str, str], Dict[str, str]]: """ Parameters ---------- combo_path: str ...
[ "pandas.read_csv", "collections.defaultdict", "networkx.isolates", "networkx.selfloop_edges" ]
[((699, 747), 'pandas.read_csv', 'pd.read_csv', (['combo_path'], {'delimiter': '""","""', 'header': '(0)'}), "(combo_path, delimiter=',', header=0)\n", (710, 747), True, 'import pandas as pd\n'), ((1205, 1221), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (1216, 1221), False, 'from collections im...
import os os.environ['PYTHONUNBUFFERED'] = '1' import shutil import time import json import torch import numpy as np import random import argparse import sys import json import pprint import re import warnings import collections.abc import copy from collections import defaultdict from sklearn.metrics import average_pr...
[ "torch.ones", "copy.deepcopy", "argparse.ArgumentParser", "torch.manual_seed", "os.walk", "torch.nn.modules.module._addindent", "utils.ptracker.PerformanceTracker.get_parser", "backbones.conv.Conv4NP", "backbones.conv.Conv6NP", "torch.cuda.is_available", "utils.bunch.bunch.bunchify", "torch.de...
[((2119, 2159), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['*args'], {}), '(*args, **kwargs)\n', (2142, 2159), False, 'import argparse\n'), ((9854, 9893), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'add_help': '(False)'}), '(add_help=False)\n', (9877, 9893), False, 'import argparse\n'), ((...