code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import win32gui import win32ui import ctypes import pywinauto from pywinauto.application import Application from pywinauto import Desktop from PIL import Image import subprocess import os # windows only solution # the way to get all applications (including jars and programs that start through the command line) is # by ...
[ "pywinauto.Desktop", "win32gui.GetWindowRect", "win32gui.GetWindowDC", "subprocess.Popen", "win32ui.CreateDCFromHandle", "pywinauto.application.Application", "pywinauto.actionlogger.disable", "os.path.basename", "win32gui.ReleaseDC", "PIL.Image.frombuffer", "win32ui.CreateBitmap" ]
[((637, 669), 'pywinauto.actionlogger.disable', 'pywinauto.actionlogger.disable', ([], {}), '()\n', (667, 669), False, 'import pywinauto\n'), ((1921, 1954), 'win32gui.GetWindowRect', 'win32gui.GetWindowRect', (['self.hwnd'], {}), '(self.hwnd)\n', (1943, 1954), False, 'import win32gui\n'), ((2007, 2038), 'win32gui.GetWi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ The DomainSearchViewerGUI is a Graphical user interface (GUI) as a supplement to the Viewer. """ import sys import os from PyQt5.Qt import QMainWindow, QSqlDatabase, QMessageBox, QLabel, QPixmap, \ QTabWidget, Qt, QWidget, QSqlRelationalTableModel, QSqlTableMode...
[ "PyQt5.Qt.QTableView", "PyQt5.Qt.QComboBox", "sys.exit", "PyQt5.Qt.QSqlRelationalTableModel", "PyQt5.Qt.QDateTime.currentDateTime", "PyQt5.Qt.QLineEdit", "PyQt5.Qt.QGridLayout", "PyQt5.Qt.QSqlDatabase.addDatabase", "PyQt5.Qt.QGroupBox", "PyQt5.Qt.QLabel", "PyQt5.Qt.pyqtSlot", "PyQt5.Qt.QApplic...
[((35615, 35625), 'PyQt5.Qt.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (35623, 35625), False, 'from PyQt5.Qt import QMainWindow, QSqlDatabase, QMessageBox, QLabel, QPixmap, QTabWidget, Qt, QWidget, QSqlRelationalTableModel, QSqlTableModel, QTableView, QLineEdit, QComboBox, QGroupBox, QPushButton, QVBoxLayout, QGridLayout...
from typing import Generic, TypeVar, Iterable import asyncio import logging from aioreactive.core import AsyncObserver, AsyncObservable from aioreactive.core import AsyncSingleStream, AsyncDisposable log = logging.getLogger(__name__) T = TypeVar('T') class FromIterable(AsyncObservable, Generic[T]): def __init_...
[ "logging.getLogger", "aioreactive.core.AsyncDisposable", "typing.TypeVar" ]
[((208, 235), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (225, 235), False, 'import logging\n'), ((240, 252), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (247, 252), False, 'from typing import Generic, TypeVar, Iterable\n'), ((648, 671), 'aioreactive.core.AsyncDisposabl...
#!/usr/bin/python3 from brownie import Dogeviathan, accounts, network, config from pathlib import Path def main(): print("Working on " + network.show_active()) dogeviathan = Dogeviathan[len(Dogeviathan) - 1] number_of_voids = dogeviathan.tokenCounter() print( "The number of tokens you've depl...
[ "brownie.accounts.add", "brownie.network.show_active", "pathlib.Path" ]
[((1073, 1116), 'brownie.accounts.add', 'accounts.add', (["config['wallets']['from_key']"], {}), "(config['wallets']['from_key'])\n", (1085, 1116), False, 'from brownie import Dogeviathan, accounts, network, config\n'), ((1132, 1184), 'brownie.accounts.add', 'accounts.add', (["config['wallets']['from_attacker_key']"], ...
from DictHelper import DictHelper from ContainerStatsStreamPool import ContainerStatsStreamPool from DockerFormatter import DockerFormatter from DockerStatsClient import DockerStatsClient import docker from distutils.version import StrictVersion import logging import sys class DependencyResolver: resolver = None ...
[ "logging.getLogger", "logging.StreamHandler", "DictHelper.DictHelper", "docker.Client", "distutils.version.StrictVersion" ]
[((2606, 2633), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2623, 2633), False, 'import logging\n'), ((2690, 2723), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (2711, 2723), False, 'import logging\n'), ((1103, 1172), 'docker.Client', 'dock...
from kaishi.image.util import validate_image_header def test_validate_image_header(): invalid_file = "tests/data/image/empty_unsupported_extension.gif" valid_file = "tests/data/image/sample.jpg" assert validate_image_header(invalid_file) is False assert validate_image_header(valid_file) is True
[ "kaishi.image.util.validate_image_header" ]
[((216, 251), 'kaishi.image.util.validate_image_header', 'validate_image_header', (['invalid_file'], {}), '(invalid_file)\n', (237, 251), False, 'from kaishi.image.util import validate_image_header\n'), ((272, 305), 'kaishi.image.util.validate_image_header', 'validate_image_header', (['valid_file'], {}), '(valid_file)\...
# Create dummy variables for categorical features with less than 5 unique values import pandas as pd from sklearn.preprocessing import LabelEncoder import gc import datetime import calendar import xgboost as xgb # import logger.py from logger import logger # set iteration iteration = '3' logger.info('Start data_pre...
[ "datetime.datetime", "pandas.isnull", "sklearn.preprocessing.LabelEncoder", "logger.logger.info", "pandas.read_csv", "pandas.get_dummies", "gc.collect", "pandas.read_table", "pandas.DataFrame", "xgboost.DMatrix", "pandas.concat", "pandas.to_datetime" ]
[((293, 348), 'logger.logger.info', 'logger.info', (["('Start data_prep_full' + iteration + '.py')"], {}), "('Start data_prep_full' + iteration + '.py')\n", (304, 348), False, 'from logger import logger\n'), ((373, 408), 'pandas.read_table', 'pd.read_table', (['"""train.csv"""'], {'sep': '""","""'}), "('train.csv', sep...
import numpy as np #Creando la matriz tablero = np.zeros(30) tableroFuturo = np.zeros(30) #Estado inicial tablero[1] = 1 tablero[4] = 1 tablero[5] = 1 tablero[7] = 1 tablero[9] = 1 tablero[11] = 1 tablero[13] = 1 tablero[14] = 1 contador = 0 def buscarCelulas(matrizBC): for j in range(30): valor ...
[ "numpy.zeros" ]
[((52, 64), 'numpy.zeros', 'np.zeros', (['(30)'], {}), '(30)\n', (60, 64), True, 'import numpy as np\n'), ((82, 94), 'numpy.zeros', 'np.zeros', (['(30)'], {}), '(30)\n', (90, 94), True, 'import numpy as np\n'), ((2263, 2275), 'numpy.zeros', 'np.zeros', (['(30)'], {}), '(30)\n', (2271, 2275), True, 'import numpy as np\n...
import pytest import schedule from orchestrator.cli.scheduler import run from orchestrator.schedules import ALL_SCHEDULERS from orchestrator.schedules.scheduling import scheduler def test_scheduling_with_period(capsys, monkeypatch): ref = {"called": False} @scheduler(name="test", time_unit="second", period...
[ "orchestrator.schedules.ALL_SCHEDULERS.append", "orchestrator.cli.scheduler.run", "orchestrator.schedules.scheduling.scheduler", "pytest.raises", "orchestrator.schedules.ALL_SCHEDULERS.clear" ]
[((271, 323), 'orchestrator.schedules.scheduling.scheduler', 'scheduler', ([], {'name': '"""test"""', 'time_unit': '"""second"""', 'period': '(1)'}), "(name='test', time_unit='second', period=1)\n", (280, 323), False, 'from orchestrator.schedules.scheduling import scheduler\n'), ((458, 480), 'orchestrator.schedules.ALL...
import bs4 import re import string from .parser import Parser SOLVED_TABLE_PARAMS = [ "solved_last_24_hours", "solved_last_7_days", "solved_last_30_days", "overall_solved", "overall_attempted", ] USER_INFO_PARAMS = { "registered": "Register:", "last_seen": "Last seen:", "school": "Sch...
[ "bs4.BeautifulSoup", "re.sub", "re.compile" ]
[((910, 957), 'bs4.BeautifulSoup', 'bs4.BeautifulSoup', (['response.text', '"""html.parser"""'], {}), "(response.text, 'html.parser')\n", (927, 957), False, 'import bs4\n'), ((1363, 1389), 're.sub', 're.sub', (['"""\\\\D"""', '""""""', 'user_id'], {}), "('\\\\D', '', user_id)\n", (1369, 1389), False, 'import re\n'), ((...
""" Dynamic Routing Between Capsules Personal Implementation. Created on 2021/6/30 Capsule pathway @date 2021.6.30 @author <NAME> """ import torch from torch import nn from torch.nn import functional as F from torch.autograd import Variable as Var class CapsNet(nn.Module): def __init__(self, ...
[ "torch.nn.Sigmoid", "torch.nn.ReLU", "torch.sqrt", "torch.nn.Conv2d", "torch.softmax", "torch.arange", "torch.sum", "torch.normal", "torch.nn.Linear", "torch.zeros", "torch.nn.functional.softmax", "torch.cat" ]
[((1449, 1469), 'torch.cat', 'torch.cat', (['y'], {'dim': '(-1)'}), '(y, dim=-1)\n', (1458, 1469), False, 'import torch\n'), ((2379, 2403), 'torch.softmax', 'torch.softmax', (['Bs'], {'dim': '(1)'}), '(Bs, dim=1)\n', (2392, 2403), False, 'import torch\n'), ((2677, 2716), 'torch.sum', 'torch.sum', (['(x ** 2)'], {'dim':...
""" String representation for various data objects """ from collections import OrderedDict as odict import numpy as np import json import dimarray as da from dimarray.config import get_option def str_attrs(meta, indent=4): return "\n".join([" "*indent+"{}: {}".format(key, repr(meta[key])) for key in meta.keys()])...
[ "collections.OrderedDict", "dimarray.config.get_option", "numpy.isnan" ]
[((3620, 3627), 'collections.OrderedDict', 'odict', ([], {}), '()\n', (3625, 3627), True, 'from collections import OrderedDict as odict\n'), ((2966, 2991), 'dimarray.config.get_option', 'get_option', (['"""display.max"""'], {}), "('display.max')\n", (2976, 2991), False, 'from dimarray.config import get_option\n'), ((33...
from flask.ext.mongoengine import MongoEngine db = MongoEngine() class User(db.Document): sub = db.StringField(required=True, primary_key=True) class Survey(db.Document): survey_id = db.StringField(required=True, primary_key=True) name = db.StringField(required=True) base_url = db.StringField(requi...
[ "flask.ext.mongoengine.MongoEngine" ]
[((52, 65), 'flask.ext.mongoengine.MongoEngine', 'MongoEngine', ([], {}), '()\n', (63, 65), False, 'from flask.ext.mongoengine import MongoEngine\n')]
from functools import wraps from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import redirect from django.utils.decorators import available_attrs from django.shortcuts import get_object_or_404 from helpdesk import settings as helpdesk_settings from helpdesk.mod...
[ "django.core.exceptions.PermissionDenied", "django.shortcuts.get_object_or_404", "django.shortcuts.redirect", "django.utils.decorators.available_attrs" ]
[((750, 776), 'django.shortcuts.redirect', 'redirect', (['"""helpdesk:login"""'], {}), "('helpdesk:login')\n", (758, 776), False, 'from django.shortcuts import redirect\n'), ((548, 574), 'django.utils.decorators.available_attrs', 'available_attrs', (['view_func'], {}), '(view_func)\n', (563, 574), False, 'from django.u...
import yaml import numpy as np from glob import glob def get_entity_name(entity_spec_file): with open(entity_spec_file, "rb") as f: entity_spec = yaml.safe_load(f) assert "name" in entity_spec return entity_spec["name"] def get_feature_infos(feature_specs_files): value_type_to_dtype = { ...
[ "yaml.safe_load", "glob.glob" ]
[((160, 177), 'yaml.safe_load', 'yaml.safe_load', (['f'], {}), '(f)\n', (174, 177), False, 'import yaml\n'), ((484, 509), 'glob.glob', 'glob', (['feature_specs_files'], {}), '(feature_specs_files)\n', (488, 509), False, 'from glob import glob\n'), ((580, 597), 'yaml.safe_load', 'yaml.safe_load', (['f'], {}), '(f)\n', (...
import os import shutil import tempfile from datetime import timedelta, datetime from typing import Collection, Iterator from unittest.mock import Mock, ANY, call import pytest from kong import util from kong.config import Config, slurm_schema from kong.drivers import InvalidJobStatus, get_driver from kong.drivers.ht...
[ "datetime.datetime.utcfromtimestamp", "datetime.timedelta", "kong.model.folder.Folder.get_root", "datetime.datetime", "os.path.exists", "kong.drivers.htcondor_driver.ShellHTCondorInterface", "unittest.mock.call", "kong.model.job.Job.get_or_none", "kong.drivers.htcondor_driver.HTCondorDriver", "tem...
[((719, 731), 'kong.config.Config', 'Config', (['data'], {}), '(data)\n', (725, 731), False, 'from kong.config import Config, slurm_schema\n'), ((902, 926), 'kong.drivers.htcondor_driver.ShellHTCondorInterface', 'ShellHTCondorInterface', ([], {}), '()\n', (924, 926), False, 'from kong.drivers.htcondor_driver import HTC...
from src.utilities.app_context import LOG_WITHOUT_CONTEXT from anuvaad_auditor.loghandler import log_info, log_exception import csv import uuid class ParseCSV (object): def __init__(self): pass def get_parallel_sentences(filename, source_language, target_language, skip_header=True): parallel_s...
[ "anuvaad_auditor.loghandler.log_info", "csv.reader", "uuid.uuid4" ]
[((342, 428), 'anuvaad_auditor.loghandler.log_info', 'log_info', (["('parsing parallel sentence from file %s' % filename)", 'LOG_WITHOUT_CONTEXT'], {}), "('parsing parallel sentence from file %s' % filename,\n LOG_WITHOUT_CONTEXT)\n", (350, 428), False, 'from anuvaad_auditor.loghandler import log_info, log_exception...
from re import X import torch import torch.nn as nn import torch.nn.functional as F from ..utils import Conv_BN_ReLU class ChannelAttention(nn.Module): def __init__(self, in_planes, pool_size, ratio=16): super(ChannelAttention, self).__init__() self.avg_pool = nn.AdaptiveAvgPool2d(pool_size) ...
[ "torch.nn.Sigmoid", "torch.nn.Softmax", "torch.nn.AdaptiveAvgPool2d", "torch.bmm", "torch.nn.AdaptiveMaxPool2d", "torch.cat" ]
[((285, 316), 'torch.nn.AdaptiveAvgPool2d', 'nn.AdaptiveAvgPool2d', (['pool_size'], {}), '(pool_size)\n', (305, 316), True, 'import torch.nn as nn\n'), ((341, 372), 'torch.nn.AdaptiveMaxPool2d', 'nn.AdaptiveMaxPool2d', (['pool_size'], {}), '(pool_size)\n', (361, 372), True, 'import torch.nn as nn\n'), ((1894, 1911), 't...
# MIT License # # Copyright (c) 2016-2018 <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, ...
[ "logging.getLogger", "numpy.insert", "numpy.mean", "matplotlib.pyplot.savefig", "matplotlib.use", "matplotlib.pyplot.gca", "os.path.join", "matplotlib.pyplot.cm.inferno", "numpy.append", "matplotlib.ticker.ScalarFormatter", "matplotlib.pyplot.tight_layout", "numpy.maximum", "matplotlib.lines...
[((1261, 1284), 'matplotlib.use', 'matplotlib.use', (['"""TkAgg"""'], {}), "('TkAgg')\n", (1275, 1284), False, 'import matplotlib\n'), ((1348, 1375), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1365, 1375), False, 'import logging\n'), ((10199, 10229), 'matplotlib.pyplot.subplots', 'pl...
from node import Node import sys client = Node(sys.argv[1],0)
[ "node.Node" ]
[((43, 63), 'node.Node', 'Node', (['sys.argv[1]', '(0)'], {}), '(sys.argv[1], 0)\n', (47, 63), False, 'from node import Node\n')]
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .forms import UserChangeForm from anuncios.models import Anuncio, AnuncioCidade mensagem='Atualize suas informações de conta para poder cadastrar um anúncio ou trocar mensagens com outros usuários.' @login_req...
[ "django.shortcuts.render", "anuncios.models.AnuncioCidade.objects.filter", "anuncios.models.Anuncio.objects.filter", "django.shortcuts.redirect", "anuncios.models.AnuncioCidade.objects.create" ]
[((452, 545), 'django.shortcuts.render', 'render', (['request', '"""usuarios/usuario_info.html"""', "{'usuario': usuario, 'mensagem': mensagem}"], {}), "(request, 'usuarios/usuario_info.html', {'usuario': usuario,\n 'mensagem': mensagem})\n", (458, 545), False, 'from django.shortcuts import render, redirect\n'), ((5...
import cv2,os import numpy as np from keras.applications.vgg16 import decode_predictions from keras.applications import ResNet50, Xception, InceptionV3, VGG16, VGG19 from keras.preprocessing import image as Image from keras.applications.vgg16 import preprocess_input from tqdm import tqdm from skimage import feat...
[ "keras.preprocessing.image.img_to_array", "numpy.array", "numpy.arange", "numpy.save", "keras.applications.Xception", "os.listdir", "keras.applications.vgg16.preprocess_input", "keras.applications.VGG16", "keras.applications.VGG19", "keras.applications.InceptionV3", "cv2.cvtColor", "keras.appl...
[((1350, 1357), 'tqdm.tqdm', 'tqdm', (['f'], {}), '(f)\n', (1354, 1357), False, 'from tqdm import tqdm\n'), ((1674, 1730), 'keras.preprocessing.image.load_img', 'Image.load_img', (['img_path'], {'target_size': '(im_size, im_size)'}), '(img_path, target_size=(im_size, im_size))\n', (1688, 1730), True, 'from keras.prepro...
import copy import os import shutil import sys import time import PyTango import numpy import p05.common.PyTangoProxyConstants as proxies import p05.tools.misc as misc from p05.nanoCameras import FLIeh2_nanoCam, Hamamatsu_nanoCam, KIT_nanoCam, Lambda_nanoCam, PCO_nanoCam, \ PixelLink_nanoCam, Zyla_nanoCam from p0...
[ "time.sleep", "p05.tools.misc.GetTimeString", "p05.scripts.OptimizePitch.OptimizePitch", "sys.exit", "copy.copy", "numpy.mod", "os.path.exists", "p05.nanoCameras.KIT_nanoCam", "shutil.copy2", "os.path.split", "p05.nanoCameras.Hamamatsu_nanoCam", "os.mkdir", "p05.nanoCameras.PCO_nanoCam", "...
[((3370, 3446), 'shutil.copy2', 'shutil.copy2', (['currScript', "(self.sPath + '%s__LogScript.py.log' % self.sPrefix)"], {}), "(currScript, self.sPath + '%s__LogScript.py.log' % self.sPrefix)\n", (3382, 3446), False, 'import shutil\n'), ((3475, 3486), 'time.time', 'time.time', ([], {}), '()\n', (3484, 3486), False, 'im...
# -*- coding: utf-8 -*- """ Created on Mon Oct 5 14:39:35 2015 @author: smichel # NOTE: notes refer to an older data set. Specific examples may not relate to the latest datafiles (which were released in March 2016, at time this note was written.) Check this: Add capability for multiple chapters/sections etc. For ex...
[ "docUtility.get_regex_matches", "docUtility.create_nodelists", "docInfo.get", "unidecode.unidecode", "os.path.isfile", "os.path.isdir", "sys.exit", "docDatabase.database", "docUtility.create_citation_datapoint", "os.walk", "igraph.Graph" ]
[((2326, 2348), 'os.path.isdir', 'os.path.isdir', (['self.fp'], {}), '(self.fp)\n', (2339, 2348), False, 'import os\n'), ((17543, 17570), 'igraph.Graph', 'igraph.Graph', ([], {'directed': '(True)'}), '(directed=True)\n', (17555, 17570), False, 'import igraph\n'), ((2503, 2519), 'os.walk', 'os.walk', (['self.fp'], {}), ...
"""Class definition for the SMAP Enhanced Soil Mositure data type. .. module:: smape :synopsis: Definition of the SMAPE class .. moduleauthor:: <NAME> <<EMAIL>> """ from soilmoist import Soilmoist from datasets import smap table = "soilmoist.smape" dates = smap.dates def download(dbname, dts, bbox=None): ...
[ "datasets.smap.download" ]
[((353, 391), 'datasets.smap.download', 'smap.download', (['dbname', 'dts', 'bbox', '(True)'], {}), '(dbname, dts, bbox, True)\n', (366, 391), False, 'from datasets import smap\n')]
#!/usr/bin/python import sys sys.path.append("..") import game import main g = game.Spielfeld() mw = main.MainWindow(g) with mw: mw.application()
[ "main.MainWindow", "sys.path.append", "game.Spielfeld" ]
[((30, 51), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (45, 51), False, 'import sys\n'), ((81, 97), 'game.Spielfeld', 'game.Spielfeld', ([], {}), '()\n', (95, 97), False, 'import game\n'), ((103, 121), 'main.MainWindow', 'main.MainWindow', (['g'], {}), '(g)\n', (118, 121), False, 'import main...
# # Copyright (c) 2016 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 requ...
[ "collections.OrderedDict" ]
[((2041, 2110), 'collections.OrderedDict', 'OrderedDict', (["(('name', self.name), ('description', self.description))"], {}), "((('name', self.name), ('description', self.description)))\n", (2052, 2110), False, 'from collections import OrderedDict\n')]
# Copyright (c) 2021, <NAME> # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the follow...
[ "pickle.loads", "pickle.dumps", "itsdangerous.Serializer" ]
[((3217, 3238), 'pickle.loads', 'pickle.loads', (['message'], {}), '(message)\n', (3229, 3238), False, 'import pickle\n'), ((5074, 5107), 'pickle.dumps', 'pickle.dumps', (['(cmd, cmd_id, args)'], {}), '((cmd, cmd_id, args))\n', (5086, 5107), False, 'import pickle\n'), ((6208, 6247), 'itsdangerous.Serializer', 'Serializ...
"""Test cases for the `if (not)` tag..""" # pylint: disable=missing-class-docstring,missing-function-docstring,too-many-lines from unittest import TestCase from typing import Mapping from typing import NamedTuple from typing import Any from liquid.context import Context from liquid.environment import Environment fro...
[ "liquid.expression.IdentifierPathElement", "liquid_extra.tags.if_not.NotExpressionParser", "liquid_extra.tags.if_not.tokenize_boolean_not_expression", "liquid.loaders.DictLoader", "liquid.environment.Environment", "liquid.expression.StringLiteral", "liquid.context.Context", "liquid.token.Token", "li...
[((18212, 18233), 'liquid_extra.tags.if_not.NotExpressionParser', 'NotExpressionParser', ([], {}), '()\n', (18231, 18233), False, 'from liquid_extra.tags.if_not import NotExpressionParser\n'), ((18624, 18637), 'liquid.environment.Environment', 'Environment', ([], {}), '()\n', (18635, 18637), False, 'from liquid.environ...
# Array operation # Type: list, map() call. This method requires allocation of # the same amount of memory as original array (to hold result # array). On the other hand, input array stays intact. import bench def test(num): for i in iter(range(num//10000)): arr = bytearray(b"\0" * 1000) arr2 = byte...
[ "bench.run" ]
[((354, 369), 'bench.run', 'bench.run', (['test'], {}), '(test)\n', (363, 369), False, 'import bench\n')]
""" Scrape all the Garfield comic strips """ from datetime import date, timedelta from urllib.request import urlretrieve from multiprocessing.pool import ThreadPool from time import time as timer import os from time import sleep base_url = "https://d1ejxu6vysztl5.cloudfront.net/comics/garfield/" # Calculate days fro...
[ "urllib.request.urlretrieve", "datetime.timedelta", "multiprocessing.pool.ThreadPool", "datetime.date", "datetime.date.today", "time.time" ]
[((348, 365), 'datetime.date', 'date', (['(1978)', '(6)', '(19)'], {}), '(1978, 6, 19)\n', (352, 365), False, 'from datetime import date, timedelta\n'), ((385, 397), 'datetime.date.today', 'date.today', ([], {}), '()\n', (395, 397), False, 'from datetime import date, timedelta\n'), ((983, 990), 'time.time', 'timer', ([...
#1 print() 를 이용 다음 내용을 출력 from builtins import print print("* * * **** **** * * /////"); print("* * * * * * * * * * │ o o │"); print("***** * * **** **** * * (│ ^ │)"); print("* * ***** * * * * * │ [_] │"); print("* * * * * * * * ...
[ "random.random", "builtins.print", "random.randint" ]
[((54, 108), 'builtins.print', 'print', (['"""* * * **** **** * * /////"""'], {}), "('* * * **** **** * * /////')\n", (59, 108), False, 'from builtins import print\n'), ((110, 165), 'builtins.print', 'print', (['"""* * * * * * * * * * │ o o │"""'], {}), "('* ...
from coco.common.utils import ClassLoader from coco.contract.backends import ContainerBackend from coco.core import settings from coco.core.validators import validate_json_format from django.contrib.auth.models import Group, User from django.core.exceptions import ValidationError from django.core.validators import Rege...
[ "coco.core.signals.signals.container_restarted.send", "django.db.models.TextField", "django.core.exceptions.ValidationError", "django.contrib.auth.models.Group.objects.latest", "coco.core.signals.signals.container_resumed.send", "django.utils.encoding.smart_unicode", "coco.core.signals.signals.container...
[((1397, 1431), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (1413, 1431), False, 'from django.db import models\n'), ((1443, 1585), 'django.db.models.CharField', 'models.CharField', ([], {'choices': 'BACKEND_KINDS', 'default': 'CONTAINER_BACKEND', 'max_lengt...
import os import gym import time import tqdm import torch import torch.nn.functional as F import numpy as np from rlplay.utils import ToTensor from rlplay.utils import AtariObservation, ObservationQueue, FrameSkip from rlplay.utils import RandomNullopsOnReset, TerminateOnLostLife from rlplay.utils import get_instanc...
[ "rlplay.utils.ToTensor", "torch.from_numpy", "gym.make", "rlplay.utils.AtariObservation", "rlplay.buffer.SimpleBuffer", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.pyplot.gca", "time.monotonic", "rlplay.utils.greedy", "rlplay.utils.get_instance", "os.path.isfile", "r...
[((1311, 1326), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (1324, 1326), False, 'import torch\n'), ((3540, 3574), 'gym.make', 'gym.make', (['"""BreakoutNoFrameskip-v4"""'], {}), "('BreakoutNoFrameskip-v4')\n", (3548, 3574), False, 'import gym\n'), ((3581, 3622), 'rlplay.utils.RandomNullopsOnReset', 'RandomNull...
import os, time from slackclient import SlackClient from pyslack import SlackClient as slackclient client = slackclient(os.environ.get('SLACK_BOT_TOKEN')) BOT_NAME = 'aws_bot' slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) # starterbot's ID as an environment variable # BOT_ID = os.environ.get("BOT_ID") ...
[ "os.environ.get", "time.sleep" ]
[((121, 154), 'os.environ.get', 'os.environ.get', (['"""SLACK_BOT_TOKEN"""'], {}), "('SLACK_BOT_TOKEN')\n", (135, 154), False, 'import os, time\n'), ((204, 237), 'os.environ.get', 'os.environ.get', (['"""SLACK_BOT_TOKEN"""'], {}), "('SLACK_BOT_TOKEN')\n", (218, 237), False, 'import os, time\n'), ((4138, 4170), 'time.sl...
from datetime import datetime from floor_plan_project.floor_plans.services import utils import os from os.path import dirname class SQLBuilder: @classmethod def get_attrs(cls, obj, closed=True): res = '' for attr in obj: if closed: res += "\'" + attr + "\', " ...
[ "os.path.dirname", "floor_plan_project.floor_plans.services.utils.extract_urls_from_csv", "datetime.datetime.now" ]
[((1458, 1511), 'floor_plan_project.floor_plans.services.utils.extract_urls_from_csv', 'utils.extract_urls_from_csv', (['csv_path', '(100001)', '(100200)'], {}), '(csv_path, 100001, 100200)\n', (1485, 1511), False, 'from floor_plan_project.floor_plans.services import utils\n'), ((1412, 1429), 'os.path.dirname', 'dirnam...
from django.shortcuts import render from django.http import JsonResponse from apps.orders.decorators import get_cart_and_order from .models import PromoCode # Create your views here. @get_cart_and_order def validate(request, cart, order): code = request.GET.get('code') promo_code = PromoCode.objects.get_vali...
[ "django.http.JsonResponse" ]
[((484, 612), 'django.http.JsonResponse', 'JsonResponse', (["{'status': 'True', 'code': promo_code.code, 'discount': promo_code.discount,\n 'total': order.total}"], {'status': '(500)'}), "({'status': 'True', 'code': promo_code.code, 'discount':\n promo_code.discount, 'total': order.total}, status=500)\n", (496, 6...
from django.db import models # Create your models here. class PortfolioTransaction(models.Model): datetime = models.DateTimeField() equityType = models.CharField(max_length=10) equityName = models.CharField(max_length=30) units = models.DecimalField(max_digits=20, decimal_places=10) currenc...
[ "django.db.models.DateTimeField", "django.db.models.DecimalField", "django.db.models.CharField" ]
[((118, 140), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {}), '()\n', (138, 140), False, 'from django.db import models\n'), ((159, 190), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(10)'}), '(max_length=10)\n', (175, 190), False, 'from django.db import models\n'), ((209, 2...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is a collection of monkey patches and workarounds for bugs in earlier versions of Numpy. """ from astropy.utils import minversion __all__ = ['NUMPY_LT_1_17', 'NUMPY_LT_1_18', 'NUMPY_LT_1_19'] # TODO: It might also be nice to have aliases to the...
[ "astropy.utils.minversion" ]
[((452, 479), 'astropy.utils.minversion', 'minversion', (['"""numpy"""', '"""1.17"""'], {}), "('numpy', '1.17')\n", (462, 479), False, 'from astropy.utils import minversion\n'), ((500, 527), 'astropy.utils.minversion', 'minversion', (['"""numpy"""', '"""1.18"""'], {}), "('numpy', '1.18')\n", (510, 527), False, 'from as...
"""Test drawing module """ import pytest import numpy as np from shellplot.axis import Axis from shellplot.drawing import ( LegendItem, _draw_canvas, _draw_legend, _draw_x_axis, _draw_y_axis, _pad_lines, ) def test_draw_legend(): legend = [LegendItem(1, "one"), LegendItem(2, "two")] ...
[ "shellplot.drawing._draw_canvas", "shellplot.axis.Axis", "shellplot.drawing._draw_y_axis", "shellplot.drawing._draw_x_axis", "pytest.mark.parametrize", "numpy.array", "shellplot.drawing._pad_lines", "shellplot.drawing._draw_legend", "shellplot.drawing.LegendItem" ]
[((405, 566), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""lines,ref_lines,expecte_padded_lines"""', "[(['a', 'b'], ['a', 'b', 'c'], ['', 'a', 'b']), (None, ['a', 'b', 'c'], ['',\n '', ''])]"], {}), "('lines,ref_lines,expecte_padded_lines', [(['a', 'b'\n ], ['a', 'b', 'c'], ['', 'a', 'b']), (None, ...
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="index"), path("wiki", views.index, name="index"), path("wiki/<str:name>", views.page, name="page"), path("w", views.searchPage, name="searchPage"), path("wiki/page/new", views.create, name="create"), p...
[ "django.urls.path" ]
[((71, 106), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (75, 106), False, 'from django.urls import path\n'), ((112, 151), 'django.urls.path', 'path', (['"""wiki"""', 'views.index'], {'name': '"""index"""'}), "('wiki', views.index, name='index')...
"""evaluate model performance TODO - Evaluate by window and by participant (rewrite to make windows) """ import torch import torch.nn.functional as F import torchaudio from transformers import AutoConfig, Wav2Vec2FeatureExtractor, Wav2Vec2ForSequenceClassification import numpy as np import pandas as pd import os ...
[ "torch.nn.functional.softmax", "transformers.AutoConfig.from_pretrained", "sklearn.metrics.classification_report", "torchaudio.load", "transformers.Wav2Vec2ForSequenceClassification.from_pretrained", "os.path.join", "numpy.argmax", "transformers.Wav2Vec2FeatureExtractor.from_pretrained", "torchaudio...
[((418, 479), 'os.path.join', 'os.path.join', (['"""model"""', '"""xlsr_autism_stories"""', '"""checkpoint-10"""'], {}), "('model', 'xlsr_autism_stories', 'checkpoint-10')\n", (430, 479), False, 'import os\n'), ((1706, 1744), 'transformers.AutoConfig.from_pretrained', 'AutoConfig.from_pretrained', (['MODEL_PATH'], {}),...
import socket import http.server import socketserver # tasklist # /IM py37.exe /F # hostname = socket.gethostname() PORT = 8000 IP = socket.gethostbyname(hostname) print('serving on:', IP) Handler = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer(('', PORT), Handler) as httpd: print('PORT:', POR...
[ "socket.gethostbyname", "socketserver.TCPServer", "socket.gethostname" ]
[((97, 117), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (115, 117), False, 'import socket\n'), ((135, 165), 'socket.gethostbyname', 'socket.gethostbyname', (['hostname'], {}), '(hostname)\n', (155, 165), False, 'import socket\n'), ((244, 287), 'socketserver.TCPServer', 'socketserver.TCPServer', (["('...
# authors: anonymous import numpy as np import time # Sectect action based on the the action-state function with a softmax strategy def softmax_action(Q, s): proba=np.exp(Q[s, :])/np.exp(Q[s, :]).sum() nb_actions = Q.shape[1] return np.random.choice(nb_actions, p=proba) # Select the best action bas...
[ "numpy.mean", "numpy.nan_to_num", "numpy.divide", "numpy.random.choice", "numpy.argmax", "numpy.exp", "numpy.sum", "numpy.zeros", "numpy.einsum", "time.localtime", "numpy.arange" ]
[((249, 286), 'numpy.random.choice', 'np.random.choice', (['nb_actions'], {'p': 'proba'}), '(nb_actions, p=proba)\n', (265, 286), True, 'import numpy as np\n'), ((385, 403), 'numpy.argmax', 'np.argmax', (['Q[s, :]'], {}), '(Q[s, :])\n', (394, 403), True, 'import numpy as np\n'), ((523, 532), 'numpy.exp', 'np.exp', (['Q...
import unittest from codebreaker import CodeBreaker class TestCodeBreaker(unittest.TestCase): """Class to check a CodeBreaker implementation.""" def test_CodeBreakerGetsPoint(self): """Check if CodeBreaker gets points.""" player = CodeBreaker() self.assertEqual(player.points, 0) ...
[ "codebreaker.CodeBreaker" ]
[((259, 272), 'codebreaker.CodeBreaker', 'CodeBreaker', ([], {}), '()\n', (270, 272), False, 'from codebreaker import CodeBreaker\n'), ((499, 512), 'codebreaker.CodeBreaker', 'CodeBreaker', ([], {}), '()\n', (510, 512), False, 'from codebreaker import CodeBreaker\n'), ((802, 815), 'codebreaker.CodeBreaker', 'CodeBreake...
import requests from alliancepy.cache import Cache import json import logging import time # MIT License # # Copyright (c) 2020 <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 withou...
[ "logging.getLogger", "json.loads", "requests.Session", "time.sleep", "alliancepy.cache.Cache" ]
[((1202, 1229), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1219, 1229), False, 'import logging\n'), ((1282, 1289), 'alliancepy.cache.Cache', 'Cache', ([], {}), '()\n', (1287, 1289), False, 'from alliancepy.cache import Cache\n'), ((1385, 1403), 'requests.Session', 'requests.Session',...
import numpy as np import os from struct import unpack from .defaultreader import DefaultReader class StlReader(DefaultReader): """ @type _facets: dict[str, list[tuple[tuple[float]]]] @type _norms: dict[str, list[tuple[float]]] """ def __init__(self): self._facets = {} self._norms...
[ "os.path.exists", "numpy.dtype", "struct.unpack", "numpy.fromfile" ]
[((879, 1046), 'numpy.dtype', 'np.dtype', (["[('normals', np.float32, (3,)), ('Vertex1', np.float32, (3,)), ('Vertex2',\n np.float32, (3,)), ('Vertex3', np.float32, (3,)), ('atttr', '<i2', (1,))]"], {}), "([('normals', np.float32, (3,)), ('Vertex1', np.float32, (3,)), (\n 'Vertex2', np.float32, (3,)), ('Vertex3',...
from django.db import models # Create your models here. class User(models.Model): username = models.CharField(max_length=32, verbose_name='用户姓名') userphone = models.CharField(max_length=16, unique=True, verbose_name='手机号') class Chose(models.Model): color = models.CharField(max_length=12, verbose_name='鞋子...
[ "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((98, 150), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(32)', 'verbose_name': '"""用户姓名"""'}), "(max_length=32, verbose_name='用户姓名')\n", (114, 150), False, 'from django.db import models\n'), ((167, 231), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(16)', 'unique': ...
# # This file is part of the FFEA simulation package # # Copyright (c) by the Theory and Development FFEA teams, # as they appear in the README.md file. # # FFEA 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 ...
[ "os.path.splitext", "sys.stdout.write" ]
[((1607, 1656), 'sys.stdout.write', 'sys.stdout.write', (['"""Loading FFEA skeleton file..."""'], {}), "('Loading FFEA skeleton file...')\n", (1623, 1656), False, 'import os, sys\n'), ((1689, 1712), 'os.path.splitext', 'os.path.splitext', (['fname'], {}), '(fname)\n', (1705, 1712), False, 'import os, sys\n'), ((1892, 1...
import sys, argparse sys.path.append('game/') import flappy_wrapped as game import cv2 import numpy as np import collections import torch import torch.nn as nn import torch.optim as optim KERNEL = np.array([[-1,-1,-1], [-1, 9,-1],[-1,-1,-1]]) def processFrame(frame): frame = frame[55:288,0:400] #crop image fra...
[ "torch.nn.ReLU", "collections.deque", "argparse.ArgumentParser", "cv2.threshold", "torch.load", "flappy_wrapped.GameState", "cv2.filter2D", "torch.nn.Conv2d", "numpy.array", "torch.cuda.is_available", "cv2.cvtColor", "torch.nn.Linear", "cv2.resize", "sys.path.append", "torch.zeros" ]
[((21, 45), 'sys.path.append', 'sys.path.append', (['"""game/"""'], {}), "('game/')\n", (36, 45), False, 'import sys, argparse\n'), ((198, 249), 'numpy.array', 'np.array', (['[[-1, -1, -1], [-1, 9, -1], [-1, -1, -1]]'], {}), '([[-1, -1, -1], [-1, 9, -1], [-1, -1, -1]])\n', (206, 249), True, 'import numpy as np\n'), ((3...
# -*- coding:utf8 -* import heapq import logging import time import pandas as pd import numpy as np import random from ..util import sample_ints from .model_based_tuner import ModelOptimizer, knob2point, point2knob logger = logging.getLogger('autotvm') class RegOptimizer(ModelOptimizer): def __init__(self, tas...
[ "logging.getLogger", "random.sample", "numpy.append", "pandas.DataFrame" ]
[((227, 255), 'logging.getLogger', 'logging.getLogger', (['"""autotvm"""'], {}), "('autotvm')\n", (244, 255), False, 'import logging\n'), ((2453, 2486), 'numpy.append', 'np.append', (['points', 'scores'], {'axis': '(1)'}), '(points, scores, axis=1)\n', (2462, 2486), True, 'import numpy as np\n'), ((2507, 2553), 'pandas...
import numpy as np import pandas as pd import sqlite3 import datetime as dt from bs4 import BeautifulSoup as BS from os.path import basename import time import requests import csv import re import pickle def name_location_scrapper(url): # scrapes a list of teams and their urls r = requests.get(url) sou...
[ "pickle.dump", "pickle.load", "requests.get", "time.sleep", "bs4.BeautifulSoup", "numpy.random.randint", "os.path.basename", "pandas.DataFrame", "pandas.concat" ]
[((295, 312), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (307, 312), False, 'import requests\n'), ((324, 352), 'bs4.BeautifulSoup', 'BS', (['r.content', '"""html.parser"""'], {}), "(r.content, 'html.parser')\n", (326, 352), True, 'from bs4 import BeautifulSoup as BS\n'), ((1488, 1505), 'requests.get', 'r...
# Generated by Django 2.1.5 on 2019-01-24 04:15 from django.db import migrations, models import markdownx.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MarkdownPage', fields=[ ...
[ "django.db.models.DateTimeField", "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((332, 383), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)', 'serialize': '(False)'}), '(primary_key=True, serialize=False)\n', (348, 383), False, 'from django.db import migrations, models\n'), ((411, 443), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)'})...
#! /usr/bin/env python __author__ = 'Tser' __email__ = '<EMAIL>' __project__ = 'jicaiauto' __script__ = 'testJicai.py' __create_time__ = '2020/7/15 23:34' from jicaiauto.jicaiauto import web_action from jicaiauto.utils.jicaiautoEmail import send_email from jicaiauto.data.GLO_VARS import PUBLIC_VARS from jicaiauto.conf...
[ "jicaiauto.data.GLO_VARS.PUBLIC_VARS.update", "pytest.mark.run", "jicaiauto.data.GLO_VARS.PUBLIC_VARS.keys", "time.sleep", "os.path.isfile", "jicaiauto.utils.jicaiautoEmail.send_email", "jicaiauto.jicaiauto.web_action", "os.path.abspath", "jicaiauto.config.config.EMAILCONFIG" ]
[((657, 681), 'jicaiauto.data.GLO_VARS.PUBLIC_VARS.update', 'PUBLIC_VARS.update', (['emil'], {}), '(emil)\n', (675, 681), False, 'from jicaiauto.data.GLO_VARS import PUBLIC_VARS\n'), ((1908, 1932), 'pytest.mark.run', 'pytest.mark.run', ([], {'order': '(1)'}), '(order=1)\n', (1923, 1932), False, 'import pytest\n'), ((74...
#python routines for estimating energy resolution and intensity #<NAME> #Updated 2-19-2013 to include tube efficiency import sys #sys.path.append('/SNS/users/19g/SEQUOIA/commissioning/python') from unit_convert import E2V,E2K import numpy as np from numpy import pi, log, exp, sqrt, tanh, linspace, radians, zeros from s...
[ "pylab.title", "numpy.radians", "numpy.sqrt", "pylab.subplot", "pylab.plot", "numpy.log", "pylab.xlabel", "unit_convert.E2V", "numpy.tanh", "scipy.interpolate.interp1d", "pylab.figure", "unit_convert.E2K", "numpy.linspace", "numpy.array", "pylab.ylabel", "slit_pack.Slit_pack", "pylab...
[((8689, 8733), 'slit_pack.Slit_pack', 'Slit_pack', (['(0.00203)', '(0.58)', '"""SEQ-100-2.03-AST"""'], {}), "(0.00203, 0.58, 'SEQ-100-2.03-AST')\n", (8698, 8733), False, 'from slit_pack import Slit_pack\n'), ((8740, 8784), 'slit_pack.Slit_pack', 'Slit_pack', (['(0.00356)', '(1.53)', '"""SEQ-700-3.56-AST"""'], {}), "(0...
from unittest import TestCase, mock from enlightenme.sources import Source from enlightenme.sources.all_source import AllSource from tests.fixtures import create_news class TestAllSource(TestCase): def setUp(self): self._source = AllSource(reddit_client_id=123, reddit_client_secret=234) def test_ini...
[ "enlightenme.sources.all_source.AllSource.name", "enlightenme.sources.all_source.AllSource.params", "enlightenme.sources.all_source.AllSource", "unittest.mock.patch", "tests.fixtures.create_news" ]
[((1184, 1259), 'unittest.mock.patch', 'mock.patch', (['"""enlightenme.sources.hacker_news_source.HackerNewsSource.fetch"""'], {}), "('enlightenme.sources.hacker_news_source.HackerNewsSource.fetch')\n", (1194, 1259), False, 'from unittest import TestCase, mock\n'), ((1265, 1331), 'unittest.mock.patch', 'mock.patch', ([...
from dna_features_viewer import BiopythonTranslator import numpy as np from copy import deepcopy from Bio import SeqIO import flametree import matplotlib.pyplot as plt from geneblocks import DiffBlocks from .biotools import ( annotate_record, sequence_to_biopython_record, sequences_differences_segments, ...
[ "dna_features_viewer.BiopythonTranslator", "geneblocks.DiffBlocks.from_sequences", "numpy.diff", "matplotlib.pyplot.close", "flametree.file_tree", "copy.deepcopy" ]
[((1705, 1746), 'flametree.file_tree', 'flametree.file_tree', (['target'], {'replace': '(True)'}), '(target, replace=True)\n', (1724, 1746), False, 'import flametree\n'), ((2826, 2846), 'matplotlib.pyplot.close', 'plt.close', (['ax.figure'], {}), '(ax.figure)\n', (2835, 2846), True, 'import matplotlib.pyplot as plt\n')...
# Generated by Django 3.2 on 2021-07-27 10:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ricerca_app', '0012_auto_20210721_0510'), ] operations = [ migrations.AddField( model_name='didatticatestiregolamento', ...
[ "django.db.models.CharField" ]
[((365, 455), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'db_column': '"""TESTO_REGDID_URL"""', 'max_length': '(1024)', 'null': '(True)'}), "(blank=True, db_column='TESTO_REGDID_URL', max_length=1024,\n null=True)\n", (381, 455), False, 'from django.db import migrations, models\n')]
import argparse from io import BytesIO as _BytesIO from pathlib import Path import numpy as _np import pandas as _pd from urllib import request as _rqs from datetime import datetime from scipy.interpolate import InterpolatedUnivariateSpline from gn_lib.gn_io.common import path2bytes from gn_lib.gn_datetime import gps...
[ "datetime.datetime", "argparse.ArgumentParser", "urllib.request.urlretrieve", "pathlib.Path.cwd", "pathlib.Path", "io.BytesIO", "scipy.interpolate.InterpolatedUnivariateSpline", "numpy.arange" ]
[((957, 977), 'datetime.datetime', 'datetime', (['(2000)', '(1)', '(1)'], {}), '(2000, 1, 1)\n', (965, 977), False, 'from datetime import datetime\n'), ((1482, 1537), 'urllib.request.urlretrieve', '_rqs.urlretrieve', (['iers_url'], {'filename': 'iau2000_daily_file'}), '(iers_url, filename=iau2000_daily_file)\n', (1498,...
"""Defines an error handling wrapper function for wrapping calls to the Spectrum API.""" # <NAME>, King's College London # Copyright (c) 2021 School of Biomedical Engineering & Imaging Sciences, King's College London # Licensed under the MIT. You may obtain a copy at https://opensource.org/licenses/MIT. import loggin...
[ "logging.getLogger", "functools.wraps", "spectrumdevice.exceptions.SpectrumApiCallFailed" ]
[((696, 723), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (713, 723), False, 'import logging\n'), ((2138, 2149), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (2143, 2149), False, 'from functools import wraps\n'), ((2953, 3038), 'spectrumdevice.exceptions.SpectrumApiCallFaile...
from tortoise import Model, fields class IgnoredMember(Model): member_id = fields.IntField() chat_id = fields.IntField() class Meta: table = "ignored" unique_together = (('member_id', 'chat_id',),) class MutedMember(IgnoredMember): class Meta: table = "muted" unique_...
[ "tortoise.fields.IntField" ]
[((81, 98), 'tortoise.fields.IntField', 'fields.IntField', ([], {}), '()\n', (96, 98), False, 'from tortoise import Model, fields\n'), ((113, 130), 'tortoise.fields.IntField', 'fields.IntField', ([], {}), '()\n', (128, 130), False, 'from tortoise import Model, fields\n'), ((412, 440), 'tortoise.fields.IntField', 'field...
# Copyright (c) 2012 <NAME> # ======================================================================= # Distributed under the MIT License. # (See accompanying file LICENSE or copy at # http://opensource.org/licenses/MIT) # ======================================================================= """ pytest for area_z...
[ "eppy.geometry.area_zone.area", "eppy.pytest_helpers.almostequal" ]
[((1037, 1057), 'eppy.geometry.area_zone.area', 'area_zone.area', (['poly'], {}), '(poly)\n', (1051, 1057), True, 'import eppy.geometry.area_zone as area_zone\n'), ((1073, 1110), 'eppy.pytest_helpers.almostequal', 'almostequal', (['answer', 'result'], {'places': '(4)'}), '(answer, result, places=4)\n', (1084, 1110), Fa...
from lxml import etree import random import re import nltk ######################## DATA ########################## # reading corpus from xml root = etree.parse("corpus.xml") sents = [ ] # xml to dict for each sentence for s in root.xpath("/CORPUS/Phrase"): tokens = re.sub(r'\s+',' ',s[2].text) tags = re.s...
[ "re.sub", "nltk.FreqDist", "lxml.etree.parse" ]
[((152, 177), 'lxml.etree.parse', 'etree.parse', (['"""corpus.xml"""'], {}), "('corpus.xml')\n", (163, 177), False, 'from lxml import etree\n'), ((1283, 1306), 'nltk.FreqDist', 'nltk.FreqDist', (['all_tags'], {}), '(all_tags)\n', (1296, 1306), False, 'import nltk\n'), ((276, 306), 're.sub', 're.sub', (['"""\\\\s+"""', ...
#!/usr/bin/env python ################################################################################ # # file_name_parameters # # # Copyright (c) 10/9/2009 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
[ "os.path.exists", "sys.path.insert", "operator.itemgetter", "os.utime", "os.path.realpath", "os.path.isdir", "collections.defaultdict", "re.sub", "os.path.getmtime", "time.gmtime", "glob.glob" ]
[((1969, 1992), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""."""'], {}), "(0, '.')\n", (1984, 1992), False, 'import sys\n'), ((2959, 2995), 're.sub', 're.sub', (['"""^[^/]+"""', '""""""', 'truncated_name'], {}), "('^[^/]+', '', truncated_name)\n", (2965, 2995), False, 'import re\n'), ((3478, 3499), 'time.gmtime'...
#!usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages # setup.py はpythonパッケージのメタデータ等を記述するpythonのスクリプトです。 setup( name='', # パッケージ名 description='', # パッケージの1行での説明 version='0.0.1', url='https://github.com/', author='', author_email='', license='MIT', # ライセンス...
[ "setuptools.find_packages" ]
[((766, 815), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['dist', 'docs', 'tests*']"}), "(exclude=['dist', 'docs', 'tests*'])\n", (779, 815), False, 'from setuptools import setup, find_packages\n')]
# coding=utf-8 import os import sys BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ImageStoragePathMap = {'srcdir':'/dx', '../tests/volume':'C:\\Users\\Administrator\\Desktop'} def dir_exist(path): if not os.path.exists(path): os.makedirs(path, exist_ok=True) return path DEB...
[ "os.path.abspath", "os.path.exists", "os.path.join", "os.makedirs" ]
[((81, 106), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (96, 106), False, 'import os\n'), ((237, 257), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (251, 257), False, 'import os\n'), ((267, 299), 'os.makedirs', 'os.makedirs', (['path'], {'exist_ok': '(True)'}), '(path, ...
from itertools import groupby from typing import Dict, Tuple from pydantic import BaseModel, validator from .dict_conversion import room_from_dict from common import ROOM_HEIGHT_IN_TILES, ROOM_WIDTH_IN_TILES from room_simulator import Action, Element, Room, ElementType class Level(BaseModel): """A representatio...
[ "room_simulator.Element", "pydantic.validator" ]
[((617, 645), 'pydantic.validator', 'validator', (['"""rooms"""'], {'pre': '(True)'}), "('rooms', pre=True)\n", (626, 645), False, 'from pydantic import BaseModel, validator\n'), ((2361, 2396), 'room_simulator.Element', 'Element', (['ElementType.BLUE_DOOR_OPEN'], {}), '(ElementType.BLUE_DOOR_OPEN)\n', (2368, 2396), Fal...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('email_marketing', '0008_auto_20170809_0539'), ] operations = [ migrations.RemoveField( model_name='emailmarketingconfiguration', name='sailthru_activation_template',...
[ "django.db.migrations.RemoveField" ]
[((194, 300), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""emailmarketingconfiguration"""', 'name': '"""sailthru_activation_template"""'}), "(model_name='emailmarketingconfiguration', name=\n 'sailthru_activation_template')\n", (216, 300), False, 'from django.db import migrat...
import os import re import emoji import mistune codeRe = "```\s*python([\s\S]*?)```" def tagger(): tag_data = open('tag_database').read() tag_dict = {} tag_list = filter(lambda x:x.strip() != '',tag_data.split('\n')) for tag in tag_list: category = tag.split(':')[1] snippe...
[ "re.sub", "mistune.Markdown", "re.split" ]
[((816, 864), 'mistune.Markdown', 'mistune.Markdown', ([], {'renderer': 'renderer', 'escape': '(True)'}), '(renderer=renderer, escape=True)\n', (832, 864), False, 'import mistune\n'), ((3719, 3777), 're.sub', 're.sub', (['"""<code\\\\s*class=" language-python">"""', '""""""', 'rendered'], {}), '(\'<code\\\\s*class=" la...
############################################################################### # (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. # # No duplications, whole or partial, manual or electronic, may be made # # without express written permission. Any such copies, or revisions thereof, # ...
[ "argparse.ArgumentParser", "socket.socket", "pickle.dumps", "time.sleep", "os.path.realpath", "rticonnextdds_connector.Connector", "pickle.loads" ]
[((1321, 1384), 'rticonnextdds_connector.Connector', 'rti.Connector', (['"""MyParticipantLibrary::Zero"""', '"""ShapeExample.xml"""'], {}), "('MyParticipantLibrary::Zero', 'ShapeExample.xml')\n", (1334, 1384), True, 'import rticonnextdds_connector as rti\n'), ((777, 802), 'os.path.realpath', 'osPath.realpath', (['__fil...
class Preprocess_Task: def __init__(self): self.get_script = "---copy script below---\n" def missing_values_chk(self, data): """ column | dtype | missing value count | % """ for col in data.columns: if data[col].isnull().sum()> 0: ...
[ "os.listdir", "pickle.dump", "sklearn.metrics.SCORERS.keys", "os.getcwd" ]
[((1934, 1948), 'sklearn.metrics.SCORERS.keys', 'SCORERS.keys', ([], {}), '()\n', (1946, 1948), False, 'from sklearn.metrics import SCORERS\n'), ((9051, 9089), 'pickle.dump', 'pickle.dump', ([], {'obj': 'data', 'file': 'pickle_out'}), '(obj=data, file=pickle_out)\n', (9062, 9089), False, 'import pickle\n'), ((9248, 926...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file has been automatically generated, changes may be lost if you # go and generate it again. It was generated with the following command: # ./manage.py dumpscript auth import datetime def run(): from django.contrib.auth.models import User auth_user_1 = ...
[ "datetime.datetime.now", "django.contrib.auth.models.User", "django.contrib.sites.models.Site" ]
[((320, 326), 'django.contrib.auth.models.User', 'User', ([], {}), '()\n', (324, 326), False, 'from django.contrib.auth.models import User\n'), ((633, 656), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (654, 656), False, 'import datetime\n'), ((699, 705), 'django.contrib.auth.models.User', 'User'...
import os from dataclasses import dataclass import imageio import numpy as np import tensorflow as tf from tensorflow.keras import backend as K def get_callbacks(save_path, lr_schedule, prefix=None): """ Creates callbacks. Arguments: save_path: the logs and checkpoints will be stored here. lr_schedule: learni...
[ "os.path.exists", "tensorflow.keras.backend.eval", "numpy.sqrt", "tensorflow.keras.callbacks.TensorBoard", "os.makedirs", "imageio.imwrite", "tensorflow.keras.callbacks.LearningRateScheduler", "os.path.join", "tensorflow.keras.optimizers.schedules.PolynomialDecay", "numpy.zeros", "tensorflow.nn....
[((464, 503), 'os.path.join', 'os.path.join', (['save_path', '"""logs"""', 'prefix'], {}), "(save_path, 'logs', prefix)\n", (476, 503), False, 'import os\n'), ((524, 582), 'os.path.join', 'os.path.join', (['save_path', '"""checkpoints"""', "('%s.ckpt' % prefix)"], {}), "(save_path, 'checkpoints', '%s.ckpt' % prefix)\n"...
""" Loads all the images in the "data/" directory. This folder should contain 6400 images: - for a number of times the identity operation is applied, k in (1-32): - for a number of iteration it in (0-99): - we have 2 images: - one input image: "Input f k_it.BMP" - one output image: "Output f k_it.BMP...
[ "numpy.mean", "math.sqrt" ]
[((1161, 1188), 'numpy.mean', 'np.mean', (['((img1 - img2) ** 2)'], {}), '((img1 - img2) ** 2)\n', (1168, 1188), True, 'import numpy as np\n'), ((1278, 1292), 'math.sqrt', 'math.sqrt', (['mse'], {}), '(mse)\n', (1287, 1292), False, 'import math\n')]
import csv import sys import glob import xml.etree.ElementTree as ET path = sys.argv[1] with open('test.csv', 'w', newline='') as csvfile: writer = csv.writer(csvfile, delimiter=",", quotechar="|", quoting=csv.QUOTE_MINIMAL) # write the header writer.writerow(['filename', 'tags', 'd...
[ "csv.writer", "xml.etree.ElementTree.parse", "glob.glob" ]
[((153, 229), 'csv.writer', 'csv.writer', (['csvfile'], {'delimiter': '""","""', 'quotechar': '"""|"""', 'quoting': 'csv.QUOTE_MINIMAL'}), "(csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL)\n", (163, 229), False, 'import csv\n'), ((367, 382), 'glob.glob', 'glob.glob', (['path'], {}), '(path)\n', (376, ...
import sqlite3 welcome = "Hi! I'm Arthur, the customer support chatbot. How can I help you?" #Creating and inserting values into db conn = sqlite3.connect('fulltext_chatbot.sqlite') conn.enable_load_extension(True) conn.load_extension('fts5') conn.execute("CREATE VIRTUAL TABLE responses USING fts5(question,answer)"...
[ "sqlite3.connect" ]
[((142, 184), 'sqlite3.connect', 'sqlite3.connect', (['"""fulltext_chatbot.sqlite"""'], {}), "('fulltext_chatbot.sqlite')\n", (157, 184), False, 'import sqlite3\n')]
from cluster.preprocess.pre_node_feed import PreNodeFeed import os,h5py import numpy as np class PreNodeFeedText2FastText(PreNodeFeed): """ """ def run(self, conf_data): """ override init class """ super(PreNodeFeedText2FastText, self).run(conf_data) self._init_node...
[ "numpy.logical_not", "h5py.File" ]
[((561, 591), 'h5py.File', 'h5py.File', (['file_path'], {'mode': '"""r"""'}), "(file_path, mode='r')\n", (570, 591), False, 'import os, h5py\n'), ((970, 1021), 'h5py.File', 'h5py.File', (['self.input_paths[self.pointer]'], {'mode': '"""r"""'}), "(self.input_paths[self.pointer], mode='r')\n", (979, 1021), False, 'import...
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2020 <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, co...
[ "signal.signal", "datetime.datetime.fromtimestamp", "matplotlib.pyplot.savefig", "argparse.ArgumentParser", "os.makedirs", "datetime.datetime.strptime", "matplotlib.pyplot.style.use", "requests.get", "argparse.ArgumentTypeError", "matplotlib.pyplot.close", "datetime.timedelta", "matplotlib.pyp...
[((1641, 1666), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1664, 1666), False, 'import argparse\n'), ((5122, 5133), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (5130, 5133), False, 'import sys\n'), ((7636, 7647), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (7644, 7647), False, 'imp...
import gensim import numpy as np import torch import torch.nn as nn device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def load_word2vec(word2vec_data_path): return gensim.models.KeyedVectors.load_word2vec_format(word2vec_data_path, binary=True) def generate_word_map_from_word2vec_model(word...
[ "numpy.random.rand", "gensim.models.KeyedVectors.load_word2vec_format", "numpy.append", "torch.cuda.is_available", "torch.FloatTensor", "torch.nn.Embedding.from_pretrained" ]
[((191, 276), 'gensim.models.KeyedVectors.load_word2vec_format', 'gensim.models.KeyedVectors.load_word2vec_format', (['word2vec_data_path'], {'binary': '(True)'}), '(word2vec_data_path, binary=True\n )\n', (238, 276), False, 'import gensim\n'), ((979, 1009), 'numpy.random.rand', 'np.random.rand', (['(1)', 'n_dimensi...
from os.path import dirname, abspath from mhdata.io.csv import read_csv def load_area_map(): this_dir = dirname(abspath(__file__)) area_map = {int(r['id']):r['name'] for r in read_csv(this_dir + '/metadata_files/area_map.csv')} return area_map
[ "os.path.abspath", "mhdata.io.csv.read_csv" ]
[((117, 134), 'os.path.abspath', 'abspath', (['__file__'], {}), '(__file__)\n', (124, 134), False, 'from os.path import dirname, abspath\n'), ((184, 235), 'mhdata.io.csv.read_csv', 'read_csv', (["(this_dir + '/metadata_files/area_map.csv')"], {}), "(this_dir + '/metadata_files/area_map.csv')\n", (192, 235), False, 'fro...
from __future__ import absolute_import, division, print_function import subprocess import os import sys import pandas import socket from time import sleep from typing import IO, Any, Optional perf_cmd = [ "perf", "record", "--no-buildid", "--no-buildid-cache", "-e", "raw_syscalls:*", "--s...
[ "socket.socket", "pandas.read_csv", "os.geteuid", "time.sleep", "os.path.dirname", "sys.exit", "pandas.concat" ]
[((496, 511), 'socket.socket', 'socket.socket', ([], {}), '()\n', (509, 511), False, 'import socket\n'), ((2310, 2332), 'pandas.concat', 'pandas.concat', (['results'], {}), '(results)\n', (2323, 2332), False, 'import pandas\n'), ((835, 881), 'pandas.read_csv', 'pandas.read_csv', (['file'], {'names': "['Type', 'Req/s']"...
# -*- coding: utf-8 -*- ''' Created on 28 de abr de 2020 @author: leonardo Content: Classe Servidor. Usando Padrao de nome python PEP8. ''' import sys sys.path.append("..") import eventlet import socketio import time from componentes.jogo.thread_update import ThreadUpdate from componentes.jogo.personagem import Pers...
[ "componentes.jogo.thread_update.ThreadUpdate.personagens.update", "componentes.jogo.thread_update.ThreadUpdate.personagens.values", "socketio.Server", "time.sleep", "eventlet.listen", "componentes.jogo.thread_update.ThreadUpdate.personagens.pop", "eventlet.monkey_patch", "componentes.jogo.thread_updat...
[((153, 174), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (168, 174), False, 'import sys\n'), ((449, 466), 'socketio.Server', 'socketio.Server', ([], {}), '()\n', (464, 466), False, 'import socketio\n'), ((4418, 4441), 'eventlet.monkey_patch', 'eventlet.monkey_patch', ([], {}), '()\n', (4439, ...
import torch import torch.nn as nn import torch.nn.functional as F from Concurrent_Neural_Network.models import poissonLoss class Multi_layer_feed_forward_model(nn.Module): "layers neural network used for for testing" def __init__(self, n_input, n_hidden, loss= 'L1', learning_rate=1): """ ...
[ "torch.nn.L1Loss", "torch.nn.Linear" ]
[((718, 744), 'torch.nn.L1Loss', 'nn.L1Loss', ([], {'reduction': '"""sum"""'}), "(reduction='sum')\n", (727, 744), True, 'import torch.nn as nn\n'), ((775, 801), 'torch.nn.L1Loss', 'nn.L1Loss', ([], {'reduction': '"""sum"""'}), "(reduction='sum')\n", (784, 801), True, 'import torch.nn as nn\n'), ((551, 592), 'torch.nn....
import pytest, jwt from async_fastapi_jwt_auth import AuthJWT from pydantic import BaseSettings from datetime import timedelta, datetime, timezone async def test_create_access_token(Authorize): class Settings(BaseSettings): AUTHJWT_SECRET_KEY: str = "testing" AUTHJWT_ACCESS_TOKEN_EXPIRES: int = 2 ...
[ "jwt.decode", "datetime.datetime.now", "datetime.timedelta", "pytest.raises" ]
[((453, 525), 'pytest.raises', 'pytest.raises', (['TypeError'], {'match': '"""missing 1 required positional argument"""'}), "(TypeError, match='missing 1 required positional argument')\n", (466, 525), False, 'import pytest, jwt\n'), ((584, 625), 'pytest.raises', 'pytest.raises', (['TypeError'], {'match': '"""subject"""...
import torch import torch.nn as nn import torch.nn.functional as F conv_config = { 'A': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512], 'B': [64, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'], 'C': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 256, 'M', 512, 512, 512, 512, 'M', 512, 512...
[ "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Dropout", "torch.nn.Sequential", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.zeros" ]
[((1267, 1289), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (1280, 1289), True, 'import torch.nn as nn\n'), ((1859, 1881), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (1872, 1881), True, 'import torch.nn as nn\n'), ((3063, 3088), 'torch.zeros', 'torch.zeros', ...
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from flask import Flask app = Flask(__name__) app.config['SECRET_KEY'] = 'uma-string-muito-segura' app.config['DEBUG'] = True engine = create_engine('mysql+pymysql://admdenuncia:adm-...
[ "sqlalchemy.orm.sessionmaker", "sqlalchemy.create_engine", "sqlalchemy.ext.declarative.declarative_base", "flask.Flask" ]
[((165, 180), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (170, 180), False, 'from flask import Flask\n'), ((273, 361), 'sqlalchemy.create_engine', 'create_engine', (['"""mysql+pymysql://admdenuncia:adm-senha@localhost/denuncia"""'], {'echo': '(True)'}), "('mysql+pymysql://admdenuncia:adm-senha@localhos...
"""Mock callback module to support device and state testing.""" import logging class MockCallbacks(object): """Mock callback class to support device and state testing.""" def __init__(self): """Initialize the MockCallbacks Class.""" self.log = logging.getLogger(__name__) self.callback...
[ "logging.getLogger" ]
[((271, 298), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (288, 298), False, 'import logging\n')]
from django.test import TestCase from django.urls import reverse from django.utils import timezone from core.models import Category, Post from users.models import UserProfile from django.contrib.auth.models import User import pytest @pytest.mark.django_db class CategoryTest(TestCase): def create_category(self, ti...
[ "django.contrib.auth.models.User.objects.create_user", "django.utils.timezone.now", "users.models.UserProfile.objects.create", "core.models.Category.objects.create" ]
[((348, 384), 'core.models.Category.objects.create', 'Category.objects.create', ([], {'title': 'title'}), '(title=title)\n', (371, 384), False, 'from core.models import Category, Post\n'), ((655, 711), 'core.models.Category.objects.create', 'Category.objects.create', ([], {'title': '"""testcat"""', 'slug': '"""testcat"...
""" <NAME> Calculation of curvature using the method outlined in <NAME> et. al 2004 Per face curvature is calculated and per vertex curvature is calculated by weighting the per-face curvatures. I have vectorized the code where possible. """ import numpy as np from numpy.core.umath_tests import inner1d from ...
[ "numpy.sqrt", "numpy.cross", "numpy.linalg.pinv", "numpy.core.umath_tests.inner1d", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.matmul", "numpy.transpose", "numpy.bincount" ]
[((695, 711), 'numpy.cross', 'np.cross', (['up', 'vp'], {}), '(up, vp)\n', (703, 711), True, 'import numpy as np\n'), ((3044, 3098), 'numpy.sqrt', 'np.sqrt', (['(e0[:, 0] ** 2 + e0[:, 1] ** 2 + e0[:, 2] ** 2)'], {}), '(e0[:, 0] ** 2 + e0[:, 1] ** 2 + e0[:, 2] ** 2)\n', (3051, 3098), True, 'import numpy as np\n'), ((309...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import numpy as np from PIL import Image from pathlib import Path from typing import Tuple, Union def binarise_mask(mask: Union[np.ndarray, str, Path]) -> np.ndarray: """ Split the mask into a set of binary masks. ...
[ "numpy.dstack", "PIL.Image.open", "numpy.unique", "numpy.asarray", "numpy.max", "numpy.issubdtype", "numpy.zeros" ]
[((667, 683), 'numpy.asarray', 'np.asarray', (['mask'], {}), '(mask)\n', (677, 683), True, 'import numpy as np\n'), ((1596, 1616), 'numpy.dstack', 'np.dstack', (['[r, g, b]'], {}), '([r, g, b])\n', (1605, 1616), True, 'import numpy as np\n'), ((2227, 2264), 'numpy.dstack', 'np.dstack', (['[colored_mask, alpha_mask]'], ...
from django.shortcuts import render, redirect, reverse from .models import Post, Comment, Rating from django.contrib.auth.mixins import UserPassesTestMixin from django.views.generic import DetailView, CreateView, UpdateView, DeleteView from django.contrib.auth.decorators import login_required from django.utils.decorato...
[ "django.shortcuts.render", "django.utils.decorators.method_decorator", "django.contrib.auth.models.User.objects.filter", "django.shortcuts.redirect", "django.shortcuts.reverse", "django.contrib.auth.models.User.objects.all" ]
[((926, 975), 'django.utils.decorators.method_decorator', 'method_decorator', (['login_required'], {'name': '"""dispatch"""'}), "(login_required, name='dispatch')\n", (942, 975), False, 'from django.utils.decorators import method_decorator\n'), ((2580, 2629), 'django.utils.decorators.method_decorator', 'method_decorato...
from _main_.utils.massenergize_errors import MassEnergizeAPIError from _main_.utils.common import serialize, serialize_all from api.store.event import EventStore from typing import Tuple class EventService: """ Service Layer for all the events """ def __init__(self): self.store = EventStore() def get_...
[ "_main_.utils.common.serialize_all", "api.store.event.EventStore", "_main_.utils.common.serialize" ]
[((296, 308), 'api.store.event.EventStore', 'EventStore', ([], {}), '()\n', (306, 308), False, 'from api.store.event import EventStore\n'), ((494, 510), '_main_.utils.common.serialize', 'serialize', (['event'], {}), '(event)\n', (503, 510), False, 'from _main_.utils.common import serialize, serialize_all\n'), ((700, 72...
import os import shutil from datetime import datetime from pathlib import Path import pytest from entropylab.logger import logger from entropylab.pipeline.results_backend.sqlalchemy.db_initializer import ( _ENTROPY_DIRNAME, _DB_FILENAME, ) """conftest.py is a standard pytest configuration file (see here: htt...
[ "os.makedirs", "pathlib.Path", "os.path.join", "os.path.isfile", "datetime.datetime.now", "shutil.copyfile", "os.path.isdir", "entropylab.logger.logger.debug", "shutil.rmtree", "pytest.fixture", "entropylab.logger.logger.info", "os.remove" ]
[((534, 550), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (548, 550), False, 'import pytest\n'), ((830, 846), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (844, 846), False, 'import pytest\n'), ((1169, 1185), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1183, 1185), False, 'import pytest\n'...
from equipment.framework.Config.AbstractConfig import AbstractConfig from equipment.framework.Log.AbstractLog import AbstractLog from equipment.framework.Storage.AbstractStorage import AbstractStorage from equipment.framework.Storage.LocalStorage import LocalStorage from equipment.framework.Storage.S3Storage import S3S...
[ "equipment.framework.Storage.LocalStorage.LocalStorage", "equipment.framework.Storage.S3Storage.S3Storage" ]
[((550, 575), 'equipment.framework.Storage.LocalStorage.LocalStorage', 'LocalStorage', (['config', 'log'], {}), '(config, log)\n', (562, 575), False, 'from equipment.framework.Storage.LocalStorage import LocalStorage\n'), ((636, 658), 'equipment.framework.Storage.S3Storage.S3Storage', 'S3Storage', (['config', 'log'], {...
################################################################################## ### _testar_modulo: função interna para testar o módulo ################################################################################## def _testar_modulo(): # str_code = 'print(carregar_codigos([\'IBOV.sa\'],cotacoes_path=\'../co...
[ "os.path.isfile", "pandas.to_datetime", "pandas.DataFrame", "pandas.read_csv" ]
[((1694, 1722), 'os.path.isfile', 'os.path.isfile', (['filename_csv'], {}), '(filename_csv)\n', (1708, 1722), False, 'import os\n'), ((3523, 3547), 'os.path.isfile', 'os.path.isfile', (['filename'], {}), '(filename)\n', (3537, 3547), False, 'import os\n'), ((1778, 1803), 'pandas.read_csv', 'pd.read_csv', (['filename_cs...
""" Use this file to write your solution for the Summer Code Jam 2020 Qualifier. Important notes for submission: - Do not change the names of the two classes included below. The test suite we will use to test your submission relies on existence these two classes. - You can leave the `ArticleField` class as-is if y...
[ "re.split", "datetime.datetime.now" ]
[((2722, 2757), 're.split', 're.split', (['"""[^a-zA-Z]"""', 'self.content'], {}), "('[^a-zA-Z]', self.content)\n", (2730, 2757), False, 'import re\n'), ((3626, 3649), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (3647, 3649), False, 'import datetime\n')]
# Copyright 2008-2018 Univa Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ "tortuga.exceptions.invalidArgument.InvalidArgument", "tortuga.config.configManager.ConfigManager", "tortuga.exceptions.profileMappingNotAllowed.ProfileMappingNotAllowed", "tortuga.db.hardwareProfilesDbHandler.HardwareProfilesDbHandler", "json.dumps", "tortuga.resourceAdapter.resourceAdapterFactory.get_ap...
[((1863, 1890), 'tortuga.db.hardwareProfilesDbHandler.HardwareProfilesDbHandler', 'HardwareProfilesDbHandler', ([], {}), '()\n', (1888, 1890), False, 'from tortuga.db.hardwareProfilesDbHandler import HardwareProfilesDbHandler\n'), ((1903, 1930), 'tortuga.db.softwareProfilesDbHandler.SoftwareProfilesDbHandler', 'Softwar...
''' Author: <NAME> Email: <EMAIL> Project: Master's Thesis - Autonomous Inspection Of Wind Blades Repository: Master's Thesis - CV (Computer Vision) ''' from AutoPip.AutoPip import AutoPip ''' Continue the list with necessary packages which are required. ''' requirement_list = ['cython', 'pyserial', '...
[ "AutoPip.AutoPip.AutoPip" ]
[((1264, 1273), 'AutoPip.AutoPip.AutoPip', 'AutoPip', ([], {}), '()\n', (1271, 1273), False, 'from AutoPip.AutoPip import AutoPip\n')]
#!/usr/bin/env python3 """ _AlCaPhiSymEcal_Nano_ Scenario supporting proton collision data taking for AlCaPhiSymEcal stream with ALCANANO output """ from Configuration.DataProcessing.Impl.AlCaNano import AlCaNano from Configuration.Eras.Era_Run3_cff import Run3 class AlCaPhiSymEcal_Nano(AlCaNano): def __init__(...
[ "Configuration.DataProcessing.Impl.AlCaNano.AlCaNano.__init__" ]
[((335, 358), 'Configuration.DataProcessing.Impl.AlCaNano.AlCaNano.__init__', 'AlCaNano.__init__', (['self'], {}), '(self)\n', (352, 358), False, 'from Configuration.DataProcessing.Impl.AlCaNano import AlCaNano\n')]
from distutils.core import setup setup( name = 'cnb', py_modules = ['cnb'], version = '0.9.3', description = 'Access current exchange rate and (short time) historical daily rates from the Czech National Bank.', install_requires = ['six', 'pytz'], author = '<NAME>', author_email = '<EMAIL>', url = 'https...
[ "distutils.core.setup" ]
[((33, 927), 'distutils.core.setup', 'setup', ([], {'name': '"""cnb"""', 'py_modules': "['cnb']", 'version': '"""0.9.3"""', 'description': '"""Access current exchange rate and (short time) historical daily rates from the Czech National Bank."""', 'install_requires': "['six', 'pytz']", 'author': '"""<NAME>"""', 'author_...