code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
import os from unittest import TestCase from unittest.mock import patch from bs4 import BeautifulSoup from RatS.criticker.criticker_ratings_inserter import CritickerRatingsInserter TESTDATA_PATH = os.path.abspath( os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "assets") ) class CritickerRatingsI...
StegSchreck/RatS
tests/unit/criticker/test_criticker_ratings_inserter.py
Python
agpl-3.0
9,321
""" WSGI config for django_keyval project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICAT...
EdwinvO/django_keyval
django_keyval/wsgi.py
Python
agpl-3.0
1,440
#!/usr/bin/env python # -*- coding: utf-8 -*- from .Menu import MenuBox
Loki88/RSA-Test
ui/Menu/__init__.py
Python
agpl-3.0
72
# Copyright (2021) Binovo IT Human Project SL # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import base64 from enum import Enum from odoo import models, fields, api, _ from ..lroe.lroe_xml_schema import LROEXMLSchema,\ LROEXMLSchemaModeNotSupported,\ LROEOperationTypeEnum from .lroe_operation...
factorlibre/l10n-spain
l10n_es_ticketbai_api_batuz/models/lroe_operation_response.py
Python
agpl-3.0
16,313
# Copyright 2019 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models class ProductTemplateLinkType(models.Model): _name = "product.template.link.type" _description = "Product Template Link Type" name = fields.Char(required=True, translate=Tr...
OCA/e-commerce
product_template_multi_link/models/product_template_link_type.py
Python
agpl-3.0
3,627
"""Tests for assess_budget module.""" import logging import json from random import randint import StringIO from subprocess import CalledProcessError from mock import ( Mock, patch, ) from assess_budget import ( _try_greater_than_limit_budget, _try_negative_budget, assess_budget, assess_budge...
mjs/juju
acceptancetests/tests/test_assess_budget.py
Python
agpl-3.0
12,438
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE from numpy import ma, alltrue, allclose import os.path from opus_core.datasets.dataset_pool import DatasetPool from opus_core.storage_factory import Stor...
apdjustino/DRCOG_Urbansim
src/opus_core/tests/utils/variable_tester.py
Python
agpl-3.0
9,384
""" Tests that policy json files import correctly when loading XML """ from __future__ import absolute_import import pytest from xmodule.tests.xml import XModuleXmlImportTest from xmodule.tests.xml.factories import CourseFactory class TestPolicy(XModuleXmlImportTest): """ Tests that policy json files impor...
ESOedX/edx-platform
common/lib/xmodule/xmodule/tests/xml/test_policy.py
Python
agpl-3.0
1,216
# GUI frame for the sineTransformations_function.py import os from Tkinter import * import tkFileDialog import tkMessageBox import numpy as np from smst.utils import audio from . import sineTransformations_function as sT from smst.utils.files import strip_file class SineTransformationsFrame: def __init__(self,...
bzamecnik/sms-tools
smst/ui/transformations/sineTransformations_GUI_frame.py
Python
agpl-3.0
9,380
""" Author : tharindra galahena (inf0_warri0r) Project: l_viewer Blog : http://www.inf0warri0r.blogspot.com Date : 30/04/2013 License: Copyright 2013 Tharindra Galahena l_viewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr...
inf0-warri0r/l_viewer
display.py
Python
agpl-3.0
9,288
""" Test cases for ldaptor.protocols.ldap.ldapserver module. """ from twisted.trial import unittest import sets, base64 from twisted.internet import protocol, address from twisted.python import components from ldaptor import inmemory, interfaces, schema, delta, entry from ldaptor.protocols.ldap import ldapserver, ldap...
antong/ldaptor
ldaptor/test/test_server.py
Python
lgpl-2.1
24,613
#!/usr/bin/python """Test of push button output.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(KeyComboAction("<Control>f")) sequence.append(TypeAction("Button Boxes")) sequence.append(KeyComboAction("Return")) sequence.append(PauseAction(3000)) sequence.append(utils.St...
GNOME/orca
test/keystrokes/gtk3-demo/role_push_button.py
Python
lgpl-2.1
2,278
# Copyright (c) 2016-2017, Parallels International GmbH # Copyright (c) 2017-2022, Virtuozzo International GmbH, All rights reserved # # This file is part of OpenVZ. OpenVZ is free software; you can redistribute # it and/or modify it under the terms of the GNU General Public License as # published by the Free Software ...
OpenVZ/vcmmd
vcmmd/util/optparse.py
Python
lgpl-2.1
2,269
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: # # MDTraj is free software: y...
leeping/mdtraj
tests/test_rmsd.py
Python
lgpl-2.1
6,778
# *************************************************************************** # * * # * Copyright (c) 2015 - Przemo Firszt <przemo@firszt.eu> * # * Copyright (c) 2015 - Bernd Hahnebach <bernd@bimstatik.org> * # * ...
wood-galaxy/FreeCAD
src/Mod/Fem/FemTools.py
Python
lgpl-2.1
29,560
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Indexed corpus is a mechanism for random-accessing corpora. While the standard corpus interface in gensim allows iterating over co...
markroxor/gensim
gensim/corpora/indexedcorpus.py
Python
lgpl-2.1
5,378
import etcd import maps from mock import MagicMock from mock import patch import threading import time from tendrl.commons import jobs from tendrl.commons.objects import BaseObject from tendrl.commons.tests import test_init from tendrl.commons.utils import alert_utils from tendrl.commons.utils import etcd_utils from t...
Tendrl/commons
tendrl/commons/tests/jobs/test_jobs_init.py
Python
lgpl-2.1
4,525
''' A collection of tools to assist in analyzing encrypted blobs of data Copyright (C) 2011-2013 Virtual Security Research, LLC Author: Timothy D. Morgan, Jason A. Donenfeld This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 3, ...
Johnzyg/bletchley
lib/bletchley/blobtools.py
Python
lgpl-3.0
18,457
# Created by Albert Aparicio on 03/02/2017 # coding: utf-8 # This import makes Python use 'print' as in Python 3.x from __future__ import print_function import os from random import shuffle from sys import version_info from time import time import numpy as np from h5py import special_dtype, File from tfglib.constru...
albertaparicio/tfglib
tfglib/pretrain_data_params.py
Python
lgpl-3.0
12,490
# openoffice modules import uno def soffice_check(): """Check if openoffice is running. Attempts a socket connection to a running instance. Raises ConnectionError on error. """ def soffice_start(): """Start an openoffice instance. Raises StartupError on error. """ def soffice_connect(): """Return a c...
Jellofishi/solartron
office.py
Python
lgpl-3.0
398
# Copyright (C) 2015-2022 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later import os import sys import collections from numpy import exp, isnan, log, max, mean, min, nan, zeros as Content from rbnics.utils.io.csv_io import CSVIO from rbnics.utils.io.folders import F...
mathLab/RBniCS
rbnics/utils/io/performance_table.py
Python
lgpl-3.0
12,306
######################################################################## # File name: __init__.py # This file is part of: aioxmpp # # LICENSE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundat...
horazont/aioxmpp
tests/__init__.py
Python
lgpl-3.0
1,184
# (C) British Crown Copyright 2014, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
Jozhogg/iris
lib/iris/tests/unit/fileformats/grib/save_rules/test_data_section.py
Python
lgpl-3.0
7,789
"""Support for asyncronious checking.""" import logging import threading try: import Queue except ImportError: import queue as Queue try: import multiprocessing CPU_COUNT = multiprocessing.cpu_count() except (ImportError, NotImplementedError): CPU_COUNT = 1 from .core import run LOGGER = lo...
wilywampa/python-mode
pymode/libs/pylama/async.py
Python
lgpl-3.0
1,615
# -*- coding: utf-8 -* import string DESCRIPTION = ""\ """ _ __ _ ___ / \| \ / \|_ _| ( o ) o ) o || | \_/|__/|_n_||_| ------------------------------------------- _ __ _ ___ / \ | \ / \ |_ _| ( o ) o ) ...
quentinhardy/odat
Constants.py
Python
lgpl-3.0
1,740
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 1998-2021 Stephane Galland <galland@arakhne.org> # # This program is free library; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the ...
gallandarakhneorg/autolatex
tests/autolatex2tests/config/scm_test.py
Python
lgpl-3.0
2,060
# -*- coding: utf-8 -*- import os import KBEngine from KBEDebug import * """ loginapp进程主要处理KBEngine服务端登陆、创建账号等工作。 目前脚本支持几种功能: 1: 注册账号检查 2:登陆检查 3:自定义socket回调,参考interface中Poller实现 """ def onLoginAppReady(): """ KBEngine method. loginapp已经准备好了 """ INFO_MSG('onLoginAppReady: bootstrapGroupIndex=%...
Orav/kbengine
assets/scripts/login/kbemain.py
Python
lgpl-3.0
2,617
from pycp2k.inputsection import InputSection from ._neighbor_lists3 import _neighbor_lists3 from ._subcell1 import _subcell1 from ._ewald_info1 import _ewald_info1 class _print26(InputSection): def __init__(self): InputSection.__init__(self) self.NEIGHBOR_LISTS = _neighbor_lists3() self.SU...
SINGROUP/pycp2k
pycp2k/classes/_print26.py
Python
lgpl-3.0
526
# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import pytest from UM.Settings.ContainerQuery import ContainerQuery def test_matchMultipleTokens(): cq = ContainerQuery(None) # Test #1: if property_name doesn't exist, it will return False result = cq._m...
Ultimaker/Uranium
tests/Settings/TestContainerQuery.py
Python
lgpl-3.0
1,534
from __future__ import annotations import logging from os.path import exists from typing import TYPE_CHECKING from .helpers import BumprError, execute if TYPE_CHECKING: from typing import Optional logger = logging.getLogger(__name__) __all_ = ( "Hook", "ReadTheDocHook", "ChangelogHook", "Comman...
noirbizarre/bumpr
bumpr/hooks.py
Python
lgpl-3.0
6,499
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
keepkey/python-keepkey
tests/test_msg_verifymessage_segwit_native.py
Python
lgpl-3.0
4,324
PORT = 8040 ISSUER = 'https://localhost' # do not include the port, it will be added in the code. SERVICEURL = "{issuer}verify" # do not manually add issuer or port number, these will be added in the code. SERVER_CERT = "certification/server.crt" SERVER_KEY = "certification/server.key" CERT_CHAIN = None AUTHENTICATI...
VJalili/OIDCProvider
config.py
Python
lgpl-3.0
2,954
from pycp2k.inputsection import InputSection from ._each174 import _each174 class _diis_info3(InputSection): def __init__(self): InputSection.__init__(self) self.Section_parameters = None self.Add_last = None self.Common_iteration_levels = None self.Filename = None ...
SINGROUP/pycp2k
pycp2k/classes/_diis_info3.py
Python
lgpl-3.0
668
''' Created on Mar 13, 2015 @author: Akshat ''' from pyvotecore.stv import STV from code.pref_sf_conv import PrefSFConverter class ImplSTV(object): ''' classdocs ''' def __init__(self, raw_pref): ''' Constructor ''' self.processed_pref = PrefSFConver...
R-daneel-olivaw/mutation-tolerance-voting
code/sf/sf_stv.py
Python
lgpl-3.0
1,610
# # Copyright (C) University College London, 2007-2012, all rights reserved. # # This file is part of HemeLB and is provided to you under the terms of # the GNU LGPL. Please see LICENSE in the top level directory for full # details. # """Regarding indices, a few conventions: 1) Broadly there are two types of index...
jenshnielsen/hemelb
Tools/hemeTools/parsers/geometry/__init__.py
Python
lgpl-3.0
1,408
#!/usr/bin/env python # This file is part of tcollector. # Copyright (C) 2013 The tcollector Authors. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, o...
OpenTSDB/tcollector
collectors/0/riak.py
Python
lgpl-3.0
5,780
# (C) British Crown Copyright 2014, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
Jozhogg/iris
lib/iris/tests/unit/fileformats/grib/message/test__MessageLocation.py
Python
lgpl-3.0
1,723
#!/usr/bin/python #automat.py # # <<<COPYRIGHT>>> # # # # """ .. module:: automat This is the base class for State Machine. You can read more about `Automata-based programming <http://en.wikipedia.org/wiki/Automata-based_programming>`_ principles and learn how to develop your project in such way. T...
vesellov/visio2python
automat.py
Python
lgpl-3.0
12,453
# -*- coding: utf-8 -*- # Copyright(C) 2019 Sylvie Ye # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
vicnet/weboob
modules/ing/api/login.py
Python
lgpl-3.0
5,888
import sys import textwrap import pip.download from pip.basecommand import Command, SUCCESS from pip.util import get_terminal_size from pip.log import logger from pip.backwardcompat import xmlrpclib, reduce, cmp from pip.exceptions import CommandError from pip.status_codes import NO_MATCHES_FOUND from pip....
Orav/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/commands/search.py
Python
lgpl-3.0
4,868
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # pylit.py # ******** # Literate programming with reStructuredText # ++++++++++++++++++++++++++++++++++++++++++ # # :Date: $Date$ # :Revision: $Revision$ # :URL: $URL$ # :Copyright: © 2005, 2007 Günter Milde. # Released without warranty under t...
blechta/fenapack
doc/source/pylit/pylit.py
Python
lgpl-3.0
61,091
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK core. # # REDHAWK core is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free ...
RedhawkSDR/framework-codegen
redhawk/codegen/jinja/python/ports/frontend.py
Python
lgpl-3.0
2,269
import sublime import sublime_plugin MARKDOWN_LINK_SNIPPET = "[${{1:{}}}](${{2:{}}})" class InsertMarkdownLinkCommand(sublime_plugin.TextCommand): def decode_page(self, page_bytes, potential_encoding=None): if potential_encoding: try: text = page_bytes.decode(pot...
rahul-ramadas/BagOfTricks
InsertMarkdownLink.py
Python
unlicense
1,987
#!/usr/bin/env python # This file comes from here: https://github.com/llSourcell/tensorflow_demo/blob/master/input_data.py """Functions for downloading and reading MNIST data.""" import gzip import os from six.moves.urllib.request import urlretrieve import numpy SOURCE_URL = 'http://yann.lecun.com/exdb/mnist...
KamilSzot/365_programs
2017-01-27/input_data.py
Python
unlicense
6,497
class Solution(object): def maxArea(self, height): """ :type height: List[int] :rtype: int """ i = 0 j = len(height)-1 res = 0 while i<j: res = max(res, min(height[i], height[j]) * (j-i)) if height[i] > height[j]: ...
taulk/oj
LeetCode/[11]container-with-most-water/Solution.py
Python
unlicense
395
#!/usr/bin/python """ UDP Service Scanner version 0.1 by dev_zzo This work has largely been inspired by: https://github.com/portcullislabs/udp-proto-scanner As is, this is more like a prober than scanner; it operates using predefined probes for each known protocol. """ import argparse import socket import struct im...
dev-zzo/pwn-tools
scanners/udp-probe.py
Python
unlicense
7,615
from django.apps import AppConfig class AuditorConfig(AppConfig): name = 'auditor'
sheanmassey/django-audit-trails
django_audit/apps.py
Python
unlicense
89
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: _NotAvailable.py import dsz import sys def main(): try: cmdId = int(sys.argv[1]) cmdName = dsz.cmd.data.Get('CommandMetaData::Na...
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/HelperScripts/_NotAvailable.py
Python
unlicense
695
#!python3 num1 = 999 num2 = 999 palindrome = set() while num1 > 100 : while num2 > 100 : x = num1 * num2 if str(x) == str(x)[::-1] : palindrome.add(x) num2 -= 1 num1 -= 1 num2 = 999 print(max(palindrome))
petermblair/euler
problem.4/problem4.py
Python
unlicense
256
#!/usr/bin/python # __init__.py # by Walter Dal'Maz Silva # on 27th September 2016 __version__ = '0.2.0' # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import sys import glob # ------...
waltermateriais/xutils
xpython/xcompile/__init__.py
Python
unlicense
6,157
#Pass in a photo url to the script and it performs 5 label detection on the photo. import sys import argparse import io from google.cloud import vision #capture the argument passed in to script url=sys.argv[1] client = vision.Client() #pass commange line url into uri image = client.image(source_uri=url) labels = i...
jakemathai/computer-vision
label_detect.py
Python
apache-2.0
437
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
jameschch/Lean
Algorithm.Python/BasicTemplateFuturesHourlyAlgorithm.py
Python
apache-2.0
2,341
# # 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 us...
markflyhigh/incubator-beam
sdks/python/apache_beam/transforms/window.py
Python
apache-2.0
18,159
# 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 the Li...
dstufft/warehouse
tests/unit/admin/views/test_squats.py
Python
apache-2.0
1,618
TABLE_INPUT = { "Owner": "a_fake_owner", "Parameters": {"EXTERNAL": "TRUE"}, "Retention": 0, "StorageDescriptor": { "BucketColumns": [], "Compressed": False, "InputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat", "NumberOfBuckets": -1, "Ou...
spulec/moto
tests/test_glue/fixtures/datacatalog.py
Python
apache-2.0
2,153
# Copyright 2016 United States Government as represented by the Administrator # of the National Aeronautics and Space Administration. All Rights Reserved. # # Portion of this code is Copyright Geoscience Australia, Licensed under the # Apache License, Version 2.0 (the "License"); you may not use this file # except in c...
ceos-seo/data_cube_ui
apps/water_detection/models.py
Python
apache-2.0
10,162
from rpath_job.models import job Job = job.Job Jobs = job.Jobs ResultResource = job.ResultResource System = job.System
sassoftware/catalog-service
catalogService/rest/models/jobs.py
Python
apache-2.0
120
# coding=utf-8 from yaya.common.enum import Enum __author__ = 'tony' # 词性 NATURE = Enum( "bg", # u"区别语素", "mg", # u"数语素", "nl", # u"名词性惯用语", "nx", # u"字母专名", "qg", # u"量词语素", "ud", # u"助词", "uj", # u"助词", "uz", # u"着", "ug", # u"过", "ul", # u"连词", "uv", # u"连词", ...
Tony-Wang/YaYaNLP
yaya/common/nature.py
Python
apache-2.0
4,416
import CatalogItem from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import * class CatalogNametagItem(CatalogItem.CatalogItem): sequenceNumber = 0 def makeNewItem(...
silly-wacky-3-town-toon/SOURCE-COD
toontown/catalog/CatalogNametagItem.py
Python
apache-2.0
3,692
"""Support for Balboa Spa Wifi adaptor.""" from __future__ import annotations import asyncio from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, FAN_HIGH, FAN_LOW, FAN_MEDIUM, FAN_OFF, HVAC_MO...
home-assistant/home-assistant
homeassistant/components/balboa/climate.py
Python
apache-2.0
5,803
# 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 # d...
jamielennox/python-keystoneclient
keystoneclient/tests/v2_0/test_tokens.py
Python
apache-2.0
874
import sys sys.path.insert(1, "../../") import h2o def sub_gsub_check(ip,port): # Connect to a pre-existing cluster h2o.init(ip,port) frame = h2o.import_frame(path=h2o.locate("smalldata/iris/iris.csv")) # single column (frame) frame["C5"] = frame["C5"].gsub("s", "z") assert frame[0,4] == "Iri...
ChristosChristofidis/h2o-3
h2o-py/tests/testdir_munging/pyunit_sub_gsub.py
Python
apache-2.0
893
from django.apps import AppConfig from django.db.models.signals import post_save, post_delete from django.conf import settings class CustomerBillConfig(AppConfig): name = 'retail.customer_bill' def __init__(self, app_name, app_module): super(self.__class__, self).__init__(app_name, app_module) ...
Semprini/cbe-retail
retail/customer_bill/apps.py
Python
apache-2.0
1,070
#!/usr/bin/env python ''' headderTemplate: an immutale tuple listing, in order, the expected headders ''' headderTemplate = ( "Payee Name: ", "Payee ID: ", "Payee Site: ", "Payment Number: ", "Payment Date: ", ) ''' headderConverters: a dictionary key'd on the Headder title. the valu...
dkelsey/payment-remittance-processor
scripts/verifyHeader.py
Python
apache-2.0
2,156
#!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # 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-...
intelxed/xed
pysrc/read_xed_db.py
Python
apache-2.0
33,709
__author__ = 'minosniu' import sys import os import uuid import shutil path_root = 'D:\\S2_L_forward_reaching' expt = 'FES_reaching' date = '20150929' analyst = 'zcwaxs' addr = 'mongodb://localhost:27017/' patient = 'CXM' side = 'left' movement = 'forward_reaching' if __name__ == '__main__': path = path_root ...
zcwaxsshjd/TimeGrinder
RunGrinder.py
Python
apache-2.0
1,020
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import re import waffle from django.conf import settings from django.shortcuts import redirect class SoftLaunchMiddleware(object): def __init__(self): self.redirect_url =...
RickMohr/nyc-trees
src/nyc_trees/nyc_trees/middleware.py
Python
apache-2.0
846
"""Edit a 'rotomap' series of images. In all modes: Press 'q' to quit. Press 'Q' to quit with exit code 1. Press left for previous image, right for next image. Press up for previous map, down for next map. Ctrl-click on a point to zoom in on it. Press 'z' or 'x' to adjust the zoom level. P...
aevri/mel
mel/cmd/rotomapedit.py
Python
apache-2.0
21,197
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apa...
DirectXMan12/nova-hacking
nova/network/api.py
Python
apache-2.0
22,700
import requests def login(output_file): r = requests.get('http://quickstart.cloudera:8888/accounts/login/?next=/') tmp = r.text.split('csrfmiddlewaretoken') tmp = tmp[1].split("value='") tmp = tmp[1].split("'") token = tmp[0] cookie = r.cookies data = {'username':'cloudera','password':'cloudera','csrfmiddlewa...
BRiDGEIris/cgs-apps
code/apps/variants/tests/local_login.py
Python
apache-2.0
561
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # tcpconnect Trace TCP connect()s. # For Linux, uses BCC, eBPF. Embedded C. # # USAGE: tcpconnect [-h] [-c] [-t] [-p PID] [-P PORT [PORT ...]] [-4 | -6] # # All connection attempts are traced, even if they ultimately fail. # # This uses d...
brendangregg/bcc
tools/tcpconnect.py
Python
apache-2.0
17,972
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
open-telemetry/opentelemetry-python
exporter/opentelemetry-exporter-otlp-proto-grpc/setup.py
Python
apache-2.0
961
# -*- coding: utf-8 -*- # # Voldemort config # # @author: Sreejith K # Created On 19th Sep 2011 import os import logging from yaml import load, dump, Loader, Dumper log = logging.getLogger(__name__) DEFAULT_CONFIG = """\ # voldemort configuration file layout_dirs : - layout - include ...
semk/voldemort
voldemort/config.py
Python
apache-2.0
1,783
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
yeming233/rally
tests/unit/plugins/common/sla/test_iteration_time.py
Python
apache-2.0
3,062
import asyncio import sys import aiohttp_jinja2 from aiohttp import web from .toolbar import DebugToolbar from .tbtools.tbtools import get_traceback from .utils import addr_in, REDIRECT_CODES, APP_KEY, TEMPLATE_KEY, hexlify, \ ContextSwitcher __all__ = ['toolbar_middleware_factory', 'middleware'] HTML_TYPES = ('t...
stormandco/aiohttp_debugtoolbar
aiohttp_debugtoolbar/middlewares.py
Python
apache-2.0
6,287
def collect_vowels(s): """ (str) -> str Return the vowels (a, e, i, o, and u) from s. >>> collect_vowels('Happy Anniversary!') 'aAiea' >>> collect_vowels('xyz') '' """ vowels = '' for char in s: if char in 'aeiouAEIOU': vowels = vowels + char return vowel...
fasaas/owne-coursera
documentation/Crafting-Quality-Code/Doctest/vowels.py
Python
apache-2.0
653
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Richard Hoop - wrhoop@gmail.com # import sys import argparse import logging import glob import json import netsnmp import socket import time import signal import threading from raven import Client # ====( headers )==== # import pprint pprint = pprint.pprint from dae...
rhoop/snmp2graphite
metricD.py
Python
apache-2.0
6,600
# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-13 15:38 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('indicators', '0059_require_level_name'), ] operations = [ migrations.AlterUniqueTo...
mercycorps/TolaActivity
indicators/migrations/0060_ind_level_fields_unique_together.py
Python
apache-2.0
436
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
unifycore/ryu
ryu/app/ofctl_rest.py
Python
apache-2.0
8,459
# -*- coding: utf-8 -*- from moha.vm import code as Code class W_Root(object): def str(self): return '' class Type(object): def __init__(self, typeval): self.typeval = typeval class Null(W_Root): def str(self): return 'null' def __repr__(self): return 'null' @c...
mohalang/moha
moha/vm/objects.py
Python
apache-2.0
9,139
# -*- coding: latin-1 -*- import unittest import comtypes.test comtypes.test.requires("ui") import datetime from comtypes.client import CreateObject xlRangeValueDefault = 10 xlRangeValueXMLSpreadsheet = 11 xlRangeValueMSPersistXML = 12 class Test(unittest.TestCase): def test_earlybound(self): ...
ezarko/cfn-init
comtypes/test/test_excel.py
Python
apache-2.0
3,729
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: gl_tree_test.py 114 2006-10-22 09:46:11Z r1chardj0n3s $' import math import random from pyglet.window import * from pyglet.window import mouse from pyglet import clock from ctypes import * from pyglet.window.event import * # from py...
nicememory/pie
pyglet/contrib/model/examples/tree_test.py
Python
apache-2.0
2,094
from model.contact import Contact import re class ContactHelper: def __init__(self, app): self.app = app def create(self, contact): wd = self.app.wd self.open_contact_page() self.fill_contact_form(contact) # submit contact creation wd.find_element_by_xpath("//...
volkodav1985/volkodavpython
fixture/contact.py
Python
apache-2.0
5,484
#!/usr/bin/env python3 import textwrap import pyocd.commands.commands import pyocd.commands.values from pyocd.commands.base import ( ALL_COMMANDS, CommandBase, ValueBase, ) ACCESS_DESC = { 'r': "read-only", "w": "write-only", "rw": "read-write", } GROUP_DOCS = { 'b...
mbedmicro/pyOCD
scripts/generate_command_help.py
Python
apache-2.0
4,524
# Copyright 2014 Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
jcsp/manila
manila_tempest_tests/tests/api/test_rules.py
Python
apache-2.0
11,108
from django.shortcuts import render from .models import KumpulanDokumen # Create your views here. def index(request): data_dokumen = KumpulanDokumen.objects.all() data = { 'dokumen': data_dokumen } return render(request, 'reformasi/daftar_reformasi.html', data)
akbarpn136/inventaris-dj
reformasi/views.py
Python
apache-2.0
290
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
polyaxon/polyaxon
core/polyaxon/polyflow/references/path.py
Python
apache-2.0
1,184
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
dietrichc/streamline-ppc-reports
examples/dfp/v201405/contact_service/get_uninvited_contacts.py
Python
apache-2.0
2,206
__author__ = 'mramire8' from collections import defaultdict import copy import numpy as np from sklearn.linear_model import LogisticRegression from baselearner import BaseLearner from sklearn.feature_extraction.text import CountVectorizer from datautil.textutils import StemTokenizer show_utilitly = False class Ra...
mramire8/active
strategy/randomsampling.py
Python
apache-2.0
21,847
# Copyright (c) 2016 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 # # ...
eharney/cinder
cinder/volume/drivers/huawei/rest_client.py
Python
apache-2.0
88,507
# Copyright 2012 OpenStack Foundation # 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...
lvdongbing/python-bileanclient
bileanclient/tests/unit/test_http.py
Python
apache-2.0
16,420
""" Integration tests for mac_timezone If using parallels, make sure Time sync is turned off. Otherwise, parallels will keep changing your date/time settings while the tests are running. To turn off Time sync do the following: - Go to actions -> configure - Select options at the top and 'More Options' on the l...
saltstack/salt
tests/integration/modules/test_mac_timezone.py
Python
apache-2.0
7,775
import abc import inspect import re from mountapi.core import exceptions class AbstractConverter(metaclass=abc.ABCMeta): param_url: str = None param_regex: str = None @classmethod def path_to_regex(cls, path): return re.sub(cls.param_url, cls.param_regex, path) + '$' class IntConverter(Abs...
pyQuest/mount-api
mountapi/schema.py
Python
apache-2.0
2,575
# Copyright 2016 Letv Cloud Computing # 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...
openstack/horizon
openstack_dashboard/dashboards/admin/floating_ips/forms.py
Python
apache-2.0
2,877
input = """ % run with option -- depgraph % component of b must be HCF a(1) | -a(1). b(X) | b(X) :- a(X). """ output = """ % run with option -- depgraph % component of b must be HCF a(1) | -a(1). b(X) | b(X) :- a(X). """
veltri/DLV2
tests/parser/depgraph.1.test.py
Python
apache-2.0
239
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('beekeepers', '0013_update_queen_source_options'), ] operations = [ migrations.AlterField( model_name='monthlysur...
project-icp/bee-pollinator-app
src/icp/apps/beekeepers/migrations/0014_update_hive_scale_id_help_text.py
Python
apache-2.0
579
# -*- encoding: utf-8 -*- from openerp import models, fields, api class Wizard(models.TransientModel): _name = 'openacademy.wizard' def _default_sessions(self): return self.env['openacademy.session'].browse(self._context.get('active_ids')) session_ids = fields.Many2many('openacademy.session', ...
cmexiatyp/open_academy
model/wizard.py
Python
apache-2.0
611
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
FederatedAI/FATE
python/fate_arch/protobuf/python/inference_service_pb2_grpc.py
Python
apache-2.0
3,942
from .tobii_pro_wrapper import *
oguayasa/tobii_pro_wrapper
tobii_pro_wrapper/__init__.py
Python
apache-2.0
34
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
savi-dev/heat
heat/tests/test_neutron.py
Python
apache-2.0
46,371