repo_name stringlengths 7 94 | repo_path stringlengths 4 237 | repo_head_hexsha stringlengths 40 40 | content stringlengths 10 680k | apis stringlengths 2 840k |
|---|---|---|---|---|
rafaelols/airflow | dags/treinos_igti/treino03.py | 8e4af5fb576a9568af476c0607819649b724adea | from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.python_operator import PythonOperator, BranchPythonOperator
from datetime import datetime, timedelta
import pandas as pd
import random
# Default args definition
default_args = {
'owner': 'Rafael',
'depends_o... | [((21, 6, 26, 1), 'airflow.DAG', 'DAG', (), '', False, 'from airflow import DAG\n'), ((28, 11, 32, 1), 'airflow.operators.bash_operator.BashOperator', 'BashOperator', (), '', False, 'from airflow.operators.bash_operator import BashOperator\n'), ((37, 14, 41, 1), 'airflow.operators.python_operator.PythonOperator', 'Pyth... |
DannyPol/flatcam | tclCommands/TclCommandListSys.py | 25a8634d0658e98b7fae31a095f8bef40c1b3067 | # ##########################################################
# FlatCAM: 2D Post-processing for Manufacturing #
# File Author: Marius Adrian Stanciu (c) #
# Date: 8/17/2019 #
# MIT Licence #
# #############... | [] |
MuellerSeb/ogs5py | ogs5py/fileclasses/mcp/core.py | 752e7bd2298fbd476406d168f6b7d1a85863dccd | # -*- coding: utf-8 -*-
"""Class for the ogs COMPONENT_PROPERTIES file."""
from ogs5py.fileclasses.base import BlockFile
class MCP(BlockFile):
"""
Class for the ogs COMPONENT_PROPERTIES file.
Parameters
----------
task_root : str, optional
Path to the destiny model folder.
... | [] |
crowdy/keystone | keystone/tests/unit/test_v3_assignment.py | 1e7ecca881a51144d61ae8026e1a77d6669997e2 | # 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
# distributed under t... | [((493, 5, 493, 46), 'keystone.tests.unit.skip_if_cache_disabled', 'unit.skip_if_cache_disabled', ({(493, 33, 493, 45): '"""assignment"""'}, {}), "('assignment')", False, 'from keystone.tests import unit\n'), ((524, 5, 524, 46), 'keystone.tests.unit.skip_if_cache_disabled', 'unit.skip_if_cache_disabled', ({(524, 33, 52... |
agustinhenze/mibs.snmplabs.com | pysnmp-with-texts/XXX-MIB.py | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | #
# PySNMP MIB module XXX-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/XXX-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:44:42 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)... | [] |
zhanghang1989/notedown | setup.py | b0fa1eac88d1cd7fa2261d6c454f82669e6f552b | from setuptools import setup
# create __version__
exec(open('./_version.py').read())
setup(
name="notedown",
version=__version__,
description="Convert markdown to IPython notebook.",
author="Aaron O'Leary",
author_email='dev@aaren.me',
url='http://github.com/aaren/notedown',
install_requir... | [((6, 0, 19, 1), 'setuptools.setup', 'setup', (), '', False, 'from setuptools import setup\n')] |
the-muses-ltd/Multithreaded-Webcrawler-Cassandra- | multithreaded_webcrawler.py | eee68faf3c6ecb548edd0e96ce445dcd366fb735 | # This is a reusable webcraawler architecture that can be adapted to scrape any webstie.
# RESULTS:
# Roughly 24 seconds per thousand courses scraped for ThreadPoolExecutor vs 63s for unthreaded script.
# This is a very basic implementation of multithreading in order to show the proof of concept, but is a good base to... | [((43, 11, 43, 28), 'mitopencourseware_crawler_worker.mit_crawler', 'mit_crawler', ({(43, 23, 43, 27): 'link'}, {}), '(link)', False, 'from mitopencourseware_crawler_worker import mit_crawler\n'), ((24, 22, 24, 39), 'requests.get', 'requests.get', ({(24, 35, 24, 38): 'url'}, {}), '(url)', False, 'import requests\n'), (... |
jumblesale/genyrator | genyrator/entities/Template.py | c4429f689e92e8447b0b944e7d9b434f99cae51d | from typing import List, Optional, NewType, Tuple, NamedTuple, Type
import attr
from jinja2 import Template as JinjaTemplate, StrictUndefined
from genyrator.entities.Entity import Entity
from genyrator.path import create_relative_path
OutPath = NewType('OutPath', Tuple[List[str], str])
Import = NamedTuple('Import',
... | [((8, 10, 8, 51), 'typing.NewType', 'NewType', ({(8, 18, 8, 27): '"""OutPath"""', (8, 29, 8, 50): 'Tuple[List[str], str]'}, {}), "('OutPath', Tuple[List[str], str])", False, 'from typing import List, Optional, NewType, Tuple, NamedTuple, Type\n'), ((9, 9, 11, 51), 'typing.NamedTuple', 'NamedTuple', ({(9, 20, 9, 28): '"... |
aarkwright/ableton_devices | MIDI Remote Scripts/Push2/mode_collector.py | fe5df3bbd64ccbc136bba722ba1e131a02969798 | # uncompyle6 version 3.3.5
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
# Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\Push2\mode_collector.py
# Compiled at: 2018-11-30 15:48:11
from __fut... | [((26, 5, 26, 30), 'ableton.v2.base.listens', 'listens', ({(26, 13, 26, 29): "b'selected_mode'"}, {}), "(b'selected_mode')", False, 'from ableton.v2.base import listenable_property, listens, EventObject\n'), ((34, 5, 34, 30), 'ableton.v2.base.listens', 'listens', ({(34, 13, 34, 29): "b'selected_mode'"}, {}), "(b'select... |
daidaotong/SingleView | src/topicModel.py | db3249ca5afba97f750495cccbc185de88bf2287 | from gensim import corpora, models, similarities, matutils,utils
from gensim.models import KeyedVectors
import numpy as np
#Word2vec Experiment
testString = ['PAST_MEDICAL_HISTORY','PAST_SURGICAL_HISTORY','PHYSICAL_EXAMINATION']
'''
word_vectors = KeyedVectors.load_word2vec_format('~/Downloads/GoogleNews-vectors-negat... | [] |
drewbitt/lightnovel-crawler | src/bots/test/test_inputs.py | fa9546ad9dcff49c75296b0b8772f6578689adcc | from base64 import decodestring as b64decode
allowed_failures = [
'https://ranobelib.me/',
'https://www.aixdzs.com/',
'https://webnovelindonesia.com/',
b64decode("aHR0cHM6Ly9jb21yYWRlbWFvLmNvbS8=".encode()).decode()
]
test_user_inputs = {
b64decode("aHR0cHM6Ly9jb21yYWRlbWFvLmNvbS8=".encode()).deco... | [] |
ostropunk/wikisourcesort | wikisourcesort.py | 3af2d086df0818a75b3e6c34550e2cc1382911a5 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import re
# In[2]:
def get_excel_dict(excelfile, key=None, index_col=0, header=0):
dataframe = pd.read_excel(excelfile, index_col=index_col, header=header)
dictionary = dataframe.to_dict()
if key is None:
return dictionary
... | [((15, 16, 15, 76), 'pandas.read_excel', 'pd.read_excel', (), '', True, 'import pandas as pd\n'), ((53, 10, 53, 47), 're.findall', 're.findall', ({(53, 21, 53, 40): '"""\\\\<ref.+?\\\\<\\\\/ref\\\\>"""', (53, 42, 53, 46): 'text'}, {}), "('\\\\<ref.+?\\\\<\\\\/ref\\\\>', text)", False, 'import re\n'), ((62, 10, 62, 63),... |
me-anton/radar-app | backend/radar/engine/body_objects.py | cc7d1e876e0ce9b6173b6d7b484d5553e247166e | import logging
import json
from dataclasses import dataclass
from redis import Redis
from typing import Iterable, Tuple, List, Iterator, Union, Dict
from typing_extensions import TypedDict
from backend import settings
from caching.scripts import RedisScriptsPool
from share.metaclasses import Singleton
from radar.model... | [((15, 9, 15, 36), 'logging.getLogger', 'logging.getLogger', ({(15, 27, 15, 35): '__name__'}, {}), '(__name__)', False, 'import logging\n'), ((16, 15, 17, 73), 'typing_extensions.TypedDict', 'TypedDict', ({(16, 25, 16, 39): '"""BodiesUpdate"""', (16, 41, 17, 72): "{'dropped_keys': List[str], 'new_records': Dict[str, st... |
benzkji/djangocms-baseplugins | djangocms_baseplugins/spacer/cms_plugins.py | 7f041a030ed93dcdec70e4ca777b841846b8f2f2 | # coding: utf-8
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django import forms
from django.utils.translation import ugettext_lazy as _
from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.cms_plugins import BasePluginMixin
from djangocm... | [((31, 0, 31, 41), 'cms.plugin_pool.plugin_pool.register_plugin', 'plugin_pool.register_plugin', ({(31, 28, 31, 40): 'SpacerPlugin'}, {}), '(SpacerPlugin)', False, 'from cms.plugin_pool import plugin_pool\n'), ((26, 11, 26, 23), 'django.utils.translation.ugettext_lazy', '_', ({(26, 13, 26, 22): 'u"""Spacer"""'}, {}), "... |
sdaxen/python_utilities | python_utilities/plotting/util.py | 7b9d6cc21bfc31be83629d2ac02b27e886ebc2bb | """Utility functions for plotting.
Author: Seth Axen
E-mail: seth.axen@gmail.com"""
from collections import deque
import numpy as np
def rgb_to_hsv(rgb):
"""Convert RGB colors to HSV colors."""
r, g, b = tuple(map(float, rgb))
if any([r > 1, g > 1, b > 1]):
r /= 255.
g /= 255.
b ... | [((45, 10, 45, 34), 'collections.deque', 'deque', ({(45, 16, 45, 33): '(c + m, x + m, m)'}, {}), '((c + m, x + m, m))', False, 'from collections import deque\n'), ((57, 7, 57, 24), 'numpy.any', 'np.any', ({(57, 14, 57, 23): '(rgbv > 1.0)'}, {}), '(rgbv > 1.0)', True, 'import numpy as np\n'), ((59, 17, 61, 73), 'numpy.a... |
confluentinc/utils-core | tests/test_process.py | 6001b4c61f7d923d273a23dc5a1580e0fa277d2c | import pytest
from utils.process import run, silent_run, RunError
from utils.fs import in_temp_dir
def test_run(capsys):
with in_temp_dir():
assert run('echo hello > hello.txt; echo world >> hello.txt', shell=True)
out = run('ls', return_output=True)
assert out == 'hello.txt\n'
... | [((8, 9, 8, 22), 'utils.fs.in_temp_dir', 'in_temp_dir', ({}, {}), '()', False, 'from utils.fs import in_temp_dir\n'), ((9, 15, 9, 81), 'utils.process.run', 'run', (), '', False, 'from utils.process import run, silent_run, RunError\n'), ((11, 14, 11, 43), 'utils.process.run', 'run', (), '', False, 'from utils.process im... |
areaweb/bokeh | bokeh/client/util.py | 9d131e45d626a912e85aee5b2647139c194dc893 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | [((18, 6, 18, 33), 'logging.getLogger', 'logging.getLogger', ({(18, 24, 18, 32): '__name__'}, {}), '(__name__)', False, 'import logging\n'), ((44, 1, 44, 18), 'bokeh.util.api.internal', 'internal', ({(44, 10, 44, 17): '(1, 0, 0)'}, {}), '((1, 0, 0))', False, 'from bokeh.util.api import public, internal\n'), ((72, 1, 72... |
PPTMiao/mtl-ssl | slim/nets/inception_resnet_v2.py | b61449c3f902414304657de6ec217077e441a6b9 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | [((35, 7, 35, 62), 'tensorflow.variable_scope', 'tf.variable_scope', (), '', True, 'import tensorflow as tf\n'), ((45, 12, 45, 80), 'tensorflow.concat', 'tf.concat', (), '', True, 'import tensorflow as tf\n'), ((56, 7, 56, 62), 'tensorflow.variable_scope', 'tf.variable_scope', (), '', True, 'import tensorflow as tf\n')... |
LedgerHQ/ledger-app-neo3 | tests/boilerplate_client/boilerplate_cmd.py | 48e1e0dec3e4801fc3ab1b07c4fe4ed86735a642 | import struct
from typing import Tuple
from ledgercomm import Transport
from boilerplate_client.boilerplate_cmd_builder import BoilerplateCommandBuilder, InsType
from boilerplate_client.button import Button
from boilerplate_client.exception import DeviceException
from boilerplate_client.transaction import Transaction... | [((18, 23, 18, 61), 'boilerplate_client.boilerplate_cmd_builder.BoilerplateCommandBuilder', 'BoilerplateCommandBuilder', (), '', False, 'from boilerplate_client.boilerplate_cmd_builder import BoilerplateCommandBuilder, InsType\n'), ((60, 30, 63, 9), 'struct.unpack', 'struct.unpack', ({(61, 12, 61, 17): '"""BBB"""', (62... |
fixstars/clpy | clpy/sparse/util.py | 693485f85397cc110fa45803c36c30c24c297df0 | import clpy
import clpy.sparse.base
_preamble_atomic_add = '''
#if __CUDA_ARCH__ < 600
__device__ double atomicAdd(double* address, double val) {
unsigned long long* address_as_ull =
(unsigned long long*)address;
unsigned long long old = *address_as_ull, assumed;
... | [((31, 11, 31, 27), 'clpy.isscalar', 'clpy.isscalar', ({(31, 25, 31, 26): 'x'}, {}), '(x)', False, 'import clpy\n'), ((31, 32, 31, 59), 'clpy.sparse.base.isdense', 'clpy.sparse.base.isdense', ({(31, 57, 31, 58): 'x'}, {}), '(x)', False, 'import clpy\n')] |
hwazni/discopy | test/test_cartesian.py | 812a4c77de4c766591bad74306720b518cdc54fc | from pytest import raises
from discopy.cartesian import *
def test_Box_repr():
f = Box('f', 1, 2, lambda x: (x, x))
assert "Box('f', 1, 2" in repr(f)
def test_Function_str():
f = Function(2, 1, lambda x, y: x + y)
assert 'Function(dom=2, cod=1,' in str(f)
def test_Function_call():
f = Swap(2, ... | [((18, 9, 18, 26), 'pytest.raises', 'raises', ({(18, 16, 18, 25): 'TypeError'}, {}), '(TypeError)', False, 'from pytest import raises\n'), ((31, 9, 31, 26), 'pytest.raises', 'raises', ({(31, 16, 31, 25): 'TypeError'}, {}), '(TypeError)', False, 'from pytest import raises\n'), ((35, 9, 35, 27), 'pytest.raises', 'raises'... |
neal-hub/nvda-test | source/browseMode.py | 4c3a67b2eafa9721c5de3f671d10e60ab2d43865 | # A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2007-2021 NV Access Limited, Babbage B.V., James Teh, Leonard de Ruijter,
# Thomas Stivers, Accessolutions, Julien Cochuyt
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
from typing import Any, Callabl... | [((944, 11, 944, 64), 'collections.namedtuple', 'collections.namedtuple', ({(944, 34, 944, 43): '"""Element"""', (944, 45, 944, 63): "('item', 'parent')"}, {}), "('Element', ('item', 'parent'))", False, 'import collections\n'), ((205, 2, 205, 58), 'speech.speakTextInfo', 'speech.speakTextInfo', (), '', False, 'import s... |
PatrickSJacobs/qiskit-metal | qiskit_metal/qlibrary/qubits/Transmon_Interdigitated.py | 9628369c4b880d1e13199e559f898c5e0b96eecb | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | [((81, 22, 105, 37), 'qiskit_metal.Dict', 'Dict', (), '', False, 'from qiskit_metal import draw, Dict\n'), ((109, 25, 109, 53), 'qiskit_metal.Dict', 'Dict', (), '', False, 'from qiskit_metal import draw, Dict\n'), ((118, 20, 119, 47), 'qiskit_metal.draw.rectangle', 'draw.rectangle', ({(118, 35, 118, 46): 'p.pad_width',... |
guotong1988/Rule-SQL | sqlova/model/nl2sql/wikisql_models.py | e826c0d659c8b35a72b64aa2b50d4d943fdd70f1 | # Copyright 2019-present NAVER Corp.
# Apache License v2.0
# Wonseok Hwang
import os, json
from copy import deepcopy
from matplotlib.pylab import *
import torch
import torch.nn as nn
import torch.nn.functional as F
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
from sqlova.utils.utils impor... | [((1004, 8, 1004, 23), 'torch.nn.functional.sigmoid', 'F.sigmoid', ({(1004, 18, 1004, 22): 's_wc'}, {}), '(s_wc)', True, 'import torch.nn.functional as F\n'), ((1005, 11, 1005, 40), 'torch.nn.functional.binary_cross_entropy', 'F.binary_cross_entropy', ({(1005, 34, 1005, 35): 'p', (1005, 37, 1005, 39): 'im'}, {}), '(p, ... |
leeeGreat/xlw_study_python | www/app.py | 03d8eb59f6826b4689d6598ede6393ecbb5058fb | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Michael Liao'
'''
async web application.
'''
import logging; logging.basicConfig(level=logging.INFO)
import asyncio, os, json, time
from datetime import datetime
from aiohttp import web
def index(request):
return web.Response(body=b'<h1>Awesome</h1>... | [((10, 16, 10, 55), 'logging.basicConfig', 'logging.basicConfig', (), '', False, 'import logging\n'), ((27, 7, 27, 31), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ({}, {}), '()', False, 'import asyncio, os, json, time\n'), ((18, 11, 18, 49), 'aiohttp.web.Response', 'web.Response', (), '', False, 'from aiohttp ... |
ritchie46/flopy | examples/Testing/flopy3_plotdata.py | 8e7284dcb3aaf5c12293d442248c2c2d9959f835 | from __future__ import print_function
import os
import numpy as np
import matplotlib.pyplot as plt
import flopy
fb = flopy.modflow.Modflow.load('freyberg', version='mf2005', model_ws=os.path.join('..', 'data', 'freyberg'), verbose=True)
dis = fb.dis
top = fb.dis.top
fb.dis.top.plot(grid=True, colorbar=True)
fb.d... | [((20, 0, 20, 10), 'matplotlib.pyplot.show', 'plt.show', ({}, {}), '()', True, 'import matplotlib.pyplot as plt\n'), ((23, 0, 23, 10), 'matplotlib.pyplot.show', 'plt.show', ({}, {}), '()', True, 'import matplotlib.pyplot as plt\n'), ((26, 6, 26, 32), 'matplotlib.pyplot.figure', 'plt.figure', (), '', True, 'import matpl... |
cabrust/chia | chia/components/sample_transformers/__init__.py | 3eaf815b261dc8a85d64fd698e0079515ec0dde9 | from chia import components
from chia.components.sample_transformers import identity
from chia.components.sample_transformers.sample_transformer import SampleTransformer
class SampleTransformerFactory(components.Factory):
name_to_class_mapping = {"identity": identity.IdentitySampleTransformer}
__all__ = ["Sampl... | [] |
singi2016cn/python-scaffold | 3/3.6/add_guest.py | 274e508d1919da67e599aa73be139800c043bce4 | # 添加嘉宾
names = []
names.append('singi')
names.append('lily')
names.append('sam')
print('I find a big dining-table,I can invite more friends.')
names.insert(0, 'xiaoling')
names.insert(2, 'fangsi')
names.append('zhangqing')
greets = ',would you like to have dinner with me ?'
print(names[0]+greets)
print(names[1]+gre... | [] |
cartwheelweb/packaginator | apps/pypi/tests/test_slurper.py | f6ce11da22154bce9cba42e896989bdb0fd5e865 | from django.template.defaultfilters import slugify
from django.test import TestCase
from package.models import Package, Version
from pypi.slurper import Slurper
TEST_PACKAGE_NAME = 'Django'
TEST_PACKAGE_VERSION = '1.3'
TEST_PACKAGE_REPO_NAME = 'django-uni-form'
class SlurpAllTests(TestCase):
def tes... | [((15, 18, 15, 44), 'pypi.slurper.Slurper', 'Slurper', ({(15, 26, 15, 43): 'TEST_PACKAGE_NAME'}, {}), '(TEST_PACKAGE_NAME)', False, 'from pypi.slurper import Slurper\n'), ((21, 18, 21, 44), 'pypi.slurper.Slurper', 'Slurper', ({(21, 26, 21, 43): 'TEST_PACKAGE_NAME'}, {}), '(TEST_PACKAGE_NAME)', False, 'from pypi.slurper... |
azuresdkci1x/azure-sdk-for-python-1722 | azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [] |
AakankshaAshok/pandas | pandas/core/apply.py | 6498bc1e8a12003640139db4794bd5cd2462c116 | import inspect
import numpy as np
from pandas._libs import reduction as libreduction
from pandas.util._decorators import cache_readonly
from pandas.core.dtypes.common import (
is_dict_like,
is_extension_array_dtype,
is_list_like,
is_sequence,
)
from pandas.core.dtypes.generic import ABCSeries
def f... | [((195, 24, 195, 52), 'numpy.empty_like', 'np.empty_like', ({(195, 38, 195, 51): 'target.values'}, {}), '(target.values)', True, 'import numpy as np\n'), ((102, 11, 102, 31), 'pandas.core.dtypes.common.is_list_like', 'is_list_like', ({(102, 24, 102, 30): 'self.f'}, {}), '(self.f)', False, 'from pandas.core.dtypes.commo... |
YinAoXiong/ZCls | tests/test_model/test_recognizer/test_shufflenetv1.py | 8aeea3640f8456937db35d043e37cf2c03ac9017 | # -*- coding: utf-8 -*-
"""
@date: 2021/5/16 下午10:22
@file: test_shufflenetv1.py
@author: zj
@description:
"""
import torch
from zcls.config import cfg
from zcls.config.key_word import KEY_OUTPUT
from zcls.model.recognizers.build import build_recognizer
def test_data(model):
data = torch.randn(1, 3, 224, 224)... | [((18, 11, 18, 38), 'torch.randn', 'torch.randn', ({(18, 23, 18, 24): '1', (18, 26, 18, 27): '3', (18, 29, 18, 32): '224', (18, 34, 18, 37): '224'}, {}), '(1, 3, 224, 224)', False, 'import torch\n'), ((26, 4, 26, 98), 'zcls.config.cfg.merge_from_file', 'cfg.merge_from_file', ({(26, 24, 26, 97): '"""configs/benchmarks/s... |
jpapadakis/gdal | autotest/gcore/vsis3.py | f07aa15fd65af36b04291303cc6834c87f662814 | #!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test /vsis3
# Author: Even Rouault <even dot rouault at spatialys dot com>
#
###############################################################################
# Copy... | [((47, 11, 47, 41), 'osgeo.gdal.VSIFOpenExL', 'gdal.VSIFOpenExL', ({(47, 28, 47, 31): 'uri', (47, 33, 47, 37): '"""rb"""', (47, 39, 47, 40): '(1)'}, {}), "(uri, 'rb', 1)", False, 'from osgeo import gdal\n'), ((62, 4, 62, 56), 'osgeo.gdal.SetConfigOption', 'gdal.SetConfigOption', ({(62, 25, 62, 51): '"""CPL_AWS_CREDENTI... |
bugra-yilmaz/adventofcode2021 | day06/part1.py | 136cb1d4fba42af4eea934a73714c93710c8741e | import os.path
from collections import Counter
import pytest
INPUT_TXT = os.path.join(os.path.dirname(__file__), 'input.txt')
def compute(s: str) -> int:
lines = s.splitlines()
numbers = Counter(int(f) for f in lines[0].split(","))
for d in range(80):
numbers2 = Counter({8: numbers[0], 6: numbe... | [((28, 1, 33, 1), 'pytest.mark.parametrize', 'pytest.mark.parametrize', ({(29, 4, 29, 27): "('input_s', 'expected')", (30, 4, 32, 5): '((INPUT_S, EXPECTED),)'}, {}), "(('input_s', 'expected'), ((INPUT_S, EXPECTED),))", False, 'import pytest\n'), ((14, 19, 14, 58), 'collections.Counter', 'Counter', ({(14, 27, 14, 57): '... |
gustavomazevedo/tbackup-client | functional_tests.py | eb2fdf75eff7abf17c9bce12920de793ba760f61 | from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://localhost:8000')
assert 'Django' in browser.title | [((3, 10, 3, 29), 'selenium.webdriver.Firefox', 'webdriver.Firefox', ({}, {}), '()', False, 'from selenium import webdriver\n')] |
clarkfitzg/sta141c | examples/first_char_last_column.py | 129704ba0952a4b80f9b093dcfa49f49f37b052d | #!/usr/bin/env python3
"""
For the last column, print only the first character.
Usage:
$ printf "100,200\n0,\n" | python3 first_char_last_column.py
Should print "100,2\n0,"
"""
import csv
from sys import stdin, stdout
def main():
reader = csv.reader(stdin)
writer = csv.writer(stdout)
for row in re... | [((16, 13, 16, 30), 'csv.reader', 'csv.reader', ({(16, 24, 16, 29): 'stdin'}, {}), '(stdin)', False, 'import csv\n'), ((17, 13, 17, 31), 'csv.writer', 'csv.writer', ({(17, 24, 17, 30): 'stdout'}, {}), '(stdout)', False, 'import csv\n')] |
reloadware/stickybeak | env_ci.py | 8ac52a80849a3098fb6b2f47115970a734a73c14 | from pathlib import Path
root = Path(__file__).parent.absolute()
import envo
envo.add_source_roots([root])
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
from envo import Env, Namespace, env_var, logger, run
from env_comm import StickybeakCommEnv as ParentEnv
p = Namespace("p")
cl... | [((7, 0, 7, 29), 'envo.add_source_roots', 'envo.add_source_roots', ({(7, 22, 7, 28): '[root]'}, {}), '([root])', False, 'import envo\n'), ((16, 4, 16, 18), 'envo.Namespace', 'Namespace', ({(16, 14, 16, 17): '"""p"""'}, {}), "('p')", False, 'from envo import Env, Namespace, env_var, logger, run\n'), ((26, 39, 26, 56), '... |
iyedb/boost_asio_zeromq | zmq_srv.py | 63110c18540c8303ac29d574f25cba234a00a22d | from __future__ import print_function
import zmq
import time
ADDR='tcp://127.0.0.1:11155'
ctx = zmq.Context()
srv = ctx.socket(zmq.REP)
srv.bind(ADDR)
#srv.setsockopt(zmq.RCVTIMEO, 3000);
while True:
try:
msg = srv.recv()
except Exception as e:
print('zmq socket revc timedout:', e)
else:
print('cl... | [((7, 6, 7, 19), 'zmq.Context', 'zmq.Context', ({}, {}), '()', False, 'import zmq\n'), ((22, 2, 22, 15), 'time.sleep', 'time.sleep', ({(22, 13, 22, 14): '(2)'}, {}), '(2)', False, 'import time\n')] |
mmaryada27/mypy | mypy/server/aststrip.py | 39103273d705fe45a55c4879779a0d5567f01876 | """Strip/reset AST in-place to match state after semantic analysis pass 1.
Fine-grained incremental mode reruns semantic analysis (passes 2 and 3)
and type checking for *existing* AST nodes (targets) when changes are
propagated using fine-grained dependencies. AST nodes attributes are
often changed during semantic an... | [] |
BreederBai/rt-thread | bsp/nrf5x/tools/sdk_dist.py | 53ed0314982556dfa9c5db75d4f3e02485d16ab5 | import os
import sys
import shutil
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools'))
# BSP dist function
def dist_do_building(BSP_ROOT, dist_dir):
from mkdist import bsp_copy_files
import rtconfig
library_dir = os.path.join(dist_dir, 'libraries')
p... | [((4, 11, 4, 22), 'os.getcwd', 'os.getcwd', ({}, {}), '()', False, 'import os\n'), ((12, 19, 12, 54), 'os.path.join', 'os.path.join', ({(12, 32, 12, 40): 'dist_dir', (12, 42, 12, 53): '"""libraries"""'}, {}), "(dist_dir, 'libraries')", False, 'import os\n'), ((17, 4, 17, 45), 'mkdist.bsp_copy_files', 'bsp_copy_files', ... |
kkauder/spack | lib/spack/spack/multimethod.py | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | # Copyright 2013-2021 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)
"""This module contains utilities for using multi-methods in
spack. You can think of multi-methods like overloaded methods... | [((91, 12, 91, 51), 'functools.update_wrapper', 'functools.update_wrapper', ({(91, 37, 91, 41): 'self', (91, 43, 91, 50): 'default'}, {}), '(self, default)', False, 'import functools\n'), ((98, 12, 98, 50), 'functools.update_wrapper', 'functools.update_wrapper', ({(98, 37, 98, 41): 'self', (98, 43, 98, 49): 'method'}, ... |
meego-tablet-ux/meego-app-browser | third_party/protobuf/protobuf.gyp | 0f4ef17bd4b399c9c990a2f6ca939099495c2b9c | # Copyright (c) 2009 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.
{
'conditions': [
['OS!="win"', {
'variables': {
'config_h_dir':
'.', # crafted for gcc/linux.
},
}, { # else, ... | [] |
Yash-s-Code-Camp/Python-Day-4 | main.py | 887c4e172905b2b0dea493a3c9c1f61e403556fc | # def mul(a):
# return lambda b:b*a
# singler = mul(1) # addition = lambda b:b*1
# doubler = mul(2) # addition = lambda b:b*2
# tripler = mul(3) # addition = lambda b:b*3
# print(doubler(7)) # 7*2 = 14
# print(tripler(7)) # 7*3 = 21
# print(singler(7)) # 7*1 = 7
class Student:
def __init__(self, fna... | [] |
MarcoRosso/paperstream | paperstream/create_diary.py | f8d5485ea337334b036393f9566b74394b5dd234 | """
Create diaries in A5 and A4 sizes based on PDF templates.
Julio Vega
"""
import datetime
import math
import sys
from io import BytesIO
from pathlib import Path
from PyPDF2 import PdfFileReader, PdfFileWriter
from reportlab.lib.pagesizes import A5, A4
from reportlab.lib.utils import ImageReader
from reportlab.pdfb... | [((112, 4, 112, 60), 'pathlib.Path.mkdir', 'Path.mkdir', (), '', False, 'from pathlib import Path\n'), ((125, 13, 125, 28), 'PyPDF2.PdfFileWriter', 'PdfFileWriter', ({}, {}), '()', False, 'from PyPDF2 import PdfFileReader, PdfFileWriter\n'), ((154, 13, 154, 22), 'io.BytesIO', 'BytesIO', ({}, {}), '()', False, 'from io ... |
codeforamerica/w-drive-extractor | wextractor/extractors/csv_extractor.py | 1c62bfff6fc21c4cce4a4409b76355ec4e07daae | #!/usr/bin/env python
import urllib2
import httplib
from urlparse import urlparse
import csv
from wextractor.extractors.extractor import Extractor
class CsvExtractor(Extractor):
def __init__(self, target, header=None, dtypes=None, url=None):
'''
CsvExtractor initializes with an optional url flag ... | [((32, 24, 32, 40), 'urlparse.urlparse', 'urlparse', ({(32, 33, 32, 39): 'target'}, {}), '(target)', False, 'from urlparse import urlparse\n'), ((35, 21, 35, 37), 'urlparse.urlparse', 'urlparse', ({(35, 30, 35, 36): 'target'}, {}), '(target)', False, 'from urlparse import urlparse\n'), ((37, 19, 37, 47), 'httplib.HTTPC... |
r-peng/pyscf | pyscf/geomopt/berny_solver.py | 9a14f9bcc63bc75f5939cb4d00eb47861d8d8989 | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | [((23, 11, 23, 52), 'pkg_resources.get_distribution', 'pkg_resources.get_distribution', ({(23, 42, 23, 51): '"""pyberny"""'}, {}), "('pyberny')", False, 'import pkg_resources\n'), ((142, 16, 142, 55), 'berny.Berny', 'Berny', (), '', False, 'from berny import Berny, geomlib, coords\n'), ((225, 10, 236, 30), 'pyscf.gto.M... |
WesleyPeng/uiXautomation | src/main/python/taf/foundation/api/ui/aut.py | 2d2c4d5a774ffda934d5615036a80c449bac930d | # Copyright (c) 2017-2018 {Flair Inc.} WESLEY PENG
#
# 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 agre... | [((29, 24, 29, 51), 'taf.foundation.utils.ConnectionCache', 'ConnectionCache', ({(29, 40, 29, 50): 'identifier'}, {}), '(identifier)', False, 'from taf.foundation.utils import ConnectionCache\n')] |
dkushche/Crypto | algo/vigenere.py | 75919d6df2084aee1de76c9999ac4e361c4efd48 | import crypto_tools
from itertools import cycle
def vigenere_little_doc():
return "encrypt/decrypt using vigenere cypher"
def vigenere_full_doc():
return """
Advanced caesar we change dict on each char
"""
def vigenere_str_to_list(string, vigenere_dict):
result = list()
for char in string:... | [((44, 1, 44, 33), 'crypto_tools.file_manipulation', 'crypto_tools.file_manipulation', ({}, {}), '()', False, 'import crypto_tools\n'), ((27, 20, 27, 76), 'crypto_tools.get_param_json_data', 'crypto_tools.get_param_json_data', ({(27, 53, 27, 69): '"""alphabets.json"""', (27, 71, 27, 75): 'lang'}, {}), "('alphabets.json... |
space-scl/emacs.d | anaconda-mode/0.1.13/jedi-0.15.1-py3.7.egg/jedi/evaluate/base_context.py | 6285c38714023b72a023fe24cbcb5e4fcdcdb949 | """
Contexts are the "values" that Python would return. However Contexts are at the
same time also the "contexts" that a user is currently sitting in.
A ContextSet is typically used to specify the return of a function or any other
static analysis operation. In jedi there are always multiple returns and not
just one.
"... | [((34, 5, 34, 38), 'jedi.evaluate.cache.evaluator_as_method_param_cache', 'evaluator_as_method_param_cache', ({}, {}), '()', False, 'from jedi.evaluate.cache import evaluator_as_method_param_cache\n'), ((239, 5, 239, 38), 'jedi.evaluate.cache.evaluator_as_method_param_cache', 'evaluator_as_method_param_cache', ({}, {})... |
yavook/kiwi-scp | kiwi_scp/commands/cmd_cmd.py | ca4263d913cfbdedc8b14334e3cad61c3b95f0a7 | from typing import Tuple
import click
from .cmd import KiwiCommandType, KiwiCommand
from .decorators import kiwi_command
from ..executable import COMPOSE_EXE
from ..instance import Instance
from ..project import Project
@click.argument(
"compose_args",
metavar="[ARG]...",
nargs=-1,
)
@click.argument(
... | [((12, 1, 16, 1), 'click.argument', 'click.argument', (), '', False, 'import click\n'), ((17, 1, 20, 1), 'click.argument', 'click.argument', (), '', False, 'import click\n')] |
rvprasad/software-testing-course | homework/Testing with Examples (Network)/impl_fail-add_relation-does_not_fail_when_person1_is_non_existent.py | 3803851dcf9f7bbd0f0b89fca6c9c5e3a48f22e0 | class MyError(Exception):
pass
class PropertyContainer(object):
def __init__(self):
self.props = {}
def set_property(self, prop, value):
self.props[prop] = value
def get_property(self, prop):
return self.props.get(prop)
def has_property(self, prop... | [] |
BranKein/Flask-template | tools/__init__.py | 3d8f43b3c44163e855c727de2a0dfe37d3b788f9 | from . import ip
__all__ = ['ip']
| [] |
ferhatelmas/algo | leetCode/algorithms/easy/count_and_say.py | a7149c7a605708bc01a5cd30bf5455644cefd04d | from itertools import groupby
class Solution:
def countAndSay(self, n):
def gen(s):
return "".join(str(len(list(g))) + k for k, g in groupby(s))
s, i = "1", 1
while i < n:
s = gen(s)
i += 1
return s
| [((7, 61, 7, 71), 'itertools.groupby', 'groupby', ({(7, 69, 7, 70): 's'}, {}), '(s)', False, 'from itertools import groupby\n')] |
pupuwudi/nlp_xiaojiang | conf/feature_config.py | 182ac4522b6012a52de6e1d0db7e6a47cb716e5b | # -*- coding: UTF-8 -*-
# !/usr/bin/python
# @time :2019/5/10 9:13
# @author :Mo
# @function :path of FeatureProject
import pathlib
import sys
import os
# base dir
projectdir = str(pathlib.Path(os.path.abspath(__file__)).parent.parent)
sys.path.append(projectdir)
# path of BERT model
model_dir... | [((13, 0, 13, 27), 'sys.path.append', 'sys.path.append', ({(13, 16, 13, 26): 'projectdir'}, {}), '(projectdir)', False, 'import sys\n'), ((12, 30, 12, 55), 'os.path.abspath', 'os.path.abspath', ({(12, 46, 12, 54): '__file__'}, {}), '(__file__)', False, 'import os\n')] |
taruma/hidrokit | tests/test_prep_read.py | a96c4ba2235d58d2bbc905be44d1b413ed19b3d2 | """Test for .prep.read module
"""
from hidrokit.prep import read
import numpy as np
import pandas as pd
A = pd.DataFrame(
data=[
[1, 3, 4, np.nan, 2, np.nan],
[np.nan, 2, 3, np.nan, 1, 4],
[2, np.nan, 1, 3, 4, np.nan]
],
columns=['A', 'B', 'C', 'D', 'E', 'F']
)
A_date = A.set_inde... | [((8, 4, 15, 1), 'pandas.DataFrame', 'pd.DataFrame', (), '', True, 'import pandas as pd\n'), ((17, 21, 17, 58), 'pandas.date_range', 'pd.date_range', ({(17, 35, 17, 45): '"""20190617"""', (17, 47, 17, 57): '"""20190619"""'}, {}), "('20190617', '20190619')", True, 'import pandas as pd\n'), ((25, 11, 25, 48), 'hidrokit.p... |
Maxcutex/personal_ecommerce | app/blueprints/department_blueprint.py | be09fb20eae1b225523acde06f8e75effcc3676f | from flasgger import swag_from
from app.blueprints.base_blueprint import Blueprint, BaseBlueprint, request, Security, Auth
from app.controllers.department_controller import DepartmentController
url_prefix = '{}/departments'.format(BaseBlueprint.base_url_prefix)
department_blueprint = Blueprint('department', __name__,... | [((7, 23, 7, 79), 'app.blueprints.base_blueprint.Blueprint', 'Blueprint', (), '', False, 'from app.blueprints.base_blueprint import Blueprint, BaseBlueprint, request, Security, Auth\n'), ((8, 24, 8, 53), 'app.controllers.department_controller.DepartmentController', 'DepartmentController', ({(8, 45, 8, 52): 'request'}, ... |
ikecoglu/DL-SR | src/train_DFCAN.py | 5e4c794f1434cd4a9b2b1aecf3738065b11bede1 | import argparse
from keras import optimizers
import matplotlib.pyplot as plt
import numpy as np
import datetime
from keras.callbacks import TensorBoard
import glob
import os
import tensorflow as tf
from models import *
from utils.lr_controller import ReduceLROnPlateau
from utils.data_loader import data_loader, data_loa... | [((16, 9, 16, 34), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ({}, {}), '()', False, 'import argparse\n'), ((62, 14, 62, 80), 'tensorflow.GPUOptions', 'tf.GPUOptions', (), '', True, 'import tensorflow as tf\n'), ((91, 14, 91, 68), 'keras.optimizers.adam', 'optimizers.adam', (), '', False, 'from keras import ... |
erlendve/catalyst | catalyst/exchange/live_graph_clock.py | 463575bc23c0abd1287f8ec81c4377baabf2b8b8 | import pandas as pd
from catalyst.constants import LOG_LEVEL
from catalyst.exchange.utils.stats_utils import prepare_stats
from catalyst.gens.sim_engine import (
BAR,
SESSION_START
)
from logbook import Logger
log = Logger('LiveGraphClock', level=LOG_LEVEL)
class LiveGraphClock(object):
"""Realtime clock... | [((10, 6, 10, 47), 'logbook.Logger', 'Logger', (), '', False, 'from logbook import Logger\n'), ((40, 27, 40, 45), 'pandas.Timedelta', 'pd.Timedelta', ({(40, 40, 40, 44): '"""0s"""'}, {}), "('0s')", True, 'import pandas as pd\n'), ((54, 27, 54, 48), 'pandas.Timestamp.utcnow', 'pd.Timestamp.utcnow', ({}, {}), '()', True,... |
LeoLeiva/todo-challenge | invera/api/tests.py | f6f24f53758eb4e425c91516bcab7af8cad66814 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import inspect
from task.models import InveraTask
from api.utils import send_test_csv_report
from django.contrib.auth.models import User
from rest_framework.test import APIClient, APITestCase
from rest_framework.reverse import reverse
from rest_framewor... | [((20, 20, 21, 55), 'django.contrib.auth.models.User.objects.create_user', 'User.objects.create_user', (), '', False, 'from django.contrib.auth.models import User\n'), ((22, 26, 23, 56), 'django.contrib.auth.models.User.objects.create_user', 'User.objects.create_user', (), '', False, 'from django.contrib.auth.models im... |
LoopTilingBenchmark/benchmark | experiments/seidel-2d/tmp_files/6745.py | 52a3d2e70216552a498fd91de02a2fa9cb62122c | from chill import *
source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/seidel-2d/kernel.c')
destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/seidel-2d/tmp_files/6745.c')
procedure('kernel_seidel_2d')
loop(0)
known(' n > 2 ')
tile(0,2,16,2)... | [] |
dmrz/baymax | baymax/api.py | 60cca5ae2e7cb42e093747f91b809e34e6782fcd | import json
import aiohttp
async def request(url, payload=None, params=None, headers=None):
headers = {'content-type': 'application/json', **(headers or {})}
data = payload and json.dumps(payload)
async with aiohttp.ClientSession() as client:
async with client.post(
url, data=data... | [((8, 23, 8, 42), 'json.dumps', 'json.dumps', ({(8, 34, 8, 41): 'payload'}, {}), '(payload)', False, 'import json\n'), ((9, 15, 9, 38), 'aiohttp.ClientSession', 'aiohttp.ClientSession', ({}, {}), '()', False, 'import aiohttp\n')] |
pszulczewski/nautobot-plugin-device-onboarding | nautobot_device_onboarding/tests/test_netdev_keeper.py | 9ddec52d7bcc751c4616bd7c1180ed2a1d31ff2c | """Unit tests for nautobot_device_onboarding.netdev_keeper module and its classes.
(c) 2020-2021 Network To Code
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/LICE... | [((49, 5, 49, 74), 'unittest.mock.patch', 'mock.patch', ({(49, 16, 49, 73): '"""nautobot_device_onboarding.helpers.socket.gethostbyname"""'}, {}), "('nautobot_device_onboarding.helpers.socket.gethostbyname')", False, 'from unittest import mock\n'), ((61, 5, 61, 74), 'unittest.mock.patch', 'mock.patch', ({(61, 16, 61, 7... |
Phaeton-lang/baselines | superneurons/tools/img_val/main.py | 472c248047fbb55b5fa0e620758047b7f0a1d041 | # Created by ay27 at 17/4/9
import os
import matplotlib.pyplot as plt
import struct
import numpy as np
def trans(row):
return list(map(lambda x: np.uint8(x), row))
def read_image(filename):
with open(filename, mode='rb') as file:
n = file.read(8)
n = struct.unpack("<Q", n)[0]
c = fi... | [((37, 8, 37, 23), 'matplotlib.pyplot.imshow', 'plt.imshow', ({(37, 19, 37, 22): 'img'}, {}), '(img)', True, 'import matplotlib.pyplot as plt\n'), ((38, 8, 38, 18), 'matplotlib.pyplot.show', 'plt.show', ({}, {}), '()', True, 'import matplotlib.pyplot as plt\n'), ((16, 12, 16, 34), 'struct.unpack', 'struct.unpack', ({(1... |
exenGT/pymatgen | pymatgen/analysis/tests/test_piezo.py | a8ffb820ab8fc3f60251099e38c8888f45eae618 | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Test for the piezo tensor class
"""
__author__ = "Shyam Dwaraknath"
__version__ = "0.1"
__maintainer__ = "Shyam Dwaraknath"
__email__ = "shyamd@lbl.gov"
__status__ = "Development"
__date__ = "4/1/16"
import os
import un... | [((70, 4, 70, 19), 'unittest.main', 'unittest.main', ({}, {}), '()', False, 'import unittest\n'), ((28, 28, 34, 9), 'numpy.array', 'np.array', ({(29, 12, 33, 13): '[[0.0, 0.0, 0.0, 0.0, 0.03839, 0.0], [0.0, 0.0, 0.0, 0.03839, 0.0, 0.0], [\n 6.89822, 6.89822, 27.4628, 0.0, 0.0, 0.0]]'}, {}), '([[0.0, 0.0, 0.0, 0.0, 0... |
larsbutler/nova | nova/virt/driver.py | fb190f30a911658d8b0c4deaf43cbb8c9e35b672 | # Copyright 2011 Justin Santa Barbara
# 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 requ... | [((34, 6, 34, 33), 'oslo_log.log.getLogger', 'logging.getLogger', ({(34, 24, 34, 32): '__name__'}, {}), '(__name__)', True, 'from oslo_log import log as logging\n'), ((71, 16, 71, 68), 'nova.virt.block_device.convert_swap', 'virt_block_device.convert_swap', ({(71, 47, 71, 67): 'block_device_mapping'}, {}), '(block_devi... |
P1ayerOne/src | otp/chat/ChatInputNormal.py | 3a4343e29f844fe95da7d51aaee7fb680d02bf72 | from direct.showbase import DirectObject
from otp.otpbase import OTPGlobals
import sys
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from otp.otpbase import OTPLocalizer
class ChatInputNormal(DirectObject.DirectObject):
ExecNamespace = None
def __init__(self, chatMgr):
self.chat... | [((126, 24, 126, 38), 'sys.exc_info', 'sys.exc_info', ({}, {}), '()', False, 'import sys\n'), ((127, 24, 127, 38), 'sys.exc_info', 'sys.exc_info', ({}, {}), '()', False, 'import sys\n'), ((118, 28, 118, 42), 'sys.exc_info', 'sys.exc_info', ({}, {}), '()', False, 'import sys\n'), ((119, 28, 119, 42), 'sys.exc_info', 'sy... |
stevaras2/bert | train_text_summarizer.py | 1efaa300eb91dea85c40de5e1586e8d2c94b89bb | import argparse
import json
import numpy as np
import pandas as pd
import os
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report,f1_score
from keras.models import Sequential
from keras.layers import Dense, Dropout
fro... | [((84, 14, 84, 38), 'pandas.read_csv', 'pd.read_csv', ({(84, 26, 84, 37): 'dataset_csv'}, {}), '(dataset_csv)', True, 'import pandas as pd\n'), ((126, 19, 126, 43), 'numpy.asarray', 'np.asarray', ({(126, 30, 126, 42): 'sentence_emb'}, {}), '(sentence_emb)', True, 'import numpy as np\n'), ((128, 15, 128, 36), 'numpy.asa... |
zmanji/incubator-aurora | src/test/python/apache/aurora/executor/test_status_manager.py | 9f594f1de6bbf46c74863dd3fc4d2708b7a974f2 | #
# 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
# distributed under ... | [((46, 16, 46, 36), 'mock.Mock', 'mock.Mock', (), '', False, 'import mock\n'), ((47, 21, 47, 64), 'apache.aurora.executor.status_manager.StatusManager', 'StatusManager', ({(47, 35, 47, 42): 'checker', (47, 44, 47, 52): 'callback', (47, 54, 47, 63): 'mock_time'}, {}), '(checker, callback, mock_time)', False, 'from apach... |
wangqf1997/Human-injury-based-safety-decision-of-automated-vehicles | Supplemental/A5. Collision estimation module/Con_est.py | b104fdeb3d85e867f6b04c5ae7b5a197e705aeba | '''
-------------------------------------------------------------------------------------------------
This code accompanies the paper titled "Human injury-based safety decision of automated vehicles"
Author: Qingfan Wang, Qing Zhou, Miao Lin, Bingbing Nie
Corresponding author: Bingbing Nie (nbb@tsinghua.edu.cn)
-------... | [((24, 37, 24, 56), 'numpy.cos', 'np.cos', ({(24, 44, 24, 55): 'delta_angle'}, {}), '(delta_angle)', True, 'import numpy as np\n'), ((34, 21, 34, 55), 'numpy.arctan', 'np.arctan', ({(34, 31, 34, 54): 'veh_cgf[0] / veh_cgs[0]'}, {}), '(veh_cgf[0] / veh_cgs[0])', True, 'import numpy as np\n'), ((35, 21, 35, 57), 'numpy.a... |
TontonTremblay/pixel-nerf | train/train.py | 349b5f3f173cd76def05b6de8aa52c69a4f0c7fa | # Training to a set of multiple objects (e.g. ShapeNet or DTU)
# tensorboard logs available in logs/<expname>
import sys
import os
sys.path.insert(
0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src"))
)
import warnings
import trainlib
from model import make_model, loss
from render import NeRF... | [((56, 13, 56, 88), 'util.args.parse_args', 'util.args.parse_args', (), '', False, 'import util\n'), ((57, 9, 57, 38), 'util.get_cuda', 'util.get_cuda', ({(57, 23, 57, 37): 'args.gpu_id[0]'}, {}), '(args.gpu_id[0])', False, 'import util\n'), ((59, 20, 59, 72), 'data.get_split_dataset', 'get_split_dataset', ({(59, 38, 5... |
kne42/napari | napari/_qt/dialogs/qt_plugin_dialog.py | d61d0be0ef8ea622dd3d6acd270c0529816c11ec | import os
import sys
from pathlib import Path
from typing import Sequence
from napari_plugin_engine.dist import standard_metadata
from napari_plugin_engine.exceptions import PluginError
from qtpy.QtCore import QEvent, QProcess, QProcessEnvironment, QSize, Qt, Slot
from qtpy.QtGui import QFont, QMovie
from qtpy.QtWidge... | [((251, 5, 251, 22), 'qtpy.QtCore.Slot', 'Slot', ({(251, 10, 251, 21): 'ProjectInfo'}, {}), '(ProjectInfo)', False, 'from qtpy.QtCore import QEvent, QProcess, QProcessEnvironment, QSize, Qt, Slot\n'), ((282, 5, 282, 22), 'qtpy.QtCore.Slot', 'Slot', ({(282, 10, 282, 21): 'ProjectInfo'}, {}), '(ProjectInfo)', False, 'fro... |
WizzyBots/hata | hata/discord/webhook/utils.py | f6991afc0bebf7dad932888a536f4d010f8663c7 | __all__ = ('create_partial_webhook_from_id', )
from scarletio import export
from ..core import USERS
from .preinstanced import WebhookType
from .webhook import Webhook
@export
def create_partial_webhook_from_id(webhook_id, token, *, type_=WebhookType.bot, channel_id=0):
"""
Creates a partial webhook from t... | [] |
henriqueumeda/-Python-study | MIT/600.1x - Introduction to Computer Science and Programming Using Python/Unit 4/Problem Set 4/get_word_score.py | 28e93a377afa4732037a29eb74d4bc7c9e24b62f | SCRABBLE_LETTER_VALUES = {
'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f': 4, 'g': 2, 'h': 4, 'i': 1, 'j': 8, 'k': 5, 'l': 1, 'm': 3, 'n': 1,
'o': 1, 'p': 3, 'q': 10, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 4, 'w': 4, 'x': 8, 'y': 4, 'z': 10
}
def getWordScore(word, n):
"""
Returns the score for a word. Assu... | [] |
rizwansaeed/lusid-sdk-python-preview | sdk/lusid/models/lusid_instrument.py | 52d092d6d4099b8526f0318f3fe1ddc0b943da6a | # coding: utf-8
"""
LUSID API
# Introduction This page documents the [LUSID APIs](https://www.lusid.com/api/swagger), which allows authorised clients to query and update their data within the LUSID platform. SDKs to interact with the LUSID APIs are available in the following languages : * [C#](https://gith... | [((116, 23, 116, 56), 'six.iteritems', 'six.iteritems', ({(116, 37, 116, 55): 'self.openapi_types'}, {}), '(self.openapi_types)', False, 'import six\n')] |
luizgui05/autolatex. | autolatex-master/exemplos_codigo/certificados/certificados.py | 366eb3d88b7e60c119737f958e35cce99e8775e9 | import os
import sys
import sqlite3
con = None
filename = 'certificado'
# Abrir banco de dados para ler nomes.
try:
con = sqlite3.connect('math.db')
cur = con.cursor()
cur.execute('select * from math')
data = cur.fetchall()
except sqlite3.Error, e:
print "Error %s:" % e.args[0]
sys.exit(... | [] |
snajder-r/nanoepiseg | nanoepiseg/main_list_chunks.py | 2fe36a82e5b899330da5db6559eb45fe12cad37c | from pathlib import Path
from meth5.meth5 import MetH5File
def main(m5file:Path, chunk_size:int, quiet:bool):
with MetH5File(m5file, "r", chunk_size=chunk_size) as f:
for chrom in f.get_chromosomes():
print(f"{chrom}: {f[chrom].get_number_of_chunks()}")
| [((6, 9, 6, 54), 'meth5.meth5.MetH5File', 'MetH5File', (), '', False, 'from meth5.meth5 import MetH5File\n')] |
tmilliman/sir_to_netcdf | qscatv2/make_seasonal_images.py | d4641cdc5a9e92a55c0edb2dc6cd8c0e2da6f1fa | #!/usr/bin/env python
# script to make seasonal means and stddev images of 4-day sig0
# values.
import os
import sys
import glob
import numpy as np
import sirpy2 as sp2
import argparse
from osgeo import gdal
DATADIR = "./"
NODATA_VALUE = -9999.0
Q2M = {
"JAS": list(range(7, 10)),
"OND": list(range(10, 13)),... | [((25, 0, 25, 20), 'osgeo.gdal.UseExceptions', 'gdal.UseExceptions', ({}, {}), '()', False, 'from osgeo import gdal\n'), ((36, 13, 38, 5), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ({(37, 8, 37, 75): "'script to make quarterly ' + 'means and stdevs of qscat dB values'"}, {}), "('script to make quarterly ' +... |
noahbarros/Python-Exercises | ex062.py | fafda898473bc984280e201ed11d8ad76cc8624a | primeiro = int(input('Digite o priemiro termo da PA: '))
razão = int(input('Digite a razão da PA: '))
termo = primeiro
cont = 1
total = 0
mais = 10
while mais != 0:
total += mais
while cont <= total:
print(f'{termo} ', end='')
termo += razão
cont += 1
print('Pausa')
mais = int(in... | [] |
Brokdar/ArxmlDataExtractor | arxml_data_extractor/handler/object_handler.py | 2853112cbd4d001418b11ccb99f1db268347dfab | from lxml.etree import Element, QName
from typing import Union, List, Any
from tqdm import tqdm
import logging
from arxml_data_extractor.handler import value_handler
from arxml_data_extractor.handler.path_handler import PathHandler
from arxml_data_extractor.asr.asr_parser import AsrParser
from arxml_data_extra... | [((17, 22, 17, 41), 'logging.getLogger', 'logging.getLogger', ({}, {}), '()', False, 'import logging\n'), ((18, 28, 18, 47), 'arxml_data_extractor.handler.path_handler.PathHandler', 'PathHandler', ({(18, 40, 18, 46): 'parser'}, {}), '(parser)', False, 'from arxml_data_extractor.handler.path_handler import PathHandler\n... |
Chromico/bk-base | src/api/datamanage/pro/lifecycle/data_trace/data_set_create.py | be822d9bbee544a958bed4831348185a75604791 | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
---------------------------------------------... | [((54, 19, 56, 5), 'datamanage.utils.api.MetaApi.complex_search', 'MetaApi.complex_search', (), '', False, 'from datamanage.utils.api import MetaApi\n'), ((62, 24, 62, 64), 'copy.deepcopy', 'deepcopy', ({(62, 33, 62, 63): 'DATASET_CREATE_EVENT_INFO_DICT'}, {}), '(DATASET_CREATE_EVENT_INFO_DICT)', False, 'from copy impo... |
shivam13verma/judge-embeddings | vectors2.py | 9b861319a1240529d25c15799952e32dde2e894e | import locale
import glob
import os
import os.path
import requests
import tarfile
import sys
import re
import gensim
from gensim.models.doc2vec import TaggedDocument
from collections import namedtuple
from gensim.models import Doc2Vec
import gensim.models.doc2vec
from collections import OrderedDict
import multiproces... | [] |
crest-cassia/caravan | caravan_search_engine/test/test_task.py | 0a8e606e31d2d36a9379bdc00fafe55cf9144da6 | import unittest
from caravan.task import Task
from caravan.tables import Tables
class TestRun(unittest.TestCase):
def setUp(self):
self.t = Tables.get()
self.t.clear()
def test_task(self):
t = Task(1234, "echo hello world")
self.assertEqual(t.id(), 1234)
self.assertEqu... | [((41, 4, 41, 19), 'unittest.main', 'unittest.main', ({}, {}), '()', False, 'import unittest\n'), ((8, 17, 8, 29), 'caravan.tables.Tables.get', 'Tables.get', ({}, {}), '()', False, 'from caravan.tables import Tables\n'), ((12, 12, 12, 42), 'caravan.task.Task', 'Task', ({(12, 17, 12, 21): '1234', (12, 23, 12, 41): '"""e... |
tashidexiaoL/splashnew | splash/render_options.py | 2bbb886bae8fa88c30a4460f41ca940c4b010287 | # -*- coding: utf-8 -*-
import os
import json
from splash import defaults
from splash.utils import to_bytes, path_join_secure
from splash.errors import BadOption
class RenderOptions(object):
"""
Options that control how to render a response.
"""
_REQUIRED = object()
def __init__(self, data, max... | [((29, 14, 29, 31), 'splash.errors.BadOption', 'BadOption', ({(29, 24, 29, 30): 'params'}, {}), '(params)', False, 'from splash.errors import BadOption\n'), ((207, 26, 207, 72), 'splash.utils.path_join_secure', 'path_join_secure', ({(207, 43, 207, 59): 'js_profiles_path', (207, 61, 207, 71): 'js_profile'}, {}), '(js_pr... |
sangumee/Opentutorials-Webn-Python | syntax/func.py | 9f813f8f342ea99ffee6e31f363f175fa023c489 | # code....
a = 1
b = 2
c = 3
s = a+b+c
r = s/3
print(r)
# code....
'''
def average():
a=1
b=2
c=3
s=a+b+c
r=s/3
print(r)
average()
'''
'''
#input
#parameter
#argument
def average(a,b,c):
s=a+b+c
r=s/3
print(r)
average(10,20,30)
'''
def average(a, b, c):
s = a+b+c
r = s/3
... | [] |
ramezrawas/galaxy-1 | tools/evolution/codingSnps_filter.py | c03748dd49c060a68d07bce56eae33e0ba154414 | #!/usr/bin/env python
# runs after the job (and after the default post-filter)
from galaxy.tools.parameters import DataToolParameter
# Older py compatibility
try:
set()
except:
from sets import Set as set
def validate_input( trans, error_map, param_values, page_param_map ):
dbkeys = set()
data_param_... | [((7, 4, 7, 9), 'sets.Set', 'set', ({}, {}), '()', True, 'from sets import Set as set\n'), ((13, 13, 13, 18), 'sets.Set', 'set', ({}, {}), '()', True, 'from sets import Set as set\n'), ((14, 23, 14, 28), 'sets.Set', 'set', ({}, {}), '()', True, 'from sets import Set as set\n')] |
DeftNerd/bitcoinclassic | qa/rpc-tests/listtransactions.py | afff0155e0dd528145818c43f259743f54966d95 | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
from test_framework.test_framework import BitcoinTestFramework
from ... | [] |
aletourneau/salt | salt/modules/mount.py | d7013a2f64eb4b79592220d76274bc5dde609e08 | # -*- coding: utf-8 -*-
'''
Salt module to manage unix mounts and the fstab file
'''
from __future__ import absolute_import
# Import python libs
import os
import re
import logging
# Import salt libs
import salt.utils
from salt._compat import string_types
from salt.utils import which as _which
from salt.exceptions imp... | [((19, 6, 19, 33), 'logging.getLogger', 'logging.getLogger', ({(19, 24, 19, 32): '__name__'}, {}), '(__name__)', False, 'import logging\n'), ((726, 15, 726, 26), 'salt.utils.which', '_which', ({(726, 22, 726, 25): 'cmd'}, {}), '(cmd)', True, 'from salt.utils import which as _which\n'), ((51, 11, 51, 39), 'os.access', '... |
ExpertOfNone/expert_of_none | base/admin.py | 9ff4e4279a570712766546122c014c754f753485 | from django.contrib import admin
from base.models import Topic, Photo
class EONBaseAdmin(admin.ModelAdmin):
def get_changeform_initial_data(self, request):
initial = super().get_changeform_initial_data(request)
if 'add' in request.META['PATH_INFO']:
initial['created_by'] = request.... | [((41, 0, 41, 38), 'django.contrib.admin.site.register', 'admin.site.register', ({(41, 20, 41, 25): 'Topic', (41, 27, 41, 37): 'TopicAdmin'}, {}), '(Topic, TopicAdmin)', False, 'from django.contrib import admin\n'), ((42, 0, 42, 38), 'django.contrib.admin.site.register', 'admin.site.register', ({(42, 20, 42, 25): 'Phot... |
z1digitalstudio/met | met/metadataparser/models/entity_type.py | 7840e7520bb4c3cb0328d5988468eefe6639f950 | #################################################################
# MET v2 Metadate Explorer Tool
#
# This Software is Open Source. See License: https://github.com/TERENA/met/blob/master/LICENSE.md
# Copyright (c) 2012, TERENA All rights reserved.
#
# This Software is based on MET v1 developed for TERENA by Yaco Sistem... | [((23, 41, 23, 51), 'django.utils.translation.ugettext_lazy', '_', ({(23, 43, 23, 50): 'u"""Name"""'}, {}), "(u'Name')", True, 'from django.utils.translation import ugettext_lazy as _\n'), ((26, 44, 26, 61), 'django.utils.translation.ugettext_lazy', '_', ({(26, 46, 26, 60): 'u"""Name in XML"""'}, {}), "(u'Name in XML')... |
daimajia/wxpy | wxpy/bot.py | 2b56fb67b9ccb072538fd778a27a8fef8d9c93e6 | import traceback
from pprint import pformat
from threading import Thread
import itchat
import logging
from wxpy.chat import Chat
from wxpy.chats import Chats
from wxpy.friend import Friend
from wxpy.group import Group
from wxpy.message import MessageConfigs, Messages, Message, MessageConfig
from wxpy.mp import MP
fro... | [((19, 9, 19, 34), 'logging.getLogger', 'logging.getLogger', ({(19, 27, 19, 33): '"""wxpy"""'}, {}), "('wxpy')", False, 'import logging\n'), ((65, 5, 65, 22), 'wxpy.utils.tools.handle_response', 'handle_response', ({}, {}), '()', False, 'from wxpy.utils.tools import handle_response, get_user_name, wrap_user_name, ensur... |
HPLegion/glue | glue/__init__.py | 1843787ccb4de852dfe103ff58473da13faccf5f | # Set up configuration variables
__all__ = ['custom_viewer', 'qglue', 'test']
import os
import sys
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution('glue-core').version
except DistributionNotFound:
__version__ = 'undefined'
from ._mpl_backend import Matp... | [((40, 0, 40, 15), 'glue._settings_helpers.load_settings', 'load_settings', ({}, {}), '()', False, 'from glue._settings_helpers import load_settings\n'), ((36, 11, 36, 26), 'pytest.main', 'main', (), '', False, 'from pytest import main\n'), ((51, 4, 51, 58), 'sys.__excepthook__', 'sys.__excepthook__', ({(51, 23, 51, 31... |
pran01/AlgoVision | run.py | 40e85f3c55266f43ee103dfa0852a63af306a8d4 | from algovision import app
if(__name__=="__main__"):
app.run(debug=True,host='0.0.0.0')
| [((4, 4, 4, 38), 'algovision.app.run', 'app.run', (), '', False, 'from algovision import app\n')] |
rffontenelle/readthedocs.org | readthedocs/settings/proxito/base.py | a7a9072215551156b9ddc22280cc085944eaa4b0 | """
Base settings for Proxito
Some of these settings will eventually be backported into the main settings file,
but currently we have them to be able to run the site with the old middleware for
a staged rollout of the proxito code.
"""
class CommunityProxitoSettingsMixin:
ROOT_URLCONF = 'readthedocs.proxito.url... | [] |
jessica-tu/jupyter | model_selection/tests/test_search.py | 917e02bc29e0fa06bd8adb25fe5388ac381ec829 | """Test the search module"""
from collections.abc import Iterable, Sized
from io import StringIO
from itertools import chain, product
from functools import partial
import pickle
import sys
from types import GeneratorType
import re
import numpy as np
import scipy.sparse as sp
import pytest
from sklearn.utils.fixes im... | [((122, 4, 122, 50), 'numpy.array', 'np.array', ({(122, 13, 122, 49): '[[-1, -1], [-2, -1], [1, 1], [2, 1]]'}, {}), '([[-1, -1], [-2, -1], [1, 1], [2, 1]])', True, 'import numpy as np\n'), ((123, 4, 123, 26), 'numpy.array', 'np.array', ({(123, 13, 123, 25): '[1, 1, 2, 2]'}, {}), '([1, 1, 2, 2])', True, 'import numpy as... |
bornhack/bornhack-website | src/economy/migrations/0027_zettlebalance_zettlereceipt.py | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | # Generated by Django 3.2.7 on 2021-09-13 03:52
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("economy", "0026_alter_clearhaussettlement_options"),
]
operations = [
migrations.CreateModel(
name="ZettleBalance",... | [((20, 20, 25, 21), 'django.db.models.UUIDField', 'models.UUIDField', (), '', False, 'from django.db import migrations, models\n'), ((27, 28, 27, 67), 'django.db.models.DateTimeField', 'models.DateTimeField', (), '', False, 'from django.db import migrations, models\n'), ((28, 28, 28, 63), 'django.db.models.DateTimeFiel... |
vkumarma/Complete-Interpreter | main.py | 5ec15ea84b0e7e735328511cc504efa43638f720 | import re
import sys
class Lexer:
def __init__(self, inp_str):
self.index = 0
self.s = inp_str
def get_char(self):
if self.index < len(self.s):
var = self.s[self.index]
self.index += 1
return var
input_file = open(str(sys.argv[1]), 'r') # Open fi... | [((26, 7, 26, 71), 're.fullmatch', 're.fullmatch', ({(26, 20, 26, 63): '"""if|then|else|endif|while|do|endwhile|skip"""', (26, 65, 26, 70): 'input'}, {}), "('if|then|else|endif|while|do|endwhile|skip', input)", False, 'import re\n'), ((29, 9, 29, 62), 're.search', 're.search', ({(29, 19, 29, 54): '"""([a-z]|[A-Z])([a-z... |
Ghostofapacket/NewsGrabber-Deduplicate | deduplicate.py | 0b8152af2e1c6c87cf8540970f42084b96a99d9c | import sys
sys.path.append('/usr/local/lib/python3.4/site-packages/')
from warc_dedup import deduplicate
def main():
if len(sys.argv) == 1:
raise Exception('Please provide the WARC file as argument.')
deduplicate.Warc(*sys.argv[1:]).deduplicate()
if __name__ == '__main__':
main()
| [((2, 0, 2, 58), 'sys.path.append', 'sys.path.append', ({(2, 16, 2, 57): '"""/usr/local/lib/python3.4/site-packages/"""'}, {}), "('/usr/local/lib/python3.4/site-packages/')", False, 'import sys\n'), ((10, 4, 10, 35), 'warc_dedup.deduplicate.Warc', 'deduplicate.Warc', ({(10, 21, 10, 34): '*sys.argv[1:]'}, {}), '(*sys.ar... |
johnjdailey/FinMesh | build/lib/FinMesh/usgov/__init__.py | 64048b02bfec1a24de840877b38e82f4fa813d22 | import os
import requests
import xmltodict
import csv
import json
# # # # # # # # # #
# FRED DATA BELOW #
# # # # # # # # # #
FRED_BASE_URL = 'https://api.stlouisfed.org/fred/'
GEOFRED_BASE_URL = 'https://api.stlouisfed.org/geofred/'
def append_fred_token(url):
token = os.getenv('FRED_TOKEN')
return f'{url}&... | [((15, 12, 15, 35), 'os.getenv', 'os.getenv', ({(15, 22, 15, 34): '"""FRED_TOKEN"""'}, {}), "('FRED_TOKEN')", False, 'import os\n'), ((36, 13, 36, 30), 'requests.get', 'requests.get', ({(36, 26, 36, 29): 'url'}, {}), '(url)', False, 'import requests\n'), ((45, 13, 45, 30), 'requests.get', 'requests.get', ({(45, 26, 45,... |
Cradac/mattermost-octane-integration | settings.py | 6a3cb4d2e0854cbf190f66467b604e6e4344a907 | '''
This is the Settings File for the Mattermost-Octane Bridge.
You can change various variables here to customize and set up the client.
'''
'''----------------------Mattermost Webhook Configuration----------------------'''
#URL of the webhook from mattermost. To create one go to `Main Menu -> Integrations -> Incom... | [] |
jnthn/intellij-community | python/testData/console/indent7.after.py | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | print(1) | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.