code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import typing import cassandra.cluster import pytest import cassarrow @pytest.fixture() def cluster() -> cassandra.cluster.Cluster: return cassandra.cluster.Cluster() @pytest.fixture() def session( cluster: cassandra.cluster.Cluster, ) -> typing.Iterator[cassandra.cluster.Session]: with cluster.connec...
[ "pytest.fixture", "cassarrow.install_cassarrow" ]
[((75, 91), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (89, 91), False, 'import pytest\n'), ((178, 194), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (192, 194), False, 'import pytest\n'), ((360, 376), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (374, 376), False, 'import pytest\n'), ((498...
import re import pandas as pd def update_simulation_date_time(lines, start_line, new_datetime): """ replace both the analysis and reporting start date and times """ new_date = new_datetime.strftime("%m/%d/%Y") new_time = new_datetime.strftime("%H:%M:%S") lines[start_line] = re.sub(r'\d{2}\\\d{...
[ "re.sub", "pandas.to_datetime", "pandas.read_csv" ]
[((301, 366), 're.sub', 're.sub', (['"""\\\\d{2}\\\\\\\\\\\\d{2}\\\\\\\\\\\\d{2}"""', 'new_date', 'lines[start_line]'], {}), "('\\\\d{2}\\\\\\\\\\\\d{2}\\\\\\\\\\\\d{2}', new_date, lines[start_line])\n", (307, 366), False, 'import re\n'), ((418, 481), 're.sub', 're.sub', (['"""\\\\d{2}:\\\\d{2}:\\\\d{2}"""', 'new_time'...
''' * * Copyright (C) 2020 Universitat Politècnica de Catalunya. * * 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 requi...
[ "logging.getLogger", "selenium.webdriver.ChromeOptions", "selenium.webdriver.Chrome", "time.sleep", "data_manager.manage_request", "logging.config.fileConfig", "data_manager.get_network" ]
[((1042, 1086), 'logging.config.fileConfig', 'logging.config.fileConfig', (['"""../logging.conf"""'], {}), "('../logging.conf')\n", (1067, 1086), False, 'import logging\n'), ((1097, 1132), 'logging.getLogger', 'logging.getLogger', (['"""DRIVER_MANAGER"""'], {}), "('DRIVER_MANAGER')\n", (1114, 1132), False, 'import logg...
"""tests.hash.__init__.py Copyright <NAME>, LLC. Licensed under MIT (https://github.com/tektronix/syphon/blob/master/LICENSE) """ from typing import AnyStr, Union from py._path.local import LocalPath def _copy(source: Union[AnyStr, LocalPath], destination: Union[AnyStr, LocalPath]): if not isinstance(sou...
[ "py._path.local.LocalPath" ]
[((354, 371), 'py._path.local.LocalPath', 'LocalPath', (['source'], {}), '(source)\n', (363, 371), False, 'from py._path.local import LocalPath\n')]
"""This file is used in setting the feature of datetime.""" # import relation package. from datetime import datetime class DatetimeSetting: """This class is used in setting the feature of datetime.""" def __init__(self): """Initial some variable""" self.time_now = datetime.now() def cur...
[ "datetime.datetime.strptime", "datetime.datetime.now", "datetime.datetime.strftime" ]
[((293, 307), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (305, 307), False, 'from datetime import datetime\n'), ((1252, 1313), 'datetime.datetime.strptime', 'datetime.strptime', (["kwargs['time_text']", "kwargs['time_format']"], {}), "(kwargs['time_text'], kwargs['time_format'])\n", (1269, 1313), False,...
from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.db.models import Q from django.http import JsonResponse from django_filters.rest_framework import DjangoFilterBackend from rest_framework import generics, permissions from rest_framework.authtoken.models import Token fr...
[ "quedadas.controllers.userCtrl.get_feed", "rest_framework.authtoken.models.Token.objects.get", "quedadas.serializers.FriendSerializer", "quedadas.serializers.TokenSerializer", "quedadas.serializers.UserSerializerDetail", "quedadas.serializers.ChangePasswordSerializer", "rest_framework.parsers.JSONParser...
[((1952, 1970), 'rest_framework.decorators.api_view', 'api_view', (["['POST']"], {}), "(['POST'])\n", (1960, 1970), False, 'from rest_framework.decorators import api_view, permission_classes\n'), ((2905, 2922), 'rest_framework.decorators.api_view', 'api_view', (["['GET']"], {}), "(['GET'])\n", (2913, 2922), False, 'fro...
# THIS FILE IS AUTOMATICALLY GENERATED. # Disclaimer: Please test this file before using in production. """ Generated blueprint DSL (.py) """ import json # no_qa import os # no_qa from calm.dsl.builtins import * # no_qa # Secret Variables BP_CRED_PC_ADMIN_PASSWORD = read_local_file("BP_CRED_PC_ADMIN_PASSWORD") ...
[ "json.dumps", "os.path.join" ]
[((3871, 3927), 'os.path.join', 'os.path.join', (['"""specs"""', '"""PrismCentral_provider_spec.yaml"""'], {}), "('specs', 'PrismCentral_provider_spec.yaml')\n", (3883, 3927), False, 'import os\n'), ((3983, 4047), 'os.path.join', 'os.path.join', (['"""specs"""', '"""PrismCentral_create_spec_editables.yaml"""'], {}), "(...
#!/usr/bin/env python r""" PLDM functions. """ import re import var_funcs as vf import func_args as fa import bmc_ssh_utils as bsu def pldmtool(option_string, parse_results=1, **bsu_options): r""" Run pldmtool on the BMC with the caller's option string and return the result. Example: ${pldm_result...
[ "func_args.args_to_objects", "var_funcs.key_value_outbuf_to_dict", "var_funcs.split_dict_on_key", "bmc_ssh_utils.bmc_execute_command" ]
[((1391, 1422), 'func_args.args_to_objects', 'fa.args_to_objects', (['bsu_options'], {}), '(bsu_options)\n', (1409, 1422), True, 'import func_args as fa\n'), ((1449, 1516), 'bmc_ssh_utils.bmc_execute_command', 'bsu.bmc_execute_command', (["('pldmtool ' + option_string)"], {}), "('pldmtool ' + option_string, **bsu_optio...
## @ingroup Methods-Flight_Dynamics-Dynamic_Stability-Full_Linearized_Equations-Supporting_Functions # cy_psi.py # # Created: Jun 2014, <NAME> # Modified: Jan 2016, <NAME> # ---------------------------------------------------------------------- # Imports # -----------------------------------------------------------...
[ "numpy.tan" ]
[((1153, 1166), 'numpy.tan', 'np.tan', (['theta'], {}), '(theta)\n', (1159, 1166), True, 'import numpy as np\n')]
"""Testing send_data functionality.""" import time import pandas as pd import pytest import numpy as np from dbrequests.mysql.tests.conftest import set_up_cats as reset from dbrequests.mysql.tests.conftest import ( set_up_membership as reset_membership, set_up_diffs as reset_diffs) from sqlalchemy.exc import O...
[ "dbrequests.mysql.tests.conftest.set_up_cats", "time.sleep", "dbrequests.mysql.tests.conftest.set_up_diffs", "numpy.isnan", "pytest.mark.usefixtures", "dbrequests.mysql.tests.conftest.set_up_membership", "pytest.raises", "pandas.DataFrame" ]
[((354, 383), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""db"""'], {}), "('db')\n", (377, 383), False, 'import pytest\n'), ((4652, 4681), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""db"""'], {}), "('db')\n", (4675, 4681), False, 'import pytest\n'), ((5697, 5726), 'pytest.mark.usefixtures...
# Copyright 2019 Open Source Robotics Foundation, 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...
[ "sys.stdin.isatty", "sys.stdin.readline", "rosidl_runtime_py.get_interface_path" ]
[((962, 980), 'sys.stdin.isatty', 'sys.stdin.isatty', ([], {}), '()\n', (978, 980), False, 'import sys\n'), ((1756, 1785), 'rosidl_runtime_py.get_interface_path', 'get_interface_path', (['args.type'], {}), '(args.type)\n', (1774, 1785), False, 'from rosidl_runtime_py import get_interface_path\n'), ((1055, 1075), 'sys.s...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ZetCode PyQt4 tutorial In this example, we create a skeleton of a calculator using a QtGui.QGridLayout. author: <NAME> website: zetcode.com last edited: October 2011 """ import sys from PyQt4 import QtGui class Example(QtGui.QWidget): def __init__(self): super(E...
[ "PyQt4.QtGui.QApplication", "PyQt4.QtGui.QLabel", "PyQt4.QtGui.QPushButton", "PyQt4.QtGui.QGridLayout" ]
[((1204, 1232), 'PyQt4.QtGui.QApplication', 'QtGui.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (1222, 1232), False, 'from PyQt4 import QtGui\n'), ((560, 579), 'PyQt4.QtGui.QGridLayout', 'QtGui.QGridLayout', ([], {}), '()\n', (577, 579), False, 'from PyQt4 import QtGui\n'), ((879, 899), 'PyQt4.QtGui.QPushButton',...
# Disable all logging features import logging logging.disable() from meinheld import patch patch.patch_all() from bottle import Bottle app = Bottle() @app.route("/") def index(): return "" @app.route("/user/<id:int>") def user_info(id): return str(id) @app.route("/user", method="POST") def user(): ...
[ "bottle.Bottle", "logging.disable", "meinheld.patch.patch_all" ]
[((47, 64), 'logging.disable', 'logging.disable', ([], {}), '()\n', (62, 64), False, 'import logging\n'), ((93, 110), 'meinheld.patch.patch_all', 'patch.patch_all', ([], {}), '()\n', (108, 110), False, 'from meinheld import patch\n'), ((146, 154), 'bottle.Bottle', 'Bottle', ([], {}), '()\n', (152, 154), False, 'from bo...
# Copyright 2018 NOKIA # # 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...
[ "oslo_config.fixture.Config", "nuage_neutron.plugins.nuage_ml2.nuage_network_ext_driver.NuageNetworkExtensionDriver", "nuage_neutron.plugins.nuage_ml2.nuage_port_ext_driver.NuagePortExtensionDriver", "nuage_neutron.plugins.nuage_ml2.trunk_driver.NuageTrunkDriver", "nuage_neutron.plugins.nuage_ml2.nuage_subn...
[((1918, 1971), 'unittest.mock.patch.object', 'mock.patch.object', (['RootNuagePlugin', '"""init_vsd_client"""'], {}), "(RootNuagePlugin, 'init_vsd_client')\n", (1935, 1971), False, 'from unittest import mock\n'), ((2083, 2137), 'unittest.mock.patch.object', 'mock.patch.object', (['RESTProxyServer', '"""raise_rest_erro...
import os import json class Config: _overrides = {} _mode = 'prod' config = None @classmethod def set_mode(self, mode): self._mode = mode @classmethod def set_overrides(self, overrides): self._overrides = overrides @classmethod def load_config(cls): if cl...
[ "os.path.normpath", "json.load", "os.environ.iteritems", "os.path.isfile" ]
[((604, 655), 'os.path.normpath', 'os.path.normpath', (["os.environ['FLEXAPI_CONFIG_FILE']"], {}), "(os.environ['FLEXAPI_CONFIG_FILE'])\n", (620, 655), False, 'import os\n'), ((1848, 1870), 'os.environ.iteritems', 'os.environ.iteritems', ([], {}), '()\n', (1868, 1870), False, 'import os\n'), ((671, 691), 'os.path.isfil...
from __future__ import print_function import pytest import sys from operator import add import findspark findspark.init() from pyspark import SparkContext, SparkConf, SQLContext, Row import os, subprocess, json, riak, time import pyspark_riak import timeout_decorator import datetime import tzlocal import pytz import ma...
[ "datetime.datetime", "pytz.utc.normalize", "datetime.datetime.utcfromtimestamp", "riak.RiakObject", "time.sleep", "findspark.init", "datetime.timedelta", "time.time", "random.randint" ]
[((105, 121), 'findspark.init', 'findspark.init', ([], {}), '()\n', (119, 121), False, 'import findspark\n'), ((1620, 1656), 'riak.RiakObject', 'riak.RiakObject', (['client', 'bucket', 'key'], {}), '(client, bucket, key)\n', (1635, 1656), False, 'import os, subprocess, json, riak, time\n'), ((2066, 2095), 'datetime.tim...
"""Helpers.""" from functools import lru_cache import requests from baseballclerk import __version__ @lru_cache() def cached_request_json(url: str) -> dict: """Send a get request to a url, LRU cached.""" headers = { 'User-Agent': f'BaseballClerk/{__version__} (+https://github.com/troxellophilus/bas...
[ "functools.lru_cache", "requests.get" ]
[((107, 118), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (116, 118), False, 'from functools import lru_cache\n'), ((355, 389), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (367, 389), False, 'import requests\n')]
# Generated by Django 3.0.8 on 2020-07-30 11:32 import account.models_addon import django.core.validators from django.db import migrations, models import django.utils.timezone import stdimage.models import stdimage.validators class Migration(migrations.Migration): dependencies = [ ('application', '0001_...
[ "django.db.models.DateTimeField", "django.db.models.CharField", "django.db.models.BooleanField" ]
[((477, 551), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)', 'default': 'django.utils.timezone.now'}), '(auto_now_add=True, default=django.utils.timezone.now)\n', (497, 551), False, 'from django.db import migrations, models\n'), ((719, 752), 'django.db.models.BooleanField', 'm...
from .comparator import Comparator as c import argparse parser = argparse.ArgumentParser(description="Generate test binaries and their associated .ll with GLLVM") parser.add_argument('file1', type=str, help='the first file to compare') parser.add_argument('file2', type=str, help...
[ "argparse.ArgumentParser" ]
[((66, 168), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Generate test binaries and their associated .ll with GLLVM"""'}), "(description=\n 'Generate test binaries and their associated .ll with GLLVM')\n", (89, 168), False, 'import argparse\n')]
""" Base Model Base structure for creation of new models Methods: calc_error: Estimates error according to SciKit's regression metrics filter_ts: Returns model's residuals """ import sys sys.path.append('../') from skfore.skfore import series_viewer from skfore.datasets import * import pandas import numpy ...
[ "numpy.random.normal", "pandas.Series", "pandas.DataFrame", "sklearn.preprocessing.MinMaxScaler", "matplotlib.pyplot.plot", "random.seed", "sklearn.model_selection.TimeSeriesSplit", "sklearn.metrics.mean_squared_error", "numpy.array", "skfore.extras.add_next_date", "sklearn.utils.resample", "n...
[((198, 220), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (213, 220), False, 'import sys\n'), ((2531, 2555), 'skfore.skfore.series_viewer', 'series_viewer', (['residuals'], {}), '(residuals)\n', (2544, 2555), False, 'from skfore.skfore import series_viewer\n'), ((4299, 4324), 'random.seed', ...
"""Dummy fill to keep density constant.""" import itertools from typing import Optional, Union import gdspy import numpy as np from numpy import sqrt from phidl.device_layout import _parse_layer from phidl.geometry import ( _expand_raster, _loop_over, _raster_index_to_coords, _rasterize_polygons, ) fr...
[ "gdsfactory.components.rectangle.rectangle", "numpy.sqrt", "itertools.groupby", "gdspy.boolean", "phidl.geometry._loop_over", "phidl.geometry._rasterize_polygons", "numpy.size", "phidl.geometry._raster_index_to_coords", "numpy.array", "gdsfactory.component.Component", "gdsfactory.add_padding_con...
[((1345, 1356), 'gdsfactory.component.Component', 'Component', ([], {}), '()\n', (1354, 1356), False, 'from gdsfactory.component import Component\n'), ((3345, 3368), 'phidl.geometry._loop_over', '_loop_over', (['fill_layers'], {}), '(fill_layers)\n', (3355, 3368), False, 'from phidl.geometry import _expand_raster, _loo...
import six import collections from chef.base import ChefObject from chef.exceptions import ChefError class NodeAttributes(collections.MutableMapping): """A collection of Chef :class:`~chef.Node` attributes. Attributes can be accessed like a normal python :class:`dict`:: print node['fqdn'] no...
[ "six.iterkeys", "chef.exceptions.ChefError" ]
[((1685, 1728), 'chef.exceptions.ChefError', 'ChefError', (['"""This attribute is not writable"""'], {}), "('This attribute is not writable')\n", (1694, 1728), False, 'from chef.exceptions import ChefError\n'), ((1947, 1990), 'chef.exceptions.ChefError', 'ChefError', (['"""This attribute is not writable"""'], {}), "('T...
import torch # import torch.distributions as dist import os import shutil import argparse from tqdm import tqdm import time from collections import defaultdict import pandas as pd from im2mesh import config from im2mesh.checkpoints import CheckpointIO from im2mesh.utils.io import export_pointcloud from im2mesh.utils.vi...
[ "logging.StreamHandler", "torch.cuda.is_available", "im2mesh.config.get_generator", "geometry.PointLK", "im2mesh.config.get_model", "logging.info", "os.path.exists", "argparse.ArgumentParser", "im2mesh.utils.visualize.visualize_data", "im2mesh.utils.voxels.VoxelGrid", "im2mesh.checkpoints.Checkp...
[((901, 978), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Extract meshes from occupancy process."""'}), "(description='Extract meshes from occupancy process.')\n", (924, 978), False, 'import argparse\n'), ((1412, 1500), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'lev...
from django.dispatch import Signal, receiver from django.utils import timezone from django_ses.signals import bounce_received, complaint_received, delivery_received from .models import SESMailDelivery # our signals recipients_bounce = Signal(providing_args=['recipients', 'bounce_obj']) recipients_complaint = Signal...
[ "django.dispatch.receiver", "django.utils.timezone.now", "django.dispatch.Signal" ]
[((239, 290), 'django.dispatch.Signal', 'Signal', ([], {'providing_args': "['recipients', 'bounce_obj']"}), "(providing_args=['recipients', 'bounce_obj'])\n", (245, 290), False, 'from django.dispatch import Signal, receiver\n'), ((314, 368), 'django.dispatch.Signal', 'Signal', ([], {'providing_args': "['recipients', 'c...
from datetime import timedelta, datetime from typing import List from sqlalchemy import select, and_, or_, update from app.crud import Mapper from app.enums.MessageEnum import MessageTypeEnum, MessageStateEnum from app.models import async_session from app.models.broadcast_read_user import PityBroadcastReadUser from a...
[ "app.models.async_session", "app.models.notification.PityNotification.created_at.desc", "app.models.notification.PityNotification.id.in_", "app.utils.logger.Log", "datetime.datetime.now", "sqlalchemy.select", "datetime.timedelta", "sqlalchemy.update", "sqlalchemy.and_" ]
[((461, 487), 'app.utils.logger.Log', 'Log', (['"""PityNotificationDao"""'], {}), "('PityNotificationDao')\n", (464, 487), False, 'from app.utils.logger import Log\n'), ((794, 808), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (806, 808), False, 'from datetime import timedelta, datetime\n'), ((811, 829), ...
import csv import json import os import requests import sys from io import StringIO from utils import CacheManager from pathlib import PurePath from configparser import ConfigParser, MissingSectionHeaderError, NoSectionError from datetime import datetime, timedelta requests.packages.urllib3.disable_warnings()...
[ "utils.CacheManager", "requests.post", "requests.packages.urllib3.disable_warnings", "configparser.ConfigParser", "os.makedirs", "csv.DictReader", "json.dumps", "requests.get", "datetime.timedelta", "pathlib.PurePath", "datetime.datetime.now", "os.path.isdir", "sys.exit", "io.StringIO" ]
[((276, 320), 'requests.packages.urllib3.disable_warnings', 'requests.packages.urllib3.disable_warnings', ([], {}), '()\n', (318, 320), False, 'import requests\n'), ((3512, 3526), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (3524, 3526), False, 'from configparser import ConfigParser, MissingSectionHe...
from __future__ import absolute_import from __future__ import print_function import logging import numpy as np from numpy.lib.recfunctions import append_fields from sklearn.cluster import DBSCAN from lmatools.coordinateSystems import GeographicSystem from lmatools.flashsort.flash_stats import calculate_...
[ "logging.getLogger", "lmatools.flashsort.flash_stats.calculate_flash_stats", "numpy.ones", "numpy.hstack", "numpy.arange", "sklearn.cluster.DBSCAN", "numpy.lib.recfunctions.append_fields", "numpy.where", "numpy.asarray", "numpy.logical_not", "numpy.argsort", "numpy.empty_like", "numpy.vstack...
[((2228, 2267), 'logging.getLogger', 'logging.getLogger', (['"""FlashAutorunLogger"""'], {}), "('FlashAutorunLogger')\n", (2245, 2267), False, 'import logging\n'), ((2801, 2819), 'lmatools.coordinateSystems.GeographicSystem', 'GeographicSystem', ([], {}), '()\n', (2817, 2819), False, 'from lmatools.coordinateSystems im...
import re import typing from qtpy import QtCore as QC from qtpy import QtWidgets as QW from hydrus.core import HydrusConstants as HC from hydrus.core import HydrusData from hydrus.core import HydrusExceptions from hydrus.client import ClientConstants as CC from hydrus.client import ClientParsing from hydrus.client.g...
[ "hydrus.client.ClientParsing.StringConverter.ConversionToString", "qtpy.QtWidgets.QListWidget", "qtpy.QtWidgets.QCheckBox", "hydrus.client.gui.QtPorting.HBoxLayout", "qtpy.QtWidgets.QWidget", "hydrus.client.gui.widgets.ClientGUICommon.WrapInGrid", "hydrus.client.gui.lists.ClientGUIListCtrl.BetterListCtr...
[((905, 919), 'qtpy.QtCore.Signal', 'QC.Signal', (['str'], {}), '(str)\n', (914, 919), True, 'from qtpy import QtCore as QC\n'), ((1039, 1072), 'qtpy.QtWidgets.QWidget.__init__', 'QW.QWidget.__init__', (['self', 'parent'], {}), '(self, parent)\n', (1058, 1072), True, 'from qtpy import QtWidgets as QW\n'), ((1169, 1189)...
import numpy as np import quaternion def from_tqs_to_matrix(translation, quater, scale): """ (T(3), Q(4), S(3)) -> 4x4 Matrix :param translation: 3 dim translation vector (np.array or list) :param quater: 4 dim rotation quaternion (np.array or list) :param scale: 3 dim scale vector (np.array or li...
[ "numpy.eye", "quaternion.as_rotation_matrix", "numpy.diag", "numpy.linalg.inv", "numpy.quaternion" ]
[((379, 436), 'numpy.quaternion', 'np.quaternion', (['quater[0]', 'quater[1]', 'quater[2]', 'quater[3]'], {}), '(quater[0], quater[1], quater[2], quater[3])\n', (392, 436), True, 'import numpy as np\n'), ((445, 454), 'numpy.eye', 'np.eye', (['(4)'], {}), '(4)\n', (451, 454), True, 'import numpy as np\n'), ((491, 500), ...
import click import sys import urllib import os import time from imgurpython import ImgurClient class ImgurProcessor: client = ImgurClient('08e2dfe01d7bf32', '<KEY>') # Log variable for the class IMGUR = click.style('[imgur]', fg='blue') # static variables needed for the __r...
[ "os.path.exists", "os.makedirs", "urllib.urlretrieve", "click.style", "os.getcwd", "os.path.isfile", "click.echo", "sys.exit", "click.progressbar", "imgurpython.ImgurClient" ]
[((133, 172), 'imgurpython.ImgurClient', 'ImgurClient', (['"""08e2dfe01d7bf32"""', '"""<KEY>"""'], {}), "('08e2dfe01d7bf32', '<KEY>')\n", (144, 172), False, 'from imgurpython import ImgurClient\n'), ((244, 277), 'click.style', 'click.style', (['"""[imgur]"""'], {'fg': '"""blue"""'}), "('[imgur]', fg='blue')\n", (255, 2...
#!/usr/bin/env python3 # -*- coding: utf8 -*- """ Parse skill tree names and jp names for monster hunter X. http://monsterhunter.wikia.com/wiki/MHX:_Skill_List Returns list of dict, e.g.: [ { "name": "Testucabra", "name_jp": "...", }, ... ] """ import sys import re import json from collections import de...
[ "sys.exit", "json.dump", "re.compile" ]
[((568, 693), 're.compile', 're.compile', (['"""^<td [^>]*><h[23]><span class="mw-headline" id="[^"]*">(?:<b>)?([^<]*)(?:</b>)?</span></h[23]>([^<]*)"""'], {}), '(\n \'^<td [^>]*><h[23]><span class="mw-headline" id="[^"]*">(?:<b>)?([^<]*)(?:</b>)?</span></h[23]>([^<]*)\'\n )\n', (578, 693), False, 'import re\n'),...
import pygame from pygame.locals import * import random from res import Unit from utils import KeyWrapper, Tick, RGBs from settings import * from core.effect import Effect, Dodge class UnitRole(object): Player = "player" Enemy = "zoobie" Bullet = "bullet" class Stamina(Tick): stock = 1 def __ini...
[ "core.effect.Dodge", "pygame.Rect" ]
[((11603, 11649), 'pygame.Rect', 'pygame.Rect', (['(0, 0)', '(self.width, self.height)'], {}), '((0, 0), (self.width, self.height))\n', (11614, 11649), False, 'import pygame\n'), ((1139, 1147), 'core.effect.Dodge', 'Dodge', (['u'], {}), '(u)\n', (1144, 1147), False, 'from core.effect import Effect, Dodge\n'), ((4379, 4...
from aat import Strategy, Event, Order, Trade, Side, Instrument, InstrumentType class BuyAndHoldIEXStrategy(Strategy): def __init__(self, symbol, *args, **kwargs) -> None: super(BuyAndHoldIEXStrategy, self).__init__(*args, **kwargs) self._symbol = symbol async def onStart(self, event: Event) ...
[ "aat.Order", "sys.exit", "aat.Instrument" ]
[((375, 432), 'aat.Instrument', 'Instrument', ([], {'name': 'self._symbol', 'type': 'InstrumentType.EQUITY'}), '(name=self._symbol, type=InstrumentType.EQUITY)\n', (385, 432), False, 'from aat import Strategy, Event, Order, Trade, Side, Instrument, InstrumentType\n'), ((1795, 1806), 'sys.exit', 'sys.exit', (['(0)'], {}...
import math import json from colormath.color_objects import RGBColor from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from common.models import UserBase, ResultBase from common.utils import save_obj_attr_base64_image, get_content_...
[ "django.contrib.contenttypes.models.ContentType.objects.get_for_id", "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.NullBooleanField", "math.sqrt", "colormath.color_objects.RGBColor", "common.utils.save_obj_attr_base64_image", "common.utils.get_content_tuple", "djan...
[((487, 513), 'common.utils.get_opensurfaces_storage', 'get_opensurfaces_storage', ([], {}), '()\n', (511, 513), False, 'from common.utils import save_obj_attr_base64_image, get_content_tuple, get_opensurfaces_storage\n'), ((604, 649), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)', 'uniq...
from django.test import TestCase from dojo.tools.blackduck_component_risk.parser import BlackduckHubParser from dojo.models import Test from pathlib import Path class TestBlackduckHubCRParser(TestCase): def test_blackduck_enhanced_zip_upload(self): testfile = Path("dojo/unittests/scans/blackduck_component...
[ "dojo.models.Test", "pathlib.Path" ]
[((274, 370), 'pathlib.Path', 'Path', (['"""dojo/unittests/scans/blackduck_component_risk/blackduck_hub_component_risk.zip"""'], {}), "(\n 'dojo/unittests/scans/blackduck_component_risk/blackduck_hub_component_risk.zip'\n )\n", (278, 370), False, 'from pathlib import Path\n'), ((434, 440), 'dojo.models.Test', 'Te...
"""Build hypothesis file by applying post-processing rules to LSTM output Requires LSTM output Produces a hypothesis txt file """ # + import sys # Root folder of main library sys.path.insert(0, 'library') # Root folder of EDF files EDF_ROOT = '/esat/biomeddata/Neureka_challenge/edf/dev/' # Root folder of prediction...
[ "os.join", "sys.path.insert", "pickle.load", "numpy.max", "numpy.array", "spir.merge_events" ]
[((179, 208), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""library"""'], {}), "(0, 'library')\n", (194, 208), False, 'import sys\n'), ((771, 795), 'pickle.load', 'pickle.load', (['filehandler'], {}), '(filehandler)\n', (782, 795), False, 'import pickle\n'), ((1067, 1093), 'spir.merge_events', 'spir.merge_events',...
import os import shutil #フォルダ名指定 dir_name1 = "画像フォルダ" dir_name2 = "音声フォルダ" dir_name3 = "映像フォルダ" dir_name4 = "テキストフォルダ" #整頓するデータの最低数指定 data_number = 3 if(len(os.listdir()) >= data_number): try: data_files = os.listdir() os.mkdir(dir_name1) os.mkdir(dir_name2) os....
[ "os.listdir", "os.mkdir", "shutil.move" ]
[((172, 184), 'os.listdir', 'os.listdir', ([], {}), '()\n', (182, 184), False, 'import os\n'), ((235, 247), 'os.listdir', 'os.listdir', ([], {}), '()\n', (245, 247), False, 'import os\n'), ((259, 278), 'os.mkdir', 'os.mkdir', (['dir_name1'], {}), '(dir_name1)\n', (267, 278), False, 'import os\n'), ((288, 307), 'os.mkdi...
from pyparsing import * from functools import reduce import pyparsing pyparsing.ParserElement.enablePackrat() X, Y = 0, 1 ## TODO: design this out COLORMAP = { 'F.Cu' : '#e18335', 'F.Fab': '#819595', 'F.SilkS': '#e4cc37', 'F.CrtYd': '#8fc93a', 'B.Cu' : '#0072bb', 'B.Fab': '#564d4a', 'B.Si...
[ "functools.reduce", "copy.deepcopy", "pyparsing.ParserElement.enablePackrat" ]
[((71, 110), 'pyparsing.ParserElement.enablePackrat', 'pyparsing.ParserElement.enablePackrat', ([], {}), '()\n', (108, 110), False, 'import pyparsing\n'), ((2568, 2589), 'functools.reduce', 'reduce', (['func', 'parsers'], {}), '(func, parsers)\n', (2574, 2589), False, 'from functools import reduce\n'), ((11756, 11798),...
import gym import numpy as np from gym import error, spaces, utils from gym.utils import seeding from gym import Env from gym.spaces import Discrete, MultiDiscrete, MultiBinary, Box import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt class SYSTEM(): def __init__(self, action_dim, fixed_m...
[ "numpy.ones", "numpy.random.rand", "matplotlib.use", "gym.spaces.Box", "numpy.array", "numpy.zeros", "numpy.matmul", "numpy.linalg.svd" ]
[((201, 222), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (215, 222), False, 'import matplotlib\n'), ((981, 997), 'numpy.random.rand', 'np.random.rand', ([], {}), '()\n', (995, 997), True, 'import numpy as np\n'), ((1764, 1833), 'gym.spaces.Box', 'Box', ([], {'low': '(-1000)', 'high': '(1000)'...
import cctk, argparse, sys parser = argparse.ArgumentParser(prog="submit_from_crest.py") parser.add_argument('-c', '--constraints', nargs='+', type=int, help="Atom numbers to freeze.") parser.add_argument("--prefix", "-p", type=str, help="Prefix for generated files.") parser.add_argument("conformer_file") args = vars...
[ "cctk.XYZFile.read_ensemble", "argparse.ArgumentParser", "cctk.GaussianFile.write_molecule_to_file" ]
[((37, 89), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""submit_from_crest.py"""'}), "(prog='submit_from_crest.py')\n", (60, 89), False, 'import cctk, argparse, sys\n'), ((363, 413), 'cctk.XYZFile.read_ensemble', 'cctk.XYZFile.read_ensemble', (["args['conformer_file']"], {}), "(args['conforme...
""" .. module:: HarmonicKMeans HarmonicKMeans ************* :Description: HarmonicKMeans """ # Author: <NAME> <<EMAIL>> # License: BSD 3 clause import numpy as np from sklearn.base import TransformerMixin, ClusterMixin, BaseEstimator from sklearn.utils import check_random_state class HarmonicKMeans(TransformerM...
[ "sklearn.utils.check_random_state", "numpy.arange", "sklearn.datasets.make_blobs", "numpy.sum", "numpy.dot", "numpy.zeros", "numpy.var" ]
[((5663, 5740), 'sklearn.datasets.make_blobs', 'make_blobs', ([], {'n_samples': '(1200)', 'centers': 'centers', 'cluster_std': '(0.3)', 'random_state': '(42)'}), '(n_samples=1200, centers=centers, cluster_std=0.3, random_state=42)\n', (5673, 5740), False, 'from sklearn.datasets import make_blobs\n'), ((2956, 2993), 'sk...
import numpy as np from sklearn.decomposition import TruncatedSVD def rpca(M,lam): # <NAME> - Oct-2017 # computes rpca separation of M into L and S using the parameter lam # this uses the alternating directions augmented method of multipliers # as described in my blog Nr = M.sh...
[ "numpy.fabs", "numpy.multiply", "numpy.zeros", "numpy.sign", "numpy.linalg.norm", "numpy.linalg.svd" ]
[((544, 567), 'numpy.zeros', 'np.zeros', (['(Nr * Nc, Nt)'], {}), '((Nr * Nc, Nt))\n', (552, 567), True, 'import numpy as np\n'), ((1275, 1285), 'numpy.sign', 'np.sign', (['x'], {}), '(x)\n', (1282, 1285), True, 'import numpy as np\n'), ((1341, 1358), 'numpy.multiply', 'np.multiply', (['a', 'b'], {}), '(a, b)\n', (1352...
# coding: utf-8 """ Classes for accessing simulation data for Sgr-like streams with different mass progenitors. """ from __future__ import division, print_function __author__ = "adrn <<EMAIL>>" # Standard library import os, sys from random import sample # Third-party import numpy as np import numexpr import as...
[ "os.path.exists", "numpy.fabs", "numpy.log10", "numpy.ones", "gary.io.SCFReader", "os.path.join", "numpy.sum", "numpy.array", "numpy.isnan", "numexpr.evaluate" ]
[((1304, 1324), 'gary.io.SCFReader', 'SCFReader', (['self.path'], {}), '(self.path)\n', (1313, 1324), False, 'from gary.io import SCFReader\n'), ((1561, 1570), 'numpy.sum', 'np.sum', (['m'], {}), '(m)\n', (1567, 1570), True, 'import numpy as np\n'), ((4736, 4783), 'numexpr.evaluate', 'numexpr.evaluate', (['"""tub==0"""...
from fragments import select, mutate, fitness_function, crossover, pair_as_parents, decorated, initialize_population from imagefarm import load, save from functools import partial ITERATIONS = 90 POPULATION_SIZE = 9 MUTATION_PROBABILITY = 0.4 OFFSPRINGS = POPULATION_SIZE // 3 SELECTION_PROBABILITY = 0.85 PARE...
[ "fragments.pair_as_parents", "fragments.select", "fragments.initialize_population", "functools.partial", "imagefarm.load" ]
[((357, 363), 'imagefarm.load', 'load', ([], {}), '()\n', (361, 363), False, 'from imagefarm import load, save\n'), ((378, 424), 'fragments.initialize_population', 'initialize_population', (['images', 'POPULATION_SIZE'], {}), '(images, POPULATION_SIZE)\n', (399, 424), False, 'from fragments import select, mutate, fitne...
"""empty message Revision ID: ed0<PASSWORD>38 Revises: <PASSWORD> Create Date: 2021-10-04 17:16:26.748838 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<PASSWORD>' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def upgrade(): # ###...
[ "sqlalchemy.Boolean", "alembic.op.f", "alembic.op.drop_column" ]
[((740, 772), 'alembic.op.drop_column', 'op.drop_column', (['"""User"""', '"""active"""'], {}), "('User', 'active')\n", (754, 772), False, 'from alembic import op\n'), ((497, 519), 'alembic.op.f', 'op.f', (['"""ix_User_active"""'], {}), "('ix_User_active')\n", (501, 519), False, 'from alembic import op\n'), ((693, 715)...
""" Base view classes for all registration workflows. """ from django.conf import settings from django.shortcuts import redirect from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from . import signals from .exceptions import ActivationError from .forms import Registrat...
[ "django.shortcuts.redirect" ]
[((825, 854), 'django.shortcuts.redirect', 'redirect', (['self.disallowed_url'], {}), '(self.disallowed_url)\n', (833, 854), False, 'from django.shortcuts import redirect\n'), ((1431, 1460), 'django.shortcuts.redirect', 'redirect', (['to', '*args'], {}), '(to, *args, **kwargs)\n', (1439, 1460), False, 'from django.shor...
from setuptools import setup, find_packages setup( name='lib', packages=find_packages(), version='0.1.0', description='Tools for analysis of Chen lab calcium data', author='<NAME>', license='MIT', )
[ "setuptools.find_packages" ]
[((81, 96), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (94, 96), False, 'from setuptools import setup, find_packages\n')]
import torch from numpy.testing import assert_almost_equal import numpy from allennlp.common import Params from allennlp.common.testing.test_case import AllenNlpTestCase from allennlp.modules.matrix_attention import CosineMatrixAttention from allennlp.modules.matrix_attention.matrix_attention import MatrixAttention ...
[ "numpy.array", "allennlp.common.Params", "torch.FloatTensor", "allennlp.modules.matrix_attention.CosineMatrixAttention" ]
[((462, 488), 'allennlp.common.Params', 'Params', (["{'type': 'cosine'}"], {}), "({'type': 'cosine'})\n", (468, 488), False, 'from allennlp.common import Params\n'), ((824, 847), 'allennlp.modules.matrix_attention.CosineMatrixAttention', 'CosineMatrixAttention', ([], {}), '()\n', (845, 847), False, 'from allennlp.modul...
import threading import cv2 import numpy as np from utils.misc import color_filter, kill_thread from screen import Screen from item import ItemFinder from config import Config from template_finder import TemplateFinder class GraphicDebuggerController: """ This class takes care of handling the graphic debugge...
[ "screen.Screen", "item.ItemFinder", "cv2.setWindowProperty", "template_finder.TemplateFinder", "config.Config", "utils.misc.color_filter", "cv2.imshow", "cv2.putText", "numpy.zeros", "cv2.circle", "cv2.bitwise_or", "threading.Thread", "cv2.resize", "cv2.waitKey", "utils.misc.kill_thread"...
[((872, 895), 'item.ItemFinder', 'ItemFinder', (['self.config'], {}), '(self.config)\n', (882, 895), False, 'from item import ItemFinder\n'), ((918, 956), 'screen.Screen', 'Screen', (["self.config.general['monitor']"], {}), "(self.config.general['monitor'])\n", (924, 956), False, 'from screen import Screen\n'), ((988, ...
#!/usr/bin/env python ########################################################################### ## ## The class to handle P3D simulation data in python. An object is created ## that has the run parameters attached with it. The basic usage of the ## class can be done in the following ways. ## ## Example 1: ## > fro...
[ "TurbAn.Analysis.Simulations.pgrad", "os.path.exists", "numpy.fromfile", "numpy.sqrt", "numpy.reshape", "TurbAn.Analysis.Simulations.pcurl", "numpy.size", "os.path.realpath", "numpy.linspace", "TurbAn.Analysis.Simulations.pdiv", "numpy.loadtxt", "subprocess.getstatusoutput" ]
[((1982, 2004), 'os.path.realpath', 'realpath', (['shelldirname'], {}), '(shelldirname)\n', (1990, 2004), False, 'from os.path import basename, realpath, exists\n'), ((2744, 2790), 'os.path.exists', 'exists', (["(self.rundir + '/param_' + self.dirname)"], {}), "(self.rundir + '/param_' + self.dirname)\n", (2750, 2790),...
#!/usr/bin/python3 ''' ======== botogram ======== botogram is a Python framework, which allows you to focus just on creating your `Telegram bots`_, without worrying about the underlying Bots API. While most of the libraries for Telegram out there just wrap the Bots API, botogram focuses heavily on the development exp...
[ "setuptools.setup" ]
[((925, 1663), 'setuptools.setup', 'setuptools.setup', ([], {'name': '"""botogram"""', 'version': '"""0.5"""', 'url': '"""https://botogram.pietroalbini.org"""', 'license': '"""MIT"""', 'author': '"""The botogram authors"""', 'description': '"""A Python framework for Telegram bots"""', 'long_description': '__doc__', 'pa...
import random import time time.sleep(random.randint(0, 10))
[ "random.randint" ]
[((38, 59), 'random.randint', 'random.randint', (['(0)', '(10)'], {}), '(0, 10)\n', (52, 59), False, 'import random\n')]
from forge.blade import lib class Recipe: def __init__(self, *args, amtMade=1): self.amtMade = amtMade self.blueprint = lib.MultiSet() for i in range(0, len(args), 2): inp = args[i] amt = args[i+1] self.blueprint.add(inp, amt)
[ "forge.blade.lib.MultiSet" ]
[((137, 151), 'forge.blade.lib.MultiSet', 'lib.MultiSet', ([], {}), '()\n', (149, 151), False, 'from forge.blade import lib\n')]
#!/usr/bin/python -Wall # ================================================================ # <NAME> # <EMAIL> # 2008-02-06 # # Pseudorandom scalar-complex routines layered on top of Python's (real) # random module. # ================================================================ from __future__ import division # 1/...
[ "math.cos", "random.uniform", "math.sin", "random.gauss" ]
[((480, 514), 'random.uniform', 'random.uniform', (['(0.0)', '(2.0 * math.pi)'], {}), '(0.0, 2.0 * math.pi)\n', (494, 514), False, 'import random\n'), ((702, 722), 'random.gauss', 'random.gauss', (['(0.0)', 's'], {}), '(0.0, s)\n', (714, 722), False, 'import random\n'), ((729, 749), 'random.gauss', 'random.gauss', (['(...
import os from unittest.mock import MagicMock import pytest from razemax.drivers import SQSDriver from razemax.exceptions import DriverError class TestSQSDriver: def test_not_message(self): queue = MagicMock() queue.receive_messages.return_value = None result = SQSDriver(queue).receive_...
[ "razemax.drivers.SQSDriver", "unittest.mock.MagicMock", "os.path.join", "pytest.raises", "os.path.abspath", "razemax.drivers.SQSDriver._process_message" ]
[((214, 225), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (223, 225), False, 'from unittest.mock import MagicMock\n'), ((555, 566), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (564, 566), False, 'from unittest.mock import MagicMock\n'), ((630, 669), 'razemax.drivers.SQSDriver._process_messag...
## imports import os import sys import numpy as np import cv2 import logging import imutils from matplotlib import pyplot as plt from pathlib import Path from pylab import array, plot, show, axis, arange, figure, uint8 # setup logger logger = logging.getLogger(__name__) # https://www.pyimagesearch.com/2014/08/25/...
[ "logging.getLogger", "numpy.sqrt", "pylab.array", "numpy.array", "cv2.warpPerspective", "cv2.threshold", "cv2.erode", "numpy.diff", "cv2.contourArea", "cv2.minAreaRect", "numpy.argmin", "cv2.boxPoints", "cv2.getPerspectiveTransform", "numpy.argmax", "cv2.cvtColor", "cv2.resize", "cv2...
[((247, 274), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (264, 274), False, 'import logging\n'), ((666, 699), 'numpy.zeros', 'np.zeros', (['(4, 2)'], {'dtype': '"""float32"""'}), "((4, 2), dtype='float32')\n", (674, 699), True, 'import numpy as np\n'), ((1097, 1117), 'numpy.diff', 'np...
import torch.nn as nn import torch from ..builder import LOSSES import numpy as np from .utils import weighted_loss import torch.nn.functional as F from mmdet.core import bbox_overlaps def _gaussian_dist_pdf(val, mean, var): return torch.exp(- (val - mean) ** 2.0 / var / 2.0) / torch.sqrt(2.0 * np.pi * var) # @we...
[ "torch.sqrt", "torch.sum", "torch.exp", "torch.device" ]
[((911, 931), 'torch.device', 'torch.device', (['"""cuda"""'], {}), "('cuda')\n", (923, 931), False, 'import torch\n'), ((3064, 3086), 'torch.sum', 'torch.sum', (['loss'], {'dim': '(1)'}), '(loss, dim=1)\n', (3073, 3086), False, 'import torch\n'), ((238, 281), 'torch.exp', 'torch.exp', (['(-(val - mean) ** 2.0 / var / ...
# -*- coding: utf-8 -*- """ setup: usage: pip install -e .[graphs] """ from __future__ import absolute_import from setuptools import setup, find_packages import io # needed to have `open` with encoding option # read the contents of your README file from os import path this_directory = path.abspath(path.dirname(__fi...
[ "os.path.dirname", "setuptools.find_packages", "os.path.join" ]
[((303, 325), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (315, 325), False, 'from os import path\n'), ((340, 378), 'os.path.join', 'path.join', (['this_directory', '"""README.md"""'], {}), "(this_directory, 'README.md')\n", (349, 378), False, 'from os import path\n'), ((1678, 1711), 'setupto...
"""Manages setting the plant species, as the needed amount of water differs based on the plant.""" from flask import ( Blueprint, request, jsonify ) from http_routes.auth import login_required from db import get_db import time bp = Blueprint('characteristics', __name__, url_prefix='/characteristics') @bp.route(...
[ "db.get_db", "flask.request.get_json", "flask.Blueprint", "time.time", "flask.jsonify" ]
[((238, 307), 'flask.Blueprint', 'Blueprint', (['"""characteristics"""', '__name__'], {'url_prefix': '"""/characteristics"""'}), "('characteristics', __name__, url_prefix='/characteristics')\n", (247, 307), False, 'from flask import Blueprint, request, jsonify\n'), ((1060, 1078), 'flask.request.get_json', 'request.get_...
from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .models import (PollBase, PollChoiceBase, PollChoiceModelMixin, PollModelMixin) @receiver(post_save) def create_poll_choice(sender, instance, create...
[ "django.dispatch.receiver", "django.contrib.contenttypes.models.ContentType.objects.get_for_model" ]
[((253, 272), 'django.dispatch.receiver', 'receiver', (['post_save'], {}), '(post_save)\n', (261, 272), False, 'from django.dispatch import receiver\n'), ((671, 690), 'django.dispatch.receiver', 'receiver', (['post_save'], {}), '(post_save)\n', (679, 690), False, 'from django.dispatch import receiver\n'), ((462, 503), ...
import tkinter as tk from PIL import ImageTk, Image from os import listdir import cv2 import numpy as np root=tk.Tk() root.title("DataX: Team OST, Plastic Part Matching") #Init database path=r"C:\Users\tobias.grab\IWK_data\test" files=listdir(path) nrOfFiles=len(files) bf = cv2.BFMatcher() fast=1 i...
[ "cv2.BFMatcher", "cv2.AKAZE_create", "tkinter.Canvas", "tkinter.Label", "numpy.load", "os.listdir", "cv2.drawMatchesKnn", "cv2.xfeatures2d.SURF_create", "tkinter.filedialog.askopenfilename", "numpy.squeeze", "cv2.imread", "tkinter.IntVar", "PIL.Image.fromarray", "cv2.KAZE_create", "cv2.d...
[((119, 126), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (124, 126), True, 'import tkinter as tk\n'), ((250, 263), 'os.listdir', 'listdir', (['path'], {}), '(path)\n', (257, 263), False, 'from os import listdir\n'), ((294, 309), 'cv2.BFMatcher', 'cv2.BFMatcher', ([], {}), '()\n', (307, 309), False, 'import cv2\n'), ((578...
import pytest @pytest.fixture(scope="session") def sample_srt(): return """1 00:00:09,209 --> 00:00:12,312 ( clock ticking ) 2 00:00:14,848 --> 00:00:17,000 MAN: When we think \u266a ...say bow, wow, \u266a 3 00:00:17,000 --> 00:00:18,752 we have this vision of Einstein 4 00:00:18,752 --> 00:00:20,887 as an ol...
[ "pytest.fixture" ]
[((17, 48), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (31, 48), False, 'import pytest\n'), ((580, 611), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (594, 611), False, 'import pytest\n'), ((1193, 1224), 'pytest.fixture', ...
import sqlite3 from flask import g def get_db(): if "db" not in g: g.db = sqlite3.connect("recipes.db", detect_types=sqlite3.PARSE_DECLTYPES) g.db.row_factory = sqlite3.Row return g.db def close_db(e=None): db = g.pop("db", None) if db is not None: db.close() def add_...
[ "sqlite3.connect", "flask.g.pop" ]
[((245, 262), 'flask.g.pop', 'g.pop', (['"""db"""', 'None'], {}), "('db', None)\n", (250, 262), False, 'from flask import g\n'), ((88, 155), 'sqlite3.connect', 'sqlite3.connect', (['"""recipes.db"""'], {'detect_types': 'sqlite3.PARSE_DECLTYPES'}), "('recipes.db', detect_types=sqlite3.PARSE_DECLTYPES)\n", (103, 155), Fa...
""" Generic utilities file. """ from datetime import datetime, timedelta, timezone from functools import reduce # https://stackoverflow.com/questions/16739290 def splat(f): """pre-splat an argument into a function and return the new lambda""" return lambda x: f(*x) def compose2(f, g): return lambda *a...
[ "functools.reduce", "datetime.datetime.now", "datetime.timedelta", "datetime.datetime.strptime" ]
[((374, 394), 'functools.reduce', 'reduce', (['compose2', 'fs'], {}), '(compose2, fs)\n', (380, 394), False, 'from functools import reduce\n'), ((869, 907), 'datetime.datetime.strptime', 'datetime.strptime', (['datestr', '"""%Y-%m-%d"""'], {}), "(datestr, '%Y-%m-%d')\n", (886, 907), False, 'from datetime import datetim...
import os from subprocess import Popen, PIPE import Bcfg2.Server.Plugin # for debugging output only import logging logger = logging.getLogger('Bcfg2.Plugins.Fossil') class Fossil(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.Version): """Fossil is a version plugin for dealing with Bcfg2 repos.""" ...
[ "logging.getLogger", "subprocess.Popen", "os.path.isdir", "os.path.isfile" ]
[((125, 166), 'logging.getLogger', 'logging.getLogger', (['"""Bcfg2.Plugins.Fossil"""'], {}), "('Bcfg2.Plugins.Fossil')\n", (142, 166), False, 'import logging\n'), ((706, 733), 'os.path.isfile', 'os.path.isfile', (['fossil_file'], {}), '(fossil_file)\n', (720, 733), False, 'import os\n'), ((795, 819), 'os.path.isdir', ...
# =============================================================== # Author: <NAME> # Email: <EMAIL> # Twitter: @FerroRodolfo # # ABOUT COPYING OR USING PARTIAL INFORMATION: # This script was originally created by <NAME>, for his # talk in FLISoL 2017 at Instituto Tecnológico de León. Any # explicit usage of this script...
[ "matplotlib.pyplot.figtext", "matplotlib.pyplot.imread", "matplotlib.pyplot.subplots", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.show" ]
[((717, 745), 'matplotlib.pyplot.imread', 'plt.imread', (['"""../imgs/me.png"""'], {}), "('../imgs/me.png')\n", (727, 745), True, 'import matplotlib.pyplot as plt\n'), ((753, 783), 'matplotlib.pyplot.imread', 'plt.imread', (['"""../imgs/pug.jpeg"""'], {}), "('../imgs/pug.jpeg')\n", (763, 783), True, 'import matplotlib....
"""Actor definitions for the image cutout service. There are two types of actors defined here: actors that perform cutouts, and three actors (``job_started``, ``job_completed``, and ``job_failed``) that are simple wrappers around UWS defined here so that they can be aware of the broker used for the image cutout servic...
[ "dramatiq.actor", "structlog.get_logger" ]
[((2051, 2121), 'dramatiq.actor', 'dramatiq.actor', ([], {'queue_name': '"""cutout"""', 'max_retries': '(1)', 'store_results': '(True)'}), "(queue_name='cutout', max_retries=1, store_results=True)\n", (2065, 2121), False, 'import dramatiq\n'), ((3781, 3825), 'dramatiq.actor', 'dramatiq.actor', ([], {'queue_name': '"""u...
import sys import unittest from contextlib import contextmanager import antsy def print_demo(): print('All tests finished, printing manual verification page...\n') # Some manual formatting tests print(antsy.decorate('Some text and then (bold bold text and then (fg/red bold red text) now bold) and normal')) print...
[ "unittest.main", "sys.stdout.write", "antsy.decorate" ]
[((3230, 3255), 'unittest.main', 'unittest.main', ([], {'exit': '(False)'}), '(exit=False)\n', (3243, 3255), False, 'import unittest\n'), ((207, 322), 'antsy.decorate', 'antsy.decorate', (['"""Some text and then (bold bold text and then (fg/red bold red text) now bold) and normal"""'], {}), "(\n 'Some text and then ...
"""The isDatabase property was removed for links, so need to remove them from maps Revision ID: d509d9c60fdb Revises: <PASSWORD> Create Date: 2021-07-22 21:04:14.956129 """ import hashlib import json from alembic import context from alembic import op import sqlalchemy as sa from os import path from sqlalchemy.sql im...
[ "sqlalchemy.sql.and_", "alembic.context.get_x_argument", "alembic.op.get_bind", "json.loads", "hashlib.sha256", "sqlalchemy.orm.session.Session", "json.dumps", "os.path.join", "sqlalchemy.sql.column", "os.path.dirname", "migrations.utils.window_chunk", "sqlalchemy.select", "json.load" ]
[((746, 815), 'os.path.join', 'path.join', (['directory', '"""../.."""', '"""neo4japp/schemas/formats/map_v2.json"""'], {}), "(directory, '../..', 'neo4japp/schemas/formats/map_v2.json')\n", (755, 815), False, 'from os import path\n'), ((708, 730), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', ...
# Copyright 2020 Canonical 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, s...
[ "actions.service.check_service_is_present", "mock.patch", "actions.service.execute_action", "actions.service.systemctl_execute.assert_called_with", "actions.service.osd_ids_to_service_names", "mock.patch.object", "mock.call", "actions.service.main", "actions.service.systemctl_execute" ]
[((4897, 4944), 'mock.patch.object', 'mock.patch.object', (['service', '"""systemctl_execute"""'], {}), "(service, 'systemctl_execute')\n", (4914, 4944), False, 'import mock\n'), ((5427, 5471), 'mock.patch.object', 'mock.patch.object', (['service', '"""execute_action"""'], {}), "(service, 'execute_action')\n", (5444, 5...
import pytest from uurl.host import Host from uurl.path import Path, UrlPath from uurl.protocol import HttpProtocol, Protocol from uurl.url import Address, Url _host: str = '9.9.9.9' _path: str = '/api/path' pytestmark = pytest.mark.unit @pytest.fixture(scope='module') def host() -> Host: yield Host('example.co...
[ "uurl.url.Url", "uurl.path.UrlPath", "uurl.host.Host", "uurl.protocol.HttpProtocol", "pytest.fixture" ]
[((243, 273), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (257, 273), False, 'import pytest\n'), ((327, 357), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (341, 357), False, 'import pytest\n'), ((419, 449), 'pytest.fixture', 'p...
"""Scalene: a scripting-language aware profiler for Python. https://github.com/plasma-umass/scalene See the paper "docs/scalene-paper.pdf" in this repository for technical details on an earlier version of Scalene's design; note that a number of these details have changed. by <NAME> https://em...
[ "scalene.get_line_atomic.get_line_atomic", "sys.path.insert", "inspect.getsourcelines", "dis.get_instructions", "time.sleep", "signal.siginterrupt", "scalene.scalene_preload.ScalenePreload.setup_preload", "threading.main_thread", "sys.exit", "time.process_time", "sys._current_frames", "scalene...
[((2314, 2331), 'collections.defaultdict', 'defaultdict', (['bool'], {}), '(bool)\n', (2325, 2331), False, 'from collections import defaultdict\n'), ((2420, 2444), 'collections.defaultdict', 'defaultdict', (['(lambda : {})'], {}), '(lambda : {})\n', (2431, 2444), False, 'from collections import defaultdict\n'), ((3106,...
import numpy as np import os from skimage import io path = r'/data1/zyli/benchmark/Set5/LR_bicubic/X4/' img_path = sorted([os.path.join(path, name) for name in os.listdir(path) if name.endswith('.png')])###这里的'.tif'可以换成任意的文件后缀 for i in range(len(img_path)): img_name = img_path[i] print(img_name) name = im...
[ "os.rename", "os.listdir", "os.path.join" ]
[((400, 431), 'os.rename', 'os.rename', (['img_name', '(name + ext)'], {}), '(img_name, name + ext)\n', (409, 431), False, 'import os\n'), ((125, 149), 'os.path.join', 'os.path.join', (['path', 'name'], {}), '(path, name)\n', (137, 149), False, 'import os\n'), ((162, 178), 'os.listdir', 'os.listdir', (['path'], {}), '(...
from Strategy import * from Validation import * from Observer import Observer from Logger import Logger from Event import Event import random def findLeftAndRightBorders(): while True: print("Введіть ліву та праву межі генерування.") a = intInput("Ліва: ") b = intInput("Права: ") if...
[ "random.randint", "Event.Event", "Observer.Observer" ]
[((1333, 1343), 'Observer.Observer', 'Observer', ([], {}), '()\n', (1341, 1343), False, 'from Observer import Observer\n'), ((1488, 1495), 'Event.Event', 'Event', ([], {}), '()\n', (1493, 1495), False, 'from Event import Event\n'), ((508, 528), 'random.randint', 'random.randint', (['a', 'b'], {}), '(a, b)\n', (522, 528...
import sys import bench_fio as bench import plot_fio as plot import phoronix_bench as fsmark FS = ["/mnt/teama-btrfs/", "/mnt/teama-ext4/"] BS = ["128k","256k","512k"] DIR_IO = ["1","0"] def reproduce(): data = [] #BASIC TASK : plotting different blocksizes with both FS and DirectIO / CachedIO for filesy...
[ "plot_fio.execute", "phoronix_bench.execute_env" ]
[((1237, 1272), 'plot_fio.execute', 'plot.execute', (['data', '"""blocksize.png"""'], {}), "(data, 'blocksize.png')\n", (1249, 1272), True, 'import plot_fio as plot\n'), ((1324, 1346), 'phoronix_bench.execute_env', 'fsmark.execute_env', (['FS'], {}), '(FS)\n', (1342, 1346), True, 'import phoronix_bench as fsmark\n')]
############################################################## # The bodyPartsDetection python module is the one which apply # wished body parts detection to images and webcam frames ############################################################## import cv2 # Specified class to apply body parts detections class bodyPa...
[ "cv2.rectangle", "cv2.CascadeClassifier", "cv2.cvtColor" ]
[((495, 583), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (["(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')"], {}), "(cv2.data.haarcascades +\n 'haarcascade_frontalface_default.xml')\n", (516, 583), False, 'import cv2\n'), ((605, 675), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (["(cv2....
import argparse from API_Dependents import get_token_key, get_test_data from DependentFinder import DependentFinder import csv import time import pandas as pd import os time_str_file = time.strftime("%m-%d-%Y_%H-%M-%S") def read_csv(filename): with open(filename, newline='') as csvfile: reader = csv.read...
[ "os.path.exists", "pandas.json_normalize", "argparse.ArgumentParser", "os.makedirs", "DependentFinder.DependentFinder", "time.strftime", "time.sleep", "API_Dependents.get_token_key", "csv.reader" ]
[((186, 220), 'time.strftime', 'time.strftime', (['"""%m-%d-%Y_%H-%M-%S"""'], {}), "('%m-%d-%Y_%H-%M-%S')\n", (199, 220), False, 'import time\n'), ((939, 1024), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Find direct dependents using Web Scraping"""'}), "(description='Find direct depe...
# The experiment logic and analysis import copy import gym import json import matplotlib import multiprocessing as mp import warnings import numpy as np import platform import pandas as pd import traceback from keras import backend as K from os import path, environ from rl.util import * from rl.agent import * from rl.m...
[ "multiprocessing.cpu_count", "copy.copy", "gym.make", "numpy.divide", "numpy.mean", "pandas.DataFrame.from_dict", "numpy.max", "platform.system", "keras.backend.clear_session", "traceback.print_exc", "keras.backend.set_session", "os.path.dirname", "numpy.transpose", "warnings.filterwarning...
[((684, 706), 'numpy.seterr', 'np.seterr', ([], {'all': '"""raise"""'}), "(all='raise')\n", (693, 706), True, 'import numpy as np\n'), ((707, 761), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'module': '"""matplotlib"""'}), "('ignore', module='matplotlib')\n", (730, 761), False, 'import wa...
from django.db import models from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse class Gallery(models.Model): title_PT = models.CharField(_('Title PT'), max_length=100, blank=True, null=False) title_EN = models.CharField(_('Title EN'), max_length=100, blank=True, nu...
[ "django.utils.translation.ugettext" ]
[((188, 201), 'django.utils.translation.ugettext', '_', (['"""Title PT"""'], {}), "('Title PT')\n", (189, 201), True, 'from django.utils.translation import ugettext as _\n'), ((275, 288), 'django.utils.translation.ugettext', '_', (['"""Title EN"""'], {}), "('Title EN')\n", (276, 288), True, 'from django.utils.translati...
import pandas as pd from datetime import time, timedelta, datetime import numpy as np import geopandas as gp import random from halo import Halo from lps.core import samplers, generators from lps.core.population import Population, Agent, Plan, Activity, Leg times = { (7, 10): 0, (10, 16): 1, (16, 19): 2 }...
[ "lps.core.samplers.sample_point", "pandas.read_csv", "lps.core.samplers.build_journey_time", "lps.core.samplers.get_approx_distance", "lps.core.population.Activity", "numpy.array", "random.choices", "datetime.timedelta", "numpy.arange", "datetime.datetime", "datetime.time", "geopandas.read_fil...
[((1876, 1934), 'pandas.Series', 'pd.Series', (['self.zones.loc[self.zones.london == 1, :].index'], {}), '(self.zones.loc[self.zones.london == 1, :].index)\n', (1885, 1934), True, 'import pandas as pd\n'), ((4806, 4829), 'numpy.array', 'np.array', (['daily_profile'], {}), '(daily_profile)\n', (4814, 4829), True, 'impor...
#! /usr/bin/env python """ Aegean Residual (AeRes) has the following capability: - convert a catalogue into an image model - subtract image model from image - write model and residual files """ __author__ = "<NAME>" import logging import numpy as np from astropy.io import fits from AegeanTools import catalogs, fittin...
[ "numpy.radians", "logging.getLogger", "AegeanTools.fitting.elliptical_gaussian", "numpy.ceil", "numpy.where", "AegeanTools.wcs_helpers.WCSHelper.from_header", "numpy.log", "numpy.floor", "AegeanTools.catalogs.load_table", "numpy.squeeze", "numpy.zeros", "numpy.isfinite", "numpy.cos", "astr...
[((1026, 1055), 'AegeanTools.catalogs.load_table', 'catalogs.load_table', (['filename'], {}), '(filename)\n', (1045, 1055), False, 'from AegeanTools import catalogs, fitting, wcs_helpers\n'), ((1685, 1721), 'AegeanTools.catalogs.table_to_source_list', 'catalogs.table_to_source_list', (['table'], {}), '(table)\n', (1714...
# Copyright 2016, Yahoo Inc. # Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms. """ :term:`configurations` for network execution, and utilities on them. .. seealso:: methods :func:`.plot.active_plotter_plugged()`, :func:`.plot.set_active_plotter()...
[ "contextvars.ContextVar", "functools.partial", "os.environ.get", "multiprocessing.Value" ]
[((999, 1031), 'os.environ.get', 'os.environ.get', (['"""GRAPHTIK_DEBUG"""'], {}), "('GRAPHTIK_DEBUG')\n", (1013, 1031), False, 'import os\n'), ((1336, 1378), 'contextvars.ContextVar', 'ContextVar', (['"""skip_evictions"""'], {'default': 'None'}), "('skip_evictions', default=None)\n", (1346, 1378), False, 'from context...
from __future__ import print_function from google.auth.transport import requests from google.oauth2 import id_token import boto3 def generatePolicy(principalId, userDetails, effect, methodArn): authResponse = {} authResponse['principalId'] = principalId if effect and methodArn: policyDoc...
[ "google.auth.transport.requests.Request" ]
[((1252, 1270), 'google.auth.transport.requests.Request', 'requests.Request', ([], {}), '()\n', (1268, 1270), False, 'from google.auth.transport import requests\n')]
""" Library analysis and manipulation helpers """ from re import match from os.path import realpath from pathlib import Path from functools import lru_cache from e4s_cl.error import InternalError from e4s_cl.logger import get_logger from e4s_cl.cf.version import Version # Symbols imported for ease of use from e4s_cl....
[ "e4s_cl.cf.libraries.libraryset.HostLibrary", "e4s_cl.error.InternalError", "e4s_cl.cf.version.Version", "e4s_cl.cf.libraries.linker.resolve", "pathlib.Path", "re.match", "elftools.elf.elffile.ELFFile", "os.path.realpath", "e4s_cl.logger.get_logger" ]
[((553, 573), 'e4s_cl.logger.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (563, 573), False, 'from e4s_cl.logger import get_logger\n'), ((2477, 2512), 'os.path.realpath', 'realpath', (['shared_object.binary_path'], {}), '(shared_object.binary_path)\n', (2485, 2512), False, 'from os.path import realpat...
import os import sys try: base_directory = os.path.split(sys.executable)[0] os.environ['PATH'] += ';' + base_directory import cntk os.environ['KERAS_BACKEND'] = 'cntk' except ImportError: print('CNTK not installed') import keras import keras.utils import keras.datasets import keras.models import ...
[ "keras.preprocessing.image.ImageDataGenerator", "keras.layers.Dense", "numpy.save", "numpy.load", "numpy.reshape", "matplotlib.pyplot.plot", "os.path.split", "keras.applications.VGG16", "keras.layers.Flatten", "keras.models.Sequential", "os.path.isfile", "matplotlib.pyplot.title", "keras.lay...
[((542, 573), 'os.path.join', 'os.path.join', (['base_dir', '"""train"""'], {}), "(base_dir, 'train')\n", (554, 573), False, 'import os\n'), ((591, 627), 'os.path.join', 'os.path.join', (['base_dir', '"""validation"""'], {}), "(base_dir, 'validation')\n", (603, 627), False, 'import os\n'), ((639, 669), 'os.path.join', ...
"""This module contains functions related to generating and comparing the time order of CRDS file names. Different projects have different naming conventions. """ from __future__ import print_function from __future__ import division from __future__ import absolute_import from crds import python23 import os import ...
[ "crds.client.api.get_file_info_map", "crds.utils.get_locator_module", "os.path.splitext", "re.match", "crds.utils.file_to_locator", "os.path.basename", "crds.config.complete_re", "re.search" ]
[((6583, 6668), 'crds.config.complete_re', 'config.complete_re', (['"""[A-Za-z][A-Za-z0-9]{8}_[A-Za-z0-9]{1,8}\\\\.[A-Za-z0-9]{1,6}"""'], {}), "('[A-Za-z][A-Za-z0-9]{8}_[A-Za-z0-9]{1,8}\\\\.[A-Za-z0-9]{1,6}'\n )\n", (6601, 6668), False, 'from crds import log, utils, config\n'), ((6687, 6764), 'crds.config.complete_r...
#!/usr/bin/env python import logging import os from signal import SIGINT import sys logging.basicConfig(format="[%(asctime)s] %(message)s") log = logging.getLogger() log.setLevel(logging.DEBUG) command = sys.argv[1] if command is None: log.error("No command provided.") sys.exit(1) log.info("Starting command...
[ "logging.basicConfig", "os.system", "logging.getLogger", "sys.exit" ]
[((85, 140), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""[%(asctime)s] %(message)s"""'}), "(format='[%(asctime)s] %(message)s')\n", (104, 140), False, 'import logging\n'), ((147, 166), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (164, 166), False, 'import logging\n'), ((281, 292), ...
""" Copyright 2019 Samsung SDS 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 ...
[ "os.path.abspath", "brightics.function.transform.random_sampling", "brightics.common.datasets.load_iris", "HtmlTestRunner.HTMLTestRunner" ]
[((904, 915), 'brightics.common.datasets.load_iris', 'load_iris', ([], {}), '()\n', (913, 915), False, 'from brightics.common.datasets import load_iris\n'), ((1214, 1225), 'brightics.common.datasets.load_iris', 'load_iris', ([], {}), '()\n', (1223, 1225), False, 'from brightics.common.datasets import load_iris\n'), ((1...
"""loading training, validation and test data This script is to load training, validation and test data """ import numpy as np import os import dicom from geometry_parameters import GEOMETRY, RECONSTRUCT_PARA from geometry_parameters import TRAIN_INDEX, VALID_INDEX, TEST_INDEX from geometry_parameters import NUM_TRA...
[ "numpy.round", "os.listdir", "numpy.load", "dicom.read_file" ]
[((1091, 1116), 'numpy.load', 'np.load', (['train_label_file'], {}), '(train_label_file)\n', (1098, 1116), True, 'import numpy as np\n'), ((1931, 1956), 'numpy.load', 'np.load', (['valid_label_file'], {}), '(valid_label_file)\n', (1938, 1956), True, 'import numpy as np\n'), ((2717, 2741), 'numpy.load', 'np.load', (['te...
import node import graphviz dot = graphviz.Graph(format="png") def create_gv(root: node.Node): if not root: return # print(root.token) label = '' if root.token == '+' \ or root.token == '-' \ or root.token == '*' \ or root.token == '/' \ or root.token == '(...
[ "graphviz.Graph" ]
[((38, 66), 'graphviz.Graph', 'graphviz.Graph', ([], {'format': '"""png"""'}), "(format='png')\n", (52, 66), False, 'import graphviz\n')]
# typelib <unable to determine filename> _lcid = 0 # change this if required from ctypes import * WSTRING = c_wchar_p from comtypes import IUnknown LONG_PTR = c_int from comtypes import GUID from comtypes import IUnknown from ctypes import HRESULT from comtypes import helpstring from comtypes import COMMETHOD...
[ "comtypes.GUID", "comtypes.COMMETHOD" ]
[((3770, 3816), 'comtypes.GUID', 'GUID', (['"""{00000104-0000-0000-C000-000000000046}"""'], {}), "('{00000104-0000-0000-C000-000000000046}')\n", (3774, 3816), False, 'from comtypes import GUID\n'), ((4118, 4175), 'comtypes.COMMETHOD', 'COMMETHOD', (['[]', 'HRESULT', '"""Skip"""', "(['in'], c_ulong, 'celt')"], {}), "([]...
import json import os import core.util as util def cache_key_exists(file, key): handler = open(file, "rb") buf = handler.read(1024) data = json.loads(buf) handler.close() try: data["data"][key] except KeyError as e: return False return True def put_cache_file(file, key...
[ "json.loads", "core.util.get_currency_cache_file", "core.util.get_auth_cache_file", "json.dumps", "core.util.get_data_cache_file" ]
[((153, 168), 'json.loads', 'json.loads', (['buf'], {}), '(buf)\n', (163, 168), False, 'import json\n'), ((451, 466), 'json.loads', 'json.loads', (['buf'], {}), '(buf)\n', (461, 466), False, 'import json\n'), ((754, 769), 'json.loads', 'json.loads', (['buf'], {}), '(buf)\n', (764, 769), False, 'import json\n'), ((988, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 21 15:06:43 2018 @author: Michelle """ # -*- coding: utf-8 -*- """ Updated on Wed May 23 10:58:10 2018 - adjusted the orientation of the image to column major - set origin to bottom left - switched stepx and stepy in grid so the real and imaginary...
[ "matplotlib.pyplot.imshow", "numpy.multiply", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.suptitle", "numpy.arange", "matplotlib.pyplot.show" ]
[((1418, 1452), 'numpy.arange', 'np.arange', (['(1)', '(steps * steps + 1)', '(1)'], {}), '(1, steps * steps + 1, 1)\n', (1427, 1452), True, 'import numpy as np\n'), ((2379, 2409), 'matplotlib.pyplot.suptitle', 'plt.suptitle', (['"""Mandelbrot Set"""'], {}), "('Mandelbrot Set')\n", (2391, 2409), True, 'import matplotli...
from PIL import Image, ImageDraw import operator, math def create_location_image(drop_location_x, drop_location_y, result_path, floor): floor_map = Image.open( './frontend/img/' + floor + 'th.jpg' ).convert('RGBA') floor_map_copy = floor_map.copy() pin_size_ratio = 0.035 pin_size = (pin_size_ratio * f...
[ "PIL.Image.open" ]
[((572, 608), 'PIL.Image.open', 'Image.open', (['"""./frontend/img/pin.png"""'], {}), "('./frontend/img/pin.png')\n", (582, 608), False, 'from PIL import Image, ImageDraw\n'), ((153, 201), 'PIL.Image.open', 'Image.open', (["('./frontend/img/' + floor + 'th.jpg')"], {}), "('./frontend/img/' + floor + 'th.jpg')\n", (163,...
from __future__ import annotations import pickle import numpy as np from lightgbm import LGBMRegressor from sklearn.ensemble import RandomForestRegressor from sklearn.linear_model import ( ElasticNet, HuberRegressor, Lasso, LinearRegression, MultiTaskElasticNet, MultiTaskLasso, ) from sklearn....
[ "numpy.clip", "sklearn.neural_network.MLPRegressor", "sklearn.ensemble.RandomForestRegressor", "pickle.dump", "sklearn.tree.DecisionTreeRegressor", "sklearn.linear_model.Lasso", "sklearn.linear_model.ElasticNet", "sklearn.linear_model.MultiTaskLasso", "numpy.log", "sklearn.multioutput.MultiOutputR...
[((1208, 1266), 'sklearn.tree.DecisionTreeRegressor', 'DecisionTreeRegressor', ([], {'max_depth': "config['dt']['max_depth']"}), "(max_depth=config['dt']['max_depth'])\n", (1229, 1266), False, 'from sklearn.tree import DecisionTreeRegressor\n'), ((1287, 1318), 'sklearn.multioutput.MultiOutputRegressor', 'MultiOutputReg...
from laxleague.guardian import Guardian def test_construction(): assert Guardian()
[ "laxleague.guardian.Guardian" ]
[((78, 88), 'laxleague.guardian.Guardian', 'Guardian', ([], {}), '()\n', (86, 88), False, 'from laxleague.guardian import Guardian\n')]
from setuptools import setup import numpy setup(name='gdalutils', version='0.1', description='GDAL utils', url='http://github.com/fathom-global/gdalutils', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=['gdalutils'], zip_safe=False, )
[ "setuptools.setup" ]
[((43, 266), 'setuptools.setup', 'setup', ([], {'name': '"""gdalutils"""', 'version': '"""0.1"""', 'description': '"""GDAL utils"""', 'url': '"""http://github.com/fathom-global/gdalutils"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'packages': "['gdalutils']", 'zip_safe': '(Fa...
import os, json, ctypes, base64, requests ctypes.windll.kernel32.SetConsoleTitleW('OSelab') answers = requests.get('https://api.myjson.com/bins/KEY').json() session = requests.Session() api = 'https://care.srmist.edu.in/srmos/api/' data = {"username": input('Username: '), "password": input('Password: ')} header...
[ "requests.Session", "json.dumps", "base64.b64decode", "requests.get", "os.path.isdir", "ctypes.windll.kernel32.SetConsoleTitleW", "requests.put", "os.mkdir" ]
[((43, 92), 'ctypes.windll.kernel32.SetConsoleTitleW', 'ctypes.windll.kernel32.SetConsoleTitleW', (['"""OSelab"""'], {}), "('OSelab')\n", (82, 92), False, 'import os, json, ctypes, base64, requests\n'), ((172, 190), 'requests.Session', 'requests.Session', ([], {}), '()\n', (188, 190), False, 'import os, json, ctypes, b...
from setuptools import setup setup( name='sentence_splitter_for_russian', version='0.1', description='俄语系分句器', packages=['sentence_splitter_for_russian'] )
[ "setuptools.setup" ]
[((30, 159), 'setuptools.setup', 'setup', ([], {'name': '"""sentence_splitter_for_russian"""', 'version': '"""0.1"""', 'description': '"""俄语系分句器"""', 'packages': "['sentence_splitter_for_russian']"}), "(name='sentence_splitter_for_russian', version='0.1', description=\n '俄语系分句器', packages=['sentence_splitter_for_rus...
#! /usr/bin/env python3 # """Solve Finite difference solution of Keller-Segel PDE system Reference: http://hdl.handle.net/10012/15480 The reference is my PhD thesis. It describes the mathematical problem and also describes results from a DG finite element solution. That code for the DG solution is in repository KSDG ...
[ "KSFD.SolutionParameters", "sys.excepthook", "KSFD.ksfddebug.log", "KSFD.random_function", "sys.exc_info", "argparse.Namespace", "sys.exit", "dill.dumps", "KSFD.Derivatives", "KSFD.KSFDException", "KSFD.find_duplicates", "petsc4py.PETSc.Options", "KSFD.SpatialExpression", "KSFD.Generator",...
[((17725, 17760), 'KSFD.ksfddebug.log', 'log', (['*args'], {'system': '"""MAIN"""'}), "(*args, system='MAIN', **kwargs)\n", (17728, 17760), False, 'from KSFD.ksfddebug import log\n'), ((18282, 18293), 'argparse.Namespace', 'Namespace', ([], {}), '()\n', (18291, 18293), False, 'from argparse import Namespace, RawDescrip...