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
#!/usr/bin/env python # -*- coding: utf-8 ABOUT='''Lightning Compiler is a simple Python editor that can execute Python programs 'instantly', outputting the result in a side window, for testing purposes. Adapt as you wish but please acknowledge the original source if you do. (c) André Roberge, andre.rober...
tectronics/rur-ple
rur_py/lightning.py
Python
gpl-2.0
32,617
#!/usr/bin/env python import xmlrpclib, sys node = xmlrpclib.ServerProxy("http://127.0.0.1:20000/xm.rem") #do an example call: dest = sys.argv[1] #args = { 'task_name' : "Brunet.MapReduceTrace", args = { 'task_name' : "Brunet.MapReduceRangeCounter", 'gen_arg' : dest } print node.uriproxy("sender:localnode",...
twchoi/brunet
tests/protocol/mapreduce.py
Python
gpl-2.0
350
# -*- Mode: Python -*- # Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission to use, copy, modify,...
bruderstein/PythonScript
PythonLib/min/asyncore.py
Python
gpl-2.0
20,233
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation;...
nawawi/fail2ban
fail2ban/helpers.py
Python
gpl-2.0
18,285
#!/usr/bin/python # Written by Antonio Galea - 2010/11/18 # Distributed under Gnu LGPL 3.0 # see http://www.gnu.org/licenses/lgpl-3.0.txt # # based on a modified version of this script from https://sourceforge.net/p/dfu-util/tickets/35/#357c # with the patch supplied in https://sourceforge.net/p/dfu-util/tickets/35/#...
cleanflight/cleanflight
src/utils/dfuse-pack.py
Python
gpl-3.0
8,242
#!/usr/bin/env python """ Remove the outputs produced by a transformation """ from __future__ import print_function import sys from DIRAC.Core.Base.Script import parseCommandLine parseCommandLine() if len( sys.argv ) < 2: print('Usage: dirac-transformation-remove-output transID [transID] [transID]') sys.exit() e...
chaen/DIRAC
TransformationSystem/scripts/dirac-transformation-remove-output.py
Python
gpl-3.0
945
# 02_shelx.py # Copyright 2008 by The University of York # Author: Bernhard Lohkamp # Copyright 2007, 2008 by The University of Oxford # Author: Paul Emsley # This program 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 ...
jlec/coot
python-tests/02_shelx.py
Python
gpl-3.0
9,877
#!/usr/bin/env python # # Copyright (C) 2012 Adam Sutton <dev@adamsutton.me.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the...
ulibuck/script.htsp.EPG
tvh/htsmsg.py
Python
gpl-3.0
5,484
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License,...
shawnsi/ansible
lib/ansible/playbook/play_context.py
Python
gpl-3.0
19,741
############################################################################ # Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://...
pecharmin/bind9
bin/tests/system/keymgr/testpolicy.py
Python
mpl-2.0
1,240
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The primar...
Star2Billing/newfies-dialer
newfies/appointment/templatetags/appointment_tags.py
Python
mpl-2.0
1,022
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import flask...
plamut/superdesk
server/apps/auth/__init__.py
Python
agpl-3.0
1,665
# -*- coding: utf-8 -*- # Copyright 2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. """Read and wr...
nwokeo/supysonic
venv/lib/python2.7/site-packages/mutagen/oggvorbis.py
Python
agpl-3.0
5,499
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
cbeck88/fifengine
tools/editor/plugins/ObjectSelector.py
Python
lgpl-2.1
21,087
# 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) from spack import * class LlvmOpenmpOmpt(CMakePackage): """The OpenMP subproject provides an OpenMP runtime for use...
LLNL/spack
var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
Python
lgpl-2.1
2,900
''' count_evens lab from codingbat ''' # counts the even no's in a list def count_evens(nums): count = 0 for num in nums: # num % 2 returns 0 and 1 , and 1 is not True try: if num % 2 == 0: count += 1 except TypeError as e: print("TypeError {0}".format(e)) return None return count # main me...
UWPCE-PythonCert/IntroPython2016
students/liverpoolforever/session06/count_evens.py
Python
unlicense
527
# # 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 # ...
jasondunsmore/python-heatclient
heatclient/tests/test_resource_types.py
Python
apache-2.0
1,629
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
pnakka/googlecrisismap
appengine_config.py
Python
apache-2.0
845
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaw...
tobegit3hub/cinder_docker
cinder/volume/drivers/netapp/dataontap/nfs_cmode.py
Python
apache-2.0
27,999
#!/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...
coxmediagroup/googleads-python-lib
examples/dfp/v201408/report_service/run_report_with_custom_fields.py
Python
apache-2.0
3,327
# -*- coding: utf-8 -*- from django.utils import timezone from factory import SubFactory, Sequence from tests.factories import ModularOdmFactory, UserFactory, ProjectFactory, ExternalAccountFactory import datetime from dateutil.relativedelta import relativedelta from website.addons.mendeley import model class Men...
monikagrabowska/osf.io
website/addons/mendeley/tests/factories.py
Python
apache-2.0
929
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
savi-dev/horizon
horizon/forms/views.py
Python
apache-2.0
3,178
import sys import time import pytest import logging from cassandra import ConsistencyLevel, Timeout, Unavailable from cassandra.query import SimpleStatement from dtest import Tester, create_ks from tools.assertions import (assert_all, assert_invalid, assert_one, assert_unavailable) from ...
pauloricardomg/cassandra-dtest
batch_test.py
Python
apache-2.0
24,174
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Cisco Systems, 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...
netscaler/neutron
neutron/plugins/cisco/common/cisco_credentials_v2.py
Python
apache-2.0
2,831
import time import argparse import random import threading import etcd import vard t = threading gets = [] puts = [] reqs = [] DEBUG = False def benchmark(client, requests, keys, put_percentage, n): random.seed(n) put_prob = put_percentage / 100.0 i = 0 while True: i += 1 key = str(ra...
uwplse/verdi-raft
extraction/vard/bench/bench.py
Python
bsd-2-clause
2,554
from datetime import timedelta from decimal import Decimal as D, ROUND_UP from django.utils.timezone import now from django.views.generic import TemplateView from django.db.models.loading import get_model from django.db.models import Avg, Sum, Count from oscar.core.compat import get_user_model from oscar.apps.promoti...
Giftingnation/GN-Oscar-Custom
oscar/apps/dashboard/views.py
Python
bsd-3-clause
7,404
import os import pytest @pytest.fixture def os_environ(monkeypatch): mock_environ = dict(os.environ) monkeypatch.setattr(os, 'environ', mock_environ) return mock_environ def pytest_generate_tests(metafunc): if hasattr(metafunc.function, "pytestmark"): for mark in metafunc.function.pytestmark...
mitsuhiko/babel
tests/conftest.py
Python
bsd-3-clause
526
""" sentry.utils.data_scrubber ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import re import six from sentry.constants import DEFAULT_SCRUBBED_FIELDS def varmap(func, va...
hongliang5623/sentry
src/sentry/utils/data_scrubber.py
Python
bsd-3-clause
3,669
#!/usr/bin/env python # PythonJS to Dart Translator # by Brett Hartshorn - copyright 2013 # License: "New BSD" import sys import ast import pythonjs class TransformSuperCalls( ast.NodeVisitor ): def __init__(self, node, class_names): self._class_names = class_names self.visit(node) def visit_Call(self, node): ...
pombredanne/PythonJS
pythonjs/pythonjs_to_dart.py
Python
bsd-3-clause
15,810
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSettings(models.Mo...
SinnerSchraderMobileMirrors/django-cms
cms/models/settingmodels.py
Python
bsd-3-clause
855
import datetime import json from contextlib import contextmanager from django.contrib import admin from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin.views.autocomplete import AutocompleteJsonView from django.contrib.auth.models import Permission, User from django.contrib.contenttyp...
atul-bhouraskar/django
tests/admin_views/test_autocomplete_view.py
Python
bsd-3-clause
21,229
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import frappe def execute(): frappe.reload_doc("core", "doctype", "system_settings") frappe.db.set_value('System Settings', None, "allow_login_after_fail", 60)
ESS-LLP/frappe
frappe/patches/v10_0/set_default_locking_time.py
Python
mit
263
import unittest from external.wip import work_in_progress from .molecule import Molecule from .resonance import * class ResonanceTest(unittest.TestCase): def test_C9H9_aro(self): """CyclopropylBenzene-radical, aromatic bonds""" mol = Molecule(SMILES="[CH]1CC1c1ccccc1") generateResonanceI...
chatelak/RMG-Py
rmgpy/molecule/resonanceTest.py
Python
mit
10,289
# encoding: utf-8 import urllib import hashlib import requests from Queue import Queue, Empty from threading import Thread from time import sleep LHANG_API_ROOT ="https://api.lhang.com/v1/" FUNCTION_TICKER = ('ticker.do', 'get') FUNCTION_DEPTH = ('depth.do', 'get') FUNCTION_TRADES = ('trades.do', 'get') FUNCTION_...
ujfjhz/vnpy
docker/dockerTrader/gateway/lhangGateway/vnlhang.py
Python
mit
10,150
# 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 ...
SUSE/azure-sdk-for-python
azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py
Python
mit
1,478
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
CeltonMcGrath/TACTIC
src/tactic/ui/widget/__init__.py
Python
epl-1.0
1,116
## ## Copyright(c) 2009 Syntext, Inc. All Rights Reserved. ## Contact: info@syntext.com, http://www.syntext.com ## ## This file is part of Syntext Serna XML Editor. ## ## COMMERCIAL USAGE ## Licensees holding valid Syntext Serna commercial licenses may use this file ## in accordance with the Syntext Serna Commercial...
malaterre/serna-free-backup
serna/docutils/check_tags.py
Python
gpl-3.0
3,642
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import os, subprocess from calibre.ebooks.oeb.polish.tests.base import BaseT...
sharad/calibre
src/calibre/ebooks/oeb/polish/tests/container.py
Python
gpl-3.0
9,609
# # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, e...
kaarolch/ansible
lib/ansible/module_utils/azure_rm_common.py
Python
gpl-3.0
26,066
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. '''expandlibs-exec.py applies expandlibs rules, and some more (see below) to a given command line, and executes that com...
cledoux/cmps530
js/src/config/expandlibs_exec.py
Python
mpl-2.0
13,982
#!/usr/bin/env python """ Django administration utility. """ from __future__ import absolute_import, unicode_literals import os import sys PWD = os.path.abspath(os.path.dirname(__file__)) if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') sys.path.append(PWD) try...
eduNEXT/openedx-session-time-tracker
manage.py
Python
agpl-3.0
1,072
# -*- coding: utf-8 -*- from odoo.tests.common import TransactionCase from odoo.exceptions import UserError, ValidationError class TestProduction(TransactionCase): ''' 测试组装单和拆卸单 ''' def setUp(self): super(TestProduction, self).setUp() self.env.ref('core.goods_category_1').account_id = self.e...
floraXiao/gooderp_addons
warehouse/tests/test_production.py
Python
agpl-3.0
28,875
# Generated by Django 1.11.28 on 2020-03-04 15:19 """ Deletes the ENFORCE_JWT_SCOPES waffle switch that has already been deprecated and removed. See https://github.com/edx/edx-platform/pull/23188 for the removal """ from django.db import migrations ENFORCE_JWT_SCOPES = 'oauth2.enforce_jwt_scopes' def delete_switc...
edx/edx-platform
openedx/core/djangoapps/oauth_dispatch/migrations/0009_delete_enable_scopes_waffle_switch.py
Python
agpl-3.0
1,009
# 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) from spack import * class Libmcrypt(AutotoolsPackage): """Libmcrypt is a thread-safe library providing a uniform ...
LLNL/spack
var/spack/repos/builtin/packages/libmcrypt/package.py
Python
lgpl-2.1
670
# Copyright (c) 2014 Cisco Systems # 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 require...
subramani95/neutron
neutron/tests/unit/ml2/drivers/cisco/apic/test_cisco_apic_mechanism_driver.py
Python
apache-2.0
8,379
# # 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...
mbroadst/debian-qpid-python
qpid/tests/messaging/message.py
Python
apache-2.0
5,734
# -*- coding: utf-8 -*- ############################################################################### # # Tweets # Retrieves a collection of relevant Tweets matching a specified query. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License")...
jordanemedlock/psychtruths
temboo/core/Library/Twitter/Search/Tweets.py
Python
apache-2.0
7,135
"""Tests for rmsprop.""" import math import tensorflow.python.platform import numpy as np import tensorflow as tf class RMSPropOptimizerTest(tf.test.TestCase): def testWithoutMomentum(self): with self.test_session(): var0 = tf.Variable([1.0, 2.0]) var1 = tf.Variable([3.0, 4.0]) grads0 = tf....
liyu1990/tensorflow
tensorflow/python/training/rmsprop_test.py
Python
apache-2.0
7,316
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
jgao54/airflow
tests/contrib/operators/test_azure_container_instances_operator.py
Python
apache-2.0
5,265
class MkDocsException(Exception): """Base exceptions for all MkDocs Exceptions""" class ConfigurationError(MkDocsException): """Error in configuration""" class MarkdownNotFound(MkDocsException): """A linked local Markdown file isn't found in the table of contents."""
wenqiuhua/mkdocs
mkdocs/exceptions.py
Python
bsd-2-clause
284
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/google/protobuf/internal/type_checkers.py
Python
bsd-2-clause
14,226
"""Generators for classes of graphs used in studying social networks.""" import itertools import math import random import networkx as nx # Copyright(C) 2011, 2015 by # Ben Edwards <bedwards@cs.unm.edu> # Aric Hagberg <hagberg@lanl.gov> # Konstantinos Karakatsanis <dinoskarakas@gmail.com> # All rights re...
SanketDG/networkx
networkx/generators/community.py
Python
bsd-3-clause
13,665
# Copyright 2014 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. import logging import os import sys from telemetry.core import exceptions from telemetry.core import util from telemetry import decorators from telemetry.in...
sahiljain/catapult
telemetry/telemetry/page/shared_page_state.py
Python
bsd-3-clause
13,546
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
pankajp/pyface
pyface/preference/preference_node.py
Python
bsd-3-clause
2,458
from LogAnalyzer import Test,TestResult import DataflashLog import math # for isnan() class TestParams(Test): '''test for any obviously bad parameters in the config''' def __init__(self): Test.__init__(self) self.name = "Parameters" # helper functions def __checkParamIsEqual(self, ...
Yndal/ArduPilot-SensorPlatform
ardupilot/Tools/LogAnalyzer/tests/TestParams.py
Python
mit
3,119
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Data/BuddyPokemon.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import...
CaptorOfSin/pogom
pogom/pgoapi/protos/POGOProtos/Data/BuddyPokemon_pb2.py
Python
mit
2,805
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ from __future__ import unicode_literals import base64 import cgi import sys from django.conf import settings from django.core.exceptions import SuspiciousMu...
otherness-space/myProject003
my_project_003/lib/python2.7/site-packages/django/http/multipartparser.py
Python
mit
23,014
#!/usr/bin/python try: import xtract except ImportError: print 'Failed to load the library "xtract"' print '\nRunning libxtract Python bindings test...\n' len = 8 a = xtract.doubleArray(len) temp = [] for i in range(0, len): a[i] = 2 * i temp.append(str(a[i])) mean = xtract.xtract_mean(a,len,None)...
caseybasichis/LibXtract
swig/test.py
Python
mit
1,102
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-04-11 03:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0005_auto_20180306_1804'), ] operations = [ migrations.RenameField( ...
eli261/jumpserver
apps/users/migrations/0006_auto_20180411_1135.py
Python
gpl-2.0
796
# # $Id: api.py 194 2007-04-05 15:31:53Z cameron $ # from defines import * class api: def __init__(self, parent=None): self.attributes = {} # initialize attributes self.attributes["Match"] = 1 # Match attribute set to 1 tells the main program we can...
cirosantilli/paimei
console/modules/_PAIMEIdiff/DiffModules/api.py
Python
gpl-2.0
4,063
#!/usr/bin/python -tt # # Copyright (c) 2011 Intel, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; version 2 of the License # # This program is distributed in the hope that it will be us...
biskett/mic
mic/plugin.py
Python
gpl-2.0
3,263
# -*- coding: iso-8859-1 -*- # Copyright (C) 2006-2014 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
michaelpacer/linkchecker
linkcheck/cache/robots_txt.py
Python
gpl-2.0
3,038
# file: l2capclient.py # desc: Demo L2CAP server for pybluez. # $Id: l2capserver.py 524 2007-08-15 04:04:52Z albert $ import bluetooth server_sock=bluetooth.BluetoothSocket( bluetooth.L2CAP ) port = 0x1001 server_sock.bind(("",port)) server_sock.listen(1) #uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ef" #bluetooth.a...
traviswp/pybluez
examples/simple/l2capserver.py
Python
gpl-2.0
826
''' Created on Jul 10, 2012 @author: Peyman Kazemian ''' from abc import ABCMeta,abstractproperty,abstractmethod class hs_hash_table: ''' The base class for all hash tables ''' __metaclass__ = ABCMeta @abstractproperty def length(self): pass @abstractmethod def add_en...
bovenyan/hsa
hsa-python/utils/hs_hash_table.py
Python
gpl-2.0
1,111
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Taneli Leppä <taneli@crasman.fi> # # This file is part of Ansible (sort of) # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 o...
dimid/ansible-modules-extras
system/gluster_volume.py
Python
gpl-3.0
16,138
# this exists only to prevent warnings during package build. # importing things from test doesn't make much sense :-)
pawelld/webias
webias/gnosis/xml/pickle/test/__init__.py
Python
agpl-3.0
118
#!/usr/bin/env python3 # Copyright (C) 2017 Freie Universität Berlin # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import os import sys def testfunc(child): child.expect_exact("Start.") ...
haukepetersen/RIOT
tests/bitarithm_timings/tests/01-run.py
Python
lgpl-2.1
731
from robot.api import logger from selenium.webdriver.support.events import AbstractEventListener class MyListener(AbstractEventListener): def before_navigate_to(self, url, driver): logger.info(f"Before navigate to {url}") def after_navigate_to(self, url, driver): logger.info(f"After navigate ...
rtomac/robotframework-selenium2library
utest/test/api/MyListenerWrongName.py
Python
apache-2.0
683
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # mockzoo # # This module helps start and stop zookeeper instances for unit testing # java must be pre-installed for this to work # import os import subprocess import logging import socket from kazoo.client import KazooC...
tcpcloud/contrail-controller
src/config/test/utils/mockzoo/mockzoo/mockzoo.py
Python
apache-2.0
4,010
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 # # Unl...
thomasem/nova
nova/tests/functional/wsgi/test_flavor_manage.py
Python
apache-2.0
9,012
# 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 applica...
tensorflow/tensorflow
tensorflow/python/autograph/converters/__init__.py
Python
apache-2.0
1,167
from urlparse import urlparse from addons.osfstorage import settings as osfstorage_settings def create_test_file(node, user, filename='test_file', create_guid=True): osfstorage = node.get_addon('osfstorage') root_node = osfstorage.get_root() test_file = root_node.append_file(filename) if create_guid:...
monikagrabowska/osf.io
api_tests/utils.py
Python
apache-2.0
737
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflow/tensorflow
tensorflow/python/data/experimental/__init__.py
Python
apache-2.0
7,619
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflow/tensorflow
tensorflow/python/kernel_tests/summary_ops/summary_v1_image_op_test.py
Python
apache-2.0
4,272
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # Vulkan CTS # ---------- # # Copyright (c) 2015 Google 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 ...
endlessm/chromium-browser
third_party/angle/third_party/VK-GL-CTS/src/external/vulkancts/scripts/build_spirv_binaries.py
Python
bsd-3-clause
3,737
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/inotify_file_watcher.py
Python
bsd-3-clause
10,377
from __future__ import division, print_function, absolute_import import os import sys from os.path import join from distutils.sysconfig import get_python_inc import numpy from numpy.distutils.misc_util import get_numpy_include_dirs try: from numpy.distutils.misc_util import get_info except ImportError: raise ...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/scipy/special/setup.py
Python
mit
6,118
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test logic for skipping signature validation on old blocks. Test logic for skipping signature validati...
jonasschnelli/bitcoin
test/functional/feature_assumevalid.py
Python
mit
7,653
#!/usr/bin/env python import sys for line in sys.stdin: if line.startswith('#'): continue fields = line.strip().split() # VCF is 1-based, BED is 0-based half open # print out chrom, start, end, chrom = fields[0] start = int(fields[1]) - 1 span = len(fields[3]) # handle multi-base ...
benranco/SNPpipeline
tools/vcflib/scripts/vcf2bed.py
Python
mit
429
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import stock_replenishment_info
jeremiahyan/odoo
addons/purchase_stock/wizard/__init__.py
Python
gpl-3.0
139
#!/usr/bin/env python # -*- Mode: Python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- # vi: set ts=4 sw=4 expandtab: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.or...
adobe-flash/avmplus
core/builtin.py
Python
mpl-2.0
2,218
# -*- coding: utf-8 -*- # Copyright(C) 2010-2013 Romain Bignon, Laurent Bachelier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
laurent-george/weboob
modules/youtube/test.py
Python
agpl-3.0
1,888
#!/usr/bin/env python # 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 # "L...
dforsyth/mesos
src/examples/python/test_framework.py
Python
apache-2.0
7,747
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
edespino/gpdb
src/test/tinc/tincrepo/mpp/lib/gprecoverseg.py
Python
apache-2.0
4,744
"""Miscellaneous utility functions and classes. This module is used internally by Tornado. It is not necessarily expected that the functions and classes defined here will be useful to other applications, but they are documented here in case they are. The one public-facing part of this module is the `Configurable` cl...
alkaitz/starloot
src/gameengine/webSocketServer/lib/tornado-3.0.1/tornado/util.py
Python
apache-2.0
8,811
from __future__ import unicode_literals import datetime import re import sys import warnings from contextlib import contextmanager from unittest import SkipTest, skipIf from xml.dom.minidom import parseString from django.contrib.auth.models import User from django.core import serializers from django.core.exceptions i...
loic/django
tests/timezones/tests.py
Python
bsd-3-clause
58,482
from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six import os from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin from matplotlib.testing.exceptions import (KnownFailureTest, ...
yuanagain/seniorthesis
venv/lib/python2.7/site-packages/matplotlib/testing/noseclasses.py
Python
mit
2,186
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.utils import native_str import logging from datetime import datetime from sqlalchemy import Column, Integer, String, DateTime from sqlalchemy.exc import Operat...
jawilson/Flexget
flexget/db_schema.py
Python
mit
10,634
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0', ...
bearstech/ansible
lib/ansible/modules/notification/cisco_spark.py
Python
gpl-3.0
5,640
from django.db import models from django.utils.translation import ugettext_lazy as _ from nodeshot.core.base.models import BaseDate from nodeshot.networking.net.models import Device, Interface from choices import POLARIZATION_CHOICES from . import AntennaModel class Antenna(BaseDate): """ Antenna of a device. A...
sephiroth6/nodeshot
nodeshot/networking/hardware/models/antenna.py
Python
gpl-3.0
1,875
from random import shuffle from itertools import chain import pytest import numpy as np from numpy.testing import assert_allclose from numpy.testing import assert_array_equal from skimage.transform import integral_image from skimage.feature import haar_like_feature from skimage.feature import haar_like_feature_coord...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/skimage/feature/tests/test_haar.py
Python
gpl-3.0
7,286
# This file was automatically created by FeynRules $Revision: 510 $ # Mathematica version: 7.0 for Linux x86 (64-bit) (February 18, 2009) # Date: Wed 2 Mar 2011 15:09:56 from object_library import all_lorentz, Lorentz from function_library import complexconjugate, re, im, csc, sec, acsc, asec SSS1 = Lorentz(name ...
wavewave/madgraph-auto-model
modelrepo/ADMXUDD112degen/lorentz.py
Python
bsd-2-clause
2,987
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
jvrsantacruz/XlsxWriter
xlsxwriter/test/comparison/test_table12.py
Python
bsd-2-clause
1,208
# Copyright (c) 2005-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
silkyar/570_Big_Little
src/mem/cache/BaseCache.py
Python
bsd-3-clause
3,289
import os, sys from twisted.internet import reactor, defer from twisted.python import log from twisted.application import service from foolscap.api import Tub, fireEventually MB = 1000000 class SpeedTest: DO_IMMUTABLE = True DO_MUTABLE_CREATE = True DO_MUTABLE = True def __init__(self, test_client_di...
david415/tahoe-lafs
src/allmydata/test/check_speed.py
Python
gpl-2.0
9,137
######################################################################## # # File Name: WhenElement.py # # """ Implementation of the XSLT Spec if instruction WWW: http://4suite.com/4XSLT e-mail: support@4suite.com Copyright (c) 1999-2000 Fourthought Inc, USA. All Rights Reserved. See http://4suite...
Pikecillo/genna
external/PyXML-0.8.4/xml/xslt/WhenElement.py
Python
gpl-2.0
2,472
# -*- coding: iso-8859-1 -*- # Copyright (C) 2000-2014 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
terryyin/linkchecker
linkcheck/checker/urlbase.py
Python
gpl-2.0
30,871
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Johnzero/erp
openerp/addons/account/wizard/account_reconcile_partner_process.py
Python
agpl-3.0
5,804
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
marionleborgne/nupic.research
tests/sensorimotor/unit/exhaustive_one_d_agent_test.py
Python
agpl-3.0
2,412
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
deepakbane28/nixysa
nixysa/pod_binding.py
Python
apache-2.0
31,775