code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import json import logging import shutil import requests from spreads.vendor.pathlib import Path from spreadsplug.web import task_queue from util import find_stick, mount_stick from persistence import get_workflow, save_workflow logger = logging.getLogger('spreadsplug.web.tasks') @task_queue.task() def transfer_to...
[ "logging.getLogger", "util.mount_stick", "util.find_stick", "persistence.get_workflow", "spreads.vendor.pathlib.Path", "spreadsplug.web.task_queue.task" ]
[((241, 283), 'logging.getLogger', 'logging.getLogger', (['"""spreadsplug.web.tasks"""'], {}), "('spreadsplug.web.tasks')\n", (258, 283), False, 'import logging\n'), ((287, 304), 'spreadsplug.web.task_queue.task', 'task_queue.task', ([], {}), '()\n', (302, 304), False, 'from spreadsplug.web import task_queue\n'), ((353...
from rest_framework import serializers from contact.models import Contact from products.serializers import ProductDataSerializer from profiles.models import Profile class ContactSerializer(serializers.Serializer): username = serializers.CharField(max_length=100) first_name = serializers.CharField(max_length=...
[ "profiles.models.Profile.objects.get", "rest_framework.serializers.EmailField", "rest_framework.serializers.SerializerMethodField", "products.serializers.ProductDataSerializer", "rest_framework.serializers.CharField" ]
[((232, 269), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (253, 269), False, 'from rest_framework import serializers\n'), ((287, 324), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'max_length': '(500)'}), '(max_length=50...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- ############################################### ## Purpose: Provies argument parsing capability ############################################### import argparse #Documentation parser = argparse.ArgumentParser(description='''Parameters for Amazon S3 Bucket Scraping'...
[ "argparse.ArgumentParser" ]
[((240, 319), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Parameters for Amazon S3 Bucket Scraping"""'}), "(description='Parameters for Amazon S3 Bucket Scraping')\n", (263, 319), False, 'import argparse\n')]
""" <NAME>, 2018 All rights reserved """ import torch from torchvision import datasets, transforms def load_training_data(args, kwargs): train_loader = torch.utils.data.DataLoader( datasets.MNIST('../data', train=True, download=True, transform=transforms.ToTensor()), batc...
[ "torchvision.transforms.ToTensor" ]
[((284, 305), 'torchvision.transforms.ToTensor', 'transforms.ToTensor', ([], {}), '()\n', (303, 305), False, 'from torchvision import datasets, transforms\n'), ((540, 561), 'torchvision.transforms.ToTensor', 'transforms.ToTensor', ([], {}), '()\n', (559, 561), False, 'from torchvision import datasets, transforms\n')]
from django.shortcuts import render, redirect, reverse, get_object_or_404 from django.views import generic, View from django.http import HttpResponse from django.contrib.auth import mixins from django.contrib import messages from .models import Cafe, CafeTag from .forms import CafeForm class CafeCreatView(mixins.Logi...
[ "django.shortcuts.render", "django.http.HttpResponse", "django.shortcuts.reverse", "django.contrib.messages.success" ]
[((499, 544), 'django.shortcuts.render', 'render', (['request', '"""cafes/create.html"""', 'context'], {}), "(request, 'cafes/create.html', context)\n", (505, 544), False, 'from django.shortcuts import render, redirect, reverse, get_object_or_404\n'), ((819, 885), 'django.contrib.messages.success', 'messages.success', ...
import json import pyRofex class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instances[cls] class APIWrapper(metaclass=Singleton): """ ...
[ "json.load", "pyRofex.initialize", "pyRofex.close_websocket_connection" ]
[((512, 524), 'json.load', 'json.load', (['f'], {}), '(f)\n', (521, 524), False, 'import json\n'), ((766, 866), 'pyRofex.initialize', 'pyRofex.initialize', ([], {'user': 'user', 'password': 'password', 'account': 'account', 'environment': 'self._environment'}), '(user=user, password=password, account=account,\n envi...
import os import shutil import numpy as np import pandas as pd import scipy.integrate, scipy.stats, scipy.optimize, scipy.signal from scipy.stats import mannwhitneyu import statsmodels.formula.api as smf import pystan def clean_folder(folder): """Create a new folder, or if the folder already exists, delete a...
[ "pandas.Series", "numpy.sqrt", "os.makedirs", "os.path.isdir", "numpy.isnan", "statsmodels.formula.api.ols", "shutil.rmtree", "pandas.DataFrame", "numpy.percentile", "numpy.random.randn" ]
[((410, 431), 'os.path.isdir', 'os.path.isdir', (['folder'], {}), '(folder)\n', (423, 431), False, 'import os\n'), ((4128, 4164), 'pandas.DataFrame', 'pd.DataFrame', (["fit_summary['summary']"], {}), "(fit_summary['summary'])\n", (4140, 4164), True, 'import pandas as pd\n'), ((5015, 5030), 'pandas.DataFrame', 'pd.DataF...
from . import Client from telegram.ext import Updater, CommandHandler class TelegramClient(Client): updater = None def __init__(self, token): Client.__init__(self, None) self.updater = Updater(token, use_context=True) self.updater.dispatcher.add_handler(CommandHandler("available", sel...
[ "telegram.ext.CommandHandler", "telegram.ext.Updater" ]
[((212, 244), 'telegram.ext.Updater', 'Updater', (['token'], {'use_context': '(True)'}), '(token, use_context=True)\n', (219, 244), False, 'from telegram.ext import Updater, CommandHandler\n'), ((289, 336), 'telegram.ext.CommandHandler', 'CommandHandler', (['"""available"""', 'self.cmd_available'], {}), "('available', ...
import argparse from config import ABOUT import datetime import docker import os import pathlib import subprocess parser = argparse.ArgumentParser(description='IdExeCreator Help') parser.add_argument('--project', action='store', type=str, default="", help="project path, fill it if current directory...
[ "os.listdir", "argparse.ArgumentParser", "pathlib.Path", "subprocess.run", "os.getcwd", "datetime.datetime.now", "docker.from_env" ]
[((124, 180), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""IdExeCreator Help"""'}), "(description='IdExeCreator Help')\n", (147, 180), False, 'import argparse\n'), ((1994, 2035), 'pathlib.Path', 'pathlib.Path', (["(source_dir + '/' + iss_file)"], {}), "(source_dir + '/' + iss_file)\n",...
from __future__ import unicode_literals import frappe def execute(): frappe.enqueue(assign, queue='long') def assign(): users = frappe.get_all("User", {"user_type":"System User"}) for user in users: user_roles = frappe.get_roles(user.name) User = frappe.get_doc("User", {"name":user...
[ "frappe.enqueue", "frappe.get_doc", "frappe.db.commit", "frappe.get_all", "frappe.get_roles" ]
[((74, 110), 'frappe.enqueue', 'frappe.enqueue', (['assign'], {'queue': '"""long"""'}), "(assign, queue='long')\n", (88, 110), False, 'import frappe\n'), ((146, 198), 'frappe.get_all', 'frappe.get_all', (['"""User"""', "{'user_type': 'System User'}"], {}), "('User', {'user_type': 'System User'})\n", (160, 198), False, ...
from avro import schema from google.datacatalog_connectors.kafka.config.\ metadata_constants import MetadataConstants class AvroSchemaParser: RECORD = "record" UNION = "union" def __init__(self, schema_str): self._parsed_schema = schema.parse(schema_str) def get_schema_type(self): ...
[ "avro.schema.parse" ]
[((258, 282), 'avro.schema.parse', 'schema.parse', (['schema_str'], {}), '(schema_str)\n', (270, 282), False, 'from avro import schema\n')]
#!/usr/bin/python # # Copyright 2018-2022 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ "polyaxon.connections.reader.get_connection_context_path", "polyaxon.connections.aws.base.get_aws_client", "polyaxon.exceptions.PolyaxonConnectionError", "polyaxon.connections.aws.base.get_aws_resource" ]
[((3800, 3849), 'polyaxon.connections.reader.get_connection_context_path', 'get_connection_context_path', ([], {'name': 'connection_name'}), '(name=connection_name)\n', (3827, 3849), False, 'from polyaxon.connections.reader import get_connection_context_path\n'), ((3877, 4200), 'polyaxon.connections.aws.base.get_aws_cl...
from concurrent import futures from concurrent.futures.thread import _worker import requests import json from concurrent.futures import ThreadPoolExecutor, as_completed def get_paper_jars(): # Get all PaperMC build links (only most recent per version) BUILD_URL = 'https://papermc.io/api/v2/projects/paper/versi...
[ "concurrent.futures.as_completed", "concurrent.futures.ThreadPoolExecutor", "requests.get" ]
[((1288, 1327), 'concurrent.futures.ThreadPoolExecutor', 'ThreadPoolExecutor', ([], {'max_workers': 'WORKERS'}), '(max_workers=WORKERS)\n', (1306, 1327), False, 'from concurrent.futures import ThreadPoolExecutor, as_completed\n'), ((1462, 1483), 'concurrent.futures.as_completed', 'as_completed', (['futures'], {}), '(fu...
from setuptools import setup setup( name="pynsga3", version="0.0.1", package_dir={"": "src"}, packages=["pynsga3", "pynsga3.operators", "pynsga3.utils"], install_requires=[ 'numpy>=1.10.*', "scipy>=0.15.*" ], author="<NAME>", author_email="<EMAIL>", description="Pyth...
[ "setuptools.setup" ]
[((30, 769), 'setuptools.setup', 'setup', ([], {'name': '"""pynsga3"""', 'version': '"""0.0.1"""', 'package_dir': "{'': 'src'}", 'packages': "['pynsga3', 'pynsga3.operators', 'pynsga3.utils']", 'install_requires': "['numpy>=1.10.*', 'scipy>=0.15.*']", 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'descript...
import os.path import numpy as np cancer_type_pairs = [ ["lung squamous cell carcinoma", "head & neck squamous cell carcinoma"], ["bladder urothelial carcinoma", "cervical & endocervical cancer"], ["colon adenocarcinoma", "rectum adenocarcinoma"], ["stomach adenocarcinoma", "esophageal carcinoma"], ["kidney ...
[ "numpy.loadtxt", "numpy.load", "numpy.argmax" ]
[((1435, 1455), 'numpy.loadtxt', 'np.loadtxt', (['filename'], {}), '(filename)\n', (1445, 1455), True, 'import numpy as np\n'), ((2130, 2154), 'numpy.load', 'np.load', (['params_filename'], {}), '(params_filename)\n', (2137, 2154), True, 'import numpy as np\n'), ((2171, 2196), 'numpy.load', 'np.load', (['results_filena...
from basicsr.models.archs.hifacegan_arch import HiFaceGAN from basicsr.models.archs.hifacegan_options import test_options opt = test_options() model = HiFaceGAN(opt) print(model)
[ "basicsr.models.archs.hifacegan_arch.HiFaceGAN", "basicsr.models.archs.hifacegan_options.test_options" ]
[((128, 142), 'basicsr.models.archs.hifacegan_options.test_options', 'test_options', ([], {}), '()\n', (140, 142), False, 'from basicsr.models.archs.hifacegan_options import test_options\n'), ((151, 165), 'basicsr.models.archs.hifacegan_arch.HiFaceGAN', 'HiFaceGAN', (['opt'], {}), '(opt)\n', (160, 165), False, 'from ba...
import time from utils import file_exists from defines import * from chimastub import * ## Installation of compiled pipelines on switches def install_pipeline(deviceID, jsonPath, p4infoPath): if not file_exists(jsonPath): return if not file_exists(p4infoPath): return conf = { "deviceI...
[ "utils.file_exists", "time.sleep" ]
[((205, 226), 'utils.file_exists', 'file_exists', (['jsonPath'], {}), '(jsonPath)\n', (216, 226), False, 'from utils import file_exists\n'), ((246, 269), 'utils.file_exists', 'file_exists', (['p4infoPath'], {}), '(p4infoPath)\n', (257, 269), False, 'from utils import file_exists\n'), ((580, 595), 'time.sleep', 'time.sl...
# -*- coding: utf-8 -*- import numpy as np import torch import pytrol.util.argsparser as parser from pytrol.control.agent.HPAgent import HPAgent from pytrol.control.agent.MAPTrainerModelAgent import MAPTrainerModelAgent from pytrol.model.knowledge.EnvironmentKnowledge import EnvironmentKnowledge from pytrol.util.net....
[ "numpy.minimum", "pytrol.control.agent.HPAgent.HPAgent.__init__", "numpy.array", "pytrol.control.agent.MAPTrainerModelAgent.MAPTrainerModelAgent.__init__", "pytrol.util.argsparser.parse_args" ]
[((1456, 1639), 'pytrol.control.agent.HPAgent.HPAgent.__init__', 'HPAgent.__init__', (['self'], {'id_': 'id_', 'original_id': 'original_id', 'env_knl': 'env_knl', 'connection': 'connection', 'agts_addrs': 'agts_addrs', 'variant': 'variant', 'depth': 'depth', 'interaction': 'interaction'}), '(self, id_=id_, original_id=...
import boto3 import boto3.session class AWS: def __init__(self, access=None, secret=None, region='us-east-1', resources=[], clients=[]): self.region = region if access is None or secret is None: self.sessid = "__ROLE__" self.session = boto3.session.Session(region_name=self...
[ "boto3.session.Session" ]
[((282, 328), 'boto3.session.Session', 'boto3.session.Session', ([], {'region_name': 'self.region'}), '(region_name=self.region)\n', (303, 328), False, 'import boto3\n'), ((403, 510), 'boto3.session.Session', 'boto3.session.Session', ([], {'aws_access_key_id': 'access', 'aws_secret_access_key': 'secret', 'region_name':...
# coding: utf-8 """ Digitick REST API The Digitick REST API is a set of methods giving access to catalog, user and cart management. OpenAPI spec version: v1.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iterite...
[ "six.iteritems" ]
[((5670, 5699), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (5679, 5699), False, 'from six import iteritems\n')]
#!/usr/bin/env python import logging import config import os def setup_logger(name=None, debug=False): """Set up the logger.""" if name is None: name = config.rootlogger logger = logging.getLogger(name) filehandler = logging.FileHandler(os.path.join(config.logdir, '{}.log'.format(__name__))...
[ "logging.getLogger", "logging.Formatter", "logging.StreamHandler" ]
[((203, 226), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (220, 226), False, 'import logging\n'), ((338, 417), 'logging.Formatter', 'logging.Formatter', ([], {'fmt': '"""%(asctime)s - %(levelname)s - %(module)s - %(message)s"""'}), "(fmt='%(asctime)s - %(levelname)s - %(module)s - %(message)s'...
import outlier_detection as tso from .test_data_setup import import_dataframe import numpy as nm class TestLSOutlier: def test_init(self): df = import_dataframe() ls = tso.LevelShiftDetector(df)
[ "outlier_detection.LevelShiftDetector" ]
[((191, 217), 'outlier_detection.LevelShiftDetector', 'tso.LevelShiftDetector', (['df'], {}), '(df)\n', (213, 217), True, 'import outlier_detection as tso\n')]
""" Tests donut/modules/editor/ """ from datetime import date import flask import pytest from donut.testing.fixtures import client from donut import app import donut.modules.core.helpers as core_helpers from donut.modules.uploads import helpers from donut.modules.uploads import routes from donut.modules.editor import h...
[ "os.path.join", "donut.modules.uploads.helpers.remove_link", "flask.url_for", "werkzeug.datastructures.FileStorage", "donut.modules.uploads.helpers.get_links", "donut.modules.editor.helpers.create_page_in_database", "donut.modules.uploads.helpers.allowed_file", "donut.modules.editor.helpers.remove_fil...
[((630, 663), 'donut.modules.uploads.helpers.remove_link', 'helpers.remove_link', (['"""SOME_TITLE"""'], {}), "('SOME_TITLE')\n", (649, 663), False, 'from donut.modules.uploads import helpers\n'), ((676, 695), 'donut.modules.uploads.helpers.get_links', 'helpers.get_links', ([], {}), '()\n', (693, 695), False, 'from don...
import fileinput from operator import add commands = dict( forward=(1, 0), down=(0,1), up=(0,-1) ) def main(): position_xz = (0, 0) for line in fileinput.input(): direction, amount = line.split() amount = int(amount) change_vector = map(lambda a: a*amount, commands[direct...
[ "fileinput.input" ]
[((167, 184), 'fileinput.input', 'fileinput.input', ([], {}), '()\n', (182, 184), False, 'import fileinput\n')]
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # import json from django.dispatch import receiver from django.db import models from pdc.apps.release.models import Release from pdc.apps.release import signals as release_signals from pdc.apps.component import ...
[ "django.dispatch.receiver", "django.db.models.OneToOneField", "django.db.models.CharField" ]
[((996, 1035), 'django.dispatch.receiver', 'receiver', (['release_signals.release_clone'], {}), '(release_signals.release_clone)\n', (1004, 1035), False, 'from django.dispatch import receiver\n'), ((1383, 1428), 'django.dispatch.receiver', 'receiver', (['release_signals.release_post_update'], {}), '(release_signals.rel...
import numpy as np from optimization.basic_neuralnet_lib import neuralnet from optimization.basic_neuralnet_lib import tensors from optimization.basic_neuralnet_lib import loss from typing import Iterator, NamedTuple DEFAULT_BATCH_SIZE = 32 def train( network: neuralnet.NeuralNet, inputs: tensors.Tensor, ...
[ "optimization.basic_neuralnet_lib.loss.loss", "optimization.basic_neuralnet_lib.neuralnet.StochasticGradientDescent", "optimization.basic_neuralnet_lib.loss.gradient", "optimization.basic_neuralnet_lib.loss.TotalSquaredError", "numpy.random.shuffle" ]
[((391, 415), 'optimization.basic_neuralnet_lib.loss.TotalSquaredError', 'loss.TotalSquaredError', ([], {}), '()\n', (413, 415), False, 'from optimization.basic_neuralnet_lib import loss\n'), ((454, 491), 'optimization.basic_neuralnet_lib.neuralnet.StochasticGradientDescent', 'neuralnet.StochasticGradientDescent', ([],...
import pytest from pytest import raises from vyper import compiler from vyper.exceptions import InvalidLiteral fail_list = [ """ b: decimal @public def foo(): self.b = 7.5178246872145875217495129745982164981654986129846 """, """ @public def foo(): x = as_wei_value(0x05, "babbage") """, """...
[ "pytest.mark.parametrize", "vyper.compiler.compile_code", "pytest.raises" ]
[((1634, 1680), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""bad_code"""', 'fail_list'], {}), "('bad_code', fail_list)\n", (1657, 1680), False, 'import pytest\n'), ((1736, 1758), 'pytest.raises', 'raises', (['InvalidLiteral'], {}), '(InvalidLiteral)\n', (1742, 1758), False, 'from pytest import raises\n')...
# Copyright 2020 Hewlett Packard Enterprise Development LP # # 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 ...
[ "sys.stderr.write", "get_resource_directory.get_resource_directory", "sys.exit", "redfish.RedfishClient" ]
[((1059, 1094), 'get_resource_directory.get_resource_directory', 'get_resource_directory', (['_redfishobj'], {}), '(_redfishobj)\n', (1081, 1094), False, 'from get_resource_directory import get_resource_directory\n'), ((4311, 4399), 'redfish.RedfishClient', 'RedfishClient', ([], {'base_url': 'SYSTEM_URL', 'username': '...
from flask import Blueprint main = Blueprint('main', __name__) ''':annotation: The main blueprint named ``main``.''' from . import views from . import errors
[ "flask.Blueprint" ]
[((36, 63), 'flask.Blueprint', 'Blueprint', (['"""main"""', '__name__'], {}), "('main', __name__)\n", (45, 63), False, 'from flask import Blueprint\n')]
from setuptools import setup setup( name='BotonAnimado', packages=['BotonAnimado'], # Mismo nombre que en la estructura de carpetas de arriba version='1.0', license='LGPL v3', # La licencia que tenga tu paquete description='A random test lib', author='RDCH106', author_email='<EMAI...
[ "setuptools.setup" ]
[((33, 716), 'setuptools.setup', 'setup', ([], {'name': '"""BotonAnimado"""', 'packages': "['BotonAnimado']", 'version': '"""1.0"""', 'license': '"""LGPL v3"""', 'description': '"""A random test lib"""', 'author': '"""RDCH106"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/marceloomg13/BotonAnimado"...
from typing import Dict, Any from unittest.mock import Mock import pytest from confluent_kafka import DeserializingConsumer from confluent_kafka.admin import AdminClient from confluent_kafka.cimpl import NewTopic from confluent_kafka.schema_registry import SchemaRegistryClient from confluent_kafka.schema_registry.avro...
[ "unittest.mock.Mock", "confluent_kafka.DeserializingConsumer", "confluent_kafka.cimpl.NewTopic", "testcontainers.kafka.KafkaContainer", "tests.testcontainers.schemaregistry.SchemaRegistryContainer.with_kafka_container", "confluent_kafka.admin.AdminClient", "confluent_kafka.schema_registry.SchemaRegistry...
[((1174, 1190), 'testcontainers.kafka.KafkaContainer', 'KafkaContainer', ([], {}), '()\n', (1188, 1190), False, 'from testcontainers.kafka import KafkaContainer\n'), ((1276, 1327), 'tests.testcontainers.schemaregistry.SchemaRegistryContainer.with_kafka_container', 'SchemaRegistryContainer.with_kafka_container', (['kafk...
import collections.abc from itertools import repeat container_abcs = collections.abc def _ntuple(n): def parse(x): if isinstance(x, container_abcs.Iterable): return x return tuple(repeat(x, n)) return parse _single = _ntuple(1) _pair = _ntuple(2) _triple = _ntuple(3) _quadruple = ...
[ "itertools.repeat" ]
[((214, 226), 'itertools.repeat', 'repeat', (['x', 'n'], {}), '(x, n)\n', (220, 226), False, 'from itertools import repeat\n')]
""" About box with general info @copyright: 2002-2007 <NAME> @copyright: 2014-2016 <NAME> @copyright: 2017 <NAME> @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import bugdialog import codecs import wx import wx.html import wx.lib.wxpTag import config import misc import os.path class wxGl...
[ "wx.BoxSizer", "webbrowser.open", "wx.StaticLine", "wx.html.HtmlWindow", "codecs.open" ]
[((1380, 1425), 'wx.html.HtmlWindow', 'wx.html.HtmlWindow', (['self', '(-1)'], {'size': '(480, 250)'}), '(self, -1, size=(480, 250))\n', (1398, 1425), False, 'import wx\n'), ((2043, 2067), 'wx.BoxSizer', 'wx.BoxSizer', (['wx.VERTICAL'], {}), '(wx.VERTICAL)\n', (2054, 2067), False, 'import wx\n'), ((2212, 2238), 'wx.Box...
#!/usr/bin/env python ''' Perform operations with a fixed seed for a block, then restore the state of the PRNG. All using the with syntax. with FixedSeed(4711): ... Has this already been done? It is quite handy for experiments since it makes sure that you don't forget to restore the state. Author: <...
[ "random.random", "random.setstate", "random.seed", "random.getstate" ]
[((874, 882), 'random.random', 'random', ([], {}), '()\n', (880, 882), False, 'from random import random\n'), ((967, 975), 'random.random', 'random', ([], {}), '()\n', (973, 975), False, 'from random import random\n'), ((577, 587), 'random.getstate', 'getstate', ([], {}), '()\n', (585, 587), False, 'from random import ...
import itertools import sys import matplotlib.pyplot as plt def color(db): if db == 'retail': return 'r' if db == 'mushroom': return 'g' if db == 'pumsb_star': return 'b' return 'k' def marker(md): if md == '3': return 'o' if md == '5': return 's' return '_' mx=my=None with open(sys.argv[...
[ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ]
[((788, 809), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""# rules"""'], {}), "('# rules')\n", (798, 809), True, 'import matplotlib.pyplot as plt\n'), ((810, 836), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""# good rules"""'], {}), "('# good rules')\n", (820, 836), True, 'import matplotlib.pyplot as plt\n'), ((8...
from __future__ import annotations from typing import Dict, List, Optional import yaml from base.basic import Circuit from base.block import IBlock from templates.block import BlockType, BlockTemplate, BlockFactory from templates.conn import ConnTemplate __author__ = "<NAME>" __copyright__ = "Copyright 2021" class...
[ "templates.block.BlockFactory", "yaml.dump", "base.basic.Circuit", "yaml.load_all", "templates.conn.ConnTemplate", "yaml.add_representer", "templates.block.BlockTemplate" ]
[((535, 591), 'yaml.add_representer', 'yaml.add_representer', (['Literal', 'Literal.literal_presenter'], {}), '(Literal, Literal.literal_presenter)\n', (555, 591), False, 'import yaml\n'), ((2664, 2673), 'base.basic.Circuit', 'Circuit', ([], {}), '()\n', (2671, 2673), False, 'from base.basic import Circuit\n'), ((3001,...
#import cv2 import pickle import numpy as np import PIL from PIL import Image import os.path import sys # import cv2 def get_train_data(chunk, img_row, img_col): # print(" \n get train data - running") X_train = [] Y_train = [] with open("/home/amit/Desktop/vignesh/allmerge2.pickle",'rb') as f1: ...
[ "numpy.asarray", "PIL.Image.open", "pickle.load" ]
[((342, 357), 'pickle.load', 'pickle.load', (['f1'], {}), '(f1)\n', (353, 357), False, 'import pickle\n'), ((1352, 1371), 'numpy.asarray', 'np.asarray', (['X_train'], {}), '(X_train)\n', (1362, 1371), True, 'import numpy as np\n'), ((1390, 1409), 'numpy.asarray', 'np.asarray', (['Y_train'], {}), '(Y_train)\n', (1400, 1...
import numpy as np def braille(): return { 'a' : np.array([[1, 0], [0, 0], [0, 0]], dtype=bool), 'b' : np.array([[1, 0], [1, 0], [0, 0]], dtype=bool), 'c' : np.array([[1, 1], [0, 0], [0, 0]], dtype=bool), 'd' : np.array([[1, 1], [0, 1], [0, 0]], dtype=bool), 'e' : np.array([[1, 0], [0, ...
[ "numpy.array" ]
[((58, 104), 'numpy.array', 'np.array', (['[[1, 0], [0, 0], [0, 0]]'], {'dtype': 'bool'}), '([[1, 0], [0, 0], [0, 0]], dtype=bool)\n', (66, 104), True, 'import numpy as np\n'), ((118, 164), 'numpy.array', 'np.array', (['[[1, 0], [1, 0], [0, 0]]'], {'dtype': 'bool'}), '([[1, 0], [1, 0], [0, 0]], dtype=bool)\n', (126, 16...
"""Compute simple, advanced and higher-order Haralick textures with Orfeo Toolbox. https://www.orfeo-toolbox.org/CookBook/Applications/app_HaralickTextureExtraction.html """ import os import subprocess import tempfile import numpy as np import rasterio TEXTURES = { 'simple': [ 'energy', 'entropy'...
[ "rasterio.open", "tempfile.TemporaryDirectory", "os.path.join", "os.makedirs" ]
[((2647, 2676), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (2674, 2676), False, 'import tempfile\n'), ((2693, 2732), 'os.path.join', 'os.path.join', (['tmp_dir.name', '"""image.tif"""'], {}), "(tmp_dir.name, 'image.tif')\n", (2705, 2732), False, 'import os\n'), ((2878, 2916), 'os.pa...
from __future__ import print_function import sys import re from operator import add from pyspark.sql import SparkSession def computeContribs(urls, rank): num_urls = len(urls) for url in urls: yield (url, rank / num_urls) def parseNeighbors(p): parts = re.split(r",",p) return p...
[ "re.split", "pyspark.sql.SparkSession.builder.appName", "sys.exit" ]
[((290, 306), 're.split', 're.split', (['""","""', 'p'], {}), "(',', p)\n", (298, 306), False, 'import re\n'), ((376, 392), 're.split', 're.split', (['""","""', 'p'], {}), "(',', p)\n", (384, 392), False, 'import re\n'), ((588, 600), 'sys.exit', 'sys.exit', (['(-1)'], {}), '(-1)\n', (596, 600), False, 'import sys\n'), ...
from django.views.generic.edit import CreateView from django.views.generic.detail import DetailView from django.urls import reverse, reverse_lazy from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import redirect from .models import Orga...
[ "django.urls.reverse", "django.utils.decorators.method_decorator", "django.urls.reverse_lazy" ]
[((548, 583), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""organization:detail"""'], {}), "('organization:detail')\n", (560, 583), False, 'from django.urls import reverse, reverse_lazy\n'), ((945, 977), 'django.utils.decorators.method_decorator', 'method_decorator', (['login_required'], {}), '(login_required)\n', ...
from django.contrib import admin from ajax_select import make_ajax_form from ajax_select.admin import AjaxSelectAdmin, AjaxSelectAdminTabularInline from example.forms import ReleaseForm from example.models import * class PersonAdmin(AjaxSelectAdmin): pass admin.site.register(Person, PersonAdmin) class LabelA...
[ "django.contrib.admin.site.register", "ajax_select.make_ajax_form" ]
[((265, 305), 'django.contrib.admin.site.register', 'admin.site.register', (['Person', 'PersonAdmin'], {}), '(Person, PersonAdmin)\n', (284, 305), False, 'from django.contrib import admin\n'), ((844, 882), 'django.contrib.admin.site.register', 'admin.site.register', (['Label', 'LabelAdmin'], {}), '(Label, LabelAdmin)\n...
# -*- coding: utf-8 -*- """ Messaging urls module. """ from django.conf.urls import include, url from rest_framework import routers from onadata.apps.messaging.viewsets import MessagingViewSet router = routers.DefaultRouter(trailing_slash=False) # pylint: disable=C0103 router.register(r'messaging', MessagingViewSet)...
[ "django.conf.urls.include", "rest_framework.routers.DefaultRouter" ]
[((204, 247), 'rest_framework.routers.DefaultRouter', 'routers.DefaultRouter', ([], {'trailing_slash': '(False)'}), '(trailing_slash=False)\n', (225, 247), False, 'from rest_framework import routers\n'), ((384, 404), 'django.conf.urls.include', 'include', (['router.urls'], {}), '(router.urls)\n', (391, 404), False, 'fr...
# # Copyright 2019 Nextworks s.r.l. # # 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 wr...
[ "logging.basicConfig", "logging.StreamHandler", "logging.getLogger", "re.compile" ]
[((1926, 1951), 'logging.StreamHandler', 'StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (1939, 1951), False, 'from logging import DEBUG, LoggerAdapter, Formatter, StreamHandler, basicConfig, getLogger, ERROR\n'), ((2037, 2081), 'logging.basicConfig', 'basicConfig', ([], {'handlers': '[handler]', 'level': 'DEB...
from django.urls import path from exo_currency.views import ExchangeRateEvolutionView urlpatterns = [ path( 'currency-exchange-rates/', ExchangeRateEvolutionView().get, name='exchange-rate-evolution', ), ]
[ "exo_currency.views.ExchangeRateEvolutionView" ]
[((158, 185), 'exo_currency.views.ExchangeRateEvolutionView', 'ExchangeRateEvolutionView', ([], {}), '()\n', (183, 185), False, 'from exo_currency.views import ExchangeRateEvolutionView\n')]
# =============================================================================== # Copyright 2013 <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/...
[ "pychron.processing.isotope.Isotope", "pychron.core.ui.set_toolkit" ]
[((878, 896), 'pychron.core.ui.set_toolkit', 'set_toolkit', (['"""qt4"""'], {}), "('qt4')\n", (889, 896), False, 'from pychron.core.ui import set_toolkit\n'), ((1489, 1498), 'pychron.processing.isotope.Isotope', 'Isotope', ([], {}), '()\n', (1496, 1498), False, 'from pychron.processing.isotope import Isotope\n')]
from app.models import Article from app.serializer import ma from marshmallow import fields class ArticleSchema(ma.Schema): title = fields.Str(required=True) abstract = fields.Str(required=True) content = fields.Str(required=True) user_id = fields.Integer(required=True) category_id = fields.Intege...
[ "marshmallow.fields.Integer", "app.serializer.ma.Function", "marshmallow.fields.Str", "marshmallow.fields.DateTime" ]
[((138, 163), 'marshmallow.fields.Str', 'fields.Str', ([], {'required': '(True)'}), '(required=True)\n', (148, 163), False, 'from marshmallow import fields\n'), ((179, 204), 'marshmallow.fields.Str', 'fields.Str', ([], {'required': '(True)'}), '(required=True)\n', (189, 204), False, 'from marshmallow import fields\n'),...
"""A notebook manager that uses S3 storage. (based on the Azure manager) http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html#using-a-different-notebook-store Drop this file in IPython/frontend/html/notebook 1. Create a new notebook profile - ipython profile create nbserver 2. edit ~/.ipython/profile_nbse...
[ "IPython.nbformat.current.reads", "tornado.web.HTTPError", "datetime.datetime.utcnow", "boto.s3.connection.S3Connection", "boto.s3.key.Key", "IPython.nbformat.current.writes", "IPython.utils.traitlets.Unicode" ]
[((1737, 1785), 'IPython.utils.traitlets.Unicode', 'Unicode', (['""""""'], {'config': '(True)', 'help': '"""AWS access key."""'}), "('', config=True, help='AWS access key.')\n", (1744, 1785), False, 'from IPython.utils.traitlets import Unicode, Instance\n'), ((1814, 1874), 'IPython.utils.traitlets.Unicode', 'Unicode', ...
from io import StringIO from pathlib import Path from unittest.mock import Mock, patch import pytest from faculty_mill.execute import run_notebook @pytest.fixture def tempdir(tmpdir): """Fixture that wraps pytest fixture to return Path object""" return Path(str(tmpdir)) @pytest.fixture def tmpnotebook(): ...
[ "faculty_mill.execute.run_notebook", "io.StringIO", "unittest.mock.patch", "unittest.mock.Mock" ]
[((918, 957), 'unittest.mock.patch', 'patch', (['"""faculty_mill.execute.papermill"""'], {}), "('faculty_mill.execute.papermill')\n", (923, 957), False, 'from unittest.mock import Mock, patch\n'), ((340, 350), 'io.StringIO', 'StringIO', ([], {}), '()\n', (348, 350), False, 'from io import StringIO\n'), ((515, 521), 'un...
from typing import List import sys import argparse def convert(input_str: str) -> str: color_list = input_str.split(",") color_hex = '#{:02x}{:02x}{:02x}'.format( int(color_list[0]), int(color_list[1]), int(color_list[2])) return color_hex def convert_list(input_list: List, delimiter_char: str) ...
[ "argparse.ArgumentParser" ]
[((611, 1141), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '(\n \'Convert a list of space-separated RGB colors to Hex colors. Note that the \'\n +\n \'quotation marks are required to separate the RGB colors! You can also optionally supply \'\n + \'a delimiter string, which w...
# -*- coding: utf-8 -*- # from functools import partial from werkzeug.local import Local from common.utils import LocalProxy from .models import Organization _thread_locals = Local() def get_org_from_request(request): oid = request.session.get("oid") # if not oid: # oid = request.META.get("HTTP_X_JM...
[ "functools.partial", "werkzeug.local.Local" ]
[((177, 184), 'werkzeug.local.Local', 'Local', ([], {}), '()\n', (182, 184), False, 'from werkzeug.local import Local\n'), ((815, 844), 'functools.partial', 'partial', (['_find', '"""current_org"""'], {}), "(_find, 'current_org')\n", (822, 844), False, 'from functools import partial\n')]
from helper import unittest, PillowTestCase, hopper class TestImageToBytes(PillowTestCase): def test_sanity(self): data = hopper().tobytes() self.assertIsInstance(data, bytes) if __name__ == '__main__': unittest.main()
[ "helper.hopper", "helper.unittest.main" ]
[((231, 246), 'helper.unittest.main', 'unittest.main', ([], {}), '()\n', (244, 246), False, 'from helper import unittest, PillowTestCase, hopper\n'), ((137, 145), 'helper.hopper', 'hopper', ([], {}), '()\n', (143, 145), False, 'from helper import unittest, PillowTestCase, hopper\n')]
from django.core.management.base import BaseCommand from mixer.backend.django import mixer from situation_report_app.models import Post from users_app.models import AppUser class Command(BaseCommand): def handle(self, *args, **options): AppUser.objects.filter(is_superuser=False).delete() count ...
[ "users_app.models.AppUser.objects.filter", "mixer.backend.django.mixer.blend" ]
[((443, 460), 'mixer.backend.django.mixer.blend', 'mixer.blend', (['Post'], {}), '(Post)\n', (454, 460), False, 'from mixer.backend.django import mixer\n'), ((501, 518), 'mixer.backend.django.mixer.blend', 'mixer.blend', (['Post'], {}), '(Post)\n', (512, 518), False, 'from mixer.backend.django import mixer\n'), ((253, ...
import inspect from argparse import ArgumentParser, Namespace from typing import Union, List, Tuple, Any def from_argparse_args(cls, args: Union[Namespace, ArgumentParser], **kwargs): """ Create an instance from CLI arguments. Args: args: The parser or namespace to take arguments from. Only known...
[ "inspect.signature", "argparse.Namespace" ]
[((2669, 2695), 'argparse.Namespace', 'Namespace', ([], {}), '(**modified_args)\n', (2678, 2695), False, 'from argparse import ArgumentParser, Namespace\n'), ((1153, 1184), 'inspect.signature', 'inspect.signature', (['cls.__init__'], {}), '(cls.__init__)\n', (1170, 1184), False, 'import inspect\n'), ((4003, 4025), 'ins...
from django.contrib import admin from django.urls import path, include from .views import * urlpatterns = [ path('tours/', TourView.as_view()), path('tours/<int:tour_id>/', about_tour), path('auth/', auth), path('register/', register) ]
[ "django.urls.path" ]
[((147, 187), 'django.urls.path', 'path', (['"""tours/<int:tour_id>/"""', 'about_tour'], {}), "('tours/<int:tour_id>/', about_tour)\n", (151, 187), False, 'from django.urls import path, include\n'), ((190, 209), 'django.urls.path', 'path', (['"""auth/"""', 'auth'], {}), "('auth/', auth)\n", (194, 209), False, 'from dja...
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os i...
[ "json.loads", "mock.patch", "azure.cognitiveservices.inkrecognizer.InkRecognizerClient", "mock.Mock", "json.dumps", "mock.patch.object", "os.path.realpath" ]
[((1286, 1332), 'mock.Mock', 'Mock', ([], {'name': '"""FakeCredential"""', 'get_token': '"""token"""'}), "(name='FakeCredential', get_token='token')\n", (1290, 1332), False, 'from mock import Mock\n'), ((2011, 2047), 'azure.cognitiveservices.inkrecognizer.InkRecognizerClient', 'InkRecognizerClient', (['URL', 'CREDENTIA...
import os import glob from distutils.core import setup from docxpy import VERSION # get all of the scripts scripts = glob.glob('bin/*') def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='docxpy', packages=['docxpy'], version=VERSION, description='A ...
[ "os.path.dirname", "glob.glob" ]
[((118, 136), 'glob.glob', 'glob.glob', (['"""bin/*"""'], {}), "('bin/*')\n", (127, 136), False, 'import glob\n'), ((185, 210), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (200, 210), False, 'import os\n')]
from http import client import json from rich.console import Console from Connector import Connector from Dashboard import Dashboard import signal import sys if __name__ == "__main__": console = Console() data = [] with open("credentials.json", "r") as file: data = json.loads(file.read()) connection = Conne...
[ "signal.signal", "signal.pause", "rich.console.Console", "Dashboard.Dashboard", "Connector.Connector", "sys.exit" ]
[((200, 209), 'rich.console.Console', 'Console', ([], {}), '()\n', (207, 209), False, 'from rich.console import Console\n'), ((315, 341), 'Connector.Connector', 'Connector', (['console'], {}), '(console, **data)\n', (324, 341), False, 'from Connector import Connector\n'), ((355, 401), 'Dashboard.Dashboard', 'Dashboard'...
from flask.testing import FlaskClient import pytest from flask import Flask from flask_mux import Mux from testing import test_router from testing.test_cases.middlewares import test_mws_router @pytest.fixture def client(): app = Flask(__name__) mux = Mux(app) mux.use('/', test_mws_router) return app.t...
[ "testing.test_router.test_extra_mws_failing_2", "testing.test_router.test_one_mw", "flask.Flask", "testing.test_router.test_extra_mws", "testing.test_router.test_multi_mws_failing", "testing.test_router.test_extra_mws_failing_1", "flask_mux.Mux", "testing.test_router.test_extra_mws_failing_3", "test...
[((235, 250), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (240, 250), False, 'from flask import Flask\n'), ((261, 269), 'flask_mux.Mux', 'Mux', (['app'], {}), '(app)\n', (264, 269), False, 'from flask_mux import Mux\n'), ((383, 422), 'testing.test_router.test_basic', 'test_router.test_basic', (['client'...
# Copyright (c) 2020 <NAME>. hk2699 at caa dot columbia dot edu. import os from . import zipPickle """ Deprecated subkeys separate from keys. Now all input/output must be done using key to Cache._dict[key]. Use Cache.get_dict() to get the whole _dict. """ def dict_except(d, keys_to_excl): return {k:d[k] for k ...
[ "os.path.dirname", "os.path.exists", "os.mkdir" ]
[((1540, 1569), 'os.path.exists', 'os.path.exists', (['self.fullpath'], {}), '(self.fullpath)\n', (1554, 1569), False, 'import os\n'), ((3275, 3305), 'os.path.dirname', 'os.path.dirname', (['self.fullpath'], {}), '(self.fullpath)\n', (3290, 3305), False, 'import os\n'), ((3368, 3381), 'os.mkdir', 'os.mkdir', (['pth'], ...
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import re import time import urllib from common import ParseFlags from common import TestDriver from common import IntegrationTest from decorator...
[ "urllib.quote_plus", "re.match", "decorators.ChromeVersionBeforeM", "common.TestDriver", "common.IntegrationTest.RunAllTests", "decorators.ChromeVersionEqualOrAfterM" ]
[((4027, 4057), 'decorators.ChromeVersionEqualOrAfterM', 'ChromeVersionEqualOrAfterM', (['(74)'], {}), '(74)\n', (4053, 4057), False, 'from decorators import ChromeVersionEqualOrAfterM\n'), ((4567, 4597), 'decorators.ChromeVersionEqualOrAfterM', 'ChromeVersionEqualOrAfterM', (['(74)'], {}), '(74)\n', (4593, 4597), Fals...
import nltk from nltk.collocations import BigramCollocationFinder from nltk.corpus import webtext from nltk.metrics import BigramAssocMeasures tokens=[t.lower() for t in webtext.words('grail.txt')] words=BigramCollocationFinder.from_words(tokens) print(words.nbest(BigramAssocMeasures.likelihood_ratio, 10))
[ "nltk.collocations.BigramCollocationFinder.from_words", "nltk.corpus.webtext.words" ]
[((204, 246), 'nltk.collocations.BigramCollocationFinder.from_words', 'BigramCollocationFinder.from_words', (['tokens'], {}), '(tokens)\n', (238, 246), False, 'from nltk.collocations import BigramCollocationFinder\n'), ((170, 196), 'nltk.corpus.webtext.words', 'webtext.words', (['"""grail.txt"""'], {}), "('grail.txt')\...
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. 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...
[ "googlecloudsdk.core.util.platforms.OperatingSystem.IsWindows", "os.path.isdir" ]
[((1329, 1366), 'googlecloudsdk.core.util.platforms.OperatingSystem.IsWindows', 'platforms.OperatingSystem.IsWindows', ([], {}), '()\n', (1364, 1366), False, 'from googlecloudsdk.core.util import platforms\n'), ((1460, 1481), 'os.path.isdir', 'os.path.isdir', (['ve_dir'], {}), '(ve_dir)\n', (1473, 1481), False, 'import...
import textwrap # This dictionary contains the map of the school. # # Each entry in the dictionary is a room or other location. The key is the # room name ("the_office"), and the value is another dictionary containing # properties of that room, as follows: # # description: the text to be displayed when the player wa...
[ "textwrap.fill" ]
[((3219, 3269), 'textwrap.fill', 'textwrap.fill', (["school_map[location]['description']"], {}), "(school_map[location]['description'])\n", (3232, 3269), False, 'import textwrap\n')]
import logging import asyncio from dataclasses import asdict from handshake_client.sockets import get_connection from handshake_client.chain import ChainEntry async def main(): logger = logging.getLogger() # network regtest url = "http://localhost:14037" api_key = "YOUR API KEY" sio = await get_co...
[ "logging.getLogger", "logging.basicConfig", "dataclasses.asdict", "handshake_client.sockets.get_connection", "handshake_client.chain.ChainEntry.from_raw", "asyncio.get_event_loop" ]
[((192, 211), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (209, 211), False, 'import logging\n'), ((394, 421), 'handshake_client.chain.ChainEntry.from_raw', 'ChainEntry.from_raw', (['tip[1]'], {}), '(tip[1])\n', (413, 421), False, 'from handshake_client.chain import ChainEntry\n'), ((762, 801), 'logging...
""" Plotly - Sparklines =================== """ # ------------------- # Main # ------------------- # https://chart-studio.plotly.com/~empet/13748/sparklines/#/code # https://omnipotent.net/jquery.sparkline/#s-about # https://chart-studio.plotly.com/create/?fid=Dreamshot:8025#/ # Libraries import numpy as np import pan...
[ "pandas.to_timedelta", "plotly.subplots.make_subplots", "numpy.arange", "numpy.random.randint", "pandas.DataFrame", "pandas.to_datetime" ]
[((575, 587), 'numpy.arange', 'np.arange', (['S'], {}), '(S)\n', (584, 587), True, 'import numpy as np\n'), ((592, 639), 'numpy.random.randint', 'np.random.randint', ([], {'low': '(1)', 'high': '(100)', 'size': '(S, N)'}), '(low=1, high=100, size=(S, N))\n', (609, 639), True, 'import numpy as np\n'), ((667, 682), 'pand...
import importlib rpg_module = importlib.import_module("21_rpg") Character = rpg_module.Character encounter = rpg_module.encounter simulate_battle = rpg_module.simulate_battle def test_encounter(): player = Character(8, 5, 5) boss = Character(12, 7, 2) assert encounter(player, boss) is None assert bo...
[ "importlib.import_module" ]
[((31, 64), 'importlib.import_module', 'importlib.import_module', (['"""21_rpg"""'], {}), "('21_rpg')\n", (54, 64), False, 'import importlib\n')]
from monitoring.network import NetworkMetrics from monitoring.rabbitmq import RabbitmqMetric from monitoring.redis import RedisMetric class Metrics: def __init__(self, config): self.network_metric = NetworkMetrics(config=config["network"]) self.rabbitmq_metric = RabbitmqMetric(config=config["rabbi...
[ "monitoring.network.NetworkMetrics", "monitoring.redis.RedisMetric", "monitoring.rabbitmq.RabbitmqMetric" ]
[((213, 253), 'monitoring.network.NetworkMetrics', 'NetworkMetrics', ([], {'config': "config['network']"}), "(config=config['network'])\n", (227, 253), False, 'from monitoring.network import NetworkMetrics\n'), ((285, 326), 'monitoring.rabbitmq.RabbitmqMetric', 'RabbitmqMetric', ([], {'config': "config['rabbitmq']"}), ...
# coding:utf-8 from flask_sqlalchemy import SQLAlchemy from hello import db #SQLALCHEMY_DATABASE_URL="mysql://fly:('flyfly')@localhost/test1" #SQLALCHEMY_TRACK_MODIFICATIONS = True class Role(db.Model): __tablename__ = 'roles' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64),...
[ "hello.db.ForeignKey", "hello.db.String", "hello.db.Column" ]
[((245, 284), 'hello.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (254, 284), False, 'from hello import db\n'), ((459, 498), 'hello.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (468, 498), False, 'f...
# Copyright (c) 2020 Samia import bpy from .operator import OBJECT_OT_vertex_groups_move_by_filter_order, DATA_PT_sort_vertex_groups_list, \ MESH_UL_sort_vertex_groups_list, MVGBF_ToolSettings, FilterItems bl_info = { "name": "Move Vertex Groups by Filter Order", "author": "Samia", "version": (1, 0), ...
[ "bpy.props.PointerProperty", "bpy.utils.register_class", "bpy.utils.unregister_class" ]
[((989, 1039), 'bpy.props.PointerProperty', 'bpy.props.PointerProperty', ([], {'type': 'MVGBF_ToolSettings'}), '(type=MVGBF_ToolSettings)\n', (1014, 1039), False, 'import bpy\n'), ((917, 946), 'bpy.utils.register_class', 'bpy.utils.register_class', (['cls'], {}), '(cls)\n', (941, 946), False, 'import bpy\n'), ((1146, 1...
import os.path import re from numpy.distutils.core import setup, Extension from numpy.distutils.system_info import get_info def find_version(*paths): fname = os.path.join(os.path.dirname(__file__), *paths) with open(fname) as fp: code = fp.read() match = re.search(r"^__version__ = ['\"]([^'\"]*)['\...
[ "numpy.distutils.core.Extension", "re.search" ]
[((926, 1018), 'numpy.distutils.core.Extension', 'Extension', ([], {'name': '"""plateflex.cpwt"""', 'sources': "['src/cpwt/cpwt.f90', 'src/cpwt/cpwt_sub.f90']"}), "(name='plateflex.cpwt', sources=['src/cpwt/cpwt.f90',\n 'src/cpwt/cpwt_sub.f90'])\n", (935, 1018), False, 'from numpy.distutils.core import setup, Extens...
from django.contrib.auth.models import Group, Permission from rest_framework.permissions import IsAdminUser from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from meiduo_admin.serializer.groups import GroupSerializer from meiduo_admin.serializer.permission import PermissionS...
[ "django.contrib.auth.models.Permission.objects.all", "meiduo_admin.serializer.permission.PermissionSerializer", "rest_framework.response.Response", "django.contrib.auth.models.Group.objects.all" ]
[((481, 500), 'django.contrib.auth.models.Group.objects.all', 'Group.objects.all', ([], {}), '()\n', (498, 500), False, 'from django.contrib.auth.models import Group, Permission\n'), ((676, 700), 'django.contrib.auth.models.Permission.objects.all', 'Permission.objects.all', ([], {}), '()\n', (698, 700), False, 'from dj...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Common trainer utilities.""" import warnings from collections import OrderedDict from typing import Dict, Optional, Tuple, Union import torch import torch.nn as nn from torch import Tensor from torch.nn.modules import Co...
[ "warnings.warn", "torch.nn.modules.Conv2d", "torch.nn.init.kaiming_normal_", "torch.device" ]
[((4941, 5165), 'torch.nn.modules.Conv2d', 'Conv2d', (['new_in_channels', 'layer.out_channels'], {'kernel_size': 'layer.kernel_size', 'stride': 'updated_stride', 'padding': 'updated_padding', 'dilation': 'layer.dilation', 'groups': 'layer.groups', 'bias': 'use_bias', 'padding_mode': 'layer.padding_mode'}), '(new_in_cha...
# ================================================================== # =========== Implementação de uma aplicação de rede =============== # DUPLA: <NAME> - MAT<NAME> # ================================================================== """ No TCP é necessário pedir conexão ao servidor """ import socket import pickl...
[ "socket.socket" ]
[((388, 437), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (401, 437), False, 'import socket\n')]
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2.1 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pf...
[ "six.iteritems" ]
[((15446, 15475), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (15455, 15475), False, 'from six import iteritems\n')]
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2015 uralbash <<EMAIL>> # # Distributed under terms of the MIT license. import types from sqlalchemy.orm import Session from .action import CRUD __all__ = ['crud_sessionmaker', 'CRUDSession'] class CRUDSession(Session): """ Wr...
[ "types.MethodType" ]
[((1201, 1232), 'types.MethodType', 'types.MethodType', (['CRUD', 'session'], {}), '(CRUD, session)\n', (1217, 1232), False, 'import types\n')]
# -*- coding: utf-8 -*- # """ https://github.com/RDFLib/pySHACL/issues/71 """ import rdflib from pyshacl import validate shacl_file_text = """\ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix...
[ "rdflib.Graph", "pyshacl.validate" ]
[((2231, 2245), 'rdflib.Graph', 'rdflib.Graph', ([], {}), '()\n', (2243, 2245), False, 'import rdflib\n'), ((2309, 2443), 'pyshacl.validate', 'validate', (['data'], {'shacl_graph': 'shacl_file_text', 'data_graph_format': '"""turtle"""', 'shacl_graph_format': '"""turtle"""', 'inference': '"""rdfs"""', 'debug': '(True)'}...
import numpy as np from PIL import Image import tensorflow as tf import re #ref: https://github.com/tensorflow/models/blob/1af55e018eebce03fb61bba9959a04672536107d/tutorials/image/imagenet/classify_image.py class NodeLookup(object): """Converts integer node ID's to human readable labels.""" def __init__(self, ...
[ "PIL.Image.open", "tensorflow.gfile.Exists", "tensorflow.get_variable", "re.compile", "tensorflow.placeholder", "tensorflow.Session", "numpy.argmax", "tensorflow.gfile.FastGFile", "numpy.squeeze", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "tensorflow.global_variables_initializer"...
[((2500, 2512), 'tensorflow.Session', 'tf.Session', ([], {}), '()\n', (2510, 2512), True, 'import tensorflow as tf\n'), ((2521, 2628), 'tensorflow.get_variable', 'tf.get_variable', ([], {'name': '"""adv"""', 'shape': '[1, 100, 100, 3]', 'dtype': 'tf.float32', 'initializer': 'tf.zeros_initializer'}), "(name='adv', shape...
from coincurve import PrivateKey from coincurve import PublicKey from coincurve import verify_signature SECPK1_N = ( 115792089237316195423570985008687907852837564279074904382605163141518161494337 ) def sign_ecdsa(message, priv): """Gets ECDSA signature for message from private key.""" if not isinstance(...
[ "coincurve.PrivateKey", "coincurve.PublicKey", "coincurve.PublicKey.from_signature_and_message" ]
[((706, 722), 'coincurve.PrivateKey', 'PrivateKey', (['priv'], {}), '(priv)\n', (716, 722), False, 'from coincurve import PrivateKey\n'), ((1538, 1562), 'coincurve.PublicKey', 'PublicKey', (["(b'\\x04' + pub)"], {}), "(b'\\x04' + pub)\n", (1547, 1562), False, 'from coincurve import PublicKey\n'), ((2405, 2474), 'coincu...
import random import time import datetime from common.constants import DATE_ONLY_FORMAT def tomorrow(): return datetime.datetime.now() + datetime.timedelta(days=1) def generate_random_date(start, end, format=DATE_ONLY_FORMAT): etime = time.mktime(time.strptime(end, format)) stime = time.mktime(time.str...
[ "time.strptime", "datetime.timedelta", "datetime.datetime.now", "random.random", "time.localtime" ]
[((118, 141), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (139, 141), False, 'import datetime\n'), ((144, 170), 'datetime.timedelta', 'datetime.timedelta', ([], {'days': '(1)'}), '(days=1)\n', (162, 170), False, 'import datetime\n'), ((260, 286), 'time.strptime', 'time.strptime', (['end', 'forma...
import os ''' Working in Data Directory / All files saved in Data directory ''' def merge_fastq(basecallDir): merge_cmd = "cat " for file in os.listdir(basecallDir): if file.endswith(".fastq"): merge_cmd += file + " " merge = "> " + basecallDir + " reads.fastq" ...
[ "os.system", "os.listdir", "os.getcwd" ]
[((158, 181), 'os.listdir', 'os.listdir', (['basecallDir'], {}), '(basecallDir)\n', (168, 181), False, 'import os\n'), ((345, 365), 'os.system', 'os.system', (['merge_cmd'], {}), '(merge_cmd)\n', (354, 365), False, 'import os\n'), ((950, 970), 'os.system', 'os.system', (['index_cmd'], {}), '(index_cmd)\n', (959, 970), ...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.11.4 # kernelspec: # display_name: wtte-dev # language: python # name: wtte-dev # --- # %% [markdown] # # WTTE-RNN in PyTorch # # <NAME> ...
[ "torch_wtte.losses.WeibullCensoredNLLLoss", "torch.nn.Tanh", "matplotlib.pyplot.ylabel", "torch_wtte.losses.WeibullActivation", "numpy.log", "numpy.nanmean", "torch.cuda.is_available", "sys.path.append", "numpy.random.binomial", "torch.nn.GRU", "matplotlib.pyplot.imshow", "matplotlib.pyplot.xl...
[((799, 820), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (814, 820), False, 'import sys\n'), ((852, 870), 'numpy.random.seed', 'np.random.seed', (['(11)'], {}), '(11)\n', (866, 870), True, 'import numpy as np\n'), ((871, 892), 'torch.manual_seed', 'torch.manual_seed', (['(11)'], {}), '(11)\n'...
import torch import torch.nn as nn class Encoder(nn.Module): def __init__(self): super(Encoder, self).__init__() self.encoding_net = nn.Sequential( nn.Conv2d(4, 32, kernel_size=(8, 8), stride=4), nn.Conv2d(32, 64, kernel_size=(4, 4), stride=2), nn.Conv2d(64, 64,...
[ "torch.nn.ReLU", "torch.ones", "torch.nn.CrossEntropyLoss", "torch.log_softmax", "torch.rand", "torch.nn.KLDivLoss", "torch.sign", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.Softmax2d", "torch.nn.ConvTranspose2d", "torch.cat", "torch.nn.GRU" ]
[((3154, 3178), 'torch.rand', 'torch.rand', (['(1)', '(4)', '(84)', '(84)'], {}), '(1, 4, 84, 84)\n', (3164, 3178), False, 'import torch\n'), ((3195, 3219), 'torch.rand', 'torch.rand', (['(1)', '(1)', '(84)', '(84)'], {}), '(1, 1, 84, 84)\n', (3205, 3219), False, 'import torch\n'), ((3238, 3254), 'torch.rand', 'torch.r...
# # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Trademarks. T...
[ "PySide.QtCore.QModelIndex", "json.loads", "maya.cmds.ls", "PySide.QtCore.QMimeData", "PySide.QtGui.QCheckBox", "PySide.QtCore.QByteArray", "json.dumps", "PySide.QtGui.QComboBox", "maya.cmds.setAttr", "maya.cmds.addAttr", "PySide.QtGui.QPushButton", "PySide.QtGui.QVBoxLayout", "maya.cmds.del...
[((5119, 5184), 'maya.cmds.getAttr', 'cmds.getAttr', (["('%s.%s' % (nodeName, EXPORTED_ATTRS_MAYA_ATTR_NAME))"], {}), "('%s.%s' % (nodeName, EXPORTED_ATTRS_MAYA_ATTR_NAME))\n", (5131, 5184), False, 'from maya import cmds\n'), ((5258, 5280), 'json.loads', 'json.loads', (['jsonString'], {}), '(jsonString)\n', (5268, 5280...
import tkinter as tk from tkinter import ttk, filedialog import platform import os from os.path import expanduser import shutil import sys import subprocess from configuration import Configuration from dialog import (RenameDialog, NewDirectoryDialog, InfoDialog, HelpDialog, MessageYesNoDialog, Messa...
[ "dialog.MessageYesNoDialog", "tkinter.ttk.Scrollbar", "dialog.InfoDialog", "tkinter.ttk.Treeview", "os.remove", "os.listdir", "shutil.copy2", "os.path.isdir", "subprocess.call", "os.path.expanduser", "tkinter.Menu", "dialog.NewDirectoryDialog", "os.path.getsize", "os.path.isfile", "os.pa...
[((18325, 18332), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (18330, 18332), True, 'import tkinter as tk\n'), ((725, 764), 'tkinter.ttk.Scrollbar', 'ttk.Scrollbar', (['self'], {'orient': 'tk.VERTICAL'}), '(self, orient=tk.VERTICAL)\n', (738, 764), False, 'from tkinter import ttk, filedialog\n'), ((895, 913), 'tkinter.ttk...
import numpy as np from points import Points from dataloader import loader def distance(p1, p2): return np.sum((p1 - p2) ** 2) def initial_cluster(data, k): ''' initialized the centers for K-means++ inputs: data - numpy array k - number of clusters ''' centers = [] centers...
[ "numpy.random.choice", "numpy.take", "numpy.array", "numpy.sum", "numpy.zeros", "dataloader.loader", "numpy.argmin", "points.Points", "numpy.arange" ]
[((109, 131), 'numpy.sum', 'np.sum', (['((p1 - p2) ** 2)'], {}), '((p1 - p2) ** 2)\n', (115, 131), True, 'import numpy as np\n'), ((370, 384), 'numpy.zeros', 'np.zeros', (['size'], {}), '(size)\n', (378, 384), True, 'import numpy as np\n'), ((399, 414), 'numpy.arange', 'np.arange', (['size'], {}), '(size)\n', (408, 414...
def readcsv_as_cl_input(path): import pandas as pd csv = pd.read_csv(path) try: csv = csv.drop('Unnamed: 0', axis = 1) except: print('No Labels in Regionprops of {}'.format(path)) try: csv = csv.drop('prediction', axis = 1) except: print('No Predictions in Re...
[ "pandas.read_csv" ]
[((65, 82), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (76, 82), True, 'import pandas as pd\n')]
#高速フーリエ変換 import sys input = sys.stdin.readline from scipy import signal n=int(input()) a=[] b=[] for _ in range(n): at,bt=map(int,input().split()) a.append(at) b.append(bt) l=signal.fftconvolve(a,b) print(0) for i in l: print(int(i))
[ "scipy.signal.fftconvolve" ]
[((190, 214), 'scipy.signal.fftconvolve', 'signal.fftconvolve', (['a', 'b'], {}), '(a, b)\n', (208, 214), False, 'from scipy import signal\n')]
import unittest import os import sys # add src dir to sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) from utils.postprocessing import calc_knee_angle from utils.postprocessing import find_camera_facing_side from utils.postprocessing import filter_bad_angles from utils.postprocessing import mak...
[ "os.path.dirname", "utils.postprocessing.calc_knee_angle", "utils.postprocessing.filter_bad_angles", "utils.postprocessing.make_recommendation", "utils.postprocessing.find_camera_facing_side" ]
[((88, 113), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (103, 113), False, 'import os\n'), ((454, 506), 'utils.postprocessing.calc_knee_angle', 'calc_knee_angle', (['[[100, 100], [50, 150], [100, 200]]'], {}), '([[100, 100], [50, 150], [100, 200]])\n', (469, 506), False, 'from utils.postp...
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-03-03 00:41 from __future__ import unicode_literals from django.conf import settings import django.contrib.auth.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
[ "django.db.models.OneToOneField", "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((1641, 1772), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'default': '(1)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""assignee"""', 'to': '"""website.Contributor"""'}), "(default=1, on_delete=django.db.models.deletion.CASCADE,\n related_name='assignee', to='website.C...
import os from pathlib import Path import pytest @pytest.fixture() def test_data_dir(): here = Path(os.path.dirname(__file__)) return here / 'data'
[ "pytest.fixture", "os.path.dirname" ]
[((53, 69), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (67, 69), False, 'import pytest\n'), ((107, 132), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (122, 132), False, 'import os\n')]
import os import sys import periphery from .test import ptest, pokay, passert, AssertRaises if sys.version_info[0] == 3: raw_input = input pwm_chip = None pwm_channel = None def test_arguments(): ptest() # Invalid open types with AssertRaises("invalid open types", TypeError): periphery.PW...
[ "periphery.PWM", "os.environ.get", "sys.exit" ]
[((790, 826), 'periphery.PWM', 'periphery.PWM', (['pwm_chip', 'pwm_channel'], {}), '(pwm_chip, pwm_channel)\n', (803, 826), False, 'import periphery\n'), ((4636, 4672), 'periphery.PWM', 'periphery.PWM', (['pwm_chip', 'pwm_channel'], {}), '(pwm_chip, pwm_channel)\n', (4649, 4672), False, 'import periphery\n'), ((308, 33...
import itertools import pytest import numpy as np import mmu from mmu.commons._testing import generate_test_labels from mmu.commons._testing import compute_reference_metrics Y_DTYPES = [ bool, np.bool_, int, np.int32, np.int64, float, np.float32, np.float64, ] YHAT_DTYPES = [ bool...
[ "numpy.tile", "numpy.allclose", "mmu.commons._testing.compute_reference_metrics", "itertools.product", "numpy.random.uniform", "numpy.array_equal", "pytest.raises", "mmu.binary_metrics", "mmu.commons._testing.generate_test_labels" ]
[((584, 624), 'itertools.product', 'itertools.product', (['Y_DTYPES', 'YHAT_DTYPES'], {}), '(Y_DTYPES, YHAT_DTYPES)\n', (601, 624), False, 'import itertools\n'), ((1262, 1288), 'mmu.commons._testing.generate_test_labels', 'generate_test_labels', (['(1000)'], {}), '(1000)\n', (1282, 1288), False, 'from mmu.commons._test...
import torch from Chamfer3D.dist_chamfer_3D import chamfer_3DDist chamfer_dist = chamfer_3DDist() def chamfer(p1, p2): d1, d2, _, _ = chamfer_dist(p1, p2) return torch.mean(d1) + torch.mean(d2) def chamfer_sqrt(p1, p2): d1, d2, _, _ = chamfer_dist(p1, p2) d1 = torch.mean(torch.sqrt(d1)) d2 = tor...
[ "torch.mean", "torch.sqrt", "torch.subtract", "Chamfer3D.dist_chamfer_3D.chamfer_3DDist" ]
[((81, 97), 'Chamfer3D.dist_chamfer_3D.chamfer_3DDist', 'chamfer_3DDist', ([], {}), '()\n', (95, 97), False, 'from Chamfer3D.dist_chamfer_3D import chamfer_3DDist\n'), ((461, 475), 'torch.mean', 'torch.mean', (['d1'], {}), '(d1)\n', (471, 475), False, 'import torch\n'), ((774, 817), 'torch.mean', 'torch.mean', (['loss_...
from django.contrib.auth.models import Group from django.db.models import signals from dms_plugins.pluginpoints import BeforeStoragePluginPoint, BeforeRetrievalPluginPoint, BeforeRemovalPluginPoint from dms_plugins.workers import Plugin, PluginError SECURITY_GROUP_NAME = 'security' class GroupSecurityStore(Plugin, ...
[ "django.db.models.signals.post_syncdb.connect", "dms_plugins.workers.PluginError", "django.contrib.auth.models.Group.objects.get_or_create" ]
[((1756, 1806), 'django.db.models.signals.post_syncdb.connect', 'signals.post_syncdb.connect', (['create_security_group'], {}), '(create_security_group)\n', (1783, 1806), False, 'from django.db.models import signals\n'), ((1651, 1704), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_crea...
import datetime as dt from django.core.exceptions import ValidationError def year_validator(value): if value > dt.date.today().year: raise ValidationError( ('Вы ввели некорректное значение. Год не может быть больше ' 'текущего.'), params={'value': value}, )
[ "datetime.date.today", "django.core.exceptions.ValidationError" ]
[((154, 273), 'django.core.exceptions.ValidationError', 'ValidationError', (['"""Вы ввели некорректное значение. Год не может быть больше текущего."""'], {'params': "{'value': value}"}), "(\n 'Вы ввели некорректное значение. Год не может быть больше текущего.',\n params={'value': value})\n", (169, 273), False, 'f...
# import libraries import os import numpy as np import pandas as pd import xarray as xray import ftplib, wget, urllib import dask as da from dask.diagnostics import ProgressBar from multiprocessing.pool import ThreadPool import matplotlib.pyplot as plt import shapely.ops from shapely.geometry import box, Polygon from m...
[ "wget.download", "shapely.geometry.box", "numpy.array", "pandas.MultiIndex.from_tuples", "pandas.notnull", "xarray.open_mfdataset", "pandas.date_range", "os.remove", "ogh.ensure_dir", "ftplib.FTP", "os.listdir", "multiprocessing.pool.ThreadPool", "geopandas.GeoDataFrame", "urllib.request.u...
[((2690, 2715), 'os.path.basename', 'os.path.basename', (['fileurl'], {}), '(fileurl)\n', (2706, 2715), False, 'import os\n'), ((2723, 2747), 'os.path.isfile', 'os.path.isfile', (['basename'], {}), '(basename)\n', (2737, 2747), False, 'import os\n'), ((5215, 5240), 'os.path.basename', 'os.path.basename', (['fileurl'], ...
"""plab2_gruppe20""" from math import sqrt from dependencies.motors import Motors class Motob: """Motor object""" def __init__(self): """append the motors in motors""" self.motor1 = Motors() self.motors = [] # liste over motorer objektet styrer self.value = [] # most recen...
[ "math.sqrt", "dependencies.motors.Motors" ]
[((211, 219), 'dependencies.motors.Motors', 'Motors', ([], {}), '()\n', (217, 219), False, 'from dependencies.motors import Motors\n'), ((1351, 1374), 'math.sqrt', 'sqrt', (['(motor_value / 180)'], {}), '(motor_value / 180)\n', (1355, 1374), False, 'from math import sqrt\n'), ((1427, 1450), 'math.sqrt', 'sqrt', (['(mot...
# # 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 us...
[ "numpy.hstack", "mleap.sklearn.preprocessing.data.LabelEncoder", "mleap.sklearn.preprocessing.data.OneHotEncoder", "tempfile.mkdtemp", "shutil.rmtree", "json.load", "numpy.testing.assert_array_equal" ]
[((1114, 1188), 'mleap.sklearn.preprocessing.data.LabelEncoder', 'LabelEncoder', ([], {'input_features': "['label']", 'output_features': '"""label_le_encoded"""'}), "(input_features=['label'], output_features='label_le_encoded')\n", (1126, 1188), False, 'from mleap.sklearn.preprocessing.data import LabelEncoder\n'), ((...
import glob import torch import random import numpy as np import torch.nn as nn import matplotlib.pyplot as plt from src.models.utils import FragmentDataset, ScratchGAN, loss_fn_scaled_mse def retrain(scratchgan, dataset, N, batch_size=1): scratchgan.train() # for n, (x, y) in enumerate(dataset.take(N, batc...
[ "src.models.utils.ScratchGAN", "numpy.max", "torch.nn.MSELoss", "src.models.utils.FragmentDataset", "numpy.min", "torch.no_grad", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show" ]
[((1249, 1261), 'src.models.utils.ScratchGAN', 'ScratchGAN', ([], {}), '()\n', (1259, 1261), False, 'from src.models.utils import FragmentDataset, ScratchGAN, loss_fn_scaled_mse\n'), ((1304, 1321), 'src.models.utils.FragmentDataset', 'FragmentDataset', ([], {}), '()\n', (1319, 1321), False, 'from src.models.utils impor...