repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
atodorov/anaconda
pyanaconda/threading.py
3
9529
# # threading.py: anaconda thread management # # Copyright (C) 2012 # Red Hat, Inc. All rights reserved. # # 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 #...
gpl-2.0
asnorkin/sentiment_analysis
site/lib/python2.7/site-packages/requests/packages/chardet/mbcsgroupprober.py
343
2012
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
guschmue/tensorflow
tensorflow/python/training/tensorboard_logging_test.py
132
4456
# 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...
apache-2.0
FlorianLudwig/odoo
addons/product_expiry/__openerp__.py
260
1788
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
kikocorreoso/brython
www/src/Lib/test/test_concurrent_futures.py
2
46193
import test.support # Skip tests if _multiprocessing wasn't built. test.support.import_module('_multiprocessing') # Skip tests if sem_open implementation is broken. test.support.import_module('multiprocessing.synchronize') from test.support.script_helper import assert_python_ok import contextlib import itertools imp...
bsd-3-clause
bitesofcode/projexui
projexui/xwidgetvalue.py
2
7674
#!/usr/bin/python """ Defines methods to abstract the getter/setter process for all widgets. """ # define authorship information __authors__ = ['Eric Hulser'] __author__ = ','.join(__authors__) __credits__ = [] __copyright__ = 'Copyright (c) 2011, Projex Software' __license__ ...
lgpl-3.0
mikewiebe-ansible/ansible
lib/ansible/modules/cloud/atomic/atomic_container.py
52
6558
#!/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.1', ...
gpl-3.0
pong3489/TEST_Mission
Lib/site-packages/numpy/lib/tests/test_arrayterator.py
81
1389
from operator import mul import numpy as np from numpy.random import randint from numpy.lib import Arrayterator import sys if sys.version_info[0] >= 3: from functools import reduce def test(): np.random.seed(np.arange(10)) # Create a random array ndims = randint(5)+1 shape = tuple(randint(10)+1 ...
gpl-3.0
ohanar/PolyBoRi
pyroot/polybori/intersect.py
1
1391
# # intersect.py # PolyBoRi # # Created by Michael Brickenstein on 2008-09-24. # Copyright 2008 The PolyBoRi Team # from polybori.gbcore import groebner_basis from polybori.statistics import used_vars_set from itertools import chain def intersect(i, j, **gb_opts): """ This functions intersects two ideals...
gpl-2.0
0x90sled/catapult
dashboard/dashboard/models/sheriff.py
7
3314
# Copyright 2015 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. """The database model Sheriff, for sheriff rotations.""" import re import urlparse from google.appengine.ext import ndb from dashboard.models import inter...
bsd-3-clause
mdaniel/intellij-community
python/helpers/py2only/docutils/parsers/rst/languages/__init__.py
170
1085
# $Id: __init__.py 7648 2013-04-18 07:36:22Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # Internationalization details are documented in # <http://docutils.sf.net/docs/howto/i18n.html>. """ This package contains modules for language-dependent fe...
apache-2.0
mattseymour/django
tests/forms_tests/tests/test_validators.py
111
2210
import re from unittest import TestCase from django import forms from django.core import validators from django.core.exceptions import ValidationError class TestFieldWithValidators(TestCase): def test_all_errors_get_reported(self): class UserForm(forms.Form): full_name = forms.CharField( ...
bsd-3-clause
saurabh6790/medapp
portal/templates/pages/profile.py
30
1218
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes import _ from webnotes.utils import cstr no_cache = True no_sitemap = True def get_context(): from selling.utils.car...
agpl-3.0
bunnyitvn/webptn
build/lib.linux-i686-2.7/django/utils/itercompat.py
99
1466
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import collections import itertools import sys import warnings def is_iterable(x): "A implementation independent...
bsd-3-clause
zhoulingjun/django
django/db/backends/mysql/features.py
274
2651
from django.db.backends.base.features import BaseDatabaseFeatures from django.utils.functional import cached_property from .base import Database try: import pytz except ImportError: pytz = None class DatabaseFeatures(BaseDatabaseFeatures): empty_fetchmany_value = () update_can_self_select = False ...
bsd-3-clause
philippj/python-burningseries
yowsup/layers/axolotl/protocolentities/notification_encrypt.py
48
1181
from yowsup.layers.protocol_notifications.protocolentities import NotificationProtocolEntity from yowsup.structs import ProtocolTreeNode class EncryptNotification(NotificationProtocolEntity): """ <notification t="1419824928" id="2451228097" from="s.whatsapp.net" type="encrypt"> <count value="9"> ...
gpl-2.0
Lujeni/ansible
contrib/inventory/packet_net.py
34
18429
#!/usr/bin/env python ''' Packet.net external inventory script ================================= Generates inventory that Ansible can understand by making API request to Packet.net using the Packet library. NOTE: This script assumes Ansible is being executed where the environment variable needed for Packet API Token...
gpl-3.0
ArgonToken/ArgonToken
contrib/testgen/gen_base58_test_vectors.py
44
4344
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
mit
thstack/ashinamo
ashinamo/lib/function_based/net.py
3
5660
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: PythonPie <contact@pythonpie.com> # Copyright (c) 2015 - THSTACK <contact@thstack.com> """ »ñÈ¡ÍøÂçÊý¾Ý£¬´Ó/proc/net/dev Îļþ """ """ @Site: www.pythonpie.com @Date: 2015-05-23 @Version: v1.2 @Note: ÐèÒªÒ»¸ö»º´æÎļþ /tmp/proc_net_dev À´±£´æÉÏÒ...
apache-2.0
kustomzone/Rusthon
pythonjs/lib/python2.7/encodings/aliases.py
418
14848
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
bsd-3-clause
CiscoSystems/horizon
openstack_dashboard/dashboards/admin/volumes/volume_types/tables.py
36
8024
# 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...
apache-2.0
denys-duchier/Scolar
ZScoDoc.py
1
35299
# -*- mode: python -*- # -*- coding: iso8859-15 -*- ############################################################################## # # Gestion scolarite IUT # # Copyright (c) 2001 - 2013 Emmanuel Viennet. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the ter...
gpl-2.0
sajao/CrisisLex
src-create/build.py
1
9212
# CrisisLex # Author: Alexandra Olteanu # Check LICENSE for details about copyright. #TO-DO: further testing and code cleaning will be done import nltk import math import os import glob import networkx as nx from optparse import OptionParser from nltk.stem.porter import PorterStemmer import read import config import...
mit
ryangallen/django
django/contrib/gis/geos/prototypes/__init__.py
319
1221
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ from django.contrib.gis.geos.prototypes.coordseq import ( # NOQA create_cs, cs_clone, cs_getdims, cs_getordinate, cs_getsize, cs_getx, cs_gety, cs_...
bsd-3-clause
gbirke/scrapy
scrapy/commands/deploy.py
16
8807
from __future__ import print_function import sys import os import glob import tempfile import shutil import time import urllib2 import netrc import json from six.moves.urllib.parse import urlparse, urljoin from subprocess import Popen, PIPE, check_call from w3lib.form import encode_multipart from scrapy.command impor...
bsd-3-clause
Kriechi/mitmproxy
test/mitmproxy/addons/test_dumper.py
1
8019
import io import shutil from unittest import mock import pytest from mitmproxy import exceptions from mitmproxy.addons import dumper from mitmproxy.http import Headers from mitmproxy.test import taddons from mitmproxy.test import tflow from mitmproxy.test import tutils def test_configure(): d = dumper.Dumper() ...
mit
newerthcom/savagerebirth
libs/python-2.72/Mac/Demo/mlte/mlted.py
39
11096
# A minimal text editor using MLTE. Based on wed.py. # # To be done: # - Functionality: find, etc. from Menu import DrawMenuBar from FrameWork import * from Carbon import Win from Carbon import Ctl from Carbon import Qd from Carbon import Res from Carbon import Scrap import os from Carbon import MacTextEditor from Car...
gpl-2.0
ruud-v-a/rhythmbox
plugins/lyrics/lyrics.py
2
13937
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- # # Copyright (C) 2006 Jonathan Matthew # Copyright (C) 2007 James Livingston # Copyright (C) 2007 Sirio Bolaños Puchet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-2.0
AMObox/teammaniac
plugin.video.specto/resources/lib/sources/primewire_mv_tv.py
13
8184
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 3 of the License, or (at your option) any l...
gpl-2.0
panpap/LoadBalanced_zk
contrib/zkpython/src/test/close_deadlock_test.py
164
1574
#!/usr/bin/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 # "Lic...
apache-2.0
dayongxie/mod-pbxproj
pbxproj/pbxextensions/ProjectGroups.py
2
6229
from pbxproj.pbxsections import * class ProjectGroups: """ This class provides separation of concerns, this class contains all methods related to groups manipulations. This class should not be instantiated on its own """ def __init__(self): raise EnvironmentError('This class cannot be ins...
bsd-3-clause
relet/phenny-games
modules/taboo.py
1
8756
#!/usr/bin/env python """a taboo extension for phenny (c)opyleft 2008-2009 Thomas Hirsch Licence: GPL""" import bz2, random, time, yaml, re from operator import itemgetter from math import floor dico = {} DEFINE_NONE = None DEFINE_DEFINE = 1 #status codes for the define game DEFINE_SELECT = 2 commonwords = [] #co...
mit
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.0/Lib/plat-freebsd2/TERMIOS.py
8
3635
# Generated by h2py from /usr/include/termios.h VEOF = 0 VEOL = 1 VEOL2 = 2 VERASE = 3 VWERASE = 4 VKILL = 5 VREPRINT = 6 VINTR = 8 VQUIT = 9 VSUSP = 10 VDSUSP = 11 VSTART = 12 VSTOP = 13 VLNEXT = 14 VDISCARD = 15 VMIN = 16 VTIME = 17 VSTATUS = 18 NCCS = 20 _POSIX_VDISABLE = 0xff IGNBRK = 0x00000001 BRKINT = 0x00000002...
mit
jakubfindura/vnos-nfc
nfc-server/RPLCD/compat.py
2
1269
# -*- coding: utf-8 -*- """ Copyright (C) 2013-2016 Danilo Bargen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,...
mit
Pafcholini/Nadia-kernel-N7100XXUFNI1_SWA_KK_Opensource_Update1
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
priyaganti/rockstor-core
src/rockstor/storageadmin/views/pool_balance.py
1
4945
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
gpl-3.0
vineodd/PIMSim
GEM5Simulation/gem5/src/arch/x86/isa/insts/simd64/integer/data_transfer/move_non_temporal.py
88
2310
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
gpl-3.0
mcarton/thefuck
thefuck/rules/whois.py
9
1290
# -*- encoding: utf-8 -*- from six.moves.urllib.parse import urlparse from thefuck.utils import for_app @for_app('whois', at_least=1) def match(command): """ What the `whois` command returns depends on the 'Whois server' it contacted and is not consistent through different servers. But there can be only t...
mit
extremewaysback/django
django/db/backends/oracle/utils.py
539
1252
import datetime from django.utils.encoding import force_bytes, force_text from .base import Database # Check whether cx_Oracle was compiled with the WITH_UNICODE option if cx_Oracle is pre-5.1. This will # also be True for cx_Oracle 5.1 and in Python 3.0. See #19606 if int(Database.version.split('.', 1)[0]) >= 5 and...
bsd-3-clause
xzzy/statdev
approvals/migrations/0001_initial.py
1
3974
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-08-06 02:49 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
apache-2.0
jay3sh/vispy
vispy/util/svg/transform.py
21
6939
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- import re import ma...
bsd-3-clause
waseem18/bedrock
vendor-local/lib/python/south/management/commands/schemamigration.py
94
10490
""" Startmigration command, version 2. """ from __future__ import print_function import sys import os import re import string import random import inspect from optparse import make_option try: set except NameError: from sets import Set as set from django.core.management.base import BaseCommand from django.c...
mpl-2.0
mydongistiny/external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/layout_tests/models/test_results_unittest.py
62
2287
# Copyright (C) 2010 Google Inc. 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 list of conditions and the ...
bsd-3-clause
goir/graphite-web
webapp/tests/test_storage.py
34
1383
import logging from graphite.storage import Store from django.conf import settings from django.test import TestCase # Silence logging during tests LOGGER = logging.getLogger() # logging.NullHandler is a python 2.7ism if hasattr(logging, "NullHandler"): LOGGER.addHandler(logging.NullHandler()) class StorageTes...
apache-2.0
jasonzio/azure-linux-extensions
VMEncryption/main/ExtensionParameter.py
4
10450
#!/usr/bin/env python # # VMEncryption extension # # Copyright 2015 Microsoft 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 # ...
apache-2.0
rosswhitfield/mantid
scripts/Calibration/tube_calib.py
3
30485
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ ...
gpl-3.0
yinsu/grpc
src/python/grpcio/grpc/framework/common/__init__.py
1496
1530
# Copyright 2015, Google Inc. # 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 list of conditions and the f...
bsd-3-clause
JohnHowland/kivy
examples/shader/plasma.py
16
2604
''' Plasma Shader ============= This shader example have been taken from http://www.iquilezles.org/apps/shadertoy/ with some adapation. This might become a Kivy widget when experimentation will be done. ''' from kivy.clock import Clock from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy....
mit
Kagami/kisa
lib/twisted/python/fakepwd.py
19
3024
# -*- test-case-name: twisted.python.test.test_fakepwd -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ L{twisted.python.fakepwd} provides a fake implementation of the L{pwd} API. """ __all__ = ['UserDatabase'] class _UserRecord(object): """ L{_UserRecord} holds the user data...
cc0-1.0
YukinoHayakawa/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/ios/gyptest-archs.py
136
1786
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that device and simulator bundles are built correctly. """ import TestGyp import TestMac import collections import sys if s...
gpl-3.0
pplatek/odoo
openerp/service/common.py
281
1873
# -*- coding: utf-8 -*- import logging import openerp.release import openerp.tools from openerp.tools.translate import _ import security _logger = logging.getLogger(__name__) RPC_VERSION_1 = { 'server_version': openerp.release.version, 'server_version_info': openerp.release.version_info, 's...
agpl-3.0
CospanDesign/nysa-demo-platform
local_install.py
1
3208
#! /usr/bin/python # Copyright (c) 2015 Dave McCoy (dave.mccoy@cospandesign.com) # # Nysa 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, or # any later version. # # Nysa is d...
mit
adambrenecki/django
django/contrib/messages/tests/base.py
4
14219
from unittest import skipIf from django import http from django.conf import settings, global_settings from django.contrib.messages import constants, utils, get_level, set_level from django.contrib.messages.api import MessageFailure from django.contrib.messages.storage import default_storage, base from django.contrib.m...
bsd-3-clause
amarin/oupyc
oupyc/application/__init__.py
1
6562
# -*- coding: utf-8 -*- from threading import RLock from oupyc.application.condition import ConditionGenerator from oupyc.application.generator import GeneratorThread from oupyc.application.processor import ProcessorThread from oupyc.application.router import RouterThread from oupyc.application.transformer import Tran...
gpl-2.0
xbmc/atv2
xbmc/lib/libPython/Python/Lib/plat-irix5/CL_old.py
8
6043
# # cl.h - Compression Library typedefs and prototypes # # 01/07/92 Cleanup by Brian Knittel # 02/18/92 Original Version by Brian Knittel # # # originalFormat parameter values # MAX_NUMBER_OF_ORIGINAL_FORMATS = 32 # Audio MONO = 0 STEREO_INTERLEAVED = 1 # Video # YUV is defined to be the same thing as YCrC...
gpl-2.0
martinbede/second-sight
tensorflow/g3doc/how_tos/adding_an_op/zero_out_1_test.py
12
1429
# Copyright 2015 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 a...
apache-2.0
bclau/nova
nova/tests/test_objectstore.py
4
4930
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
to266/hyperspy
hyperspy/drawing/widget.py
2
36785
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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, or # (at...
gpl-3.0
gitchomik/coreclr
src/pal/automation/automation.py
154
1613
import logging as log import sys import getopt import os import subprocess import shutil import compile import tests import util target = "" arch = "" platform = "" workspace = "" fullbuilddirpath = "" cleanUp = True def ParseArgs(argv): global target global platform global arch global cleanUp re...
mit
tzewangdorje/SIPserv
Twisted-13.1.0/twisted/runner/procmontap.py
65
2298
# -*- test-case-name: twisted.runner.test.test_procmontap -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Support for creating a service which runs a process monitor. """ from twisted.python import usage from twisted.runner.procmon import ProcessMonitor class Options(usage.Options): ...
gpl-3.0
timonwong/OmniMarkupPreviewer
OmniMarkupLib/Renderers/libs/python3/genshi/tests/output.py
2
21950
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
mit
sndnvaps/xunlei-lixian
lixian_plugins/parsers/kuai.py
14
1624
from lixian_plugins.api import page_parser import urllib import re def generate_lixian_url(info): print info['url'] info = dict(info) info['namehex'] = '0102' info['fid'] = re.search(r'fid=([^&]+)', info['url']).group(1) info['tid'] = re.search(r'tid=([^&]+)', info['url']).group(1) info['internalid'] = '111' ...
mit
xiaom-GitHub/openthread
tools/harness-automation/cases/router_5_2_7.py
16
1876
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
tropp/acq4
acq4/analysis/dataModels/PatchEPhys/PatchEPhys.py
1
32235
# -*- coding: utf-8 -*- import acq4.util.DataManager as DataManager import acq4.util.SequenceRunner as SequenceRunner from collections import OrderedDict import functools from acq4.util.metaarray import * import numpy as np protocolNames = { 'IV Curve': ('cciv.*', 'vciv.*'), 'Photostim Scan': (), 'Photosti...
mit
alephu5/Soundbyte
environment/lib/python3.3/site-packages/numpy/distutils/ccompiler.py
52
22806
from __future__ import division, absolute_import, print_function import re import os import sys import types from copy import copy from distutils.ccompiler import * from distutils import ccompiler from distutils.errors import DistutilsExecError, DistutilsModuleError, \ DistutilsPlatformEr...
gpl-3.0
ljjehl-XHD/android_kernel_htc_msm8960
scripts/build-all.py
1182
9486
#! /usr/bin/env python # Copyright (c) 2009-2011, The Linux Foundation. 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 # ...
gpl-2.0
danthedeckie/streetsign
streetsign_server/logic/feeds_and_posts.py
1
5888
# -*- coding: utf-8 -*- # StreetSign Digital Signage Project # (C) Copyright 2013 Daniel Fairhead # # StreetSign 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, o...
gpl-3.0
Sravan2j/DIGITS
digits/model/job.py
7
1838
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. from digits.job import Job from . import tasks from digits.utils import override # NOTE: Increment this everytime the pickled object changes PICKLE_VERSION = 1 class ModelJob(Job): """ A Job that creates a neural network model """ ...
bsd-3-clause
aitormf/JdeRobot
src/tools/colorTuner_py/QDarkStyleSheet/example/ui/example_pyqt5_ui.py
5
21031
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'example.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow....
gpl-3.0
rsreese/namebench
libnamebench/selectors_test.py
175
3406
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
malexzx/grpc
src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py
9
9811
# Copyright 2016, Google Inc. # 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 list of conditions and the f...
bsd-3-clause
ngsutils/ngsutils
ngsutils/bam/check.py
1
1354
#!/usr/bin/env python ## category Misc ## desc Checks a BAM file for corruption ''' Checks a BAM file for corruption ''' import sys import os import ngsutils.bam def bam_check(fname, quiet=False): if not quiet: sys.stdout.write('%s: ' % fname) sys.stdout.flush() fail = False i = 1 try...
bsd-3-clause
Brainiq7/Ananse
ananse_dl/extractor/nosvideo.py
128
2519
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_request, ) from ..utils import ( ExtractorError, urlencode_postdata, xpath_text, xpath_with_ns, ) _x = lambda p: xpath_with_ns(p, {'xspf': 'http://xspf.org/ns/0...
unlicense
moreati/django-userena
userena/tests/test_commands.py
8
4758
# encoding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.core.management import call_command from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from userena.models import UserenaSignup from userena.managers import ...
bsd-3-clause
ilsawa/p2pool-crypt
nattraverso/pynupnp/upnpxml.py
288
3026
""" This module parse an UPnP device's XML definition in an Object. @author: Raphael Slinckx @copyright: Copyright 2005 @license: LGPL @contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>} @version: 0.1.0 """ __revision__ = "$id" from xml.dom import minidom import logging # Allowed UPnP services to use when ...
gpl-3.0
jmercier/Codebench
threads.py
1
2394
import threading import Queue import traceback from functools import wraps class Worker(threading.Thread): stopevent = False def __init__(self, *args, **kw): threading.Thread.__init__(self, *args, **kw) self.q = Queue.Queue() self.start() def run(self): o = self.q.get() while not self.stopevent: fct, ...
mit
nhenezi/kuma
vendor/packages/translate-toolkit/translate/tools/poconflicts.py
7
8622
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2005-2007 Zuza Software Foundation # # This file is part of translate. # # translate 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...
mpl-2.0
alxgu/ansible-modules-extras
cloud/amazon/s3_logging.py
65
5644
#!/usr/bin/python # # This is a 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, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
gpl-3.0
danielharbor/openerp
openerp/addons/base/tests/test_mail.py
322
24683
#!/usr/bin/env python # -*- coding: utf-8 -*- # This test can be run stand-alone with something like: # > PYTHONPATH=. python2 openerp/tests/test_misc.py ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP...
agpl-3.0
iamgreaser/pycubed
feature_server/scripts/tdm.py
7
3026
""" Team Deathmatch game mode. Maintainer: Triplefox """ from pyspades.constants import * import commands def score(connection): return connection.protocol.get_kill_count() commands.add(score) def apply_script(protocol, connection, config): class TDMConnection(connection): def on_...
gpl-3.0
Open-I-Beam/swift-storlets
Engine/swift/storlet_gateway/storlet_runtime.py
1
24362
'''------------------------------------------------------------------------- Copyright IBM Corp. 2015, 2015 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/...
apache-2.0
WindCanDie/spark
python/pyspark/sql/functions.py
5
133419
# # 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...
apache-2.0
irinabov/debian-pyngus
pyngus/sockets.py
1
4044
# 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. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use thi...
apache-2.0
shakamunyi/tensorflow
tensorflow/examples/how_tos/reading_data/fully_connected_preloaded_var.py
100
6359
# 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...
apache-2.0
sgadpen/pyafipws.web2py-app
languages/zh-tw.py
12
8854
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '%s rows deleted': '已刪除 %s 筆', '%s rows updated': ...
agpl-3.0
ChanderG/numpy
numpy/core/tests/test_indexing.py
13
39934
from __future__ import division, absolute_import, print_function import sys import warnings import functools import numpy as np from numpy.core.multiarray_tests import array_indexing from itertools import product from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_raises, ass...
bsd-3-clause
sparkslabs/kamaelia_
Sketches/MPS/Old/Sugar/silly.py
3
2831
#!/usr/bin/python # -*- coding: utf-8 -*- # # Inspired by Damian Conway's syntax for encoding # Flying Spaghetti Monsters in C++ # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - p...
apache-2.0
philippjfr/bokeh
bokeh/command/subcommands/svg.py
2
3811
''' To generate standalone SVGs for a Bokeh application from a single Python script, pass the script name to ``bokeh svg`` on the command line: .. code-block:: sh bokeh svg app_script.py The generated SVGs will be saved in the current working directory with the name ``app_script.svg``. If there are multiple SVGs...
bsd-3-clause
grahamhayes/designate
designate/dnsutils.py
1
11985
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <endre.karlson@hpe.com> # # 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/lic...
apache-2.0
safchain/contrail-controller
src/dns/scripts/del_virtual_dns_record.py
22
2702
#!/usr/bin/python # #Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import argparse import ConfigParser from provision_dns import DnsProvisioner from requests.exceptions import ConnectionError class DelVirtualDnsRecord(object): def __init__(self, args_str = None): self._args ...
apache-2.0
mayblue9/scikit-learn
sklearn/covariance/empirical_covariance_.py
101
9133
""" Maximum likelihood covariance estimator. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause # avoid division truncation from __future__ import division import warnin...
bsd-3-clause
highweb-project/highweb-webcl-html5spec
tools/metrics/histograms/histogram_ownership.py
37
1438
#!/usr/bin/env python # 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. """A simple tool to go through histograms.xml and print out the owners for histograms. """ import os import sys import xml.etree.Eleme...
bsd-3-clause
stevec7/iointegrity
contrib/mpi/mpi_create_files.py
1
3537
#!/usr/bin/env python import datetime import logging import os import sys from mpi4py import MPI from optparse import OptionParser from iointegrity.iotools import create_random_file, FileMD5 from iointegrity.dbtools import IOIntegrityDB def main(options, args): comm = MPI.COMM_WORLD rank = comm.Get_rank() ...
bsd-3-clause
webounty/mezzanine
mezzanine/conf/admin.py
19
2135
from __future__ import unicode_literals from copy import copy from django.contrib import admin from django.contrib.messages import info from django.http import HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import force_text from mezzanine.core.admin import Ba...
bsd-2-clause
JackDandy/SickGear
lib/guessit/__main__.py
21
6216
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free...
gpl-3.0
meredith-digops/ansible
lib/ansible/module_utils/f5_utils.py
45
10364
# # Copyright 2016 F5 Networks Inc. # # 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, or # (at your option) any later version. # # An...
gpl-3.0
zainabg/NOX
src/nox/lib/packet/arp.py
6
5767
# Copyright 2008 (C) Nicira, Inc. # # This file is part of NOX. # # NOX 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, or # (at your option) any later version. # # NOX is d...
gpl-3.0
ctxis/django-admin-view-permission
tests/tests/helpers.py
1
4472
from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.test import Client, TestCase from model_mommy import mommy from model_mommy.recipe import seq SIMPLE_USERNAME = seq('simple_user_') SUPE...
bsd-2-clause
jforge/linux
tools/perf/scripts/python/sctop.py
1996
2102
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
rayNymous/nupic
tests/integration/nupic/opf/opf_checkpoint_test/experiments/temporal_anomaly/base.py
31
14970
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2012-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
agpl-3.0