code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from xml.etree.ElementTree import Element from xml.etree import ElementTree from decimal import Decimal def _xml_element_value(el: Element, int_tags: list): """ Gets XML Element value. :param el: Element :param int_tags: List of tags that should be treated as ints :return: value of the element (i...
[ "xml.etree.ElementTree.Element", "xml.etree.ElementTree.SubElement", "xml.etree.ElementTree.fromstring" ]
[((4255, 4288), 'xml.etree.ElementTree.fromstring', 'ElementTree.fromstring', (['xml_bytes'], {}), '(xml_bytes)\n', (4277, 4288), False, 'from xml.etree import ElementTree\n'), ((7530, 7542), 'xml.etree.ElementTree.Element', 'Element', (['tag'], {}), '(tag)\n', (7537, 7542), False, 'from xml.etree.ElementTree import El...
"""""" from os import getenv from typing import Dict import unittest import shimoku_api_python as shimoku from shimoku_api_python.exceptions import ApiClientError api_key: str = getenv('API_TOKEN') universe_id: str = getenv('UNIVERSE_ID') app_type_id: str = getenv('APP_TYPE_ID') environment: str = getenv('ENVIRONME...
[ "shimoku_api_python.Client", "os.getenv" ]
[((182, 201), 'os.getenv', 'getenv', (['"""API_TOKEN"""'], {}), "('API_TOKEN')\n", (188, 201), False, 'from os import getenv\n'), ((221, 242), 'os.getenv', 'getenv', (['"""UNIVERSE_ID"""'], {}), "('UNIVERSE_ID')\n", (227, 242), False, 'from os import getenv\n'), ((262, 283), 'os.getenv', 'getenv', (['"""APP_TYPE_ID"""'...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from keras.preprocessing import text, sequence from keras.preprocessing.text import Tokenizer from keras.utils import to_categorical from keras.models import * from keras.layers import * from keras.optimizers import * from sklearn.model_selection i...
[ "os.mkdir", "pickle.dump", "os.path.basename", "keras.preprocessing.sequence.pad_sequences", "matplotlib.pyplot.close", "datetime.datetime.now", "numpy.split", "keras.preprocessing.text.Tokenizer", "numpy.arange", "keras.callbacks.TensorBoard", "keras.callbacks.LearningRateScheduler", "os.path...
[((702, 717), 'numpy.arange', 'np.arange', (['(5600)'], {}), '(5600)\n', (711, 717), True, 'import numpy as np\n'), ((729, 750), 'numpy.arange', 'np.arange', (['(5605)', '(5877)'], {}), '(5605, 5877)\n', (738, 750), True, 'import numpy as np\n'), ((767, 788), 'numpy.arange', 'np.arange', (['(5877)', '(6133)'], {}), '(5...
from typing import Union, Dict, Any from qcelemental.models import OptimizationInput, AtomicInput, OptimizationResult, Provenance from qcengine.config import TaskConfig from qcengine.exceptions import UnknownError, InputError from qcengine.procedures.nwchem_opt.harvester import harvest_as_atomic_result from qcengine....
[ "qcengine.exceptions.InputError", "qcengine.programs.nwchem.runner.NWChemHarness", "qcengine.procedures.nwchem_opt.harvester.harvest_as_atomic_result", "qcengine.exceptions.UnknownError" ]
[((732, 747), 'qcengine.programs.nwchem.runner.NWChemHarness', 'NWChemHarness', ([], {}), '()\n', (745, 747), False, 'from qcengine.programs.nwchem.runner import NWChemHarness\n'), ((851, 866), 'qcengine.programs.nwchem.runner.NWChemHarness', 'NWChemHarness', ([], {}), '()\n', (864, 866), False, 'from qcengine.programs...
""" @brief test log(time=4s) """ import os import unittest import pandas from pyquickhelper.loghelper import fLOG from pyensae.sql.database_main import Database from pyrsslocal.custom_server.aserver import CustomDBServer, CustomDBServerHandler from pyrsslocal.helper.download_helper import get_url_content_timeout ...
[ "unittest.main", "pandas.DataFrame", "webbrowser.open", "os.remove", "pyrsslocal.helper.download_helper.get_url_content_timeout", "pyrsslocal.custom_server.aserver.CustomDBServer.run_server", "os.path.exists", "pyensae.sql.database_main.Database", "pyquickhelper.loghelper.fLOG", "os.path.split", ...
[((3223, 3238), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3236, 3238), False, 'import unittest\n'), ((407, 479), 'pyquickhelper.loghelper.fLOG', 'fLOG', (['__file__', 'self._testMethodName'], {'OutputPrint': "(__name__ == '__main__')"}), "(__file__, self._testMethodName, OutputPrint=__name__ == '__main__')\n...
from io import StringIO import unittest import os import numpy as np from gimmemotifs.motif import Motif, read_motifs from gimmemotifs.shutils import which class TestMotif(unittest.TestCase): """ A test class for Motif """ def setUp(self): self.data_dir = "test/data/motif" self.pwm = os.path....
[ "unittest.main", "gimmemotifs.motif.Motif", "io.StringIO", "os.unlink", "os.path.exists", "numpy.array", "gimmemotifs.motif.read_motifs", "gimmemotifs.shutils.which", "os.path.join" ]
[((6224, 6239), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6237, 6239), False, 'import unittest\n'), ((312, 351), 'os.path.join', 'os.path.join', (['self.data_dir', '"""test.pwm"""'], {}), "(self.data_dir, 'test.pwm')\n", (324, 351), False, 'import os\n'), ((834, 841), 'gimmemotifs.motif.Motif', 'Motif', ([],...
'Test the arnet module.' import sys sys.path.insert(0, './') sys.path.insert(0, './tests') import numpy as np import torch import beer from basetest import BaseTest class TestUtils(BaseTest): def test_create_mask(self): ordering = [2, 0, 1] max_connections = [1, 0, 1, 1] device = torch....
[ "torch.ones", "torch.randint", "sys.path.insert", "beer.nnet.arnet.create_final_mask", "torch.randn", "beer.nnet.arnet.MaskedLinear", "beer.nnet.arnet.create_mask", "numpy.array", "beer.nnet.arnet.create_arnetwork", "torch.nn.Linear", "torch.device" ]
[((37, 61), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""./"""'], {}), "(0, './')\n", (52, 61), False, 'import sys\n'), ((62, 91), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""./tests"""'], {}), "(0, './tests')\n", (77, 91), False, 'import sys\n'), ((314, 333), 'torch.device', 'torch.device', (['"""cpu"""']...
import service.utils as utils from mgr.redistip import GLOBAREDIS from apscheduler.schedulers.background import BackgroundScheduler import jobs.msglog as msglog import jobs.hugesqlservice as hugesqlservie import threading def reloadRedis_appkey(): utils._reloadAppky(None) utils._reloadPlant() def reloadRedi...
[ "service.utils._reloaddatatable", "apscheduler.schedulers.background.BackgroundScheduler", "threading.Thread", "service.utils._reloadrestsrv", "jobs.hugesqlservice.reloadhugeSQL", "mgr.redistip.GLOBAREDIS.keys", "service.utils.reloadDataSource", "service.utils._reloadCacheData", "service.utils._relo...
[((254, 278), 'service.utils._reloadAppky', 'utils._reloadAppky', (['None'], {}), '(None)\n', (272, 278), True, 'import service.utils as utils\n'), ((283, 303), 'service.utils._reloadPlant', 'utils._reloadPlant', ([], {}), '()\n', (301, 303), True, 'import service.utils as utils\n'), ((340, 364), 'service.utils.reloadD...
import pandas as pd from pandas._testing import assert_frame_equal import pytest import numpy as np from scripts.my_normalize_data import ( normalize_expedition_section_cols, remove_bracket_text, remove_whitespace, normalize_columns ) class XTestNormalizeColumns: def test_replace_column_name_with...
[ "pandas.DataFrame", "scripts.my_normalize_data.remove_whitespace", "scripts.my_normalize_data.normalize_expedition_section_cols", "pytest.raises", "pandas._testing.assert_frame_equal", "scripts.my_normalize_data.remove_bracket_text", "scripts.my_normalize_data.normalize_columns" ]
[((433, 451), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (445, 451), True, 'import pandas as pd\n'), ((497, 515), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (509, 515), True, 'import pandas as pd\n'), ((525, 563), 'scripts.my_normalize_data.normalize_columns', 'normalize_column...
"""Convert data table engine from InnoDB to MyISAM. Revision ID: b6eaa6deed84 Revises: b80fb9e8acd7 Create Date: 2017-12-30 14:11:04.007441 """ from alembic import context from alembic import op # revision identifiers, used by Alembic. revision = 'b6eaa6deed84' down_revision = 'b8<PASSWORD>9<PASSWORD>' branch_labels...
[ "alembic.context.config.get_main_option", "alembic.op.get_bind" ]
[((522, 535), 'alembic.op.get_bind', 'op.get_bind', ([], {}), '()\n', (533, 535), False, 'from alembic import op\n'), ((763, 776), 'alembic.op.get_bind', 'op.get_bind', ([], {}), '()\n', (774, 776), False, 'from alembic import op\n'), ((432, 473), 'alembic.context.config.get_main_option', 'context.config.get_main_optio...
####################################################################### # This file is part of Pyblosxom. # # Copyright (C) 2011 by the Pyblosxom team. See AUTHORS. # # Pyblosxom is distributed under the MIT license. See the file # LICENSE for distribution details. ####################################################...
[ "Pyblosxom.plugins.readmore.cb_story", "Pyblosxom.tests.PluginTest.setUp", "Pyblosxom.pyblosxom.Request" ]
[((535, 567), 'Pyblosxom.tests.PluginTest.setUp', 'PluginTest.setUp', (['self', 'readmore'], {}), '(self, readmore)\n', (551, 567), False, 'from Pyblosxom.tests import PluginTest\n'), ((618, 669), 'Pyblosxom.pyblosxom.Request', 'Request', (["{'base_url': '/'}", '{}', "{'bl_type': 'file'}"], {}), "({'base_url': '/'}, {}...
import torch from ..abstract import ExtendedTorchModule from ..layer import GeneralizedLayer, GeneralizedCell class NumberTranslationNetwork(ExtendedTorchModule): UNIT_NAMES = GeneralizedCell.UNIT_NAMES def __init__(self, unit_name, embedding_size=2, # 1 for the number, 1 for the gate ? ...
[ "torch.nn.init.zeros_", "torch.nn.Embedding", "torch.nn.LSTMCell", "torch.Tensor" ]
[((955, 1006), 'torch.nn.Embedding', 'torch.nn.Embedding', (['dictionary_size', 'embedding_size'], {}), '(dictionary_size, embedding_size)\n', (973, 1006), False, 'import torch\n'), ((1032, 1078), 'torch.nn.LSTMCell', 'torch.nn.LSTMCell', (['embedding_size', 'hidden_size'], {}), '(embedding_size, hidden_size)\n', (1049...
from django.shortcuts import render from django.template import Context, loader, Template from django.http import HttpResponse, HttpResponseRedirect, Http404 from .forms import SimpleAnalysis from .forms import AdvancedAnalysis from .economicimpact import simple_impact from .economicimpact import complex_impact impor...
[ "django.shortcuts.render", "django.http.HttpResponseRedirect", "django.template.loader.get_template" ]
[((530, 640), 'django.shortcuts.render', 'render', (['request', '"""base.html"""', "{'simple_analysis': simple_analysis, 'advanced_analysis': advanced_analysis}"], {}), "(request, 'base.html', {'simple_analysis': simple_analysis,\n 'advanced_analysis': advanced_analysis})\n", (536, 640), False, 'from django.shortcut...
import os dir_path = os.path.dirname(os.path.realpath(__file__)) with open(dir_path + '/test.txt') as fp: src = fp.read(60) print(len(src)) print(fp) print(fp.closed, fp.encoding) fp.read(60)
[ "os.path.realpath" ]
[((38, 64), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (54, 64), False, 'import os\n')]
# -*- coding: utf-8 -* # from functools import partial # maya import pymel.core as pm from maya.app.general.mayaMixin import MayaQWidgetDockableMixin from maya.app.general.mayaMixin import MayaQDockWidget # mbox from mbox.core import icon from mbox.lego.lib import ( TopBlock, SubBlock ) from mbox.lego.box im...
[ "mgear.core.attribute.addAttribute", "mgear.core.primitive.addTransform", "mgear.core.attribute.lockAttribute", "mgear.vendor.Qt.QtWidgets.QVBoxLayout", "mgear.core.pyqt.maya_main_window", "pymel.core.datatypes.Matrix", "mgear.core.pyqt.deleteInstances", "mgear.core.transform.getOffsetPosition" ]
[((1415, 1508), 'mgear.core.attribute.addAttribute', 'attribute.addAttribute', (['self.network', '"""as_world"""', '"""bool"""', "self['as_world']"], {'keyable': '(False)'}), "(self.network, 'as_world', 'bool', self['as_world'],\n keyable=False)\n", (1437, 1508), False, 'from mgear.core import pyqt, attribute, primi...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ "pulumi.get", "pulumi.getter", "pulumi.ResourceOptions", "pulumi.set" ]
[((5826, 5859), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""displayName"""'}), "(name='displayName')\n", (5839, 5859), False, 'import pulumi\n'), ((7506, 7548), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""notificationChannels"""'}), "(name='notificationChannels')\n", (7519, 7548), False, 'import pulumi\...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: DEBUG = True SECRET_KEY = '<PASSWORD>' BOOTSTRAP_SERVE_LOCAL = True
[ "os.path.dirname" ]
[((37, 62), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (52, 62), False, 'import os\n')]
import csv import pandas as pd import numpy as np from sklearn.feature_extraction.text import CountVectorizer decameron_path = "/home/cooper/src/decameron/data/csv/decameron.csv" decameron_df = pd.read_csv(decameron_path) stories = decameron_df["Text"].tolist() stories_string = ' '.join(stories) vectorizer = Count...
[ "pandas.read_csv", "sklearn.feature_extraction.text.CountVectorizer" ]
[((195, 222), 'pandas.read_csv', 'pd.read_csv', (['decameron_path'], {}), '(decameron_path)\n', (206, 222), True, 'import pandas as pd\n'), ((315, 332), 'sklearn.feature_extraction.text.CountVectorizer', 'CountVectorizer', ([], {}), '()\n', (330, 332), False, 'from sklearn.feature_extraction.text import CountVectorizer...
# -*- coding: utf-8 -*- """ Create Hobbies and HobbyEvents from data in Linked Courses TODO: using the full URI ('@id' attribute) as origin_id is not a good idea. should use the real id instead, but this requires either parsing from the URI or doing an API request every time TODO: organizer is not saved for the Hobbi...
[ "iso8601.parse_date", "django.contrib.gis.geos.Point", "harrastuspassi.models.Location.objects.get_or_create", "django.db.transaction.atomic", "urllib.parse.urlparse", "requests.Session", "harrastuspassi.models.HobbyEvent.objects.get_or_create", "harrastuspassi.models.Hobby.objects.get", "re.findall...
[((1404, 1431), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1421, 1431), False, 'import logging\n'), ((1945, 1984), 'collections.namedtuple', 'namedtuple', (['"""Keyword"""', "['source', 'id']"], {}), "('Keyword', ['source', 'id'])\n", (1955, 1984), False, 'from collections import nam...
import gui,hashlib,os from PyQt5 import QtWidgets BLOCK_SIZE=65536 class HashChk(gui.Ui_MainWindow): def __init__(self, *args, **kwargs): super(gui.Ui_MainWindow, self).__init__(*args, **kwargs) self.file_chosed=None def logic(self): self.file_choser.clicked.con...
[ "hashlib.md5", "os.stat", "hashlib.sha1", "PyQt5.QtWidgets.QMainWindow", "hashlib.sha384", "PyQt5.QtWidgets.QFileDialog.getOpenFileName", "hashlib.sha256", "hashlib.sha224", "PyQt5.QtWidgets.QApplication", "hashlib.sha512" ]
[((3310, 3342), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (3332, 3342), False, 'from PyQt5 import QtWidgets\n'), ((3361, 3384), 'PyQt5.QtWidgets.QMainWindow', 'QtWidgets.QMainWindow', ([], {}), '()\n', (3382, 3384), False, 'from PyQt5 import QtWidgets\n'), ((495, 534)...
import functools import logging from contextlib import contextmanager from dataclasses import dataclass from datetime import datetime, timedelta from functools import partial from time import monotonic from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, List, Optional, Tuple from asgiref.local import Loc...
[ "functools.partial", "django.core.cache.cache.set", "django.utils.timezone.now", "django.contrib.sites.models.Site.objects.get_current", "asgiref.local.Local", "django.core.cache.cache.get", "pytimeparse.parse", "time.monotonic", "datetime.timedelta", "functools.wraps", "django.core.cache.cache....
[((966, 993), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (983, 993), False, 'import logging\n'), ((1010, 1028), 'pytimeparse.parse', 'parse', (['"""2 minutes"""'], {}), "('2 minutes')\n", (1015, 1028), False, 'from pytimeparse import parse\n'), ((1182, 1189), 'asgiref.local.Local', 'L...
""" Testing for AUC ROC metric. """ from . import helpers import itertools import numpy as np import pyltr import sklearn.metrics class TestAUCROC(helpers.TestMetric): def get_metric(self): return pyltr.metrics.AUCROC() def get_queries_with_values(self): for i in range(0, 7): f...
[ "pyltr.metrics.AUCROC", "numpy.array", "itertools.product" ]
[((214, 236), 'pyltr.metrics.AUCROC', 'pyltr.metrics.AUCROC', ([], {}), '()\n', (234, 236), False, 'import pyltr\n'), ((330, 364), 'itertools.product', 'itertools.product', (['*([(0, 1)] * i)'], {}), '(*([(0, 1)] * i))\n', (347, 364), False, 'import itertools\n'), ((686, 720), 'itertools.product', 'itertools.product', ...
#!/usr/bin/env python """The basic display practicees by python matplotlib lib. author: <NAME> date: 2018.07.18 """ import matplotlib.pyplot as plt import matplotlib.image as mpimg import cv2 # Create an window which named 'birds', and set the size plt.figure(num='birds', figsize=(8,8)) # Use `mpimg` to read t...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.image.imread", "matplotlib.pyplot.show", "cv2.cvtColor", "matplotlib.pyplot.imshow", "matplotlib.pyplot.axis", "cv2.imread", "matplotlib.pyplot.figure" ]
[((257, 296), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'num': '"""birds"""', 'figsize': '(8, 8)'}), "(num='birds', figsize=(8, 8))\n", (267, 296), True, 'import matplotlib.pyplot as plt\n'), ((341, 371), 'matplotlib.image.imread', 'mpimg.imread', (['"""images/owl.jpg"""'], {}), "('images/owl.jpg')\n", (353, 371)...
from __future__ import division, print_function, unicode_literals import abc import collections import itertools import sys if sys.version_info < (3,): range = xrange MAPPING_TYPE = collections.Mapping else: MAPPING_TYPE = collections.abc.Mapping MIMETYPE_HTML = "text/html" MIMETYPE_PLAIN = "text/plain" ...
[ "itertools.chain" ]
[((2707, 2749), 'itertools.chain', 'itertools.chain', (['self.recipients', '(recip,)'], {}), '(self.recipients, (recip,))\n', (2722, 2749), False, 'import itertools\n'), ((2819, 2863), 'itertools.chain', 'itertools.chain', (['self.recipients', 'recipients'], {}), '(self.recipients, recipients)\n', (2834, 2863), False, ...
# external libraries import unittest import numpy as np # class to be tested from rss.src.RSSvectors import Mom4 class Mom4TestCase(unittest.TestCase): def test_boosted_to_rest_frame_of(self): """ Test that the boosting function works as advertised """ p4 = Mom4(10,0,0,9.9) # ...
[ "rss.src.RSSvectors.Mom4", "numpy.sqrt" ]
[((300, 319), 'rss.src.RSSvectors.Mom4', 'Mom4', (['(10)', '(0)', '(0)', '(9.9)'], {}), '(10, 0, 0, 9.9)\n', (304, 319), False, 'from rss.src.RSSvectors import Mom4\n'), ((667, 684), 'rss.src.RSSvectors.Mom4', 'Mom4', (['(10)', '(3)', '(3)', '(3)'], {}), '(10, 3, 3, 3)\n', (671, 684), False, 'from rss.src.RSSvectors im...
# Author: <NAME> # Pexels Website: https://www.pexels.com # class information: # Get json data from https://www.pexels.com # Search photos using Pexels API v1 # Search popular photos using Pexels API v1 # Search curated photos using Pexels API v1 # Dependencies: # requests import request...
[ "requests.get" ]
[((2749, 2813), 'requests.get', 'requests.get', (['url'], {'timeout': '(15)', 'headers': 'self.PEXELS_AUTHORIZATION'}), '(url, timeout=15, headers=self.PEXELS_AUTHORIZATION)\n', (2761, 2813), False, 'import requests\n')]
import unittest import ramda as R from ramda.private._inspect import funcArgsLength """ https://github.com/ramda/ramda/blob/master/test/binary.js """ class TestBinary(unittest.TestCase): def test_turns_multiple_argument_function_into_binary_one(self): fn = R.binary(lambda *args: list(args)) self.assertEq...
[ "unittest.main", "ramda.private._inspect.funcArgsLength" ]
[((421, 436), 'unittest.main', 'unittest.main', ([], {}), '()\n', (434, 436), False, 'import unittest\n'), ((327, 345), 'ramda.private._inspect.funcArgsLength', 'funcArgsLength', (['fn'], {}), '(fn)\n', (341, 345), False, 'from ramda.private._inspect import funcArgsLength\n')]
from datetime import datetime, timedelta from azure.storage.blob import ResourceTypes, AccountSasPermissions, generate_account_sas def generate_sas_token(storage_account,access_key): sas_token = generate_account_sas( storage_account, account_key=access_key, resource_types=Resour...
[ "datetime.datetime.utcnow", "azure.storage.blob.AccountSasPermissions", "datetime.timedelta", "azure.storage.blob.ResourceTypes" ]
[((314, 370), 'azure.storage.blob.ResourceTypes', 'ResourceTypes', ([], {'service': '(True)', 'container': '(True)', 'object': '(True)'}), '(service=True, container=True, object=True)\n', (327, 370), False, 'from azure.storage.blob import ResourceTypes, AccountSasPermissions, generate_account_sas\n'), ((395, 439), 'azu...
from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.message import Message import pytest from muttdown.main import convert_tree from muttdown.main import process_message from muttdown.config import Config @pytest.fixture def basic_config(): return Config() @pytest.fi...
[ "email.mime.text.MIMEText", "email.message.Message", "muttdown.config.Config", "muttdown.main.process_message", "email.mime.multipart.MIMEMultipart", "muttdown.main.convert_tree" ]
[((299, 307), 'muttdown.config.Config', 'Config', ([], {}), '()\n', (305, 307), False, 'from muttdown.config import Config\n'), ((471, 479), 'muttdown.config.Config', 'Config', ([], {}), '()\n', (477, 479), False, 'from muttdown.config import Config\n'), ((606, 615), 'email.message.Message', 'Message', ([], {}), '()\n'...
import numpy as np from keras import backend as K from keras.applications.imagenet_utils import preprocess_input from keras.preprocessing import image from heatmap import synset_to_dfs_ids from heatmap import to_heatmap def helper_test(model): img_path = "../examples/dog.jpg" new_model = to_heatmap(model) ...
[ "heatmap.synset_to_dfs_ids", "numpy.sum", "keras.backend.image_data_format", "heatmap.to_heatmap", "numpy.expand_dims", "keras.preprocessing.image.img_to_array", "keras.preprocessing.image.load_img", "keras.applications.imagenet_utils.preprocess_input", "keras.backend.clear_session" ]
[((300, 317), 'heatmap.to_heatmap', 'to_heatmap', (['model'], {}), '(model)\n', (310, 317), False, 'from heatmap import to_heatmap\n'), ((353, 401), 'keras.preprocessing.image.load_img', 'image.load_img', (['img_path'], {'target_size': '(800, 800)'}), '(img_path, target_size=(800, 800))\n', (367, 401), False, 'from ker...
# Generated by Django 3.2.7 on 2021-09-02 08:55 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Word", fields=[ ...
[ "django.db.models.BigAutoField", "django.db.models.URLField", "django.db.models.CharField", "django.db.models.OneToOneField" ]
[((369, 465), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (388, 465), False, 'from django.db import migrations, m...
from __future__ import print_function, division import sys from datetime import datetime from collections import OrderedDict import numpy as np import h5py from .data import Dataset, SyncRecording, PatchClampRecording, TSeries from .test_pulse import PatchClampTestPulse from . import stimuli class MiesNwb(Dataset): ...
[ "h5py.File", "numpy.isfinite", "numpy.isnan", "datetime.datetime", "datetime.datetime.utcfromtimestamp", "numpy.array", "sys.exc_info", "collections.OrderedDict" ]
[((23002, 23015), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (23013, 23015), False, 'from collections import OrderedDict\n'), ((1266, 1279), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1277, 1279), False, 'from collections import OrderedDict\n'), ((1735, 1806), 'numpy.array', 'np.array...
import logging import warnings from importlib_metadata import version from sklearn.exceptions import ConvergenceWarning warnings.simplefilter('ignore', category=ConvergenceWarning) warnings.simplefilter('ignore', category=DeprecationWarning) DEFAULT_IP = 'localhost' DEFAULT_PORT = 6000 def start_live2p(params_dict, ...
[ "live2p.websockets.server.Live2pServer", "warnings.simplefilter", "logging.basicConfig", "logging.getLogger", "importlib_metadata.version" ]
[((121, 181), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {'category': 'ConvergenceWarning'}), "('ignore', category=ConvergenceWarning)\n", (142, 181), False, 'import warnings\n'), ((182, 242), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {'category': 'DeprecationWarning...
from pathlib import Path from abc import abstractmethod from os.path import join, isdir from tqdm import tqdm import os import numpy as np import inspect import nibabel as nib import torch class BasePredictor(object): """ Inference for a single model for every file generated by `test_loader`. Predictions a...
[ "os.path.isdir", "os.mkdir", "pathlib.Path", "os.path.join" ]
[((1532, 1556), 'os.path.join', 'join', (['self.out_dir', 'case'], {}), '(self.out_dir, case)\n', (1536, 1556), False, 'from os.path import join, isdir\n'), ((751, 770), 'os.path.isdir', 'isdir', (['self.out_dir'], {}), '(self.out_dir)\n', (756, 770), False, 'from os.path import join, isdir\n'), ((784, 806), 'os.mkdir'...
import os import random import hashlib import string import kopf import kubernetes import kubernetes.client notebook_startup = """#!/bin/bash conda init source $HOME/.bashrc if [ ! -f $HOME/.condarc ]; then cat > $HOME/.condarc << EOF envs_dirs: - $HOME/.conda/envs EOF fi if [ -d $HOME/.conda/envs/workspace ...
[ "kopf.adopt", "random.sample", "kubernetes.client.CoreV1Api", "os.environ.get", "kubernetes.client.AppsV1Api", "hashlib.new", "random.getrandbits", "kubernetes.client.ExtensionsV1beta1Api", "kopf.on.create" ]
[((633, 727), 'kopf.on.create', 'kopf.on.create', (['"""jupyter-on-kubernetes.test"""', '"""v1alpha1"""', '"""jupyternotebooks"""'], {'id': '"""jupyter"""'}), "('jupyter-on-kubernetes.test', 'v1alpha1', 'jupyternotebooks',\n id='jupyter')\n", (647, 727), False, 'import kopf\n'), ((792, 821), 'kubernetes.client.AppsV...
# Copyright (c) 2019 Mycroft AI, Inc. and <NAME> # # This file is part of Mycroft Light # (see https://github.com/MatthewScholefield/mycroft-light). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional i...
[ "math.sqrt", "mycroft.util.parallel.run_parallel", "mycroft.util.log.exception", "mycroft.services.service_plugin.ServicePlugin.__init__", "mycroft.intent_match.IntentMatch", "mycroft.util.log.debug", "inspect.signature", "mycroft.util.log.info", "mycroft.intent_context.IntentContext", "mycroft.in...
[((1669, 1701), 'mycroft.services.service_plugin.ServicePlugin.__init__', 'ServicePlugin.__init__', (['self', 'rt'], {}), '(self, rt)\n', (1691, 1701), False, 'from mycroft.services.service_plugin import ServicePlugin\n'), ((1858, 1871), 'mycroft.intent_match.IntentMatch', 'IntentMatch', ([], {}), '()\n', (1869, 1871),...
#!/usr/bin/env python3 # Copyright 2019 Mycroft AI 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...
[ "numpy.array" ]
[((1227, 1244), 'numpy.array', 'np.array', (['outputs'], {}), '(outputs)\n', (1235, 1244), True, 'import numpy as np\n'), ((1268, 1285), 'numpy.array', 'np.array', (['targets'], {}), '(targets)\n', (1276, 1285), True, 'import numpy as np\n'), ((2462, 2486), 'numpy.array', 'np.array', (['self.filenames'], {}), '(self.fi...
import pandas as pd from visions.core.model import TypeRelation from visions.core.implementations.types import ( visions_integer, visions_generic, visions_float, visions_string, ) from visions.utils.coercion import test_utils def register_integer_relations(): relations = [ TypeRelation(v...
[ "visions.core.model.TypeRelation", "pandas.to_numeric" ]
[((306, 371), 'visions.core.model.TypeRelation', 'TypeRelation', (['visions_integer', 'visions_generic'], {'inferential': '(False)'}), '(visions_integer, visions_generic, inferential=False)\n', (318, 371), False, 'from visions.core.model import TypeRelation\n'), ((1069, 1085), 'pandas.to_numeric', 'pd.to_numeric', (['s...
""" ******************************************************************************** * Name: resource_status.py * Author: nswain * Created On: September 24, 2018 * Copyright: (c) Aquaveo 2018 ******************************************************************************** """ from unittest import mock from django.http ...
[ "unittest.mock.MagicMock", "tethysext.atcore.controllers.app_users.resource_status.ResourceStatus", "django.test.RequestFactory", "unittest.mock.patch", "tethysext.atcore.controllers.app_users.resource_status.ResourceStatus.as_controller", "tethysext.atcore.tests.factories.django_user.UserFactory" ]
[((880, 985), 'unittest.mock.patch', 'mock.patch', (['"""tethysext.atcore.controllers.app_users.resource_status.ResourceStatus._handle_get"""'], {}), "(\n 'tethysext.atcore.controllers.app_users.resource_status.ResourceStatus._handle_get'\n )\n", (890, 985), False, 'from unittest import mock\n'), ((1283, 1353), '...
#!/usr/bin/python import sys from klampt import * from klampt import vis from klampt.math import vectorops,so3 from klampt.sim import settle import time import math import random def rand_rotation(): q = [random.gauss(0,1),random.gauss(0,1),random.gauss(0,1),random.gauss(0,1)] q = vectorops.unit(q) return...
[ "klampt.sim.settle.settle", "time.time", "klampt.math.vectorops.unit", "klampt.math.so3.from_quaternion", "random.gauss" ]
[((292, 309), 'klampt.math.vectorops.unit', 'vectorops.unit', (['q'], {}), '(q)\n', (306, 309), False, 'from klampt.math import vectorops, so3\n'), ((321, 343), 'klampt.math.so3.from_quaternion', 'so3.from_quaternion', (['q'], {}), '(q)\n', (340, 343), False, 'from klampt.math import vectorops, so3\n'), ((686, 697), 't...
from typing import TYPE_CHECKING import sys import pytest from pydocspec import (specfactory, load_python_modules, load_python_modules_with_docspec_python, _model, visitors) posonlyargs = pytest.mark.skipif(sys.version_info < (3, 8), reason="requires python 3.8") typecomment = pytest.mark.skipif(sy...
[ "pydocspec.specfactory.Factory.default", "pytest.mark.parametrize", "pytest.mark.skipif" ]
[((209, 284), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(sys.version_info < (3, 8))'], {'reason': '"""requires python 3.8"""'}), "(sys.version_info < (3, 8), reason='requires python 3.8')\n", (227, 284), False, 'import pytest\n'), ((299, 374), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(sys.version_info < (3, ...
#!/usr/bin/env python import os import time import numpy as np from astropy.io import fits from aoide import voronoi import argparse def main(): print("\n======================= Aoide | Step 3 ====================\n") print("AoideVoronoi.py: Voronoi Tesselation based on Stellar Continuum Signal\n") ...
[ "astropy.io.fits.ImageHDU", "os.path.abspath", "argparse.ArgumentParser", "os.makedirs", "numpy.std", "astropy.io.fits.PrimaryHDU", "aoide.voronoi.binning_fits", "os.path.exists", "numpy.isnan", "time.time", "numpy.zeros", "numpy.mean", "numpy.arange", "astropy.io.fits.open", "os.chdir",...
[((362, 394), 'os.path.abspath', 'os.path.abspath', (['args.input_cube'], {}), '(args.input_cube)\n', (377, 394), False, 'import os\n'), ((968, 995), 'os.chdir', 'os.chdir', (['voronoi_directory'], {}), '(voronoi_directory)\n', (976, 995), False, 'import os\n'), ((1099, 1120), 'astropy.io.fits.open', 'fits.open', (['in...
""" A module where the core classes and functions of `ggplot2` """ from copy import copy from typing import Optional, Union import grgr.dev.typing as tp from grgr import _R from grgr.dev import dict_to_rargs from numpy import ndarray from pandas import DataFrame class Aesthetic(tp.Tor): def __init__(self, ...
[ "grgr._R", "grgr.dev.dict_to_rargs", "copy.copy" ]
[((555, 576), 'grgr.dev.dict_to_rargs', 'dict_to_rargs', (['pyargs'], {}), '(pyargs)\n', (568, 576), False, 'from grgr.dev import dict_to_rargs\n'), ((1085, 1106), 'grgr.dev.dict_to_rargs', 'dict_to_rargs', (['pyargs'], {}), '(pyargs)\n', (1098, 1106), False, 'from grgr.dev import dict_to_rargs\n'), ((1368, 1378), 'cop...
""" econ/fred_view.py tests """ import unittest from unittest import mock import io import pandas as pd from gamestonk_terminal.economy.fred_view import display_series from tests.helpers import check_print fred_data_mock = """ For 'gdp', series IDs found: GDP, GDPC1, M2V, GFDEGDQ188S, PAYEMS. GDP --- Date 2019-01-0...
[ "unittest.mock.patch", "io.StringIO", "gamestonk_terminal.economy.fred_view.display_series", "tests.helpers.check_print" ]
[((605, 654), 'tests.helpers.check_print', 'check_print', ([], {'assert_in': '"""No series found for term"""'}), "(assert_in='No series found for term')\n", (616, 654), False, 'from tests.helpers import check_print\n'), ((660, 727), 'unittest.mock.patch', 'mock.patch', (['"""gamestonk_terminal.economy.fred_model.get_se...
"""Helper function for DB operations.""" import logging import psycopg2 import psycopg2.extensions from api.version1_0.database import Db from conf import settings if settings.REMOVE_STOP_WORDS: from nltk.corpus import stopwords from nltk.tokenize import word_tokenize psycopg2.extensions.register_type(psyco...
[ "api.version1_0.database.Db.Db", "psycopg2.extensions.register_type", "logging.getLogger", "nltk.corpus.stopwords.words", "nltk.tokenize.word_tokenize" ]
[((281, 343), 'psycopg2.extensions.register_type', 'psycopg2.extensions.register_type', (['psycopg2.extensions.UNICODE'], {}), '(psycopg2.extensions.UNICODE)\n', (314, 343), False, 'import psycopg2\n'), ((344, 411), 'psycopg2.extensions.register_type', 'psycopg2.extensions.register_type', (['psycopg2.extensions.UNICODE...
import shippo import time """ In this tutorial we see how to use and interact with batches """ # Replace <API-KEY> with your key shippo.config.api_key = "<API-KEY>" example_batch = { # replace with your carrier account "default_carrier_account": "<CARRIER-ACCOUNT>", # replace with desired service level, ...
[ "shippo.Batch.create", "shippo.Batch.retrieve", "time.sleep", "shippo.Batch.purchase", "shippo.Batch.remove", "shippo.Batch.add", "shippo.Shipment.create" ]
[((2815, 2851), 'shippo.Batch.create', 'shippo.Batch.create', ([], {}), '(**example_batch)\n', (2834, 2851), False, 'import shippo\n'), ((3147, 3185), 'shippo.Batch.retrieve', 'shippo.Batch.retrieve', (['batch.object_id'], {}), '(batch.object_id)\n', (3168, 3185), False, 'import shippo\n'), ((4036, 4150), 'shippo.Shipm...
import airtablewrapper import json participantList = airtablewrapper.get_participants() participantJSONArray = [] for participant in participantList: newParticipant = { 'id': participant['fields']['Barcode']['text'], 'name': participant['fields']['First Name'] + " " + participant['fields']['Last N...
[ "json.dumps", "airtablewrapper.get_participants" ]
[((54, 88), 'airtablewrapper.get_participants', 'airtablewrapper.get_participants', ([], {}), '()\n', (86, 88), False, 'import airtablewrapper\n'), ((457, 489), 'json.dumps', 'json.dumps', (['participantJSONArray'], {}), '(participantJSONArray)\n', (467, 489), False, 'import json\n')]
# python imports import datetime # django imports from django.contrib.auth.models import User from django.contrib.sessions.backends.file import SessionStore from django.test import TestCase # lfs imports import lfs.voucher.utils from lfs.cart.models import Cart from lfs.cart.models import CartItem from lfs.catalog.mo...
[ "lfs.tax.models.Tax.objects.create", "lfs.cart.models.CartItem.objects.create", "django.contrib.auth.models.User", "lfs.voucher.models.VoucherOptions.objects.create", "lfs.cart.models.Cart.objects.create", "datetime.date", "django.contrib.sessions.backends.file.SessionStore", "lfs.tests.utils.RequestF...
[((1102, 1237), 'lfs.voucher.models.VoucherOptions.objects.create', 'VoucherOptions.objects.create', ([], {'number_prefix': '"""DH"""', 'number_suffix': '"""XM"""', 'number_length': '(4)', 'number_letters': '"""abcdefghijklmnopqrstuvwxyz"""'}), "(number_prefix='DH', number_suffix='XM',\n number_length=4, number_lett...
# -*- coding: utf-8 -*- import gensim import numpy as np from numpy import linalg as LA import logging logger = logging.getLogger(__name__) def embedding_matrix(nb_tokens, embedding_size, token_to_index, glove_path=None, unit_norm=True, rs=None, ...
[ "numpy.random.RandomState", "numpy.array", "numpy.linalg.norm", "gensim.models.KeyedVectors.load_word2vec_format", "logging.getLogger" ]
[((116, 143), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (133, 143), False, 'import logging\n'), ((1772, 1840), 'gensim.models.KeyedVectors.load_word2vec_format', 'gensim.models.KeyedVectors.load_word2vec_format', (['path'], {'binary': 'binary'}), '(path, binary=binary)\n', (1819, 184...
import factory from django.contrib.auth.models import User from django.test import TestCase, Client from .models import ( Material, Hardware, Labor, Account, Project, Cabinet, Drawer, Specification, Room ) from .tests_models import ( get_material_info, get_account_info, get_cabinet_info, get_drawer_info...
[ "factory.Faker", "django.test.Client" ]
[((544, 570), 'factory.Faker', 'factory.Faker', (['"""user_name"""'], {}), "('user_name')\n", (557, 570), False, 'import factory\n'), ((583, 605), 'factory.Faker', 'factory.Faker', (['"""email"""'], {}), "('email')\n", (596, 605), False, 'import factory\n'), ((623, 650), 'factory.Faker', 'factory.Faker', (['"""first_na...
# Generated by Django 2.1 on 2018-08-06 14:36 from django.db import migrations, models import django.db.models.deletion import mediaplatform.models class Migration(migrations.Migration): dependencies = [ ('mediaplatform', '0007_update_arrayfield_defaults'), ] operations = [ migrations.C...
[ "django.db.models.OneToOneField", "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.DateTimeField" ]
[((1285, 1448), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'editable': '(False)', 'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""view_permission"""', 'to': '"""mediaplatform.Playlist"""'}), "(editable=False, null=True, on_delete=django.db.models.\n deleti...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """QtWidgets.QSlider object that allows float steps.""" import os from pathlib import Path from decimal import Decimal from pyqtgraph.Qt import QtGui from pyqtgraph.Qt import uic, QtWidgets class FSlider(QtWidgets.QSlider): """Create QtWidgets.QSlider ob...
[ "pyqtgraph.Qt.uic.loadUi", "os.path.abspath" ]
[((3765, 3804), 'pyqtgraph.Qt.uic.loadUi', 'uic.loadUi', (["(folder / 'FSlider.ui')", 'self'], {}), "(folder / 'FSlider.ui', self)\n", (3775, 3804), False, 'from pyqtgraph.Qt import uic, QtWidgets\n'), ((3728, 3753), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (3743, 3753), False, 'import ...
"""Debiasing using reweighing""" """ This data recipe performs reweighing debiasing using the AIF360 package. https://github.com/Trusted-AI/AIF360 <NAME>., <NAME>. Data preprocessing techniques for classification without discrimination. Knowl Inf Syst 33, 1–33 (2012). https://doi.org/10.1007/s10115-011-0463-8 The...
[ "pandas.DataFrame", "aif360.datasets.BinaryLabelDataset", "pandas.read_csv", "h2oaicore.models_utils.import_tensorflow", "aif360.algorithms.preprocessing.reweighing.Reweighing", "os.path.isfile", "numpy.array" ]
[((2001, 2020), 'h2oaicore.models_utils.import_tensorflow', 'import_tensorflow', ([], {}), '()\n', (2018, 2020), False, 'from h2oaicore.models_utils import import_tensorflow\n'), ((2748, 2775), 'pandas.read_csv', 'pd.read_csv', (['full_data_file'], {}), '(full_data_file)\n', (2759, 2775), True, 'import pandas as pd\n')...
import numpy as np import pytest import rlberry.seeding as seeding from rlberry.envs import gym_make from copy import deepcopy gym_envs = [ 'Acrobot-v1', 'CartPole-v1', 'MountainCar-v0', ] def get_env_trajectory(env, horizon): states = [] ss = env.reset() for ii in range(horizon): ...
[ "copy.deepcopy", "numpy.array_equal", "pytest.mark.parametrize", "rlberry.seeding.set_global_seed", "rlberry.envs.gym_make" ]
[((629, 674), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""env_name"""', 'gym_envs'], {}), "('env_name', gym_envs)\n", (652, 674), False, 'import pytest\n'), ((1181, 1226), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""env_name"""', 'gym_envs'], {}), "('env_name', gym_envs)\n", (1204, 1226)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/6/8 0008 13:47 # @Author : Hadrianl # @File : example.py # @Contact : <EMAIL> from huobitrade.service import HBWebsocket, HBRestAPI from huobitrade.handler import DBHandler from huobitrade import setKey import time setKey('access_key', 'secret_key')...
[ "huobitrade.setKey", "huobitrade.handler.DBHandler", "time.sleep", "huobitrade.service.HBWebsocket", "huobitrade.service.HBRestAPI" ]
[((286, 320), 'huobitrade.setKey', 'setKey', (['"""access_key"""', '"""secret_key"""'], {}), "('access_key', 'secret_key')\n", (292, 320), False, 'from huobitrade import setKey\n'), ((327, 340), 'huobitrade.service.HBWebsocket', 'HBWebsocket', ([], {}), '()\n', (338, 340), False, 'from huobitrade.service import HBWebso...
import glob import numpy as np import xlrd import csv def parse_xlsx_file(file_path): """Parse contents of xlsx file into numpy array. Author: <NAME> (<EMAIL>) Args: file_path (str): path for the xlsx file. Returns: numpy.ndarray: parsed contents of the xlsx file. """ # Op...
[ "numpy.empty", "xlrd.open_workbook", "numpy.hstack", "numpy.array", "numpy.arange", "glob.glob", "numpy.vstack" ]
[((443, 505), 'numpy.empty', 'np.empty', (['(worksheet.nrows - 1, worksheet.ncols)'], {'dtype': 'object'}), '((worksheet.nrows - 1, worksheet.ncols), dtype=object)\n', (451, 505), True, 'import numpy as np\n'), ((519, 548), 'numpy.arange', 'np.arange', (['(1)', 'worksheet.nrows'], {}), '(1, worksheet.nrows)\n', (528, 5...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
[ "uuid.uuid4", "random.uniform", "json.dumps", "datetime.datetime.strptime", "pytest.mark.flaky", "datetime.timedelta", "datetime.datetime.now" ]
[((1674, 1728), 'pytest.mark.flaky', 'pytest.mark.flaky', ([], {'reruns': 'MAX_FLAKY_RERUNS_INTEGRATION'}), '(reruns=MAX_FLAKY_RERUNS_INTEGRATION)\n', (1691, 1728), False, 'import pytest\n'), ((12119, 12165), 'pytest.mark.flaky', 'pytest.mark.flaky', ([], {'reruns': 'MAX_FLAKY_RERUNS_ETH'}), '(reruns=MAX_FLAKY_RERUNS_E...
import json import shapely import shapely.prepared import shapely.geometry import sqlite3 class WOFLocator(object): def __init__(self, db, placetypes): self.db = db self.cursor = self.db.cursor() self.placetypes = placetypes self.geoJSONCache = {} self.hierarchyCache = {} def findGeoJSON(self,...
[ "shapely.geometry.Point", "shapely.geometry.asShape", "json.loads" ]
[((890, 906), 'json.loads', 'json.loads', (['body'], {}), '(body)\n', (900, 906), False, 'import json\n'), ((485, 503), 'json.loads', 'json.loads', (['row[0]'], {}), '(row[0])\n', (495, 503), False, 'import json\n'), ((946, 991), 'shapely.geometry.asShape', 'shapely.geometry.asShape', (["geojson['geometry']"], {}), "(g...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ "pulumi.get", "pulumi.getter", "pulumi.set", "pulumi.InvokeOptions", "pulumi.runtime.invoke" ]
[((4792, 4825), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""apmDomainId"""'}), "(name='apmDomainId')\n", (4805, 4825), False, 'import pulumi\n'), ((5152, 5185), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""definedTags"""'}), "(name='definedTags')\n", (5165, 5185), False, 'import pulumi\n'), ((5463, 5496)...
import os import pickle import pandas as pd from rdkit import Chem from qmdesc import ReactivityDescriptorHandler from tqdm import tqdm from .post_process import check_chemprop_out, min_max_normalize def reaction_to_reactants(reactions): reactants = set() for r in reactions: rs = r.split('>')[0].spli...
[ "pandas.DataFrame", "os.mkdir", "tqdm.tqdm", "qmdesc.ReactivityDescriptorHandler", "pandas.read_csv", "os.path.exists", "rdkit.Chem.AddHs", "os.path.join", "rdkit.Chem.MolFromSmiles" ]
[((664, 704), 'pandas.read_csv', 'pd.read_csv', (['args.data_path'], {'index_col': '(0)'}), '(args.data_path, index_col=0)\n', (675, 704), True, 'import pandas as pd\n'), ((848, 877), 'qmdesc.ReactivityDescriptorHandler', 'ReactivityDescriptorHandler', ([], {}), '()\n', (875, 877), False, 'from qmdesc import Reactivity...
# Generated by Django 3.1.6 on 2021-10-29 04:17 from django.db import migrations, models import fernet_fields.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='OneDriveDatalake', fields=[ ...
[ "django.db.models.CharField", "django.db.models.AutoField" ]
[((340, 433), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (356, 433), False, 'from django.db import migrations, models\...
#!/usr/bin/env python # -*- coding: utf-8 -*- """:Mod: io :Synopsis: Utilities for reading and writing a model instance :Author: servilla :Created: 6/15/18 """ import json # from collections import OrderedDict import daiquiri import xml.etree.ElementTree as ET from metapype.model.node import Node log...
[ "metapype.model.node.Node", "xml.etree.ElementTree.fromstring", "json.dumps", "xml.etree.ElementTree.tostring", "daiquiri.getLogger", "xml.etree.ElementTree.ElementTree" ]
[((326, 369), 'daiquiri.getLogger', 'daiquiri.getLogger', (["('model_io: ' + __name__)"], {}), "('model_io: ' + __name__)\n", (344, 369), False, 'import daiquiri\n'), ((908, 936), 'metapype.model.node.Node', 'Node', (['name'], {'id': "body[0]['id']"}), "(name, id=body[0]['id'])\n", (912, 936), False, 'from metapype.mod...
# Create your views here. from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect, JsonResponse,QueryDict from django.urls import reverse from django.views.generic import View, TemplateView, ListView, DetailView from django.db.models import Q from django.contrib.auth.mixins imp...
[ "deploy.forms.DeployForm", "deploy.models.Deploy.objects.get", "deploy.models.Deploy", "utils.jenkins_api.get_build_url_number", "django.db.models.Q", "django.http.JsonResponse", "json.dumps", "django.urls.reverse", "datetime.datetime.now", "utils.gitlab_api.get_user_projects", "deploy.forms.App...
[((1043, 1074), 'utils.gitlab_api.get_user_projects', 'get_user_projects', (['self.request'], {}), '(self.request)\n', (1060, 1074), False, 'from utils.gitlab_api import get_user_projects, get_project_versions, get_project_branchs\n'), ((1144, 1167), 'deploy.forms.ApplyForm', 'ApplyForm', (['request.POST'], {}), '(requ...
#!/usr/bin/env python3 # Copyright 2019, <NAME> <<EMAIL>>, <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause import sys import json import random import cdf debug_vars = {} class App: def __init__(self, ids, tasks): self.ids = ids self.tasks = tasks self.arrival = None for ix,t in enumerate(tasks)...
[ "json.loads", "random.Random", "json.dumps", "cdf.CDF.loadCDF", "sys.exit" ]
[((470, 498), 'cdf.CDF.loadCDF', 'cdf.CDF.loadCDF', (['"""gauss.cdf"""'], {}), "('gauss.cdf')\n", (485, 498), False, 'import cdf\n'), ((900, 928), 'cdf.CDF.loadCDF', 'cdf.CDF.loadCDF', (['"""gauss.cdf"""'], {}), "('gauss.cdf')\n", (915, 928), False, 'import cdf\n'), ((2235, 2250), 'random.Random', 'random.Random', ([],...
import pytest import importlib @pytest.fixture( scope='module', params=[ 'ipynb.fs.defs.pure_ipynb.foo', 'ipynb.fs.defs.mixed_ipynb.foo' ] ) def foo(request): return importlib.import_module(request.param) @pytest.fixture( scope='module', params=[ 'ipynb.fs.defs.pure_ip...
[ "pytest.raises", "pytest.fixture", "importlib.import_module" ]
[((34, 142), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""', 'params': "['ipynb.fs.defs.pure_ipynb.foo', 'ipynb.fs.defs.mixed_ipynb.foo']"}), "(scope='module', params=['ipynb.fs.defs.pure_ipynb.foo',\n 'ipynb.fs.defs.mixed_ipynb.foo'])\n", (48, 142), False, 'import pytest\n'), ((241, 341), 'pytest...
"""Menu item that is used to exit the CLI.""" from vigorish.cli.menu_item import MenuItem from vigorish.constants import EMOJIS from vigorish.util.result import Result class ExitProgram(MenuItem): def __init__(self, app): super().__init__(app) self.menu_item_text = "Exit" self.menu_item_em...
[ "vigorish.constants.EMOJIS.get", "vigorish.util.result.Result.Ok" ]
[((326, 348), 'vigorish.constants.EMOJIS.get', 'EMOJIS.get', (['"""EXIT"""', '""""""'], {}), "('EXIT', '')\n", (336, 348), False, 'from vigorish.constants import EMOJIS\n'), ((417, 428), 'vigorish.util.result.Result.Ok', 'Result.Ok', ([], {}), '()\n', (426, 428), False, 'from vigorish.util.result import Result\n')]
#!/usr/bin/python3 import sys import cgi import cgitb; cgitb.enable() # for troubleshooting sys.path.insert(0, '/home/root/brain-fs/www/common') import brain from subprocess import call call("cat /home/root/brain-fs/camera/syzygy_hub_camera.bit > /dev/xdevcfg", shell=True) call("/home/root/brain-fs/camera/software...
[ "brain.www_print_head", "brain.www_end_section", "cgitb.enable", "sys.path.insert", "brain.www_print_title", "subprocess.call", "brain.www_start_section", "brain.www_print_foot" ]
[((56, 70), 'cgitb.enable', 'cgitb.enable', ([], {}), '()\n', (68, 70), False, 'import cgitb\n'), ((95, 147), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""/home/root/brain-fs/www/common"""'], {}), "(0, '/home/root/brain-fs/www/common')\n", (110, 147), False, 'import sys\n'), ((191, 282), 'subprocess.call', 'call'...
import random import numpy as np import matplotlib.pyplot as plt import logging from qlazy import QState from qlazy.tools.Register import CreateRegister, InitRegister EPS = 1.e-8 QS_Y = QState(qubit_num=1).h(0).s(0) def init_qs_list(N, prob): return [QState(qubit_num=1).h(0).s(0).z(0) if random.uniform(0, 1) <= ...
[ "qlazy.tools.Register.CreateRegister", "matplotlib.pyplot.savefig", "matplotlib.pyplot.show", "logging.FileHandler", "random.uniform", "logging.StreamHandler", "qlazy.QState", "qlazy.tools.Register.InitRegister", "numpy.array", "numpy.linspace", "matplotlib.pyplot.subplots", "logging.getLogger...
[((875, 892), 'qlazy.tools.Register.CreateRegister', 'CreateRegister', (['(1)'], {}), '(1)\n', (889, 892), False, 'from qlazy.tools.Register import CreateRegister, InitRegister\n'), ((918, 935), 'qlazy.tools.Register.CreateRegister', 'CreateRegister', (['(7)'], {}), '(7)\n', (932, 935), False, 'from qlazy.tools.Registe...
""" Copyright BOOSTRY Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
[ "datetime.datetime.strptime", "tests.account_config.config_eth_account", "app.model.db.Notification" ]
[((1141, 1168), 'tests.account_config.config_eth_account', 'config_eth_account', (['"""user1"""'], {}), "('user1')\n", (1159, 1168), False, 'from tests.account_config import config_eth_account\n'), ((1231, 1258), 'tests.account_config.config_eth_account', 'config_eth_account', (['"""user2"""'], {}), "('user2')\n", (124...
"""Helper functions to handle AMI creation with packer""" import boto import os import subprocess import logging import urllib2 import csv LOGGER = logging.getLogger('geotrellis_spark') class GTAMIException(Exception): pass def get_ubuntu_ami(region): """Gets AMI ID for current release in region""" r...
[ "os.path.join", "boto.config.get", "csv.DictReader", "os.environ.copy", "boto.config.read", "os.path.realpath", "logging.getLogger", "os.path.expanduser", "urllib2.urlopen", "subprocess.check_call" ]
[((151, 188), 'logging.getLogger', 'logging.getLogger', (['"""geotrellis_spark"""'], {}), "('geotrellis_spark')\n", (168, 188), False, 'import logging\n'), ((636, 699), 'csv.DictReader', 'csv.DictReader', (['response'], {'fieldnames': 'fieldnames', 'delimiter': '"""\t"""'}), "(response, fieldnames=fieldnames, delimiter...
# Generated by Django 3.1.7 on 2021-06-16 05:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Area', fields=[ ...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.EmailField", "django.db.models.AutoField", "django.db.models.IntegerField" ]
[((337, 391), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'primary_key': '(True)', 'serialize': '(False)'}), '(primary_key=True, serialize=False)\n', (356, 391), False, 'from django.db import migrations, models\n'), ((423, 454), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(5...
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ "cirq.SimulatesSamples", "cirq.testing.EqualsTester", "cirq.X", "cirq.LineQubit", "cirq.NamedQubit", "cirq.MeasurementGate", "cirq.H.on_each", "cirq.Simulator", "cirq.ParamResolver", "pytest.raises", "numpy.array", "cirq.testing.random_circuit", "cirq.SimulatesIntermediateWaveFunction", "n...
[((836, 859), 'cirq.SimulatesSamples', 'cirq.SimulatesSamples', ([], {}), '()\n', (857, 859), False, 'import cirq\n'), ((981, 1004), 'cirq.testing.mock.mock.Mock', 'mock.Mock', (['cirq.Circuit'], {}), '(cirq.Circuit)\n', (990, 1004), False, 'from cirq.testing.mock import mock\n'), ((1026, 1055), 'cirq.testing.mock.mock...
from datetime import datetime from django.db import models from markupfield.fields import MarkupField class Categories(models.Model): name = models.CharField(max_length=100) slug = models.SlugField(db_index=True) def __str__(self): return self.name class Post(models.Model): category = mode...
[ "datetime.datetime.strftime", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.SlugField", "markupfield.fields.MarkupField", "django.db.models.DateTimeField" ]
[((148, 180), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (164, 180), False, 'from django.db import models\n'), ((192, 223), 'django.db.models.SlugField', 'models.SlugField', ([], {'db_index': '(True)'}), '(db_index=True)\n', (208, 223), False, 'from django.db ...
# -*- coding: utf-8 -*- import cgi import json import logging import re import traceback import typing from hapic.context import BaseContext from hapic.context import RouteRepresentation from hapic.data import HapicFile from hapic.decorator import DECORATION_ATTRIBUTE_NAME from hapic.decorator import DecoratedControll...
[ "pyramid.response.FileIter", "pyramid.response.FileResponse", "pyramid.response.Response", "json.dumps", "traceback.format_exc", "logging.getLogger", "re.compile" ]
[((965, 979), 're.compile', 're.compile', (['""""""'], {}), "('')\n", (975, 979), False, 'import re\n'), ((3225, 3283), 'pyramid.response.Response', 'Response', ([], {'body': 'response', 'headers': 'headers', 'status': 'http_code'}), '(body=response, headers=headers, status=http_code)\n', (3233, 3283), False, 'from pyr...
import logging import platform import sys import typing from ctypes import * from ctypes.util import find_library from enum import IntEnum import pkg_resources import ujson TDLIB_MAX_INT = 2 ** 63 - 1 log_message_callback_type = CFUNCTYPE(None, c_int, c_char_p) ARCH_ALIASES = { "x86_64": "amd64", "aarch64": "...
[ "ujson.loads", "platform.uname", "pkg_resources.resource_filename", "sys.stdout.flush", "ujson.dumps", "ctypes.util.find_library", "logging.getLogger" ]
[((479, 501), 'ctypes.util.find_library', 'find_library', (['"""tdjson"""'], {}), "('tdjson')\n", (491, 501), False, 'from ctypes.util import find_library\n'), ((575, 591), 'platform.uname', 'platform.uname', ([], {}), '()\n', (589, 591), False, 'import platform\n'), ((994, 1050), 'pkg_resources.resource_filename', 'pk...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import os import yaml from easydict import EasyDict as edict CONFIG = edict() # ---------------------------------------------------------------------------- ...
[ "copy.deepcopy", "os.path.exists", "packaging.version.parse", "easydict.EasyDict" ]
[((232, 239), 'easydict.EasyDict', 'edict', ([], {}), '()\n', (237, 239), True, 'from easydict import EasyDict as edict\n'), ((3058, 3095), 'os.path.exists', 'os.path.exists', (['"""config_default.yaml"""'], {}), "('config_default.yaml')\n", (3072, 3095), False, 'import os\n'), ((1146, 1163), 'copy.deepcopy', 'copy.dee...
# Copyright (c) Facebook, Inc. and its affiliates. import copy import itertools import logging import numpy as np import pickle import random import torch import torch.utils.data as data from torch.utils.data.sampler import Sampler from detectron2.utils.serialize import PicklableWrapper __all__ = ["MapDataset", "Data...
[ "pickle.loads", "numpy.stack", "torch.utils.data.get_worker_info", "copy.deepcopy", "numpy.concatenate", "random.Random", "numpy.frombuffer", "numpy.cumsum", "numpy.array", "itertools.islice", "numpy.vstack", "detectron2.utils.serialize.PicklableWrapper", "logging.getLogger", "pickle.dumps...
[((1177, 1203), 'detectron2.utils.serialize.PicklableWrapper', 'PicklableWrapper', (['map_func'], {}), '(map_func)\n', (1193, 1203), False, 'from detectron2.utils.serialize import PicklableWrapper\n'), ((1260, 1277), 'random.Random', 'random.Random', (['(42)'], {}), '(42)\n', (1273, 1277), False, 'import random\n'), ((...
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Scipp contributors (https://github.com/scipp) import numpy as np import scipp as sc from scipp.integrate import trapezoid, simpson import pytest def make_array(): x = sc.geomspace(dim='xx', start=0.1, stop=0.4, num=10, unit='rad') y = sc.linspace(d...
[ "scipp.scalar", "scipp.linspace", "scipp.sin", "pytest.raises", "scipp.full_like", "scipp.geomspace", "scipp.integrate.trapezoid", "scipp.array", "pytest.mark.parametrize" ]
[((466, 520), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""integ"""', '[trapezoid, simpson]'], {}), "('integ', [trapezoid, simpson])\n", (489, 520), False, 'import pytest\n'), ((674, 728), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""integ"""', '[trapezoid, simpson]'], {}), "('integ', [tra...
# # Copyright (c) 2008-2016 Citrix Systems, 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 l...
[ "nssrc.com.citrix.netscaler.nitro.service.options.options" ]
[((10830, 10839), 'nssrc.com.citrix.netscaler.nitro.service.options.options', 'options', ([], {}), '()\n', (10837, 10839), False, 'from nssrc.com.citrix.netscaler.nitro.service.options import options\n'), ((11199, 11208), 'nssrc.com.citrix.netscaler.nitro.service.options.options', 'options', ([], {}), '()\n', (11206, 1...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QApplication, QMainWindow from ui_py.ui_main_window import Main_Form # import pymysql # conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='<PASSWORD>',db='mysql') # cursor = conn.curs...
[ "PyQt5.QtWidgets.QApplication", "PyQt5.QtGui.QIcon", "ui_py.ui_main_window.Main_Form" ]
[((506, 528), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (518, 528), False, 'from PyQt5.QtWidgets import QApplication, QMainWindow\n'), ((643, 654), 'ui_py.ui_main_window.Main_Form', 'Main_Form', ([], {}), '()\n', (652, 654), False, 'from ui_py.ui_main_window import Main_Form\n'...
import argparse import torch import torch.distributed as dist import models import structured def parse_args(dataset): """An argument parser with some behaviour common to all datasets.""" model_names = sorted(models.get_model_names(dataset=dataset)) conv_types = sorted(structured.conv2d_types.keys()) ...
[ "torch.distributed.init_process_group", "argparse.ArgumentParser", "structured.conv2d_types.keys", "torch.manual_seed", "torch.cuda.is_available", "models.get_model_names" ]
[((333, 396), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': "(dataset.name + ' training')"}), "(description=dataset.name + ' training')\n", (356, 396), False, 'import argparse\n'), ((222, 261), 'models.get_model_names', 'models.get_model_names', ([], {'dataset': 'dataset'}), '(dataset=datas...
#!/usr/bin/env python3 import depthai as dai import time # Start defining a pipeline pipeline = dai.Pipeline() # Define a source - color camera cam = pipeline.create(dai.node.ColorCamera) # VideoEncoder jpeg = pipeline.create(dai.node.VideoEncoder) jpeg.setDefaultProfilePreset(cam.getFps(), dai.VideoEncoderPropertie...
[ "depthai.Device", "depthai.Pipeline", "time.sleep" ]
[((98, 112), 'depthai.Pipeline', 'dai.Pipeline', ([], {}), '()\n', (110, 112), True, 'import depthai as dai\n'), ((2797, 2817), 'depthai.Device', 'dai.Device', (['pipeline'], {}), '(pipeline)\n', (2807, 2817), True, 'import depthai as dai\n'), ((2870, 2883), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (2880, 28...
import psutil import os emulator_flag_filename = "emulator" def zpui_running_as_service(): if psutil.Process(os.getpid()).ppid() == 1: return True; else: return False; def is_emulator(): return emulator_flag_filename in os.listdir(".")
[ "os.getpid", "os.listdir" ]
[((251, 266), 'os.listdir', 'os.listdir', (['"""."""'], {}), "('.')\n", (261, 266), False, 'import os\n'), ((115, 126), 'os.getpid', 'os.getpid', ([], {}), '()\n', (124, 126), False, 'import os\n')]
import sys import time import threading class SpinnerThread(threading.Thread): """ Just a tiny class to showing a loading signal executed in a separate thread """ def __init__(self): super().__init__(target=self._spin) self._stopevent = threading.Event() def stop(self): ...
[ "sys.stdout.write", "threading.Event", "sys.stdout.flush", "time.sleep" ]
[((277, 294), 'threading.Event', 'threading.Event', ([], {}), '()\n', (292, 294), False, 'import threading\n'), ((457, 476), 'sys.stdout.write', 'sys.stdout.write', (['t'], {}), '(t)\n', (473, 476), False, 'import sys\n'), ((493, 511), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (509, 511), False, 'import...
""" Copyright (c) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
[ "numpy.frombuffer" ]
[((2963, 2999), 'numpy.frombuffer', 'np.frombuffer', (['image_bytes', 'np.uint8'], {}), '(image_bytes, np.uint8)\n', (2976, 2999), True, 'import numpy as np\n')]
#!/usr/bin/env python # Copyright (c) 2016 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. """Module to resolve the current platform and bitness that works across infrastructure systems. """ import itertools import platf...
[ "itertools.combinations", "platform.machine", "platform.architecture" ]
[((959, 982), 'platform.architecture', 'platform.architecture', ([], {}), '()\n', (980, 982), False, 'import platform\n'), ((4165, 4196), 'itertools.combinations', 'itertools.combinations', (['plat', 'r'], {}), '(plat, r)\n', (4187, 4196), False, 'import itertools\n'), ((923, 941), 'platform.machine', 'platform.machine...
#!/usr/bin/env python3 # Copyright (c) the JPEG XL Project # # 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...
[ "numpy.load", "json.load", "tempfile.TemporaryDirectory", "argparse.ArgumentParser", "os.path.isdir", "os.path.dirname", "os.path.exists", "subprocess.call", "os.path.join", "sys.exit" ]
[((1010, 1029), 'numpy.load', 'numpy.load', (['ref_npy'], {}), '(ref_npy)\n', (1020, 1029), False, 'import numpy\n'), ((1038, 1057), 'numpy.load', 'numpy.load', (['dec_npy'], {}), '(dec_npy)\n', (1048, 1057), False, 'import numpy\n'), ((1846, 1872), 'os.path.isdir', 'os.path.isdir', (['args.corpus'], {}), '(args.corpus...
from setuptools import setup setup( name="MQTT-FileLogger", version="0.0.1", python_requires='>3.6.0', packages=["mqtt_filelogger"], url="https://github.com/MoeweX/mqtt_filelogger.git", license="MIT", author="<NAME>", author_email="", description="Service to log mqtt messages to csv...
[ "setuptools.setup" ]
[((30, 356), 'setuptools.setup', 'setup', ([], {'name': '"""MQTT-FileLogger"""', 'version': '"""0.0.1"""', 'python_requires': '""">3.6.0"""', 'packages': "['mqtt_filelogger']", 'url': '"""https://github.com/MoeweX/mqtt_filelogger.git"""', 'license': '"""MIT"""', 'author': '"""<NAME>"""', 'author_email': '""""""', 'desc...
import slovenian_press.text import unittest import mock from assertpy import assert_that class TextTest(unittest.TestCase): def test_text_processing_chain_should_call_all_processors(self): # given processor1 = mock.MagicMock(spec=slovenian_press.text.TextProcessor) processor2 = mock.MagicM...
[ "mock.MagicMock", "assertpy.assert_that" ]
[((232, 287), 'mock.MagicMock', 'mock.MagicMock', ([], {'spec': 'slovenian_press.text.TextProcessor'}), '(spec=slovenian_press.text.TextProcessor)\n', (246, 287), False, 'import mock\n'), ((309, 364), 'mock.MagicMock', 'mock.MagicMock', ([], {'spec': 'slovenian_press.text.TextProcessor'}), '(spec=slovenian_press.text.T...
import json import logging from itertools import cycle import matplotlib.pyplot as plt import numpy as np from sklearn.cluster import MeanShift, estimate_bandwidth from sklearn.datasets.samples_generator import make_blobs log = logging.getLogger(__name__) def analyze(data): # Convert this to python data for us ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "json.loads", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "sklearn.cluster.MeanShift", "numpy.unique", "sklearn.cluster.estimate_bandwidth", "matplotlib.pyplot.figure", "numpy.vstack", "numpy.array", "sklearn.datasets.samples_gener...
[((230, 257), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (247, 257), False, 'import logging\n'), ((373, 389), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (383, 389), False, 'import json\n'), ((973, 995), 'numpy.array', 'np.array', (['[[0.0, 0.0]]'], {}), '([[0.0, 0.0]])\n'...
from idm.objects import dp, Event from microvk import VkApi, VkApiResponseException @dp.event_register('subscribeSignals') def subscribe_signals(event: Event) -> str: message = event.responses['chat_subscribe'].format(имя = event.chat.name, ид = event.chat.iris_id) event.db.chats[event.chat.iris_id]['inst...
[ "idm.objects.dp.event_register" ]
[((87, 124), 'idm.objects.dp.event_register', 'dp.event_register', (['"""subscribeSignals"""'], {}), "('subscribeSignals')\n", (104, 124), False, 'from idm.objects import dp, Event\n')]
import json import requests from collections import defaultdict # This is used for deduplication of registered functions FUNCTION_NAME = "send_notification.py" def process(x): squad = json.loads(x['value']['squad']) sessions = get_all_sessions(squad['id']) log(f"Got {len(sessions)} sessions to send notif...
[ "collections.defaultdict", "requests.post", "json.loads" ]
[((191, 222), 'json.loads', 'json.loads', (["x['value']['squad']"], {}), "(x['value']['squad'])\n", (201, 222), False, 'import json\n'), ((749, 766), 'collections.defaultdict', 'defaultdict', (['dict'], {}), '(dict)\n', (760, 766), False, 'from collections import defaultdict\n'), ((1806, 1864), 'requests.post', 'reques...
from collections import Counter from collections.abc import Sequence from functools import partial from itertools import permutations from operator import length_hint from cons import cons from cons.core import ConsNull, ConsPair from unification import reify, var from unification.core import isground from .core impo...
[ "operator.length_hint", "functools.partial", "unification.var", "unification.core.isground", "itertools.permutations", "cons.cons", "collections.Counter", "unification.reify" ]
[((818, 828), 'cons.cons', 'cons', (['h', 't'], {}), '(h, t)\n', (822, 828), False, 'from cons import cons\n'), ((2126, 2140), 'unification.reify', 'reify', (['args', 's'], {}), '(args, s)\n', (2131, 2140), False, 'from unification import reify, var\n'), ((3211, 3224), 'unification.reify', 'reify', (['lst', 'S'], {}), ...
# Copyright 2021 MosaicML. All Rights Reserved. import logging from dataclasses import dataclass from multiprocessing import cpu_count import yahp as hp from composer.core import DataSpec from composer.datasets.dataloader import DataloaderHparams from composer.datasets.hparams import DatasetHparams from composer.dat...
[ "datasets.load_dataset", "yahp.optional", "transformers.AutoTokenizer.from_pretrained", "composer.utils.dist.get_sampler", "logging.getLogger", "multiprocessing.cpu_count" ]
[((399, 426), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (416, 426), False, 'import logging\n'), ((1047, 1181), 'yahp.optional', 'hp.optional', (['"""The GLUE task to train on, choose one from: CoLA, MNLI, MRPC, QNLI, QQP, RTE, SST-2, and STS-B."""'], {'default': 'None'}), "(\n 'Th...
import os import pytest from PIL import Image import ascii_art from ascii_art import Brightness, AsciiArt @pytest.fixture(scope='function') def test_image_path(): """Test image pixel array for testing basic image functions.""" # Setup: Create PIL Image object from pixel array test_pixel_matrix = [ ...
[ "PIL.Image.new", "os.remove", "os.path.abspath", "pytest.fixture", "PIL.Image.open", "ascii_art.Brightness", "pytest.mark.parametrize", "ascii_art.AsciiArt" ]
[((108, 140), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (122, 140), False, 'import pytest\n'), ((10723, 10827), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""dest_width, dest_height, scale"""', '[(500, 200, 1), (10, 30, 2), (30, 6, 3)]'], {}), "('dest_w...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: mytype.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflec...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((479, 505), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (503, 505), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1620, 1897), 'google.protobuf.descriptor.FieldDescriptor', '_descriptor.FieldDescriptor', ([], {'name': '"""id"""', 'full_name'...
import sys from typing import Dict, Optional, SupportsFloat import pendulum # type: ignore from pathlib import Path from organize.utils import DotDict from .filter import Filter class Created(Filter): """ Matches files by created date :param int years: specify number of years :param int ...
[ "sys.platform.startswith", "pendulum.tz.local_timezone", "pendulum.duration" ]
[((3061, 3089), 'pendulum.tz.local_timezone', 'pendulum.tz.local_timezone', ([], {}), '()\n', (3087, 3089), False, 'import pendulum\n'), ((3388, 3509), 'pendulum.duration', 'pendulum.duration', ([], {'years': 'years', 'months': 'months', 'weeks': 'weeks', 'days': 'days', 'hours': 'hours', 'minutes': 'minutes', 'seconds...
import unittest from unittest.mock import patch from bibliopixel.util.image import extract_gif_lines class ExtractGifLinesTest(unittest.TestCase): def test_extract(self): actual = list(extract_gif_lines._extract(GIF_LINES)) self.assertEqual(actual, EXPECTED1) def test_extract_gif_lines(self):...
[ "bibliopixel.util.image.extract_gif_lines._extract", "bibliopixel.util.image.extract_gif_lines.extract_gif_lines" ]
[((199, 236), 'bibliopixel.util.image.extract_gif_lines._extract', 'extract_gif_lines._extract', (['GIF_LINES'], {}), '(GIF_LINES)\n', (225, 236), False, 'from bibliopixel.util.image import extract_gif_lines\n'), ((343, 389), 'bibliopixel.util.image.extract_gif_lines.extract_gif_lines', 'extract_gif_lines.extract_gif_l...
import json class Resources: def __init__(self): with open('../Utils/zaapList.json', 'r') as f: self.zaaps = json.load(f) with open('../Utils/CaracLevel.json', 'r') as f: self.goal_caracs = json.load(f) with open('../Utils/MapInfo.json', 'r') as f: self....
[ "json.load" ]
[((135, 147), 'json.load', 'json.load', (['f'], {}), '(f)\n', (144, 147), False, 'import json\n'), ((236, 248), 'json.load', 'json.load', (['f'], {}), '(f)\n', (245, 248), False, 'import json\n'), ((336, 348), 'json.load', 'json.load', (['f'], {}), '(f)\n', (345, 348), False, 'import json\n'), ((433, 445), 'json.load',...
import json import os.path as osp import os def get_chinese_keys(anns: dict, key: set): for ann in anns.values(): for values in ann.values(): for value in values: key.add(value) if __name__ == "__main__": modes = ["train"] kinds = ["amount", "date"] chinese_keys =...
[ "json.load", "os.path.join" ]
[((389, 413), 'os.path.join', 'osp.join', (['mode', '"""gt.txt"""'], {}), "(mode, 'gt.txt')\n", (397, 413), True, 'import os.path as osp\n'), ((508, 536), 'os.path.join', 'osp.join', (['sub_root', '"""images"""'], {}), "(sub_root, 'images')\n", (516, 536), True, 'import os.path as osp\n'), ((559, 588), 'os.path.join', ...