code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import autoaugment import PIL import glob import os import time from tqdm import tqdm # AutoAugment: Learning Augmentation Policies from Data, <NAME> and <NAME> and <NAME> Vijay # Vasudevan and <NAME>, 2019 # https://github.com/DeepVoltaire/AutoAugment def invoke(num=100): images = [] for img in glob.glob("da...
[ "os.mkdir", "os.path.exists", "PIL.Image.open", "time.time_ns", "glob.glob", "autoaugment.CIFAR10Policy" ]
[((307, 339), 'glob.glob', 'glob.glob', (['"""dataset/input/*.jpg"""'], {}), "('dataset/input/*.jpg')\n", (316, 339), False, 'import glob\n'), ((527, 541), 'time.time_ns', 'time.time_ns', ([], {}), '()\n', (539, 541), False, 'import time\n'), ((799, 813), 'time.time_ns', 'time.time_ns', ([], {}), '()\n', (811, 813), Fa...
import os # This shouldn't change... But if it does, we will probably figure it out after a few hours of debugging. IKON_LOGIN_URL = 'https://account.ikonpass.com/en/login' # Set your username and password as an environment variables in Powershell: # $env:IKON_LOGIN_USERNAME = 'YOUR_USERNAME_HERE' # $env:IKON_LOGIN_P...
[ "os.getenv" ]
[((365, 397), 'os.getenv', 'os.getenv', (['"""IKON_LOGIN_USERNAME"""'], {}), "('IKON_LOGIN_USERNAME')\n", (374, 397), False, 'import os\n'), ((420, 452), 'os.getenv', 'os.getenv', (['"""IKON_LOGIN_PASSWORD"""'], {}), "('IKON_LOGIN_PASSWORD')\n", (429, 452), False, 'import os\n')]
from django.urls import reverse import datetime import debug # pyflakes:ignore from ietf.utils.test_utils import TestCase, unicontent from ietf.group.factories import GroupFactory, RoleFactory from ietf.meeting.models import Session, ResourceAssociation from ietf.meeting.factories import Me...
[ "ietf.meeting.models.Session.objects.filter", "ietf.meeting.models.ResourceAssociation.objects.create", "pyquery.PyQuery", "ietf.utils.mail.empty_outbox", "ietf.utils.test_utils.unicontent", "ietf.meeting.factories.SessionFactory.create_batch", "ietf.person.models.Person.objects.get", "datetime.date.t...
[((874, 888), 'ietf.group.factories.GroupFactory', 'GroupFactory', ([], {}), '()\n', (886, 888), False, 'from ietf.group.factories import GroupFactory, RoleFactory\n'), ((1155, 1221), 'ietf.meeting.factories.SessionFactory.create_batch', 'SessionFactory.create_batch', (['(2)'], {'meeting': 'meeting', 'status_id': '"""s...
from glob import glob files = glob("/mnt/work/endrebak/ldetect/1kg/partition_covariances/CEU/chr22/*.pq") import pandas as pd import numpy as np d = {} dfs = [] for i, f in enumerate(files): print(i/len(files)) df = pd.read_parquet(f) dfs.append(df) # for k1, k2, v in df.itertuples(index=False): ...
[ "pandas.read_parquet", "glob.glob" ]
[((30, 105), 'glob.glob', 'glob', (['"""/mnt/work/endrebak/ldetect/1kg/partition_covariances/CEU/chr22/*.pq"""'], {}), "('/mnt/work/endrebak/ldetect/1kg/partition_covariances/CEU/chr22/*.pq')\n", (34, 105), False, 'from glob import glob\n'), ((227, 245), 'pandas.read_parquet', 'pd.read_parquet', (['f'], {}), '(f)\n', (...
import argparse import boto3 import json import os import sys from six.moves import urllib import uuid import traceback from botocore.exceptions import ClientError from dictionary_sorter import divide from dictionary_sorter import merge from dictionary_sorter import build from harness import config from harness impor...
[ "json.load", "uuid.uuid4", "argparse.ArgumentParser", "boto3.Session", "harness.config.Config", "harness.decider.run_decider", "os.environ.get", "six.moves.urllib.request.urlopen", "harness.worker.run_worker", "traceback.format_exc", "harness.config.TaskConfig", "harness.cloudwatch.OutputHandl...
[((429, 454), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (452, 454), False, 'import argparse\n'), ((2255, 2320), 'boto3.Session', 'boto3.Session', ([], {'region_name': 'args.region', 'profile_name': 'args.profile'}), '(region_name=args.region, profile_name=args.profile)\n', (2268, 2320), Fa...
""" Entities of a dataset classes. """ from qas.wikidata import Wikidata, WikidataItemsNotFound STRICT_NAME = False # filter not same Wikidata PRIMARY_COUNT = 1 RETRY_PARALLEL_MATCHING = False def matching_parallel(indexed_noun_phrases, disable_wordnet=False): # optimization step # parallel enitites linkin...
[ "qas.wikidata.Wikidata.extract_claims", "qas.wikidata.Wikidata.search_by_label", "qas.wikidata.WikidataItemsNotFound", "qas.wikidata.Wikidata.search_by_label_parallel" ]
[((782, 833), 'qas.wikidata.Wikidata.search_by_label_parallel', 'Wikidata.search_by_label_parallel', (['matching_queries'], {}), '(matching_queries)\n', (815, 833), False, 'from qas.wikidata import Wikidata, WikidataItemsNotFound\n'), ((1954, 1983), 'qas.wikidata.Wikidata.extract_claims', 'Wikidata.extract_claims', (['...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "marvin.lib.base.FireWallRule.create", "marvin.lib.common.list_nat_rules", "marvin.lib.base.Account.create", "marvin.cloudstackAPI.removeNicFromVirtualMachine.removeNicFromVirtualMachineCmd", "marvin.lib.utils.get_hypervisor_type", "marvin.lib.common.list_events", "marvin.lib.base.VPC.create", "marvin...
[((13249, 13279), 'nose.plugins.attrib.attr', 'attr', ([], {'tags': "['advanced', 'dvs']"}), "(tags=['advanced', 'dvs'])\n", (13253, 13279), False, 'from nose.plugins.attrib import attr\n'), ((13285, 13311), 'ddt.data', 'data', (['"""isolated"""', '"""shared"""'], {}), "('isolated', 'shared')\n", (13289, 13311), False,...
"""well_utils.py: functions used by the classes in resqpy.well""" version = '10th November 2021' # Nexus is a registered trademark of the Halliburton Company # RMS and ROXAR are registered trademarks of Roxar Software Solutions AS, an Emerson company import logging log = logging.getLogger(__name__) import numpy as...
[ "resqpy.olio.xml_et.citation_title_for_node", "numpy.zeros", "resqpy.olio.keyword_files.skip_blank_lines_and_comments", "numpy.isnan", "resqpy.olio.grid_functions.triangles_for_cell_faces", "resqpy.olio.keyword_files.blank_line", "numpy.mean", "numpy.array", "resqpy.olio.xml_et.node_type", "resqpy...
[((276, 303), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (293, 303), False, 'import logging\n'), ((1616, 1627), 'numpy.zeros', 'np.zeros', (['(3)'], {}), '(3)\n', (1624, 1627), True, 'import numpy as np\n'), ((2738, 2765), 'numpy.mean', 'np.mean', (['cp'], {'axis': '(0, 1, 2)'}), '(cp...
## ---------------------------------------------------------------------------- from tensorflow.keras import models, layers from tensorflow.keras import metrics from tensorflow.keras import optimizers from tensorflow.keras import losses from tensorflow.keras import regularizers class MulticlassAUC(metrics.AUC): "...
[ "tensorflow.keras.layers.MaxPooling2D", "tensorflow.keras.regularizers.l2", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Dense", "tensorflow.keras.metrics.CategoricalAccuracy", "tensorflow.keras.metrics.Recall", "tensorflow.keras.losses.CategoricalCrossentropy", "tensorflow.keras.layers...
[((2446, 2490), 'tensorflow.keras.metrics.CategoricalAccuracy', 'metrics.CategoricalAccuracy', ([], {'name': '"""accuracy"""'}), "(name='accuracy')\n", (2473, 2490), False, 'from tensorflow.keras import metrics\n'), ((2496, 2543), 'tensorflow.keras.metrics.Precision', 'metrics.Precision', ([], {'class_id': '(1)', 'name...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import sys import time from math import ceil from typing import List, Tuple from unittest.mock import patch...
[ "ax.storage.sqa_store.encoder.Encoder", "ax.core.metric.Metric", "ax.metrics.branin.branin", "ax.storage.sqa_store.decoder.Decoder", "ax.core.parameter.ChoiceParameter", "ax.utils.common.typeutils.not_none", "ax.service.ax_client.AxClient.from_json_snapshot", "ax.core.parameter.FixedParameter", "num...
[((4809, 4931), 'unittest.mock.patch', 'patch', (['"""ax.modelbridge.random.RandomModelBridge.feature_importances"""'], {'autospec': '(True)', 'return_value': "{'x': 0.9, 'y': 1.1}"}), "('ax.modelbridge.random.RandomModelBridge.feature_importances',\n autospec=True, return_value={'x': 0.9, 'y': 1.1})\n", (4814, 4931...
from datetime import datetime import pytest import pytz from pytz import timezone from opennem.utils.dates import parse_date from opennem.utils.timezone import is_aware UTC = pytz.utc class TestUtilDates(object): def test_date_none(self): with pytest.raises(ValueError) as excinfo: parse_dat...
[ "pytest.raises", "datetime.datetime", "opennem.utils.timezone.is_aware", "opennem.utils.dates.parse_date" ]
[((732, 758), 'opennem.utils.dates.parse_date', 'parse_date', (['"""1/11/08 0:00"""'], {}), "('1/11/08 0:00')\n", (742, 758), False, 'from opennem.utils.dates import parse_date\n'), ((780, 810), 'datetime.datetime', 'datetime', (['(2008)', '(11)', '(1)', '(0)', '(0)', '(0)'], {}), '(2008, 11, 1, 0, 0, 0)\n', (788, 810)...
import tornado, tornado.web, tornado.ioloop import os PATHS = { 'webroot': './html', 'modules': {} } def check_for_node_modules( node_modules ): if os.path.isdir( node_modules ): for dirname in os.listdir( node_modules ): path = os.path.join(node_modules, dirname) for filename in os.listdir(path): if fil...
[ "tornado.web.HTTPError", "os.path.join", "tornado.ioloop.IOLoop.instance", "os.path.isdir", "os.path.isfile", "tornado.web.Application", "os.listdir" ]
[((2915, 2948), 'tornado.web.Application', 'tornado.web.Application', (['handlers'], {}), '(handlers)\n', (2938, 2948), False, 'import tornado, tornado.web, tornado.ioloop\n'), ((151, 178), 'os.path.isdir', 'os.path.isdir', (['node_modules'], {}), '(node_modules)\n', (164, 178), False, 'import os\n'), ((605, 621), 'os....
""" main.py @author: ksuchak1990 Python script for running experiments with the enkf. """ # Imports import numpy as np from experiment_utils import Modeller, Visualiser np.random.seed(42) # Functions # def testing(): # """ # Testing function # Overall function that wraps around what we want to run at an...
[ "experiment_utils.Modeller.run_model_collisions", "numpy.random.seed" ]
[((171, 189), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (185, 189), True, 'import numpy as np\n'), ((1036, 1067), 'experiment_utils.Modeller.run_model_collisions', 'Modeller.run_model_collisions', ([], {}), '()\n', (1065, 1067), False, 'from experiment_utils import Modeller, Visualiser\n')]
from base.base_train import BaseTrain from tqdm import tqdm import numpy as np class ExampleTrainer(BaseTrain): def __init__(self, sess, model, data, config,logger): super(ExampleTrainer, self).__init__(sess, model, data, config,logger) def train_epoch(self): loop = tqdm(range(self.config.num...
[ "numpy.mean" ]
[((518, 533), 'numpy.mean', 'np.mean', (['losses'], {}), '(losses)\n', (525, 533), True, 'import numpy as np\n'), ((568, 581), 'numpy.mean', 'np.mean', (['accs'], {}), '(accs)\n', (575, 581), True, 'import numpy as np\n')]
# -*- coding: utf-8 -*- import requests from requests.compat import urljoin from ngta import TestContextManager, parametrize, skip from .base import RestBaseTestCase, RestNotFoundTestCase, randstr import logging logger = logging.getLogger(__name__) testsuite_json_schema = { "type": "object", "properties": {...
[ "requests.compat.urljoin", "ngta.TestContextManager.current_context", "logging.getLogger", "ngta.skip" ]
[((223, 250), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (240, 250), False, 'import logging\n'), ((3098, 3121), 'ngta.skip', 'skip', (['"""Not Implemented"""'], {}), "('Not Implemented')\n", (3102, 3121), False, 'from ngta import TestContextManager, parametrize, skip\n'), ((2483, 2526...
#! /usr/bin/env python """Author: <NAME> Helper functions to prepare and process data Email: <EMAIL> """ from __future__ import division import glob import math import errno import os import shutil import numpy as np import multiprocessing as mp import insar.sario from insar.log import get_log, log_runtime logger = g...
[ "numpy.abs", "numpy.iscomplexobj", "os.makedirs", "numpy.sum", "numpy.ceil", "os.path.isdir", "math.floor", "os.path.isfile", "insar.log.get_log", "shutil.move", "multiprocessing.Pool", "glob.glob", "numpy.log10", "os.path.split", "os.path.join", "os.access", "numpy.vstack", "multi...
[((319, 328), 'insar.log.get_log', 'get_log', ([], {}), '()\n', (326, 328), False, 'from insar.log import get_log, log_runtime\n'), ((830, 852), 'os.path.split', 'os.path.split', (['program'], {}), '(program)\n', (843, 852), False, 'import os\n'), ((2022, 2044), 'numpy.iscomplexobj', 'np.iscomplexobj', (['image'], {}),...
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013,2014,2015,2016,2017 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
[ "unittest.TextTestRunner", "unittest.TestLoader", "utils.import_depends" ]
[((857, 879), 'utils.import_depends', 'utils.import_depends', ([], {}), '()\n', (877, 879), False, 'import utils\n'), ((17988, 18009), 'unittest.TestLoader', 'unittest.TestLoader', ([], {}), '()\n', (18007, 18009), False, 'import unittest\n'), ((18049, 18085), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], ...
import pytest from django.urls import reverse from rest_framework import status from api.applications.enums import ApplicationExportType, GoodsTypeCategory from api.applications.models import OpenApplication, CountryOnApplication from api.cases.enums import CaseTypeReferenceEnum from api.goodstype.models import GoodsT...
[ "api.goodstype.tests.factories.GoodsTypeFactory", "api.goodstype.models.GoodsType.objects.filter", "api.staticdata.countries.helpers.get_country", "api.applications.models.CountryOnApplication.objects.filter", "api.staticdata.countries.models.Country.exclude_special_countries.filter", "django.urls.reverse...
[((591, 627), 'django.urls.reverse', 'reverse', (['"""applications:applications"""'], {}), "('applications:applications')\n", (598, 627), False, 'from django.urls import reverse\n'), ((2243, 2320), 'django.urls.reverse', 'reverse', (['"""applications:application_goodstypes"""'], {'kwargs': "{'pk': application.id}"}), "...
#!/usr/bin/env python from constants import * import numpy as np def regrid(self): ''' Called in both firn_density_spin and firn_density_nospin There are 3 subgrids in the regrid module. Grid 1 is the high resolution grid near the surface. Grid 2 is the lower resolution grid at greater depths; a user-defi...
[ "numpy.sum", "numpy.ones", "numpy.append", "numpy.cumsum", "numpy.mean", "numpy.array", "numpy.diff", "numpy.where", "numpy.concatenate" ]
[((1191, 1214), 'numpy.sum', 'np.sum', (['self.mass[ind1]'], {}), '(self.mass[ind1])\n', (1197, 1214), True, 'import numpy as np\n'), ((1255, 1294), 'numpy.sum', 'np.sum', (['(self.Tz[ind1] * self.mass[ind1])'], {}), '(self.Tz[ind1] * self.mass[ind1])\n', (1261, 1294), True, 'import numpy as np\n'), ((1307, 1333), 'num...
# Copyright 2014 Google Inc. 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 ag...
[ "googlecloudsdk.calliope.exceptions.RequiredArgumentException", "googlecloudsdk.core.log.warning", "googlecloudsdk.api_lib.compute.csek_utils.MaybeLookupKeyMessagesByUri", "googlecloudsdk.api_lib.compute.utils.RaiseToolException", "googlecloudsdk.api_lib.compute.image_utils.ImageExpander", "googlecloudsdk...
[((1726, 1769), 're.search', 're.search', (['"""custom-([0-9]+)-([0-9]+)"""', 'name'], {}), "('custom-([0-9]+)-([0-9]+)', name)\n", (1735, 1769), False, 'import re\n'), ((6137, 6166), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (6160, 6166), False, 'import collections\n'), ((7436, ...
import pandas as pd from src.mapping.columns.column_label_catalog import ColumnLabelCatalog from src.mapping.columns.column_name_classifier import ColumnNameClassifier def test_full_name(): data = { "full_name": ["<NAME>", "<NAME>", "<NAME>"], "ssn": ["444-44-4444", "555-55-5555", "777-77-7777"],...
[ "pandas.DataFrame", "src.mapping.columns.column_name_classifier.ColumnNameClassifier.get_id_info_from_df" ]
[((370, 388), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (382, 388), True, 'import pandas as pd\n'), ((417, 461), 'src.mapping.columns.column_name_classifier.ColumnNameClassifier.get_id_info_from_df', 'ColumnNameClassifier.get_id_info_from_df', (['df'], {}), '(df)\n', (457, 461), False, 'from src.m...
# (C) Copyright 2007-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
[ "traits.api.provides", "traits.api.Dict" ]
[((651, 677), 'traits.api.provides', 'provides', (['IResourceManager'], {}), '(IResourceManager)\n', (659, 677), False, 'from traits.api import Dict, HasTraits, Str, provides\n'), ((927, 955), 'traits.api.Dict', 'Dict', (['Str', 'IResourceProtocol'], {}), '(Str, IResourceProtocol)\n', (931, 955), False, 'from traits.ap...
import command_module command_manager = command_module.CommandManager("192.168.0.1", 3000) command_manager.start() command_manager.stop()
[ "command_module.CommandManager" ]
[((41, 91), 'command_module.CommandManager', 'command_module.CommandManager', (['"""192.168.0.1"""', '(3000)'], {}), "('192.168.0.1', 3000)\n", (70, 91), False, 'import command_module\n')]
# Based on work by <NAME> (https://bitbucket.org/reuteras/kippo/) from __future__ import division, absolute_import import socket from cowrie.shell.command import HoneyPotCommand commands = {} class command_netstat(HoneyPotCommand): def show_version(self): self.write('net-tools 1.60\n') self.wr...
[ "socket.gethostbyaddr" ]
[((3832, 3876), 'socket.gethostbyaddr', 'socket.gethostbyaddr', (['self.protocol.clientIP'], {}), '(self.protocol.clientIP)\n', (3852, 3876), False, 'import socket\n')]
from dataclasses import dataclass from functools import partial from logging import Logger from flo.lamb import FunctionOrLambda, as_fcn, Function, R, UNASSIGNED from typing import * R1 = TypeVar('R1') @dataclass(init=False) class Attempt(Generic[R]): _result: R _exception: Exception def __init__(self,...
[ "flo.lamb.as_fcn", "functools.partial", "dataclasses.dataclass" ]
[((207, 228), 'dataclasses.dataclass', 'dataclass', ([], {'init': '(False)'}), '(init=False)\n', (216, 228), False, 'from dataclasses import dataclass\n'), ((1410, 1421), 'flo.lamb.as_fcn', 'as_fcn', (['fcn'], {}), '(fcn)\n', (1416, 1421), False, 'from flo.lamb import FunctionOrLambda, as_fcn, Function, R, UNASSIGNED\n...
# Copyright 2019, OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "celery.signals.after_task_publish.connect", "celery.signals.task_retry.connect", "oteltrace.Pin.get_from", "celery.signals.task_prerun.disconnect", "celery.signals.task_failure.connect", "celery.signals.before_task_publish.connect", "celery.signals.task_prerun.connect", "celery.signals.task_postrun.d...
[((1406, 1447), 'celery.signals.task_prerun.connect', 'signals.task_prerun.connect', (['trace_prerun'], {}), '(trace_prerun)\n', (1433, 1447), False, 'from celery import signals\n'), ((1452, 1495), 'celery.signals.task_postrun.connect', 'signals.task_postrun.connect', (['trace_postrun'], {}), '(trace_postrun)\n', (1480...
# test_joiner.py """Unit tests for lta/joiner.py.""" from lta.joiner import join_smart, join_smart_url def test_join_smart_empty(): """Test join_smart functionality.""" assert join_smart([]) == "." def test_join_smart_many_relative(): """Test join_smart functionality.""" assert join_smart(["data", "e...
[ "lta.joiner.join_smart_url", "lta.joiner.join_smart" ]
[((186, 200), 'lta.joiner.join_smart', 'join_smart', (['[]'], {}), '([])\n', (196, 200), False, 'from lta.joiner import join_smart, join_smart_url\n'), ((298, 336), 'lta.joiner.join_smart', 'join_smart', (["['data', 'exp', 'IceCube']"], {}), "(['data', 'exp', 'IceCube'])\n", (308, 336), False, 'from lta.joiner import j...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
[ "tempfile.NamedTemporaryFile", "os.remove", "zipfile.ZipFile", "argparse.ArgumentParser", "json.loads", "logging.basicConfig", "os.path.basename", "os.path.exists", "logging.info", "os.path.join", "os.listdir", "subprocess.check_call" ]
[((1245, 1266), 'os.listdir', 'os.listdir', (['CACHE_DIR'], {}), '(CACHE_DIR)\n', (1255, 1266), False, 'import os\n'), ((1720, 1767), 'subprocess.check_call', 'subprocess.check_call', (["['rm', '-rf', CACHE_DIR]"], {}), "(['rm', '-rf', CACHE_DIR])\n", (1741, 1767), False, 'import subprocess\n'), ((1794, 1842), 'subproc...
""" Misc Utility functions """ import os import logging import datetime import numpy as np from collections import OrderedDict def recursive_glob(rootdir=".", suffix=""): """Performs recursive glob with given suffix and rootdir :param rootdir is the root directory :param suffix is the suffix to b...
[ "logging.FileHandler", "os.walk", "numpy.zeros", "datetime.datetime.now", "logging.Formatter", "collections.OrderedDict", "os.path.join", "logging.getLogger" ]
[((838, 882), 'numpy.zeros', 'np.zeros', (['input_image.size'], {'dtype': 'np.float32'}), '(input_image.size, dtype=np.float32)\n', (846, 882), True, 'import numpy as np\n'), ((1295, 1308), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1306, 1308), False, 'from collections import OrderedDict\n'), ((1484,...
import datetime from unittest import mock import boto3 import pytest from freezegun import freeze_time from moto import mock_s3 import tests.test_utils as test_utils from great_expectations.core import ExpectationSuiteValidationResult from great_expectations.core.expectation_validation_result import ( Expectation...
[ "tests.test_utils.validate_uuid4", "boto3.client", "tests.core.usage_statistics.util.usage_stats_exceptions_exist", "unittest.mock.patch", "great_expectations.data_context.store.ValidationsStore", "pytest.raises", "boto3.resource", "great_expectations.core.expectation_validation_result.ExpectationSuit...
[((736, 770), 'freezegun.freeze_time', 'freeze_time', (['"""09/26/2019 13:42:41"""'], {}), "('09/26/2019 13:42:41')\n", (747, 770), False, 'from freezegun import freeze_time\n'), ((781, 936), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore:String run_ids are deprecated*:DeprecationWarning:great...
# -*- coding: utf-8 -*- import unittest from lrucache_interview import DoublyLinkedList, DoublyLinkedListNode class TestDoublyLinkedList(unittest.TestCase): def test_remove_item_when_head(self): llist = DoublyLinkedList() first_node = llist.new_list_node(key="a", value=1234) llist.set_h...
[ "lrucache_interview.DoublyLinkedList" ]
[((219, 237), 'lrucache_interview.DoublyLinkedList', 'DoublyLinkedList', ([], {}), '()\n', (235, 237), False, 'from lrucache_interview import DoublyLinkedList, DoublyLinkedListNode\n'), ((741, 759), 'lrucache_interview.DoublyLinkedList', 'DoublyLinkedList', ([], {}), '()\n', (757, 759), False, 'from lrucache_interview ...
#! /usr/bin/env python3 # Copyright (c) 2020 Snoop Project <<EMAIL>> "Самотестирование сети" import speedtest import sys from colorama import Fore, Style, init from rich.panel import Panel from rich.style import Style as STL from rich.console import Console init(autoreset=True) console2 = Console() def nettest(): ...
[ "colorama.init", "speedtest.Speedtest", "rich.style.Style", "rich.console.Console" ]
[((261, 281), 'colorama.init', 'init', ([], {'autoreset': '(True)'}), '(autoreset=True)\n', (265, 281), False, 'from colorama import Fore, Style, init\n'), ((293, 302), 'rich.console.Console', 'Console', ([], {}), '()\n', (300, 302), False, 'from rich.console import Console\n'), ((467, 488), 'speedtest.Speedtest', 'spe...
import network_2 as network import link import threading from time import sleep import sys ##configuration parameters router_queue_size = 0 #0 means unlimited simulation_time = 1 #give the network sufficient time to execute transfers if __name__ == '__main__': object_L = [] #keeps track of objects, s...
[ "network_2.Host", "time.sleep", "link.Link", "link.LinkLayer", "network_2.Router" ]
[((402, 420), 'network_2.Host', 'network.Host', (['"""H1"""'], {}), "('H1')\n", (414, 420), True, 'import network_2 as network\n'), ((464, 482), 'network_2.Host', 'network.Host', (['"""H2"""'], {}), "('H2')\n", (476, 482), True, 'import network_2 as network\n'), ((665, 739), 'network_2.Router', 'network.Router', ([], {...
# Owner(s): ["oncall: distributed"] import sys import torch from torch import distributed as dist from torch.distributed.fsdp import FullyShardedDataParallel as FSDP from torch.nn import Linear, Module from torch.optim import SGD from torch.testing._internal.common_distributed import skip_if_lt_x_gpu from torch.testi...
[ "torch.testing._internal.common_utils.instantiate_parametrized_tests", "torch.testing._internal.common_utils.subtest", "torch.rand", "torch.testing._internal.common_utils.run_tests", "sys.exit", "torch.nn.Linear", "torch.distributed.is_available", "torch.testing._internal.common_distributed.skip_if_lt...
[((2057, 2098), 'torch.testing._internal.common_utils.instantiate_parametrized_tests', 'instantiate_parametrized_tests', (['TestInput'], {}), '(TestInput)\n', (2087, 2098), False, 'from torch.testing._internal.common_utils import TEST_WITH_DEV_DBG_ASAN, instantiate_parametrized_tests, parametrize, run_tests, subtest\n'...
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from core.models import Tag from recipe.serializers import TagSerializer # We're using a viewset for the tag api endpoint, which me...
[ "core.models.Tag.objects.create", "core.models.Tag.objects.filter", "django.contrib.auth.get_user_model", "django.urls.reverse", "recipe.serializers.TagSerializer", "core.models.Tag.objects.all", "rest_framework.test.APIClient" ]
[((392, 418), 'django.urls.reverse', 'reverse', (['"""recipe:tag-list"""'], {}), "('recipe:tag-list')\n", (399, 418), False, 'from django.urls import reverse\n'), ((748, 759), 'rest_framework.test.APIClient', 'APIClient', ([], {}), '()\n', (757, 759), False, 'from rest_framework.test import APIClient\n'), ((992, 1048),...
import logging import os import subprocess from cekit.builder import Builder from cekit.errors import CekitError LOGGER = logging.getLogger('cekit') class PodmanBuilder(Builder): """This class represents podman builder in build mode.""" def __init__(self, params): super(PodmanBuilder, self).__init_...
[ "cekit.errors.CekitError", "subprocess.check_call", "os.path.join", "logging.getLogger" ]
[((124, 150), 'logging.getLogger', 'logging.getLogger', (['"""cekit"""'], {}), "('cekit')\n", (141, 150), False, 'import logging\n'), ((1157, 1191), 'os.path.join', 'os.path.join', (['self.target', '"""image"""'], {}), "(self.target, 'image')\n", (1169, 1191), False, 'import os\n'), ((1293, 1319), 'subprocess.check_cal...
import pytest from pyhamtools.frequency import freq_to_band from pyhamtools.consts import LookupConventions as const class Test_utils_freq_to_band(): def test_hf_frequencies(self): assert freq_to_band(137) == {"band" : 2190, "mode":const.CW} assert freq_to_band(1805) == {"band" : 160, "mode":cons...
[ "pytest.raises", "pyhamtools.frequency.freq_to_band" ]
[((202, 219), 'pyhamtools.frequency.freq_to_band', 'freq_to_band', (['(137)'], {}), '(137)\n', (214, 219), False, 'from pyhamtools.frequency import freq_to_band\n'), ((272, 290), 'pyhamtools.frequency.freq_to_band', 'freq_to_band', (['(1805)'], {}), '(1805)\n', (284, 290), False, 'from pyhamtools.frequency import freq_...
from firmware_variables import privileges, get_boot_order, get_boot_entry, LoadOption def doit(): with privileges(): order = get_boot_order() for entry_id in order: raw = get_boot_entry(entry_id) load_option = LoadOption.from_bytes(raw) print("0x{:04X} {}".form...
[ "firmware_variables.privileges", "firmware_variables.get_boot_entry", "firmware_variables.get_boot_order", "firmware_variables.LoadOption.from_bytes" ]
[((109, 121), 'firmware_variables.privileges', 'privileges', ([], {}), '()\n', (119, 121), False, 'from firmware_variables import privileges, get_boot_order, get_boot_entry, LoadOption\n'), ((139, 155), 'firmware_variables.get_boot_order', 'get_boot_order', ([], {}), '()\n', (153, 155), False, 'from firmware_variables ...
import numpy as np import os import torch import subprocess import matplotlib.pyplot as plt import time import pickle import re def save_pickle(features, labels, path, name): features, labels = np.array(features).astype(np.float32), np.array(labels).astype(np.float32) x = time.asctime() filenam...
[ "torch.cuda.synchronize", "matplotlib.pyplot.savefig", "pickle.dump", "matplotlib.pyplot.clf", "numpy.isnan", "matplotlib.pyplot.figure", "torch.no_grad", "os.path.join", "time.asctime", "numpy.histogram2d", "matplotlib.pyplot.imshow", "os.path.dirname", "torch.load", "matplotlib.pyplot.cl...
[((293, 307), 'time.asctime', 'time.asctime', ([], {}), '()\n', (305, 307), False, 'import time\n'), ((384, 412), 'os.path.join', 'os.path.join', (['path', 'filename'], {}), '(path, filename)\n', (396, 412), False, 'import os\n'), ((593, 624), 'numpy.histogram2d', 'np.histogram2d', (['x1', 'x2'], {'bins': '(50)'}), '(x...
import logging logger = logging.getLogger('base') def create_model(opt): model = opt['model'] if model == 'sr': from .SR_model import SRModel as M elif model == 'srgan': from .SRGAN_model import SRGANModel as M elif model == 'srragan': from .SRRaGAN_model import SRRaGANModel a...
[ "logging.getLogger" ]
[((24, 49), 'logging.getLogger', 'logging.getLogger', (['"""base"""'], {}), "('base')\n", (41, 49), False, 'import logging\n')]
from libsaas import http, parsers from libsaas.services import base class FilesResource(base.RESTResource): path = 'files' def create(self, *args, **kwargs): raise base.MethodNotSupported() class Files(FilesResource): @base.apimethod def get(self, start=None, limit=None): """ ...
[ "libsaas.services.base.MethodNotSupported" ]
[((184, 209), 'libsaas.services.base.MethodNotSupported', 'base.MethodNotSupported', ([], {}), '()\n', (207, 209), False, 'from libsaas.services import base\n')]
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function from ctypes.util import find_library from ctypes import c_void_p, c_long, c_uint32, c_char_p, c_byte, c_ulong, c_bool from ctypes import CDLL, string_at, cast, POINTER, byref import ctypes from .._ffi import FFIEngineEr...
[ "ctypes.util.find_library", "ctypes.string_at", "ctypes.byref", "ctypes.cast", "ctypes.c_long", "ctypes.c_void_p.in_dll", "ctypes.CDLL", "ctypes.POINTER" ]
[((490, 520), 'ctypes.util.find_library', 'find_library', (['"""CoreFoundation"""'], {}), "('CoreFoundation')\n", (502, 520), False, 'from ctypes.util import find_library\n'), ((648, 690), 'ctypes.CDLL', 'CDLL', (['core_foundation_path'], {'use_errno': '(True)'}), '(core_foundation_path, use_errno=True)\n', (652, 690),...
# -*-coding:utf-8 -* import json from lib_Partage_BSS import utils from lib_Partage_BSS.exceptions.NameException import NameException from lib_Partage_BSS.models.GlobalModel import GlobalModel class COS(GlobalModel): """ Classe représentant une classe de service dans Partage :ivar _zimbraDumpsterEnabled...
[ "lib_Partage_BSS.models.GlobalModel.GlobalModel.__init__" ]
[((2313, 2345), 'lib_Partage_BSS.models.GlobalModel.GlobalModel.__init__', 'GlobalModel.__init__', (['self', 'name'], {}), '(self, name)\n', (2333, 2345), False, 'from lib_Partage_BSS.models.GlobalModel import GlobalModel\n')]
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hilbert from src import XMitt plt.ion() exper_file = 'src/experiments/canope_setup.toml' xmitt = XMitt(exper_file, 1.) p_sca = [] #for i in range(3): xmitt.generate_realization() xmitt.surface_realization() p_sca.append(xmitt.ping_surface()...
[ "src.XMitt", "matplotlib.pyplot.ion", "numpy.array", "scipy.signal.hilbert", "matplotlib.pyplot.subplots" ]
[((108, 117), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (115, 117), True, 'import matplotlib.pyplot as plt\n'), ((176, 198), 'src.XMitt', 'XMitt', (['exper_file', '(1.0)'], {}), '(exper_file, 1.0)\n', (181, 198), False, 'from src import XMitt\n'), ((331, 346), 'numpy.array', 'np.array', (['p_sca'], {}), '(p...
# Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """JSON-related utilities.""" # TODO(kitching): Consider moving this to the cros.factory.utils directory. import datetime import inspect import json imp...
[ "json.JSONDecoder.__init__", "logging.warning", "traceback.format_tb", "datetime.datetime.strptime", "inspect.istraceback", "json.JSONEncoder.default" ]
[((2940, 2964), 'inspect.istraceback', 'inspect.istraceback', (['obj'], {}), '(obj)\n', (2959, 2964), False, 'import inspect\n'), ((3409, 3487), 'json.JSONDecoder.__init__', 'json.JSONDecoder.__init__', (['self', '*args'], {'object_hook': 'self.object_hook'}), '(self, *args, object_hook=self.object_hook, **kwargs)\n', ...
# -*- codinwig: utf-8 -*- """ wikipedia text fetcher <NAME> <EMAIL> (c) PageKicker 2014 """ import argparse import codecs import sys import time import wikipedia parser = argparse.ArgumentParser() parser.add_argument("--infile", help = "seed file", default = 'test') parser.add_argument("--lang", help="wiki language ...
[ "wikipedia.search", "codecs.open", "wikipedia.set_lang", "argparse.ArgumentParser" ]
[((174, 199), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (197, 199), False, 'import argparse\n'), ((1008, 1032), 'wikipedia.set_lang', 'wikipedia.set_lang', (['lang'], {}), '(lang)\n', (1026, 1032), False, 'import wikipedia\n'), ((1125, 1160), 'codecs.open', 'codecs.open', (['pagehits', '""...
#!/usr/bin/python # -*- coding: utf-8 -*- # File: w2v_to_numpy.py # Convert binary W2V file to import sys, struct import cPickle, gzip import numpy as np def save_numpy_w2v(M, vocab, outfname): assert M.shape[0] == len(vocab) f = open(outfname, 'wb') vocSize, embSize = (M.shape[0], M.shape[1]) print >>...
[ "struct.pack" ]
[((1093, 1113), 'struct.pack', 'struct.pack', (['"""1f"""', 'b'], {}), "('1f', b)\n", (1104, 1113), False, 'import sys, struct\n')]
import enum import os # Used to import null _pylumi name on ReadTheDocs try: import _pylumi from _pylumi import ( UNKNOWN_KEY, UNKNOWN_BOOL_VALUE, UNKNOWN_NUMBER_VALUE, UNKNOWN_STRING_VALUE, UNKNOWN_ARRAY_VALUE, UNKNOWN_ASSET_VALUE, UNKNOWN_ARCHIVE_VALUE,...
[ "os.getenv" ]
[((690, 714), 'os.getenv', 'os.getenv', (['"""READTHEDOCS"""'], {}), "('READTHEDOCS')\n", (699, 714), False, 'import os\n')]
from __future__ import absolute_import import time from logging import getLogger from typing import Union, List, Dict, Any from unittest import TestCase from upath import getp logger = getLogger(__name__) def getfp(nested_input: Union[List, Dict], path: Union[str, list], separator: str = '.', default_value=None) -...
[ "upath.getp", "logging.getLogger", "time.time" ]
[((188, 207), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (197, 207), False, 'from logging import getLogger\n'), ((2135, 2146), 'time.time', 'time.time', ([], {}), '()\n', (2144, 2146), False, 'import time\n'), ((2166, 2189), 'upath.getp', 'getp', (['nested_dict', 'path'], {}), '(nested_dict, ...
from django.db import models from django.utils.crypto import get_random_string import datetime # Create your models here. def user_profile_pic_location(instance, filename): return "users/%s/%s" % (instance.usr_name, filename) class AppUsers(models.Model): usr_id = models.AutoField(primary_key=True) usr_...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.ImageField", "django.db.models.DateField", "django.db.models.DateTimeField", "django.utils.crypto.get_random_string", "datetime.datetime.now" ]
[((277, 311), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (293, 311), False, 'from django.db import models\n'), ((327, 372), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'unique': '(True)'}), '(max_length=200, unique=True)\...
import sys import mpi from math import * from io import BytesIO as StringIO from SpheralCompiledPackages import * from MaterialPropertiesLib import SpheralMaterialPropertiesLib from spheralDimensions import spheralDimensions dims = spheralDimensions() #-----------------------------------------------------------------...
[ "spheralDimensions.spheralDimensions", "io.BytesIO" ]
[((233, 252), 'spheralDimensions.spheralDimensions', 'spheralDimensions', ([], {}), '()\n', (250, 252), False, 'from spheralDimensions import spheralDimensions\n'), ((7817, 7827), 'io.BytesIO', 'StringIO', ([], {}), '()\n', (7825, 7827), True, 'from io import BytesIO as StringIO\n')]
# -*- coding: utf-8 -*- import os from simmate.workflow_engine import ErrorHandler from simmate.calculators.vasp.inputs import Incar class LongVector(ErrorHandler): """ This a simple error handler that is active when VASP finds an issue with the rotation matrix. """ is_monitor = True filena...
[ "simmate.calculators.vasp.inputs.Incar.from_file", "os.path.join" ]
[((583, 615), 'os.path.join', 'os.path.join', (['directory', '"""INCAR"""'], {}), "(directory, 'INCAR')\n", (595, 615), False, 'import os\n'), ((632, 663), 'simmate.calculators.vasp.inputs.Incar.from_file', 'Incar.from_file', (['incar_filename'], {}), '(incar_filename)\n', (647, 663), False, 'from simmate.calculators.v...
import copy import json import os from flask import Blueprint from flask import redirect from flask import render_template from flask import url_for from shopyo.api.assets import get_static class ModuleHelp: def __init__(self, dunderfile, dundername): self.dirpath = os.path.dirname(os.path.abspath(dunde...
[ "copy.deepcopy", "os.path.abspath", "json.load", "os.path.basename", "shopyo.api.assets.get_static", "os.path.dirname", "flask.url_for", "os.path.normpath" ]
[((1190, 1218), 'copy.deepcopy', 'copy.deepcopy', (['self._context'], {}), '(self._context)\n', (1203, 1218), False, 'import copy\n'), ((1388, 1417), 'os.path.dirname', 'os.path.dirname', (['self.dirpath'], {}), '(self.dirpath)\n', (1403, 1417), False, 'import os\n'), ((1480, 1511), 'os.path.normpath', 'os.path.normpat...
"""This module provides admin list and access level information.""" from __future__ import ( unicode_literals, absolute_import, print_function, division ) from sopel.module import commands @commands('botadmins', 'admins') def admin_list(bot, trigger): """Provide the list of bot admins.""" ad...
[ "sopel.module.commands" ]
[((210, 241), 'sopel.module.commands', 'commands', (['"""botadmins"""', '"""admins"""'], {}), "('botadmins', 'admins')\n", (218, 241), False, 'from sopel.module import commands\n'), ((644, 677), 'sopel.module.commands', 'commands', (['"""accesslevel"""', '"""access"""'], {}), "('accesslevel', 'access')\n", (652, 677), ...
import re import json import os from unidecode import unidecode from malaya.text.tatabahasa import permulaan, hujung from malaya.text.rules import rules_normalizer from malaya.function import ( check_file, load_graph, generate_session, nodes_session, ) from malaya.text.function import pad_sentence_batch...
[ "malaya.text.function.case_of", "malaya.text.function.pad_sentence_batch", "unidecode.unidecode", "malaya.preprocessing.Tokenizer", "malaya.function.nodes_session", "malaya.text.tatabahasa.hujung.items", "malaya.function.check_file", "malaya.text.tatabahasa.permulaan.items", "malaya.text.rules.rules...
[((910, 944), 're.sub', 're.sub', (['"""[^A-Za-z ]+"""', '""" """', 'string'], {}), "('[^A-Za-z ]+', ' ', string)\n", (916, 944), False, 'import re\n'), ((6577, 6711), 'malaya.function.check_file', 'check_file', ([], {'file': '"""lstm-bahdanau"""', 'module': '"""stem"""', 'keys': "{'model': 'model.pb', 'vocab': STEMMER...
import json import gramex.cache import pandas as pd from . import TestGramex from gramex.http import FOUND from pandas.util.testing import assert_frame_equal as afe class TestFunctionHandler(TestGramex): def test_args(self): etag = {'headers': {'Etag': True}} text = '{"args": [0, 1], "kwargs": {"a...
[ "pandas.DataFrame", "json.dumps" ]
[((5597, 5616), 'pandas.DataFrame', 'pd.DataFrame', (['sales'], {}), '(sales)\n', (5609, 5616), True, 'import pandas as pd\n'), ((6197, 6241), 'json.dumps', 'json.dumps', (["{'name': 'johndoe', 'age': '42'}"], {}), "({'name': 'johndoe', 'age': '42'})\n", (6207, 6241), False, 'import json\n'), ((6626, 6733), 'json.dumps...
import cv2 import matplotlib.pyplot as plt from QuadTreeCodec import QuadTreeCodec from TiledCodec import TiledCodec, BitStream import numpy as np # TODO Comment class CodecFactory: def __init__(self): self.quad_size = 128 def create_codec(self): return QuadTreeCodec(quad_tree_size=self.quad_...
[ "matplotlib.pyplot.imshow", "matplotlib.pyplot.waitforbuttonpress", "cv2.imread", "matplotlib.pyplot.figure", "QuadTreeCodec.QuadTreeCodec", "matplotlib.pyplot.pause" ]
[((1034, 1046), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1044, 1046), True, 'import matplotlib.pyplot as plt\n'), ((1051, 1065), 'matplotlib.pyplot.imshow', 'plt.imshow', (['im'], {}), '(im)\n', (1061, 1065), True, 'import matplotlib.pyplot as plt\n'), ((1070, 1082), 'matplotlib.pyplot.figure', 'plt...
""" Copyright Astronomer, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
[ "astro.sql.table.Table", "airflow.utils.timezone.datetime", "airflow.utils.session.create_session", "pathlib.Path", "airflow.models.DAG", "tests.operators.utils.run_dag", "airflow.providers.postgres.hooks.postgres.PostgresHook", "astro.sql.merge", "logging.getLogger" ]
[((1186, 1213), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1203, 1213), False, 'import logging\n'), ((1229, 1258), 'airflow.utils.timezone.datetime', 'timezone.datetime', (['(2016)', '(1)', '(1)'], {}), '(2016, 1, 1)\n', (1246, 1258), False, 'from airflow.utils import timezone\n'), (...
# -*- coding: utf-8 -*- # # Copyright (C) 2018-2020 CERN. # Copyright (C) 2018-2020 RERO. # # Invenio-Circulation is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Invenio Circulation custom transitions.""" from flask import current_...
[ "invenio_db.db.session.commit", "invenio_circulation.proxies.current_circulation.loan_indexer" ]
[((3574, 3593), 'invenio_db.db.session.commit', 'db.session.commit', ([], {}), '()\n', (3591, 3593), False, 'from invenio_db import db\n'), ((3602, 3636), 'invenio_circulation.proxies.current_circulation.loan_indexer', 'current_circulation.loan_indexer', ([], {}), '()\n', (3634, 3636), False, 'from invenio_circulation....
import asana # credentials API_KEY = 'YOUR_API_KEY HERE' OLD_PROJECT_ID = 123 NEW_PROJECT_ID = 1234 # connecting to API client = asana.Client.access_token(API_KEY) # check if user is connected me = client.users.me() print("Hello " + me['name']) # get new workspace id new_workspace_id = client.projects.find_by_id(NE...
[ "asana.Client.access_token" ]
[((131, 165), 'asana.Client.access_token', 'asana.Client.access_token', (['API_KEY'], {}), '(API_KEY)\n', (156, 165), False, 'import asana\n')]
from nltk.sentiment.vader import SentimentIntensityAnalyzer from PIL import ImageTk, Image import PIL import pyaudio import pandas as pd import numpy from tkinter import * import random import speech_recognition as sr from nltk import * import pyttsx3 import math def speak(command): engine = pytt...
[ "PIL.ImageTk.PhotoImage", "pyttsx3.init", "nltk.sentiment.vader.SentimentIntensityAnalyzer", "pandas.read_csv", "random.choices", "PIL.Image.open", "speech_recognition.Microphone", "speech_recognition.Recognizer" ]
[((5327, 5353), 'pandas.read_csv', 'pd.read_csv', (['"""Book411.csv"""'], {}), "('Book411.csv')\n", (5338, 5353), True, 'import pandas as pd\n'), ((6420, 6464), 'PIL.Image.open', 'PIL.Image.open', (['"""G:\\\\VSCODE\\\\NLP_LAB\\\\1.jpg"""'], {}), "('G:\\\\VSCODE\\\\NLP_LAB\\\\1.jpg')\n", (6434, 6464), False, 'import PI...
from xml.etree import ElementTree from os import path from io import open import os from utils.ospathex import list_files def remap_output(csproj_path): # ElementTree.register_namespace('xmlns', 'http://schemas.microsoft.com/developer/msbuild/2003') tree = ElementTree.parse(csproj_path) root = tree.getroot...
[ "xml.etree.ElementTree.parse", "xml.etree.ElementTree.register_namespace", "os.path.basename", "os.path.dirname", "xml.etree.ElementTree.Element", "os.path.join", "utils.ospathex.list_files" ]
[((2212, 2242), 'utils.ospathex.list_files', 'list_files', (['dirname', '""".csproj"""'], {}), "(dirname, '.csproj')\n", (2222, 2242), False, 'from utils.ospathex import list_files\n'), ((266, 296), 'xml.etree.ElementTree.parse', 'ElementTree.parse', (['csproj_path'], {}), '(csproj_path)\n', (283, 296), False, 'from xm...
import getpass import os import time import colored import requests from colored import stylize from dotenv import load_dotenv # Helper for API interaction with Silver Peak Edge Connect from silverpeak_python_sdk import EdgeConnect # Console text highlight color parameters red_text = colored.fg("red") + colored.attr...
[ "getpass.getuser", "getpass.getpass", "colored.fg", "time.sleep", "dotenv.load_dotenv", "silverpeak_python_sdk.EdgeConnect", "colored.stylize", "colored.attr", "os.getenv" ]
[((288, 305), 'colored.fg', 'colored.fg', (['"""red"""'], {}), "('red')\n", (298, 305), False, 'import colored\n'), ((308, 328), 'colored.attr', 'colored.attr', (['"""bold"""'], {}), "('bold')\n", (320, 328), False, 'import colored\n'), ((342, 361), 'colored.fg', 'colored.fg', (['"""green"""'], {}), "('green')\n", (352...
#!/usr/bin/env python3 """ Author : <NAME> <<EMAIL>> Date : 2021-09-22 Purpose: concatenate a file """ import argparse import os import sys import re # pylint: disable=W0105,missing-function-docstring,unspecified-encoding,consider-using-with # flake8: noqa # -------------------------------------------------- def ...
[ "os.path.isfile", "argparse.ArgumentParser", "argparse.FileType" ]
[((383, 501), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""concatenate a file"""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description='concatenate a file', formatter_class=\n argparse.ArgumentDefaultsHelpFormatter)\n", (406, 501), False, 'import argparse\n'...
import importlib.util import os from elasticdl.python.common.log_utils import default_logger as logger from elasticdl.python.worker.prediction_outputs_processor import ( BasePredictionOutputsProcessor, ) def load_module(module_file): spec = importlib.util.spec_from_file_location(module_file, module_file) ...
[ "elasticdl.proto.elasticdl_pb2.Model", "elasticdl.python.common.log_utils.default_logger.warning" ]
[((4718, 4739), 'elasticdl.proto.elasticdl_pb2.Model', 'elasticdl_pb2.Model', ([], {}), '()\n', (4737, 4739), False, 'from elasticdl.proto import elasticdl_pb2\n'), ((3831, 3992), 'elasticdl.python.common.log_utils.default_logger.warning', 'logger.warning', (['"""prediction_outputs_processor is not inherited from BaseP...
from django.contrib.auth.models import User from django.test import TestCase from checklist.models import ( Bookmark, Category, Checklist, Comment, Follow, FollowChecklist, Item, Notification, Upvote, ) from .helper_methods import ( create_bookmark_upvote, create_category_i...
[ "checklist.models.Checklist.objects.create", "django.contrib.auth.models.User.objects.create_user", "checklist.models.Follow.objects.create", "checklist.models.Category.objects.create", "checklist.models.FollowChecklist.objects.create" ]
[((3074, 3142), 'django.contrib.auth.models.User.objects.create_user', 'User.objects.create_user', ([], {'username': '"""testuser"""', 'password': '"""<PASSWORD>"""'}), "(username='testuser', password='<PASSWORD>')\n", (3098, 3142), False, 'from django.contrib.auth.models import User\n'), ((3191, 3236), 'checklist.mode...
#!/usr/bin/env python3 import argparse parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, description='calculation radius of gyration using MDAnalysis') ## args parser.add_argument('-i', '--input', default='traj.trr', nargs='?', help='input trajectory file') parser....
[ "sys.path.append", "hjung.time.init", "numpy.save", "argparse.ArgumentParser", "hjung.time.end_print", "numpy.std", "hjung.time.process_init", "numpy.zeros", "MDAnalysis.Universe", "hjung.time.process_print", "numpy.mean" ]
[((52, 204), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter', 'description': '"""calculation radius of gyration using MDAnalysis"""'}), "(formatter_class=argparse.\n ArgumentDefaultsHelpFormatter, description=\n 'calculation radius of gyratio...
""" Various tensorflow utilities """ import numpy as np import tensorflow as tf from tensorflow.contrib.framework.python.ops import add_arg_scope from tensorflow.python.ops import variables import functools def passthrough(obj, value): return value try: variables.Variable._build_initializer_expr=passt...
[ "tensorflow.reduce_sum", "tensorflow.matrix_band_part", "tensorflow.square", "tensorflow.nn.tanh", "tensorflow.maximum", "tensorflow.reshape", "tensorflow.nn.l2_normalize", "tensorflow.get_variable_scope", "tensorflow.matmul", "tensorflow.Variable", "tensorflow.nn.conv2d", "tensorflow.reduce_m...
[((21746, 21777), 'functools.lru_cache', 'functools.lru_cache', ([], {'maxsize': '(32)'}), '(maxsize=32)\n', (21765, 21777), False, 'import functools\n'), ((797, 819), 'tensorflow.reduce_max', 'tf.reduce_max', (['x', 'axis'], {}), '(x, axis)\n', (810, 819), True, 'import tensorflow as tf\n'), ((830, 868), 'tensorflow.r...
"""This module builds a LALR(1) transition-table for lalr_parser.py For now, shift/reduce conflicts are automatically resolved as shifts. """ # Author: <NAME> (2017) # Email : <EMAIL> import logging from collections import defaultdict from array import array from ..utils import classify, classify_bool, bfs, fzset f...
[ "collections.defaultdict", "logging.warn", "array.array" ]
[((3228, 3238), 'array.array', 'array', (['"""H"""'], {}), "('H')\n", (3233, 3238), False, 'from array import array\n'), ((5408, 5425), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5419, 5425), False, 'from collections import defaultdict\n'), ((6321, 6396), 'logging.warn', 'logging.warn', (['"...
# # Copyright 2019 BrainPad Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
[ "os.path.basename", "re.compile", "cliboa.scenario.validator.EssentialParameters" ]
[((1346, 1411), 'cliboa.scenario.validator.EssentialParameters', 'EssentialParameters', (['self.__class__.__name__', '[self._src_pattern]'], {}), '(self.__class__.__name__, [self._src_pattern])\n', (1365, 1411), False, 'from cliboa.scenario.validator import EssentialParameters\n'), ((1745, 1774), 're.compile', 're.comp...
import mongoengine as db import datetime import bson class Collection(db.DynamicDocument): """ A collection of precomuted workflows such as datasets, .. This is a dynamic document, so it will accept any number of extra fields (expandable and uncontrolled schema) """ collection = ...
[ "mongoengine.ReferenceField", "mongoengine.DynamicField", "bson.json_util.dumps", "mongoengine.BinaryField", "datetime.datetime.now", "mongoengine.DateTimeField", "mongoengine.IntField", "mongoengine.StringField", "mongoengine.ListField", "mongoengine.GenericLazyReferenceField" ]
[((320, 349), 'mongoengine.StringField', 'db.StringField', ([], {'required': '(True)'}), '(required=True)\n', (334, 349), True, 'import mongoengine as db\n'), ((392, 421), 'mongoengine.StringField', 'db.StringField', ([], {'required': '(True)'}), '(required=True)\n', (406, 421), True, 'import mongoengine as db\n'), ((8...
from ctypes import byref, c_int, sizeof from numba.cuda.cudadrv.driver import host_to_device, device_to_host, driver from numba.cuda.cudadrv import devices, drvapi from numba.cuda.testing import unittest, CUDATestCase from numba.cuda.testing import skip_on_cudasim ptx1 = ''' .version 1.4 .target sm_10, map_f64...
[ "numba.cuda.testing.skip_on_cudasim", "numba.cuda.cudadrv.drvapi.cu_stream", "numba.cuda.testing.unittest.main", "ctypes.byref", "ctypes.sizeof", "numba.cuda.cudadrv.devices.get_context" ]
[((1331, 1394), 'numba.cuda.testing.skip_on_cudasim', 'skip_on_cudasim', (['"""CUDA Driver API unsupported in the simulator"""'], {}), "('CUDA Driver API unsupported in the simulator')\n", (1346, 1394), False, 'from numba.cuda.testing import skip_on_cudasim\n'), ((5686, 5701), 'numba.cuda.testing.unittest.main', 'unitt...
# coding: utf-8 """ Copyright 2016 SmartBear Software 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...
[ "six.iteritems" ]
[((4409, 4438), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (4418, 4438), False, 'from six import iteritems\n')]
import pandas as pd import numpy as np from prophet import Prophet from prophet.diagnostics import cross_validation import plotly.express as px from statistics import NormalDist class ProphetNewsvendor: def __init__(self): pass def fit(**kwargs): """Calculate mean & standard deviation from cro...
[ "statistics.NormalDist", "plotly.express.histogram", "prophet.diagnostics.cross_validation" ]
[((542, 568), 'prophet.diagnostics.cross_validation', 'cross_validation', ([], {}), '(**kwargs)\n', (558, 568), False, 'from prophet.diagnostics import cross_validation\n'), ((1015, 1038), 'plotly.express.histogram', 'px.histogram', (['residuals'], {}), '(residuals)\n', (1027, 1038), True, 'import plotly.express as px\...
import getpass from unittest import TestCase from dvc.remote.ssh import RemoteSSH class TestRemoteSSH(TestCase): def test_user(self): url = 'ssh://127.0.0.1:/path/to/dir' config = {'url': url} remote = RemoteSSH(None, config) self.assertEqual(remote.user, getpass.getuser()) ...
[ "dvc.remote.ssh.RemoteSSH", "getpass.getuser" ]
[((234, 257), 'dvc.remote.ssh.RemoteSSH', 'RemoteSSH', (['None', 'config'], {}), '(None, config)\n', (243, 257), False, 'from dvc.remote.ssh import RemoteSSH\n'), ((447, 470), 'dvc.remote.ssh.RemoteSSH', 'RemoteSSH', (['None', 'config'], {}), '(None, config)\n', (456, 470), False, 'from dvc.remote.ssh import RemoteSSH\...
from pypy.interpreter.mixedmodule import MixedModule from pypy.interpreter.error import OperationError class Module(MixedModule): """Operator Builtin Module. """ # HACK! override loaders to be able to access different operations # under same name. I.e., operator.eq == operator.__eq__ def __init__(s...
[ "pypy.interpreter.mixedmodule.MixedModule.__init__" ]
[((482, 523), 'pypy.interpreter.mixedmodule.MixedModule.__init__', 'MixedModule.__init__', (['self', 'space', 'w_name'], {}), '(self, space, w_name)\n', (502, 523), False, 'from pypy.interpreter.mixedmodule import MixedModule\n')]
""" NCL_proj_3.py ============= This script illustrates the following concepts: - Drawing filled contours over an orthographic map - Changing the center latitude and longitude for an orthographic projection - Turning off map fill See following URLs to see the reproduced NCL plot & script: - Original NCL ...
[ "matplotlib.pyplot.show", "geocat.viz.util.set_titles_and_labels", "geocat.viz.util.xr_add_cyclic_longitudes", "geocat.datafiles.get", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.figure", "numpy.arange", "cartopy.crs.PlateCarree", "cartopy.crs.Orthographic" ]
[((1184, 1225), 'geocat.viz.util.xr_add_cyclic_longitudes', 'gvutil.xr_add_cyclic_longitudes', (['t', '"""lon"""'], {}), "(t, 'lon')\n", (1215, 1225), True, 'from geocat.viz import util as gvutil\n'), ((1380, 1408), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(10, 10)'}), '(figsize=(10, 10))\n', (1390, ...
# -*- coding: utf-8 -*- """ Spectral Distributions of the Luminous Efficiency Functions =========================================================== Defines the spectral distributions of the luminous efficiency functions. The luminous efficiency data is in the form of a *dict* of :class:`colour.SpectralDistribution` c...
[ "functools.partial", "colour.utilities.CaseInsensitiveMapping", "colour.utilities.LazyCaseInsensitiveMapping" ]
[((79529, 79574), 'colour.utilities.LazyCaseInsensitiveMapping', 'LazyCaseInsensitiveMapping', (['SDS_LEFS_PHOTOPIC'], {}), '(SDS_LEFS_PHOTOPIC)\n', (79555, 79574), False, 'from colour.utilities import CaseInsensitiveMapping, LazyCaseInsensitiveMapping\n'), ((65271, 65413), 'functools.partial', 'partial', (['SpectralDi...
# Generated by Django 3.1.5 on 2021-05-08 12:12 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hospital', '0023_auto_20210507_1439'), ] operations = [ migrations.CreateModel( name='CovidVacc...
[ "django.db.models.ForeignKey", "django.db.models.AutoField" ]
[((374, 467), '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", (390, 467), False, 'from django.db import migrations, models\...
from rl_coach.agents.ppo_agent import PPOAgentParameters from rl_coach.architectures.layers import Dense from rl_coach.base_parameters import VisualizationParameters, PresetValidationParameters, DistributedCoachSynchronizationType from rl_coach.core_types import TrainingSteps, EnvironmentEpisodes, EnvironmentSteps from...
[ "rl_coach.architectures.layers.Dense", "rl_coach.base_parameters.VisualizationParameters", "rl_coach.core_types.TrainingSteps", "rl_coach.agents.ppo_agent.PPOAgentParameters", "rl_coach.environments.gym_environment.GymVectorEnvironment", "rl_coach.core_types.EnvironmentSteps", "rl_coach.graph_managers.g...
[((848, 868), 'rl_coach.graph_managers.graph_manager.ScheduleParameters', 'ScheduleParameters', ([], {}), '()\n', (866, 868), False, 'from rl_coach.graph_managers.graph_manager import ScheduleParameters\n'), ((901, 927), 'rl_coach.core_types.TrainingSteps', 'TrainingSteps', (['(10000000000)'], {}), '(10000000000)\n', (...
from kubernetes import client, config from ruamel import yaml from pathlib import Path from zipfile import ZipFile QHUB_SUPPORT_LOG_FILE = "./qhub-support-logs.zip" def create_support_subcommand(subparser): subparser = subparser.add_parser("support") subparser.add_argument( "-c", "--config", help="q...
[ "kubernetes.config.load_kube_config", "pathlib.Path", "zipfile.ZipFile", "kubernetes.client.CoreV1Api" ]
[((566, 591), 'kubernetes.config.load_kube_config', 'config.load_kube_config', ([], {}), '()\n', (589, 591), False, 'from kubernetes import client, config\n'), ((602, 620), 'kubernetes.client.CoreV1Api', 'client.CoreV1Api', ([], {}), '()\n', (618, 620), False, 'from kubernetes import client, config\n'), ((2253, 2265), ...
from JumpscalePortalClassic.portal.macrolib import div_base def main(j, args, params, *other_args): return div_base.macro(j, args, params) def match(j, args, params, tags, tasklet): return True
[ "JumpscalePortalClassic.portal.macrolib.div_base.macro" ]
[((117, 148), 'JumpscalePortalClassic.portal.macrolib.div_base.macro', 'div_base.macro', (['j', 'args', 'params'], {}), '(j, args, params)\n', (131, 148), False, 'from JumpscalePortalClassic.portal.macrolib import div_base\n')]
from collections import defaultdict class Solution: def accountsMerge(self, accounts: List[List[str]]) -> List[List[str]]: graph=defaultdict(set) email_name={} for account in accounts: name = account[0] for email in account[1:]: graph[email].add(accou...
[ "collections.defaultdict" ]
[((142, 158), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (153, 158), False, 'from collections import defaultdict\n')]
from __future__ import print_function import os import re from glob import glob import numpy as np import tensorflow as tf from keras.utils.data_utils import get_file def get_filename(key): """Rename tensor name to the corresponding Keras layer weight name. # Arguments key: tensor name in TF (determi...
[ "numpy.save", "os.makedirs", "os.path.exists", "keras.utils.data_utils.get_file", "tensorflow.train.NewCheckpointReader", "os.path.join" ]
[((2059, 2181), 'keras.utils.data_utils.get_file', 'get_file', (['"""deeplabv3_pascal_trainval_2018_01_04.tar.gz"""', 'CKPT_URL'], {'extract': '(True)', 'cache_subdir': '""""""', 'cache_dir': 'MODEL_DIR'}), "('deeplabv3_pascal_trainval_2018_01_04.tar.gz', CKPT_URL, extract=\n True, cache_subdir='', cache_dir=MODEL_D...
# -*- coding: utf-8 -*- """ Created on Thu Jan 24 14:40:41 2019 @author """ def create_cell_cnn_inceptionv3(): from keras.applications.inception_v3 import InceptionV3 from keras import layers from keras import models input_tensor = layers.Input(shape=(224, 224, 3)) # this assumes K.image_data_fo...
[ "keras.layers.Flatten", "keras.models.Model", "keras.layers.Dense", "keras.applications.inception_v3.InceptionV3", "keras.layers.Input" ]
[((255, 288), 'keras.layers.Input', 'layers.Input', ([], {'shape': '(224, 224, 3)'}), '(shape=(224, 224, 3))\n', (267, 288), False, 'from keras import layers\n'), ((363, 440), 'keras.applications.inception_v3.InceptionV3', 'InceptionV3', ([], {'input_tensor': 'input_tensor', 'weights': '"""imagenet"""', 'include_top': ...
import logging from pyAitu import executor, Bot, Dispatcher from pyAitu.models import Message, Options, Form, Header, FormClosed, ItemInfo API_TOKEN = 'YOUR_API_TOKEN' bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) logging.basicConfig(level=logging.INFO) @dp.message_handler() async def send_ui(message: Message): ...
[ "pyAitu.models.Options", "logging.basicConfig", "pyAitu.executor.start_polling", "pyAitu.Dispatcher", "pyAitu.Bot" ]
[((176, 196), 'pyAitu.Bot', 'Bot', ([], {'token': 'API_TOKEN'}), '(token=API_TOKEN)\n', (179, 196), False, 'from pyAitu import executor, Bot, Dispatcher\n'), ((202, 217), 'pyAitu.Dispatcher', 'Dispatcher', (['bot'], {}), '(bot)\n', (212, 217), False, 'from pyAitu import executor, Bot, Dispatcher\n'), ((219, 258), 'logg...
#!/usr/bin/env python # # License: BSD # https://raw.githubusercontent.com/splintered-reality/py_trees/devel/LICENSE # ############################################################################## # Documentation ############################################################################## """ A library of fundamen...
[ "py_trees.meta.create_behaviour_from_function", "py_trees.blackboard.Blackboard.key", "copy.copy", "operator.attrgetter", "functools.reduce" ]
[((1667, 1711), 'py_trees.meta.create_behaviour_from_function', 'meta.create_behaviour_from_function', (['success'], {}), '(success)\n', (1702, 1711), False, 'from py_trees import meta\n'), ((1802, 1846), 'py_trees.meta.create_behaviour_from_function', 'meta.create_behaviour_from_function', (['failure'], {}), '(failure...
#!/usr/bin/env python3 import cv2 import terminator as t # # Camera, HUD overlays, sounds... # T800_CAMERA = 0 HUD_VIDEO = "overlay1.mp4" HUD_SOUND = "overlay1.mp3" WINDOW_NAME = "T800 Vision" # # Overlay HUD on visual input... # hud = t.HeadsUpDisplay(HUD_VIDEO, HUD_SOUND) # Access HUD analysis... cam = t.Termina...
[ "cv2.waitKey", "terminator.HeadsUpDisplay", "cv2.imshow", "cv2.addWeighted", "cv2.destroyAllWindows" ]
[((240, 278), 'terminator.HeadsUpDisplay', 't.HeadsUpDisplay', (['HUD_VIDEO', 'HUD_SOUND'], {}), '(HUD_VIDEO, HUD_SOUND)\n', (256, 278), True, 'import terminator as t\n'), ((736, 759), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n', (757, 759), False, 'import cv2\n'), ((466, 514), 'cv2.addWeighted',...
import copy import sys if sys.version_info < (3,): range = xrange import numpy as np import pandas as pd import scipy.stats as ss from patsy import dmatrices, dmatrix, demo_data from .. import families as fam from .. import tsm as tsm from .. import data_check as dc from .kalman import * class DAR(tsm.TSM): ...
[ "matplotlib.pyplot.title", "numpy.ones", "matplotlib.pyplot.figure", "numpy.mean", "matplotlib.pyplot.fill_between", "numpy.linalg.pinv", "pandas.DataFrame", "numpy.power", "numpy.identity", "numpy.append", "copy.deepcopy", "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "scipy.stats...
[((2067, 2119), 'numpy.array', 'np.array', (['self.data[self.max_lag:self.data.shape[0]]'], {}), '(self.data[self.max_lag:self.data.shape[0]])\n', (2075, 2119), True, 'import numpy as np\n'), ((2132, 2151), 'numpy.ones', 'np.ones', (['Y.shape[0]'], {}), '(Y.shape[0])\n', (2139, 2151), True, 'import numpy as np\n'), ((4...
import pandas as pd import numpy as np import tensorflow as tf import sys sys.path.append("/data") csv = pd.read_csv("bmi.csv") csv["height"] = csv["height"] / 200 csv["weight"] = csv["weight"] / 100 bclass = {"thin": [1, 0, 0], "normal": [0, 1, 0], "fat": [0, 0, 1]} csv["label_pat"] = csv["label"].apply(lambda x: np....
[ "sys.path.append", "tensorflow.log", "pandas.read_csv", "tensorflow.argmax", "tensorflow.Session", "tensorflow.placeholder", "tensorflow.train.write_graph", "tensorflow.summary.FileWriter", "tensorflow.zeros", "tensorflow.cast", "tensorflow.initialize_all_variables", "numpy.array", "tensorfl...
[((75, 99), 'sys.path.append', 'sys.path.append', (['"""/data"""'], {}), "('/data')\n", (90, 99), False, 'import sys\n'), ((106, 128), 'pandas.read_csv', 'pd.read_csv', (['"""bmi.csv"""'], {}), "('bmi.csv')\n", (117, 128), True, 'import pandas as pd\n'), ((453, 490), 'tensorflow.placeholder', 'tf.placeholder', (['tf.fl...
from e2e.scripts.config import MOCK_IDP_BASE_URL from e2e.scripts import config import pytest from api_test_utils.oauth_helper import OauthHelper from api_test_utils.apigee_api_trace import ApigeeApiTraceDebug from api_test_utils.apigee_api_apps import ApigeeApiDeveloperApps from api_test_utils.apigee_api_products impo...
[ "api_test_utils.oauth_helper.OauthHelper", "pytest.fixture", "api_test_utils.apigee_api_products.ApigeeApiProducts", "api_test_utils.apigee_api_trace.ApigeeApiTraceDebug", "pytest.mark.parametrize", "api_test_utils.apigee_api_apps.ApigeeApiDeveloperApps", "asyncio.new_event_loop" ]
[((359, 388), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""class"""'}), "(scope='class')\n", (373, 388), False, 'import pytest\n'), ((1658, 1687), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""class"""'}), "(scope='class')\n", (1672, 1687), False, 'import pytest\n'), ((444, 463), 'api_test_utils.apig...
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, 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 requi...
[ "sqlalchemy.Enum", "sqlalchemy.ForeignKey", "sqlalchemy.orm.relationship", "sqlalchemy.Column", "sqlalchemy.String" ]
[((995, 1028), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (1001, 1028), False, 'from sqlalchemy import Column\n'), ((1293, 1321), 'sqlalchemy.orm.relationship', 'relationship', (['"""NetworkGroup"""'], {}), "('NetworkGroup')\n", (1305, 1321), False, 'from s...
#!/usr/bin/env python # bug_gc.py - test for refcounting/GC bug # # Copyright (C) 2010-2011 <NAME> <<EMAIL>> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the Licens...
[ "unittest.main", "psycopg2.extensions.register_type", "gc.collect", "psycopg2.extensions.new_type", "unittest.TestLoader" ]
[((1683, 1698), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1696, 1698), False, 'import unittest\n'), ((1326, 1377), 'psycopg2.extensions.new_type', 'psycopg2.extensions.new_type', (['(2950,)', '"""UUID"""', 'fish'], {}), "((2950,), 'UUID', fish)\n", (1354, 1377), False, 'import psycopg2\n'), ((1386, 1436), 'p...
''' This file implements the Binary Search Tree data structure. The functions in this file are considerably harder than the functions in the BinaryTree file. ''' from containers.BinaryTree import BinaryTree, Node class BST(BinaryTree): ''' The BST is a superclass of BinaryTree. That means that the BST cl...
[ "containers.BinaryTree.Node" ]
[((3820, 3831), 'containers.BinaryTree.Node', 'Node', (['value'], {}), '(value)\n', (3824, 3831), False, 'from containers.BinaryTree import BinaryTree, Node\n'), ((4030, 4041), 'containers.BinaryTree.Node', 'Node', (['value'], {}), '(value)\n', (4034, 4041), False, 'from containers.BinaryTree import BinaryTree, Node\n'...
import numpy as np import pandas as pd class Dataset: """A helper class to load various datasets. Properties created with the ``@property`` decorator should be documented in the property's getter method. Attributes: train_data (:obj:`pandas.DataFrame`): The training data without ...
[ "pandas.read_csv" ]
[((1231, 1251), 'pandas.read_csv', 'pd.read_csv', (['f_train'], {}), '(f_train)\n', (1242, 1251), True, 'import pandas as pd\n'), ((1277, 1296), 'pandas.read_csv', 'pd.read_csv', (['f_test'], {}), '(f_test)\n', (1288, 1296), True, 'import pandas as pd\n')]
"""Runs healthcheck and reaps instances that are unhealthy.""" import collections import logging import os import subprocess import time import urllib.request import urllib.parse import urllib.error import click from treadmill import cli from treadmill import context from treadmill import restclient from treadmill...
[ "treadmill.utils.to_seconds", "subprocess.Popen", "click.argument", "treadmill.context.GLOBAL.state_api", "click.option", "click.command", "click.Choice", "collections.Counter", "treadmill.context.GLOBAL.cell_api", "logging.getLogger", "treadmill.restclient.get" ]
[((346, 373), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (363, 373), False, 'import logging\n'), ((541, 567), 'treadmill.context.GLOBAL.state_api', 'context.GLOBAL.state_api', ([], {}), '()\n', (565, 567), False, 'from treadmill import context\n'), ((747, 781), 'treadmill.restclient.g...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ "pulumi.get", "pulumi.getter", "pulumi.set" ]
[((2159, 2195), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""destinationArn"""'}), "(name='destinationArn')\n", (2172, 2195), False, 'import pulumi\n'), ((4009, 4041), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""customData"""'}), "(name='customData')\n", (4022, 4041), False, 'import pulumi\n'), ((1807, 1...
#!/usr/bin/python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url from todo import views urlpatterns = patterns('', url(r'^manage/$', views.ManageView, name='todo-manage'), url(r'^manage/add/$', views.ManageAddView, name='todo-manage-add'), url(r'^manage/done/(?P<todoid>\...
[ "django.conf.urls.url" ]
[((148, 202), 'django.conf.urls.url', 'url', (['"""^manage/$"""', 'views.ManageView'], {'name': '"""todo-manage"""'}), "('^manage/$', views.ManageView, name='todo-manage')\n", (151, 202), False, 'from django.conf.urls import patterns, url\n'), ((213, 278), 'django.conf.urls.url', 'url', (['"""^manage/add/$"""', 'views....
from __future__ import absolute_import import responses from mock import patch from exam import fixture from django.test import RequestFactory from sentry.integrations.github.integration import GitHubIntegration from sentry.models import Integration, ExternalIssue from sentry.testutils import TestCase from sentry.ut...
[ "sentry.models.Integration.objects.create", "django.test.RequestFactory", "sentry.models.ExternalIssue.objects.create", "responses.add", "mock.patch", "sentry.utils.json.loads", "sentry.integrations.github.integration.GitHubIntegration" ]
[((908, 986), 'mock.patch', 'patch', (['"""sentry.integrations.github.client.get_jwt"""'], {'return_value': '"""jwt_token_1"""'}), "('sentry.integrations.github.client.get_jwt', return_value='jwt_token_1')\n", (913, 986), False, 'from mock import patch\n'), ((1890, 1968), 'mock.patch', 'patch', (['"""sentry.integration...
# MIT License # # Copyright (c) 2020 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publi...
[ "tests.util.bytes_to_base64_string", "tests.util.open_peer_connection", "tests.util.delete_profile", "squeak.params.SelectParams", "pytest.fixture", "grpc.insecure_channel", "proto.squeak_admin_pb2.DeletePeerRequest", "tests.util.create_contact_profile", "tests.util.create_signing_profile", "proto...
[((1608, 1636), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (1622, 1636), False, 'import pytest\n'), ((1702, 1724), 'squeak.params.SelectParams', 'SelectParams', (['"""simnet"""'], {}), "('simnet')\n", (1714, 1724), False, 'from squeak.params import SelectParams\n'), ((2474, 252...