code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
import logging from pathlib import Path from taskcat._config import Config from taskcat._lambda_build import LambdaBuild LOG = logging.getLogger(__name__) class Package: """packages lambda source files into zip files. If a dockerfile is present in a source folder, it will be run prior to zipping the content...
[ "taskcat._config.Config.create", "pathlib.Path", "logging.getLogger", "taskcat._lambda_build.LambdaBuild" ]
[((129, 156), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (146, 156), False, 'import logging\n'), ((1100, 1278), 'taskcat._config.Config.create', 'Config.create', ([], {'project_config_path': 'project_config', 'project_root': 'project_root_path', 'args': "{'project': {'lambda_zip_path'...
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.python.platform.test.main", "tensorflow.core.function.trace_type.serialization.serialize", "tensorflow.core.function.trace_type.serialization.deserialize", "tensorflow.core.function.trace_type.serialization_test_pb2.MyCompositeRepresentation", "tensorflow.core.function.trace_type.serialization_t...
[((5695, 5706), 'tensorflow.python.platform.test.main', 'test.main', ([], {}), '()\n', (5704, 5706), False, 'from tensorflow.python.platform import test\n'), ((1256, 1335), 'tensorflow.core.function.trace_type.serialization_test_pb2.MyCustomRepresentation', 'serialization_test_pb2.MyCustomRepresentation', ([], {'index'...
#!/usr/bin/env python3 from influxdb import InfluxDBClient import os import sys import re import datetime import calendar from stravalib.client import Client ######### Variables ############ path_for_files = "./authfiles/" influxhost = os.getenv("GRAVA_INFLUX_HOST", "localhost") influxport = os.getenv("GRAVA_INFLUX_P...
[ "re.split", "influxdb.InfluxDBClient", "os.path.exists", "stravalib.client.Client", "datetime.timedelta", "os.getenv", "sys.exit" ]
[((238, 281), 'os.getenv', 'os.getenv', (['"""GRAVA_INFLUX_HOST"""', '"""localhost"""'], {}), "('GRAVA_INFLUX_HOST', 'localhost')\n", (247, 281), False, 'import os\n'), ((295, 333), 'os.getenv', 'os.getenv', (['"""GRAVA_INFLUX_PORT"""', '"""8086"""'], {}), "('GRAVA_INFLUX_PORT', '8086')\n", (304, 333), False, 'import o...
"""User details and sex of patient added Revision ID: 7d4bab0acebb Revises: <PASSWORD> Create Date: 2017-09-14 14:53:07.958616 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '7d4bab0acebb' down_revision = 'b<PASSWORD>' branch_labels = None depends_on = None ...
[ "sqlalchemy.String", "alembic.op.drop_column" ]
[((866, 899), 'alembic.op.drop_column', 'op.drop_column', (['"""users"""', '"""l_name"""'], {}), "('users', 'l_name')\n", (880, 899), False, 'from alembic import op\n'), ((904, 939), 'alembic.op.drop_column', 'op.drop_column', (['"""users"""', '"""initials"""'], {}), "('users', 'initials')\n", (918, 939), False, 'from ...
# Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "stevedore.driver.DriverManager", "logging.getLogger" ]
[((680, 707), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (697, 707), False, 'import logging\n'), ((766, 840), 'stevedore.driver.DriverManager', 'driver.DriverManager', ([], {'namespace': 'namespace', 'name': 'name', 'invoke_on_load': '(False)'}), '(namespace=namespace, name=name, invo...
from django.urls import path from .views import ( ProjectListView, ProjectDetailView, ProjectEditView, ProjectDeleteView, ProjectCreateView, ReviewCreateView, project_search, ) urlpatterns = [ path('', ProjectListView.as_view(), name="project_list"), path('projects/<int:pk>/', Proje...
[ "django.urls.path" ]
[((710, 756), 'django.urls.path', 'path', (['"""search/"""', 'project_search'], {'name': '"""search"""'}), "('search/', project_search, name='search')\n", (714, 756), False, 'from django.urls import path\n')]
import os from ctypes import wintypes from ctypes import * import numpy as np import cv2 import win32api import win32con import win32gui import win32ui from . import img_data_folder from . import utils from . import exception class BITMAPINFOHEADER(Structure): _fields_ = [ ('biSize', wintypes.DWORD), ...
[ "win32gui.ClientToScreen", "win32gui.GetDesktopWindow", "cv2.imdecode", "win32gui.CreateCompatibleBitmap", "os.path.join", "cv2.inRange", "cv2.matchTemplate", "win32gui.SelectObject", "win32gui.BitBlt", "win32gui.ReleaseDC", "cv2.cvtColor", "win32gui.SetStretchBltMode", "cv2.bitwise_not", ...
[((1229, 1258), 'win32gui.GetDC', 'win32gui.GetDC', (['target_handle'], {}), '(target_handle)\n', (1243, 1258), False, 'import win32gui\n'), ((1278, 1315), 'win32gui.CreateCompatibleDC', 'win32gui.CreateCompatibleDC', (['targetDC'], {}), '(targetDC)\n', (1305, 1315), False, 'import win32gui\n'), ((1321, 1384), 'win32gu...
from jupyter_core.paths import jupyter_data_dir import subprocess import os import psutil import errno import stat c = get_config() # https://jupyter-notebook.readthedocs.io/en/stable/config.html c.NotebookApp.ip = '*' c.NotebookApp.port = 8090 c.NotebookApp.notebook_dir="./" c.NotebookApp.open_browser = False c.Noteb...
[ "os.path.isfile", "psutil.virtual_memory", "os.path.exists", "os.getenv" ]
[((794, 830), 'os.getenv', 'os.getenv', (['"""WORKSPACE_BASE_URL"""', '"""/"""'], {}), "('WORKSPACE_BASE_URL', '/')\n", (803, 830), False, 'import os\n'), ((1142, 1189), 'os.getenv', 'os.getenv', (['"""SHUTDOWN_INACTIVE_KERNELS"""', '"""false"""'], {}), "('SHUTDOWN_INACTIVE_KERNELS', 'false')\n", (1151, 1189), False, '...
import boto3 import json import sys import os import time from datetime import datetime, timedelta client = boto3.client('logs', region_name=os.environ.get('AWS_REGION')) metrics_client = boto3.client("cloudwatch", region_name=os.environ["AWS_REGION"]) start_time = datetime.utcnow() - timedelta(seconds=600) end_time ...
[ "os.remove", "json.loads", "boto3.client", "time.sleep", "os.environ.get", "datetime.datetime.utcnow", "datetime.timedelta", "sys.exit" ]
[((190, 254), 'boto3.client', 'boto3.client', (['"""cloudwatch"""'], {'region_name': "os.environ['AWS_REGION']"}), "('cloudwatch', region_name=os.environ['AWS_REGION'])\n", (202, 254), False, 'import boto3\n'), ((322, 339), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (337, 339), False, 'from dateti...
import os from six.moves import StringIO from unittest import TestCase from htsworkflow.util import makebed class testMakeBed(TestCase): def test_multi_1_0_0_limit_1(self): instream = StringIO('>HWI-EAS229_26_209LVAAXX:7:3:112:383 TCAAATCTTATGCTANGAATCNCAAATTTTCT 1:0:0 mm9_chr13_random.fa:1240R0') ...
[ "unittest.main", "six.moves.StringIO", "htsworkflow.util.makebed.make_bed_from_multi_eland_generator", "unittest.TestSuite", "unittest.defaultTestLoader.loadTestsFromTestCase" ]
[((2315, 2326), 'unittest.TestSuite', 'TestSuite', ([], {}), '()\n', (2324, 2326), False, 'from unittest import TestSuite, defaultTestLoader\n'), ((2480, 2505), 'unittest.main', 'main', ([], {'defaultTest': '"""suite"""'}), "(defaultTest='suite')\n", (2484, 2505), False, 'from unittest import main\n'), ((196, 325), 'si...
from gevent import pywsgi from geventwebsocket.handler import WebSocketHandler import importlib.util import os from Jumpscale import j class Package(j.baseclasses.threebot_package): def _init(self, **kwargs): self.bcdb = self._package.threebot_server.bcdb_get("fruum") def prepare(self): """ ...
[ "os.path.dirname", "Jumpscale.j.servers.gedishttp.get_app", "Jumpscale.j.builders.runtimes.python3.pip_package_uninstall", "gevent.pywsgi.WSGIServer", "Jumpscale.j.servers.rack.get", "Jumpscale.j.builders.runtimes.python3.pip_package_install" ]
[((391, 457), 'Jumpscale.j.builders.runtimes.python3.pip_package_install', 'j.builders.runtimes.python3.pip_package_install', (['"""python-socketio"""'], {}), "('python-socketio')\n", (438, 457), False, 'from Jumpscale import j\n'), ((1019, 1039), 'Jumpscale.j.servers.rack.get', 'j.servers.rack.get', ([], {}), '()\n', ...
#!/usr/bin/env python -*- coding: utf-8 -*- import io, sys, os, lucene, threading, time from datetime import datetime import lucene from java.io import File # For Indexing. from org.apache.lucene.analysis.standard import StandardAnalyzer from org.apache.lucene.document import Document, Field, FieldType from org.apac...
[ "org.apache.lucene.document.Document", "org.apache.lucene.analysis.standard.StandardAnalyzer", "java.io.File", "org.apache.lucene.document.Field", "org.apache.lucene.queryparser.classic.QueryParser", "org.apache.lucene.document.FieldType", "org.apache.lucene.index.IndexWriterConfig", "io.open", "org...
[((1559, 1584), 'org.apache.lucene.analysis.standard.StandardAnalyzer', 'StandardAnalyzer', (['version'], {}), '(version)\n', (1575, 1584), False, 'from org.apache.lucene.analysis.standard import StandardAnalyzer\n'), ((1625, 1661), 'org.apache.lucene.index.IndexWriterConfig', 'IndexWriterConfig', (['version', 'analyze...
import time from MediaPlayer.Util.Enums import ReceiveState, PeerState from MediaPlayer.Util.Network import * from Shared.LogObject import LogObject from Shared.Logger import Logger, LogVerbosity from Shared.Network import TcpClient from Shared.Settings import Settings from Shared.Stats import Stats from Shared.Thread...
[ "Shared.Network.TcpClient", "Shared.Logger.Logger", "Shared.Stats.Stats", "time.sleep", "Shared.Settings.Settings.get_int", "Shared.Util.current_time" ]
[((958, 990), 'Shared.Settings.Settings.get_int', 'Settings.get_int', (['"""peer_timeout"""'], {}), "('peer_timeout')\n", (974, 990), False, 'from Shared.Settings import Settings\n'), ((1099, 1158), 'Shared.Network.TcpClient', 'TcpClient', (['uri.hostname', 'uri.port', 'self._connection_timeout'], {}), '(uri.hostname, ...
from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["DiagnosisRole"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class DiagnosisRole: """ None This value set defines a set of codes that can be u...
[ "pathlib.Path", "oops_fhir.utils.CodeSystemConcept" ]
[((533, 600), 'oops_fhir.utils.CodeSystemConcept', 'CodeSystemConcept', (["{'code': 'AD', 'display': 'Admission diagnosis'}"], {}), "({'code': 'AD', 'display': 'Admission diagnosis'})\n", (550, 600), False, 'from oops_fhir.utils import CodeSystemConcept\n'), ((657, 724), 'oops_fhir.utils.CodeSystemConcept', 'CodeSystem...
def receive_file(): import socket import os from requests import get s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host=input(str("Enter the host address of the senter : ")) port=8080 s.connect((host,port)) print(" Connected to the host... ") filename=s.recv(1024) ...
[ "socket.socket", "os.path.basename" ]
[((93, 142), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (106, 142), False, 'import socket\n'), ((365, 391), 'os.path.basename', 'os.path.basename', (['filename'], {}), '(filename)\n', (381, 391), False, 'import os\n')]
# -*- coding: utf-8 -*- """ Created on Mon Nov 07 22:41:34 2016 @author: <NAME> """ import numpy as np from benchmark import benchmark_loading_datasets import os import time import sys from scipy.stats import truncnorm # main layer layer_sizes_0 = [1200] weight_init_stddevs_0 = [0.02] bias_init_consts_0 = [1.] dropou...
[ "scipy.stats.truncnorm", "numpy.random.choice", "benchmark.benchmark_loading_datasets", "os.path.join", "time.localtime" ]
[((407, 443), 'scipy.stats.truncnorm', 'truncnorm', (['(-1)', '(1)'], {'loc': '(200)', 'scale': '(150)'}), '(-1, 1, loc=200, scale=150)\n', (416, 443), False, 'from scipy.stats import truncnorm\n'), ((586, 622), 'scipy.stats.truncnorm', 'truncnorm', (['(-1)', '(1)'], {'loc': '(0.3)', 'scale': '(0.2)'}), '(-1, 1, loc=0....
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import logging try: import httplib except ImportError: import http.client as httplib from mock import patch, MagicMock from django.contrib.auth.models import User from draalcore.test_utils.rest_api import GenericAPI, AuthAPI from draalcore.test_utils.b...
[ "django.contrib.auth.models.User.objects.all", "mock.patch", "json.dumps", "draalcore.test_utils.rest_api.AuthAPI", "draalcore.test_utils.rest_api.GenericAPI", "mock.MagicMock", "logging.getLogger" ]
[((359, 386), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (376, 386), False, 'import logging\n'), ((1791, 1858), 'mock.patch', 'patch', (['"""draalcore.auth.sites.google_oauth2.xsrfutil.validate_token"""'], {}), "('draalcore.auth.sites.google_oauth2.xsrfutil.validate_token')\n", (1796,...
#here are the commands to demonstrate how to access and perform operations on a main file #run the MODULE of MAIN FILE and import mainfile as a library import code as x #importing the main file("code" is the name of the file I have used) as a library x.create("sastra",25) #to create a key with key_name,value gi...
[ "code.read", "code.delete", "code.modify", "code.create" ]
[((259, 281), 'code.create', 'x.create', (['"""sastra"""', '(25)'], {}), "('sastra', 25)\n", (267, 281), True, 'import code as x\n'), ((360, 385), 'code.create', 'x.create', (['"""src"""', '(70)', '(3600)'], {}), "('src', 70, 3600)\n", (368, 385), True, 'import code as x\n'), ((492, 508), 'code.read', 'x.read', (['"""s...
from neupy import layers, algorithms from neupy.layers.utils import (create_input_variable, extract_connection, preformat_layer_shape) from base import BaseTestCase class CountParametersTestCase(BaseTestCase): def test_count_parameters(self): connection = layers.join( ...
[ "neupy.layers.Input", "neupy.algorithms.GradientDescent", "neupy.layers.utils.preformat_layer_shape", "neupy.layers.join", "neupy.layers.Sigmoid", "neupy.layers.utils.create_input_variable", "neupy.layers.count_parameters", "neupy.layers.utils.extract_connection" ]
[((442, 477), 'neupy.layers.count_parameters', 'layers.count_parameters', (['connection'], {}), '(connection)\n', (465, 477), False, 'from neupy import layers, algorithms\n'), ((619, 636), 'neupy.layers.Sigmoid', 'layers.Sigmoid', (['(5)'], {}), '(5)\n', (633, 636), False, 'from neupy import layers, algorithms\n'), ((7...
"""An example of training DoubleDQN against OpenAI Gym Envs. This script is changed from chainerrl examples. This script is an example of training a DQN agent against OpenAI Gym envs. Both discrete and continuous action spaces are supported. For continuous action spaces, A NAF (Normalized Advantage Function) is used t...
[ "argparse.ArgumentParser", "chainerrl.explorers.Greedy", "future.standard_library.install_aliases", "chainerrl.agents.double_dqn.DoubleDQN", "numpy.clip", "matplotlib.pyplot.figure", "chainerrl.explorers.LinearDecayEpsilonGreedy", "chainerrl.wrappers.Render", "os.path.join", "chainerrl.links.to_fa...
[((714, 748), 'future.standard_library.install_aliases', 'standard_library.install_aliases', ([], {}), '()\n', (746, 748), False, 'from future import standard_library\n'), ((1180, 1205), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1203, 1205), False, 'import argparse\n'), ((3594, 3649), 'lo...
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.12 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path impo...
[ "_wiringpi.piGlowSetup", "_wiringpi.wiringPiI2CWriteReg8", "_wiringpi.lcd128x64rectangle", "_wiringpi.pwmSetClock", "_wiringpi.piThreadCreate", "_wiringpi.serialDataAvail", "_wiringpi.gpioClockSet", "_wiringpi.wiringPiSetup", "_wiringpi.micros", "_wiringpi.wiringPiISR", "_wiringpi.pwmWrite", "...
[((2130, 2158), '_wiringpi.wiringPiISR', '_wiringpi.wiringPiISR', (['*args'], {}), '(*args)\n', (2151, 2158), False, 'import _wiringpi\n'), ((2233, 2265), '_wiringpi.wiringPiFailure', '_wiringpi.wiringPiFailure', (['*args'], {}), '(*args)\n', (2258, 2265), False, 'import _wiringpi\n'), ((2349, 2382), '_wiringpi.wiringP...
from Crypto.Cipher import DES import binascii import hashlib import sys args = sys.argv[1:] if len(args) != 1: print("""Use this tool to get the last two bytes of an NTLM hash from an NTLMv1 challenge reponse obtained with responder. The expected parameter is directly the output of responder when netntlmv1 is...
[ "hashlib.md5", "binascii.unhexlify", "hashlib.new", "Crypto.Cipher.DES.new" ]
[((1220, 1246), 'binascii.unhexlify', 'binascii.unhexlify', (['hexstr'], {}), '(hexstr)\n', (1238, 1246), False, 'import binascii\n'), ((1720, 1738), 'hashlib.new', 'hashlib.new', (['"""md4"""'], {}), "('md4')\n", (1731, 1738), False, 'import hashlib\n'), ((2403, 2426), 'binascii.unhexlify', 'binascii.unhexlify', (['ct...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() pkgs = setuptools.find_packages() print('found these packages:', pkgs) pkg_name='ml_ephys' setuptools.setup( name=pkg_name, version="0.2.14", author="<NAME>", author_email="", description="ephys tools for Mount...
[ "setuptools.setup", "setuptools.find_packages" ]
[((95, 121), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (119, 121), False, 'import setuptools\n'), ((181, 747), 'setuptools.setup', 'setuptools.setup', ([], {'name': 'pkg_name', 'version': '"""0.2.14"""', 'author': '"""<NAME>"""', 'author_email': '""""""', 'description': '"""ephys tools f...
from abc import ABC, abstractmethod from collections import Iterator, OrderedDict from functools import reduce import os import math import torch from torch.utils.data import ( Dataset, ConcatDataset, Subset, DataLoader, RandomSampler, ) from torch.utils.data.dataloader import default_collate import...
[ "torch.utils.data.ConcatDataset", "torch.utils.data.dataloader.default_collate", "torch.utils.data.DataLoader", "torch.utils.data.RandomSampler", "torchvision.transforms.RandomHorizontalFlip", "torchvision.transforms.RandomRotation", "torchvision.transforms.ToTensor", "torch.rand_like", "torchvision...
[((740, 753), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (751, 753), False, 'from collections import Iterator, OrderedDict\n'), ((783, 796), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (794, 796), False, 'from collections import Iterator, OrderedDict\n'), ((5910, 5932), 'torch.utils.dat...
#!/usr/bin/python ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: blivet short_description: Module for management of linux block device stacks version_added: "2.5" description: - "Module configures storage pools an...
[ "blivet.partitioning.do_partitioning", "blivet.Blivet", "blivet.util.set_up_logging", "blivet.formats.get_format", "traceback.format_exc", "ansible.module_utils.basic.AnsibleModule", "blivet.size.Size", "inspect.cleandoc", "logging.getLogger", "blivet.callbacks.callbacks.action_executed.add" ]
[((3001, 3017), 'blivet.util.set_up_logging', 'set_up_logging', ([], {}), '()\n', (3015, 3017), False, 'from blivet.util import set_up_logging\n'), ((3028, 3074), 'logging.getLogger', 'logging.getLogger', (["(BLIVET_PACKAGE + '.ansible')"], {}), "(BLIVET_PACKAGE + '.ansible')\n", (3045, 3074), False, 'import logging\n'...
from qtpy import QtWidgets, QtGui, QtCore import pathlib class ShowTextDialog(QtWidgets.QDialog): def __init__(self, title, text, base_dir): super(ShowTextDialog, self).__init__() self.title = title self.text = text self.setMinimumSize(600, 600) self.last_search = "Up" ...
[ "qtpy.QtGui.QIcon", "qtpy.QtWidgets.QHBoxLayout", "qtpy.QtWidgets.QLineEdit", "qtpy.QtWidgets.QVBoxLayout", "pathlib.Path", "qtpy.QtWidgets.QTextEdit", "qtpy.QtWidgets.QPushButton" ]
[((443, 464), 'qtpy.QtGui.QIcon', 'QtGui.QIcon', (['iconpath'], {}), '(iconpath)\n', (454, 464), False, 'from qtpy import QtWidgets, QtGui, QtCore\n'), ((571, 592), 'qtpy.QtGui.QIcon', 'QtGui.QIcon', (['iconpath'], {}), '(iconpath)\n', (582, 592), False, 'from qtpy import QtWidgets, QtGui, QtCore\n'), ((1094, 1117), 'q...
import numpy as np from .math_utils import * from math import log class QAM_CONSTELLATIONS: def __init__(self,bits_per_sample=4,amplitude=1): if log(2**bits_per_sample,4) != int(log(2**bits_per_sample,4)): raise ValueError('bits_per_sample must be a power of 4!') self.bits_per_sample = bits_per_sample self.p...
[ "math.log" ]
[((149, 177), 'math.log', 'log', (['(2 ** bits_per_sample)', '(4)'], {}), '(2 ** bits_per_sample, 4)\n', (152, 177), False, 'from math import log\n'), ((182, 210), 'math.log', 'log', (['(2 ** bits_per_sample)', '(4)'], {}), '(2 ** bits_per_sample, 4)\n', (185, 210), False, 'from math import log\n')]
""" For License information see the LICENSE file. Authors: <NAME> """ import itertools from logging import getLogger import networkx as nx import sys from ..api.constants import PYTHON_DIST_PACKAGES_DIRECTORY from math import ceil, sqrt from typing import List, Set, Iterable, Tuple, FrozenSet from scipy.special i...
[ "sys.path.append", "itertools.combinations", "networkx.Graph", "logging.getLogger", "networkx.find_cliques" ]
[((422, 441), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (431, 441), False, 'from logging import getLogger\n'), ((519, 566), 'sys.path.append', 'sys.path.append', (['PYTHON_DIST_PACKAGES_DIRECTORY'], {}), '(PYTHON_DIST_PACKAGES_DIRECTORY)\n', (534, 566), False, 'import sys\n'), ((3360, 3370),...
from django.db import models from django.contrib.auth.models import User from django.db import models # Create your models here. class ItemModel(models.Model): name = models.CharField(max_length = 128) price = models.IntegerField() description = models.TextField(blank=True,null=True) cover = models.Ima...
[ "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.JSONField", "django.db.models.ImageField", "django.db.models.IntegerField", "django.db.models.DateField" ]
[((172, 204), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)'}), '(max_length=128)\n', (188, 204), False, 'from django.db import models\n'), ((219, 240), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (238, 240), False, 'from django.db import models\n'), ((259, 2...
"""Implementation for dbus.Bus. Not to be imported directly.""" # Copyright (C) 2003, 2004, 2005, 2006 Red Hat Inc. <http://www.redhat.com/> # Copyright (C) 2003 <NAME> # Copyright (C) 2004 <NAME> # Copyright (C) 2005, 2006 Collabora Ltd. <http://www.collabora.co.uk/> # # Permission is hereby granted, free of charge, ...
[ "dbus.bus.BusConnection.__new__" ]
[((4156, 4216), 'dbus.bus.BusConnection.__new__', 'BusConnection.__new__', (['subclass', 'bus_type'], {'mainloop': 'mainloop'}), '(subclass, bus_type, mainloop=mainloop)\n', (4177, 4216), False, 'from dbus.bus import BusConnection\n')]
''' We will create an ANN to output the class of a wheat seed based on 7 numerical inputs, there is a total of 3 classes on the wheat-seeds.csv dataset, and our ANN with fully connected Dense layers, will predict the class of the inputs. Data src: https://raw.githubusercontent.com/jbrownlee/Datasets/master/wheat-seeds....
[ "pandas.DataFrame", "tensorflow.keras.utils.to_categorical", "matplotlib.pyplot.show", "tensorflow.keras.layers.Dense", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.LabelEncoder", "matplotlib.pyplot.style.use", "tensorflow.keras.models.Sequential", "tensorf...
[((1034, 1064), 'pandas.read_csv', 'pd.read_csv', (['"""wheat-seeds.csv"""'], {}), "('wheat-seeds.csv')\n", (1045, 1064), True, 'import pandas as pd\n'), ((1275, 1289), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (1287, 1289), False, 'from sklearn.preprocessing import MinMaxScaler, LabelEnco...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.python.platform.test.main", "tensorflow.python.framework.constant_op.constant", "tensorflow.python.autograph.lang.directives.set_element_type" ]
[((1930, 1941), 'tensorflow.python.platform.test.main', 'test.main', ([], {}), '()\n', (1939, 1941), False, 'from tensorflow.python.platform import test\n'), ((1380, 1424), 'tensorflow.python.autograph.lang.directives.set_element_type', 'directives.set_element_type', (['l', 'dtypes.int32'], {}), '(l, dtypes.int32)\n', ...
from random import randint, choice from math import gcd from kivy.app import App from kivy.clock import Clock from kivy.core.window import Window from kivy.utils import get_color_from_hex from kivy.core.audio import SoundLoader from time import strftime class MathsApp(App): sw_started = False ...
[ "random.randint", "time.strftime", "random.choice", "math.gcd", "kivy.core.audio.SoundLoader.load", "kivy.clock.Clock.schedule_interval", "kivy.utils.get_color_from_hex" ]
[((430, 461), 'kivy.core.audio.SoundLoader.load', 'SoundLoader.load', (['"""correct.wav"""'], {}), "('correct.wav')\n", (446, 461), False, 'from kivy.core.audio import SoundLoader\n'), ((481, 510), 'kivy.core.audio.SoundLoader.load', 'SoundLoader.load', (['"""wrong.wav"""'], {}), "('wrong.wav')\n", (497, 510), False, '...
from argparse import ArgumentParser def train_args(): """Defines command-line arguments for training.""" parser = ArgumentParser() parser.add_argument( "--config", "-c", type=str, help="Path to the JSON configuration file. Default: null", ) parser.add_argument( ...
[ "argparse.ArgumentParser" ]
[((124, 140), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (138, 140), False, 'from argparse import ArgumentParser\n'), ((1204, 1220), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (1218, 1220), False, 'from argparse import ArgumentParser\n')]
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- """ Copyright 2017-2019 Baidu 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...
[ "uuid.uuid4", "random.choices", "time.time" ]
[((828, 840), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (838, 840), False, 'import uuid\n'), ((1013, 1077), 'random.choices', 'random.choices', (['(string.ascii_uppercase + string.digits)'], {'k': 'length'}), '(string.ascii_uppercase + string.digits, k=length)\n', (1027, 1077), False, 'import random\n'), ((1178, 11...
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
[ "django.utils.translation.ugettext" ]
[((2424, 2437), 'django.utils.translation.ugettext', '_', (['msg_format'], {}), '(msg_format)\n', (2425, 2437), True, 'from django.utils.translation import ugettext as _\n')]
import numpy as np import pandas as pd import pytest from greykite.common.testing_utils import generate_df_for_tests from greykite.framework.benchmark.gen_moving_timeseries_forecast import gen_moving_timeseries_forecast def test_gen_moving_timeseries_forecast(): """Basic test for `gen_moving_timeseries_forecast`...
[ "pandas.DataFrame", "greykite.framework.benchmark.gen_moving_timeseries_forecast.gen_moving_timeseries_forecast", "pytest.raises", "greykite.common.testing_utils.generate_df_for_tests", "numpy.repeat" ]
[((335, 381), 'greykite.common.testing_utils.generate_df_for_tests', 'generate_df_for_tests', ([], {'freq': '"""1H"""', 'periods': '(1000)'}), "(freq='1H', periods=1000)\n", (356, 381), False, 'from greykite.common.testing_utils import generate_df_for_tests\n'), ((2344, 2390), 'greykite.common.testing_utils.generate_df...
#!/usr/bin/env python # -*- coding:utf-8 -*- import json import requests def calculate(keyword): query = keyword api_key = "" params = {"apikey" : api_key, "q" : query, "result" : "20", "sort" : "pop", "output" : "json"} data = requests.get("https://apis.daum.net/shopping/search", params=params) ...
[ "json.loads", "requests.get" ]
[((251, 319), 'requests.get', 'requests.get', (['"""https://apis.daum.net/shopping/search"""'], {'params': 'params'}), "('https://apis.daum.net/shopping/search', params=params)\n", (263, 319), False, 'import requests\n'), ((339, 363), 'json.loads', 'json.loads', (['data.content'], {}), '(data.content)\n', (349, 363), F...
#The minimum number of cubes to cover every visible face on a cuboid measuring 3 x 2 x 1 is twenty-two. #If we then add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighte...
[ "mathplus.range", "time.time" ]
[((879, 885), 'time.time', 'time', ([], {}), '()\n', (883, 885), False, 'from time import time\n'), ((1002, 1013), 'mathplus.range', 'range', (['(1)', 'M'], {}), '(1, M)\n', (1007, 1013), False, 'from mathplus import range\n'), ((1028, 1043), 'mathplus.range', 'range', (['(1)', '(a + 1)'], {}), '(1, a + 1)\n', (1033, 1...
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet from oops_fhir.r4.code_system.contract_resource_asset_sub_type_codes import ( ContractResourceAssetSubTypeCodes as ContractResourceAssetSubTypeCodes_, ) __all__ = ["ContractResourceAssetSubT...
[ "pathlib.Path" ]
[((365, 379), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (369, 379), False, 'from pathlib import Path\n')]
""" MIT License Copyright (c) 2020 <NAME> Copyright (c) 2021 <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 r...
[ "PySide2.QtWidgets.QVBoxLayout", "PySide2.QtWidgets.QWidget.__init__", "core.plot_rgb.RGBScatterPlot" ]
[((1789, 1826), 'PySide2.QtWidgets.QWidget.__init__', 'QWidget.__init__', (['self'], {'parent': 'parent'}), '(self, parent=parent)\n', (1805, 1826), False, 'from PySide2.QtWidgets import QWidget\n'), ((1953, 1999), 'core.plot_rgb.RGBScatterPlot', 'RGBScatterPlot', ([], {'callback': 'self.send_update_path'}), '(callback...
""" Prefab module to install electrum wallet """ from jumpscale import j app = j.tools.prefab._getBaseAppClass() class PrefabElectrum(app): """ Wrapps an electrum wallet application """ NAME = "electrum" def build(self, branch=None,tag=None, revision=None, reset=False): """ Wi...
[ "jumpscale.j.sal.fs.isFile", "jumpscale.j.sal.process.getProcessByPort", "jumpscale.j.tools.prefab._getBaseAppClass", "jumpscale.j.sal.fs.getTmpDirPath" ]
[((83, 116), 'jumpscale.j.tools.prefab._getBaseAppClass', 'j.tools.prefab._getBaseAppClass', ([], {}), '()\n', (114, 116), False, 'from jumpscale import j\n'), ((2546, 2585), 'jumpscale.j.sal.process.getProcessByPort', 'j.sal.process.getProcessByPort', (['rpcport'], {}), '(rpcport)\n', (2576, 2585), False, 'from jumpsc...
from __future__ import division, absolute_import, print_function from past.builtins import xrange import numpy as np import os import sys import esutil import time import scipy.optimize import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.colors as colors import matplotlib.cm as cmx ...
[ "past.builtins.xrange", "numpy.zeros_like", "numpy.abs", "numpy.sum", "esutil.stat.histogram", "numpy.argmax", "numpy.std", "matplotlib.pyplot.close", "numpy.zeros", "time.time", "matplotlib.pyplot.figure", "numpy.where", "numpy.mean", "numpy.add.at", "esutil.numpy_util.match", "numpy....
[((2056, 2067), 'time.time', 'time.time', ([], {}), '()\n', (2065, 2067), False, 'import time\n'), ((3532, 3599), 'numpy.where', 'np.where', (['((minObs >= self.fgcmStars.minObsPerBand) & (objFlag == 0))'], {}), '((minObs >= self.fgcmStars.minObsPerBand) & (objFlag == 0))\n', (3540, 3599), True, 'import numpy as np\n')...
""" Baumes, Jeffrey, <NAME>, and <NAME>. "Efficient identification of overlapping communities." International Conference on Intelligence and Security Informatics. Springer, Berlin, Heidelberg, 2005. Reference internal https://github.com/kritishrivastava/CommunityDetection-Project2GDM """ import networkx as nx def ...
[ "networkx.number_of_nodes", "networkx.number_of_edges", "networkx.pagerank" ]
[((814, 832), 'networkx.pagerank', 'nx.pagerank', (['graph'], {}), '(graph)\n', (825, 832), True, 'import networkx as nx\n'), ((503, 532), 'networkx.number_of_nodes', 'nx.number_of_nodes', (['community'], {}), '(community)\n', (521, 532), True, 'import networkx as nx\n'), ((623, 652), 'networkx.number_of_nodes', 'nx.nu...
import os def read(path, relative_to = None): if relative_to != None: path = os.path.dirname(os.path.realpath(relative_to)) + '/' + path with open(path, 'r') as file: return file.read() def read_lines(path): with open(path, 'r') as file: return file.read_lines() def read_binary(pa...
[ "os.path.realpath" ]
[((106, 135), 'os.path.realpath', 'os.path.realpath', (['relative_to'], {}), '(relative_to)\n', (122, 135), False, 'import os\n')]
from tkinter import * from tkinter import ttk root = Tk() label = Label(root, text="Password") label.pack(side=LEFT) entry = ttk.Entry(root, width=25) entry.pack(side=RIGHT) # to set default text in field # entry.(0, "Enter password") # to mask the user input with * entry.config(show="*") # to make the field read ...
[ "tkinter.ttk.Entry" ]
[((127, 152), 'tkinter.ttk.Entry', 'ttk.Entry', (['root'], {'width': '(25)'}), '(root, width=25)\n', (136, 152), False, 'from tkinter import ttk\n')]
"""Get argument from Centricity and return SQL result.""" # !/usr/bin/python3 import sys # print(sys.path) from cps.parse_input import cps_parameter_parse from log.cps_logging import config_logging, temp_output_file_exists from datetime import datetime logger = config_logging() def get_details_from_argument(argv): ...
[ "log.cps_logging.config_logging", "cps.parse_input.cps_parameter_parse", "os.getcwd", "log.cps_logging.temp_output_file_exists", "log.cps_logging.dir_exists", "datetime.datetime.now", "doctest.testmod" ]
[((264, 280), 'log.cps_logging.config_logging', 'config_logging', ([], {}), '()\n', (278, 280), False, 'from log.cps_logging import config_logging, temp_output_file_exists\n'), ((1517, 1553), 'log.cps_logging.temp_output_file_exists', 'temp_output_file_exists', (['output_file'], {}), '(output_file)\n', (1540, 1553), Fa...
#!/usr/bin/env python # Downsampling is done on shifted anomaly and maps import pathlib import numpy as np import glob import parse from tqdm import tqdm # for progress bars converted_data_dir = pathlib.Path('input_data') master_mask_2D_shifted = np.load(converted_data_dir / "master_mask_2D_shifted-v2.npy") evalu...
[ "numpy.load", "numpy.save", "numpy.zeros", "numpy.isnan", "pathlib.Path", "parse.parse" ]
[((199, 225), 'pathlib.Path', 'pathlib.Path', (['"""input_data"""'], {}), "('input_data')\n", (211, 225), False, 'import pathlib\n'), ((252, 313), 'numpy.load', 'np.load', (["(converted_data_dir / 'master_mask_2D_shifted-v2.npy')"], {}), "(converted_data_dir / 'master_mask_2D_shifted-v2.npy')\n", (259, 313), True, 'imp...
#!/usr/bin/env python import time import argparse import requests from uuid import uuid4 from concurrent.futures import ThreadPoolExecutor, as_completed if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-n', '--num-events', type=int, required=True, help...
[ "uuid.uuid4", "argparse.ArgumentParser", "time.sleep", "requests.post", "concurrent.futures.ThreadPoolExecutor", "concurrent.futures.as_completed" ]
[((195, 220), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (218, 220), False, 'import argparse\n'), ((1512, 1602), 'requests.post', 'requests.post', (['f"""{args.endpoint}/v1/event"""'], {'json': "{'user_id': user_id, 'type': 'CLICK'}"}), "(f'{args.endpoint}/v1/event', json={'user_id': user_i...
from __future__ import print_function import os from sklearn.metrics import roc_curve, auc, average_precision_score, f1_score from scipy.optimize import brentq from scipy.interpolate import interp1d import matplotlib.pyplot as plt from matplotlib import rc def evaluate(labels, scores, metric='roc'): if metric =...
[ "sklearn.metrics.auc", "sklearn.metrics.f1_score", "sklearn.metrics.average_precision_score", "sklearn.metrics.roc_curve" ]
[((947, 972), 'sklearn.metrics.roc_curve', 'roc_curve', (['labels', 'scores'], {}), '(labels, scores)\n', (956, 972), False, 'from sklearn.metrics import roc_curve, auc, average_precision_score, f1_score\n'), ((987, 1000), 'sklearn.metrics.auc', 'auc', (['fpr', 'tpr'], {}), '(fpr, tpr)\n', (990, 1000), False, 'from skl...
import sqlalchemy as sa from sqlalchemy.dialects.postgresql import TSVECTOR from sqlalchemy_utils import TSVectorType from tests import TestCase class TestTSVector(TestCase): dns = 'postgres://postgres@localhost/sqlalchemy_utils_test' def create_models(self): class User(self.Base): __tab...
[ "sqlalchemy.schema.Table", "sqlalchemy_utils.TSVectorType", "sqlalchemy.Unicode", "sqlalchemy.Column", "sqlalchemy.schema.MetaData" ]
[((821, 841), 'sqlalchemy.schema.MetaData', 'sa.schema.MetaData', ([], {}), '()\n', (839, 841), True, 'import sqlalchemy as sa\n'), ((858, 948), 'sqlalchemy.schema.Table', 'sa.schema.Table', (['"""user"""', 'reflected_metadata'], {'autoload': '(True)', 'autoload_with': 'self.engine'}), "('user', reflected_metadata, aut...
import os from flask_tailwindcss import create_app app = create_app(os.environ.get('FLASK_CONFIG', 'default'))
[ "os.environ.get" ]
[((70, 111), 'os.environ.get', 'os.environ.get', (['"""FLASK_CONFIG"""', '"""default"""'], {}), "('FLASK_CONFIG', 'default')\n", (84, 111), False, 'import os\n')]
from discord import Embed from handler import Context, Arguments, CommandResult from utils.command_helpers import get_author_player async def run(ctx: Context, args: Arguments) -> CommandResult: if len(args) == 0: player = await get_author_player(ctx) else: player = args[0] info = { ...
[ "utils.command_helpers.get_author_player" ]
[((244, 266), 'utils.command_helpers.get_author_player', 'get_author_player', (['ctx'], {}), '(ctx)\n', (261, 266), False, 'from utils.command_helpers import get_author_player\n')]
""" Amatino API Python Bindings User Module Author: <EMAIL> """ from amatino.internal.immutable import Immutable from amatino.internal.am_time import AmatinoTime from amatino import User, Session, State from typing import List, Type, TypeVar, Any, Optional from amatino.internal.api_request import ApiRequest from amatin...
[ "amatino.internal.url_target.UrlTarget", "amatino.internal.am_time.AmatinoTime.decode", "amatino.internal.api_request.ApiRequest", "amatino.internal.immutable.Immutable", "amatino.User.decode_many", "amatino.internal.url_parameters.UrlParameters", "typing.TypeVar", "amatino.State", "amatino.missing_...
[((593, 623), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': '"""UserList"""'}), "('T', bound='UserList')\n", (600, 623), False, 'from typing import List, Type, TypeVar, Any, Optional\n'), ((1692, 1734), 'amatino.internal.immutable.Immutable', 'Immutable', (['(lambda s: s._generated_time.raw)'], {}), '(lambda s: ...
from PySide2.QtCore import Signal, QSize, Qt from PySide2.QtGui import QIcon, QPixmap from PySide2.QtWidgets import QLineEdit from views.property_popup_view import PropertyPopupView from controllers.property_popup_ctrl import PropertyPopupCtrl from models.property import PropertyValue from models.constants import Pro...
[ "PySide2.QtCore.QSize", "views.property_popup_view.PropertyPopupView", "models.property.PropertyValue", "PySide2.QtGui.QIcon", "controllers.property_popup_ctrl.PropertyPopupCtrl", "PySide2.QtGui.QPixmap", "PySide2.QtCore.Signal" ]
[((483, 491), 'PySide2.QtCore.Signal', 'Signal', ([], {}), '()\n', (489, 491), False, 'from PySide2.QtCore import Signal, QSize, Qt\n'), ((512, 523), 'PySide2.QtCore.Signal', 'Signal', (['str'], {}), '(str)\n', (518, 523), False, 'from PySide2.QtCore import Signal, QSize, Qt\n'), ((735, 750), 'models.property.PropertyV...
from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from images_backend import models, serializers, filters # If we were to apply the DeepCategorySerializer also to the list view, we would see the tree and # all the children repeated again. class CategoryDefinitionListCreateAPI(ListCr...
[ "images_backend.models.CategoryDefinition.objects.all", "images_backend.models.CategoryDictionary.objects.all" ]
[((349, 388), 'images_backend.models.CategoryDefinition.objects.all', 'models.CategoryDefinition.objects.all', ([], {}), '()\n', (386, 388), False, 'from images_backend import models, serializers, filters\n'), ((583, 622), 'images_backend.models.CategoryDictionary.objects.all', 'models.CategoryDictionary.objects.all', ...
from flask import Flask def create_app(): app = Flask(__name__, instance_relative_config=True) with app.app_context(): import routes from dashboards.dashboard_template_1 import dashboard_template_1 app = dashboard_template_1(app) return app
[ "dashboards.dashboard_template_1.dashboard_template_1", "flask.Flask" ]
[((54, 100), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (59, 100), False, 'from flask import Flask\n'), ((240, 265), 'dashboards.dashboard_template_1.dashboard_template_1', 'dashboard_template_1', (['app'], {}), '(app)\n', (260, 265), F...
import pandas as pd import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../.."))) from app.app.entities.transport_station import TransportStation class TransportStations: def __init__(self, tour, graph): self.tour = tour self.graph = graph s...
[ "pandas.read_pickle", "os.path.dirname", "app.app.entities.transport_station.TransportStation" ]
[((742, 790), 'pandas.read_pickle', 'pd.read_pickle', (['"""./resources/public_transport.p"""'], {}), "('./resources/public_transport.p')\n", (756, 790), True, 'import pandas as pd\n'), ((89, 114), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (104, 114), False, 'import os\n'), ((811, 843), ...
from faker import Faker from faker.providers import BaseProvider fake = Faker("ar_EG") class MobileNumberProvider(BaseProvider): mobile_formats = ("+02##########",) def mobile_number(self): return self.numerify(self.random_element(self.mobile_formats)) fake.add_provider(MobileNumberProvider)
[ "faker.Faker" ]
[((74, 88), 'faker.Faker', 'Faker', (['"""ar_EG"""'], {}), "('ar_EG')\n", (79, 88), False, 'from faker import Faker\n')]
""" Solutions for day 24. """ from os.path import dirname, join class Components: def __init__(self, input_path): self.components = self.read_components(input_path) def read_components(self, input_path): components = [] with open(input_path) as f: for line in f: ...
[ "os.path.dirname" ]
[((747, 764), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (754, 764), False, 'from os.path import dirname, join\n')]
# -*- coding: utf-8 -*- """ Astronomy, 2D{1,1,1} dataset (Creating image composition) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ """ # %% # More often, the images in astronomy are a composition of datasets measured # at different wavelengths over an area of the sky. In this example, we # illustra...
[ "matplotlib.pyplot.title", "csdmpy.load", "matplotlib.pyplot.show", "numpy.empty", "matplotlib.pyplot.imshow", "matplotlib.pyplot.subplots", "numpy.clip", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.tight_layout" ]
[((818, 835), 'csdmpy.load', 'cp.load', (['filename'], {}), '(filename)\n', (825, 835), True, 'import csdmpy as cp\n'), ((2000, 2070), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(3)', '(1)'], {'figsize': '(6, 14)', 'subplot_kw': "{'projection': 'csdm'}"}), "(3, 1, figsize=(6, 14), subplot_kw={'projection': 'csdm'...
import itertools import requests from lib.utils import thread_function, chunk_list class Filter(): """ Filter interface """ def filter_subset(self, s, t, articles): return [] def filter(self, s, t, articles): """ Wrapper to do filtering on chunks of articles concur...
[ "requests.get", "itertools.chain.from_iterable", "lib.utils.chunk_list", "lib.utils.thread_function" ]
[((356, 380), 'lib.utils.chunk_list', 'chunk_list', (['articles', '(10)'], {}), '(articles, 10)\n', (366, 380), False, 'from lib.utils import thread_function, chunk_list\n'), ((455, 501), 'lib.utils.thread_function', 'thread_function', (['self.filter_subset', 'args_list'], {}), '(self.filter_subset, args_list)\n', (470...
#coding=utf-8 import os import re import telebot import urllib import json import requests from datetime import datetime from html_sanitizer import Sanitizer print(os.getenv("SPACE_BOT_TOKEN")) bot = telebot.TeleBot(os.environ["SPACE_BOT_TOKEN"]) defaultPath = "http://sisav.uem.br/sav" rSplitMaterias = r"\s\d\d\d\d\s...
[ "re.split", "requests.Session", "html_sanitizer.Sanitizer", "datetime.datetime.now", "telebot.TeleBot", "os.getenv", "re.sub" ]
[((201, 247), 'telebot.TeleBot', 'telebot.TeleBot', (["os.environ['SPACE_BOT_TOKEN']"], {}), "(os.environ['SPACE_BOT_TOKEN'])\n", (216, 247), False, 'import telebot\n'), ((165, 193), 'os.getenv', 'os.getenv', (['"""SPACE_BOT_TOKEN"""'], {}), "('SPACE_BOT_TOKEN')\n", (174, 193), False, 'import os\n'), ((399, 417), 'requ...
#!/usr/bin/env python # # bigpkg : find packages that require a lot of space on your system # v0.4.0 (2011-07-29) # # Copyright (c) 2009-2011 by <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
[ "os.listdir", "re.compile" ]
[((2426, 2451), 'os.listdir', 'os.listdir', (['LOCAL_DB_PATH'], {}), '(LOCAL_DB_PATH)\n', (2436, 2451), False, 'import os, re\n'), ((1437, 1462), 're.compile', 're.compile', (['"""[^=,^<,^>]+"""'], {}), "('[^=,^<,^>]+')\n", (1447, 1462), False, 'import os, re\n')]
## ========================================================================== ## ## Copyright (c) 2019 The University of Texas at Austin. ## ## All rights reserved. ## ## ...
[ "numpy.random.seed", "vtk.vtkCellTreeLocator", "numpy.argmax", "vtk.vtkThreshold", "vtk.reference", "vtk.vtkIdList", "numpy.max", "vtk.vtkConnectivityFilter", "numpy.array", "numpy.random.normal", "numpy.random.rand", "vtk.vtkCellArray", "vtk.vtkGenericCell", "numpy.unique" ]
[((5503, 5524), 'numpy.random.seed', 'np.random.seed', (['(12346)'], {}), '(12346)\n', (5517, 5524), True, 'import numpy as np\n'), ((5979, 5997), 'vtk.vtkThreshold', 'vtk.vtkThreshold', ([], {}), '()\n', (5995, 5997), False, 'import vtk\n'), ((6170, 6197), 'vtk.vtkConnectivityFilter', 'vtk.vtkConnectivityFilter', ([],...
# Date and Time in Python from datetime import datetime, timezone, timedelta print(datetime.now()) # shows general system time on which you are currently working on print(datetime.now(timezone.utc)) # Comes with an aware object, which shows offset # timedelta - shows the difference in time today = datetime.now...
[ "datetime.datetime.strptime", "datetime.datetime.now", "datetime.timedelta" ]
[((308, 334), 'datetime.datetime.now', 'datetime.now', (['timezone.utc'], {}), '(timezone.utc)\n', (320, 334), False, 'from datetime import datetime, timezone, timedelta\n'), ((731, 771), 'datetime.datetime.strptime', 'datetime.strptime', (['user_date', '"""%Y-%m-%d"""'], {}), "(user_date, '%Y-%m-%d')\n", (748, 771), F...
""" Setup script for tubthumper package required to support legacy builds not using the PEP 517 build API: https://www.python.org/dev/peps/pep-0517/ """ from setuptools import setup setup()
[ "setuptools.setup" ]
[((184, 191), 'setuptools.setup', 'setup', ([], {}), '()\n', (189, 191), False, 'from setuptools import setup\n')]
import enum from marshmallow import Schema, EXCLUDE, fields from sqlalchemy.ext.hybrid import hybrid_property from geoalchemy2 import Geometry # from geoalchemy2 import Geometry from mapper.api.models import db class CensusHierarchy(enum.IntEnum): census_block = 0 block_group = 10 census_tract = 20 ...
[ "marshmallow.fields.Integer", "mapper.api.models.db.Column", "marshmallow.fields.String", "mapper.api.models.db.relationship", "geoalchemy2.Geometry" ]
[((650, 689), 'mapper.api.models.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (659, 689), False, 'from mapper.api.models import db\n'), ((706, 742), 'mapper.api.models.db.Column', 'db.Column', (['db.String'], {'nullable': '(False)'}), '(db.String, nullable=Fa...
from rest_auth.registration.serializers import RegisterSerializer from allauth.account.adapter import get_adapter from allauth.account.utils import setup_user_email from rest_framework import serializers, exceptions class CustomRegisterSerializer(RegisterSerializer): first_name = serializers.CharField(required=Tr...
[ "rest_framework.serializers.CharField", "allauth.account.adapter.get_adapter", "allauth.account.utils.setup_user_email" ]
[((287, 340), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'required': '(True)', 'write_only': '(True)'}), '(required=True, write_only=True)\n', (308, 340), False, 'from rest_framework import serializers, exceptions\n'), ((357, 410), 'rest_framework.serializers.CharField', 'serializers.CharFie...
import astropy.units as u import numpy as np from astropy.table import QTable def test_effective_area(): from pyirf.irf import effective_area n_selected = np.array([10, 20, 30]) n_simulated = np.array([100, 2000, 15000]) area = 1e5 * u.m ** 2 assert u.allclose( effective_area(n_selected...
[ "pyirf.irf.point_like_effective_area", "numpy.full", "numpy.array", "astropy.units.allclose", "pyirf.irf.effective_area", "numpy.sqrt" ]
[((166, 188), 'numpy.array', 'np.array', (['[10, 20, 30]'], {}), '([10, 20, 30])\n', (174, 188), True, 'import numpy as np\n'), ((207, 235), 'numpy.array', 'np.array', (['[100, 2000, 15000]'], {}), '([100, 2000, 15000])\n', (215, 235), True, 'import numpy as np\n'), ((1064, 1141), 'pyirf.irf.point_like_effective_area',...
""" A test experiment for PolyJIT. This experiment should only be used to test various features of PolyJIT. It provides only 1 configuration (maximum number of cores) and tests 2 run-time execution profiles of PolyJIT: 1) PolyJIT enabled, with specialization 2) PolyJIT enabled, without specialization """ import cs...
[ "uuid.uuid4", "csv.writer", "sqlalchemy.column", "benchbuild.extensions.time.RunWithTime", "os.path.basename", "polyjit.experiments.polyjit.EnableJITTracking", "polyjit.experiments.polyjit.PolyJIT.init_project", "benchbuild.extensions.log.LogAdditionals", "polyjit.experiments.polyjit.ClearPolyJITCon...
[((485, 512), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (502, 512), False, 'import logging\n'), ((773, 810), 'polyjit.experiments.polyjit.PolyJIT.init_project', 'polyjit.PolyJIT.init_project', (['project'], {}), '(project)\n', (801, 810), False, 'from polyjit.experiments import papi,...
import requests from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.decorators import login_required from go.base.utils import extract_auth_from_url def todo(request): # pragma: no cover return render(request, 'base/todo.html', { }) @login_required def cross_...
[ "django.shortcuts.render", "django.http.HttpResponse", "requests.get" ]
[((249, 286), 'django.shortcuts.render', 'render', (['request', '"""base/todo.html"""', '{}'], {}), "(request, 'base/todo.html', {})\n", (255, 286), False, 'from django.shortcuts import render\n'), ((425, 453), 'requests.get', 'requests.get', (['url'], {'auth': 'auth'}), '(url, auth=auth)\n', (437, 453), False, 'import...
""" Store user data on the Zivid camera. """ import argparse import zivid def _args() -> argparse.Namespace: parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(dest="mode", help="Select mode") subparsers.add_parser( "read", help="read", ) subparsers.add_parser...
[ "zivid.Application", "argparse.ArgumentParser" ]
[((127, 152), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (150, 152), False, 'import argparse\n'), ((1141, 1160), 'zivid.Application', 'zivid.Application', ([], {}), '()\n', (1158, 1160), False, 'import zivid\n')]
from airflow import DAG import os from datetime import datetime from airflow.operators.postgres_operator import PostgresOperator from airflow.hooks.postgres_hook import PostgresHook from influx_operators import GenericInfluxOperator, InfluxOperator import influxdb import logging LOG = logging.getLogger(__name__) cl...
[ "os.path.basename", "influxdb.InfluxDBClient", "datetime.datetime", "airflow.hooks.postgres_hook.PostgresHook", "logging.getLogger" ]
[((289, 316), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (306, 316), False, 'import logging\n'), ((414, 488), 'airflow.hooks.postgres_hook.PostgresHook', 'PostgresHook', ([], {'postgres_conn_id': 'self.postgres_conn_id', 'schema': 'self.database'}), '(postgres_conn_id=self.postgres_co...
import warnings import numpy as np import tensorflow as tf from phi import struct, math from phi.data.fluidformat import _transform_for_writing, _writing_staticshape, read_zipped_array from phi.math import is_static_shape from phi.physics.world import StateProxy from phi.struct.context import _unsafe from phi.data im...
[ "phi.data.fluidformat._writing_staticshape", "phi.struct.isstruct", "tensorflow.py_func", "phi.struct.map", "phi.data.Dataset.load", "phi.struct.dtype", "tensorflow.data.Dataset.from_tensor_slices", "phi.math.to_float", "phi.struct.context._unsafe", "tensorflow.data.Dataset.concatenate", "phi.st...
[((986, 1006), 'phi.struct.isstruct', 'struct.isstruct', (['obj'], {}), '(obj)\n', (1001, 1006), False, 'from phi import struct, math\n'), ((1057, 1084), 'phi.data.fluidformat._transform_for_writing', '_transform_for_writing', (['obj'], {}), '(obj)\n', (1079, 1084), False, 'from phi.data.fluidformat import _transform_f...
import cv2 from align_custom import AlignCustom from face_feature import FaceFeature from mtcnn_detect import MTCNNDetect from tf_graph import FaceRecGraph import openpyxl as xl import datetime import time import argparse import sys import json import numpy as np import pandas as pd def main(args): ...
[ "align_custom.AlignCustom", "pandas.DataFrame", "argparse.ArgumentParser", "cv2.waitKey", "json.dumps", "cv2.VideoCapture", "pandas.read_excel", "mtcnn_detect.MTCNNDetect", "tf_graph.FaceRecGraph", "face_feature.FaceFeature", "cv2.imshow", "pandas.ExcelWriter" ]
[((495, 514), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), '(0)\n', (511, 514), False, 'import cv2\n'), ((1557, 1584), 'pandas.read_excel', 'pd.read_excel', (['"""Class.xlsx"""'], {}), "('Class.xlsx')\n", (1570, 1584), True, 'import pandas as pd\n'), ((1599, 1648), 'pandas.ExcelWriter', 'pd.ExcelWriter', (['"...
# -*- coding: utf-8 -*- """ Created on Mon Jan 29 @author: Francesco """ import numpy as np import pandas as pd df1 = pd.DataFrame({'A1': [1, 2, 3, 4], 'B1': ['a', 'b', 'c', 'd']}) df2 = pd.DataFrame({'A1': [1, 2, 3, 5], 'B1': ['a', 'd', 'c', 'e']}) print("\r\nComparazione dei due ") df3 = df1.merge(df2, how='oute...
[ "pandas.DataFrame", "pandas.io.json.json_normalize", "pprint.pprint", "pandas.DataFrame.from_dict" ]
[((122, 184), 'pandas.DataFrame', 'pd.DataFrame', (["{'A1': [1, 2, 3, 4], 'B1': ['a', 'b', 'c', 'd']}"], {}), "({'A1': [1, 2, 3, 4], 'B1': ['a', 'b', 'c', 'd']})\n", (134, 184), True, 'import pandas as pd\n'), ((191, 253), 'pandas.DataFrame', 'pd.DataFrame', (["{'A1': [1, 2, 3, 5], 'B1': ['a', 'd', 'c', 'e']}"], {}), "...
# This code is supporting material for the book # Building Machine Learning Systems with Python # by <NAME> and <NAME> # published by PACKT Publishing # # It is made available under the MIT License import mahotas as mh from mahotas.colors import rgb2grey import numpy as np # Adds a little salt-n-pepper noise to an im...
[ "numpy.minimum", "mahotas.colors.rgb2grey", "numpy.random.random", "mahotas.imread", "mahotas.stretch" ]
[((330, 352), 'mahotas.imread', 'mh.imread', (['"""lenna.jpg"""'], {}), "('lenna.jpg')\n", (339, 352), True, 'import mahotas as mh\n'), ((358, 370), 'mahotas.colors.rgb2grey', 'rgb2grey', (['im'], {}), '(im)\n', (366, 370), False, 'from mahotas.colors import rgb2grey\n'), ((672, 714), 'numpy.minimum', 'np.minimum', (['...
# Copyright 2017 SrMouraSilva # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ "unittest.mock.call", "unittest.mock.MagicMock", "pluginsmanager.observer.observable_list.ObservableList" ]
[((900, 916), 'pluginsmanager.observer.observable_list.ObservableList', 'ObservableList', ([], {}), '()\n', (914, 916), False, 'from pluginsmanager.observer.observable_list import ObservableList\n'), ((942, 953), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (951, 953), False, 'from unittest.mock import Mag...
import autograd import autograd.numpy as np import scipy.optimize import time from tqdm.auto import tqdm, trange import alignment.motion_model as mm # define geometry d=64 # discretisation of detector eval_grid = np.linspace(-0.5, 0.5, d) nt = 20 # no. of time frames time_points = np.arange(0,nt)/(nt-1) # tomograph...
[ "autograd.numpy.arange", "autograd.numpy.cos", "alignment.motion_model.deformation", "autograd.numpy.stack", "autograd.numpy.zeros", "autograd.numpy.linspace", "autograd.numpy.sin", "autograd.numpy.concatenate" ]
[((215, 240), 'autograd.numpy.linspace', 'np.linspace', (['(-0.5)', '(0.5)', 'd'], {}), '(-0.5, 0.5, d)\n', (226, 240), True, 'import autograd.numpy as np\n'), ((370, 416), 'autograd.numpy.linspace', 'np.linspace', (['(-np.pi / 3)', '(np.pi / 3)', 'N_ฮฑ', '(False)'], {}), '(-np.pi / 3, np.pi / 3, N_ฮฑ, False)\n', (381, 4...
import pandas as pd from collections import defaultdict import pybedtools from functools import lru_cache @lru_cache() def prepare_2d_blacklist_dict(blacklist_bedpe, resolution=10000): # read blacklist bed file, turn the region into bad pixel idx dict with resolution blacklist_bedpe_df = pd.read_csv(blacklist...
[ "pandas.read_csv", "pybedtools.cleanup", "collections.defaultdict", "pybedtools.BedTool.from_dataframe", "functools.lru_cache", "pandas.concat" ]
[((109, 120), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (118, 120), False, 'from functools import lru_cache\n'), ((299, 350), 'pandas.read_csv', 'pd.read_csv', (['blacklist_bedpe'], {'sep': '"""\t"""', 'header': 'None'}), "(blacklist_bedpe, sep='\\t', header=None)\n", (310, 350), True, 'import pandas as pd\...
from pathlib import Path from dataclasses import dataclass, field from statistics import median T1_ANS = 1656 T2_ANS = 195 @dataclass class Octopus: row: int col: int nrg_level: int has_fired: bool = field(default=False, repr=False) neighbors: list = field(default_factory=list, repr=False) t...
[ "dataclasses.field", "pathlib.Path" ]
[((220, 252), 'dataclasses.field', 'field', ([], {'default': '(False)', 'repr': '(False)'}), '(default=False, repr=False)\n', (225, 252), False, 'from dataclasses import dataclass, field\n'), ((275, 314), 'dataclasses.field', 'field', ([], {'default_factory': 'list', 'repr': '(False)'}), '(default_factory=list, repr=Fa...
# import pandas, numpy, and pyreadstat import pandas as pd import numpy as np import pyreadstat pd.set_option('display.max_columns', 5) pd.options.display.float_format = '{:,.2f}'.format pd.set_option('display.width', 75) # retrieve spss data, along with the meta data nls97spss, metaspss = pyreadstat.read_sav('data/nl...
[ "pyreadstat.read_sas7bdat", "pyreadstat.read_dta", "pandas.set_option", "pyreadstat.set_value_labels", "pyreadstat.read_sav" ]
[((96, 135), 'pandas.set_option', 'pd.set_option', (['"""display.max_columns"""', '(5)'], {}), "('display.max_columns', 5)\n", (109, 135), True, 'import pandas as pd\n'), ((187, 221), 'pandas.set_option', 'pd.set_option', (['"""display.width"""', '(75)'], {}), "('display.width', 75)\n", (200, 221), True, 'import pandas...
import math num = float(input('Digite um valor com decimal: ')) print('A parte inteira desse valor รฉ {}'.format(math.trunc(num)))
[ "math.trunc" ]
[((113, 128), 'math.trunc', 'math.trunc', (['num'], {}), '(num)\n', (123, 128), False, 'import math\n')]
import argparse import datetime import random import time from pathlib import Path import numpy as np import torch from torch.utils.data import DataLoader from datasets import build_fdb_data, collate_fn from models import build_models, make_criterion from engine import Engine def get_args_parser(): parser = arg...
[ "torch.hub.load_state_dict_from_url", "numpy.random.seed", "argparse.ArgumentParser", "datasets.build_fdb_data", "torch.optim.lr_scheduler.StepLR", "torch.utils.data.DataLoader", "torch.manual_seed", "torch.load", "models.make_criterion", "time.time", "pathlib.Path", "random.seed", "engine.E...
[((317, 368), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""DETR for Argument Mining"""'], {}), "('DETR for Argument Mining')\n", (340, 368), False, 'import argparse\n'), ((5030, 5055), 'torch.device', 'torch.device', (['args.device'], {}), '(args.device)\n', (5042, 5055), False, 'import torch\n'), ((5121...
from util import db from util import getFilteredQuery from random import choices _armorCollection = db.armor _weaponsCollection = db.weapons _locations = ["head", "torso", "legs"] def getProtectedLocations(armorList): locations = {l: False for l in _locations} for armor in armorList: ...
[ "util.getFilteredQuery", "random.choices" ]
[((1106, 1172), 'util.getFilteredQuery', 'getFilteredQuery', (['_weaponsCollection', "{'random_count': numWeapons}"], {}), "(_weaponsCollection, {'random_count': numWeapons})\n", (1122, 1172), False, 'from util import getFilteredQuery\n'), ((941, 981), 'random.choices', 'choices', (['[1, 2, 3]'], {'weights': 'weights',...
from pytp.utils.evaluate import get_fde, get_ade import numpy as np import math from unittest import TestCase class UtilsTest(TestCase): def setUp(self): self.test_gt = np.zeros((10, 12, 2)) self.pred_1 = np.zeros((10, 12, 2)) self.pred_2 = np.ones((10, 12, 2)) def test_get_ade(self):...
[ "math.sqrt", "numpy.zeros", "numpy.ones", "pytp.utils.evaluate.get_ade" ]
[((183, 204), 'numpy.zeros', 'np.zeros', (['(10, 12, 2)'], {}), '((10, 12, 2))\n', (191, 204), True, 'import numpy as np\n'), ((227, 248), 'numpy.zeros', 'np.zeros', (['(10, 12, 2)'], {}), '((10, 12, 2))\n', (235, 248), True, 'import numpy as np\n'), ((271, 291), 'numpy.ones', 'np.ones', (['(10, 12, 2)'], {}), '((10, 1...
import shutil from os import path, sys, remove from glob import glob if __name__ == '__main__': self_dir = path.dirname(__file__) for dir in ['build', 'dist', 'Any_Project.egg-info']: shutil.rmtree( path.abspath( path.join( self_dir, ...
[ "os.path.dirname", "os.path.join", "os.remove" ]
[((117, 139), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (129, 139), False, 'from os import path, sys, remove\n'), ((1009, 1018), 'os.remove', 'remove', (['f'], {}), '(f)\n', (1015, 1018), False, 'from os import path, sys, remove\n'), ((617, 666), 'os.path.join', 'path.join', (['self_dir', '...
from django.urls import path from fight_covid19.maps import views as map_views from django.views.generic import TemplateView urlpatterns = [ path("", TemplateView.as_view(template_name="maps/maps.html"), name="home"), path("health_form/", map_views.HealthFormView, name="health_form"), path("map_markers/",...
[ "django.urls.path", "fight_covid19.maps.views.NearCount.as_view", "fight_covid19.maps.views.OneShotFormEntry.as_view", "django.views.generic.TemplateView.as_view", "fight_covid19.maps.views.GenerateUniqueKey.as_view" ]
[((228, 294), 'django.urls.path', 'path', (['"""health_form/"""', 'map_views.HealthFormView'], {'name': '"""health_form"""'}), "('health_form/', map_views.HealthFormView, name='health_form')\n", (232, 294), False, 'from django.urls import path\n'), ((300, 366), 'django.urls.path', 'path', (['"""map_markers/"""', 'map_v...
from reports.models import Station def station_list(request): # pylint: disable=unused-argument stations = list() for station in Station.objects.all(): station.incidents_count = station.incidents.count() stations.append(station) return {'station_list': stations}
[ "reports.models.Station.objects.all" ]
[((140, 161), 'reports.models.Station.objects.all', 'Station.objects.all', ([], {}), '()\n', (159, 161), False, 'from reports.models import Station\n')]
from liquidhandling import SoloSoft, SoftLinx from liquidhandling import * # replace with plate types used # TipBox.50uL.Axygen-EV-50-R-S.tealbox # TipBox.200uL.Corning-4864.orangebox # Reservoir.12col.Agilent-201256-100.BATSgroup # * Program Variables ------------------ initial_well_volume = 1000 asp_volume = 10 a...
[ "liquidhandling.SoloSoft" ]
[((393, 611), 'liquidhandling.SoloSoft', 'SoloSoft', ([], {'filename': '"""min_volume_z_shift_test.hso"""', 'plateList': "['Empty', 'Empty', 'Empty', 'Empty', 'Empty', 'Empty',\n 'TipBox.50uL.Axygen-EV-50-R-S.tealbox',\n 'Plate.96.PlateOne-1833-9600.ConicalBottomStorage']"}), "(filename='min_volume_z_shift_test.h...
from autochart_tv.tools import ValidationError, validate import pytest def test_import(): pass @pytest.fixture def list_validator(): return ['a', 'b', 'c'] def test_validate_list(list_validator): validate('a', list_validator, 'list_validator') def test_validate_list_throws_error(list_validator): ...
[ "pytest.raises", "autochart_tv.tools.validate" ]
[((215, 262), 'autochart_tv.tools.validate', 'validate', (['"""a"""', 'list_validator', '"""list_validator"""'], {}), "('a', list_validator, 'list_validator')\n", (223, 262), False, 'from autochart_tv.tools import ValidationError, validate\n'), ((756, 803), 'autochart_tv.tools.validate', 'validate', (['"""a"""', 'dict_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0018_auto_20150709_0208'), ] operations = [ migration...
[ "datetime.datetime" ]
[((458, 517), 'datetime.datetime', 'datetime.datetime', (['(2015)', '(7)', '(9)', '(2)', '(17)', '(3)', '(587241)'], {'tzinfo': 'utc'}), '(2015, 7, 9, 2, 17, 3, 587241, tzinfo=utc)\n', (475, 517), False, 'import datetime\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2013, Digium, Inc. # Copyright (c) 2014-2016, Yelp, Inc. import os from setuptools import setup import aiobravado setup( name='aiobravado', version=aiobravado.version, license='BSD 3-Clause License', description='Async library for accessin...
[ "os.path.dirname" ]
[((384, 409), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (399, 409), False, 'import os\n')]
# Copyright 2019 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 applicabl...
[ "sdflexutils.redfish.utils.get_subresource_path_by", "sdflexutils.redfish.resources.update_service.ActionsField", "sdflexutils.redfish.resources.system.system.HPESystem", "sushy.resources.common.ResetActionField", "sushy.connector.Connector", "sdflexutils.redfish.resources.update_service.HPEUpdateService"...
[((2992, 3068), 'sdflexutils.redfish.resources.system.system.HPESystem', 'system.HPESystem', (['self._conn', 'identity'], {'redfish_version': 'self.redfish_version'}), '(self._conn, identity, redfish_version=self.redfish_version)\n', (3008, 3068), False, 'from sdflexutils.redfish.resources.system import system\n'), ((4...
import numpy as np def equal_group_kmeans(X, n_groups, max_iter=10): """Calculate equal sized groups k-means clustering.""" # Init cluster centers by randomly sampling datapoints centers = X[np.random.choice(len(X), n_groups, replace=False)] # Precalculate n_samples n_samples = X.shape[0] #...
[ "numpy.abs", "numpy.zeros", "numpy.ones", "numpy.argsort", "numpy.where", "numpy.arange", "numpy.array", "numpy.dot" ]
[((359, 387), 'numpy.zeros', 'np.zeros', ([], {'shape': '(n_samples,)'}), '(shape=(n_samples,))\n', (367, 387), True, 'import numpy as np\n'), ((463, 497), 'numpy.ones', 'np.ones', (['n_samples'], {'dtype': 'np.int32'}), '(n_samples, dtype=np.int32)\n', (470, 497), True, 'import numpy as np\n'), ((523, 541), 'numpy.one...
import numpy as np import matplotlib.pyplot as plt import torch def color_code_target(target, label_colors): return np.array(label_colors, dtype='uint8')[target.astype('uint8')] def recover_color_img(img): """ cvt tensor image to RGB [note: not BGR] """ if isinstance(img, torch.Tensor): ...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.suptitle", "numpy.transpose", "numpy.array", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ]
[((374, 407), 'numpy.transpose', 'np.transpose', (['img'], {'axes': '[1, 2, 0]'}), '(img, axes=[1, 2, 0])\n', (386, 407), True, 'import numpy as np\n'), ((655, 711), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'nrows': '(1)', 'ncols': '(2)', 'dpi': '(100)', 'figsize': 'figsize'}), '(nrows=1, ncols=2, dpi=100, f...
from slovnet.mask import split_masked from slovnet.token import tokenize from slovnet.markup import ( BIOMarkup, MorphMarkup ) from .base import Infer class TagDecoder: def __init__(self, tags_vocab): self.tags_vocab = tags_vocab def __call__(self, preds): for pred in preds: ...
[ "slovnet.token.tokenize", "slovnet.markup.BIOMarkup.from_tuples", "slovnet.markup.MorphMarkup.from_tuples", "slovnet.mask.split_masked" ]
[((425, 439), 'slovnet.token.tokenize', 'tokenize', (['text'], {}), '(text)\n', (433, 439), False, 'from slovnet.token import tokenize\n'), ((1029, 1058), 'slovnet.markup.BIOMarkup.from_tuples', 'BIOMarkup.from_tuples', (['tuples'], {}), '(tuples)\n', (1050, 1058), False, 'from slovnet.markup import BIOMarkup, MorphMar...
#coding:utf-8 """ WSGI config for zgvl project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os import sys root = os.path.dirname(__file__) sys.path.insert(0, os.path.join...
[ "django.core.wsgi.get_wsgi_application", "os.path.dirname", "os.environ.setdefault", "os.path.join" ]
[((263, 288), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (278, 288), False, 'import os\n'), ((351, 415), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""zgvl.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'zgvl.settings')\n", (372, 415), False, 'im...
#!/usr/bin/env python3 # encoding: utf-8 import pickle from ratios import Ratios def main(): quant_summary = '/Users/MS/Desktop/special_projects/SMHacker/quant_summary.csv' rt_info_file = '/Users/MS/Desktop/special_projects/SMHacker/ligand_quant_res.csv' results_class = pickle.load( open( ...
[ "ratios.Ratios" ]
[((441, 511), 'ratios.Ratios', 'Ratios', (['quant_summary', 'rt_info_file', 'results_class', "['TEV_H', 'TEV_L']"], {}), "(quant_summary, rt_info_file, results_class, ['TEV_H', 'TEV_L'])\n", (447, 511), False, 'from ratios import Ratios\n')]