code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import google.cloud.proto.language.v1beta2.language_service_pb2 as google_dot_cloud_dot_proto_dot_language_dot_v1beta2_d...
[ "grpc.method_handlers_generic_handler", "grpc.unary_unary_rpc_method_handler" ]
[((6783, 6894), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""google.cloud.language.v1beta2.LanguageService"""', 'rpc_method_handlers'], {}), "(\n 'google.cloud.language.v1beta2.LanguageService', rpc_method_handlers)\n", (6819, 6894), False, 'import grpc\n'), ((4753, 5118), 'g...
import os import numpy as np import time from multiprocessing import Pool import psutil import cv2 import matplotlib.pyplot as plt import av #for better performance ############################################################################## #For EPM, please select pionts from the OPEN arm to the CLOSE arm and press...
[ "os.mkdir", "cv2.medianBlur", "numpy.argmax", "cv2.getPerspectiveTransform", "numpy.isnan", "cv2.ellipse", "numpy.mean", "cv2.rectangle", "cv2.imshow", "os.path.join", "psutil.cpu_count", "cv2.warpPerspective", "cv2.cvtColor", "cv2.fitEllipse", "cv2.setMouseCallback", "numpy.int32", ...
[((1349, 1372), 'psutil.cpu_count', 'psutil.cpu_count', (['(False)'], {}), '(False)\n', (1365, 1372), False, 'import psutil\n'), ((1793, 1839), 'numpy.zeros', 'np.zeros', ([], {'shape': '(w + h, w + h)', 'dtype': 'np.uint8'}), '(shape=(w + h, w + h), dtype=np.uint8)\n', (1801, 1839), True, 'import numpy as np\n'), ((72...
from pathlib import Path from .common import PathIsh, Visit, Source, last, Loc, Results, DbVisit, Context, Res # add deprecation warning so eventually this may converted to a namespace package? import warnings warnings.warn("DEPRECATED! Please import directly from 'promnesia.common', e.g. 'from promnesia.common import...
[ "warnings.warn" ]
[((211, 376), 'warnings.warn', 'warnings.warn', (['"""DEPRECATED! Please import directly from \'promnesia.common\', e.g. \'from promnesia.common import Visit, Source, Results\'"""', 'DeprecationWarning'], {}), '(\n "DEPRECATED! Please import directly from \'promnesia.common\', e.g. \'from promnesia.common import Vis...
# Inspired from this: https://www.data-blogger.com/2017/02/24/gathering-tweets-with-python/ import tweepy import json # Specify the account credentials in the following variables: # TODO: Get them from an env varibale or secret file consumer_key = 'INSERT CONSUMER KEY HERE' consumer_secret = 'INSERT CONSUMER SECRET ...
[ "tweepy.OAuthHandler", "json.loads", "tweepy.Stream" ]
[((1039, 1089), 'tweepy.OAuthHandler', 'tweepy.OAuthHandler', (['consumer_key', 'consumer_secret'], {}), '(consumer_key, consumer_secret)\n', (1058, 1089), False, 'import tweepy\n'), ((1206, 1235), 'tweepy.Stream', 'tweepy.Stream', (['auth', 'listener'], {}), '(auth, listener)\n', (1219, 1235), False, 'import tweepy\n'...
import psycopg2 HOSTNAME = '192.168.1.204' USERNAME = 'postgres' PASSWORD = '<PASSWORD>' DATABASE_NAME = 'data_lake' PORT = 5432 postgres_connection_string = "postgresql://{DB_USER}:{DB_PASS}@{DB_ADDR}:{PORT}/{DB_NAME}".format( DB_USER=USERNAME, DB_PASS=PASSWORD, DB_ADDR=HOSTNAME, PORT=PORT, DB_NA...
[ "psycopg2.connect" ]
[((401, 505), 'psycopg2.connect', 'psycopg2.connect', ([], {'user': 'USERNAME', 'password': 'PASSWORD', 'host': 'HOSTNAME', 'port': 'PORT', 'database': 'DATABASE_NAME'}), '(user=USERNAME, password=PASSWORD, host=HOSTNAME, port=PORT,\n database=DATABASE_NAME)\n', (417, 505), False, 'import psycopg2\n')]
"""add fortunki table Revision ID: 567424e5046c Revises: <PASSWORD> Create Date: 2019-09-19 18:59:11.629057 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "567424e5046c" down_revision = "f32a45256434" branch_labels = None depends_on = None def upgrade(): ...
[ "alembic.op.drop_table", "sqlalchemy.Text", "alembic.op.f", "sqlalchemy.Integer" ]
[((795, 820), 'alembic.op.drop_table', 'op.drop_table', (['"""fortunki"""'], {}), "('fortunki')\n", (808, 820), False, 'from alembic import op\n'), ((447, 459), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (457, 459), True, 'import sqlalchemy as sa\n'), ((504, 513), 'sqlalchemy.Text', 'sa.Text', ([], {}), '()\...
import os import re from glob import glob import pandas as pd # enloc #FILE_SUFFIX = '*.enloc.rst' #FILE_PATTERN = '(?P<pheno>.+)__PM__(?P<tissue>.+)\.enloc\.rst' # fastenloc ALL_TISSUES = pd.read_csv('/mnt/phenomexcan/fastenloc/fastenloc_gtex_tissues.txt', header=None, squeeze=True).tolist() FILE_PREFIX = 'fastenlo...
[ "os.makedirs", "pandas.read_csv", "os.system", "re.escape", "glob.glob", "re.search", "re.compile" ]
[((551, 568), 'glob.glob', 'glob', (['FILE_SUFFIX'], {}), '(FILE_SUFFIX)\n', (555, 568), False, 'from glob import glob\n'), ((607, 631), 're.compile', 're.compile', (['FILE_PATTERN'], {}), '(FILE_PATTERN)\n', (617, 631), False, 'import re\n'), ((948, 981), 'os.makedirs', 'os.makedirs', (['pheno'], {'exist_ok': '(True)'...
from __future__ import absolute_import, division, print_function import hashlib import json import logging import subprocess import tempfile import time import requests from requests.utils import urlparse __all__ = ['Kubernetes', "get_endpoint"] logger = logging.getLogger(__name__) resource_endpoints = { "daemo...
[ "requests.utils.urlparse", "tempfile.NamedTemporaryFile", "json.loads", "subprocess.check_output", "json.dumps", "time.sleep", "requests.post", "logging.getLogger" ]
[((258, 285), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (275, 285), False, 'import logging\n'), ((3372, 3393), 'json.loads', 'json.loads', (['self.body'], {}), '(self.body)\n', (3382, 3393), False, 'import json\n'), ((5370, 5399), 'tempfile.NamedTemporaryFile', 'tempfile.NamedTempora...
from string import Template const_base = "data/const/degree_order_{}_{}.pkl" #LRF settings N = 500 minc = 100 maxc = 100 mu = 0.3 k = 5 #k = 10 #maxk = 20 maxk = 50 t1 = 2 t2 = 1 name_tmp = Template("LRF_${N}_${k}_${maxk}_${minc}_${maxc}_${mu}") lrf_data_label = name_tmp.substitute(N=N, k=k, maxk=maxk, minc=minc, ma...
[ "string.Template" ]
[((193, 248), 'string.Template', 'Template', (['"""LRF_${N}_${k}_${maxk}_${minc}_${maxc}_${mu}"""'], {}), "('LRF_${N}_${k}_${maxk}_${minc}_${maxc}_${mu}')\n", (201, 248), False, 'from string import Template\n')]
"""Implement merge sort algorithm.""" from random import randint, shuffle from timeit import timeit def merge_sort(nums): """Merge list by merge sort.""" half = int(len(nums) // 2) if len(nums) == 1: return nums if len(nums) == 2: if nums[0] > nums[1]: nums[0], nums[1] = ...
[ "random.shuffle", "random.randint" ]
[((1308, 1322), 'random.randint', 'randint', (['(9)', '(50)'], {}), '(9, 50)\n', (1315, 1322), False, 'from random import randint, shuffle\n'), ((1691, 1705), 'random.randint', 'randint', (['(9)', '(50)'], {}), '(9, 50)\n', (1698, 1705), False, 'from random import randint, shuffle\n'), ((1761, 1778), 'random.shuffle', ...
#!/usr/bin/python3 # Copyright 2017-2018 <NAME> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the followin...
[ "pandas.DataFrame", "numpy.sum", "numpy.average", "numpy.log", "os.path.basename", "pandas.read_csv", "os.path.isdir", "os.walk", "six.StringIO", "multiprocessing.Pool", "numpy.mean", "os.path.normpath", "pytablewriter.MarkdownTableWriter", "glob.glob", "pandas.concat" ]
[((1914, 1943), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': 'columns'}), '(columns=columns)\n', (1926, 1943), True, 'import pandas as pd\n'), ((3874, 3909), 'pytablewriter.MarkdownTableWriter', 'pytablewriter.MarkdownTableWriter', ([], {}), '()\n', (3907, 3909), False, 'import pytablewriter\n'), ((3986, 4000),...
import os import shutil def copy_file_path(source_path, target_path): """复制源文件目录下的所有目录到另一个文件目录下""" for e, _, _ in os.walk(source_path): path_name = os.path.splitdrive(e)[1] file_path = os.path.join(target_path, path_name[len(source_path)-1:]) if not os.path.exists(file_path): ...
[ "os.path.splitdrive", "os.makedirs", "os.walk", "os.path.exists", "os.path.join", "shutil.copy" ]
[((124, 144), 'os.walk', 'os.walk', (['source_path'], {}), '(source_path)\n', (131, 144), False, 'import os\n'), ((460, 480), 'os.walk', 'os.walk', (['source_path'], {}), '(source_path)\n', (467, 480), False, 'import os\n'), ((954, 967), 'os.walk', 'os.walk', (['path'], {}), '(path)\n', (961, 967), False, 'import os\n'...
from __future__ import annotations from abc import abstractmethod, abstractproperty from typing import Any, Generic, TYPE_CHECKING, TypeVar, Union import numpy as np if TYPE_CHECKING: from tanuki.data_store.column_alias import ColumnAlias from tanuki.data_store.index.pandas_index import PandasIndex C = Ty...
[ "typing.TypeVar" ]
[((318, 363), 'typing.TypeVar', 'TypeVar', (['"""C"""'], {'bound': "tuple['ColumnAlias', ...]"}), "('C', bound=tuple['ColumnAlias', ...])\n", (325, 363), False, 'from typing import Any, Generic, TYPE_CHECKING, TypeVar, Union\n')]
#! /usr/bin/env python3 import logging import sys logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, format='%(asctime)s(%(relativeCreated)6d)[%(threadName)s]%(message)s') # example of an airborne survey where some of the flight lines get too close to each other # when gridded, the output contains "tares" th...
[ "intrepid.mastertask_pb2.BatchJob", "intrepid.utils.Executor.execute", "logging.basicConfig" ]
[((51, 186), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stdout', 'level': 'logging.DEBUG', 'format': '"""%(asctime)s(%(relativeCreated)6d)[%(threadName)s]%(message)s"""'}), "(stream=sys.stdout, level=logging.DEBUG, format=\n '%(asctime)s(%(relativeCreated)6d)[%(threadName)s]%(message)s')\n", ...
# si occupa della gestione delle regole e dei dati privati del server from server.global_var import GlobalVar from replicated.game_state import Fase from server.player_private import PlayerPrivate from server.deck import Deck, Card from threading import Timer from tcp_basics import safe_recv_var from socket import tim...
[ "threading.Timer", "server.deck.Card.contiene_carta", "server.deck.Card", "server.deck.Deck", "server.deck.Card.del_carta", "tcp_basics.safe_recv_var", "server.deck.Card.carta_permessa" ]
[((769, 775), 'server.deck.Deck', 'Deck', ([], {}), '()\n', (773, 775), False, 'from server.deck import Deck, Card\n'), ((4445, 4504), 'server.deck.Card.contiene_carta', 'Card.contiene_carta', (['giocatore.player_state.mano.val', 'carta'], {}), '(giocatore.player_state.mano.val, carta)\n', (4464, 4504), False, 'from se...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup import versioneer versioneer.VCS = 'git' versioneer.versionfile_source = 'shotgunCache/_version.py' versioneer.versionfile_build = 'shotgunCache/_version.py' versioneer.tag_pre...
[ "versioneer.get_version", "versioneer.get_cmdclass" ]
[((560, 584), 'versioneer.get_version', 'versioneer.get_version', ([], {}), '()\n', (582, 584), False, 'import versioneer\n'), ((620, 645), 'versioneer.get_cmdclass', 'versioneer.get_cmdclass', ([], {}), '()\n', (643, 645), False, 'import versioneer\n')]
import os import sys if __name__ == "__main__": train_file = sys.argv[1] dev_file = sys.argv[2] test_folder = sys.argv[3] folder = sys.argv[4] param_file = sys.argv[5] partition = sys.argv[6] bash_script = os.path.join(folder, "parallel_eval_model.sh") with open(bash_script, 'w+') as ...
[ "os.path.join" ]
[((236, 282), 'os.path.join', 'os.path.join', (['folder', '"""parallel_eval_model.sh"""'], {}), "(folder, 'parallel_eval_model.sh')\n", (248, 282), False, 'import os\n'), ((566, 600), 'os.path.join', 'os.path.join', (['folder_file', '"""error"""'], {}), "(folder_file, 'error')\n", (578, 600), False, 'import os\n'), ((6...
import tensorflow.compat.v1 as tf """ I assume that each file represents a video. All videos have minimal dimension equal to 256 and fps equal to 6. Median video length is ~738 frames. """ NUM_FRAMES = 4 # must be greater or equal to 2 SIZE = 256 # must be less or equal to 256 class Pipeline: def __init__(...
[ "tensorflow.compat.v1.stack", "tensorflow.compat.v1.image.decode_png", "tensorflow.compat.v1.parse_single_example", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.image.crop_to_bounding_box", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.random.uniform", "tensorflow.compat.v1.data.TFRecord...
[((604, 649), 'tensorflow.compat.v1.data.Dataset.from_tensor_slices', 'tf.data.Dataset.from_tensor_slices', (['filenames'], {}), '(filenames)\n', (638, 649), True, 'import tensorflow.compat.v1 as tf\n'), ((2255, 2290), 'tensorflow.compat.v1.stack', 'tf.stack', (['images_and_labels'], {'axis': '(0)'}), '(images_and_labe...
""" This CLI plugin was auto-generated by using 'sonic-cli-gen' utility, BUT it was manually modified to meet the PBH HLD requirements. PBH HLD - https://github.com/Azure/SONiC/pull/773 CLI Auto-generation tool HLD - https://github.com/Azure/SONiC/pull/78 """ import click import json import ipaddress import re import...
[ "click.argument", "click.get_current_context", "show.plugins.pbh.deserialize_pbh_counters", "click.option", "ipaddress.ip_address", "click.Choice", "click.group", "click.secho", "click.Abort" ]
[((17412, 17463), 'click.group', 'click.group', ([], {'name': '"""pbh"""', 'cls': 'clicommon.AliasedGroup'}), "(name='pbh', cls=clicommon.AliasedGroup)\n", (17423, 17463), False, 'import click\n'), ((17854, 17911), 'click.argument', 'click.argument', (['"""hash-field-name"""'], {'nargs': '(1)', 'required': '(True)'}), ...
import sklearn import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import classification_report from sklearn.datasets import load_breast_cancer from sklearn.model_selection import train_test_split from sklearn.datasets import load_breast_cancer from sklearn...
[ "matplotlib.pyplot.title", "sklearn.model_selection.GridSearchCV", "sklearn.preprocessing.StandardScaler", "sklearn.model_selection.train_test_split", "sklearn.tree.DecisionTreeClassifier", "sklearn.metrics.classification_report", "matplotlib.pyplot.figure", "sklearn.externals.six.StringIO", "numpy....
[((998, 1018), 'sklearn.datasets.load_breast_cancer', 'load_breast_cancer', ([], {}), '()\n', (1016, 1018), False, 'from sklearn.datasets import load_breast_cancer\n'), ((1357, 1392), 'sklearn.datasets.load_breast_cancer', 'load_breast_cancer', ([], {'return_X_y': '(True)'}), '(return_X_y=True)\n', (1375, 1392), False,...
import os from pyautogui import * import pyautogui import time import keyboard import random import win32api, win32con #This program was written in a few hours, its purpose is to set the computer's power usage. # Disclaimer: This is an awful way to do it, even the cmds, a better way would be NViAPI but I d...
[ "keyboard.press_and_release", "win32api.SetCursorPos", "time.sleep", "pyautogui.pixel", "win32api.mouse_event", "os.startfile", "win32api.GetCursorPos" ]
[((706, 735), 'win32api.SetCursorPos', 'win32api.SetCursorPos', (['(x, y)'], {}), '((x, y))\n', (727, 735), False, 'import win32api, win32con\n'), ((740, 797), 'win32api.mouse_event', 'win32api.mouse_event', (['win32con.MOUSEEVENTF_LEFTDOWN', '(0)', '(0)'], {}), '(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0)\n', (760, 797), Fa...
import boto3 import datetime import argparse import logging import sys from aws_interfaces.s3_interface import S3Interface from boto3.dynamodb.conditions import Key, Attr parser = argparse.ArgumentParser() parser.add_argument("-r", "--region", action="store", required=True, dest="region", help="the region for uploadi...
[ "argparse.ArgumentParser", "logging.basicConfig", "boto3.client", "boto3.dynamodb.conditions.Key", "datetime.datetime.utcnow", "aws_interfaces.s3_interface.S3Interface" ]
[((182, 207), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (205, 207), False, 'import argparse\n'), ((449, 507), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stdout', 'level': 'logging.INFO'}), '(stream=sys.stdout, level=logging.INFO)\n', (468, 507), False, 'import loggi...
#!python # -*- coding: UTF-8 -*- ''' ################################################################ # Multiprocessing based synchronization. # @ Sync-stream # Produced by # <NAME> @ <EMAIL>, # <EMAIL>. # Requirements: (Pay attention to version) # python 3.6+ # The base module for the message synchroniz...
[ "io.StringIO", "multiprocessing.Manager", "threading.Lock", "multiprocessing.Queue", "collections.deque" ]
[((1463, 1495), 'collections.deque', 'collections.deque', ([], {'maxlen': 'maxlen'}), '(maxlen=maxlen)\n', (1480, 1495), False, 'import collections\n'), ((1521, 1534), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (1532, 1534), False, 'import io\n'), ((1567, 1583), 'threading.Lock', 'threading.Lock', ([], {}), '()\n'...
""" OpenNEM AEMO facility closure dates parser. """ import logging from datetime import datetime from pathlib import Path from typing import List, Optional, Union from openpyxl import load_workbook from pydantic import ValidationError from pydantic.class_validators import validator from opennem.core.normalizers imp...
[ "openpyxl.load_workbook", "logging.getLogger", "pydantic.class_validators.validator", "pathlib.Path", "pprint.pprint", "opennem.core.normalizers.is_number" ]
[((403, 466), 'logging.getLogger', 'logging.getLogger', (['"""opennem.parsers.aemo_nem_facility_closures"""'], {}), "('opennem.parsers.aemo_nem_facility_closures')\n", (420, 466), False, 'import logging\n'), ((818, 841), 'opennem.core.normalizers.is_number', 'is_number', (['closure_year'], {}), '(closure_year)\n', (827...
import os import ssl import smtplib from typing import Callable from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart def send_mail(subject: str, log_path: str, img_path: str, get: Callable): sender = get('email') api_key = get('api_key') ...
[ "smtplib.SMTP_SSL", "os.path.basename", "email.mime.text.MIMEText", "ssl.create_default_context", "email.mime.multipart.MIMEMultipart" ]
[((369, 384), 'email.mime.multipart.MIMEMultipart', 'MIMEMultipart', ([], {}), '()\n', (382, 384), False, 'from email.mime.multipart import MIMEMultipart\n'), ((623, 636), 'email.mime.text.MIMEText', 'MIMEText', (['log'], {}), '(log)\n', (631, 636), False, 'from email.mime.text import MIMEText\n'), ((812, 840), 'ssl.cr...
# MIT License # # Copyright (c) 2019 <NAME> # # 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, including without limitation the rights # to use, copy, modify, merge,...
[ "os.environ.get", "supporting.log", "logging.getLogger" ]
[((1424, 1451), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1441, 1451), False, 'import supporting, os, logging\n'), ((1700, 1758), 'supporting.log', 'supporting.log', (['logger', 'logging.DEBUG', 'thisproc', '"""started"""'], {}), "(logger, logging.DEBUG, thisproc, 'started')\n", (17...
import argparse import time import os import numpy as np import json import cv2 import random import torch from ACID_test import test # Setup detectron2 logger import detectron2 from detectron2.utils.logger import setup_logger setup_logger() # import some common detectron2 utilities from detectron2.model_zoo import m...
[ "argparse.ArgumentParser", "detectron2.data.DatasetCatalog.get", "detectron2.utils.logger.setup_logger", "detectron2.evaluation.COCOEvaluator", "detectron2.data.datasets.register_coco_instances", "detectron2.config.get_cfg", "detectron2.model_zoo.model_zoo.get_config_file", "detectron2.engine.DefaultT...
[((228, 242), 'detectron2.utils.logger.setup_logger', 'setup_logger', ([], {}), '()\n', (240, 242), False, 'from detectron2.utils.logger import setup_logger\n'), ((809, 875), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""ACID_Object_Detection_Train"""'}), "(description='ACID_Object_Dete...
import django.core.validators import django.utils.timezone import model_utils.fields from django.conf import settings from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(s...
[ "django.db.models.TextField", "django.db.migrations.swappable_dependency", "django.db.models.CharField", "opaque_keys.edx.django.models.CourseKeyField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.migrations.AlterUniqueTogether" ]
[((287, 344), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (318, 344), False, 'from django.db import migrations, models\n'), ((2300, 2393), 'django.db.migrations.AlterUniqueTogether', 'migrations.AlterUniqueTogether',...
import datetime as dt from json import dumps as json_dumps from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from registration.models import User from events.models import SoloEvent from event_registrations.models import SoloEventRegistration from payments.mod...
[ "datetime.date", "json.dumps", "django.urls.reverse", "datetime.time", "event_registrations.models.SoloEventRegistration.objects.create", "payments.models.Transaction.objects.create", "registration.models.User.objects.create" ]
[((435, 558), 'registration.models.User.objects.create', 'User.objects.create', ([], {'username': '"""test_user1"""', 'first_name': '"""test"""', 'last_name': '"""user"""', 'email': '"""<EMAIL>"""', 'email_confirmed': '(True)'}), "(username='test_user1', first_name='test', last_name=\n 'user', email='<EMAIL>', email...
import requests image = {'image': open('data/test_photo.jpeg', 'rb').read()} r1 = requests.get("http://0.0.0.0:5000/") print(r1.text) r2 = requests.post("http://localhost:5000/get_prob", files=image) print(r2.text) # "Male" or "Female"
[ "requests.post", "requests.get" ]
[((84, 120), 'requests.get', 'requests.get', (['"""http://0.0.0.0:5000/"""'], {}), "('http://0.0.0.0:5000/')\n", (96, 120), False, 'import requests\n'), ((142, 202), 'requests.post', 'requests.post', (['"""http://localhost:5000/get_prob"""'], {'files': 'image'}), "('http://localhost:5000/get_prob', files=image)\n", (15...
#!/usr/bin/env python # coding=utf-8 from PyQt4.QtCore import * import requests import re, os from OCR import Image2txt from PIL import Image class backEnd(QThread): finish_signal = pyqtSignal(str, bool) def __init__(self, txt): super(backEnd, self).__init__() self.txt = txt def run(self): path = '../OCR/te...
[ "os.mkdir", "os.path.exists", "PIL.Image.open", "re.findall", "requests.get", "OCR.Image2txt.picture_ocr" ]
[((829, 872), 're.findall', 're.findall', (['""""objURL":"(.*?)","""', 'html', 're.S'], {}), '(\'"objURL":"(.*?)",\', html, re.S)\n', (839, 872), False, 'import re, os\n'), ((337, 357), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (351, 357), False, 'import re, os\n'), ((362, 376), 'os.mkdir', 'os.mk...
__source__ = 'https://leetcode.com/problems/bulb-switcher/description/' # Time: O(1) # Space: O(1) # # Description: Leetcode # 319. Bulb Switcher # # There are n bulbs that are initially off. # You first turn on all the bulbs. # Then, you turn off every second bulb. # On the third round, you toggle every third bulb (t...
[ "unittest.main", "math.sqrt" ]
[((1247, 1262), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1260, 1262), False, 'import unittest\n'), ((1105, 1117), 'math.sqrt', 'math.sqrt', (['n'], {}), '(n)\n', (1114, 1117), False, 'import math\n')]
from setuptools import setup setup( name='V16_API', packages=['V16_API'], include_package_data=True, install_requires=[ 'flask', 'flask-bootstrap', 'flask-nav', 'pyserial', 'flask_wtf', 'gunicorn' ], )
[ "setuptools.setup" ]
[((32, 207), 'setuptools.setup', 'setup', ([], {'name': '"""V16_API"""', 'packages': "['V16_API']", 'include_package_data': '(True)', 'install_requires': "['flask', 'flask-bootstrap', 'flask-nav', 'pyserial', 'flask_wtf', 'gunicorn']"}), "(name='V16_API', packages=['V16_API'], include_package_data=True,\n install_re...
import torch.nn as nn from matplotlib import pyplot as plt def MLP(input_dim, out_dims): """ Creates an MLP for the models. :param input_dim: Integer containing the dimensions of the input (= x_dim + y_dim). :param out_dims: An iterable containing the output sizes of the layers of the MLP. :retur...
[ "matplotlib.pyplot.show", "torch.nn.ReLU", "matplotlib.pyplot.plot", "torch.nn.Sequential", "matplotlib.pyplot.ylim", "matplotlib.pyplot.yticks", "torch.nn.Linear", "matplotlib.pyplot.gca", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.xticks", "matplotlib.pyplot.savefig" ]
[((761, 783), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (774, 783), True, 'import torch.nn as nn\n'), ((1939, 1996), 'matplotlib.pyplot.plot', 'plt.plot', (['target_x[0]', 'pred_y[0]', '"""tab:blue"""'], {'linewidth': '(2)'}), "(target_x[0], pred_y[0], 'tab:blue', linewidth=2)\n", (1947,...
# -*- coding: utf-8 -*- from __future__ import absolute_import import numpy as np from ..utils.generic_utils import get_uid class Layer(): """Abstract base layer class.""" def __init__(self, **kwargs): self._trainable_weights = [] self._non_trainable_weights = [] self._grads = {} # (...
[ "numpy.zeros_like", "numpy.expand_dims" ]
[((1652, 1682), 'numpy.expand_dims', 'np.expand_dims', (['weight'], {'axis': '(0)'}), '(weight, axis=0)\n', (1666, 1682), True, 'import numpy as np\n'), ((1727, 1748), 'numpy.zeros_like', 'np.zeros_like', (['weight'], {}), '(weight)\n', (1740, 1748), True, 'import numpy as np\n'), ((2777, 2802), 'numpy.zeros_like', 'np...
# coding: utf-8 from django.test import TestCase from djutils.testrunner import TearDownTestCaseMixin from parkkeeper import models from parkkeeper import factories class BaseTaskTestCase(TearDownTestCaseMixin, TestCase): def tearDown(self): self.tearDownMongo() def test_get_task_model_monit(self):...
[ "parkkeeper.factories.MonitTask", "parkkeeper.models.BaseTask.get_task_model", "parkkeeper.factories.WorkTask" ]
[((342, 363), 'parkkeeper.factories.MonitTask', 'factories.MonitTask', ([], {}), '()\n', (361, 363), False, 'from parkkeeper import factories\n'), ((432, 473), 'parkkeeper.models.BaseTask.get_task_model', 'models.BaseTask.get_task_model', (['task_type'], {}), '(task_type)\n', (462, 473), False, 'from parkkeeper import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2017 <NAME> <<EMAIL>> from distutils.core import setup setup( name = 'sim-tree', packages = ['sim_tree'], # this must be the same as the name above install_requires = ['os', 'pandas', 'time', 'string'], version = '0.6', description = 'A module f...
[ "distutils.core.setup" ]
[((120, 548), 'distutils.core.setup', 'setup', ([], {'name': '"""sim-tree"""', 'packages': "['sim_tree']", 'install_requires': "['os', 'pandas', 'time', 'string']", 'version': '"""0.6"""', 'description': '"""A module for automating hierarchical simulation studies"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAI...
from django.http.response import JsonResponse from django.utils.translation import ugettext_lazy as _ from rest_framework import status from jwt_devices import views from jwt_devices.settings import api_settings class PermittedHeadersMiddleware(object): """ Middleware used to disallow sending the permanent_t...
[ "django.utils.translation.ugettext_lazy" ]
[((1074, 1132), 'django.utils.translation.ugettext_lazy', '_', (['"""Using the Permanent-Token header is disallowed for {}"""'], {}), "('Using the Permanent-Token header is disallowed for {}')\n", (1075, 1132), True, 'from django.utils.translation import ugettext_lazy as _\n')]
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [('reader', '0004_float_numbers')] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.CharField( auto_created=True, p...
[ "django.db.models.CharField", "django.db.models.ManyToManyField" ]
[((1029, 1085), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'blank': '(True)', 'to': '"""reader.Category"""'}), "(blank=True, to='reader.Category')\n", (1051, 1085), False, 'from django.db import migrations, models\n'), ((262, 351), 'django.db.models.CharField', 'models.CharField', ([], {'auto_c...
from Constants import CONST_IDX, LINR_IDX, KAPPA_IDX, CALPHA_IDX, SQRTPLUS_IDX, EXACT_CUBIC_CONSTANT, STANDARD_IDXS, CUBIC_EXACT_IDXS, QUADRATIC_FORWARD_EXACT_IDXS, NOTORIGIN_IDXS from LoewnerRun import LoewnerRun, ConstantLoewnerRun, LinearLoewnerRun, KappaLoewnerRun, CAlphaLoewnerRun, SqrtTPlusOneLoewnerRun class Lo...
[ "LoewnerRun.KappaLoewnerRun", "LoewnerRun.ConstantLoewnerRun", "LoewnerRun.LinearLoewnerRun", "LoewnerRun.CAlphaLoewnerRun", "LoewnerRun.LoewnerRun", "LoewnerRun.SqrtTPlusOneLoewnerRun" ]
[((2883, 3011), 'LoewnerRun.LoewnerRun', 'LoewnerRun', (['index', 'start_time', 'final_time', 'outer_points', 'inner_points', 'self.compile_modules', 'self.save_data', 'self.save_plot'], {}), '(index, start_time, final_time, outer_points, inner_points, self.\n compile_modules, self.save_data, self.save_plot)\n', (28...
""" Copyright 2010 <NAME>, <NAME>, and <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
[ "django.contrib.admin.autodiscover" ]
[((680, 700), 'django.contrib.admin.autodiscover', 'admin.autodiscover', ([], {}), '()\n', (698, 700), False, 'from django.contrib import admin\n')]
from serial import * import serial.tools.list_ports #import serial.tools.list_ports import jsonConfig as j import time #connected_devices=[""] def serialConnection(values,device): print("hi ") print("serialConnection()") print("values: {} , port: {}".format(values,device)) #c_number=getDev...
[ "jsonConfig.getBindings", "time.sleep" ]
[((496, 509), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (506, 509), False, 'import time\n'), ((759, 776), 'time.sleep', 'time.sleep', (['(0.001)'], {}), '(0.001)\n', (769, 776), False, 'import time\n'), ((633, 657), 'jsonConfig.getBindings', 'j.getBindings', (['i', 'values'], {}), '(i, values)\n', (646, 657),...
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
[ "twisted.internet.defer.returnValue", "buildbot.process.results.worst_status" ]
[((1829, 1854), 'twisted.internet.defer.returnValue', 'defer.returnValue', (['result'], {}), '(result)\n', (1846, 1854), False, 'from twisted.internet import defer\n'), ((1992, 2014), 'twisted.internet.defer.returnValue', 'defer.returnValue', (['res'], {}), '(res)\n', (2009, 2014), False, 'from twisted.internet import ...
from datetime import datetime extensions = [] templates_path = ["_templates"] source_suffix = ".rst" master_doc = "index" project = u"Opale" year = datetime.now().year copyright = u"%d <NAME> " % year exclude_patterns = ["_build"] html_theme = "opale" html_sidebars = { "**": [ "about.html", "na...
[ "datetime.datetime.now" ]
[((151, 165), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (163, 165), False, 'from datetime import datetime\n')]
# -*- coding: utf-8 -*- """ Created on Mon Aug 10 22:27:03 2020 @author: <NAME> """ import math import tqdm import torch import torch.nn as nn import pandas as pd import numpy as np import utils from net import DCRNNModel # import sys # sys.path.append("./xlwang_version") # from dcrnn_model import DCRNNModel """ H...
[ "tqdm.tqdm", "math.exp", "net.DCRNNModel", "math.ceil", "pandas.read_csv", "utils.get_adjacency_matrix", "utils.masked_mape_np", "torch.cuda.max_memory_allocated", "numpy.zeros", "torch.FloatTensor", "utils.load_dataset", "utils.masked_mae_loss", "utils.masked_mae_np", "torch.cuda.is_avail...
[((1085, 1149), 'pandas.read_csv', 'pd.read_csv', (['sensor_distance'], {'dtype': "{'from': 'str', 'to': 'str'}"}), "(sensor_distance, dtype={'from': 'str', 'to': 'str'})\n", (1096, 1149), True, 'import pandas as pd\n'), ((1202, 1253), 'utils.get_adjacency_matrix', 'utils.get_adjacency_matrix', (['distance_df', 'sensor...
""" Task request/response classes for the registration job (discovering, validating and storing metadata for a dataset) """ # Copyright 2021 The Funnel Rocket Maintainers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ...
[ "enum.auto", "dataclasses.dataclass" ]
[((1693, 1715), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (1702, 1715), False, 'from dataclasses import dataclass\n'), ((2130, 2152), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (2139, 2152), False, 'from dataclasses import dataclass\n'...
import numpy as np from rdkit.DataStructs.cDataStructs import ExplicitBitVect, SparseBitVect from scipy.sparse import issparse, csr_matrix from collections import defaultdict from rdkit import DataStructs from luna.util.exceptions import (BitsValueError, InvalidFingerprintType, IllegalArgumentError, FingerprintCountsE...
[ "scipy.sparse.issparse", "collections.defaultdict", "luna.util.exceptions.IllegalArgumentError", "luna.util.exceptions.InvalidFingerprintType", "numpy.unique", "luna.util.exceptions.BitsValueError", "numpy.intersect1d", "numpy.union1d", "numpy.log2", "numpy.asarray", "luna.util.exceptions.Finger...
[((390, 409), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (407, 409), False, 'import logging\n'), ((1543, 1577), 'numpy.asarray', 'np.asarray', (['indices'], {'dtype': 'np.long'}), '(indices, dtype=np.long)\n', (1553, 1577), True, 'import numpy as np\n'), ((1835, 1853), 'numpy.unique', 'np.unique', (['i...
from pages.driver import Driver from pages.login import LoginPage from pages.addNewDevice import AddNewDevice from pages.devicesvc import DeviceService from pages.appsvc import AppService from pages.scheduler import Scheduler from pages.notification import Notification from pages.config import Config import time if __...
[ "pages.login.LoginPage", "time.sleep" ]
[((445, 456), 'pages.login.LoginPage', 'LoginPage', ([], {}), '()\n', (454, 456), False, 'from pages.login import LoginPage\n'), ((477, 490), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (487, 490), False, 'import time\n'), ((910, 923), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (920, 923), False, 'impo...
import torch.optim as optim from sklearn.metrics import roc_auc_score, f1_score, jaccard_score from model_plus import createDeepLabv3Plus import sys print(sys.version, sys.platform, sys.executable) from trainer_plus import train_model import datahandler_plus import argparse import os import torch import numpy torch.cu...
[ "trainer_plus.train_model", "os.makedirs", "argparse.ArgumentParser", "datahandler_plus.get_dataloader_single_folder", "torch.load", "os.path.exists", "model_plus.createDeepLabv3Plus", "torch.nn.CrossEntropyLoss", "torch.FloatTensor", "numpy.array", "torch.cuda.empty_cache", "datahandler_plus....
[((312, 336), 'torch.cuda.empty_cache', 'torch.cuda.empty_cache', ([], {}), '()\n', (334, 336), False, 'import torch\n'), ((460, 485), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (483, 485), False, 'import argparse\n'), ((3450, 3557), 'trainer_plus.train_model', 'train_model', (['model', 'cr...
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from typing import TYPE_CHECKING, Tuple from feishu.exception import LarkInvalidArguments, OpenLarkException if TYPE_CHECKING: from feishu.api import OpenLark # https://open.feishu.cn/document/ukTMukTMukTM/uIzMx...
[ "feishu.exception.LarkInvalidArguments", "feishu.exception.OpenLarkException" ]
[((6357, 6443), 'feishu.exception.OpenLarkException', 'OpenLarkException', ([], {'msg': '"""[get_chat_id_between_user_bot] empty open_id and user_id"""'}), "(msg=\n '[get_chat_id_between_user_bot] empty open_id and user_id')\n", (6374, 6443), False, 'from feishu.exception import LarkInvalidArguments, OpenLarkExcepti...
""" ==================================== Linear algebra (:mod:`scipy.linalg`) ==================================== .. currentmodule:: scipy.linalg Linear algebra functions. .. seealso:: `numpy.linalg` for more linear algebra functions. Note that although `scipy.linalg` imports most of them, ident...
[ "numpy.dual.register_func", "numpy.testing.Tester" ]
[((6396, 6424), 'numpy.dual.register_func', 'register_func', (['"""pinv"""', 'pinv2'], {}), "('pinv', pinv2)\n", (6409, 6424), False, 'from numpy.dual import register_func\n'), ((6523, 6531), 'numpy.testing.Tester', 'Tester', ([], {}), '()\n', (6529, 6531), False, 'from numpy.testing import Tester\n'), ((6546, 6554), '...
from dependency_injector.providers import Singleton def singleton_provider(obj): def clb(): return obj return Singleton(clb)
[ "dependency_injector.providers.Singleton" ]
[((129, 143), 'dependency_injector.providers.Singleton', 'Singleton', (['clb'], {}), '(clb)\n', (138, 143), False, 'from dependency_injector.providers import Singleton\n')]
import math import itertools class Solution: def minimumIncompatibility(self, nums: List[int], k: int) -> int: n = len(nums) if k == n: return 0 dp = [[math.inf] * n for _ in range(1 << n)] nums.sort() for i in range(n): dp[1<<i][i] = 0 for m...
[ "itertools.combinations", "itertools.permutations" ]
[((478, 513), 'itertools.permutations', 'itertools.permutations', (['n_z_bits', '(2)'], {}), '(n_z_bits, 2)\n', (500, 513), False, 'import itertools\n'), ((636, 671), 'itertools.combinations', 'itertools.combinations', (['n_z_bits', '(2)'], {}), '(n_z_bits, 2)\n', (658, 671), False, 'import itertools\n')]
import sys from typing import List from unittest.mock import patch import pytest from poetry_pdf.cli import parse_cli from poetry_pdf.exceptions import InvalidCommand, InvalidSourcePath @pytest.mark.parametrize( "argv", [ ["poetry-pdf", "tests/fixtures/the_raven.txt"], [ "poetry-p...
[ "poetry_pdf.cli.parse_cli", "pytest.mark.parametrize", "pytest.raises", "unittest.mock.patch.object" ]
[((190, 422), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""argv"""', "[['poetry-pdf', 'tests/fixtures/the_raven.txt'], ['poetry-pdf',\n 'tests/fixtures/the_raven.txt', '--output-dir', '.'], ['poetry-pdf',\n 'tests/fixtures/the_raven.txt', '--author', '<NAME>']]"], {}), "('argv', [['poetry-pdf',\n ...
import sys import shutil import json import subprocess from typing import Union from pathlib import Path from jinja2 import Template class UserModel(): """Handles user-defined model described in python scripts. """ def __init__(self): self.parent = Path(__file__).resolve().parent self.dst...
[ "jinja2.Template", "json.dump", "json.load", "pathlib.Path", "shutil.copy", "sys.exit" ]
[((810, 840), 'shutil.copy', 'shutil.copy', (['src_abs', 'self.dst'], {}), '(src_abs, self.dst)\n', (821, 840), False, 'import shutil\n'), ((6137, 6148), 'jinja2.Template', 'Template', (['s'], {}), '(s)\n', (6145, 6148), False, 'from jinja2 import Template\n'), ((6497, 6510), 'jinja2.Template', 'Template', (['tmp'], {}...
# Generated by Django 3.2.7 on 2021-10-03 21:30 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
[ "django.db.models.URLField", "django.db.models.TextField", "django.db.migrations.swappable_dependency", "django.db.models.BigAutoField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.DateTimeField" ]
[((247, 304), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (278, 304), False, 'from django.db import migrations, models\n'), ((474, 570), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '...
from django.http import HttpResponse from rest_framework import permissions from CRUDFilters.views import CRUDFilterModelViewSet from .models import TestClass from .serializers import TestClassSerializer class TestClassViewset(CRUDFilterModelViewSet): serializer_class = TestClassSerializer crud_model = Test...
[ "django.http.HttpResponse" ]
[((440, 490), 'django.http.HttpResponse', 'HttpResponse', (['"""Everything\'s fine here"""'], {'status': '(200)'}), '("Everything\'s fine here", status=200)\n', (452, 490), False, 'from django.http import HttpResponse\n'), ((555, 605), 'django.http.HttpResponse', 'HttpResponse', (['"""Everything\'s fine here"""'], {'st...
import os from PIL import Image from models.model import model import argparse import numpy as np import tensorflow as tf import shutil def create(args): if args.pre_trained == 'facenet': from models.Face_recognition import FR_model FR = FR_model() Model = tf.keras.models.load_model(args.s...
[ "os.mkdir", "tensorflow.keras.models.load_model", "argparse.ArgumentParser", "numpy.asarray", "models.Face_recognition.FR_model", "PIL.Image.open", "shutil.move", "os.listdir" ]
[((373, 389), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (383, 389), False, 'import os\n'), ((1063, 1083), 'os.mkdir', 'os.mkdir', (['"""Face-AHQ"""'], {}), "('Face-AHQ')\n", (1071, 1083), False, 'import os\n'), ((1618, 1643), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1641, 1...
# -*- coding: utf-8 -*- """ The node registry is a place to list the relationships between node types and their views. Nodular does *not* provide a global instance of :class:`NodeRegistry`. Since the registry determines what is available in an app, registries should be constructed as app-level globals. """ from insp...
[ "collections.OrderedDict", "collections.defaultdict", "inspect.isclass", "werkzeug.routing.Map" ]
[((836, 849), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (847, 849), False, 'from collections import OrderedDict, defaultdict\n'), ((881, 897), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (892, 897), False, 'from collections import OrderedDict, defaultdict\n'), ((923, 940), 'col...
#!/usr/bin/env python # SPDX-FileCopyrightText: 2021 iteratec GmbH # # SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- import pytest from unittest.mock import MagicMock, Mock from unittest import TestCase from zapclient.configuration import ZapConfiguration class ZapSpiderHttpTests(TestCase): @py...
[ "zapclient.configuration.ZapConfiguration" ]
[((398, 490), 'zapclient.configuration.ZapConfiguration', 'ZapConfiguration', (['"""./tests/mocks/context-with-overlay/"""', '"""https://www.secureCodeBox.io/"""'], {}), "('./tests/mocks/context-with-overlay/',\n 'https://www.secureCodeBox.io/')\n", (414, 490), False, 'from zapclient.configuration import ZapConfigur...
# -*- coding: utf-8 -*- import sys import os UNITY_PATH = "/Applications/Unity/Hub/Editor/2019.4.18f1c1/Unity.app/Contents/MacOS/Unity" class Unity(object): # @staticmethod # def SwitchPlatorm() # @staticmethod # def GeneratorWrapCode(): # Unity.ExecuteScript("CSObjectWrapEditor.Generator", "ClearAll") # Un...
[ "os.system" ]
[((1087, 1140), 'os.system', 'os.system', (["('echo ' + cmd + ' >> ' + logFile + ' 2>&1')"], {}), "('echo ' + cmd + ' >> ' + logFile + ' 2>&1')\n", (1096, 1140), False, 'import os\n'), ((1135, 1178), 'os.system', 'os.system', (["(cmd + ' >> ' + logFile + ' 2>&1')"], {}), "(cmd + ' >> ' + logFile + ' 2>&1')\n", (1144, 1...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import six import re import operator from utool import util_inject print, rrr, profile = util_inject.inject2(__name__) def modify_tags(tags_list, direct_map=None, regex_map=None, regex_aug=None, ...
[ "utool.dict_hist", "utool.doctest_funcs", "utool.compress", "utool.ensure_iterable", "utool.take_column", "utool.flatten", "utool.setdiff", "utool.unique", "re.match", "six.text_type", "utool.filter_Nones", "utool.combinations", "utool.odict", "utool.build_alias_map", "utool.alias_tags",...
[((196, 225), 'utool.util_inject.inject2', 'util_inject.inject2', (['__name__'], {}), '(__name__)\n', (215, 225), False, 'from utool import util_inject\n'), ((489, 499), 'utool.odict', 'ut.odict', ([], {}), '()\n', (497, 499), True, 'import utool as ut\n'), ((728, 767), 'utool.alias_tags', 'ut.alias_tags', (['new_tags_...
import mcpi.minecraft as minecraft from flask import render_template from flask import Flask from flask import jsonify app = Flask(__name__) @app.route('/') def pyminemapIndex(): return render_template('index.html') @app.route('/list') def pyminemapList(): try: positionstexte = [] mc = minecra...
[ "mcpi.minecraft.Minecraft.create", "flask.jsonify", "flask.Flask", "flask.render_template" ]
[((125, 140), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (130, 140), False, 'from flask import Flask\n'), ((191, 220), 'flask.render_template', 'render_template', (['"""index.html"""'], {}), "('index.html')\n", (206, 220), False, 'from flask import render_template\n'), ((851, 878), 'flask.render_templa...
from __future__ import unicode_literals, print_function, division from collections import Counter from nltk.tokenize import TweetTokenizer import cPickle as cp import io import numpy as np PAD_TOKEN = 0 SOS_TOKEN = 1 EOS_TOKEN = 2 VOCAB_SIZE = 10000 class Lang(object): def __init__(self, name, lowercase=True,...
[ "nltk.tokenize.TweetTokenizer", "numpy.random.normal", "io.open", "collections.Counter", "numpy.concatenate" ]
[((3179, 3221), 'numpy.random.normal', 'np.random.normal', (['(0)', '(1)', '(1, embedding_dim)'], {}), '(0, 1, (1, embedding_dim))\n', (3195, 3221), True, 'import numpy as np\n'), ((3245, 3287), 'numpy.random.normal', 'np.random.normal', (['(0)', '(1)', '(1, embedding_dim)'], {}), '(0, 1, (1, embedding_dim))\n', (3261,...
# -*- coding: utf-8 -*- """ A program that carries out mini batch k-means clustering on Movielens datatset""" from __future__ import print_function, division, absolute_import, unicode_literals from decimal import * #other stuff we need to import import csv import numpy as np from sklearn.cluster import ...
[ "sklearn.cluster.MiniBatchKMeans", "numpy.zeros" ]
[((1958, 2003), 'numpy.zeros', 'np.zeros', (['(number_of_users, number_of_movies)'], {}), '((number_of_users, number_of_movies))\n', (1966, 2003), True, 'import numpy as np\n'), ((2991, 3020), 'sklearn.cluster.MiniBatchKMeans', 'MiniBatchKMeans', ([], {'n_clusters': 'K'}), '(n_clusters=K)\n', (3006, 3020), False, 'from...
from django.db import models class Sale(models.Model): created = models.DateTimeField() def __str__(self): return f'[{self.id}] {self.created:%Y-%m-%d}' class SaleWithDrilldown(Sale): """ We will use this model in the admin to illustrate the difference between date hierarchy with and wi...
[ "django.db.models.DateTimeField" ]
[((71, 93), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {}), '()\n', (91, 93), False, 'from django.db import models\n')]
import json # note: ujson fails this test due to float equality import copy import numpy as np import pytest from gym.spaces import Tuple, Box, Discrete, MultiDiscrete, MultiBinary, Dict @pytest.mark.parametrize( "space", [ Discrete(3), Discrete(5, start=-2), Box(low=0.0, high=np.in...
[ "gym.spaces.MultiBinary", "copy.deepcopy", "gym.spaces.Discrete", "copy.copy", "json.dumps", "gym.spaces.MultiDiscrete", "numpy.random.default_rng", "pytest.raises", "numpy.array", "gym.spaces.Box", "gym.spaces.Tuple", "gym.spaces.Dict" ]
[((2604, 2620), 'copy.copy', 'copy.copy', (['space'], {}), '(space)\n', (2613, 2620), False, 'import copy\n'), ((6518, 6550), 'gym.spaces.Box', 'Box', ([], {'low': '(0)', 'high': '(1)', 'shape': '(3, 3)'}), '(low=0, high=1, shape=(3, 3))\n', (6521, 6550), False, 'from gym.spaces import Tuple, Box, Discrete, MultiDiscre...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
[ "integration_tests.tests.utils.get_resource", "integration_tests.tests.utils.do_retries", "integration_tests.framework.riemann.reset_data_and_restart" ]
[((1029, 1061), 'integration_tests.framework.riemann.reset_data_and_restart', 'riemann.reset_data_and_restart', ([], {}), '()\n', (1059, 1061), False, 'from integration_tests.framework import riemann\n'), ((2621, 2642), 'integration_tests.tests.utils.do_retries', 'do_retries', (['assertion'], {}), '(assertion)\n', (263...
# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-09-02 07:59 from __future__ import unicode_literals from django.db import migrations import django.db.models.deletion from apps.noclook.models import DEFAULT_ROLEGROUP_NAME, DEFAULT_ROLE_KEY, DEFAULT_ROLES def init_default_roles(Role): # and then get ...
[ "django.db.migrations.RunPython", "apps.noclook.models.DEFAULT_ROLES.items" ]
[((393, 414), 'apps.noclook.models.DEFAULT_ROLES.items', 'DEFAULT_ROLES.items', ([], {}), '()\n', (412, 414), False, 'from apps.noclook.models import DEFAULT_ROLEGROUP_NAME, DEFAULT_ROLE_KEY, DEFAULT_ROLES\n'), ((1157, 1206), 'django.db.migrations.RunPython', 'migrations.RunPython', (['forwards_func', 'reverse_func'], ...
import numpy as np import tensorflow as tf from lib.crf import crf_inference from lib.CC_labeling_8 import CC_lab def single_generate_seed_step(params): """Implemented seeded region growing Parameters ---------- params : 3-tuple of numpy 4D arrays (tag) : numpy 4D array (size: B x 1 x 1 x C),...
[ "tensorflow.contrib.layers.xavier_initializer", "numpy.load", "tensorflow.reduce_sum", "numpy.sum", "numpy.argmax", "tensorflow.constant_initializer", "tensorflow.Variable", "tensorflow.nn.conv2d", "tensorflow.reduce_max", "lib.CC_labeling_8.CC_lab", "tensorflow.get_variable", "tensorflow.nn.r...
[((3106, 3133), 'numpy.expand_dims', 'np.expand_dims', (['cue'], {'axis': '(0)'}), '(cue, axis=0)\n', (3120, 3133), True, 'import numpy as np\n'), ((951, 983), 'numpy.argmax', 'np.argmax', (['existing_prob'], {'axis': '(2)'}), '(existing_prob, axis=2)\n', (960, 983), True, 'import numpy as np\n'), ((2213, 2232), 'numpy...
# -*- coding: utf-8 -*- """ Created on Tue Feb 19 13:46:46 2019 Description: Last update: Version: 1.0 Author: <NAME> (NREL) """ import pandas as pd class LoadConfig(object): def __init__(self, config_file): self.config_file = config_file def str_to_bool(self, s): if s == 'Tru...
[ "pandas.DataFrame" ]
[((542, 556), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (554, 556), True, 'import pandas as pd\n')]
import os import shutil from pathlib import PosixPath from tempfile import TemporaryDirectory, mkdtemp from urllib.error import URLError import pytest from jmanager.models.distribution import Architecture, Version, VersionType, Component from jmanager.utils.fetch import HTTPFetcher from test.globals import TEST_DISTR...
[ "jmanager.models.distribution.Version", "tempfile.TemporaryDirectory", "os.makedirs", "pytest.raises", "tempfile.mkdtemp", "pathlib.PosixPath", "shutil.rmtree" ]
[((508, 519), 'pathlib.PosixPath', 'PosixPath', ([], {}), '()\n', (517, 519), False, 'from pathlib import PosixPath\n'), ((568, 577), 'tempfile.mkdtemp', 'mkdtemp', ([], {}), '()\n', (575, 577), False, 'from tempfile import TemporaryDirectory, mkdtemp\n'), ((1032, 1079), 'shutil.rmtree', 'shutil.rmtree', (['self.tmp_di...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Sep 30 12:07:19 2018 @author: nn """ from collections import OrderedDict import os import cv2 from . import tf_metrics def get_logger(arc_type, logger_params): if arc_type == "sl": logger = SlLogger(**logger_params) elif arc_type == "ae": ...
[ "collections.OrderedDict", "os.path.isdir", "os.path.join", "os.makedirs" ]
[((904, 917), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (915, 917), False, 'from collections import OrderedDict\n'), ((2007, 2046), 'os.path.join', 'os.path.join', (['self.log_dir', 'self.sample'], {}), '(self.log_dir, self.sample)\n', (2019, 2046), False, 'import os\n'), ((2640, 2679), 'os.path.join'...
from base64 import b64encode import pytest from asgi_webdav.constants import DAVPath, DAVUser from asgi_webdav.config import update_config_from_obj, get_config from asgi_webdav.auth import DAVPassword, DAVPasswordType, DAVAuth from asgi_webdav.request import DAVRequest USERNAME = "username" PASSWORD = "password" HAS...
[ "asgi_webdav.config.get_config", "asgi_webdav.config.update_config_from_obj", "asgi_webdav.constants.DAVUser", "asgi_webdav.request.DAVRequest", "asgi_webdav.auth.DAVPassword", "asgi_webdav.constants.DAVPath" ]
[((695, 810), 'asgi_webdav.request.DAVRequest', 'DAVRequest', (["{'method': 'GET', 'headers': {b'authorization': b'placeholder'}, 'path': '/'}", 'fake_call', 'fake_call'], {}), "({'method': 'GET', 'headers': {b'authorization': b'placeholder'},\n 'path': '/'}, fake_call, fake_call)\n", (705, 810), False, 'from asgi_w...
import os import ndjson import json import time from options import TestOptions from framework import SketchModel from utils import load_data from writer import Writer import numpy as np from evalTool import * def run_eval(opt=None, model=None, loader=None, dataset='test', write_result=False): if opt is None: ...
[ "utils.load_data", "numpy.average", "ndjson.load", "options.TestOptions", "ndjson.dump", "framework.SketchModel" ]
[((1682, 1702), 'numpy.average', 'np.average', (['lossList'], {}), '(lossList)\n', (1692, 1702), True, 'import numpy as np\n'), ((1718, 1743), 'numpy.average', 'np.average', (['p_metric_list'], {}), '(p_metric_list)\n', (1728, 1743), True, 'import numpy as np\n'), ((1759, 1784), 'numpy.average', 'np.average', (['c_metr...
import sys import time import aiogram.types from aiogram import types, Dispatcher, Bot from aiogram.dispatcher import FSMContext sys.path.append('bot') from database.sess import get_users_by_link from database.sess import create_new_user, check_on_off, switch_on_off, check_parse_channels, check_channel, \ add_chann...
[ "sys.path.append", "database.sess.check_parse_channels", "python.States.StatesClasses.Adding.first.set", "database.sess.reemove_channels", "database.sess.add_channels", "database.sess.get_users_by_link", "time.sleep", "aiogram.Bot", "database.sess.switch_on_off", "database.sess.create_new_user", ...
[((129, 151), 'sys.path.append', 'sys.path.append', (['"""bot"""'], {}), "('bot')\n", (144, 151), False, 'import sys\n'), ((461, 478), 'aiogram.Bot', 'Bot', ([], {'token': 'bToken'}), '(token=bToken)\n', (464, 478), False, 'from aiogram import types, Dispatcher, Bot\n'), ((896, 967), 'database.sess.create_new_user', 'c...
""" Author: <NAME> (<EMAIL>) Date: May 07, 2020 """ from __future__ import print_function import torch import torch.nn as nn import numpy as np from itertools import combinations class SupConLoss(nn.Module): """Supervised Contrastive Learning: https://arxiv.org/pdf/2004.11362.pdf. It also supports the unsuper...
[ "numpy.triu", "torch.eye", "numpy.isnan", "torch.arange", "torch.device", "numpy.unique", "numpy.meshgrid", "torch.diag", "torch.exp", "torch.triu", "torch.unbind", "torch.matmul", "torch.log", "itertools.combinations", "torch.max", "torch.sum", "torch.ones_like", "torch.eq", "nu...
[((5136, 5159), 'itertools.combinations', 'combinations', (['nviews', '(2)'], {}), '(nviews, 2)\n', (5148, 5159), False, 'from itertools import combinations\n'), ((2896, 2947), 'torch.max', 'torch.max', (['anchor_dot_contrast'], {'dim': '(1)', 'keepdim': '(True)'}), '(anchor_dot_contrast, dim=1, keepdim=True)\n', (2905...
# -*- coding: utf-8 -*- from rete import Has, Filter, Rule from rete.common import WME, Bind from rete.network import Network def test_filter_compare(): net = Network() c0 = Has('spu:1', 'price', '$x') f0 = Filter('$x>100') f1 = Filter('$x<200') f2 = Filter('$x>200 and $x<400') f3 = Filter('$x...
[ "rete.Has", "rete.common.Bind", "rete.network.Network", "rete.common.WME", "rete.Rule", "rete.Filter" ]
[((165, 174), 'rete.network.Network', 'Network', ([], {}), '()\n', (172, 174), False, 'from rete.network import Network\n'), ((184, 211), 'rete.Has', 'Has', (['"""spu:1"""', '"""price"""', '"""$x"""'], {}), "('spu:1', 'price', '$x')\n", (187, 211), False, 'from rete import Has, Filter, Rule\n'), ((221, 237), 'rete.Filt...
from __future__ import print_function import torch import numpy as np from PIL import Image import os import time # Converts a Tensor into an image array (numpy) # |imtype|: the desired type of the converted numpy array def tensor2im(input_image, imtype=np.uint8): if isinstance(input_image, torch.Tensor): ...
[ "os.makedirs", "numpy.median", "numpy.std", "os.path.exists", "numpy.transpose", "numpy.clip", "time.time", "numpy.min", "numpy.max", "numpy.mean", "numpy.tile", "PIL.Image.fromarray", "torch.abs" ]
[((772, 804), 'numpy.clip', 'np.clip', (['image_numpy', '(0.0)', '(255.0)'], {}), '(image_numpy, 0.0, 255.0)\n', (779, 804), True, 'import numpy as np\n'), ((1206, 1234), 'PIL.Image.fromarray', 'Image.fromarray', (['image_numpy'], {}), '(image_numpy)\n', (1221, 1234), False, 'from PIL import Image\n'), ((647, 678), 'nu...
import subprocess import shutil import os import time from .interface import IsolateInterface class IsolateSimple(IsolateInterface): def isolate(self, files, command, parameters, envvariables, directories, allowmultiprocess, stdinfile, stdoutfile): if os.path.isdir("/tmp/gradertools/isolation/"): ...
[ "os.makedirs", "os.path.basename", "os.path.isdir", "time.perf_counter", "shutil.rmtree" ]
[((267, 311), 'os.path.isdir', 'os.path.isdir', (['"""/tmp/gradertools/isolation/"""'], {}), "('/tmp/gradertools/isolation/')\n", (280, 311), False, 'import os\n'), ((378, 420), 'os.makedirs', 'os.makedirs', (['"""/tmp/gradertools/isolation/"""'], {}), "('/tmp/gradertools/isolation/')\n", (389, 420), False, 'import os\...
import os, sys sys.path.append( os.path.join(os.path.dirname(os.path.abspath(__file__)),'tts_websocketserver','src') ) from tts_websocketserver.tts_server import run if __name__ == '__main__': run()
[ "os.path.abspath", "tts_websocketserver.tts_server.run" ]
[((203, 208), 'tts_websocketserver.tts_server.run', 'run', ([], {}), '()\n', (206, 208), False, 'from tts_websocketserver.tts_server import run\n'), ((62, 87), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (77, 87), False, 'import os, sys\n')]
import re import pytest import rita def load_rules(rules_path): with open(rules_path, "r") as f: return f.read() def spacy_engine(rules, **kwargs): spacy = pytest.importorskip("spacy", minversion="2.1") patterns = rita.compile_string(rules, **kwargs) nlp = spacy.load("en") ruler = spacy...
[ "pytest.importorskip", "rita.engine.translate_rust.load_lib", "pytest.skip", "rita.compile_string" ]
[((177, 223), 'pytest.importorskip', 'pytest.importorskip', (['"""spacy"""'], {'minversion': '"""2.1"""'}), "('spacy', minversion='2.1')\n", (196, 223), False, 'import pytest\n'), ((239, 275), 'rita.compile_string', 'rita.compile_string', (['rules'], {}), '(rules, **kwargs)\n', (258, 275), False, 'import rita\n'), ((62...
from dataclasses import dataclass from sailenv import Vector3 from sailenv.dynamics import Dynamic @dataclass class UniformMovementRandomBounce(Dynamic): start_direction: Vector3 = Vector3(0, 0, 1) speed: float = 5 angular_speed: float = 2 seed: int = 42 @staticmethod def get_type(): ...
[ "sailenv.Vector3" ]
[((188, 204), 'sailenv.Vector3', 'Vector3', (['(0)', '(0)', '(1)'], {}), '(0, 0, 1)\n', (195, 204), False, 'from sailenv import Vector3\n')]
# -*- coding: utf-8 -*- """Core download functions.""" # Imports --------------------------------------------------------------------- import datetime import json import numpy as np import pandas as pd import requests from . import constants from . import errors from . import settings # Functions -----------------...
[ "pandas.DataFrame", "requests.post", "datetime.datetime.strptime" ]
[((1134, 1181), 'requests.post', 'requests.post', (['url'], {'headers': 'headers', 'data': 'query'}), '(url, headers=headers, data=query)\n', (1147, 1181), False, 'import requests\n'), ((3046, 3086), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'rows', 'columns': 'headers'}), '(data=rows, columns=headers)\n', (305...
# -*- coding: utf-8 -*- """ Created on Mon Jan 14 09:10:29 2021 Author: <NAME> Functions for implementing the edge detection scheme first proposed by Zhang and Bao [1]. Modified for use with pywt's SWT2 transform and employs double thresholding similar to canny to improve noise resilience and revovery of wea...
[ "scipy.ndimage.generate_binary_structure", "numpy.abs", "numpy.sum", "numpy.empty", "numpy.ones", "numpy.clip", "pywt.swt2", "numpy.arange", "cv2.imshow", "numpy.prod", "numpy.max", "cv2.destroyAllWindows", "numpy.roll", "cv2.waitKey", "numpy.hypot", "pywt.Wavelet", "scipy.ndimage.bi...
[((2283, 2388), 'pywt.swt2', 'swt2', (['image'], {'wavelet': 'wavelet', 'level': 'max_level', 'start_level': 'start_level', 'norm': '(False)', 'trim_approx': '(True)'}), '(image, wavelet=wavelet, level=max_level, start_level=start_level, norm\n =False, trim_approx=True)\n', (2287, 2388), False, 'from pywt import swt...
from flask import ( Blueprint, flash, g, redirect, render_template, request, url_for ) from werkzeug.exceptions import abort from flask_login import login_required, current_user from flaskr.models import Post, db, PostComment, User from flaskr import csrf blog = Blueprint('blog', __name__) @blog.route('/') def i...
[ "flaskr.models.Post.query.order_by", "flask.flash", "flaskr.models.db.session.commit", "flask.Blueprint", "flask.redirect", "flaskr.models.Post", "flask_login.current_user.like_post", "flaskr.models.PostComment", "flaskr.models.Post.query.get", "flask.url_for", "flask_login.current_user.unlike_p...
[((269, 296), 'flask.Blueprint', 'Blueprint', (['"""blog"""', '__name__'], {}), "('blog', __name__)\n", (278, 296), False, 'from flask import Blueprint, flash, g, redirect, render_template, request, url_for\n'), ((391, 463), 'flask.render_template', 'render_template', (['"""blog/index.html"""'], {'posts': 'posts', 'get...
from pyvmodule.develope import * from pyvmodule.tools.modules.sram.dual import SRamR,SRamW from pyvmodule.tools.modules.fifo import Fifo from .common import AxiComponent,update_data_burst_addr,compute_address class Axi2RamR(SRamR): class FifoAR(Fifo): def update_data_araddr(self,field): return u...
[ "pyvmodule.tools.modules.sram.dual.SRamR.__init__", "pyvmodule.tools.modules.sram.dual.SRamW.__init__", "pyvmodule.tools.modules.fifo.Fifo" ]
[((420, 495), 'pyvmodule.tools.modules.sram.dual.SRamR.__init__', 'SRamR.__init__', (['self'], {'awidth': 'axi.awidth', 'bwidth': 'axi.bwidth', 'io': 'io'}), '(self, awidth=axi.awidth, bwidth=axi.bwidth, io=io, **kwargs)\n', (434, 495), False, 'from pyvmodule.tools.modules.sram.dual import SRamR, SRamW\n'), ((1970, 204...
from typing import Dict, Iterable, List, Optional, Union import attr from attr.validators import instance_of from ics.component import Component from ics.event import Event from ics.grammar.parse import Container, calendar_string_to_containers from ics.parsers.icalendar_parser import CalendarParser from ics.serialize...
[ "attr.validators.instance_of", "ics.grammar.parse.calendar_string_to_containers", "attr.ib", "ics.timeline.Timeline" ]
[((703, 724), 'attr.ib', 'attr.ib', ([], {'default': 'None'}), '(default=None)\n', (710, 724), False, 'import attr\n'), ((753, 774), 'attr.ib', 'attr.ib', ([], {'default': 'None'}), '(default=None)\n', (760, 774), False, 'import attr\n'), ((819, 840), 'attr.ib', 'attr.ib', ([], {'factory': 'dict'}), '(factory=dict)\n',...
from unittest import TestCase from freezegun import freeze_time from secret.utils import create_secret class Utils(TestCase): @freeze_time('2019-03-12 12:00:00') def test_create_secret_key(self): secret = create_secret() self.assertEqual(secret, 'd3a4646728a9de9a74d8fc4c41966a42')
[ "secret.utils.create_secret", "freezegun.freeze_time" ]
[((135, 169), 'freezegun.freeze_time', 'freeze_time', (['"""2019-03-12 12:00:00"""'], {}), "('2019-03-12 12:00:00')\n", (146, 169), False, 'from freezegun import freeze_time\n'), ((225, 240), 'secret.utils.create_secret', 'create_secret', ([], {}), '()\n', (238, 240), False, 'from secret.utils import create_secret\n')]
import unittest from typing import List import cadquery as cq from cq_cam.utils import utils class ProjectFaceTest(unittest.TestCase): def setUp(self): pass def test_face_with_hole(self): # This should create a projected face that is 2x4 (XY) box = ( cq.Workplane('XZ') ...
[ "cadquery.Workplane", "cq_cam.utils.utils.project_face", "cadquery.Vector" ]
[((968, 1006), 'cq_cam.utils.utils.project_face', 'utils.project_face', (['face_wp.objects[0]'], {}), '(face_wp.objects[0])\n', (986, 1006), False, 'from cq_cam.utils import utils\n'), ((737, 762), 'cadquery.Vector', 'cq.Vector', (['(0.0)', '(-1.0)', '(0.0)'], {}), '(0.0, -1.0, 0.0)\n', (746, 762), True, 'import cadque...
# -*- coding: utf-8 -*- """Test gui.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ from pytest import raises from ..qt import Qt, QApplication, QWidget, QMessageBox from ..gui import (GUI, ...
[ "phy.utils._color._random_color", "matplotlib.pyplot.Figure", "pytest.raises", "phy.utils.Bunch", "vispy.app.Canvas" ]
[((812, 824), 'vispy.app.Canvas', 'app.Canvas', ([], {}), '()\n', (822, 824), False, 'from vispy import app\n'), ((839, 854), 'phy.utils._color._random_color', '_random_color', ([], {}), '()\n', (852, 854), False, 'from phy.utils._color import _random_color\n'), ((4447, 4468), 'phy.utils.Bunch', 'Bunch', ([], {'name': ...
import os import sys from collections import OrderedDict from absl import logging import torch import torch.nn.functional as F import torch.optim as optim import torchvision.transforms.functional as TF import pytorch_lightning as pl import e2cnn.gspaces import e2cnn.nn from .base import VariationalAutoEncoderModule fro...
[ "torch.ones_like", "torch.ones", "torch.nn.Unflatten", "torch.zeros_like", "absl.logging.debug", "torch.nn.functional.mse_loss", "torch.zeros", "torch.exp", "torch.chunk", "elm.nn.GConvTransposeNN", "elm.nn.MLP", "elm.nn.GConvNN", "torch.nn.Flatten" ]
[((1296, 1353), 'absl.logging.debug', 'logging.debug', (['"""-------- GConv VAE ---------"""'], {}), "('-------- GConv VAE ---------')\n", (1309, 1353), False, 'from absl import logging\n'), ((1358, 1413), 'absl.logging.debug', 'logging.debug', (['"""-------- Trainable Variables ---------"""'], ...
from ncbi.ncbi_taxonomy_parser import TaxonomyParser, Taxonomy from common.database import * from common.utils import get_data_dir import os # default strain for their species for organism searching LMDB_SPECIES_MAPPING_STRAIN = ['367830','511145', '272563', '208964', '559292'] DATA_SOURCE = 'NCBI Taxonomy' def write...
[ "ncbi.ncbi_taxonomy_parser.TaxonomyParser", "os.path.join", "common.utils.get_data_dir" ]
[((1163, 1187), 'ncbi.ncbi_taxonomy_parser.TaxonomyParser', 'TaxonomyParser', (['base_dir'], {}), '(base_dir)\n', (1177, 1187), False, 'from ncbi.ncbi_taxonomy_parser import TaxonomyParser, Taxonomy\n'), ((1235, 1290), 'os.path.join', 'os.path.join', (['parser.output_dir', '"""species_for_LMDB.tsv"""'], {}), "(parser.o...
# -*- coding: utf-8 -*- # @Time : 2020/11/15 13:49 # @Author : <NAME> # @FileName: parse_uniprot_header.py # @Usage: # @Note: # @E-mail: <EMAIL> import pandas as pd import re class UniprotParse: def __init__(self, _input_fasta): self.input = _input_fasta self.output = None def parse(self): ...
[ "pandas.DataFrame", "argparse.ArgumentParser", "pandas.merge", "re.match", "pandas.read_table" ]
[((1221, 1362), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""This is the script to get Uniprot fasta header informationand use it intrepret BLAST results"""'}), "(description=\n 'This is the script to get Uniprot fasta header informationand use it intrepret BLAST results'\n )\n",...
"""add site airtable Revision ID: da6f10c8ebf4 Revises: 9<PASSWORD>e<PASSWORD> Create Date: 2019-11-29 07:48:18.074193 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "da6f10c8ebf4" down_revision = "aaae4ae18288" branch_labels = None depends_on = None def upg...
[ "sqlalchemy.String", "alembic.op.drop_column", "sqlalchemy.Column" ]
[((697, 734), 'alembic.op.drop_column', 'op.drop_column', (['"""Site"""', '"""airtable_id"""'], {}), "('Site', 'airtable_id')\n", (711, 734), False, 'from alembic import op\n'), ((775, 807), 'sqlalchemy.Column', 'sa.Column', (['"""site_id"""', 'sa.Integer'], {}), "('site_id', sa.Integer)\n", (784, 807), True, 'import s...
import pytest import numpy as np import xarray as xr import dask.array as da from xrspatial import curvature from xrspatial.utils import doesnt_have_cuda from xrspatial.tests.general_checks import general_output_checks elevation = np.asarray([ [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], ...
[ "xrspatial.utils.doesnt_have_cuda", "cupy.asarray", "numpy.asarray", "xrspatial.tests.general_checks.general_output_checks", "numpy.array", "xarray.DataArray", "dask.array.from_array", "xrspatial.curvature" ]
[((248, 756), 'numpy.asarray', 'np.asarray', (['[[np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [1584.8767, 1584.8767, \n 1585.0546, 1585.2324, 1585.2324, 1585.2324], [1585.0546, 1585.0546, \n 1585.2324, 1585.588, 1585.588, 1585.588], [1585.2324, 1585.4102, \n 1585.588, 1585.588, 1585.588, 1585.588], [1585....
# Copyright 2016 Recorded Future, 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...
[ "hmac.new", "email.Utils.formatdate" ]
[((2402, 2426), 'email.Utils.formatdate', 'email.Utils.formatdate', ([], {}), '()\n', (2424, 2426), False, 'import email\n'), ((2802, 2851), 'hmac.new', 'hmac.new', (['self.userkey', 'hash_text', 'hashlib.sha256'], {}), '(self.userkey, hash_text, hashlib.sha256)\n', (2810, 2851), False, 'import hmac\n')]
#!/usr/bin/env python3 """ This script will run all jupyter notebooks in order to test for errors. """ import sys import os import nbformat from nbconvert.preprocessors import ExecutePreprocessor if os.path.dirname(sys.argv[0]) != '': os.chdir(os.path.dirname(sys.argv[0])) notebooks = ('grids-and-coefficients.ipy...
[ "nbformat.read", "nbconvert.preprocessors.ExecutePreprocessor", "os.path.dirname" ]
[((200, 228), 'os.path.dirname', 'os.path.dirname', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (215, 228), False, 'import os\n'), ((249, 277), 'os.path.dirname', 'os.path.dirname', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (264, 277), False, 'import os\n'), ((991, 1021), 'nbformat.read', 'nbformat.read', (['f'], {'as_ve...
import unittest import sys sys.path.append('/pEigen/src/peigen') import libpeigen as peigen class DenseFactorizationTest(unittest.TestCase): def setUp(self): self.rows = 1000 self.cols = 1000 self.dense_matrix = peigen.denseMatrixDouble(self.rows, self.cols) self.dense_matr...
[ "sys.path.append", "unittest.main", "libpeigen.denseDecomposition", "libpeigen.denseMatrixDouble" ]
[((27, 64), 'sys.path.append', 'sys.path.append', (['"""/pEigen/src/peigen"""'], {}), "('/pEigen/src/peigen')\n", (42, 64), False, 'import sys\n'), ((1253, 1268), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1266, 1268), False, 'import unittest\n'), ((250, 296), 'libpeigen.denseMatrixDouble', 'peigen.denseMatri...
from typing import Optional from prompt_toolkit import PromptSession from prompt_toolkit import print_formatted_text as print_ from efb.validator import YesNoValidator SESSION = PromptSession() def make_decision(question: str, default: Optional[bool] = None) -> bool: default_string = f'(default {"y" if default...
[ "efb.validator.YesNoValidator", "prompt_toolkit.print_formatted_text", "prompt_toolkit.PromptSession" ]
[((181, 196), 'prompt_toolkit.PromptSession', 'PromptSession', ([], {}), '()\n', (194, 196), False, 'from prompt_toolkit import PromptSession\n'), ((664, 725), 'prompt_toolkit.print_formatted_text', 'print_', (['f"""Please state your decision as y or n (not {answer}"""'], {}), "(f'Please state your decision as y or n (...