repo_name
stringlengths
7
94
repo_path
stringlengths
4
237
repo_head_hexsha
stringlengths
40
40
content
stringlengths
10
680k
apis
stringlengths
2
680k
azhou-determined/kineto
tb_plugin/torch_tb_profiler/profiler/trace.py
46ed0ce917c1515db29c39cd87b0c5430f5be94e
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # -------------------------------------------------------------------------- from enum import IntEnum from .. import utils __all__ = ["EventTypes", "create_event"] logger = utils.ge...
[((345, 392), 'enum.IntEnum', 'IntEnum', (['"""DeviceType"""', "['CPU', 'CUDA']"], {'start': '(0)'}), "('DeviceType', ['CPU', 'CUDA'], start=0)\n", (352, 392), False, 'from enum import IntEnum\n')]
eval1749/elang
base/base.gyp
5208b386ba3a3e866a5c0f0271280f79f9aac8c4
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'includes': [ '../build/win_precompile.gypi', 'base.gypi', ], 'targets': [ { 'tar...
[]
KerimovEmil/ProjectEuler
solutions/PE4.py
bc9cb682181c1ac7889ee57c36d32beae7b441a8
""" PROBLEM A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. ANSWER: 906609 Solve time ~ 0.760 seconds """ from itertools import product import unittest fro...
[((1013, 1028), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1026, 1028), False, 'import unittest\n')]
uc-cdis/indexclient
indexclient/parsers/info.py
5d61bdb2cb9c0104f173d7bba43d92449a093c6d
import sys import json import logging import argparse import warnings import requests from indexclient import errors # DEPRECATED 11/2019 -- interacts with old `/alias/` endpoint. # For creating aliases for indexd records, prefer using # the `add_alias` function, which interacts with the new # `/index/{GUID}/aliase...
[((418, 644), 'warnings.warn', 'warnings.warn', (['"""This function is deprecated. For creating aliases for indexd records, prefer using the `add_alias_for_did` function, which interacts with the new `/index/{GUID}/aliases` endpoint."""', 'DeprecationWarning'], {}), "(\n 'This function is deprecated. For creating al...
guilhermebc/docker-playground
email-worker-compose/app/sender.py
e614c314ed2f5ab54835a8c45b4b3eec1ac4c57b
import psycopg2 import redis import json from bottle import Bottle, request class Sender(Bottle): def __init__(self): super().__init__() self.route('/', method='POST', callback=self.send) self.fila = redis.StrictRedis(host='queue', port=6379, db=0) DSN = 'dbname=email_sender user=p...
[((230, 278), 'redis.StrictRedis', 'redis.StrictRedis', ([], {'host': '"""queue"""', 'port': '(6379)', 'db': '(0)'}), "(host='queue', port=6379, db=0)\n", (247, 278), False, 'import redis\n'), ((358, 379), 'psycopg2.connect', 'psycopg2.connect', (['DSN'], {}), '(DSN)\n', (374, 379), False, 'import psycopg2\n'), ((815, ...
zsimic/sandbox
tests/ximpl.py
3d1571ca723d1a5e80ddecae0ad912160334fee9
import click import poyo import ruamel.yaml import runez import strictyaml import yaml as pyyaml from zyaml import load_path, load_string, tokens_from_path, tokens_from_string from zyaml.marshal import decode, default_marshal, represented_scalar from . import TestSettings class ImplementationCollection(object): ...
[((6779, 6806), 'zyaml.marshal.default_marshal', 'default_marshal', (['node.value'], {}), '(node.value)\n', (6794, 6806), False, 'from zyaml.marshal import decode, default_marshal, represented_scalar\n'), ((3720, 3774), 'click.option', 'click.option', (['name', '"""-i"""'], {'callback': '_callback'}), "(name, '-i', cal...
kwangilkimkenny/chatbot_seq2seq_flask
ai_analysis.py
f2f3bda9311c5f2930aebc8ae4a6497597b190e1
import pandas as pd import numpy as np import re import pickle # plotting import seaborn as sns import matplotlib.pyplot as plt # Tune learning_rate from numpy import loadtxt from xgboost import XGBClassifier from sklearn.model_selection import GridSearchCV from sklearn.model_selection import Stratifie...
[((732, 756), 'nltk.download', 'nltk.download', (['"""wordnet"""'], {}), "('wordnet')\n", (745, 756), False, 'import nltk\n'), ((2277, 2292), 'nltk.stem.PorterStemmer', 'PorterStemmer', ([], {}), '()\n', (2290, 2292), False, 'from nltk.stem import PorterStemmer, WordNetLemmatizer\n'), ((2307, 2326), 'nltk.stem.WordNetL...
mummi-framework/mummi-ras
mummi_ras/online/aa/aa_get_tiltrot_z_state.py
7f4522aad36661e4530e39c830ab8c2a6f134060
############################################################################### # @todo add Pilot2-splash-app disclaimer ############################################################################### """ Get's KRAS states """ import MDAnalysis as mda from MDAnalysis.analysis import align from MDAnalysis.lib.mdamath ...
[((621, 640), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (630, 640), False, 'from logging import getLogger\n'), ((840, 857), 'mummi_core.init', 'mummi_core.init', ([], {}), '()\n', (855, 857), False, 'import mummi_core\n'), ((875, 899), 'mummi_core.utils.Naming.dir_res', 'Naming.dir_res', (['...
maddox/home-assistant
homeassistant/components/switch/hikvisioncam.py
6624cfefd6ea81b559085779173b91a3dc6bd349
""" homeassistant.components.switch.hikvision ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support turning on/off motion detection on Hikvision cameras. Note: Currently works using default https port only. CGI API Guide: http://bit.ly/1RuyUuF Configuration: To use the Hikvision motion detection switch you will need to...
[((1170, 1197), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1187, 1197), False, 'import logging\n')]
leduong/richie
src/richie/apps/search/filter_definitions/mixins.py
bf7ed379b7e2528cd790dadcec10ac2656efd189
"""Define mixins to easily compose custom FilterDefinition classes.""" class TermsQueryMixin: """A mixin for filter definitions that need to apply term queries.""" def get_query_fragment(self, data): """Build the query fragments as term queries for each selected value.""" value_list = data.ge...
[]
AustEcon/electrumsv
electrumsv/gui/qt/receive_view.py
db924efc69f091f39e7d02e7f2d7a71350f4e6af
from typing import List, Optional, TYPE_CHECKING import weakref from PyQt5.QtCore import QEvent, Qt from PyQt5.QtWidgets import (QComboBox, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QLineEdit, QVBoxLayout, QWidget) from electrumsv.app_state import app_state from electrumsv.bitcoin import script_template_to_str...
[((1129, 1155), 'weakref.proxy', 'weakref.proxy', (['main_window'], {}), '(main_window)\n', (1142, 1155), False, 'import weakref\n'), ((1285, 1337), 'electrumsv.logs.logs.get_logger', 'logs.get_logger', (['f"""receive-view[{self._account_id}]"""'], {}), "(f'receive-view[{self._account_id}]')\n", (1300, 1337), False, 'f...
BluechipSystems/thrift
test/crossrunner/compat.py
c595aa18cba0032e074f9585aa2d6ca548f07197
import os import sys if sys.version_info[0] == 2: _ENCODE = sys.getfilesystemencoding() def path_join(*args): bin_args = map(lambda a: a.decode(_ENCODE), args) return os.path.join(*bin_args).encode(_ENCODE) def str_join(s, l): bin_args = map(lambda a: a.decode(_ENCODE), l) b = s.decode(_ENCODE)...
[((63, 90), 'sys.getfilesystemencoding', 'sys.getfilesystemencoding', ([], {}), '()\n', (88, 90), False, 'import sys\n'), ((181, 204), 'os.path.join', 'os.path.join', (['*bin_args'], {}), '(*bin_args)\n', (193, 204), False, 'import os\n')]
usamaahmadkhan/vpp
test/test_vom.py
cece3e682f6dba68ba86b66b295f99a33496d9ee
#!/usr/bin/env python """ VAPI test """ import unittest import os import signal from framework import VppTestCase, running_extended_tests, \ VppTestRunner, Worker @unittest.skipUnless(running_extended_tests(), "part of extended tests") class VOMTestCase(VppTestCase): """ VPP Object Model Test """ def te...
[((191, 215), 'framework.running_extended_tests', 'running_extended_tests', ([], {}), '()\n', (213, 215), False, 'from framework import VppTestCase, running_extended_tests, VppTestRunner, Worker\n'), ((1478, 1517), 'unittest.main', 'unittest.main', ([], {'testRunner': 'VppTestRunner'}), '(testRunner=VppTestRunner)\n', ...
bealbrown/allhours
locations/spiders/tesco.py
f750ee7644246a97bd16879f14115d7845f76b89
import json import re import scrapy from locations.hourstudy import inputoutput DAYS = { 'mo': 'Mo', 'tu': 'Tu', 'we': 'We', 'fr': 'Fr', 'th': 'Th', 'sa': 'Sa', 'su': 'Su', } class TescoSpider(scrapy.Spider): name = "tesco" allowed_domains = ["tescolocation.api.tesco.com"] def st...
[((1597, 1686), 'scrapy.http.FormRequest', 'scrapy.http.FormRequest', ([], {'url': 'url', 'method': '"""GET"""', 'headers': 'headers', 'callback': 'self.parse'}), "(url=url, method='GET', headers=headers, callback=\n self.parse)\n", (1620, 1686), False, 'import scrapy\n'), ((3018, 3045), 'locations.hourstudy.inputou...
tacaswell/astropy
astropy/table/serialize.py
75046e61916da36dffe87ddf59a7c6bfb00de81c
from importlib import import_module import re from copy import deepcopy from collections import OrderedDict from astropy.utils.data_info import MixinInfo from .column import Column from .table import Table, QTable, has_info_class from astropy.units.quantity import QuantityInfo __construct_mixin_classes = ('astropy.t...
[((8503, 8521), 'copy.deepcopy', 'deepcopy', (['tbl.meta'], {}), '(tbl.meta)\n', (8511, 8521), False, 'from copy import deepcopy\n'), ((9171, 9194), 'importlib.import_module', 'import_module', (['mod_name'], {}), '(mod_name)\n', (9184, 9194), False, 'from importlib import import_module\n'), ((9109, 9149), 're.match', '...
tadvi/uva
UVa 573 - The Snail/sample/main.py
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
''' Created on Jun 18, 2013 @author: Yubin Bai All rights reserved. ''' import time from multiprocessing.pool import Pool parallelSolve = False infinity = 1 << 30 def solve(par): H, U, D, F = par day = 0 amountRise = U currH = 0 while True: amountRise = U * (1 - 0.01 * F * day) ...
[((1021, 1028), 'multiprocessing.pool.Pool', 'Pool', (['(4)'], {}), '(4)\n', (1025, 1028), False, 'from multiprocessing.pool import Pool\n'), ((1057, 1068), 'time.time', 'time.time', ([], {}), '()\n', (1066, 1068), False, 'import time\n'), ((1154, 1165), 'time.time', 'time.time', ([], {}), '()\n', (1163, 1165), False, ...
tomhoper/scibert
scibert/models/text_classifier.py
3cc65f433808f7879c973dc4fc41bd25e465dc15
from typing import Dict, Optional, List, Any import torch import torch.nn.functional as F from allennlp.data import Vocabulary from allennlp.models.model import Model from allennlp.modules import FeedForward, TextFieldEmbedder, Seq2SeqEncoder from allennlp.nn import InitializerApplicator, RegularizerApplicator from al...
[((446, 479), 'allennlp.models.model.Model.register', 'Model.register', (['"""text_classifier"""'], {}), "('text_classifier')\n", (460, 479), False, 'from allennlp.models.model import Model\n'), ((1102, 1125), 'allennlp.nn.InitializerApplicator', 'InitializerApplicator', ([], {}), '()\n', (1123, 1125), False, 'from all...
crotwell/cmd2
plugins/template/tasks.py
5ce3a64e41258b6a694ad45bb1c604be53a1e974
# # -*- coding: utf-8 -*- """Development related tasks to be run with 'invoke'""" import os import pathlib import shutil import invoke TASK_ROOT = pathlib.Path(__file__).resolve().parent TASK_ROOT_STR = str(TASK_ROOT) # shared function def rmrf(items, verbose=True): """Silently remove a list of directories or ...
[((691, 710), 'invoke.Collection', 'invoke.Collection', ([], {}), '()\n', (708, 710), False, 'import invoke\n'), ((729, 755), 'invoke.Collection', 'invoke.Collection', (['"""clean"""'], {}), "('clean')\n", (746, 755), False, 'import invoke\n'), ((3856, 3884), 'invoke.task', 'invoke.task', ([], {'pre': '[clean_all]'}), ...
timgates42/trex-core
scripts/automation/trex_control_plane/interactive/trex/examples/stl/ndr_plugin.py
efe94752fcb2d0734c83d4877afe92a3dbf8eccd
import stl_path class MyNDRPlugin(): def __init__(self): pass def pre_iteration(self, finding_max_rate, run_results=None, **kwargs): """ Function ran before each iteration. :parameters: finding_max_rate: boolean Indicates whether we are running ...
[]
maexono/home-assistant
homeassistant/components/epsonworkforce/sensor.py
c174b83f5408124fc7834e8282969a1e8f9cca16
"""Support for Epson Workforce Printer.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_HOST, CONF_MONITORED_CONDITIONS from homeassistant.exceptions import PlatformNotReady import homeassistant....
[((451, 478), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (468, 478), False, 'import logging\n'), ((980, 1001), 'datetime.timedelta', 'timedelta', ([], {'minutes': '(60)'}), '(minutes=60)\n', (989, 1001), False, 'from datetime import timedelta\n'), ((1220, 1241), 'epsonprinter_pkg.epso...
bast0006/bot
bot/exts/help_channels/_cog.py
dec9a9dba77aa4322f9dc37b6493a8410e7482ec
import asyncio import logging import random import typing as t from datetime import datetime, timezone from operator import attrgetter import discord import discord.abc from discord.ext import commands from bot import constants from bot.bot import Bot from bot.exts.help_channels import _caches, _channel, _cooldown, _...
[((415, 442), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (432, 442), False, 'import logging\n'), ((7145, 7221), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""close"""', 'aliases': "['dormant', 'solved']", 'enabled': '(False)'}), "(name='close', aliases=['dorman...
LordZagreus/LodeRunner
code/menu/screens/shopmenu.py
68aab36be47cabe31e52f3ee43520bdafcdf3c95
import os import math import random import time from code.menu.menu import Menu from code.tools.eventqueue import EventQueue from code.tools.xml import XMLParser from code.utils.common import coalesce, intersect, offset_rect, log, log2, xml_encode, xml_decode, translate_rgb_to_string from code.constants.common i...
[((731, 750), 'code.menu.menu.Menu.__init__', 'Menu.__init__', (['self'], {}), '(self)\n', (744, 750), False, 'from code.menu.menu import Menu\n'), ((2166, 2178), 'code.tools.eventqueue.EventQueue', 'EventQueue', ([], {}), '()\n', (2176, 2178), False, 'from code.tools.eventqueue import EventQueue\n'), ((5047, 5059), 'c...
liudonghua123/bridgedb
lib/bridgedb/runner.py
94dd10673f9e6650e8a00e162f348e64f7a1ecab
# -*- coding: utf-8 ; test-case-name: bridgedb.test.test_runner -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2007-2015, The Tor Project, Inc. # (c) 200...
[((1004, 1063), 'logging.debug', 'logging.debug', (['("Searching for installed \'%s\'..." % filename)'], {}), '("Searching for installed \'%s\'..." % filename)\n', (1017, 1063), False, 'import logging\n'), ((1076, 1110), 'twisted.python.procutils.which', 'procutils.which', (['filename', 'os.X_OK'], {}), '(filename, os....
pfrouleau/wce-triage-v2
wce_triage/ops/create_image_runner.py
25610cda55f5cb2170e13e121ae1cbaa92ef7626
#!/usr/bin/env python3 # # Create disk image # import re, sys, traceback from .tasks import task_fetch_partitions, task_refresh_partitions, task_mount, task_remove_persistent_rules, task_remove_logs, task_fsck, task_shrink_partition, task_expand_partition, task_unmount from .partclone_tasks import task_create_disk_im...
[((3844, 3866), 're.match', 're.match', (['part', '"""\\\\d+"""'], {}), "(part, '\\\\d+')\n", (3852, 3866), False, 'import re, sys, traceback\n'), ((3172, 3183), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (3180, 3183), False, 'import re, sys, traceback\n'), ((3324, 3335), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1...
KeeplerIO/meetup-hands-on-gcp-2019
batch_processing_dataflow/play_store_flow.py
3674922d89d2be8984eb5719f0faaae127823ab4
import argparse import logging import apache_beam as beam from apache_beam.io import WriteToBigQuery from apache_beam.io import ReadFromText, WriteToText from apache_beam.options.pipeline_options import PipelineOptions class ProcessCSV(beam.DoFn): def process(self, element, *args, **kwargs): import csv ...
[((2553, 2578), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2576, 2578), False, 'import argparse\n'), ((3358, 3388), 'apache_beam.options.pipeline_options.PipelineOptions', 'PipelineOptions', (['pipeline_args'], {}), '(pipeline_args)\n', (3373, 3388), False, 'from apache_beam.options.pipeli...
Manotomo-Alliance-Support-Squad/WWS
backend/main/server/resources/Message.py
3df21a3f715eeb3b57314bf08c38f2239b2ba399
from flask import request from flask_jwt import jwt_required from flask_restful import Resource from main.server import app, cache, db from main.server.models import Message, MessageSchema messages_schema = MessageSchema(many=True) message_schema = MessageSchema() @app.after_request def add_header(response): r...
[((210, 234), 'main.server.models.MessageSchema', 'MessageSchema', ([], {'many': '(True)'}), '(many=True)\n', (223, 234), False, 'from main.server.models import Message, MessageSchema\n'), ((252, 267), 'main.server.models.MessageSchema', 'MessageSchema', ([], {}), '()\n', (265, 267), False, 'from main.server.models imp...
icaros-usc/wecook
demos/chicken_pasta/chicken_pasta.py
27bbb6b78a48e04765a87d33cc8a5d3748d2d4cc
#!/usr/bin/env python3 import rospy from wecook.msg import ActionMsg, TaskMsg, SceneMsg, ObjectMsg, ContainingMsg, AgentMsg def talker(): pub = rospy.Publisher('WeCookDispatch', TaskMsg, queue_size=10) rospy.init_node('wecook_chicken_pasta', anonymous=True) scene_msg = SceneMsg([ObjectMsg('wall0', ...
[((151, 208), 'rospy.Publisher', 'rospy.Publisher', (['"""WeCookDispatch"""', 'TaskMsg'], {'queue_size': '(10)'}), "('WeCookDispatch', TaskMsg, queue_size=10)\n", (166, 208), False, 'import rospy\n'), ((213, 268), 'rospy.init_node', 'rospy.init_node', (['"""wecook_chicken_pasta"""'], {'anonymous': '(True)'}), "('wecook...
rmay-intwine/volttron
volttron/platform/vip/agent/subsystems/heartbeat.py
a449f70e32f73ff0136a838d0feddb928ede6298
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2017, Battelle Memorial Institute. # # 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...
[((2660, 2677), 'weakref.ref', 'weakref.ref', (['core'], {}), '(core)\n', (2671, 2677), False, 'import weakref\n'), ((2700, 2719), 'weakref.ref', 'weakref.ref', (['pubsub'], {}), '(pubsub)\n', (2711, 2719), False, 'import weakref\n'), ((3626, 3647), 'volttron.platform.scheduling.periodic', 'periodic', (['self.period'],...
kyawlin/smlb
datasets/experimental/ni_superalloys/Ni_superalloy.py
79c757d7fc040fb30ad44410be158b3ce3bdf30d
"""Ni-Superalloy dataset. Scientific Machine Learning Benchmark A benchmark of regression models in chem- and materials informatics. 2019, Brendan Folie, Citrine Informatics. See class NiSuperalloyDataset for details. """ import os import json import zipfile from typing import List, Optional, Tuple, Union import nu...
[((3413, 3443), 'smlb.parameters.params.boolean', 'params.boolean', (['ignore_dubious'], {}), '(ignore_dubious)\n', (3427, 3443), False, 'from smlb.parameters import params\n'), ((4398, 4424), 'os.path.basename', 'os.path.basename', (['filepath'], {}), '(filepath)\n', (4414, 4424), False, 'import os\n'), ((4568, 4593),...
SHolzhauer/beats
metricbeat/module/postgresql/test_postgresql.py
39679a536a22e8a0d7534a2475504488909d19fd
import metricbeat import os import pytest import sys import unittest class Test(metricbeat.BaseTest): COMPOSE_SERVICES = ['postgresql'] def common_checks(self, output): # Ensure no errors or warnings exist in the log. self.assert_no_logged_warnings() for evt in output: t...
[((779, 848), 'unittest.skipUnless', 'unittest.skipUnless', (['metricbeat.INTEGRATION_TESTS', '"""integration test"""'], {}), "(metricbeat.INTEGRATION_TESTS, 'integration test')\n", (798, 848), False, 'import unittest\n'), ((854, 884), 'pytest.mark.tag', 'pytest.mark.tag', (['"""integration"""'], {}), "('integration')\...
ozen/pytorch-lightning
pytorch_lightning/accelerators/cpu_backend.py
3b0b402d30fa19e0fef7d150c30ff4bb14a64230
# Copyright The PyTorch Lightning team. # # 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...
[((1075, 1161), 'pytorch_lightning.utilities.exceptions.MisconfigurationException', 'MisconfigurationException', (['"""amp + cpu is not supported. Please use a GPU option"""'], {}), "(\n 'amp + cpu is not supported. Please use a GPU option')\n", (1100, 1161), False, 'from pytorch_lightning.utilities.exceptions imp...
aurphillus/Django-Library-Completed
books/admin.py
f46e45f85c888e7694323e22f6e966c291a4a0be
from django.contrib import admin from books.models import Genre, Author, Book, TBR # Register your models here. admin.site.register(Genre) admin.site.register(Author) admin.site.register(Book) admin.site.register(TBR)
[((114, 140), 'django.contrib.admin.site.register', 'admin.site.register', (['Genre'], {}), '(Genre)\n', (133, 140), False, 'from django.contrib import admin\n'), ((141, 168), 'django.contrib.admin.site.register', 'admin.site.register', (['Author'], {}), '(Author)\n', (160, 168), False, 'from django.contrib import admi...
jfmyers9/integrations-core
rabbitmq/tests/common.py
8793c784f1d5b2c9541b2dd4214dd91584793ced
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from packaging import version from datadog_checks.base.utils.common import get_docker_hostname HERE = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.dirname(os.path.dirname(HERE)) ...
[((394, 429), 'packaging.version.parse', 'version.parse', (['RABBITMQ_VERSION_RAW'], {}), '(RABBITMQ_VERSION_RAW)\n', (407, 429), False, 'from packaging import version\n'), ((463, 484), 'datadog_checks.base.utils.common.get_docker_hostname', 'get_docker_hostname', ([], {}), '()\n', (482, 484), False, 'from datadog_chec...
timgates42/st2
st2common/st2common/util/pack.py
0e8ae756f30ffe2e017c64bff67830abdee7f7c9
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[((3469, 3511), 'os.path.join', 'os.path.join', (['pack_dir', 'MANIFEST_FILE_NAME'], {}), '(pack_dir, MANIFEST_FILE_NAME)\n', (3481, 3511), False, 'import os\n'), ((3664, 3676), 'st2common.content.loader.MetaLoader', 'MetaLoader', ([], {}), '()\n', (3674, 3676), False, 'from st2common.content.loader import MetaLoader\n...
jrslagle/DS-Unit-3-Sprint-2-SQL-and-Databases
module1-introduction-to-sql/query.py
8a6b3fd14b6a6833ee3a14b2d8a7db3bee494a14
# Look at the charactercreator_character table # GET_CHARACTERS = """ # SELECT * # FROM charactercreator_character; # """ # How many total Characters are there? (302) TOTAL_CHARACTERS = """ SELECT COUNT(*) as number_of_characters FROM charactercreator_character; """ # How many of each specific subclass? # TOTAL_SUBC...
[]
MickaelRigault/pixelproject
pixelproject/grid.py
d98db99a8e69eafa7a979c02a099e4c07f5fd568
#! /usr/bin/env python # import warnings import numpy as np UNIT_SQUARE = np.asarray([[0,0],[0,1],[1,1],[1,0]])-0.5 from propobject import BaseObject from shapely import geometry import pandas import geopandas # ======================= # # # # Functions # # ...
[((75, 119), 'numpy.asarray', 'np.asarray', (['[[0, 0], [0, 1], [1, 1], [1, 0]]'], {}), '([[0, 0], [0, 1], [1, 1], [1, 0]])\n', (85, 119), True, 'import numpy as np\n'), ((438, 460), 'numpy.atleast_1d', 'np.atleast_1d', (['xbounds'], {}), '(xbounds)\n', (451, 460), True, 'import numpy as np\n'), ((579, 601), 'numpy.atl...
AnirudhDagar/numpy
numpy/lib/format.py
77bc3225e6f4badf83190ec300a0e10e56949644
""" Binary serialization NPY format ========== A simple format for saving numpy arrays to disk with the full information about them. The ``.npy`` format is the standard binary file format in NumPy for persisting a *single* arbitrary NumPy array on disk. The format stores all of the shape and dtype information necess...
[((11608, 11719), 'numpy.dtype', 'numpy.dtype', (["{'names': names, 'formats': formats, 'titles': titles, 'offsets': offsets,\n 'itemsize': offset}"], {}), "({'names': names, 'formats': formats, 'titles': titles,\n 'offsets': offsets, 'itemsize': offset})\n", (11619, 11719), False, 'import numpy\n'), ((14171, 142...
gva-jjoyce/gva_data
gva/data/validator/is_valid_enum.py
cda990d0abb4b175025aaf16e75192bd9cc213af
""" Enumerator Test """ from typing import Any class is_valid_enum(): """ Test if a variable is on a list of valid values """ __slots__ = ('symbols') def __init__(self, **kwargs): """ -> "type": "enum", "symbols": ["up", "down"] symbols: list of allowed values (case sensit...
[]
los-verdes/lv-event-pagenerator
events_page/app.py
88416b626ff2dca6e2d71fa60bff4823954b3131
#!/usr/bin/env python from zoneinfo import ZoneInfo import flask from dateutil.parser import parse from flask_assets import Bundle, Environment from logzero import logger, setup_logger from webassets.filter import get_filter from config import cfg from apis import calendar as gcal setup_logger(name=__name__) app =...
[((286, 313), 'logzero.setup_logger', 'setup_logger', ([], {'name': '__name__'}), '(name=__name__)\n', (298, 313), False, 'from logzero import logger, setup_logger\n'), ((321, 342), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (332, 342), False, 'import flask\n'), ((353, 410), 'webassets.filter.get...
desihub/desicmx
bin/focus_scan.py
6f7c9a3cff25c970af57de20e3a12001382deb23
#!/usr/bin/env python import astropy.io.fits as fits import numpy as np import os import matplotlib.pyplot as plt import argparse def _fname(expid, night, basedir='/n/home/datasystems/users/ameisner/reduced/focus', ccds=False): fname = basedir + '/' + night + '/' + str(expid).zfill(...
[((1758, 1803), 'matplotlib.pyplot.subplots_adjust', 'plt.subplots_adjust', ([], {'hspace': '(0.01)', 'wspace': '(0.01)'}), '(hspace=0.01, wspace=0.01)\n', (1777, 1803), True, 'import matplotlib.pyplot as plt\n'), ((3439, 3454), 'matplotlib.pyplot.figure', 'plt.figure', (['(200)'], {}), '(200)\n', (3449, 3454), True, '...
jadnohra/connect
proto_3/ddq/topics/logics/topic.py
8eb21e6f122898094447bc3d5edb3053d5a2adf2
from typing import List from ddq.taxonomy.reference import Reference from ddq.topics.topic import Topic class Logic(Topic): def references(self) -> List[Reference]: return [ Reference("Classical and Nonclassical Logics", [("Eric", "Schechter")]) ]
[((200, 271), 'ddq.taxonomy.reference.Reference', 'Reference', (['"""Classical and Nonclassical Logics"""', "[('Eric', 'Schechter')]"], {}), "('Classical and Nonclassical Logics', [('Eric', 'Schechter')])\n", (209, 271), False, 'from ddq.taxonomy.reference import Reference\n')]
abhiskk/pythia
pythia/utils/logger.py
c33fb45d74353c25b6269b44551bcafefecb5c7e
# Copyright (c) Facebook, Inc. and its affiliates. import base64 import logging import os import sys from tensorboardX import SummaryWriter from pythia.utils.distributed_utils import is_main_process from pythia.utils.general import (ckpt_name_from_core_args, foldername_from_config_ov...
[((551, 558), 'pythia.utils.timer.Timer', 'Timer', ([], {}), '()\n', (556, 558), False, 'from pythia.utils.timer import Timer\n'), ((674, 706), 'pythia.utils.general.ckpt_name_from_core_args', 'ckpt_name_from_core_args', (['config'], {}), '(config)\n', (698, 706), False, 'from pythia.utils.general import ckpt_name_from...
AaronFriel/pulumi-google-native
sdk/python/pulumi_google_native/healthcare/v1beta1/user_data_mapping.py
75d1cda425e33d4610348972cd70bddf35f1770d
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 _utilities fro...
[((2471, 2507), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""consentStoreId"""'}), "(name='consentStoreId')\n", (2484, 2507), False, 'import pulumi\n'), ((2773, 2801), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""dataId"""'}), "(name='dataId')\n", (2786, 2801), False, 'import pulumi\n'), ((3099, 3130), 'p...
Jerome-maker/ensae_teaching_cs
_doc/sphinxdoc/source/conf.py
43ea044361ee60c00c85aea354a7b25c21c0fd07
import sys import os import sphinx_rtd_theme source_path = os.path.normpath( os.path.join( os.path.abspath( os.path.split(__file__)[0]))) try: from conf_base import * except ImportError: sys.path.append(source_path) from conf_base import * html_theme = 'sphinx_rtd_theme' html_the...
[((331, 369), 'sphinx_rtd_theme.get_html_theme_path', 'sphinx_rtd_theme.get_html_theme_path', ([], {}), '()\n', (367, 369), False, 'import sphinx_rtd_theme\n'), ((389, 430), 'os.path.join', 'os.path.join', (['source_path', '"""phdoc_static"""'], {}), "(source_path, 'phdoc_static')\n", (401, 430), False, 'import os\n'),...
lkilcher/dolfyn-light
dolfyn/adv/api.py
416bf6aa8a3455cebf973f416c9e4ba89a801a71
""" This module contains routines for reading and working with adv data. It contains: +-----------------------------------+-----------------------------------------+ | Name | Description | +===================================+====================================...
[]
ShahriarDhruvo/WebTech_Assignment2
server/api/migrations/0002_auto_20201011_1053.py
845d198a91b1dcc8ed149362499754167fca419d
# Generated by Django 3.1.2 on 2020-10-11 10:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.AlterField( model_name='task', name='author', field=m...
[((319, 372), 'django.db.models.CharField', 'models.CharField', ([], {'default': '"""Anonymous"""', 'max_length': '(100)'}), "(default='Anonymous', max_length=100)\n", (335, 372), False, 'from django.db import migrations, models\n'), ((494, 542), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'default'...
lisy09/flink-ai-extended
flink-ai-flow/lib/notification_service/notification_service/mongo_event_storage.py
011a5a332f7641f66086653e715d0596eab2e107
# # 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...
[((2045, 2063), 'mongoengine.connect', 'connect', ([], {}), '(**db_conf)\n', (2052, 2063), False, 'from mongoengine import connect\n'), ((2155, 2199), 'notification_service.mongo_notification.MongoEvent.get_by_key', 'MongoEvent.get_by_key', (['key', '(0)', '(1)', '"""-version"""'], {}), "(key, 0, 1, '-version')\n", (21...
tahigash/unicon.plugins
src/unicon/plugins/confd/csp/__init__.py
1b43a5a61244ea9312387fd855442ace37c65db9
__author__ = "Dave Wapstra <dwapstra@cisco.com>" from unicon.plugins.confd import ConfdServiceList, ConfdConnection, ConfdConnectionProvider from .statemachine import CspStateMachine from .settings import CspSettings from . import service_implementation as csp_svc class CspServiceList(ConfdServiceList): def __i...
[]
rrwen/search_google
setup.py
e647868ba5da2803e787a3c06b32e09452068736
# -*- coding: utf-8 -*- from setuptools import setup import search_google as package def readme(): with open('README.rst') as f: return ''.join(f.readlines()[11:]) setup( name=package.__name__, version=package.__version__, description=package.__description__, long_description=readme(), author=pack...
[]
chearon/macpack
setup.py
1cf6ce453dd33a811343e4bb6ee5575bc9fe919d
import setuptools import os try: import pypandoc description = pypandoc.convert('README.md', 'rst') if os.path.exists('README.md') else '' except ImportError: description = '' setuptools.setup( name = 'macpack', packages = setuptools.find_packages(), version = '1.0.3', description = 'Makes a macOS binar...
[((108, 135), 'os.path.exists', 'os.path.exists', (['"""README.md"""'], {}), "('README.md')\n", (122, 135), False, 'import os\n'), ((68, 104), 'pypandoc.convert', 'pypandoc.convert', (['"""README.md"""', '"""rst"""'], {}), "('README.md', 'rst')\n", (84, 104), False, 'import pypandoc\n'), ((235, 261), 'setuptools.find_p...
tizon9804/SS2017
WEEK2/day5/scripts/06_NB_Challenges_Isolines.py
7cb374ad21cdfeeef223ac4a65cbbf40dab22e06
import vtk # Read the file (to test that it was written correctly) reader = vtk.vtkXMLImageDataReader() reader.SetFileName("../data/wind_image.vti") reader.Update() print(reader.GetOutput()) # Convert the image to a polydata imageDataGeometryFilter = vtk.vtkImageDataGeometryFilter() imageDataGeometryFilter.SetInputCon...
[((77, 104), 'vtk.vtkXMLImageDataReader', 'vtk.vtkXMLImageDataReader', ([], {}), '()\n', (102, 104), False, 'import vtk\n'), ((252, 284), 'vtk.vtkImageDataGeometryFilter', 'vtk.vtkImageDataGeometryFilter', ([], {}), '()\n', (282, 284), False, 'import vtk\n'), ((477, 499), 'vtk.vtkContourFilter', 'vtk.vtkContourFilter',...
hbutsuak95/iv_rl
mbbl_envs/mbbl/env/gym_env/invertedPendulum.py
0f72a8f077a238237027ea96b7d1160c35ac9959
""" # ----------------------------------------------------------------------------- # @brief: # Tingwu: reset the reward function so that it's more similar to the one # defined in GYM # ----------------------------------------------------------------------------- """ import numpy as np from mbbl.config i...
[((735, 763), 'mbbl.config.init_path.get_abs_base_dir', 'init_path.get_abs_base_dir', ([], {}), '()\n', (761, 763), False, 'from mbbl.config import init_path\n'), ((820, 877), 'mbbl.env.env_util.get_gym_q_info', 'env_util.get_gym_q_info', (['self._env', 'self._current_version'], {}), '(self._env, self._current_version)...
mauriziokovacic/ACME
ACME/visdom/__init__.py
2615b66dd4addfd5c03d9d91a24c7da414294308
from .bar import * from .create_session import * from .image import * from .line import * from .mesh import * from .pie import * from .text import * from .VisdomFigure import * from .VisdomScene import *
[]
andrewdyersmith/pingpongpi
web/pingpongpiweb.py
63e969468da24b2d00e86033dfcb22de75f264bc
# Ping Pong Pi web UI running on flask. # Uses zmq to speak to daemon controlling screen. from flask import Flask, render_template, appcontext_tearing_down, request from multiprocessing import Process, Queue from multiprocessing.connection import Client import atexit import time import zmq app = Flask(__name__) @ap...
[((299, 314), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (304, 314), False, 'from flask import Flask, render_template, appcontext_tearing_down, request\n'), ((588, 595), 'multiprocessing.Queue', 'Queue', ([], {}), '()\n', (593, 595), False, 'from multiprocessing import Process, Queue\n'), ((1156, 1190)...
ajaytikoo/watcher
watcher/tests/decision_engine/strategy/strategies/test_base.py
6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159
# -*- encoding: utf-8 -*- # Copyright (c) 2019 European Organization for Nuclear Research (CERN) # # 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...
[((2053, 2108), 'unittest.mock.patch.object', 'mock.patch.object', (['strategies.BaseStrategy', '"""osc"""', 'None'], {}), "(strategies.BaseStrategy, 'osc', None)\n", (2070, 2108), False, 'from unittest import mock\n'), ((2114, 2161), 'unittest.mock.patch.object', 'mock.patch.object', (['manager', '"""DataSourceManager...
BenG49/sudoku
main.py
e4b14655e23d04c161feb16ceb1338537f519bdb
from sudoku import Sudoku def main(): s = Sudoku.parse( ''' ------------- | |2 | | | | 6 |4 3| | | 5| 7 | ------------- | 7 | 2|8 | |51 | 4|9 | | 9| 3| | ------------- | | 9| | | 2| | 98| | 83|1 |2 | ------------- ''' ) print(s) print(s.solve()) if __name...
[((44, 285), 'sudoku.Sudoku.parse', 'Sudoku.parse', (['"""\n\t\t-------------\n\t\t| |2 | |\n\t\t| | 6 |4 3|\n\t\t| | 5| 7 |\n\t\t-------------\n\t\t| 7 | 2|8 |\n\t\t|51 | 4|9 |\n\t\t| 9| 3| |\n\t\t-------------\n\t\t| | 9| |\n\t\t| 2| | 98|\n\t\t| 83|1 |2 |\n\t\t-------------\n\t\t"""'], {}...
pfnet-research/autogbt-alt
test/test_sampler.py
57f7ae1bce2923d11f73c3631e34be49c7dd25da
import numpy as np import pandas as pd from autogbt.sampler import MajorityUnderSampler def _test_sample(y): sampler = MajorityUnderSampler() idx = sampler.sample(y, 40000, 3.0) assert len(idx) == 40000 assert y[idx].sum() == 10000 def test_sample_with_series(): y = pd.Series(np.concatenate([np....
[((125, 147), 'autogbt.sampler.MajorityUnderSampler', 'MajorityUnderSampler', ([], {}), '()\n', (145, 147), False, 'from autogbt.sampler import MajorityUnderSampler\n'), ((687, 709), 'autogbt.sampler.MajorityUnderSampler', 'MajorityUnderSampler', ([], {}), '()\n', (707, 709), False, 'from autogbt.sampler import Majorit...
leandro-santiago/bloomwisard
experiment/diabetes/accuracy_info.py
4c02610c4ef2d2cf8424797c8a815da182ca2383
import numpy as np import sys from timeit import default_timer as timer sys.path.append("../../") from core import wnn from encoding import thermometer from encoding import util #Load Diabetes data base_path = "../../dataset/diabetes/" #2/3 Test bits_encoding = 20 train_data, train_label, test_data, test_label, data...
[]
hoppfull/Legacy-Python
PyGame/pygame1/tutorial1/startercode.py
43f465bfdb76c91f2ac16aabb0783fdf5f459adb
from pygamehelper import * from pygame import * from pygame.locals import * from vec2d import * from random import uniform import numpy as np class Starter(PygameHelper): def __init__(self): self.w, self.h = 800, 600 PygameHelper.__init__(self, size=(self.w, self.h), fill=((0,0,0))) d...
[((579, 597), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (595, 597), True, 'import numpy as np\n'), ((603, 621), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (619, 621), True, 'import numpy as np\n'), ((627, 645), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (643, 645),...
thewhiteninja/twitch-recorder
main.py
815b571e22917daa906d054a8ab2fe794e99bb8a
import glob import os import sys import utils from recorder import StreamRec OUTDIR = "" def parse_args(a): global OUTDIR i = 1 while i < len(a): if a[i] in ["-h", "--help", "/?"]: usage() if a[i] in ["-d", "--dir"]: OUTDIR = a[i + 1] i += 1 i ...
[((681, 692), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (689, 692), False, 'import sys\n'), ((752, 797), 'glob.glob', 'glob.glob', (['"""data/**/*.stream"""'], {'recursive': '(True)'}), "('data/**/*.stream', recursive=True)\n", (761, 797), False, 'import glob\n'), ((1022, 1037), 'utils.welcome', 'utils.welcome', ...
scottwedge/OpenStack-Stein
karbor-1.3.0/karbor/policies/protectables.py
7077d1f602031dace92916f14e36b124f474de15
# Copyright (c) 2017 Huawei Technologies Co., Ltd. # 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 # # ...
[((925, 1132), 'oslo_policy.policy.DocumentedRuleDefault', 'policy.DocumentedRuleDefault', ([], {'name': 'GET_POLICY', 'check_str': 'base.RULE_ADMIN_OR_OWNER', 'description': '"""Show a protectable type."""', 'operations': "[{'method': 'GET', 'path': '/protectables/{protectable_type}'}]"}), "(name=GET_POLICY, check_str...
unyo/uhpackage
router.example.py
07d0263c586e5daa0012c3ff82754be381850911
#!/usr/bin/python # -*- coding: utf-8 -*- # routers are dictionaries of URL routing parameters. # # For each request, the effective router is: # the built-in default base router (shown below), # updated by the BASE router in routes.py routers, # updated by the app-specific router in routes.py routers (if an...
[((9489, 9506), 'doctest.testmod', 'doctest.testmod', ([], {}), '()\n', (9504, 9506), False, 'import doctest\n')]
costrouc/uarray
notebooks/2018.11.09 Meeting.py
c3c42147181a88265942ad5f9cf439467f746782
#%% from uarray.core import * #%% s = Scalar(Int(10)) #%% @operation def Always(a: T) -> CCallableUnary[T, CContent]: ... #%% register(Call(Always(w("a")), w("idx")), lambda a, idx: a) #%% a_ten = Always(s) #%% s = Sequence(Int(10), a_ten)
[]
dwstreetNNL/spack
var/spack/repos/builtin/packages/py-black/package.py
8f929707147c49606d00386a10161529dad4ec56
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyBlack(PythonPackage): """Black is the uncompromising Python code formatter. By using it,...
[]
vallemrv/my_store_test
store/adminshop/templatetags/admin_extras.py
2da624fd02c5f1784464f15b751b488f3dd2bae6
# -*- coding: utf-8 -*- # @Author: Manuel Rodriguez <valle> # @Date: 27-Aug-2017 # @Email: valle.mrv@gmail.com # @Filename: admin_extras.py # @Last modified by: valle # @Last modified time: 02-Feb-2018 # @License: Apache license vesion 2.0 from django import template from django.db.models import Q try: from ...
[((509, 527), 'django.template.Library', 'template.Library', ([], {}), '()\n', (525, 527), False, 'from django import template\n'), ((1833, 1874), 'adminshop.models.Compras.objects.filter', 'Compras.objects.filter', ([], {'producto__id': 'p.pk'}), '(producto__id=p.pk)\n', (1855, 1874), False, 'from adminshop.models imp...
abdalazizrashid/Theano-PyMC
doc/tutorial/using_gpu_solution_1.py
90fa750461e91fb6281d494ae86404e2153fd7eb
#!/usr/bin/env python # Aesara tutorial # Solution to Exercise in section 'Using the GPU' # 1. Raw results import numpy as np import aesara import aesara.tensor as tt aesara.config.floatX = "float32" rng = np.random N = 400 feats = 784 D = ( rng.randn(N, feats).astype(aesara.config.floatX), rng.randint...
[((440, 469), 'aesara.shared', 'aesara.shared', (['D[0]'], {'name': '"""x"""'}), "(D[0], name='x')\n", (453, 469), False, 'import aesara\n'), ((474, 503), 'aesara.shared', 'aesara.shared', (['D[1]'], {'name': '"""y"""'}), "(D[1], name='y')\n", (487, 503), False, 'import aesara\n'), ((1099, 1120), 'aesara.tensor.grad', ...
souravsingh/chainercv
chainercv/transforms/bbox/translate_bbox.py
8f76510472bc95018c183e72f37bc6c34a89969c
def translate_bbox(bbox, y_offset=0, x_offset=0): """Translate bounding boxes. This method is mainly used together with image transforms, such as padding and cropping, which translates the left top point of the image from coordinate :math:`(0, 0)` to coordinate :math:`(y, x) = (y_{offset}, x_{offse...
[]
ministryofjustice/cla-end-to-end-tests
behave/features/environment.py
3d7e525c17f38403a91087c2b1af460ca1109a9b
import os from configparser import ConfigParser from helper.helper_web import get_browser def before_all(context): config = ConfigParser() print((os.path.join(os.getcwd(), 'setup.cfg'))) my_file = (os.path.join(os.getcwd(), 'setup.cfg')) config.read(my_file) # Reading the browser type from the c...
[((130, 144), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (142, 144), False, 'from configparser import ConfigParser\n'), ((225, 236), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (234, 236), False, 'import os\n'), ((169, 180), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (178, 180), False, 'import os\n...
j-sommer/recipe-organizer
recipe_organizer/gui/recipe_list/recipe_source.py
91d39e12c453ecf3d3254645b565bbceacaecde9
from pathlib import Path from tkinter import Frame, Label from recipe_organizer.events.event import Event, EventType from recipe_organizer.events.event_observer import EventObserver from recipe_organizer.events.event_publisher import EventPublisher from recipe_organizer.gui.interfaces.widget_container import WidgetCon...
[((682, 710), 'tkinter.Frame.__init__', 'Frame.__init__', (['self', 'parent'], {}), '(self, parent)\n', (696, 710), False, 'from tkinter import Frame, Label\n'), ((780, 804), 'recipe_organizer.events.event_publisher.EventPublisher.add', 'EventPublisher.add', (['self'], {}), '(self)\n', (798, 804), False, 'from recipe_o...
xiki-tempula/spack
var/spack/repos/builtin/packages/spot/package.py
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Spot(AutotoolsPackage): """Spot is a C++11 library for omega-automata manipulation and mod...
[]
itspuneet/itspuneet
0.py
d44f78afcff275aa56f03bba738ac3e4f2c30843
k=0 while k!=1: print(k) k+=1
[]
Cole-vJ/AdvEMDpy
jss_figures_replication_script.py
160cd44b371a2c8aa66961f23062c1d7305dd728
# ________ # / # \ / # \ / # \/ import random import textwrap import emd_mean import AdvEMDpy import emd_basis import emd_utils import numpy as np import pandas as pd import cvxpy as cvx import seaborn as sns import matplotlib.pyplot as plt from scipy.integrate import odeint from ...
[((670, 695), 'seaborn.set', 'sns.set', ([], {'style': '"""darkgrid"""'}), "(style='darkgrid')\n", (677, 695), True, 'import seaborn as sns\n'), ((715, 746), 'numpy.linspace', 'np.linspace', (['(0)', '(2 * np.pi)', '(1001)'], {}), '(0, 2 * np.pi, 1001)\n', (726, 746), True, 'import numpy as np\n'), ((841, 906), 'emd_ut...
wenhuchen/LogicNLG
GPT-distributed.py
e986516e5b6d310219215510b3fe1603d03215cd
import argparse import logging import torch import torch.nn.functional as F import numpy as np from torch import nn from torch.autograd import Variable from transformers import GPT2Config from transformers import GPT2LMHeadModel, GPT2Tokenizer, BertTokenizer from DataLoader import * from Model import BERTGen from utils...
[((722, 777), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'UserWarning'}), "('ignore', category=UserWarning)\n", (745, 777), False, 'import warnings\n'), ((788, 808), 'torch.device', 'torch.device', (['"""cuda"""'], {}), "('cuda')\n", (800, 808), False, 'import torch\n'), ((834...
niits/BentoML
bentoml/saved_bundle/loader.py
3954f36762e10f5df15af7e0ae6dd71f5f214261
# Copyright 2019 Atalaya Tech, 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, ...
[((1194, 1221), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1211, 1221), False, 'import logging\n'), ((1635, 1657), 'bentoml.utils.s3.is_s3_url', 'is_s3_url', (['bundle_path'], {}), '(bundle_path)\n', (1644, 1657), False, 'from bentoml.utils.s3 import is_s3_url\n'), ((3286, 3297), 'fu...
cds-snc/notifier-api
migrations/versions/0158_remove_rate_limit_default.py
90b385ec49efbaee7e607516fc7d9f08991af813
""" Revision ID: 0158_remove_rate_limit_default Revises: 0157_add_rate_limit_to_service Create Date: 2018-01-09 14:33:08.313893 """ import sqlalchemy as sa from alembic import op revision = "0158_remove_rate_limit_default" down_revision = "0157_add_rate_limit_to_service" def upgrade(): op.execute("ALTER TABLE ...
[((296, 360), 'alembic.op.execute', 'op.execute', (['"""ALTER TABLE services ALTER rate_limit DROP DEFAULT"""'], {}), "('ALTER TABLE services ALTER rate_limit DROP DEFAULT')\n", (306, 360), False, 'from alembic import op\n'), ((365, 437), 'alembic.op.execute', 'op.execute', (['"""ALTER TABLE services_history ALTER rate...
younghk/younghk.netlify.com
gen-post.py
605ab089252127c0b768d31afb027e8896ae33b4
import os import errno from datetime import datetime print("Generating A New Post\n") post_name = input('Input Post Name: ') date_time = datetime.now() date_time_dir = date_time.strftime("%Y-%m-%d") date_time_post = date_time.strftime("%Y-%m-%d %H:%M:%S") p_name = post_name.replace(" ","-") p_name = p_name.replace(...
[((140, 154), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (152, 154), False, 'from datetime import datetime\n'), ((504, 522), 'os.path.isdir', 'os.path.isdir', (['dir'], {}), '(dir)\n', (517, 522), False, 'import os\n'), ((545, 562), 'os.path.join', 'os.path.join', (['dir'], {}), '(dir)\n', (557, 562), F...
Lyle-zhang/RMG-Py
rmgpy/reactionTest.py
273eb51fa3c175562056c85d7d61814d5fa2986d
#!/usr/bin/env python # encoding: utf-8 -*- """ This module contains unit tests of the rmgpy.reaction module. """ import numpy import unittest from external.wip import work_in_progress from rmgpy.species import Species, TransitionState from rmgpy.reaction import Reaction from rmgpy.statmech.translation import Transl...
[((1776, 1824), 'rmgpy.reaction.Reaction', 'Reaction', ([], {'reactants': 'reactants', 'products': 'products'}), '(reactants=reactants, products=products)\n', (1784, 1824), False, 'from rmgpy.reaction import Reaction\n'), ((13183, 13232), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float6...
albeiks/omaralbeik.com
backend/core/api_urls.py
8d096130393919612863aac6280dffaf6e00961d
from django.conf.urls import url, include from core.routers import OptionalTrailingSlashRouter from blog import views as blogViews from snippets import views as snippetsViews from projects import views as projectsViews from tags import views as tagsViews from contents import views as contentsViews from contact import ...
[((353, 382), 'core.routers.OptionalTrailingSlashRouter', 'OptionalTrailingSlashRouter', ([], {}), '()\n', (380, 382), False, 'from core.routers import OptionalTrailingSlashRouter\n'), ((863, 883), 'django.conf.urls.include', 'include', (['router.urls'], {}), '(router.urls)\n', (870, 883), False, 'from django.conf.urls...
alexberndt/mobile-AGV-optimization
python/video_ADG.py
76b97fd5aa3898fd6cb6f74f8d87140555c92af5
""" closed-loop MILP solved to determine optimal ordering defined by ADG """ import sys import yaml import time import matplotlib.colors as mcolors import matplotlib import matplotlib.pyplot as plt import random import logging import time import networkx as nx import csv import statistics as stat import os import ...
[((426, 458), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""functions/"""'], {}), "(1, 'functions/')\n", (441, 458), False, 'import sys\n'), ((640, 667), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (657, 667), False, 'import logging\n'), ((668, 762), 'logging.basicConfig', 'loggin...
bcurnow/rfid-security-svc
tests/model/test_guest.py
d3806cb74d3d0cc2623ea425230dc8781ba4d8b4
import pytest from unittest.mock import patch import rfidsecuritysvc.model.guest as model from rfidsecuritysvc.model.color import Color from rfidsecuritysvc.model.guest import Guest from rfidsecuritysvc.model.sound import Sound from rfidsecuritysvc.exception import SoundNotFoundError def test_Guest(assert_model, def...
[((500, 542), 'unittest.mock.patch', 'patch', (['"""rfidsecuritysvc.model.guest.table"""'], {}), "('rfidsecuritysvc.model.guest.table')\n", (505, 542), False, 'from unittest.mock import patch\n'), ((700, 742), 'unittest.mock.patch', 'patch', (['"""rfidsecuritysvc.model.guest.table"""'], {}), "('rfidsecuritysvc.model.gu...
reavessm/Ice
ice/consoles.py
e78d046abfd6006b1a81d1cbdb516b7c3e141ac9
# encoding: utf-8 import os import roms def console_roms_directory(configuration, console): """ If the user has specified a custom ROMs directory in consoles.txt then return that. Otherwise, append the shortname of the console to the default ROMs directory given by config.txt. """ if console.custom_ro...
[((985, 1007), 'os.path.splitext', 'os.path.splitext', (['path'], {}), '(path)\n', (1001, 1007), False, 'import os\n'), ((397, 431), 'roms.roms_directory', 'roms.roms_directory', (['configuration'], {}), '(configuration)\n', (416, 431), False, 'import roms\n')]
dumpmemory/roformer-v2
clue/c3.py
95b71ae03b8bb910998285e194d7752b1e4104c0
#! -*- coding:utf-8 -*- # CLUE评测 # c3多项选择阅读理解 # 思路:每个选项分别与问题、篇章拼接后打分排序 import json import numpy as np from snippets import * from bert4keras.backend import keras from bert4keras.snippets import sequence_padding, DataGenerator from bert4keras.snippets import open from bert4keras.snippets import truncate_sequences from ...
[((3237, 3281), 'bert4keras.backend.keras.models.Model', 'keras.models.Model', (['base.model.input', 'output'], {}), '(base.model.input, output)\n', (3255, 3281), False, 'from bert4keras.backend import keras\n'), ((3071, 3111), 'bert4keras.backend.keras.layers.Lambda', 'keras.layers.Lambda', (['(lambda x: x[:, (0)])'],...
zipated/src
tools/perf/contrib/oop_raster/oop_raster.py
2b8388091c71e442910a21ada3d97ae8bc1845d3
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from benchmarks import smoothness,thread_times import page_sets from telemetry import benchmark # pylint: disable=protected-access def CustomizeBrowserOptio...
[((543, 588), 'telemetry.benchmark.Owner', 'benchmark.Owner', ([], {'emails': "['enne@chromium.org']"}), "(emails=['enne@chromium.org'])\n", (558, 588), False, 'from telemetry import benchmark\n'), ((996, 1041), 'telemetry.benchmark.Owner', 'benchmark.Owner', ([], {'emails': "['enne@chromium.org']"}), "(emails=['enne@c...
mrocklin/logpy
logpy/util.py
7e32f4da10a0ab5b86fb23947cfce9a4d49c6b3f
import itertools as it from toolz.compatibility import range, map, iteritems def hashable(x): try: hash(x) return True except TypeError: return False def transitive_get(key, d): """ Transitive dict.get >>> from logpy.util import transitive_get >>> d = {1: 2, 2: 3, 3: 4} ...
[((1743, 1758), 'toolz.compatibility.map', 'map', (['iter', 'seqs'], {}), '(iter, seqs)\n', (1746, 1758), False, 'from toolz.compatibility import range, map, iteritems\n'), ((2132, 2152), 'itertools.islice', 'it.islice', (['seq', '(0)', 'n'], {}), '(seq, 0, n)\n', (2141, 2152), True, 'import itertools as it\n'), ((2850...
rinocloud/rinobot-plugin-shift
index.py
4f7f16a5e610b91b64377733d24b6ab4b63daa67
import rinobot_plugin as bot import numpy as np def main(): # lets get our parameters and data filepath = bot.filepath() data = bot.loadfile(filepath) # now comes the custom plugin logic shift = bot.get_arg('shift', type=float, required=True) index = bot.index_from_args(data) data[index] =...
[((115, 129), 'rinobot_plugin.filepath', 'bot.filepath', ([], {}), '()\n', (127, 129), True, 'import rinobot_plugin as bot\n'), ((141, 163), 'rinobot_plugin.loadfile', 'bot.loadfile', (['filepath'], {}), '(filepath)\n', (153, 163), True, 'import rinobot_plugin as bot\n'), ((217, 264), 'rinobot_plugin.get_arg', 'bot.get...
arsfeld/fog-web2py
gluon/contrib/memcache/__init__.py
32263a03d4183dcaf7537c87edcb4e574d4bec6e
from gluon.contrib.memcache.memcache import Client import time """ examle of usage: cache.memcache=MemcacheClient(request,[127.0.0.1:11211],debug=true) """ import cPickle as pickle import thread locker = thread.allocate_lock() def MemcacheClient(*a, **b): locker.acquire() if not hasattr(MemcacheClient, '__...
[((208, 230), 'thread.allocate_lock', 'thread.allocate_lock', ([], {}), '()\n', (228, 230), False, 'import thread\n'), ((707, 796), 'gluon.contrib.memcache.memcache.Client.__init__', 'Client.__init__', (['self', 'servers', 'debug', 'pickleProtocol', 'pickler', 'unpickler', 'pload', 'pid'], {}), '(self, servers, debug, ...
aas-core-works/aas-core-csharp-codegen
test_data/parse/unexpected/symbol_table/inheritance_from_non_class/meta_model.py
731f706e2d12bf80722ac55d920fcf5402fb26ef
class Some_enum(Enum): some_literal = "some_literal" class Something(Some_enum): pass class Reference: pass __book_url__ = "dummy" __book_version__ = "dummy" associate_ref_with(Reference)
[]
wannaphong/deepcut
deepcut/deepcut.py
e4f7779caa087c5ffbad3bc4e88f919e300d020c
#!/usr/bin/env python # encoding: utf-8 import numbers import os import re import sys from itertools import chain import numpy as np import scipy.sparse as sp import six import pickle from .model import get_convo_nn2 from .stop_words import THAI_STOP_WORDS from .utils import CHAR_TYPES_MAP, CHARS_MAP, create_feature_...
[((341, 366), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (356, 366), False, 'import os\n'), ((381, 440), 'os.path.join', 'os.path.join', (['MODULE_PATH', '"""weight"""', '"""cnn_without_ne_ab.h5"""'], {}), "(MODULE_PATH, 'weight', 'cnn_without_ne_ab.h5')\n", (393, 440), False, 'import os\...
djiajunustc/spconv
spconv/utils/__init__.py
647927ce6b64dc51fbec4eb50c7194f8ca5007e5
# Copyright 2021 Yan Yan # # 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, soft...
[((2450, 2491), 'numpy.zeros', 'np.zeros', (['(N, K)'], {'dtype': 'box_corners.dtype'}), '((N, K), dtype=box_corners.dtype)\n', (2458, 2491), True, 'import numpy as np\n'), ((3106, 3147), 'numpy.zeros', 'np.zeros', (['(N, K)'], {'dtype': 'box_corners.dtype'}), '((N, K), dtype=box_corners.dtype)\n', (3114, 3147), True, ...
justremotephone/android_external_chromium_org
build/android/gyp/lint.py
246856e61da7acf5494076c74198f2aea894a721
#!/usr/bin/env python # # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs Android's lint tool.""" import optparse import os import sys from xml.dom import minidom from util import build_utils ...
[((2693, 2720), 'os.path.exists', 'os.path.exists', (['result_path'], {}), '(result_path)\n', (2707, 2720), False, 'import os\n'), ((3718, 3741), 'optparse.OptionParser', 'optparse.OptionParser', ([], {}), '()\n', (3739, 3741), False, 'import optparse\n'), ((4602, 4789), 'util.build_utils.CheckOptions', 'build_utils.Ch...
snu5mumr1k/clif
clif/pybind11/generator.py
3a907dd7b0986f2b3306c88503d414f4d4f963ae
# Copyright 2020 Google LLC # # 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, ...
[((2500, 2552), 'clif.pybind11.type_casters.generate_from', 'type_casters.generate_from', (['ast', 'self._include_paths'], {}), '(ast, self._include_paths)\n', (2526, 2552), False, 'from clif.pybind11 import type_casters\n'), ((2904, 2948), 'clif.pybind11.function.generate_from', 'function.generate_from', (['"""m"""', ...
ChristopheGraveline064/ADVENT
advent/model/discriminator.py
fc0ecd099862ed68979b2197423f1bb34df09c74
from torch import nn def get_fc_discriminator(num_classes, ndf=64): return nn.Sequential( nn.Conv2d(num_classes, ndf, kernel_size=4, stride=2, padding=1), nn.LeakyReLU(negative_slope=0.2, inplace=True), nn.Conv2d(ndf, ndf * 2, kernel_size=4, stride=2, padding=1), nn.LeakyReLU(negat...
[((104, 167), 'torch.nn.Conv2d', 'nn.Conv2d', (['num_classes', 'ndf'], {'kernel_size': '(4)', 'stride': '(2)', 'padding': '(1)'}), '(num_classes, ndf, kernel_size=4, stride=2, padding=1)\n', (113, 167), False, 'from torch import nn\n'), ((177, 223), 'torch.nn.LeakyReLU', 'nn.LeakyReLU', ([], {'negative_slope': '(0.2)',...
aglotero/spyder
spyder/dependencies.py
075d32fa359b728416de36cb0e744715fa5e3943
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """Module checking Spyder runtime dependencies""" import os # Local imports from spyder.utils import programs class Dependency(object): """Sp...
[((1321, 1415), 'spyder.utils.programs.is_module_installed', 'programs.is_module_installed', (['self.modname', 'self.required_version', 'self.installed_version'], {}), '(self.modname, self.required_version, self.\n installed_version)\n', (1349, 1415), False, 'from spyder.utils import programs\n'), ((896, 932), 'spyd...
jasperhyp/Chemprop4SE
setup.py
c02b604b63b6766464db829fea0b306c67302e82
import os from setuptools import find_packages, setup # Load version number __version__ = None src_dir = os.path.abspath(os.path.dirname(__file__)) version_file = os.path.join(src_dir, 'chemprop', '_version.py') with open(version_file, encoding='utf-8') as fd: exec(fd.read()) # Load README with ope...
[((172, 220), 'os.path.join', 'os.path.join', (['src_dir', '"""chemprop"""', '"""_version.py"""'], {}), "(src_dir, 'chemprop', '_version.py')\n", (184, 220), False, 'import os\n'), ((129, 154), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (144, 154), False, 'import os\n'), ((1182, 1197), 's...
HarshCasper/mars
mars/tensor/indexing/slice.py
4c12c968414d666c7a10f497bc22de90376b1932
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[]
leewckk/vim.configuration
ftplugin/python/python/pyflakes/pyflakes/checker.py
db3faa4343714dd3eb3b7ab19f8cd0b64a52ee57
""" Main module. Implement the central Checker class. Also, it models the Bindings and Scopes. """ import __future__ import doctest import os import sys PY2 = sys.version_info < (3, 0) PY32 = sys.version_info < (3, 3) # Python 2.5 to 3.2 PY33 = sys.version_info < (3, 4) # Python 2.5 to 3.3 PY34 = ...
[((14727, 14762), 'os.environ.get', 'os.environ.get', (['"""PYFLAKES_BUILTINS"""'], {}), "('PYFLAKES_BUILTINS')\n", (14741, 14762), False, 'import os\n'), ((30327, 30350), 'doctest.DocTestParser', 'doctest.DocTestParser', ([], {}), '()\n', (30348, 30350), False, 'import doctest\n'), ((25408, 25439), 'os.path.basename',...
infinyte7/Auto-Screenshot
AutoScreenShot.py
5d8e39af61f3361f372ffb48add53171b7cea672
# Project Name: Auto Screenshot # Description: Take screenshot of screen when any change take place. # Author: Mani (Infinyte7) # Date: 26-10-2020 # License: MIT from pyscreenshot import grab from PIL import ImageChops import os import time import subprocess, sys from datetime import datetime import tkinter as tk fr...
[((547, 597), 'tkinter.font.Font', 'font.Font', ([], {'family': '"""Roboto"""', 'size': '(16)', 'weight': '"""bold"""'}), "(family='Roboto', size=16, weight='bold')\n", (556, 597), False, 'from tkinter import font\n'), ((1980, 2054), 'subprocess.check_output', 'subprocess.check_output', (["[sys.executable, 'GetScreenCo...
HaidongHe/rqalpha
rqalpha/utils/logger.py
bb824178425909e051c456f6062a6c5bdc816421
# -*- coding: utf-8 -*- # 版权所有 2019 深圳米筐科技有限公司(下称“米筐科技”) # # 除非遵守当前许可,否则不得使用本软件。 # # * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件): # 遵守 Apache License 2.0(下称“Apache 2.0 许可”),您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。 # 除非法律有要求或以书面形式达成协议,否则本软件分发时需保持当前许可“原样”...
[((787, 823), 'logbook.set_datetime_format', 'logbook.set_datetime_format', (['"""local"""'], {}), "('local')\n", (814, 823), False, 'import logbook\n'), ((1445, 1471), 'logbook.StderrHandler', 'StderrHandler', ([], {'bubble': '(True)'}), '(bubble=True)\n', (1458, 1471), False, 'from logbook import Logger, StderrHandle...
wikimedia/operations-debs-salt
salt/modules/oracle.py
be6342abc7401ff92f67ed59f7834f1359f35314
# -*- coding: utf-8 -*- ''' Oracle DataBase connection module :mainteiner: Vladimir Bormotov <bormotov@gmail.com> :maturity: new :depends: cx_Oracle :platform: all :configuration: module provide connections for multiple Oracle DB instances. **OS Environment** .. code-block:: text ORACLE_HOME: pa...
[((690, 717), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (707, 717), False, 'import logging\n'), ((2702, 2756), 'salt.utils.decorators.depends', 'depends', (['"""cx_Oracle"""'], {'fallback_function': '_cx_oracle_req'}), "('cx_Oracle', fallback_function=_cx_oracle_req)\n", (2709, 2756)...
ashwini-balnaves/python-consul
tests/test_std.py
4ddec9b57eb5284b58967ce1a9b2422519f88cc2
import base64 import operator import struct import time import pytest import six import consul import consul.std Check = consul.Check class TestHTTPClient(object): def test_uri(self): http = consul.std.HTTPClient() assert http.uri('/v1/kv') == 'http://127.0.0.1:8500/v1/kv' assert http....
[((209, 232), 'consul.std.HTTPClient', 'consul.std.HTTPClient', ([], {}), '()\n', (230, 232), False, 'import consul\n'), ((486, 517), 'consul.Consul', 'consul.Consul', ([], {'port': 'consul_port'}), '(port=consul_port)\n', (499, 517), False, 'import consul\n'), ((767, 798), 'consul.Consul', 'consul.Consul', ([], {'port...