code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
#!/usr/bin/python # # # =++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ____ _ __ ____ __ _ ____ # / __ ) (_) / /_ / __/ ____ _____ ___ _____ / /_ (_) ____ / __/ __...
[ "utili.imshow", "machine_view.DetectTrack", "server_stream.DStream", "utili.resize" ]
[((1594, 1603), 'server_stream.DStream', 'DStream', ([], {}), '()\n', (1601, 1603), False, 'from server_stream import DStream\n'), ((1650, 1663), 'machine_view.DetectTrack', 'DetectTrack', ([], {}), '()\n', (1661, 1663), False, 'from machine_view import DetectTrack\n'), ((2129, 2139), 'utili.resize', 'resize', (['im'],...
""" This is the Bokeh charts testing interface. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with thi...
[ "pandas.DataFrame", "numpy.testing.assert_array_equal", "bokeh.charts.builder.tests._utils.create_chart", "numpy.array", "collections.OrderedDict" ]
[((1122, 1135), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1133, 1135), False, 'from collections import OrderedDict\n'), ((1302, 1324), 'pandas.DataFrame', 'pd.DataFrame', (['xyvalues'], {}), '(xyvalues)\n', (1314, 1324), True, 'import pandas as pd\n'), ((1632, 1655), 'bokeh.charts.builder.tests._util...
############################################################################### # # Synthesizer in Python # # This is a synthesizer in Python for the piano, organ, acoustic guitar # and edm musical instruments. #######################################################...
[ "wave.open", "math.pow", "math.ceil", "numpy.zeros", "math.floor", "math.sin", "numpy.hstack", "random.random", "math.log" ]
[((3157, 3196), 'wave.open', 'wave.open', (['destinationWavFilename', '"""wb"""'], {}), "(destinationWavFilename, 'wb')\n", (3166, 3196), False, 'import wave\n'), ((5298, 5330), 'math.ceil', 'math.ceil', (['(duration * sampleRate)'], {}), '(duration * sampleRate)\n', (5307, 5330), False, 'import math\n'), ((5362, 5378)...
# Copyright 2016 AT&T Corp # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ "oslo_log.log.getLogger", "tungsten_tempest_plugin.services.contrail.json.routing_policy_client.RoutingPolicyClient", "tungsten_tempest_plugin.services.contrail.json.fq_client.FqnameIdClient", "tungsten_tempest_plugin.services.contrail.json.domain_client.DomainClient", "tungsten_tempest_plugin.services.cont...
[((4509, 4536), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (4526, 4536), True, 'from oslo_log import log as logging\n'), ((5913, 6090), 'tungsten_tempest_plugin.services.contrail.json.access_control_client.AccessControlClient', 'AccessControlClient', (['cls.auth_provider', 'CONF....
import requests import signal import logging import time import os import pandas as pd from finnhub_api.decorators import ohlcv_frame, economic_data_frame from finnhub_api.utils import get_formatted_dates # Globals LOG_LEVEL = int(os.environ.get('LOG_LEVEL', logging.WARNING)) _stop = False class FinnHubBase(object)...
[ "pandas.Timestamp", "logging.basicConfig", "pandas.Timestamp.utcnow", "time.time", "os.environ.get", "time.sleep", "finnhub_api.utils.get_formatted_dates", "requests.get", "pandas.Timedelta", "signal.signal", "logging.getLogger" ]
[((233, 277), 'os.environ.get', 'os.environ.get', (['"""LOG_LEVEL"""', 'logging.WARNING'], {}), "('LOG_LEVEL', logging.WARNING)\n", (247, 277), False, 'import os\n'), ((1112, 1156), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'signal_handler'], {}), '(signal.SIGINT, signal_handler)\n', (1125, 1156), False, 'im...
""" Class for storing and updating time valued features """ import math from collections import deque, Counter import numpy as np from featnames import TIME_FEATS, THREAD_COUNT, BYR from constants import MAX_DELAY_TURN from env.Heap import Heap from env.events.Offer import Offer from env.const import SLR_REJECTION, BYR...
[ "math.ceil", "numpy.argmax", "env.Heap.Heap", "numpy.argmin", "env.events.Offer.Offer", "collections.Counter", "collections.deque" ]
[((2942, 2948), 'env.Heap.Heap', 'Heap', ([], {}), '()\n', (2946, 2948), False, 'from env.Heap import Heap\n'), ((9798, 9826), 'env.events.Offer.Offer', 'Offer', ([], {'params': 'offer', 'rej': 'rej'}), '(params=offer, rej=rej)\n', (9803, 9826), False, 'from env.events.Offer import Offer\n'), ((31137, 31146), 'collecti...
#! /usr/bin/env python # -*- coding: utf-8 -*- from downward import suites from lab.reports import Attribute from common_setup import IssueConfig, IssueExperiment REVS = ["issue648-base", "issue648-v2"] SUITE=suites.suite_optimal_strips() SUITE.extend(suites.suite_ipc14_opt_strips()) CONFIGS = [ # Test label re...
[ "downward.suites.suite_optimal_strips", "lab.reports.Attribute", "downward.suites.suite_ipc14_opt_strips", "common_setup.IssueExperiment", "common_setup.IssueConfig" ]
[((212, 241), 'downward.suites.suite_optimal_strips', 'suites.suite_optimal_strips', ([], {}), '()\n', (239, 241), False, 'from downward import suites\n'), ((1583, 1661), 'common_setup.IssueExperiment', 'IssueExperiment', ([], {'revisions': 'REVS', 'configs': 'CONFIGS', 'suite': 'SUITE', 'email': '"""<EMAIL>"""'}), "(r...
import os import logging import shutil def merge_dataset_directories(**kwargs): directories = kwargs['directories'] destination = kwargs['final_dir'] images = [os.path.join(directory,file) for directory in directories for file in os.listdir(directory)] #print('copying images..') #print(i...
[ "os.path.join", "os.listdir", "logging.basicConfig", "shutil.copy" ]
[((522, 577), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': 'log_fmt'}), '(level=logging.INFO, format=log_fmt)\n', (541, 577), False, 'import logging\n'), ((184, 213), 'os.path.join', 'os.path.join', (['directory', 'file'], {}), '(directory, file)\n', (196, 213), False, 'import ...
# -*- coding: utf-8 -*- """ """ import time from natrixclient.common import const from natrixclient.command.ntraceroute import execute as traceroute_execute from natrixclient.bin import ln from natrixclient.bin import logger def parse_traceroute(args): destination = args.destination request_parameters = d...
[ "natrixclient.bin.logger.error", "natrixclient.command.ntraceroute.execute", "time.time" ]
[((1026, 1037), 'time.time', 'time.time', ([], {}), '()\n', (1035, 1037), False, 'import time\n'), ((1263, 1335), 'natrixclient.command.ntraceroute.execute', 'traceroute_execute', (['destination', 'request_parameters', 'response_parameters'], {}), '(destination, request_parameters, response_parameters)\n', (1281, 1335)...
import logging import tarfile import typing import github3.repos import dacite import dso.labels import dso.model import gci.componentmodel as cm import whitesource.filters import whitesource.model logger = logging.getLogger(__name__) def _get_ws_label_from_artifact(source: cm.ComponentSource) -> dso.labels.Sourc...
[ "tarfile.open", "dacite.Config", "logging.getLogger" ]
[((211, 238), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (228, 238), False, 'import logging\n'), ((2342, 2381), 'tarfile.open', 'tarfile.open', ([], {'fileobj': 'target', 'mode': '"""w|"""'}), "(fileobj=target, mode='w|')\n", (2354, 2381), False, 'import tarfile\n'), ((2480, 2521), 't...
"""Task runner called by halfling CLI command.""" import argparse import sys import importlib.util from halfling.exceptions import HalflingError, HalflingSyntaxError from halfling.tasks import _tasks from halfling.utils import _HALFLING_VERSION # TODO (aloebs29): search up directories for this file if it is not foun...
[ "sys.exit", "argparse.ArgumentParser", "halfling.tasks._tasks.items" ]
[((949, 1023), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""halfling build and automation tool."""'}), "(description='halfling build and automation tool.')\n", (972, 1023), False, 'import argparse\n'), ((1185, 1199), 'halfling.tasks._tasks.items', '_tasks.items', ([], {}), '()\n', (119...
from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField,SubmitField from wtforms.validators import Required from wtforms.fields.html5 import DateField class PitchForm(FlaskForm): category = StringField('Pitch category',validators=[Required()]) description_path = TextAreaField('post a pit...
[ "wtforms.SubmitField", "wtforms.fields.html5.DateField", "wtforms.validators.Required", "wtforms.TextAreaField" ]
[((295, 324), 'wtforms.TextAreaField', 'TextAreaField', (['"""post a pitch"""'], {}), "('post a pitch')\n", (308, 324), False, 'from wtforms import StringField, TextAreaField, SubmitField\n'), ((338, 364), 'wtforms.fields.html5.DateField', 'DateField', (['"""date and time"""'], {}), "('date and time')\n", (347, 364), F...
from __future__ import absolute_import from django.db import models from django.utils.translation import ugettext as _ from . import Icon from .app_settings import get_prefix from .forms import IconFormField from .shims import shims prefix = get_prefix() class IconField(models.Field): description = _('A fonta...
[ "django.utils.translation.ugettext" ]
[((310, 339), 'django.utils.translation.ugettext', '_', (['"""A fontawesome icon field"""'], {}), "('A fontawesome icon field')\n", (311, 339), True, 'from django.utils.translation import ugettext as _\n')]
import autosklearn.classification from dffml.util.entrypoint import entrypoint from .config import AutoSklearnConfig from .autosklearn_base import AutoSklearnModelContext, AutoSklearnModel class AutoSklearnClassifierModelContext(AutoSklearnModelContext): def __init__(self, parent): super().__init__(pare...
[ "dffml.util.entrypoint.entrypoint" ]
[((739, 767), 'dffml.util.entrypoint.entrypoint', 'entrypoint', (['"""autoclassifier"""'], {}), "('autoclassifier')\n", (749, 767), False, 'from dffml.util.entrypoint import entrypoint\n')]
#!/usr/bin/python import logging import datetime import re from . import register, Site, SiteException, Section, Chapter logger = logging.getLogger(__name__) @register class Stash(Site): @staticmethod def matches(url): # Need a stack page match = re.match(r'^(https?://sta\.sh/2.+)/?.*', url)...
[ "re.match", "logging.getLogger" ]
[((132, 159), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (149, 159), False, 'import logging\n'), ((275, 320), 're.match', 're.match', (['"""^(https?://sta\\\\.sh/2.+)/?.*"""', 'url'], {}), "('^(https?://sta\\\\.sh/2.+)/?.*', url)\n", (283, 320), False, 'import re\n')]
# Generated by Django 2.2.1 on 2019-06-18 02:28 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('charts', '0002_charteffect_chartmedication'), ] operations = [ migrations.AlterModelOptions( name='charteffect', options={'o...
[ "django.db.migrations.AlterModelOptions" ]
[((235, 321), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""charteffect"""', 'options': "{'ordering': ['order']}"}), "(name='charteffect', options={'ordering': [\n 'order']})\n", (263, 321), False, 'from django.db import migrations\n'), ((361, 451), 'django.db.migrations...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
[ "airflow.bin.cli.get_num_ready_workers_running", "psutil.NoSuchProcess", "mock.patch", "psutil.Popen", "time.sleep", "mock.Mock", "mock.MagicMock" ]
[((1093, 1107), 'mock.Mock', 'Mock', ([], {'pid': 'None'}), '(pid=None)\n', (1097, 1107), False, 'from mock import patch, Mock, MagicMock\n'), ((1132, 1143), 'mock.MagicMock', 'MagicMock', ([], {}), '()\n', (1141, 1143), False, 'from mock import patch, Mock, MagicMock\n'), ((1165, 1176), 'mock.MagicMock', 'MagicMock', ...
from __future__ import annotations import logging import time from typing import TYPE_CHECKING from scripts.core.base_classes.scene import Scene from scripts.core.constants import SceneType, WorldState from scripts.scenes.combat.elements.unit_manager import UnitManager from scripts.scenes.world.ui import WorldUI if ...
[ "scripts.scenes.combat.elements.unit_manager.UnitManager", "scripts.scenes.world.ui.WorldUI", "time.time" ]
[((698, 709), 'time.time', 'time.time', ([], {}), '()\n', (707, 709), False, 'import time\n'), ((787, 806), 'scripts.scenes.world.ui.WorldUI', 'WorldUI', (['game', 'self'], {}), '(game, self)\n', (794, 806), False, 'from scripts.scenes.world.ui import WorldUI\n'), ((886, 903), 'scripts.scenes.combat.elements.unit_manag...
#!/usr/bin/env python # recommend-o-matic tool to validate and parse exports to generate json for # the Recommend-o-matic web interface. Use reccommend-o-matic --help # for usage, or see the project README https://github.com/stanford-rc/recommend-o-matic import argparse import json import sys import os import csv d...
[ "csv.reader", "argparse.ArgumentParser", "os.path.exists", "json.dumps", "sys.exit" ]
[((350, 406), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Recommend-o-matic"""'}), "(description='Recommend-o-matic')\n", (373, 406), False, 'import argparse\n'), ((1943, 2001), 'sys.exit', 'sys.exit', (['"""Both --questions and --resources are required."""'], {}), "('Both --questions...
#coding:utf-8 import numpy import requests def get_label_to_class_dictionary(labels): dictionary = {} for label in labels: if not dictionary.has_key(label): dictionary[label] = len(dictionary.keys()) return dictionary class DecisionNode: def __init__(self): self.is_leaf = False ...
[ "numpy.multiply", "numpy.sum", "numpy.argmax", "numpy.median", "numpy.where", "numpy.array" ]
[((2285, 2304), 'numpy.argmax', 'numpy.argmax', (['gains'], {}), '(gains)\n', (2297, 2304), False, 'import numpy\n'), ((905, 926), 'numpy.array', 'numpy.array', (['features'], {}), '(features)\n', (916, 926), False, 'import numpy\n'), ((1562, 1582), 'numpy.median', 'numpy.median', (['vector'], {}), '(vector)\n', (1574,...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserProfile.is_mysqldba_oncall' db.add_column(u'user_profiles', 'is_mysqldba_oncall', ...
[ "south.db.db.delete_column" ]
[((1301, 1357), 'south.db.db.delete_column', 'db.delete_column', (['u"""user_profiles"""', '"""is_mysqldba_oncall"""'], {}), "(u'user_profiles', 'is_mysqldba_oncall')\n", (1317, 1357), False, 'from south.db import db\n'), ((1425, 1481), 'south.db.db.delete_column', 'db.delete_column', (['u"""user_profiles"""', '"""is_p...
#!/usr/bin/env python3 """Compile a 2up version of a PDF file using LaTeX pdfpages' \\includepdfmerge. See also https://github.com/DavidFirth/pdfjam """ __title__ = 'make-nup.py' __version__ = '0.1.dev0' __author__ = '<NAME> <<EMAIL>>' __license__ = 'MIT, see LICENSE.txt' __copyright__ = 'Copyright (c) 2020 <NAME>' ...
[ "argparse.Namespace", "functools.partial", "subprocess.run", "argparse.ArgumentParser", "string.Template", "pathlib.Path", "argparse.ArgumentTypeError" ]
[((1165, 1216), 'functools.partial', 'functools.partial', (['print'], {'file': 'sys.stderr', 'sep': '"""\n"""'}), "(print, file=sys.stderr, sep='\\n')\n", (1182, 1216), False, 'import functools\n'), ((2587, 2631), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__do...
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
[ "numpy.atleast_1d", "torch.cat", "torch.nn.GroupNorm", "torch.nn.init.constant_", "torch.nn.LeakyReLU" ]
[((1829, 1855), 'numpy.atleast_1d', 'np.atleast_1d', (['kernel_size'], {}), '(kernel_size)\n', (1842, 1855), True, 'import numpy as np\n'), ((1872, 1893), 'numpy.atleast_1d', 'np.atleast_1d', (['stride'], {}), '(stride)\n', (1885, 1893), True, 'import numpy as np\n'), ((2128, 2154), 'numpy.atleast_1d', 'np.atleast_1d',...
import redis from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver class TwitterSearchTerm(models.Model): term = models.CharField(max_length=140, unique=True) def __unicode__(self): return self.term def save(self, *args, **kwa...
[ "django.db.models.CharField", "redis.Redis", "django.dispatch.receiver" ]
[((553, 600), 'django.dispatch.receiver', 'receiver', (['post_delete'], {'sender': 'TwitterSearchTerm'}), '(post_delete, sender=TwitterSearchTerm)\n', (561, 600), False, 'from django.dispatch import receiver\n'), ((181, 226), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(140)', 'unique': '(Tru...
# coding=utf-8 import os import platform import sys from typing import Optional, Dict, Any, List from dbt.logger import GLOBAL_LOGGER as logger from dbt import flags import dbt.clients.system import dbt.exceptions from dbt.adapters.factory import get_adapter, register_adapter from dbt.config import Project, Profile fr...
[ "dbt.task.base.get_nearest_project_dir", "dbt.logger.GLOBAL_LOGGER.info", "os.getcwd", "sys.version.split", "os.path.dirname", "os.path.exists", "dbt.ui.red", "platform.platform", "dbt.config.Project.from_project_root", "dbt.adapters.factory.register_adapter", "dbt.adapters.factory.get_adapter",...
[((1932, 1979), 'os.path.join', 'os.path.join', (['self.profiles_dir', '"""profiles.yml"""'], {}), "(self.profiles_dir, 'profiles.yml')\n", (1944, 1979), False, 'import os\n'), ((2429, 2478), 'os.path.join', 'os.path.join', (['self.project_dir', '"""dbt_project.yml"""'], {}), "(self.project_dir, 'dbt_project.yml')\n", ...
import os import pytest from monai.apps.datasets import DecathlonDataset from autorad.config import config from autorad.utils.sample_datasets import ( convert_decathlon_dataset, load_mednist_dataset, ) @pytest.mark.skip(reason="Slow") def test_convert_decathlon_dataset(): decathlon_dataset = DecathlonDa...
[ "autorad.utils.sample_datasets.convert_decathlon_dataset", "os.path.exists", "monai.apps.datasets.DecathlonDataset", "pytest.mark.skip", "autorad.utils.sample_datasets.load_mednist_dataset" ]
[((215, 246), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""Slow"""'}), "(reason='Slow')\n", (231, 246), False, 'import pytest\n'), ((842, 873), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""Slow"""'}), "(reason='Slow')\n", (858, 873), False, 'import pytest\n'), ((309, 420), 'monai.apps.data...
""" # !/usr/bin/env python -*- coding: utf-8 -*- @Time : 2022/3/15 下午4:59 @Author : Yang "Jan" Xiao @Description : data_loader """ import os import torch import torchaudio import torch.nn.functional as F from torch.utils.data import Dataset class SpeechCommandDataset(Dataset): def __init__(self, root, filena...
[ "torch.randint", "torch.zeros", "torchaudio.load", "os.path.join", "torch.nn.functional.pad" ]
[((1406, 1434), 'torchaudio.load', 'torchaudio.load', (['speech_path'], {}), '(speech_path)\n', (1421, 1434), False, 'import torchaudio\n'), ((1583, 1643), 'torch.nn.functional.pad', 'F.pad', (['waveform', '[0, self.sample_length - waveform.shape[1]]'], {}), '(waveform, [0, self.sample_length - waveform.shape[1]])\n', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 DPSIRA. # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This software is...
[ "h5py.File", "gnuradio.gr.sync_block.__init__", "time.time" ]
[((1716, 1727), 'time.time', 'time.time', ([], {}), '()\n', (1725, 1727), False, 'import time\n'), ((1958, 2066), 'gnuradio.gr.sync_block.__init__', 'gr.sync_block.__init__', (['self'], {'name': '"""hdf5_sink"""', 'in_sig': '(n_inputs * [(datatype, vec_length)])', 'out_sig': 'None'}), "(self, name='hdf5_sink', in_sig=n...
# 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 ...
[ "typing.TypeVar", "numpy.array" ]
[((1232, 1251), 'typing.TypeVar', 'TypeVar', (['"""TDefault"""'], {}), "('TDefault')\n", (1239, 1251), False, 'from typing import Any, Iterable, Tuple, TypeVar, Union\n'), ((1204, 1216), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (1212, 1216), True, 'import numpy as np\n')]
from gurobipy import * import random from random import randint import numpy as np import matplotlib.pyplot as plt import math N = int (input("Enter the number of Vertices: ")) #Asking users to enter the number of vertices vertices = range(N) #creating the range of vertices random.seed(1) E =[] #Generati...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.annotate", "matplotlib.pyplot.scatter", "random.seed", "numpy.random.rand" ]
[((286, 300), 'random.seed', 'random.seed', (['(1)'], {}), '(1)\n', (297, 300), False, 'import random\n'), ((1406, 1483), 'matplotlib.pyplot.scatter', 'plt.scatter', (['ver_x', 'ver_y'], {'s': '(100)', 'facecolors': '"""none"""', 'edgecolors': '"""b"""', 'zorder': '(2)'}), "(ver_x, ver_y, s=100, facecolors='none', edge...
"""LiveCheck - Test runner.""" import asyncio import logging import traceback import typing from time import monotonic from typing import ( Any, Dict, Iterable, List, Mapping, Optional, Tuple, ) from mode.utils.logging import CompositeLogger from mode.utils.times import humanize_seconds fr...
[ "mode.utils.logging.CompositeLogger", "faust.models.maybe_model", "mode.utils.times.humanize_seconds", "traceback.format_tb", "time.monotonic" ]
[((1442, 1507), 'mode.utils.logging.CompositeLogger', 'CompositeLogger', (['self.case.log.logger'], {'formatter': 'self._format_log'}), '(self.case.log.logger, formatter=self._format_log)\n', (1457, 1507), False, 'from mode.utils.logging import CompositeLogger\n'), ((3613, 3629), 'faust.models.maybe_model', 'maybe_mode...
from sklearn.model_selection import KFold from xgboost import XGBClassifier from sklearn.metrics import classification_report, accuracy_score, matthews_corrcoef from sklearn.ensemble import ExtraTreesClassifier, VotingClassifier from sklearn import svm from sklearn.linear_model import LogisticRegression import it...
[ "numpy.concatenate", "sklearn.metrics.accuracy_score", "sklearn.model_selection.KFold", "sklearn.metrics.classification_report", "itertools.combinations", "sklearn.metrics.matthews_corrcoef", "numpy.array", "xgboost.XGBClassifier", "feature.Feature", "feature.check_length" ]
[((731, 749), 'feature.Feature', 'Feature', (['file_name'], {}), '(file_name)\n', (738, 749), False, 'from feature import Feature1, Feature, Feature2, check_length\n'), ((1520, 1548), 'numpy.array', 'np.array', (['label'], {'dtype': 'float'}), '(label, dtype=float)\n', (1528, 1548), True, 'import numpy as np\n'), ((203...
"""The JuiceNet integration.""" from datetime import timedelta import logging import aiohttp from pyjuicenet import Api, TokenError import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import CONF_ACCESS_TOKEN, Platform from homeassistant.core import Ho...
[ "homeassistant.helpers.config_validation.deprecated", "voluptuous.Required", "pyjuicenet.Api", "datetime.timedelta", "logging.getLogger", "homeassistant.helpers.aiohttp_client.async_get_clientsession" ]
[((753, 780), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (770, 780), False, 'import logging\n'), ((1572, 1601), 'homeassistant.helpers.aiohttp_client.async_get_clientsession', 'async_get_clientsession', (['hass'], {}), '(hass)\n', (1595, 1601), False, 'from homeassistant.helpers.aioht...
from django.urls import path, include from .views import (CommentsAPIView, CommentDetailsAPIView, CommentsHistoryAPIView) app_name = 'comments' urlpatterns = [ path('articles/<slug>/comments/', CommentsAPIView.as_view(), name='comments' ), path('api/', include(('authors.a...
[ "django.urls.include" ]
[((301, 374), 'django.urls.include', 'include', (["('authors.apps.articles.urls', 'articles')"], {'namespace': '"""articles"""'}), "(('authors.apps.articles.urls', 'articles'), namespace='articles')\n", (308, 374), False, 'from django.urls import path, include\n')]
from sql_metadata import Parser def test_fully_qualified_select_and_condition(): query = """ select dbo.a.col, b.col from dbo.a, db_two.dbo.b where dbo.a.col = b.col """ parser = Parser(query) assert parser.columns == ["dbo.a.col", "b.col"] assert parser.tables == ["dbo.a", "db_two.dbo.b"...
[ "sql_metadata.Parser" ]
[((202, 215), 'sql_metadata.Parser', 'Parser', (['query'], {}), '(query)\n', (208, 215), False, 'from sql_metadata import Parser\n'), ((515, 528), 'sql_metadata.Parser', 'Parser', (['query'], {}), '(query)\n', (521, 528), False, 'from sql_metadata import Parser\n')]
from django.contrib import admin from .models import Tag from mptt.admin import MPTTModelAdmin # Register your models here. admin.site.register(Tag, MPTTModelAdmin)
[ "django.contrib.admin.site.register" ]
[((125, 165), 'django.contrib.admin.site.register', 'admin.site.register', (['Tag', 'MPTTModelAdmin'], {}), '(Tag, MPTTModelAdmin)\n', (144, 165), False, 'from django.contrib import admin\n')]
from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.schema import FetchedValue from sqlalchemy.orm import backref from sqlalchemy.ext.hybrid import hybrid_property from app.api.utils.models_mixins import AuditMixin, Base from app.extensions import db from app.api.constants import NOW_APPLICATION_EDIT_GROUP...
[ "app.extensions.db.ForeignKey", "app.extensions.db.Column", "sqlalchemy.dialects.postgresql.UUID", "sqlalchemy.schema.FetchedValue", "sqlalchemy.orm.backref" ]
[((805, 843), 'app.extensions.db.Column', 'db.Column', (['db.String'], {'primary_key': '(True)'}), '(db.String, primary_key=True)\n', (814, 843), False, 'from app.extensions import db\n'), ((860, 899), 'app.extensions.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on 23/10/17 @author: <NAME> """ import pickle import numpy as np import time, sys import scipy.sparse as sp def check_matrix(X, format='csc', dtype=np.float32): """ This function takes a matrix as input and transforms it into the specified format. ...
[ "numpy.sum", "numpy.ones", "numpy.argsort", "numpy.argpartition", "pickle.load", "sys.stdout.flush", "numpy.atleast_2d", "numpy.zeros_like", "numpy.multiply", "numpy.power", "sys.stderr.flush", "numpy.repeat", "scipy.sparse.diags", "scipy.sparse.csr_matrix", "time.time", "scipy.sparse....
[((5197, 5214), 'numpy.array', 'np.array', (['indices'], {}), '(indices)\n', (5205, 5214), True, 'import numpy as np\n'), ((5232, 5248), 'numpy.array', 'np.array', (['values'], {}), '(values)\n', (5240, 5248), True, 'import numpy as np\n'), ((6907, 6973), 'scipy.sparse.csc_matrix', 'sp.csc_matrix', (['(ratings, (rows, ...
import os import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from pax.dsputils import InterpolatingMap from pax.core import data_file_name from pax import units map_file = '../../pax/data/XENON100_s2_xy_patterns_Xerawdp0.4.5.json.gz' try: os.mkdir(map_file) except FileExistsError: pas...
[ "os.mkdir", "tqdm.tqdm", "pax.core.data_file_name", "numpy.sin", "numpy.cos", "numpy.linspace", "os.path.join" ]
[((462, 482), 'tqdm.tqdm', 'tqdm', (['maps.map_names'], {}), '(maps.map_names)\n', (466, 482), False, 'from tqdm import tqdm\n'), ((270, 288), 'os.mkdir', 'os.mkdir', (['map_file'], {}), '(map_file)\n', (278, 288), False, 'import os\n'), ((371, 408), 'pax.core.data_file_name', 'data_file_name', (["(map_file + '.json.gz...
from django.conf import settings import datetime import base64 import hmac, hashlib def create_s3_policy_doc(bucket, upload_path, redirect=None, max_file_size=2**20): policy_template = """{{"expiration": "{expiration_date}", "conditions": [ {{"bucket": "{bucket}"}}, ["starts-with", "$key", "{upload_p...
[ "datetime.datetime.utcnow", "hmac.new", "base64.b64encode", "datetime.timedelta" ]
[((838, 866), 'base64.b64encode', 'base64.b64encode', (['policy_doc'], {}), '(policy_doc)\n', (854, 866), False, 'import base64\n'), ((522, 548), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (546, 548), False, 'import datetime\n'), ((551, 581), 'datetime.timedelta', 'datetime.timedelta', ([...
from __future__ import absolute_import, division, print_function from . import imgproc import os import glob import logging import pickle import numpy as np import pandas as pd import requests from posixpath import join as urljoin import zipfile import pulse2percept as p2p import skimage import skimage.io as skio...
[ "pandas.read_csv", "numpy.isclose", "numpy.mean", "skimage.img_as_float", "os.path.join", "pandas.DataFrame", "numpy.zeros_like", "os.path.dirname", "os.path.exists", "requests.get", "numpy.var", "skimage.io.imread", "requests.exceptions.HTTPError", "posixpath.join", "pandas.Series", "...
[((445, 480), 'pulse2percept.console.setLevel', 'p2p.console.setLevel', (['logging.ERROR'], {}), '(logging.ERROR)\n', (465, 480), True, 'import pulse2percept as p2p\n'), ((2384, 2427), 'os.path.join', 'os.path.join', (['save_path', '"""argus_shapes.zip"""'], {}), "(save_path, 'argus_shapes.zip')\n", (2396, 2427), False...
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np from numpy import dot from numpy.linalg import inv, LinAlgError from scipy.stats import norm # from seaborn import FacetGrid def z_score(conf): """ :param conf: Desired level of confidence :return: The Z-score corresponding to the...
[ "numpy.abs", "numpy.argmax", "numpy.empty", "numpy.argmin", "numpy.isclose", "numpy.exp", "matplotlib.pyplot.fill_between", "scipy.stats.norm._cdf", "matplotlib.pyplot.setp", "numpy.random.RandomState", "numpy.linspace", "matplotlib.pyplot.errorbar", "numpy.repeat", "scipy.stats.norm.ppf",...
[((369, 409), 'scipy.stats.norm.ppf', 'norm.ppf', (['((100 - (100 - conf) / 2) / 100)'], {}), '((100 - (100 - conf) / 2) / 100)\n', (377, 409), False, 'from scipy.stats import norm\n'), ((902, 918), 'scipy.stats.norm.ppf', 'norm.ppf', (['ptilde'], {}), '(ptilde)\n', (910, 918), False, 'from scipy.stats import norm\n'),...
# ----------------------------------------------------------- # <NAME> # ----------------------------------------------------------- import streamlit as st import pandas as pd import numpy as np from sodapy import Socrata import pydeck as pdk import plotly.express as px import requests # from IPytho...
[ "pandas.read_html", "pandas.DataFrame", "streamlit.markdown", "streamlit.image", "streamlit.cache", "streamlit.slider", "streamlit.sidebar.checkbox", "streamlit.checkbox", "pandas.read_csv", "streamlit.write", "plotly.express.bar", "streamlit.sidebar.selectbox", "streamlit.sidebar.markdown",...
[((454, 476), 'streamlit.cache', 'st.cache', ([], {'persist': '(True)'}), '(persist=True)\n', (462, 476), True, 'import streamlit as st\n'), ((741, 759), 'pandas.read_html', 'pd.read_html', (['html'], {}), '(html)\n', (753, 759), True, 'import pandas as pd\n'), ((841, 989), 'streamlit.markdown', 'st.markdown', (['"""<h...
# Copyright (c) 2021, <NAME> # Licensed under BSD 3-Clause License. See LICENSE.txt for details. import numpy as np from . import normal def poisson(k,lam,cumulative=False,threshold=23): ''' poisson mass function vectorised in lambda, but not k :param k: :param lam: :param cumulative: ret...
[ "numpy.math.factorial", "numpy.exp", "numpy.sqrt" ]
[((630, 642), 'numpy.exp', 'np.exp', (['(-lam)'], {}), '(-lam)\n', (636, 642), True, 'import numpy as np\n'), ((706, 726), 'numpy.math.factorial', 'np.math.factorial', (['k'], {}), '(k)\n', (723, 726), True, 'import numpy as np\n'), ((817, 829), 'numpy.sqrt', 'np.sqrt', (['lam'], {}), '(lam)\n', (824, 829), True, 'impo...
from . import db from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from . import login_manager from datetime import datetime @login_manager.user_loader def load_user(writer_id): return Writer.query.get(int(writer_id)) class Writer(UserMixin, db.Model): ...
[ "werkzeug.security.check_password_hash", "werkzeug.security.generate_password_hash" ]
[((1033, 1065), 'werkzeug.security.generate_password_hash', 'generate_password_hash', (['password'], {}), '(password)\n', (1055, 1065), False, 'from werkzeug.security import generate_password_hash, check_password_hash\n'), ((1122, 1169), 'werkzeug.security.check_password_hash', 'check_password_hash', (['self.pass_secur...
################################################################## # Copyright 2018 Open Source Geospatial Foundation and others # # licensed under MIT, Please consult LICENSE.txt for details # ################################################################## import unittest from collections import named...
[ "pywps.tests.assert_pywps_version", "pywps.BoundingBoxOutput", "pywps.OWS.Identifier", "pywps.LiteralInput", "unittest.TestSuite", "pywps.inout.literaltypes.AllowedValue", "pywps.E.Input", "pywps.BoundingBoxInput", "pywps.app.Common.Metadata", "pywps.Service", "pywps.LiteralOutput", "pywps.ino...
[((1067, 1137), 'collections.namedtuple', 'namedtuple', (['"""ProcessDescription"""', "['identifier', 'inputs', 'metadata']"], {}), "('ProcessDescription', ['identifier', 'inputs', 'metadata'])\n", (1077, 1137), False, 'from collections import namedtuple\n'), ((14555, 14585), 'unittest.TestSuite', 'unittest.TestSuite',...
# -*- coding: utf-8 -*- from qa.shell import gitlint from qa.base import BaseTestCase class NamedRuleTests(BaseTestCase): """ Integration tests for named rules.""" def test_named_rule(self): commit_msg = "WIP: thåt dûr bår\n\nSïmple commit body" self.create_simple_commit(commit_msg) c...
[ "qa.shell.gitlint" ]
[((393, 481), 'qa.shell.gitlint', 'gitlint', (['"""--config"""', 'config_path'], {'_cwd': 'self.tmp_git_repo', '_tty_in': '(True)', '_ok_code': '[5]'}), "('--config', config_path, _cwd=self.tmp_git_repo, _tty_in=True,\n _ok_code=[5])\n", (400, 481), False, 'from qa.shell import gitlint\n'), ((879, 996), 'qa.shell.gi...
# Generated by Django 3.1.7 on 2021-05-20 22:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('reo', '0114_merge_20210506_2304'), ] operations = [ migrations.AddField( model_name='financialmodel', name='lcoe_com...
[ "django.db.models.FloatField" ]
[((379, 419), 'django.db.models.FloatField', 'models.FloatField', ([], {'blank': '(True)', 'null': '(True)'}), '(blank=True, null=True)\n', (396, 419), False, 'from django.db import migrations, models\n'), ((579, 619), 'django.db.models.FloatField', 'models.FloatField', ([], {'blank': '(True)', 'null': '(True)'}), '(bl...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
[ "django.db.models.CharField", "django.db.models.IntegerField", "django.db.models.TextField", "django.db.models.AutoField" ]
[((1055, 1148), '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", (1071, 1148), False, 'from django.db import migrations, mod...
# ed25519.py - Optimized version of the reference implementation of Ed25519 # # Written in 2011? by <NAME> <<EMAIL>> # 2013 by <NAME> <<EMAIL>> # 2013 by <NAME> <<EMAIL>> # 2013 by <NAME> <<EMAIL>> # # To the extent possible under law, the author(s) have dedicated all copyright # and re...
[ "codecs.open", "ed25519.publickey_unsafe", "binascii.hexlify", "ed25519.indexbytes", "ed25519.scalarmult", "os.path.dirname", "ed25519.signature_unsafe", "pytest.raises", "binascii.unhexlify", "ed25519.H", "ed25519.checkvalid", "ed25519.isoncurve" ]
[((2108, 2138), 'binascii.unhexlify', 'binascii.unhexlify', (['secret_key'], {}), '(secret_key)\n', (2126, 2138), False, 'import binascii\n'), ((2147, 2174), 'binascii.unhexlify', 'binascii.unhexlify', (['message'], {}), '(message)\n', (2165, 2174), False, 'import binascii\n'), ((2185, 2213), 'ed25519.publickey_unsafe'...
import argparse import shutil import pandas as pd import os from utils import read_qe_files def save_data_to_file(fname, data): if not os.path.exists(os.path.dirname(fname)): os.makedirs(os.path.dirname(fname)) with open(fname, 'w') as f: for x in data: f.write('{}\n'.format(x)) ...
[ "argparse.ArgumentParser", "pandas.read_csv", "os.path.dirname", "os.path.exists", "os.path.join", "shutil.copy" ]
[((362, 387), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (385, 387), False, 'import argparse\n'), ((158, 180), 'os.path.dirname', 'os.path.dirname', (['fname'], {}), '(fname)\n', (173, 180), False, 'import os\n'), ((203, 225), 'os.path.dirname', 'os.path.dirname', (['fname'], {}), '(fname)\...
# -*- coding: utf-8 -*- ''' Module for handling OpenStack Heat calls .. versionadded:: 2017.7.0 :depends: - heatclient Python module :configuration: This module is not usable until the user, password, tenant, and auth URL are specified either in a pillar or in the minion's config file. For example:: ...
[ "yaml.load", "oslo_serialization.jsonutils.dumps", "json.loads", "logging.basicConfig", "salt.exceptions.SaltInvocationError", "yaml.dump", "time.sleep", "heatclient.client.Client", "logging.getLogger" ]
[((2790, 2830), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (2809, 2830), False, 'import logging\n'), ((2837, 2864), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2854, 2864), False, 'import logging\n'), ((6027, 6087), 'heat...
import argparse import torch from pretrain_trfm_zinc import TrfmSeq2seq import numpy as np from torch.utils.data import DataLoader import pandas as pd pad_index = 28 def parse_arguments(): parser = argparse.ArgumentParser(description='Hyperparams') parser.add_argument('--data', '-d', type=str, defa...
[ "pandas.DataFrame", "torch.t", "numpy.load", "argparse.ArgumentParser", "numpy.resize", "torch.argmax", "torch.load", "numpy.transpose", "pretrain_trfm_zinc.TrfmSeq2seq", "torch.tensor", "torch.from_numpy" ]
[((214, 264), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Hyperparams"""'}), "(description='Hyperparams')\n", (237, 264), False, 'import argparse\n'), ((978, 1010), 'numpy.load', 'np.load', (['file'], {'allow_pickle': '(True)'}), '(file, allow_pickle=True)\n', (985, 1010), True, 'impo...
#https://www.acmicpc.net/problem/10814 import sys n = int(sys.stdin.readline()) a = [] for i in range(n): a.append([i] + sys.stdin.readline().split()) a.sort(key=lambda x:(int(x[1]), x[0])) for i in a: print(i[1], i[2])
[ "sys.stdin.readline" ]
[((59, 79), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (77, 79), False, 'import sys\n'), ((127, 147), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (145, 147), False, 'import sys\n')]
# Copyright 2015 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "perfkitbenchmarker.configs.LoadConfig", "perfkitbenchmarker.linux_packages.php.ConfigureAndBuild", "re.escape", "time.sleep", "logging.info", "perfkitbenchmarker.sample.Sample", "posixpath.join", "perfkitbenchmarker.linux_packages.php.InstallAPC", "perfkitbenchmarker.flags.DEFINE_integer", "perfk...
[((1060, 1109), 'posixpath.join', 'posixpath.join', (['vm_util.VM_TMP_DIR', '"""web-release"""'], {}), "(vm_util.VM_TMP_DIR, 'web-release')\n", (1074, 1109), False, 'import posixpath\n'), ((1445, 1475), 'posixpath.join', 'posixpath.join', (['APP_DIR', '"""etc"""'], {}), "(APP_DIR, 'etc')\n", (1459, 1475), False, 'impor...
# Copyright 2020 - 2021 MONAI Consortium # 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...
[ "monai.networks.layers.factories.split_args", "torch.nn.Flatten" ]
[((6322, 6334), 'torch.nn.Flatten', 'nn.Flatten', ([], {}), '()\n', (6332, 6334), True, 'import torch.nn as nn\n'), ((2751, 2771), 'monai.networks.layers.factories.split_args', 'split_args', (['last_act'], {}), '(last_act)\n', (2761, 2771), False, 'from monai.networks.layers.factories import Act, Norm, split_args\n')]
from __future__ import with_statement import os from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig config = context.config fileConfig(config.config_file_name) import acoustid.tables target_metadata = acoustid.tables.metadata import acoustid.config acoust...
[ "alembic.context.is_offline_mode", "os.path.dirname", "alembic.context.configure", "alembic.context.run_migrations", "logging.config.fileConfig", "alembic.context.begin_transaction" ]
[((187, 222), 'logging.config.fileConfig', 'fileConfig', (['config.config_file_name'], {}), '(config.config_file_name)\n', (197, 222), False, 'from logging.config import fileConfig\n'), ((1836, 1861), 'alembic.context.is_offline_mode', 'context.is_offline_mode', ([], {}), '()\n', (1859, 1861), False, 'from alembic impo...
#!/usr/bin/python """Generator of the mapping from OpenType tags to BCP 47 tags and vice versa. It creates a ``const LangTag[]``, matching the tags from the OpenType languages system tag list to the language subtags of the BCP 47 language subtag registry, with some manual adjustments. The mappings are supplemented wi...
[ "html.unescape", "re.split", "collections.defaultdict", "re.sub", "sys.stdout.flush", "io.open", "itertools.chain", "html.parser.HTMLParser.__init__", "sys.exit" ]
[((26808, 26837), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (26831, 26837), False, 'import collections\n'), ((1411, 1422), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1419, 1422), False, 'import sys\n'), ((1503, 1519), 'html.unescape', 'unescape', (['entity'], {}), '(entity)...
""" 文本转Midi 作者: Scarlett凛子 QQ: 1587524 格式:多行文本,包括参数行与音符行。行内出现参数时则视为参数行,不解析音符。 参数行: 调号:支持大调(1=)和小调(6=)记号,另支持低八度(末尾带2)或高八度(末尾带4)。 示例:1=C,6=A,1=Bb,1=C2,1=C4。默认1=C。 节拍:数字+bpm。 示例:140bpm。默认120。 音符行:01234567是八个音符,每个音符后面加符号来表示时值和音高。 音高:#:升半音,b:降半音,.:高八...
[ "mido.MidiFile", "ay_advance.AyStr", "mido.Message", "mido.MidiTrack", "re.search" ]
[((3083, 3098), 'mido.MidiFile', 'mido.MidiFile', ([], {}), '()\n', (3096, 3098), False, 'import mido\n'), ((3127, 3143), 'mido.MidiTrack', 'mido.MidiTrack', ([], {}), '()\n', (3141, 3143), False, 'import mido\n'), ((1372, 1423), 're.search', 're.search', (['"""([16])=([ABCDEFG])([#b]?)([24]?)"""', 'line'], {}), "('([1...
#!/usr/bin/env python3 from aoc2021.util import print_solutions, import_strs import timeit Mark = "M" def part_1(inputs): called, boards = inputs for target in called: for board in boards: if mark_board(board, target) and check_board(board): return score_board(board) * t...
[ "aoc2021.util.print_solutions" ]
[((2012, 2102), 'aoc2021.util.print_solutions', 'print_solutions', (["['resources/day4-test.txt', 'resources/day4.txt']", 'read_bingo', 'part_2'], {}), "(['resources/day4-test.txt', 'resources/day4.txt'],\n read_bingo, part_2)\n", (2027, 2102), False, 'from aoc2021.util import print_solutions, import_strs\n')]
#----------------------------------------------------------------------------- # Copyright (c) 2005-2021, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
[ "PyInstaller.utils.hooks.gi.collect_glib_share_files", "PyInstaller.utils.hooks.gi.collect_glib_translations", "PyInstaller.utils.hooks.gi.collect_glib_etc_files", "PyInstaller.utils.hooks.gi.get_gi_typelibs", "PyInstaller.utils.hooks.get_hook_config", "os.path.join" ]
[((879, 908), 'PyInstaller.utils.hooks.gi.get_gi_typelibs', 'get_gi_typelibs', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (894, 908), False, 'from PyInstaller.utils.hooks.gi import collect_glib_share_files, collect_glib_etc_files, collect_glib_translations, get_gi_typelibs\n'), ((919, 957), 'PyInstaller.util...
from django.db import models from cart.models import Cart import math from billing.models import BillingProfile from addresses.models import Address # Create your models here. from django.db.models.signals import pre_save ,post_save from ecommerce.utils import * ORDER_STATUS_CHOICES = ( ('created','Created'), ...
[ "django.db.models.signals.pre_save.connect", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.DecimalField", "math.fsum", "django.db.models.signals.post_save.connect" ]
[((2835, 2891), 'django.db.models.signals.pre_save.connect', 'pre_save.connect', (['pre_save_create_order_id'], {'sender': 'Order'}), '(pre_save_create_order_id, sender=Order)\n', (2851, 2891), False, 'from django.db.models.signals import pre_save, post_save\n'), ((3237, 3289), 'django.db.models.signals.post_save.conne...
# -*- coding: utf-8 -*- import pymc3 as pm import theano import theano.tensor as tt import numpy as np import pandas as pd import isoweek import pickle as pkl import datetime import time from collections import OrderedDict from matplotlib import pyplot as pp from geo_utils import jacobian_sq # BUG: may throw an error f...
[ "numpy.empty", "numpy.floor", "theano.tensor.deg2rad", "numpy.frompyfunc", "isoweek.Week", "theano.tensor.fvector", "pandas.DataFrame", "theano.tensor.set_subtensor", "numpy.power", "theano.tensor.zeros_like", "theano.tensor.fmatrix", "geo_utils.jacobian_sq", "numpy.random.choice", "pandas...
[((522, 535), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (533, 535), False, 'from collections import OrderedDict\n'), ((1014, 1027), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1025, 1027), False, 'from collections import OrderedDict\n'), ((1336, 1349), 'collections.OrderedDict', 'Orde...
__author__ = '<NAME>' from nugscraper import util def test_download_file_with_progressbar(): pass def test_get_payload(): payload = util.get_payload('some_username', 'some_password') assert payload['ctl00$cphAuth$ctl00$frmUsername'] == 'some_username' assert payload['ctl00$cphAuth$ctl00$frmPassword...
[ "nugscraper.util.get_payload" ]
[((145, 195), 'nugscraper.util.get_payload', 'util.get_payload', (['"""some_username"""', '"""some_password"""'], {}), "('some_username', 'some_password')\n", (161, 195), False, 'from nugscraper import util\n')]
"""The Synology DSM component.""" from __future__ import annotations import logging from synology_dsm.exceptions import SynologyDSMException from homeassistant.core import HomeAssistant, ServiceCall from .common import SynoApi from .const import ( CONF_SERIAL, DOMAIN, SERVICE_REBOOT, SERVICE_SHUTDOW...
[ "logging.getLogger" ]
[((363, 390), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (380, 390), False, 'import logging\n')]
import torch import torch.nn as nn import torch.nn.functional as F def batchnorm(in_planes): return nn.BatchNorm2d(in_planes, affine=True, eps=1e-5, momentum=0.1) def conv3x3(in_planes, out_planes, stride=1, bias=False): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, ...
[ "torch.nn.ReLU", "torch.nn.ReLU6", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.nn.functional.relu", "torch.nn.MaxPool2d" ]
[((105, 168), 'torch.nn.BatchNorm2d', 'nn.BatchNorm2d', (['in_planes'], {'affine': '(True)', 'eps': '(1e-05)', 'momentum': '(0.1)'}), '(in_planes, affine=True, eps=1e-05, momentum=0.1)\n', (119, 168), True, 'import torch.nn as nn\n'), ((238, 326), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_planes', 'out_planes'], {'kernel_s...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: D:\dev\TS4\_deploy\Client\Releasex64\Python\Generated\protocolbuffers\PersistenceBlobs_pb2.py # Compiled at: 2020-12-13 14:23:57 # Siz...
[ "google.protobuf.descriptor.FieldDescriptor", "google.protobuf.descriptor_pb2.FieldOptions", "google.protobuf.descriptor.FileDescriptor" ]
[((624, 1096), 'google.protobuf.descriptor.FileDescriptor', 'descriptor.FileDescriptor', ([], {'name': '"""PersistenceBlobs.proto"""', 'package': '"""EA.Sims4.Persistence"""', 'serialized_pb': '"""\n\x16PersistenceBlobs.proto\x12\x14EA.Sims4.Persistence\x1a\x0cConsts.proto\x1a\x0eS4Common.proto"\x8c\x02\n\x1eBlobSimFac...
#!/usr/bin/env python # vim: et ts=4 sw=4 from django.conf import settings from django.db import models GENDER_CHOICES = ( ("M", "Male"), ("F", "Female") ) class Human(models.Model): name = models.CharField(max_length=30, unique=True) gender = models.CharField(max_length=1, choices=GENDER_CHOICE...
[ "django.db.models.CharField", "django.db.models.DateField", "django.db.models.EmailField" ]
[((210, 254), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)', 'unique': '(True)'}), '(max_length=30, unique=True)\n', (226, 254), False, 'from django.db import models\n'), ((268, 322), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(1)', 'choices': 'GENDER_CHOICES'}...
from flask import current_app as app import time, json, hashlib, hmac from datetime import datetime def verify_slack_request(slack_signature=None, slack_request_timestamp=None, request_body=None) -> bool: """ Input: Slack signature, slack timstamp of message, and body Ouput: Return true if verification is ...
[ "hmac.new", "time.time", "datetime.datetime.now", "hmac.compare_digest" ]
[((1245, 1301), 'hmac.compare_digest', 'hmac.compare_digest', (['computed_signature', 'slack_signature'], {}), '(computed_signature, slack_signature)\n', (1264, 1301), False, 'import time, json, hashlib, hmac\n'), ((417, 428), 'time.time', 'time.time', ([], {}), '()\n', (426, 428), False, 'import time, json, hashlib, h...
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "tensorflow.test.main", "tempfile.mkstemp", "tensorflow.io.gfile.exists", "tfx.orchestration.pipeline.Pipeline", "os.environ.get", "tfx.components.base.base_component.ChannelParameter", "tfx.types.Channel", "tfx.orchestration.pipeline.PipelineDecorator", "os.path.join", "tfx.types.Artifact" ]
[((9771, 9785), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (9783, 9785), True, 'import tensorflow as tf\n'), ((2485, 2541), 'os.environ.get', 'os.environ.get', (['"""TFX_JSON_EXPORT_PIPELINE_ARGS_PATH"""', '""""""'], {}), "('TFX_JSON_EXPORT_PIPELINE_ARGS_PATH', '')\n", (2499, 2541), False, 'import os\n')...
import argparse import os import zipfile def make_rel_archive(a_args): archive = zipfile.ZipFile(a_args.name + ".zip", "w", zipfile.ZIP_DEFLATED) archive.write( a_args.dll, "SKSE/Plugins/{}".format(os.path.basename(a_args.dll))) archive.write( os.path.join(a_args.src_dir, "QuickLootRE.toml"), "SKSE/Plugins/...
[ "os.mkdir", "zipfile.ZipFile", "argparse.ArgumentParser", "os.path.basename", "os.path.join", "os.chdir" ]
[((83, 147), 'zipfile.ZipFile', 'zipfile.ZipFile', (["(a_args.name + '.zip')", '"""w"""', 'zipfile.ZIP_DEFLATED'], {}), "(a_args.name + '.zip', 'w', zipfile.ZIP_DEFLATED)\n", (98, 147), False, 'import zipfile\n'), ((493, 566), 'zipfile.ZipFile', 'zipfile.ZipFile', (["(a_args.name + '_pdb' + '.zip')", '"""w"""', 'zipfil...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
[ "inspect.stack" ]
[((29371, 29386), 'inspect.stack', 'inspect.stack', ([], {}), '()\n', (29384, 29386), False, 'import inspect\n')]
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "official.nlp.bert.tf1_checkpoint_converter_lib.convert", "os.path.join", "official.nlp.bert.tf1_checkpoint_converter_lib.create_v2_checkpoint", "absl.flags.DEFINE_string", "official.nlp.albert.configs.AlbertConfig.from_json_file", "absl.app.run", "tensorflow.keras.initializers.TruncatedNormal", "offi...
[((1128, 1236), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""albert_config_file"""', 'None', '"""Albert configuration file to define core bert layers."""'], {}), "('albert_config_file', None,\n 'Albert configuration file to define core bert layers.')\n", (1147, 1236), False, 'from absl import flags\n'), ...
import os from vgazer.command import GetCommandOutputUtf8 from vgazer.command import RunCommand from vgazer.exceptions import CommandError from vgazer.exceptions import InstallError from vgazer.exceptions import GithubApiRateLimitExceeded from vgazer.github_common import GithubCheckApi...
[ "vgazer.command.RunCommand", "vgazer.github_common.GithubCheckApiRateLimitExceeded", "vgazer.working_dir.WorkingDir", "vgazer.exceptions.InstallError", "vgazer.command.GetCommandOutputUtf8", "vgazer.exceptions.GithubApiRateLimitExceeded", "vgazer.platform.GetFilesystemType", "vgazer.store.temp.StoreTe...
[((585, 596), 'vgazer.store.temp.StoreTemp', 'StoreTemp', ([], {}), '()\n', (594, 596), False, 'from vgazer.store.temp import StoreTemp\n'), ((967, 1004), 'vgazer.github_common.GithubCheckApiRateLimitExceeded', 'GithubCheckApiRateLimitExceeded', (['tags'], {}), '(tags)\n', (998, 1004), False, 'from vgazer.github_common...
#!/bin/env python import web, os from cgatReport import Cache from cgatReport import Utils from cgatReport import DataTree urls = ( '/data/(.*)', 'DataTable', '/index/(.*)', 'Index' ) # expose zip within templates global_vars = {'zip': zip } render = web.template.render('templates/', globals = global_var...
[ "cgatReport.Cache.Cache", "cgatReport.DataTree.tree2table", "web.template.render", "cgatReport.DataTree.fromCache" ]
[((266, 320), 'web.template.render', 'web.template.render', (['"""templates/"""'], {'globals': 'global_vars'}), "('templates/', globals=global_vars)\n", (285, 320), False, 'import web, os\n'), ((483, 513), 'cgatReport.Cache.Cache', 'Cache.Cache', (['tracker'], {'mode': '"""r"""'}), "(tracker, mode='r')\n", (494, 513), ...
# # This file is 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...
[ "pdpf.logger.setLevel", "pdpf.pdpfctx.PdpfCtx.createInstance", "pyspark.sql.types.StringType", "test_support.test_runner.TestConfig.sparkSession" ]
[((1052, 1081), 'pdpf.logger.setLevel', 'pdpf.logger.setLevel', (['"""DEBUG"""'], {}), "('DEBUG')\n", (1072, 1081), False, 'import pdpf\n'), ((1152, 1177), 'test_support.test_runner.TestConfig.sparkSession', 'TestConfig.sparkSession', ([], {}), '()\n', (1175, 1177), False, 'from test_support.test_runner import TestConf...
# XBR test accounts, generated from seed phrase: # myth like bonus scare over problem client lizard pioneer submit female collect # export XBR_DEBUG_TOKEN_ADDR="0xcfeb869f69431e42cdb54a4f4f105c19c080a601" # export XBR_DEBUG_NETWORK_ADDR="0x254dffcd3277c0b1660f6d42efbb754edababc2b" import web3 from autobahn import xbr...
[ "web3.Web3.toChecksumAddress", "click.style" ]
[((548, 621), 'web3.Web3.toChecksumAddress', 'web3.Web3.toChecksumAddress', (['"""0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1"""'], {}), "('0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1')\n", (575, 621), False, 'import web3\n'), ((670, 743), 'web3.Web3.toChecksumAddress', 'web3.Web3.toChecksumAddress', (['"""0xffcf8fdee72a...
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase from django.contrib.auth import get_user_model User = get_user_model() class CommandTests(TestCase): def test_initadmin(self): """Test initial a...
[ "django.core.management.call_command", "django.contrib.auth.get_user_model" ]
[((215, 231), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (229, 231), False, 'from django.contrib.auth import get_user_model\n'), ((356, 381), 'django.core.management.call_command', 'call_command', (['"""initadmin"""'], {}), "('initadmin')\n", (368, 381), False, 'from django.core.managemen...
#! /usr/bin/env python3 import sys import os if __name__ != "__main__": exit('This script should only be executed directly') else: sys.path.append(os.path.join(os.path.dirname(__file__),'ortec','scientific','benchmarks')) from loadbuilding import ApplicableConstraintsObjectives ApplicableConst...
[ "os.path.dirname", "loadbuilding.ApplicableConstraintsObjectives.main" ]
[((305, 343), 'loadbuilding.ApplicableConstraintsObjectives.main', 'ApplicableConstraintsObjectives.main', ([], {}), '()\n', (341, 343), False, 'from loadbuilding import ApplicableConstraintsObjectives\n'), ((176, 201), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (191, 201), False, 'import...
import warnings from functools import wraps from django.utils.cache import add_never_cache_headers from django.utils.decorators import available_attrs from django.views.decorators.cache import cache_page from django.views.decorators.vary import vary_on_headers from rest_framework import exceptions from rest_framework....
[ "django.utils.decorators.available_attrs", "rest_framework.exceptions.PermissionDenied", "django.utils.cache.add_never_cache_headers", "rest_framework.response.Response", "django.views.decorators.cache.cache_page", "warnings.warn", "django.views.decorators.vary.vary_on_headers" ]
[((1451, 1484), 'django.utils.cache.add_never_cache_headers', 'add_never_cache_headers', (['response'], {}), '(response)\n', (1474, 1484), False, 'from django.utils.cache import add_never_cache_headers\n'), ((1008, 1034), 'django.utils.decorators.available_attrs', 'available_attrs', (['view_func'], {}), '(view_func)\n'...
""" Testcases for some configuration features: - .yaml and .py configuration files - text file in run directory from template - text and json format in template - hdf5 input - relative symbolic links - default config values """ from profit.config import Config from profit.util import load from json import load as jloa...
[ "subprocess.run", "os.remove", "os.path.abspath", "json.load", "profit.config.Config.from_file", "os.getcwd", "pytest.fixture", "os.path.exists", "numpy.genfromtxt", "os.path.isfile", "shutil.rmtree", "os.path.join", "os.chdir" ]
[((493, 514), 'pytest.fixture', 'fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (500, 514), False, 'from pytest import fixture\n'), ((557, 565), 'os.getcwd', 'getcwd', ([], {}), '()\n', (563, 565), False, 'from os import path, remove, chdir, getcwd\n'), ((628, 650), 'os.chdir', 'chdir', (['pytest_root_dir']...
""" A notebook server extension that expose kernel spec """ __version__ = '0.0.1' from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler from jupyter_client import KernelManager from jupyter_server.base.handlers import APIHandler from jupyter_server.utils import url_path_join fr...
[ "json.loads", "tornado.escape.json_decode", "pathlib.Path", "http.client.responses.get", "jupyter_server.utils.url_path_join" ]
[((4529, 4573), 'jupyter_server.utils.url_path_join', 'url_path_join', (['base_url', 'url_path', '"""/(\\\\w+)"""'], {}), "(base_url, url_path, '/(\\\\w+)')\n", (4542, 4573), False, 'from jupyter_server.utils import url_path_join\n'), ((2873, 2918), 'tornado.escape.json_decode', 'tornado.escape.json_decode', (['self.re...
import pandas as bunglon class farisIhsan: def fmi(self, harga): print("masukan Harga") print(harga) data = bunglon.read_csv('kelas_2b/Faris.csv') print(data) print("") print("") print(data[data['Harga'] < harga]) p...
[ "pandas.read_csv" ]
[((146, 184), 'pandas.read_csv', 'bunglon.read_csv', (['"""kelas_2b/Faris.csv"""'], {}), "('kelas_2b/Faris.csv')\n", (162, 184), True, 'import pandas as bunglon\n')]
# -*- coding: latin-1 -*- # ----------------------------------------------------------------------------- # Copyright 2011-2013 <NAME> <<EMAIL>> # # Licensed under the EUPL, Version 1.1 or - as soon they # will be approved by the European Commission - subsequent # versions of the EUPL (the "Licence"); # You may not us...
[ "os.strerror", "logging.getLogger", "time.sleep" ]
[((922, 949), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (939, 949), False, 'import logging\n'), ((3396, 3415), 'time.sleep', 'time.sleep', (['timeout'], {}), '(timeout)\n', (3406, 3415), False, 'import time\n'), ((1559, 1584), 'os.strerror', 'os.strerror', (['errno.ENODEV'], {}), '(e...
from datetime import date from gazette.spiders.base.imprensa_oficial import ImprensaOficialSpider class BaItaquaraSpider(ImprensaOficialSpider): name = "ba_itaquara" allowed_domains = ["pmitaquaraba.imprensaoficial.org", "itaquara.ba.gov.br"] start_date = date(2019, 1, 1) end_date = date.today() ...
[ "datetime.date", "datetime.date.today" ]
[((272, 288), 'datetime.date', 'date', (['(2019)', '(1)', '(1)'], {}), '(2019, 1, 1)\n', (276, 288), False, 'from datetime import date\n'), ((304, 316), 'datetime.date.today', 'date.today', ([], {}), '()\n', (314, 316), False, 'from datetime import date\n')]
# -*- coding: utf-8 -*- """ Exercise 3 Author: <NAME> """ import numpy as np import matplotlib.pyplot as plt np.random.seed(1) def STOP_EXECUTION_TO_SEE_RESULT(): input('\n--- End of a section, press any enter to continue ---\n') def f(x,y): ''' Function to minimize ''' return np.float64( ...
[ "matplotlib.pyplot.title", "numpy.random.seed", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "matplotlib.pyplot.legend", "numpy.sin", "numpy.array", "numpy.cos", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((112, 129), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (126, 129), True, 'import numpy as np\n'), ((1976, 1997), 'numpy.array', 'np.array', (['[-1.0, 1.0]'], {}), '([-1.0, 1.0])\n', (1984, 1997), True, 'import numpy as np\n'), ((2837, 2846), 'matplotlib.pyplot.clf', 'plt.clf', ([], {}), '()\n', (2...
import hashlib import netaddr def genmac(value, prefix='', length=12): ''' deterministically generates a "random" MAC with a configurable prefix ''' # from: http://serverfault.com/questions/40712/what-range-of-mac-addresses-can-i-safely-use-for-my-virtual-machines if prefix == '' : mac_pre...
[ "netaddr.EUI", "hashlib.new" ]
[((407, 426), 'hashlib.new', 'hashlib.new', (['"""sha1"""'], {}), "('sha1')\n", (418, 426), False, 'import hashlib\n'), ((537, 560), 'netaddr.EUI', 'netaddr.EUI', (['mac_string'], {}), '(mac_string)\n', (548, 560), False, 'import netaddr\n')]
import re txt = '''Hi I am <NAME> a CS student at my 4th grade in FCIS MU. Here is my fake contact information.. Email : <EMAIL>, obviously its an example email not a real one :-) Other emails for testing : - <EMAIL> - <EMAIL> - <EMAIL> - <EMAIL> - <EMAIL> - <EMAIL> Also i have some examples of phone numbers for testi...
[ "re.findall" ]
[((1205, 1230), 're.findall', 're.findall', (['emails_r', 'txt'], {}), '(emails_r, txt)\n', (1215, 1230), False, 'import re\n'), ((1344, 1372), 're.findall', 're.findall', (['phone_num_r', 'txt'], {}), '(phone_num_r, txt)\n', (1354, 1372), False, 'import re\n')]
import os import sys import argparse from common import ColonyClient, LoggerService def parse_user_input(): parser = argparse.ArgumentParser(prog='Colony Sandbox Start') parser.add_argument("blueprint_name", type=str, help="The name of source blueprint") parser.add_argument("sandbox_name", type=str, help=...
[ "common.LoggerService.success", "common.LoggerService.message", "argparse.ArgumentParser", "common.LoggerService.set_output", "common.ColonyClient", "os.environ.get", "common.LoggerService.error" ]
[((122, 174), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""Colony Sandbox Start"""'}), "(prog='Colony Sandbox Start')\n", (145, 174), False, 'import argparse\n'), ((1612, 1646), 'os.environ.get', 'os.environ.get', (['"""COLONY_SPACE"""', '""""""'], {}), "('COLONY_SPACE', '')\n", (1626, 1646),...
"""Testing the Genetic Programming module's underlying datastructure (gplearn.genetic._Program) as well as the classes that use it, gplearn.genetic.SymbolicRegressor and gplearn.genetic.SymbolicTransformer.""" # Author: <NAME> <<EMAIL>> # # License: BSD 3 clause import pickle import sys from io import StringIO impor...
[ "sklearn.model_selection.GridSearchCV", "sklearn.preprocessing.StandardScaler", "gplearn.genetic.SymbolicClassifier", "sklearn.utils.testing.assert_equal", "numpy.ones", "sklearn.datasets.load_boston", "sklearn.utils.testing.assert_true", "numpy.mean", "sklearn.utils.estimator_checks.check_estimator...
[((1780, 1801), 'sklearn.utils.validation.check_random_state', 'check_random_state', (['(0)'], {}), '(0)\n', (1798, 1801), False, 'from sklearn.utils.validation import check_random_state\n'), ((1811, 1824), 'sklearn.datasets.load_boston', 'load_boston', ([], {}), '()\n', (1822, 1824), False, 'from sklearn.datasets impo...
# 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" ]
[((1936, 1967), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""accountId"""'}), "(name='accountId')\n", (1949, 1967), False, 'import pulumi\n'), ((2766, 2805), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""snapshotSchedules"""'}), "(name='snapshotSchedules')\n", (2779, 2805), False, 'import pulumi\n'), ((819...
#! /usr/bin/python2 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # import inspect import os import sys import unittest import commonl.testing import tcfl import tcfl.tc _src = os.path.abspath(__file__) _srcdir = os.path.dirname(_src) class _test(unittest.TestCase, com...
[ "unittest.main", "os.path.abspath", "inspect.stack", "os.path.dirname", "os.path.join", "tcfl.tc.target" ]
[((215, 240), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (230, 240), False, 'import os\n'), ((251, 272), 'os.path.dirname', 'os.path.dirname', (['_src'], {}), '(_src)\n', (266, 272), False, 'import os\n'), ((885, 901), 'tcfl.tc.target', 'tcfl.tc.target', ([], {}), '()\n', (899, 901), Fals...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import re from io import BytesIO, open from collections import OrderedDict import locale import platform from io import StringIO import pathlib import pytest import numpy as np from ... import ascii from ....table import Table f...
[ "io.StringIO", "io.BytesIO", "re.compile", "platform.system", "pathlib.Path", "pytest.raises", "io.open", "collections.OrderedDict", "pytest.mark.parametrize", "locale.setlocale", "numpy.all", "pytest.mark.xfail" ]
[((884, 1011), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""fast_reader"""', "[True, False, {'use_fast_converter': False}, {'use_fast_converter': True},\n 'force']"], {}), "('fast_reader', [True, False, {'use_fast_converter':\n False}, {'use_fast_converter': True}, 'force'])\n", (907, 1011), False,...
import unittest from subprocess import call from fmpy.util import download_test_file class CommandLineTest(unittest.TestCase): """ Test command line interface ('fmpy' entry point must be registered through setup.py or conda package) """ @classmethod def setUpClass(cls): # download the F...
[ "unittest.main", "fmpy.util.download_test_file", "subprocess.call" ]
[((1705, 1720), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1718, 1720), False, 'import unittest\n'), ((347, 457), 'fmpy.util.download_test_file', 'download_test_file', (['"""2.0"""', '"""ModelExchange"""', '"""MapleSim"""', '"""2016.2"""', '"""CoupledClutches"""', '"""CoupledClutches.fmu"""'], {}), "('2.0', '...
""" Asteroid Smasher Shoot space rocks in this demo program created with Python and the Arcade library. Artwork from http://kenney.nl If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.asteroids """ import pyglet import arcade import os from typing impor...
[ "os.path.abspath", "arcade.run", "typing.cast", "arcade.load_sound", "arcade.start_render", "arcade.Sprite", "arcade.check_for_collision_with_list", "arcade.SpriteList", "arcade.draw_text", "pyglet.app.exit" ]
[((3394, 3442), 'arcade.load_sound', 'arcade.load_sound', (['""":resources:sounds/hurt5.wav"""'], {}), "(':resources:sounds/hurt5.wav')\n", (3411, 3442), False, 'import arcade\n'), ((3469, 3522), 'arcade.load_sound', 'arcade.load_sound', (['""":resources:sounds/explosion1.wav"""'], {}), "(':resources:sounds/explosion1....
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from orchestrator i...
[ "test.unittest.main", "mock.patch.object", "test.get_collector_config", "mock.Mock", "orchestrator.OrchestratorCollector" ]
[((715, 749), 'mock.patch.object', 'patch.object', (['Collector', '"""publish"""'], {}), "(Collector, 'publish')\n", (727, 749), False, 'from mock import patch\n'), ((1394, 1428), 'mock.patch.object', 'patch.object', (['Collector', '"""publish"""'], {}), "(Collector, 'publish')\n", (1406, 1428), False, 'from mock impor...
from datetime import datetime import requests import json import time import urllib class VerSMS: def getmobile_cn(token, username, pid): try: url = "http://www.smscin.com/do.php?action=getmobile&username={}&token={}&pid={}&channel=[channel]".format(username, token, pid) ...
[ "requests.post" ]
[((747, 765), 'requests.post', 'requests.post', (['url'], {}), '(url)\n', (760, 765), False, 'import requests\n'), ((365, 383), 'requests.post', 'requests.post', (['url'], {}), '(url)\n', (378, 383), False, 'import requests\n'), ((984, 1003), 'requests.post', 'requests.post', (['url2'], {}), '(url2)\n', (997, 1003), Fa...
import tensorflow as tf from absl import flags from absl import app # 1. 最基本的特征: # Continuous columns. Wide和Deep组件都会用到。 age = tf.feature_column.numeric_column('age') education_num = tf.feature_column.numeric_column('education_num') capital_gain = tf.feature_column.numeric_column('capital_gain') capital_loss = tf.fea...
[ "tensorflow.feature_column.categorical_column_with_vocabulary_list", "tensorflow.gfile.Exists", "tensorflow.feature_column.embedding_column", "tensorflow.feature_column.bucketized_column", "tensorflow.data.TextLineDataset", "tensorflow.feature_column.numeric_column", "tensorflow.estimator.DNNLinearCombi...
[((129, 168), 'tensorflow.feature_column.numeric_column', 'tf.feature_column.numeric_column', (['"""age"""'], {}), "('age')\n", (161, 168), True, 'import tensorflow as tf\n'), ((185, 234), 'tensorflow.feature_column.numeric_column', 'tf.feature_column.numeric_column', (['"""education_num"""'], {}), "('education_num')\n...
# Copyright (c) 2021, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the foll...
[ "pathlib.Path", "nusex.spec.NSXSpecIO", "nusex.spec.NSPSpecIO", "nusex.spec.NSCSpecIO" ]
[((1845, 1856), 'nusex.spec.NSCSpecIO', 'NSCSpecIO', ([], {}), '()\n', (1854, 1856), False, 'from nusex.spec import NSCSpecIO, NSPSpecIO, NSXSpecIO\n'), ((1882, 1893), 'nusex.spec.NSCSpecIO', 'NSCSpecIO', ([], {}), '()\n', (1891, 1893), False, 'from nusex.spec import NSCSpecIO, NSPSpecIO, NSXSpecIO\n'), ((2241, 2252), ...
#!/usr/bin/env python from pathlib import Path import jinja2 DOCKER_REGISTRY = "308535385114.dkr.ecr.us-east-1.amazonaws.com" GITHUB_DIR = Path(__file__).parent.parent CPU_TEST_RUNNER = "linux.2xlarge" CUDA_TEST_RUNNER = "linux.8xlarge.nvidia.gpu" class PyTorchLinuxWorkflow: def __init__(self, build_environm...
[ "pathlib.Path" ]
[((143, 157), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (147, 157), False, 'from pathlib import Path\n')]