code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
from django.shortcuts import render # Create your views here. from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.decorators import login_required @login_required def index(request): context = { "user": request.user } return render(request, "viewer/c...
[ "django.shortcuts.render" ]
[((295, 356), 'django.shortcuts.render', 'render', (['request', '"""viewer/contents/list.html"""'], {'context': 'context'}), "(request, 'viewer/contents/list.html', context=context)\n", (301, 356), False, 'from django.shortcuts import render\n')]
# Generated by Django 2.2.1 on 2019-05-13 12:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('events', '0003_remove_event_subscriber'), ] operations = [ migrations.RenameField( model_name='event', old_name='finished_da...
[ "django.db.migrations.RenameField" ]
[((231, 328), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""event"""', 'old_name': '"""finished_date"""', 'new_name': '"""starter_date"""'}), "(model_name='event', old_name='finished_date',\n new_name='starter_date')\n", (253, 328), False, 'from django.db import migrations\n')...
#!/usr/bin/env python3 import warnings warnings.filterwarnings("ignore") import sys import matplotlib import numpy as np import random import itertools import socket sys.path.append('./src') sys.path.append('./src/data_loader') sys.path.append('./src/algorithms') sys.path.append('./src/helper') sys.path.append('./s...
[ "sys.path.append", "warnings.filterwarnings" ]
[((40, 73), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (63, 73), False, 'import warnings\n'), ((170, 194), 'sys.path.append', 'sys.path.append', (['"""./src"""'], {}), "('./src')\n", (185, 194), False, 'import sys\n'), ((195, 231), 'sys.path.append', 'sys.path.append',...
from typing import Union, Tuple import torch from torch import Tensor import torch.nn.functional as F from torch.nn import Sequential, Linear, BatchNorm1d, PReLU import torch_geometric from torch_geometric.typing import PairTensor, Adj, OptTensor, Size from torch_geometric.nn.conv import MessagePassing from tor...
[ "torch.nn.PReLU", "torch.ones", "torch.nn.ModuleList", "torch.nn.BatchNorm1d", "torch.nn.functional.dropout", "torch.nn.Linear" ]
[((2324, 2345), 'torch.nn.ModuleList', 'torch.nn.ModuleList', ([], {}), '()\n', (2343, 2345), False, 'import torch\n'), ((2370, 2391), 'torch.nn.ModuleList', 'torch.nn.ModuleList', ([], {}), '()\n', (2389, 2391), False, 'import torch\n'), ((4453, 4512), 'torch.nn.functional.dropout', 'F.dropout', (['out'], {'p': 'self....
from pyspark import SparkConf, SparkContext def load_movie_names(): movieNames = {} skip_first = True with open("ml-latest-small/movies.csv") as f: for line in f: if skip_first: skip_first = False continue fields = line.split(",") ...
[ "pyspark.SparkContext", "pyspark.SparkConf" ]
[((2396, 2419), 'pyspark.SparkContext', 'SparkContext', ([], {'conf': 'conf'}), '(conf=conf)\n', (2408, 2419), False, 'from pyspark import SparkConf, SparkContext\n'), ((2326, 2337), 'pyspark.SparkConf', 'SparkConf', ([], {}), '()\n', (2335, 2337), False, 'from pyspark import SparkConf, SparkContext\n')]
#!/usr/bin/env python3 from pathlib import Path import ee import io from googleapiclient.http import MediaIoBaseDownload from apiclient import discovery import logging logging.getLogger("googleapiclient.discovery_cache").setLevel(logging.ERROR) class gdrive(object): def __init__(self): self.initialize...
[ "apiclient.discovery.build", "io.BytesIO", "googleapiclient.http.MediaIoBaseDownload", "ee.Credentials", "pathlib.Path", "ee.Initialize", "logging.getLogger" ]
[((171, 223), 'logging.getLogger', 'logging.getLogger', (['"""googleapiclient.discovery_cache"""'], {}), "('googleapiclient.discovery_cache')\n", (188, 223), False, 'import logging\n'), ((323, 338), 'ee.Initialize', 'ee.Initialize', ([], {}), '()\n', (336, 338), False, 'import ee\n'), ((366, 382), 'ee.Credentials', 'ee...
''' Created on 2017年10月20日 天天美食 @author: dell ''' from scrapy import Spider from scrapy.http import Request from ipproxytool.items import FoodBookItem from scrapy import Selector import re class TtMeiShiBookSpider(Spider): '''爬取菜谱''' name = 'tt_mei_shi_book' download_delay = 0.5 start_urls = [ ...
[ "ipproxytool.items.FoodBookItem", "scrapy.Selector", "scrapy.http.Request", "re.sub" ]
[((1468, 1484), 'scrapy.Selector', 'Selector', ([], {'text': 'i'}), '(text=i)\n', (1476, 1484), False, 'from scrapy import Selector\n'), ((1504, 1518), 'ipproxytool.items.FoodBookItem', 'FoodBookItem', ([], {}), '()\n', (1516, 1518), False, 'from ipproxytool.items import FoodBookItem\n'), ((2024, 2130), 'scrapy.http.Re...
#!/usr/bin/python # This scripts loads a pretrained model and a input TEST file (with correct tags) in CoNLL format (each line a token, sentences separated by an empty line). # The input sentences are passed to the model for tagging. Prints the tokens, the correct tags, and the predicted tags in a CoNLL format to stdou...
[ "util.preprocessing.addCharInformation", "pandas.DataFrame", "util.preprocessing.createMatrices", "util.preprocessing.addCasingInformation", "util.conlleval.evaluate", "sklearn.metrics.confusion_matrix", "neuralnets.BiLSTM.BiLSTM.loadModel", "pandas.set_option", "util.preprocessing.readCoNLL" ]
[((936, 970), 'util.preprocessing.readCoNLL', 'readCoNLL', (['inputPath', 'inputColumns'], {}), '(inputPath, inputColumns)\n', (945, 970), False, 'from util.preprocessing import readCoNLL, createMatrices, addCharInformation, addCasingInformation\n'), ((971, 1000), 'util.preprocessing.addCharInformation', 'addCharInform...
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
[ "apache.aurora.executor.common.executor_timeout.ExecutorTimeout", "apache.aurora.executor.common.resource_manager.ResourceManagerProvider", "apache.aurora.executor.aurora_executor.AuroraExecutor", "os.path.join", "os.path.abspath", "pkg_resources.resource_stream", "twitter.common.log.options.LogOptions....
[((1795, 1831), 'os.environ.get', 'os.environ.get', (['"""MESOS_SANDBOX"""', '"""."""'], {}), "('MESOS_SANDBOX', '.')\n", (1809, 1831), False, 'import os\n'), ((1833, 1858), 'twitter.common.app.configure', 'app.configure', ([], {'debug': '(True)'}), '(debug=True)\n', (1846, 1858), False, 'from twitter.common import app...
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class PhotologueConfig(AppConfig): name = 'photologue' verbose_name = _('Работа с изображениями')
[ "django.utils.translation.gettext_lazy" ]
[((169, 196), 'django.utils.translation.gettext_lazy', '_', (['"""Работа с изображениями"""'], {}), "('Работа с изображениями')\n", (170, 196), True, 'from django.utils.translation import gettext_lazy as _\n')]
from datetime import datetime, timedelta from django.core.management.base import BaseCommand from django.core.management.base import CommandError from django.db.models import F from experiments.models import Experiment, ExperimentHistory from random import randrange class Command(BaseCommand): help = 'Creates his...
[ "experiments.models.ExperimentHistory.objects.filter", "experiments.models.ExperimentHistory.objects.get_or_create", "django.db.models.F", "datetime.timedelta", "random.randrange", "datetime.datetime.now", "experiments.models.Experiment.objects.get" ]
[((2184, 2217), 'experiments.models.Experiment.objects.get', 'Experiment.objects.get', ([], {'slug': 'slug'}), '(slug=slug)\n', (2206, 2217), False, 'from experiments.models import Experiment, ExperimentHistory\n'), ((2656, 2711), 'experiments.models.ExperimentHistory.objects.filter', 'ExperimentHistory.objects.filter'...
import binascii import pytest from aioxrpy import decimals, serializer from aioxrpy.definitions import RippleTransactionType, RippleTransactionFlags from aioxrpy.keys import RippleKey from aioxrpy.rpc import RippleJsonRpc @pytest.fixture def master(): # Master account from genesis ledger # https://xrpl.org/...
[ "aioxrpy.rpc.RippleJsonRpc", "aioxrpy.decimals.xrp_to_drops", "aioxrpy.keys.RippleKey", "aioxrpy.serializer.serialize", "aioxrpy.serializer.deserialize" ]
[((383, 413), 'aioxrpy.keys.RippleKey', 'RippleKey', ([], {'private_key': '"""<KEY>"""'}), "(private_key='<KEY>')\n", (392, 413), False, 'from aioxrpy.keys import RippleKey\n'), ((551, 589), 'aioxrpy.rpc.RippleJsonRpc', 'RippleJsonRpc', (['"""http://localhost:5005"""'], {}), "('http://localhost:5005')\n", (564, 589), F...
from dataclasses import dataclass, field from typing import Dict, List, Optional import pandas as pd @dataclass class Individualization(object): """ Individualize a mechanistic model by incorporating gene expression levels. Attributes ---------- parameters : List[str] List of model param...
[ "dataclasses.field", "pandas.read_csv" ]
[((3773, 3792), 'dataclasses.field', 'field', ([], {'default': 'None'}), '(default=None)\n', (3778, 3792), False, 'from dataclasses import dataclass, field\n'), ((3811, 3842), 'dataclasses.field', 'field', ([], {'default': '"""w_"""', 'init': '(False)'}), "(default='w_', init=False)\n", (3816, 3842), False, 'from datac...
# Copyright (c) 2021 Graphcore Ltd. All rights reserved. import popart.ir as pir import popart.ir.ops as ops import popart._internal.ir as _ir import popart from utils import contains_op_of_type import numpy as np from numpy.testing import assert_array_equal import pytest # `import test_util` requires adding to sys.pa...
[ "popart.ir.Ir", "popart.ir.ops.host_store", "numpy.testing.assert_array_equal", "utils.contains_op_of_type", "popart.AnchorReturnType", "test_util.create_test_device", "pytest.raises", "numpy.arange", "popart.PyStepIO", "popart.ir.d2h_stream", "pathlib.Path", "pytest.mark.parametrize", "popa...
[((647, 696), 'popart.ir.d2h_stream', 'pir.d2h_stream', (['y.shape', 'y.dtype'], {'name': '"""y_stream"""'}), "(y.shape, y.dtype, name='y_stream')\n", (661, 696), True, 'import popart.ir as pir\n'), ((701, 725), 'popart.ir.ops.host_store', 'ops.host_store', (['y_d2h', 'y'], {}), '(y_d2h, y)\n', (715, 725), True, 'impor...
import torch import torch.distributed.deprecated as dist import model import time import sys def run(): modell = model.CNN() # modell = model.AlexNet() size = dist.get_world_size() rank = dist.get_rank() group_list = [] for i in range(size): group_list.append(i) group = dist.new_...
[ "torch.distributed.deprecated.get_world_size", "torch.distributed.deprecated.broadcast", "model.CNN", "torch.zeros_like", "torch.distributed.deprecated.new_group", "torch.distributed.deprecated.get_rank", "torch.distributed.deprecated.reduce", "sys.exit", "torch.distributed.deprecated.init_process_g...
[((119, 130), 'model.CNN', 'model.CNN', ([], {}), '()\n', (128, 130), False, 'import model\n'), ((174, 195), 'torch.distributed.deprecated.get_world_size', 'dist.get_world_size', ([], {}), '()\n', (193, 195), True, 'import torch.distributed.deprecated as dist\n'), ((207, 222), 'torch.distributed.deprecated.get_rank', '...
#! /usr/bin/env python import os import cv2 import argparse import numpy as np from face_detection import face_detection from face_points_detection import face_points_detection from face_swap import warp_image_2d, warp_image_3d, mask_from_points, apply_mask, correct_colours, transformation_from_points def select_fa...
[ "face_swap.mask_from_points", "argparse.ArgumentParser", "numpy.ones", "face_detection.face_detection", "numpy.mean", "cv2.erode", "cv2.imshow", "cv2.seamlessClone", "cv2.imwrite", "os.path.dirname", "numpy.max", "cv2.setMouseCallback", "cv2.boundingRect", "cv2.destroyAllWindows", "face_...
[((368, 386), 'face_detection.face_detection', 'face_detection', (['im'], {}), '(im)\n', (382, 386), False, 'from face_detection import face_detection\n'), ((1443, 1460), 'numpy.min', 'np.min', (['points', '(0)'], {}), '(points, 0)\n', (1449, 1460), True, 'import numpy as np\n'), ((1481, 1498), 'numpy.max', 'np.max', (...
""" wxyz top-level automation this should be executed from within an environment created from the .github/locks/conda.*.lock appropriate for your platform. See CONTRIBUTING.md. """ import json import os # pylint: disable=expression-not-assigned,W0511,too-many-lines import shutil import subprocess import time ...
[ "_scripts._paths.ALL_SPELL_DOCS", "_scripts._paths.LINT_GROUPS.items", "_scripts._paths.LICENSE.read_text", "_scripts._paths.MANIFEST_TEMPLATE.render", "json.dumps", "_scripts._paths.WHEELS.values", "shutil.rmtree", "_scripts._paths.TS_PACKAGE_CONTENT.values", "_scripts._paths.TS_README_TMPL.render"...
[((1491, 1511), 'doit.create_after', 'create_after', (['"""docs"""'], {}), "('docs')\n", (1503, 1511), False, 'from doit import create_after\n'), ((25113, 25137), 'shutil.which', 'shutil.which', (['"""hunspell"""'], {}), "('hunspell')\n", (25125, 25137), False, 'import shutil\n'), ((25145, 25165), 'doit.create_after', ...
"""Module that exposes local file system calls as an RPC service.""" import os import os.path import stat from typing import List, Optional from outrun.filesystem.common import Attributes class LocalFileSystemService: """RPC service that exposes local file system operations.""" # # File operations ...
[ "os.mkdir", "os.unlink", "os.fsync", "os.lseek", "os.statvfs", "os.close", "os.link", "os.utime", "os.fdatasync", "os.open", "os.chmod", "os.mknod", "os.stat", "os.rename", "os.pwrite", "os.chown", "os.pread", "os.mkfifo", "os.rmdir", "os.listdir", "os.readlink", "os.dup", ...
[((400, 420), 'os.open', 'os.open', (['path', 'flags'], {}), '(path, flags)\n', (407, 420), False, 'import os\n'), ((512, 538), 'os.open', 'os.open', (['path', 'flags', 'mode'], {}), '(path, flags, mode)\n', (519, 538), False, 'import os\n'), ((629, 655), 'os.pread', 'os.pread', (['fh', 'size', 'offset'], {}), '(fh, si...
import os import time import glob import numpy import pandas import pytest # convert all numpy warnings into errors so they can be detected in tests numpy.seterr(all='raise') @pytest.fixture(scope='session') def tests_path(): return os.path.abspath(os.path.dirname(__file__)) @pytest.fixture(s...
[ "os.remove", "numpy.seterr", "pandas.read_csv", "os.path.dirname", "numpy.allclose", "pytest.fixture", "time.sleep", "os.path.isfile", "glob.glob", "os.path.join" ]
[((160, 185), 'numpy.seterr', 'numpy.seterr', ([], {'all': '"""raise"""'}), "(all='raise')\n", (172, 185), False, 'import numpy\n'), ((192, 223), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (206, 223), False, 'import pytest\n'), ((304, 335), 'pytest.fixture', 'pytest.fix...
# -*- coding: utf-8 -*- """ FED3 Viz: A tkinter program for visualizing FED3 Data @author: https://github.com/earnestt1234 """ #try to disable warning import warnings import matplotlib.cbook warnings.filterwarnings("ignore",category=matplotlib.cbook.mplDeprecation) import datetime as dt import emoji import matplotlib...
[ "getdata.getdata.average_plot_onstart", "tkinter.ttk.Progressbar", "getdata.getdata.grouped_meal_size_histogram", "plots.plots.heatmap_chronogram", "os.path.dirname", "plots.plots.date_filter_okay", "tkinter.ttk.Frame", "fed_inspect.fed_inspect.get_arguments_affecting_settings", "pandas.isna", "tk...
[((192, 267), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'matplotlib.cbook.mplDeprecation'}), "('ignore', category=matplotlib.cbook.mplDeprecation)\n", (215, 267), False, 'import warnings\n'), ((172000, 172016), 'matplotlib.pyplot.close', 'plt.close', (['"""all"""'], {}), "('a...
import pandas as pd import os import functools from utils.parse_csv_to_df import parse_cases from sqlalchemy import create_engine def import_tables_from_csv(): print("Importing time series csv into database...") """ Imports time series covid files into current db""" # find latest file in COVID-19 folder ...
[ "pandas.merge", "utils.parse_csv_to_df.parse_cases", "os.getenv" ]
[((556, 617), 'os.getenv', 'os.getenv', (['"""SQLALCHEMY_DATABASE_URI"""', '"""sqlite:///api/site.db"""'], {}), "('SQLALCHEMY_DATABASE_URI', 'sqlite:///api/site.db')\n", (565, 617), False, 'import os\n'), ((1044, 1067), 'utils.parse_csv_to_df.parse_cases', 'parse_cases', (['f[0]', 'f[1]'], {}), '(f[0], f[1])\n', (1055,...
import unittest from pandas import DataFrame from hockeydata import get_play_by_plays from hockeydata.scrape.scrape import game_html_pbp, get_players import hockeydata.scrape.html_pbp as html_pbp class TestAPI(unittest.TestCase): @classmethod def setUpClass(cls): pass #TODO currently the tests are ...
[ "unittest.main", "hockeydata.scrape.scrape.get_players", "hockeydata.scrape.html_pbp.get_event_player_1", "hockeydata.scrape.html_pbp.get_event_player_2", "hockeydata.scrape.html_pbp.get_event_player_3", "hockeydata.get_play_by_plays" ]
[((8877, 8892), 'unittest.main', 'unittest.main', ([], {}), '()\n', (8890, 8892), False, 'import unittest\n'), ((7497, 7560), 'hockeydata.scrape.html_pbp.get_event_player_1', 'html_pbp.get_event_player_1', (['description', '"""FAC"""', '"""N.J"""', 'players'], {}), "(description, 'FAC', 'N.J', players)\n", (7524, 7560)...
# type: ignore from pipyadc import ADS1256, ADS1256_default_config from pipyadc.ADS1256_definitions import ( NEG_AINCOM, POS_AIN0, POS_AIN1, POS_AIN2, POS_AIN3, ) from .base import LabDataService class PiPyADCService(LabDataService): """ Provides pressure readings from a vacuum gauge, rea...
[ "pipyadc.ADS1256" ]
[((742, 773), 'pipyadc.ADS1256', 'ADS1256', (['ADS1256_default_config'], {}), '(ADS1256_default_config)\n', (749, 773), False, 'from pipyadc import ADS1256, ADS1256_default_config\n')]
from django.urls import path, include from wx_app import views urlpatterns = [ path('', views.wx_web, name='wx_web'), path('ht', views.wx_main, name='wx_main'), path('createmenu/', views.create_menu, name='creat_menu') ]
[ "django.urls.path" ]
[((84, 121), 'django.urls.path', 'path', (['""""""', 'views.wx_web'], {'name': '"""wx_web"""'}), "('', views.wx_web, name='wx_web')\n", (88, 121), False, 'from django.urls import path, include\n'), ((127, 168), 'django.urls.path', 'path', (['"""ht"""', 'views.wx_main'], {'name': '"""wx_main"""'}), "('ht', views.wx_main...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
[ "pyramid.path.AssetResolver", "json.load", "whitenoise.WhiteNoise" ]
[((654, 669), 'pyramid.path.AssetResolver', 'AssetResolver', ([], {}), '()\n', (667, 669), False, 'from pyramid.path import AssetResolver\n'), ((2151, 2209), 'whitenoise.WhiteNoise', 'WhiteNoise', (['app'], {'immutable_file_test': 'manifest'}), '(app, **wh_config, immutable_file_test=manifest)\n', (2161, 2209), False, ...
from subprocess import call from sys import platform as _platform from colors import logcolors def init(): call('git init') def createReadme(): if _platform == "linux" or _platform == "linux2": call('touch README.md') elif _platform == "darwin": call('touch README.md') elif _platform...
[ "subprocess.call" ]
[((113, 129), 'subprocess.call', 'call', (['"""git init"""'], {}), "('git init')\n", (117, 129), False, 'from subprocess import call\n'), ((1648, 1684), 'subprocess.call', 'call', (["('git remote add origin ' + url)"], {}), "('git remote add origin ' + url)\n", (1652, 1684), False, 'from subprocess import call\n'), ((1...
# ***** BEGIN GPL LICENSE BLOCK ***** # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distribute...
[ "bpy.app.handlers.render_complete.append", "os.path.basename", "bpy.app.handlers.render_pre.append", "bpy.app.handlers.render_complete.remove", "time.time", "shlex.quote", "datetime.timedelta", "bpy.app.handlers.render_pre.remove" ]
[((1774, 1785), 'time.time', 'time.time', ([], {}), '()\n', (1783, 1785), False, 'import time\n'), ((1983, 2018), 'os.path.basename', 'os.path.basename', (['bpy.data.filepath'], {}), '(bpy.data.filepath)\n', (1999, 2018), False, 'import os\n'), ((2200, 2256), 'bpy.app.handlers.render_complete.append', 'bpy.app.handlers...
"""Extract the changelog for the current version.""" import subprocess from dephell_changelogs import parse_changelog with open("./CHANGELOG.rst") as fd: cl = parse_changelog(fd.read()) tag = subprocess.run( ["git", "describe", "--tags"], stdout=subprocess.PIPE ).stdout.decode() if tag[0] != "v": raise V...
[ "subprocess.run" ]
[((199, 268), 'subprocess.run', 'subprocess.run', (["['git', 'describe', '--tags']"], {'stdout': 'subprocess.PIPE'}), "(['git', 'describe', '--tags'], stdout=subprocess.PIPE)\n", (213, 268), False, 'import subprocess\n')]
from importlib.metadata import entry_points from setuptools import setup, find_packages with open('README.rst', encoding='UTF-8') as f: readme = f.read() setup( name='pgbackup', version='1.0.1', description='Database backups locally or to AWS S3.', long_description=readme, author=...
[ "setuptools.find_packages" ]
[((458, 478), 'setuptools.find_packages', 'find_packages', (['"""src"""'], {}), "('src')\n", (471, 478), False, 'from setuptools import setup, find_packages\n')]
############### # # Transform R to Python Copyright (c) 2019 <NAME> Released under the MIT license # ############### import os import numpy as np import pystan import pandas import pickle import seaborn as sns import matplotlib.pyplot as plt from sklearn.preprocessing import LabelEncoder fish_num_climate_4 = pandas....
[ "pandas.DataFrame", "pickle.dump", "matplotlib.pyplot.show", "seaborn.scatterplot", "pandas.read_csv", "pandas.get_dummies", "matplotlib.pyplot.legend", "os.path.exists", "sklearn.preprocessing.LabelEncoder", "numpy.arange", "numpy.array", "pystan.StanModel", "numpy.unique" ]
[((313, 352), 'pandas.read_csv', 'pandas.read_csv', (['"""4-3-1-fish-num-4.csv"""'], {}), "('4-3-1-fish-num-4.csv')\n", (328, 352), False, 'import pandas\n'), ((424, 513), 'seaborn.scatterplot', 'sns.scatterplot', ([], {'x': '"""temperature"""', 'y': '"""fish_num"""', 'hue': '"""human"""', 'data': 'fish_num_climate_4'}...
import cv2 import numpy as np cap=cv2.VideoCapture(0) while True: _, frame=cap.read() laplacian=cv2.Laplacian(frame,cv2.CV_64F) sobelx=cv2.Sobel(frame,cv2.CV_64F,1,0,ksize=5) sobely=cv2.Sobel(frame,cv2.CV_64F,0,1,ksize=5) edges=cv2.Canny(frame,200,200)#builtin edge detector ...
[ "cv2.Canny", "cv2.waitKey", "cv2.imshow", "cv2.VideoCapture", "cv2.destroyAllWindows", "cv2.Sobel", "cv2.Laplacian" ]
[((36, 55), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), '(0)\n', (52, 55), False, 'import cv2\n'), ((569, 592), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n', (590, 592), False, 'import cv2\n'), ((111, 143), 'cv2.Laplacian', 'cv2.Laplacian', (['frame', 'cv2.CV_64F'], {}), '(frame, cv2.CV...
import time import numpy as np import scipy.misc as scm import os import vn import tensorflow as tf import argparse from denoisingdata import VnDenoisingData import tensorflow.contrib.icg as icg class VnDenoisingCell(tf.contrib.icg.VnBasicCell): def call(self, t, inputs): # get the variables u =...
[ "tensorflow.contrib.icg.activation_rbf", "tensorflow.train.Coordinator", "tensorflow.reduce_sum", "argparse.ArgumentParser", "tensorflow.clip_by_value", "time.strftime", "tensorflow.contrib.icg.utils.Params", "tensorflow.ConfigProto", "numpy.mean", "tensorflow.nn.conv2d", "tensorflow.RunOptions"...
[((1755, 1780), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1778, 1780), False, 'import argparse\n'), ((2221, 2291), 'tensorflow.contrib.icg.utils.loadYaml', 'tf.contrib.icg.utils.loadYaml', (['args.network_config', "['network', 'reg']"], {}), "(args.network_config, ['network', 'reg'])\n", ...
from typing import Dict, Tuple, Type, Union, cast from django.test.client import AsyncClient # type:ignore from django.test.client import Client import pytest from strawberry_django_plus.optimizer import DjangoOptimizerExtension from tests.utils import GraphQLTestClient @pytest.fixture(params=["sync", "async", "sy...
[ "typing.cast", "strawberry_django_plus.optimizer.DjangoOptimizerExtension.enabled.set", "pytest.fixture", "strawberry_django_plus.optimizer.DjangoOptimizerExtension.enabled.reset" ]
[((277, 364), 'pytest.fixture', 'pytest.fixture', ([], {'params': "['sync', 'async', 'sync_no_optimizer', 'async_no_optimizer']"}), "(params=['sync', 'async', 'sync_no_optimizer',\n 'async_no_optimizer'])\n", (291, 364), False, 'import pytest\n'), ((806, 858), 'strawberry_django_plus.optimizer.DjangoOptimizerExtensi...
from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_registration.decorators import api_view_serializer_class_getter from rest_registration.settings import registration_settings @api_view_seria...
[ "rest_framework.decorators.permission_classes", "rest_framework.decorators.api_view", "rest_framework.response.Response", "rest_registration.decorators.api_view_serializer_class_getter" ]
[((306, 400), 'rest_registration.decorators.api_view_serializer_class_getter', 'api_view_serializer_class_getter', (['(lambda : registration_settings.PROFILE_SERIALIZER_CLASS)'], {}), '(lambda : registration_settings.\n PROFILE_SERIALIZER_CLASS)\n', (338, 400), False, 'from rest_registration.decorators import api_vi...
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np import pandas as pd import seaborn as sns # Let seaborn decide the styles sns.set(rc={}) # Modified from: # https://scikit-learn.org/stable/auto_examples/model_selection/plot_confusion_matrix.html def draw_confusion_matrix(cm, ...
[ "matplotlib.pyplot.tight_layout", "seaborn.lineplot", "matplotlib.pyplot.show", "seaborn.heatmap", "pandas.DataFrame.from_dict", "seaborn.barplot", "numpy.expand_dims", "matplotlib.pyplot.subplots", "matplotlib.pyplot.style.use", "seaborn.boxplot", "numpy.array", "matplotlib.pyplot.figure", ...
[((165, 179), 'seaborn.set', 'sns.set', ([], {'rc': '{}'}), '(rc={})\n', (172, 179), True, 'import seaborn as sns\n'), ((383, 407), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""default"""'], {}), "('default')\n", (396, 407), True, 'import matplotlib.pyplot as plt\n'), ((451, 481), 'numpy.array', 'np.array', ([...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # Iterative BFS # Change the deque to stack will give DFS from collections import deque class Solution: def maxDepth(self, root: TreeNode) -> int: ...
[ "collections.deque" ]
[((393, 400), 'collections.deque', 'deque', ([], {}), '()\n', (398, 400), False, 'from collections import deque\n')]
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. # # This source code is licensed under the BSD license found in the # LICENSE file in the root directory of this source tree. # Copyright 2019 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file e...
[ "fairscale.nn.pipe.pipeline.clock_cycles" ]
[((863, 881), 'fairscale.nn.pipe.pipeline.clock_cycles', 'clock_cycles', (['(1)', '(1)'], {}), '(1, 1)\n', (875, 881), False, 'from fairscale.nn.pipe.pipeline import clock_cycles\n'), ((913, 931), 'fairscale.nn.pipe.pipeline.clock_cycles', 'clock_cycles', (['(1)', '(3)'], {}), '(1, 3)\n', (925, 931), False, 'from fairs...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/12/29 15:44 # @Author : MengnanChen # @File : combine_sound.py # @Software: PyCharm import os import glob import random from tqdm import tqdm import numpy as np import soundfile as sf import librosa SAMPLE_RATE = 48000 def combine_rnnoise_contribu...
[ "tqdm.tqdm", "soundfile.read", "os.makedirs", "random.shuffle", "librosa.load", "os.path.join", "numpy.concatenate" ]
[((354, 392), 'os.makedirs', 'os.makedirs', (['output_dir'], {'exist_ok': '(True)'}), '(output_dir, exist_ok=True)\n', (365, 392), False, 'import os\n'), ((459, 486), 'random.shuffle', 'random.shuffle', (['sound_files'], {}), '(sound_files)\n', (473, 486), False, 'import random\n'), ((667, 684), 'tqdm.tqdm', 'tqdm', ([...
""" Python package `sledge`: semantic evaluation of clustering results. The package performs an evaluation of clustering results through the semantic relationship between the significant frequent patterns identified among the cluster items. The method uses an internal validation technique to evaluate the cluster rath...
[ "numpy.count_nonzero", "pandas.DataFrame.from_dict", "numpy.concatenate", "numpy.sort", "numpy.min", "numpy.mean", "numpy.array", "numpy.max", "numpy.diff", "numpy.delete", "numpy.unique" ]
[((4960, 5013), 'numpy.mean', 'np.mean', (['descriptor_set_size[descriptor_set_size > 0]'], {}), '(descriptor_set_size[descriptor_set_size > 0])\n', (4967, 5013), True, 'import numpy as np\n'), ((6068, 6174), 'pandas.DataFrame.from_dict', 'pd.DataFrame.from_dict', (["{'S': support_score, 'L': length_score, 'E': exclusi...
# -*- coding: utf-8 -*- # # Copyright 2016 <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 agree...
[ "matplotlib.pyplot.title", "argparse.ArgumentParser", "matplotlib.pyplot.figure", "matplotlib.pyplot.style.use", "matplotlib.pyplot.tight_layout", "numpy.linspace", "math.log", "matplotlib.pyplot.show", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend", "matplotlib.use", "matplotlib.pyplot....
[((611, 632), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (625, 632), False, 'import matplotlib\n'), ((919, 949), 'matplotlib.pyplot.figure', 'pyplot.figure', ([], {'figsize': '(13, 8)'}), '(figsize=(13, 8))\n', (932, 949), False, 'from matplotlib import pyplot\n'), ((954, 980), 'matplotlib.py...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'datacred.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Fo...
[ "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QSizePolicy", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtCore.QSize", "PyQt5.QtWidgets.QGroupBox", "PyQt5.QtGui.QFont", "growingtextedit.GrowingTextEdit", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtCore.QMetaObject.connectSlotsByName" ]
[((376, 466), 'PyQt5.QtWidgets.QSizePolicy', 'QtWidgets.QSizePolicy', (['QtWidgets.QSizePolicy.Preferred', 'QtWidgets.QSizePolicy.Minimum'], {}), '(QtWidgets.QSizePolicy.Preferred, QtWidgets.\n QSizePolicy.Minimum)\n', (397, 466), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((787, 800), 'PyQt5.QtGui.QFon...
# -*- coding: utf-8 -*- # Copyright (c) 2016, French National Center for Scientific Research (CNRS) # Distributed under the (new) BSD License. See LICENSE for more info. import numpy as np import collections import logging import os import json from ..core import Node, register_node_type, ThreadPollInput, InputStream...
[ "os.mkdir", "os.path.exists", "pyqtgraph.Qt.QtCore.Signal", "json.dumps", "collections.OrderedDict", "os.path.join", "pyqtgraph.util.mutex.Mutex" ]
[((4470, 4493), 'pyqtgraph.Qt.QtCore.Signal', 'QtCore.Signal', (['str', 'int'], {}), '(str, int)\n', (4483, 4493), False, 'from pyqtgraph.Qt import QtCore, QtGui\n'), ((1507, 1532), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (1530, 1532), False, 'import collections\n'), ((1825, 1847), 'os.m...
import numpy as np from scipy.sparse import csr_matrix from feature_mining.em_base import ExpectationMaximization from feature_mining import ParseAndModel from datetime import datetime import os import logging import time class EmVectorByFeature(ExpectationMaximization): """ Vectorized implementation of EM al...
[ "feature_mining.em_base.ExpectationMaximization.__init__", "numpy.subtract", "os.getcwd", "logging.warning", "numpy.power", "feature_mining.ParseAndModel", "numpy.ones", "time.time", "logging.info", "scipy.sparse.csr_matrix", "numpy.array", "numpy.where", "numpy.column_stack", "numpy.dot" ...
[((9692, 9703), 'time.time', 'time.time', ([], {}), '()\n', (9701, 9703), False, 'import time\n'), ((9751, 9891), 'feature_mining.ParseAndModel', 'ParseAndModel', ([], {'feature_list': "['sound', 'battery', ['screen', 'display']]", 'filename': '"""../tests/data/parse_and_model/iPod.final"""', 'nlines': '(100)'}), "(fea...
""" ``LivePossessionLoader`` loads possession data for a game and creates :obj:`~pbpstats.resources.possessions.possession.Possession` objects for each possession The following code will load possession data for game id "0021900001" from a pbp file located in the ``/pbp`` subdirectory of the ``/data`` directory .. co...
[ "pbpstats.resources.possessions.possession.Possession", "pbpstats.data_loader.live.enhanced_pbp.loader.LiveEnhancedPbpLoader" ]
[((1564, 1636), 'pbpstats.data_loader.live.enhanced_pbp.loader.LiveEnhancedPbpLoader', 'LiveEnhancedPbpLoader', (['game_id', 'source_loader.enhanced_pbp_source_loader'], {}), '(game_id, source_loader.enhanced_pbp_source_loader)\n', (1585, 1636), False, 'from pbpstats.data_loader.live.enhanced_pbp.loader import LiveEnha...
from mock import patch from corehq.apps.app_manager.models import LinkedApplication, Module from corehq.apps.app_manager.views.utils import get_blank_form_xml from corehq.apps.linked_domain.const import ( LINKED_MODELS_MAP, MODEL_APP, MODEL_CASE_SEARCH, MODEL_FLAGS, MODEL_USER_DATA, ) from corehq.a...
[ "corehq.apps.app_manager.models.LinkedApplication.get", "corehq.apps.linked_domain.models.AppLinkDetail", "corehq.apps.users.models.WebUser.create", "corehq.apps.linked_domain.models.DomainLink.link_domains", "mock.patch", "corehq.util.test_utils.flag_enabled", "corehq.apps.app_manager.views.utils.get_b...
[((2786, 2824), 'corehq.util.test_utils.flag_enabled', 'flag_enabled', (['"""SYNC_SEARCH_CASE_CLAIM"""'], {}), "('SYNC_SEARCH_CASE_CLAIM')\n", (2798, 2824), False, 'from corehq.util.test_utils import flag_enabled\n'), ((3959, 4002), 'corehq.util.test_utils.flag_enabled', 'flag_enabled', (['"""MULTI_MASTER_LINKED_DOMAIN...
import pandas as pd import random,time import numpy as np import math,copy from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report, confusion_matrix, accuracy_score from skle...
[ "pandas.read_csv", "sklearn.model_selection.train_test_split", "result.measure.calculate_recall", "sklearn.preprocessing.MinMaxScaler", "result.measure.calculate_far", "sklearn.preprocessing.LabelEncoder", "time.time", "result.measure.measure_final_score", "sklearn.linear_model.LogisticRegression", ...
[((737, 768), 'pandas.read_csv', 'pd.read_csv', (['"""dataset/bank.csv"""'], {}), "('dataset/bank.csv')\n", (748, 768), True, 'import pandas as pd\n'), ((1160, 1201), 'numpy.where', 'np.where', (["(dataset_orig['age'] >= 25)", '(1)', '(0)'], {}), "(dataset_orig['age'] >= 25, 1, 0)\n", (1168, 1201), True, 'import numpy ...
# !/usr/bin/env python # coding=UTF-8 """ @Author: <NAME> @LastEditors: <NAME> @Description: @Date: 2021-08-12 @LastEditTime: 2022-03-19 英文字符串的一些基本操作 """ import re from string import punctuation from typing import List, NoReturn import nltk from nltk.tokenize import word_tokenize as nltk_word_tokenize import stanza ...
[ "flair.models.SequenceTagger.load", "flair.data.Sentence", "re.finditer", "nltk.data.find", "nltk.download", "segtok.tokenizer.word_tokenizer", "stanza.Pipeline", "nltk.pos_tag", "syntok.tokenizer.Tokenizer", "re.sub", "nltk.tokenize.word_tokenize" ]
[((2672, 2707), 'flair.data.Sentence', 'Sentence', (['s'], {'use_tokenizer': 'tokenize'}), '(s, use_tokenizer=tokenize)\n', (2680, 2707), False, 'from flair.data import Sentence\n'), ((2721, 2750), 'flair.models.SequenceTagger.load', 'SequenceTagger.load', (['tag_type'], {}), '(tag_type)\n', (2740, 2750), False, 'from ...
#!/usr/bin/python import roslib; roslib.load_manifest('cv_bridge') import rospy import unittest from cv_bridge import cv_bridge import numpy as np import struct class MatNDTest(unittest.TestCase): def setUp(self): self.mat = np.array(range(24), np.uint8) self.mat = np.reshape(self.mat, (2,3,4)) self.ass...
[ "unittest.main", "cv_bridge.cv_bridge.NumpyBridge", "struct.pack", "numpy.array", "numpy.reshape", "roslib.load_manifest" ]
[((33, 66), 'roslib.load_manifest', 'roslib.load_manifest', (['"""cv_bridge"""'], {}), "('cv_bridge')\n", (53, 66), False, 'import roslib\n'), ((1898, 1913), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1911, 1913), False, 'import unittest\n'), ((277, 308), 'numpy.reshape', 'np.reshape', (['self.mat', '(2, 3, 4...
import subprocess print("This program extracts a clip out of any video file") dict = { "4k" : str("-vf scale=3840:2160"), "1080p" : str("-vf scale=1920:1080"), "720p" : str("-vf scale=1280:720"), "480p" : str("-vf scale=852:480"), "360p" : str("-vf scale=480:360"), "H264" : str("-vcodec libx264"...
[ "subprocess.call" ]
[((1795, 1927), 'subprocess.call', 'subprocess.call', (['f"""ffmpeg -i {filename} -ss {start} -to {end} {resolution} {codec} {bitrate} {audio} {output}"""'], {'shell': '(True)'}), "(\n f'ffmpeg -i {filename} -ss {start} -to {end} {resolution} {codec} {bitrate} {audio} {output}'\n , shell=True)\n", (1810, 1927), F...
""" This file is used to generate ../data/COCO+TLESS_fusion_rendering dataset. Use fusion & rendering strategy """ from utils.sixd import load_sixd, load_COCO, load_yaml from rendering.model import Model3D from rendering.utils import create_pose, build_6D_poses from rendering.renderer import Renderer from tools.fps imp...
[ "os.mkdir", "lxml.etree.Element", "random.shuffle", "numpy.ones", "pycocotools.mask.encode", "numpy.random.randint", "numpy.linalg.norm", "lxml.etree.SubElement", "os.path.join", "numpy.round", "tools.fps.fps_utils.farthest_point_sampling", "numpy.copy", "os.path.dirname", "numpy.savetxt",...
[((1279, 1293), 'numpy.identity', 'np.identity', (['(3)'], {}), '(3)\n', (1290, 1293), True, 'import numpy as np\n'), ((2068, 2145), 'numpy.loadtxt', 'np.loadtxt', (['"""/data/ZHANGXIN/pose_estimation_code/ssd-6d-master/views-337.txt"""'], {}), "('/data/ZHANGXIN/pose_estimation_code/ssd-6d-master/views-337.txt')\n", (2...
########### Get People Listed and Specific People Info ########### import http.client, urllib.request, urllib.parse, urllib.error, base64, requests, json # Subscription Key to identify my Service in Azure subscription_key = '<KEY>' print("You will create a new person") person = input("What's the name...
[ "requests.post" ]
[((1157, 1251), 'requests.post', 'requests.post', (["(group_url + groupid + '/persons')"], {'params': 'params', 'json': 'body', 'headers': 'headers'}), "(group_url + groupid + '/persons', params=params, json=body,\n headers=headers)\n", (1170, 1251), False, 'import http.client, urllib.request, urllib.parse, urllib.e...
"""justdoist URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
[ "main.views.Register.as_view", "django.contrib.staticfiles.urls.staticfiles_urlpatterns", "django.conf.urls.url", "django.urls.path" ]
[((2127, 2152), 'django.contrib.staticfiles.urls.staticfiles_urlpatterns', 'staticfiles_urlpatterns', ([], {}), '()\n', (2150, 2152), False, 'from django.contrib.staticfiles.urls import staticfiles_urlpatterns\n'), ((941, 972), 'django.urls.path', 'path', (['"""admin/"""', 'admin.site.urls'], {}), "('admin/', admin.sit...
""" Parser containing all Gooey widgets. """ from gooey import GooeyParser parser = GooeyParser() parser.add_argument('--textfield', default=2, widget="TextField") parser.add_argument('--textarea', default="oneline twoline", widget='Textarea') parser.add_argument('--password', default="<PASSWORD>", widget='Password...
[ "gooey.GooeyParser" ]
[((87, 100), 'gooey.GooeyParser', 'GooeyParser', ([], {}), '()\n', (98, 100), False, 'from gooey import GooeyParser\n')]
# (c) 2020 <NAME> # This code is licensed under MIT license (see LICENSE.txt for details) import scipy.ndimage.filters as imagefilter import numpy as np IMG_WIDTH = 64 IMG_HEIGHT = 64 sharpen = np.array(( [1, 1, 1], [1, 1, 1], [1, 1, 1]), dtype="int") sharpen = np.flip(sharpen) print(sharpen) res = [] for i in r...
[ "scipy.ndimage.filters.convolve", "numpy.array", "numpy.arange", "numpy.flip" ]
[((197, 253), 'numpy.array', 'np.array', (['([1, 1, 1], [1, 1, 1], [1, 1, 1])'], {'dtype': '"""int"""'}), "(([1, 1, 1], [1, 1, 1], [1, 1, 1]), dtype='int')\n", (205, 253), True, 'import numpy as np\n'), ((269, 285), 'numpy.flip', 'np.flip', (['sharpen'], {}), '(sharpen)\n', (276, 285), True, 'import numpy as np\n'), ((...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ "solum.objects.load", "mock.patch", "solum.api.controllers.camp.v1_1.formats.FormatsController" ]
[((699, 763), 'mock.patch', 'mock.patch', (['"""pecan.request"""'], {'new_callable': 'fakes.FakePecanRequest'}), "('pecan.request', new_callable=fakes.FakePecanRequest)\n", (709, 763), False, 'import mock\n'), ((765, 831), 'mock.patch', 'mock.patch', (['"""pecan.response"""'], {'new_callable': 'fakes.FakePecanResponse'...
import unittest from nose.tools import * from streetaddress import StreetAddressFormatter, StreetAddressParser class TestStreetAddress(unittest.TestCase): def setUp(self): self.addr_parser = StreetAddressParser() self.addr_formatter = StreetAddressFormatter() def test_success_abbrev_street_a...
[ "streetaddress.StreetAddressFormatter", "streetaddress.StreetAddressParser" ]
[((205, 226), 'streetaddress.StreetAddressParser', 'StreetAddressParser', ([], {}), '()\n', (224, 226), False, 'from streetaddress import StreetAddressFormatter, StreetAddressParser\n'), ((257, 281), 'streetaddress.StreetAddressFormatter', 'StreetAddressFormatter', ([], {}), '()\n', (279, 281), False, 'from streetaddre...
try: from Crypto.Cipher import ARC2 from Crypto import Random except: import sys sys.exit("You Need To Download First pycrypto Module.\nusing the following command : 'pip3 install pycrypto'") import time import platform import base64 import os import hashlib class fileOnARC2(): """This Class Is To Encrypt And De...
[ "os.remove", "base64.b64decode", "time.time", "Crypto.Cipher.ARC2.new", "Crypto.Random.new", "sys.exit" ]
[((85, 208), 'sys.exit', 'sys.exit', (['"""You Need To Download First pycrypto Module.\nusing the following command : \'pip3 install pycrypto\'"""'], {}), '(\n """You Need To Download First pycrypto Module.\nusing the following command : \'pip3 install pycrypto\'"""\n )\n', (93, 208), False, 'import sys\n'), ((10...
import torch from scripts.study_case.ID_13.torch_geometric.data import Data class Batch(Data): def __init__(self, batch=None, **kwargs): super(Batch, self).__init__(**kwargs) self.batch = batch @staticmethod def from_data_list(data_list): keys = [set(data.keys) for data in data_li...
[ "torch.cat", "torch.full" ]
[((1055, 1085), 'torch.cat', 'torch.cat', (['batch.batch'], {'dim': '(-1)'}), '(batch.batch, dim=-1)\n', (1064, 1085), False, 'import torch\n'), ((636, 681), 'torch.full', 'torch.full', (['(num_nodes,)', 'i'], {'dtype': 'torch.long'}), '((num_nodes,), i, dtype=torch.long)\n', (646, 681), False, 'import torch\n')]
import logging import os from typing import Optional from django.core.management.base import CommandParser from django.utils.timezone import now from jutil.command import SafeCommand from jsanctions.services import delete_old_sanction_list_files from jsanctions.models import SanctionsListFile from jsanctions.un import ...
[ "os.path.basename", "django.utils.timezone.now", "jsanctions.un.import_un_sanctions", "jsanctions.models.SanctionsListFile.objects.create_from_filename", "jsanctions.models.SanctionsListFile.objects.get", "jsanctions.models.SanctionsListFile.objects.filter", "jsanctions.services.delete_old_sanction_list...
[((364, 391), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (381, 391), False, 'import logging\n'), ((2258, 2302), 'jsanctions.un.import_un_sanctions', 'import_un_sanctions', (['source'], {'verbose': 'verbose'}), '(source, verbose=verbose)\n', (2277, 2302), False, 'from jsanctions.un imp...
import numpy as np import chainer from chainer import cuda, Function, report, training, utils, Variable from chainer import datasets, iterators, optimizers, serializers, reporter from chainer.dataset import convert from chainer.dataset import iterator as iterator_module from chainer import Link, Chain, ChainList ...
[ "chainer.functions.mean_squared_error", "chainer.function.no_backprop_mode", "chainer.optimizers.Adam", "chainer.training.Trainer", "chainer.links.Convolution2D", "chainer.reporter.report", "chainer.training.extensions.PrintReport", "chainer.reporter.DictSummary", "chainer.reporter.report_scope", ...
[((2873, 2918), 'chainer.training.make_extension', 'training.make_extension', ([], {'trigger': "(1, 'epoch')"}), "(trigger=(1, 'epoch'))\n", (2896, 2918), False, 'from chainer import cuda, Function, report, training, utils, Variable\n'), ((3727, 3775), 'numpy.int32', 'np.int32', (['(train_data.shape[0] / 10 * train_rat...
import collections import re from vee.semver import Version class Provision(collections.MutableMapping): @classmethod def coerce(cls, input_): return input_ if isinstance(input_, cls) else cls(input_) def __init__(self, input_=None): self._data = {} if isinstance(input_, s...
[ "re.match", "vee.semver.Version.coerce" ]
[((821, 846), 're.match', 're.match', (['"""^\\\\w+$"""', 'chunk'], {}), "('^\\\\w+$', chunk)\n", (829, 846), False, 'import re\n'), ((952, 992), 're.match', 're.match', (['"""^(\\\\w+)\\\\s*=\\\\s*(.+)$"""', 'chunk'], {}), "('^(\\\\w+)\\\\s*=\\\\s*(.+)$', chunk)\n", (960, 992), False, 'import re\n'), ((1599, 1620), 'v...
""" generate_segments.py -------------------- For every OpenStreetMap segment with zero parallel sidewalks, generate two new 'improvement concept' geometries, one for each side of the street centerline. """ import click import pandas as pd from tqdm import tqdm import warnings from pg_data_etl import Database from ...
[ "click.argument", "warnings.filterwarnings", "click.command", "network_routing.pg_db_connection", "pandas.concat" ]
[((361, 394), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (384, 394), False, 'import warnings\n'), ((398, 413), 'click.command', 'click.command', ([], {}), '()\n', (411, 413), False, 'import click\n'), ((415, 439), 'click.argument', 'click.argument', (['"""county"""'], ...
import os from ..utils import extract_frames, resize_frames from ..boundingbox import BBoxFilter class OTP(): """ General Framework for Object Trajectory Proposal (OTP) """ def __init__(self, vind, working_root, vsize = 240): frames, fps, orig_size = extract_frames(os.path.join(working_root, 'sn...
[ "os.path.join" ]
[((281, 336), 'os.path.join', 'os.path.join', (['working_root', "('snippets/' + vind + '.mp4')"], {}), "(working_root, 'snippets/' + vind + '.mp4')\n", (293, 336), False, 'import os\n')]
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import scipy import scipy.spatial from .standardize import standardize def distance(X=None, method="mahalanobis"): """Distance. Compute distance using different metrics. Parameters ---------- X : array or DataFrame A datafra...
[ "scipy.linalg.inv", "scipy.spatial.distance.mahalanobis", "pandas.DataFrame" ]
[((1355, 1376), 'scipy.linalg.inv', 'scipy.linalg.inv', (['cov'], {}), '(cov)\n', (1371, 1376), False, 'import scipy\n'), ((755, 770), 'pandas.DataFrame', 'pd.DataFrame', (['X'], {}), '(X)\n', (767, 770), True, 'import pandas as pd\n'), ((1492, 1563), 'scipy.spatial.distance.mahalanobis', 'scipy.spatial.distance.mahala...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
[ "DialogClassParameters.DialogClassParameters.__init__" ]
[((1010, 1131), 'DialogClassParameters.DialogClassParameters.__init__', 'DialogClassParameters.DialogClassParameters.__init__', (['self', 'winId', 'winLabel', 'dClass', 'createId', 'setterFn', 'creationFlag'], {}), '(self, winId, winLabel,\n dClass, createId, setterFn, creationFlag)\n', (1062, 1131), False, 'import ...
from django.shortcuts import render, redirect, get_object_or_404 from .models import TodoList from .forms import TodoForm from django.utils import timezone from django.contrib import messages from .forms import CreateUserForm from django.contrib.auth import login, logout, authenticate from django.contrib.auth.decorator...
[ "django.contrib.auth.decorators.login_required", "django.shortcuts.redirect", "django.contrib.messages.error", "django.utils.timezone.now", "django.shortcuts.get_object_or_404", "django.contrib.auth.logout", "django.contrib.auth.authenticate", "django.shortcuts.render", "django.contrib.messages.succ...
[((374, 411), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""loginpage"""'}), "(login_url='loginpage')\n", (388, 411), False, 'from django.contrib.auth.decorators import login_required\n'), ((577, 614), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'...
##################################################################################### # CLASSICS - CalcuLAtionS of Self Interaction Cross Sections # # by <NAME>, <NAME>, <NAME>, <NAME> and <NAME> # ##################################################################################### # Requirement...
[ "scipy.special.loggamma", "numpy.log", "numpy.logspace", "numpy.angle", "numpy.clip", "numpy.sin", "numpy.array", "numpy.loadtxt", "numpy.cos", "scipy.special.kn", "numpy.log10", "scipy.special.gamma", "numpy.sqrt" ]
[((5345, 5383), 'numpy.logspace', 'np.logspace', (['(-5)', '(5)', '(101)'], {'endpoint': '(True)'}), '(-5, 5, 101, endpoint=True)\n', (5356, 5383), True, 'import numpy as np\n'), ((5396, 5433), 'numpy.logspace', 'np.logspace', (['(-3)', '(3)', '(61)'], {'endpoint': '(True)'}), '(-3, 3, 61, endpoint=True)\n', (5407, 543...
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init import math class BasicBlock(nn.Module): def __init__(self, in_channels, out_channels, stride): super(BasicBlock, self).__init__() reduction = 0.5 if 2 == stride: reduction = 1 elif in_channels > out_c...
[ "math.sqrt", "torch.nn.Sequential", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.nn.init.kaiming_normal", "torch.nn.functional.relu" ]
[((1166, 1194), 'torch.nn.BatchNorm2d', 'nn.BatchNorm2d', (['out_channels'], {}), '(out_channels)\n', (1180, 1194), True, 'import torch.nn as nn\n'), ((1256, 1271), 'torch.nn.Sequential', 'nn.Sequential', ([], {}), '()\n', (1269, 1271), True, 'import torch.nn as nn\n'), ((2067, 2081), 'torch.nn.functional.relu', 'F.rel...
import os import maya.cmds as cmds from cmt.io.obj import import_obj, export_obj import cmt.shortcuts as shortcuts def get_blendshape_node(geometry): """Get the first blendshape node upstream from the given geometry. :param geometry: Name of the geometry :return: The blendShape node name """ geo...
[ "cmt.io.obj.import_obj", "maya.cmds.listHistory", "maya.cmds.nodeType", "maya.cmds.listConnections", "maya.cmds.disconnectAttr", "cmt.io.obj.export_obj", "maya.cmds.delete", "maya.cmds.duplicate", "maya.cmds.setAttr", "cmt.shortcuts.get_shape", "os.path.join", "os.listdir", "maya.cmds.blendS...
[((328, 357), 'cmt.shortcuts.get_shape', 'shortcuts.get_shape', (['geometry'], {}), '(geometry)\n', (347, 357), True, 'import cmt.shortcuts as shortcuts\n'), ((931, 960), 'cmt.shortcuts.get_shape', 'shortcuts.get_shape', (['geometry'], {}), '(geometry)\n', (950, 960), True, 'import cmt.shortcuts as shortcuts\n'), ((181...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "mxnet.nd.ones", "mxnet.sym.Convolution", "nose.runmodule", "mxnet.nd.zeros", "mxnet.contrib.tensorrt.init_tensorrt_params", "mxnet.sym.Variable", "mxnet.gpu", "mxnet.nd.random.uniform", "mxnet.sym.BatchNorm" ]
[((957, 981), 'mxnet.nd.ones', 'mx.nd.ones', (['(1, 1, 3, 3)'], {}), '((1, 1, 3, 3))\n', (967, 981), True, 'import mxnet as mx\n'), ((1023, 1040), 'mxnet.nd.zeros', 'mx.nd.zeros', (['(1,)'], {}), '((1,))\n', (1034, 1040), True, 'import mxnet as mx\n'), ((1081, 1098), 'mxnet.nd.zeros', 'mx.nd.zeros', (['(1,)'], {}), '((...
# database.py from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base engine = create_engine("sqlite:///./data/songs.db", connect_args={"check_same_thread": False}) OrmSession = sessionmaker(autocommit=False, autoflush=False, bind=engine) Ba...
[ "sqlalchemy.create_engine", "sqlalchemy.ext.declarative.declarative_base", "sqlalchemy.orm.sessionmaker" ]
[((158, 248), 'sqlalchemy.create_engine', 'create_engine', (['"""sqlite:///./data/songs.db"""'], {'connect_args': "{'check_same_thread': False}"}), "('sqlite:///./data/songs.db', connect_args={\n 'check_same_thread': False})\n", (171, 248), False, 'from sqlalchemy import create_engine\n'), ((257, 317), 'sqlalchemy.o...
import argparse from pathlib import Path import matplotlib.pyplot as plt from datastructs.instance import Instance from datastructs.result import Result import vizualization.gantt def _parse_args(): parser = argparse.ArgumentParser(description='Show a gantt chart for a energy limits scheduling result.') par...
[ "pathlib.Path", "matplotlib.pyplot.show", "argparse.ArgumentParser" ]
[((216, 317), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Show a gantt chart for a energy limits scheduling result."""'}), "(description=\n 'Show a gantt chart for a energy limits scheduling result.')\n", (239, 317), False, 'import argparse\n'), ((1070, 1080), 'matplotlib.pyplot.sh...
# -*- coding: UTF-8 -*- """ :Script: movepnts.py :Author: <EMAIL> :Modified: 2017-04-06 :Notes: :- arcpy.da.FeatureClassToNumPyArray(in_table, field_names, {where_clause}, : {spatial_reference}, {explode_to_points}, : {skip_nulls}, {null_va...
[ "arcpy.da.NumPyArrayToFeatureClass", "arcpy.da.FeatureClassToNumPyArray", "arcpy.CopyFeatures_management", "numpy.array", "arcpytools_pnt.fc_info" ]
[((1076, 1107), 'numpy.array', 'np.array', (['[dx, dy]'], {'dtype': '"""<f8"""'}), "([dx, dy], dtype='<f8')\n", (1084, 1107), True, 'import numpy as np\n'), ((1145, 1159), 'arcpytools_pnt.fc_info', 'fc_info', (['in_fc'], {}), '(in_fc)\n', (1152, 1159), False, 'from arcpytools_pnt import fc_info, tweet\n'), ((1362, 1421...
from algoplex.api.common.market_data import MarketData import threading import os import time class MarketDataSim(MarketData): def __init__(self, market_data_file): self.market_data_file = market_data_file self.subscribers = [] self.subscribed = False self.watcher = None se...
[ "threading.Thread", "os.path.dirname", "time.sleep" ]
[((1170, 1217), 'threading.Thread', 'threading.Thread', ([], {'target': 'self.watch_market_data'}), '(target=self.watch_market_data)\n', (1186, 1217), False, 'import threading\n'), ((448, 473), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (463, 473), False, 'import os\n'), ((1721, 1736), 't...
# Data Preprocessing Template # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.preprocessing import Imputer from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.model_selection import train_test_split from sklearn.preprocessing import S...
[ "pandas.read_csv", "sklearn.model_selection.train_test_split" ]
[((369, 392), 'pandas.read_csv', 'pd.read_csv', (['"""Data.csv"""'], {}), "('Data.csv')\n", (380, 392), True, 'import pandas as pd\n'), ((980, 1033), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': '(0.2)', 'random_state': '(0)'}), '(X, y, test_size=0.2, random_state=0)\n', (9...
import os FFMPEG_PATH = os.path.join("external_tools", "ffmpeg", "bin") SOX_PATH = os.path.join("external_tools", "sox") # you must have a valid Opensubtitles User-Agent for subtitle downloading to work! opensubtitles_credentials = {'user': 'user', 'password': 'password'}
[ "os.path.join" ]
[((25, 72), 'os.path.join', 'os.path.join', (['"""external_tools"""', '"""ffmpeg"""', '"""bin"""'], {}), "('external_tools', 'ffmpeg', 'bin')\n", (37, 72), False, 'import os\n'), ((84, 121), 'os.path.join', 'os.path.join', (['"""external_tools"""', '"""sox"""'], {}), "('external_tools', 'sox')\n", (96, 121), False, 'im...
import infomaker import datetime root = infomaker.infomaker() if __name__ == "__main__": while 1:#메인루프 if datetime.date.today() != root.start:#날짜가 바뀌면 재시작 root.start = datetime.date.today() try: print(root.weather("개포동")) print(root.music_rank(5)) ...
[ "infomaker.infomaker", "datetime.date.today" ]
[((42, 63), 'infomaker.infomaker', 'infomaker.infomaker', ([], {}), '()\n', (61, 63), False, 'import infomaker\n'), ((121, 142), 'datetime.date.today', 'datetime.date.today', ([], {}), '()\n', (140, 142), False, 'import datetime\n'), ((195, 216), 'datetime.date.today', 'datetime.date.today', ([], {}), '()\n', (214, 216...
import rdflib import numpy as np from sklearn.utils.validation import check_is_fitted from gensim.models.word2vec import Word2Vec import tqdm import copy from rdf2vec.graph import Vertex from hashlib import md5 import itertools from rdf2vec.walkers import RandomWalker import findspark import os import shutil import ti...
[ "os.mkdir", "pyspark.SparkContext", "pyspark.SparkConf", "os.path.isdir", "time.gmtime", "sklearn.utils.validation.check_is_fitted", "time.time", "gensim.models.word2vec.Word2Vec", "shutil.rmtree", "findspark.init", "os.path.join", "os.listdir" ]
[((1265, 1289), 'os.listdir', 'os.listdir', (['self.dirname'], {}), '(self.dirname)\n', (1275, 1289), False, 'import os\n'), ((3791, 3807), 'findspark.init', 'findspark.init', ([], {}), '()\n', (3805, 3807), False, 'import findspark\n'), ((3834, 3845), 'pyspark.SparkConf', 'SparkConf', ([], {}), '()\n', (3843, 3845), F...
""" basic game for learning reinforcement learning """ import numpy as np import gym # basic implementation env = gym.make("CartPole-v0") best_params = [0 for _ in range(4)] max_steps = 0 for times in range(1000): observation = env.reset() params = np.random.random(4) for step in range(200): action = int(np.d...
[ "gym.make", "numpy.dot", "numpy.median", "keras.layers.Dropout", "numpy.zeros", "numpy.random.random", "numpy.array", "keras.layers.Dense", "numpy.mean", "numpy.random.randint", "numpy.random.rand", "keras.models.Sequential" ]
[((117, 140), 'gym.make', 'gym.make', (['"""CartPole-v0"""'], {}), "('CartPole-v0')\n", (125, 140), False, 'import gym\n'), ((471, 490), 'numpy.random.random', 'np.random.random', (['(4)'], {}), '(4)\n', (487, 490), True, 'import numpy as np\n'), ((713, 736), 'gym.make', 'gym.make', (['"""CartPole-v0"""'], {}), "('Cart...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "autosynth.providers.apiary.list_apis", "unittest.mock.patch.object", "unittest.mock.patch.dict" ]
[((697, 731), 'unittest.mock.patch.object', 'patch.object', (['GitHub', '"""list_files"""'], {}), "(GitHub, 'list_files')\n", (709, 731), False, 'from unittest.mock import patch\n'), ((733, 783), 'unittest.mock.patch.dict', 'patch.dict', (['os.environ', "{'GITHUB_TOKEN': 'unused'}"], {}), "(os.environ, {'GITHUB_TOKEN':...
import numpy as np from scipy import (special, stats) from astropy.io import fits def get_j_rv(dataframe): jv = [] for i in range(len(dataframe)): jv.append(np.sqrt((2/np.pi) * dataframe["t"].iloc[i] * (dataframe["RV jitter"].iloc[i]**2 - 0.11**2))) jv_data = np.array(jv) return jv_data #y...
[ "numpy.log", "scipy.stats.norm.logpdf", "numpy.array", "numpy.exp", "scipy.special.logsumexp", "numpy.sqrt" ]
[((282, 294), 'numpy.array', 'np.array', (['jv'], {}), '(jv)\n', (290, 294), True, 'import numpy as np\n'), ((626, 681), 'scipy.stats.norm.logpdf', 'stats.norm.logpdf', (['y'], {'loc': 'mu_single', 'scale': 'sigma_single'}), '(y, loc=mu_single, scale=sigma_single)\n', (643, 681), False, 'from scipy import special, stat...
from config import SHORT_COMMANDS class Command: """ A command object, mainly for the preprocessing. Required for both HTML tags and system commands (both preprocessing commands [^cmd] and processing commands [@cmd]) """ def __init__(self, command="", parms=[], spaces=0, text=""): self.comm...
[ "config.SHORT_COMMANDS.items" ]
[((3710, 3732), 'config.SHORT_COMMANDS.items', 'SHORT_COMMANDS.items', ([], {}), '()\n', (3730, 3732), False, 'from config import SHORT_COMMANDS\n')]
import pytest from primrose.base.pipeline import AbstractPipeline from primrose.base.pipeline import PipelineModeType from primrose.configuration.configuration import Configuration from primrose.data_object import DataObject from primrose.readers.csv_reader import CsvReader from primrose.base.transformer_sequence impor...
[ "primrose.base.transformer_sequence.TransformerSequence", "primrose.node_factory.NodeFactory", "primrose.base.pipeline.PipelineModeType.names", "pandas.read_csv", "testfixtures.LogCapture", "logging.info", "pytest.raises", "primrose.configuration.configuration.Configuration", "primrose.base.pipeline...
[((1650, 1726), 'primrose.configuration.configuration.Configuration', 'Configuration', ([], {'config_location': 'None', 'is_dict_config': '(True)', 'dict_config': 'config'}), '(config_location=None, is_dict_config=True, dict_config=config)\n', (1663, 1726), False, 'from primrose.configuration.configuration import Confi...
# plot.py # # Copyright (c) [2017] [yukirin] # # This software is released under the MIT License. # http://opensource.org/licenses/mit-license.php # ============================================================================== import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d.axes3d import ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.xlim", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "numpy.array", "numpy.squeeze", "mpl_toolkits.mplot3d.axes3d.Axes3D" ]
[((367, 385), 'numpy.squeeze', 'np.squeeze', (['actual'], {}), '(actual)\n', (377, 385), True, 'import numpy as np\n'), ((398, 417), 'numpy.squeeze', 'np.squeeze', (['predict'], {}), '(predict)\n', (408, 417), True, 'import numpy as np\n'), ((449, 482), 'matplotlib.pyplot.title', 'plt.title', (['"""NN [LSTM] $\\\\sin(x...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from fincalc import Bankomat # Выполнить индивидуальное задание 1 лабораторной работы 12, максимально задействовав # имеющиеся в Python средства перегрузки операторов. # Вариант 11. # Выполнить индивидуальное задание 1 лабораторной работы 13, оформив все классы програм...
[ "fincalc.Bankomat" ]
[((625, 676), 'fincalc.Bankomat', 'Bankomat', ([], {'start_sum': '(150)', 'new_sum': '(200)', 'final_sum': '(350)'}), '(start_sum=150, new_sum=200, final_sum=350)\n', (633, 676), False, 'from fincalc import Bankomat\n'), ((711, 762), 'fincalc.Bankomat', 'Bankomat', ([], {'start_sum': '(200)', 'new_sum': '(288)', 'final...
from django.test import RequestFactory, TestCase from studies.logic.game import Game from studies.models import StudiesNotesProgression from studies.tests.speed_set_up import SpeedSetUP class GameTest(TestCase): def setUp(self): # Every test needs access to the request factory. self.factory = Requ...
[ "studies.tests.speed_set_up.SpeedSetUP", "studies.logic.game.Game", "studies.models.StudiesNotesProgression.objects.filter", "django.test.RequestFactory" ]
[((316, 332), 'django.test.RequestFactory', 'RequestFactory', ([], {}), '()\n', (330, 332), False, 'from django.test import RequestFactory, TestCase\n'), ((356, 368), 'studies.tests.speed_set_up.SpeedSetUP', 'SpeedSetUP', ([], {}), '()\n', (366, 368), False, 'from studies.tests.speed_set_up import SpeedSetUP\n'), ((389...
from glob import glob def create_neg_annotations() -> None: """ Create a list of negative images as per OpenCV guidlines :return: None """ with open("bg.txt", "w+") as file_: file_.write('\n'.join(glob("negatives/*.jpg"))) if __name__ == "__main__": create_neg_annotations()
[ "glob.glob" ]
[((227, 250), 'glob.glob', 'glob', (['"""negatives/*.jpg"""'], {}), "('negatives/*.jpg')\n", (231, 250), False, 'from glob import glob\n')]
from django.contrib.gis.db import models from django.core.exceptions import ValidationError import magic from ... import tasks from ..common import ChecksumFile, ModifiableEntry, SpatialEntry from ..constants import DB_SRID from ..mixins import TaskEventMixin def validate_archive(field_file): """Validate file is...
[ "django.contrib.gis.db.models.ForeignKey", "django.core.exceptions.ValidationError", "django.contrib.gis.db.models.CharField", "django.contrib.gis.db.models.TextField", "django.contrib.gis.db.models.GeometryCollectionField", "django.contrib.gis.db.models.OneToOneField" ]
[((892, 949), 'django.contrib.gis.db.models.ForeignKey', 'models.ForeignKey', (['ChecksumFile'], {'on_delete': 'models.CASCADE'}), '(ChecksumFile, on_delete=models.CASCADE)\n', (909, 949), False, 'from django.contrib.gis.db import models\n'), ((1270, 1315), 'django.contrib.gis.db.models.CharField', 'models.CharField', ...
# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( ExtractorError, int_or_none, parse_iso8601, str_or_none, urlencode_postdata, clean_html, ) class ShahidIE(InfoExtractor)...
[ "re.match", "json.dumps" ]
[((3489, 3519), 're.match', 're.match', (['self._VALID_URL', 'url'], {}), '(self._VALID_URL, url)\n', (3497, 3519), False, 'import re\n'), ((1815, 1883), 'json.dumps', 'json.dumps', (["{'email': email, 'password': password, 'basic': 'false'}"], {}), "({'email': email, 'password': password, 'basic': 'false'})\n", (1825,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import torch import torch.nn as nn def array2samples_distance(array1, array2): """ arguments: array1: the array, size: (num_point, num_feature) array2: the samples, size: (num_point, num_feature) returns: distances: each entry is the ...
[ "torch.mean", "torch.ones", "torch.randint", "torch.unsqueeze", "torch.FloatTensor", "torch.randn", "torch.max", "torch.arange", "torch.zeros", "torch.reshape", "torch.sum", "torch.min" ]
[((778, 805), 'torch.sum', 'torch.sum', (['distances'], {'dim': '(1)'}), '(distances, dim=1)\n', (787, 805), False, 'import torch\n'), ((821, 871), 'torch.reshape', 'torch.reshape', (['distances', '(num_point2, num_point1)'], {}), '(distances, (num_point2, num_point1))\n', (834, 871), False, 'import torch\n'), ((934, 9...
from pygears.util.test_utils import synth_check_fixt from pygears.util.test_utils import formal_check_fixt from pygears.util.test_utils import hdl_check_fixt from pygears.util.test_utils import clear from pygears.util.test_utils import sim_cls from pygears.util.test_utils import cosim_cls from pygears.util.test_utils i...
[ "pytest.fixture" ]
[((371, 399), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (385, 399), False, 'import pytest\n')]
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from erpnext.stock.get_item_details import get_pos_profile from erpnext.accounts.doctype.pos_profile.pos_profile import g...
[ "frappe.db.exists", "erpnext.accounts.doctype.pos_profile.pos_profile.get_child_nodes", "frappe.db.sql", "frappe.db.get_value", "frappe._dict", "erpnext.stock.get_item_details.get_pos_profile" ]
[((2956, 3008), 'frappe.db.sql', 'frappe.db.sql', (['"""delete from `tabPOS Payment Method`"""'], {}), "('delete from `tabPOS Payment Method`')\n", (2969, 3008), False, 'import frappe\n'), ((3010, 3055), 'frappe.db.sql', 'frappe.db.sql', (['"""delete from `tabPOS Profile`"""'], {}), "('delete from `tabPOS Profile`')\n"...
#################################################################################################### # # nth_root_module.py # # Author: # <NAME> # # The module for learning facts about the nth root. Note that for each n, "NthRoot(n)" is a # different function # # ######################################################...
[ "polya.main.messages.announce_module", "polya.main.terms.Var", "polya.main.terms.root", "polya.util.timer.start", "polya.util.timer.stop" ]
[((1027, 1076), 'polya.main.messages.announce_module', 'messages.announce_module', (['"""nth root value module"""'], {}), "('nth root value module')\n", (1051, 1076), True, 'import polya.main.messages as messages\n'), ((1085, 1108), 'polya.util.timer.start', 'timer.start', (['timer.ROOT'], {}), '(timer.ROOT)\n', (1096,...
import tensorflow as tf from tensorflow.keras.layers import Embedding, Bidirectional, LSTM, Dense from tensorflow.python.framework.func_graph import convert_structure_to_signature class Char_level_bidirectional(tf.keras.Model): def __init__(self, vocab_size, embedding_dim, rnn_units): super().__init__(se...
[ "tensorflow.keras.layers.Embedding", "tensorflow.keras.layers.LSTM", "tensorflow.zeros", "tensorflow.keras.layers.Dense" ]
[((465, 532), 'tensorflow.keras.layers.Embedding', 'Embedding', ([], {'input_dim': 'self.vocab_size', 'output_dim': 'self.embedding_dim'}), '(input_dim=self.vocab_size, output_dim=self.embedding_dim)\n', (474, 532), False, 'from tensorflow.keras.layers import Embedding, Bidirectional, LSTM, Dense\n'), ((724, 741), 'ten...
from typing import Callable, List, NoReturn, Optional, Union import numpy as np from nptyping import Array from .metrics import Metrics from .range import Range def _validate_heartbeats(heartbeats: List[int]) -> [None, NoReturn]: # TODO: Custom error class # TODO: Validate heartbeats length. They should con...
[ "numpy.count_nonzero", "numpy.average", "numpy.ndenumerate", "numpy.std", "numpy.percentile", "numpy.mean", "numpy.array" ]
[((960, 1002), 'numpy.percentile', 'np.percentile', (['data', 'low_border_percentile'], {}), '(data, low_border_percentile)\n', (973, 1002), True, 'import numpy as np\n'), ((1021, 1064), 'numpy.percentile', 'np.percentile', (['data', 'high_border_percentile'], {}), '(data, high_border_percentile)\n', (1034, 1064), True...
# -*- coding: utf-8 -*- """Top-level package for bleak.""" __author__ = """<NAME>""" __email__ = "<EMAIL>" import os import sys import logging import platform import asyncio from bleak.__version__ import __version__ # noqa: F401 from bleak.backends.bluezdbus import check_bluez_version from bleak.exc import BleakEr...
[ "bleak.exc.BleakError", "argparse.ArgumentParser", "logging.StreamHandler", "bleak.backends.bluezdbus.check_bluez_version", "os.environ.get", "logging.Formatter", "platform.win32_ver", "logging.NullHandler", "platform.system", "logging.getLogger" ]
[((414, 441), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (431, 441), False, 'import logging\n'), ((335, 364), 'os.environ.get', 'os.environ.get', (['"""READTHEDOCS"""'], {}), "('READTHEDOCS')\n", (349, 364), False, 'import os\n'), ((461, 482), 'logging.NullHandler', 'logging.NullHandl...
# Generated by Django 3.2.4 on 2021-11-15 05:38 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('players', '0003_rename_u...
[ "django.db.models.OneToOneField", "django.db.migrations.swappable_dependency", "django.db.models.BigAutoField", "django.db.models.CharField", "django.db.models.IntegerField" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((479, 575), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '...
import time from parking_lot.entities.parking_lot import ParkingLot from parking_lot.repositories.parking_slot import ParkingSlotRepository from typing import List from parking_lot.entities.car import Car from parking_lot.entities.merchant import Merchant from parking_lot.repositories.car import CarRepository from park...
[ "parking_lot.exceptions.ParkingLotExistsException", "parking_lot.repositories.parking_slot.ParkingSlotRepository", "parking_lot.exceptions.ParkingLotNotExistsException", "parking_lot.repositories.parking_lots.ParkingLotRepository", "time.strftime", "parking_lot.entities.parking_slot.ParkingSlot", "parki...
[((719, 751), 'parking_lot.entities.merchant.Merchant', 'Merchant', (['(1)', '"""ABC"""', '"""2020-01-01"""'], {}), "(1, 'ABC', '2020-01-01')\n", (727, 751), False, 'from parking_lot.entities.merchant import Merchant\n'), ((812, 834), 'parking_lot.repositories.parking_lots.ParkingLotRepository', 'ParkingLotRepository',...
from abc import abstractmethod from misc.learn_weights.entities_strategy.best import Best from tools.cache_manager import CacheManager class AbsMetric(object): def __init__(self, cache_dir='../examples/caches', pre_processors=None, multipleEntitiesStrategy=Best()): """ Initiates the extractor, w...
[ "misc.learn_weights.entities_strategy.best.Best", "tools.cache_manager.CacheManager.instance" ]
[((264, 270), 'misc.learn_weights.entities_strategy.best.Best', 'Best', ([], {}), '()\n', (268, 270), False, 'from misc.learn_weights.entities_strategy.best import Best\n'), ((618, 641), 'tools.cache_manager.CacheManager.instance', 'CacheManager.instance', ([], {}), '()\n', (639, 641), False, 'from tools.cache_manager ...
from django.apps import apps from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from .conf import LOGIN_TYPE_MA, LOGIN_TYPE_XBL, config from .models import MicrosoftAccount, XboxLiveAccount __all__ = [ "MicrosoftAccountA...
[ "django.contrib.admin.site.is_registered", "django.contrib.auth.get_user_model", "django.contrib.admin.site.register", "django.contrib.admin.register", "django.apps.apps.is_installed", "django.contrib.admin.site.unregister" ]
[((451, 467), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (465, 467), False, 'from django.contrib.auth import get_user_model\n'), ((596, 625), 'django.apps.apps.is_installed', 'apps.is_installed', (['"""djangoql"""'], {}), "('djangoql')\n", (613, 625), False, 'from django.apps import apps\...