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
wmpluto/esp-idf
components/idf_test/integration_test/TestCaseScript/UDPStress/UDPThroughput.py
15
12108
import os import time import random import threading import socket from TCAction import TCActionBase from NativeLog import NativeLog from NativeLog import ThroughputResult from Utility import RSSICalibrator from Utility import MakeFolder LOG_FOLDER = os.path.join("Performance", "Throughput") AP_PROP_KEY = ("ssid",...
apache-2.0
richardotis/scipy
scipy/linalg/tests/test_build.py
78
1776
from __future__ import division, print_function, absolute_import from subprocess import call, PIPE, Popen import sys import re from numpy.testing import TestCase, dec from numpy.compat import asbytes from scipy.linalg import _flapack as flapack # XXX: this is copied from numpy trunk. Can be removed when we will dep...
bsd-3-clause
bitspill/electrum-doged
lib/wallet.py
6
68691
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
gpl-3.0
noba3/KoTos
addons/script.module.universal/lib/universal/_common.py
4
5388
''' universal XBMC module Copyright (C) 2013 the-one @ XUNITYTALK.COM 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 ...
gpl-2.0
iulian787/spack
var/spack/repos/builtin/packages/r-party/package.py
5
1332
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RParty(RPackage): """A computational toolbox for recursive partitioning.""" homepage ...
lgpl-2.1
ioam/topographica
models/stevens.jn13/jn13_figures/lib/rasterplots.py
3
5394
""" Rasterplots Utilities for raster image manipulation (e.g. OR maps) using PIL/Pillow and Numpy. Used for visualizing orientation maps (with and without selectivity), polar FFT spectra and afferent model weight patterns. """ import Image import ImageOps import numpy as np import colorsys rgb_to_hsv = np.vectorize(...
bsd-3-clause
irblsensitivity/irblsensitivity
scripts/translation/firstry.py
1
18562
#-*- coding: utf-8 -*- ''' Created on 2017. 11. 06 Updated on 2017. 11. 06 ''' from __future__ import print_function import os import cgi import re import time import codecs import sys import subprocess import math import dateutil.parser from datetime import datetime from commons import Subjects from x...
apache-2.0
schlueter/ansible
lib/ansible/modules/cloud/amazon/sts_assume_role.py
12
6436
#!/usr/bin/python # 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', 'status': ['stableinterf...
gpl-3.0
lz1988/django-web2015
build/lib/django/contrib/admindocs/urls.py
317
1092
from django.conf.urls import patterns, url from django.contrib.admindocs import views urlpatterns = patterns('', url('^$', views.doc_index, name='django-admindocs-docroot' ), url('^bookmarklets/$', views.bookmarklets, name='django-admindocs-bookmarklets' ), url('^tag...
bsd-2-clause
trhd/meson
mesonbuild/coredata.py
2
19655
# Copyright 2012-2017 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
apache-2.0
bright-sparks/chromium-spacewalk
webkit/tools/layout_tests/PRESUBMIT.py
87
2098
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """test_expectations.txt presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API ...
bsd-3-clause
bobeirasa/virtualenvs
pygeckozabbix/lib/python2.7/site-packages/requests/packages/charade/__init__.py
49
2286
######################## BEGIN LICENSE BLOCK ######################## # This library 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 2.1 of the License, or (at your option) any late...
mit
espadrine/opera
chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/common/read_checksum_from_png.py
207
1877
# Copyright (c) 2011 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
koddas/python-backend
src/test.py
1
1313
#!/usr/bin/env python # -*- coding: utf-8 -*- from unicorns import storage from unicorns.Unicorn import Unicorn storage.setup() unicorns = storage.fetch_unicorns() for unicorn in unicorns: print(str(unicorn.id) + ': ' + unicorn.name) print("") unicorn = storage.fetch_unicorn(3) print(str(unicorn.id) + ': ' + u...
mit
huggingface/pytorch-transformers
src/transformers/utils/versions.py
1
4611
# Copyright 2020 The HuggingFace Team. 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 applicabl...
apache-2.0
shangwuhencc/scikit-learn
examples/applications/face_recognition.py
191
5513
""" =================================================== Faces recognition example using eigenfaces and SVMs =================================================== The dataset used in this example is a preprocessed excerpt of the "Labeled Faces in the Wild", aka LFW_: http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz (2...
bsd-3-clause
StevenBlack/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py
124
3032
# 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 f...
bsd-3-clause
sonnyhu/scikit-learn
sklearn/externals/joblib/disk.py
95
3235
""" Disk management utilities. """ # Authors: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Lars Buitinck # Copyright (c) 2010 Gael Varoquaux # License: BSD Style, 3 clauses. import errno import os import shutil import sys import time def disk_used(path): """ Return the disk usage in a d...
bsd-3-clause
dyoung418/tensorflow
tensorflow/python/kernel_tests/dynamic_partition_op_test.py
97
6138
# 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
wheever/AFProxy
PageFilter.py
1
1740
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re import logging from Exceptions import * from ListFile import parse_line_to_regex, ListFiles from colorama import init, Fore, Back, Style init(autoreset=True) logger = logging.getLogger('__main__') # Class method action() will be passed with the http request o...
mit
adrianmoisey/github3.py
tests/unit/test_repos_repo.py
3
5882
from github3.repos.repo import Repository from .helper import UnitHelper class TestRepository(UnitHelper): described_class = Repository example_data = { "id": 1296269, "owner": { "login": "octocat", "id": 1, "avatar_url": "https://github.com/images/error/oc...
bsd-3-clause
SlimLG2/android_kernel_motorola_msm8992
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
levibostian/myBlanky
googleAppEngine/google/appengine/api/search/expression_parser.py
15
2287
#!/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...
mit
sowe9385/qiime
scripts/estimate_observation_richness.py
15
7487
#!/usr/bin/env python from __future__ import division __author__ = "Jai Ram Rideout" __copyright__ = "Copyright 2013, The QIIME Project" __credits__ = ["Jai Ram Rideout"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Jai Ram Rideout" __email__ = "jai.rideout@gmail.com" from os.path import join from ...
gpl-2.0
Evervolv/android_external_chromium_org
chrome/common/extensions/PRESUBMIT.py
31
6071
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for changes affecting extensions. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about...
bsd-3-clause
DDelon/youtube-dl
youtube_dl/extractor/vimple.py
121
1911
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import int_or_none class SprutoBaseIE(InfoExtractor): def _extract_spruto(self, spruto, video_id): playlist = spruto['playlist'][0] title = playlist['title'] video_id = playlist.get('videoId') or video_...
unlicense
guoyu07/metagoofil
hachoir_core/field/integer.py
73
1848
""" Integer field classes: - UInt8, UInt16, UInt24, UInt32, UInt64: unsigned integer of 8, 16, 32, 64 bits ; - Int8, Int16, Int24, Int32, Int64: signed integer of 8, 16, 32, 64 bits. """ from hachoir_core.field import Bits, FieldError class GenericInteger(Bits): """ Generic integer class used to generate othe...
gpl-2.0
GNOME/orca
test/keystrokes/helpcontent/load_no_sayall.py
3
1232
#!/usr/bin/python """Test of learn mode.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(KeyPressAction(0, None, "KP_Insert")) sequence.append(TypeAction("h")) sequence.append(KeyReleaseAction(0, None, "KP_Insert")) sequence.append(PauseAction(2000)) sequence.append(util...
lgpl-2.1
hehongliang/tensorflow
tensorflow/python/kernel_tests/qr_op_test.py
2
8827
# 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...
apache-2.0
Shyam10/kivy
kivy/gesture.py
50
14632
''' Gesture recognition =================== This class allows you to easily create new gestures and compare them:: from kivy.gesture import Gesture, GestureDatabase # Create a gesture g = Gesture() g.add_stroke(point_list=[(1,1), (3,4), (2,1)]) g.normalize() # Add it to the database gdb ...
mit
Spicyharambe/spni.github.io
opponents/make_images.py
1
6566
import os import os.path import sys import time import PIL.Image setup_string_33 = "33***bc185.500.0.0.1_ga0*0*0*0*0*0*0*0*0#/]ua1.0.0.0_ub_uc7.0.30_ud7.0" setup_string_36 = "36***bc185.500.0.0.1_ga0*0*0*0*0*0*0*0*0#/]a00_b00_c00_d00_w00_x00_y00_z00_ua1.0.0.0_ub_u0_v0_uc7.0.30_ud7.0" #create error if not exist (not ...
mit
xbianonpi/Sick-Beard-TPB
lib/html5lib/treewalkers/dom.py
97
1297
from xml.dom import Node import gettext _ = gettext.gettext import _base from html5lib.constants import voidElements class TreeWalker(_base.NonRecursiveTreeWalker): def getNodeDetails(self, node): if node.nodeType == Node.DOCUMENT_TYPE_NODE: return _base.DOCTYPE, node.name, node.publicId, nod...
gpl-3.0
lixt/lily2-gem5
src/arch/x86/isa/insts/simd128/floating_point/data_reordering/__init__.py
91
2324
# 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...
bsd-3-clause
sirpercival/kivy
examples/android/takepicture/main.py
14
2229
''' Take picture ============ .. author:: Mathieu Virbel <mat@kivy.org> Little example to demonstrate how to start an Intent, and get the result. When you use the Android.startActivityForResult(), the result will be dispatched into onActivityResult. You can catch the event with the android.activity API from python-fo...
mit
2ndQuadrant/ansible
test/units/modules/network/enos/test_enos_config.py
45
5170
# # (c) 2016 Red Hat 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. # # Ansible is d...
gpl-3.0
madafoo/cjdns
node_build/dependencies/libuv/build/gyp/test/lib/TestGyp.py
46
50586
# Copyright (c) 2012 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. """ TestGyp.py: a testing framework for GYP integration tests. """ import collections from contextlib import contextmanager import itertools import os import ran...
gpl-3.0
aeklant/scipy
scipy/special/_logsumexp.py
1
7948
import numpy as np from scipy._lib._util import _asarray_validated __all__ = ["logsumexp", "softmax", "log_softmax"] def logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False): """Compute the log of the sum of exponentials of input elements. Parameters ---------- a : array_like I...
bsd-3-clause
dongweiming/flask_reveal
social/backends/twilio.py
1
1310
""" Twilio support """ from re import sub from social.p3 import urlencode from social.backends.base import BaseAuth class TwilioAuth(BaseAuth): name = 'twilio' ID_KEY = 'AccountSid' def get_user_details(self, response): """Return twilio details, Twilio only provides AccountSID as paramet...
bsd-3-clause
shivam1111/odoo
addons/website/tests/test_crawl.py
251
3415
# -*- coding: utf-8 -*- import logging import urlparse import time import lxml.html import openerp import re _logger = logging.getLogger(__name__) class Crawler(openerp.tests.HttpCase): """ Test suite crawling an openerp CMS instance and checking that all internal links lead to a 200 response. If a use...
agpl-3.0
izzygomez/cocoon
crypto/suffix_tree/suffix_tree.py
1
6904
import _suffix_tree def postOrderNodes(node): '''Iterator through all nodes in the sub-tree rooted in node in post-order.''' def dfs(n): c = n.firstChild while c is not None: for m in dfs(c): yield m c = c.next yield n for n in dfs(node):...
mit
ziir/gandi.cli
gandi/cli/tests/fixtures/_hosting.py
1
49432
try: # python3 from xmlrpc.client import DateTime except ImportError: # python2 from xmlrpclib import DateTime def image_list(options): ret = [{'author_id': 248842, 'datacenter_id': 3, 'date_created': DateTime('20130902T15:04:18'), 'date_updated': DateTime('201...
gpl-3.0
blaercom/django-guardian
guardian/templatetags/guardian_tags.py
10
2739
""" ``django-guardian`` template tags. To use in a template just put the following *load* tag inside a template:: {% load guardian_tags %} """ from django import template from guardian.exceptions import NotUserNorGroup from guardian.core import ObjectPermissionChecker from guardian.models import User, Group, Ano...
bsd-2-clause
dqnykamp/sympy
sympy/polys/agca/tests/test_modules.py
121
13526
"""Test modules.py code.""" from sympy.polys.agca.modules import FreeModule, ModuleOrder, FreeModulePolyRing from sympy.polys import CoercionFailed, QQ, lex, grlex, ilex, ZZ from sympy.abc import x, y, z from sympy.utilities.pytest import raises from sympy import S def test_FreeModuleElement(): M = QQ.old_poly_r...
bsd-3-clause
mbr0wn/gnuradio
grc/converter/cheetah_converter.py
5
8212
# Copyright 2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # import collections import re import string delims = {'(': ')', '[': ']', '{': '}', '': ', #\\*:'} identifier_start = '_' + string.ascii_letters + ''.join(delims.keys()) string_delims = '"\...
gpl-3.0
stelligent/ansible-modules-extras
cloud/vmware/vmware_dvswitch.py
47
7303
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
fbossy/SickRage
lib/stevedore/dispatch.py
58
8975
import logging from .enabled import EnabledExtensionManager LOG = logging.getLogger(__name__) class DispatchExtensionManager(EnabledExtensionManager): """Loads all plugins and filters on execution. This is useful for long-running processes that need to pass different inputs to different extensions. ...
gpl-3.0
maciek263/django2
myvenv/Lib/site-packages/django/db/models/deletion.py
83
13766
from collections import OrderedDict from itertools import chain from operator import attrgetter from django.db import IntegrityError, connections, transaction from django.db.models import signals, sql from django.utils import six class ProtectedError(IntegrityError): def __init__(self, msg, protected_objects): ...
mit
Sheeo/pygit2
test/test_diff.py
2
12085
# -*- coding: UTF-8 -*- # # Copyright 2010-2015 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public Li...
gpl-2.0
dbaxa/GitPython
git/refs/remote.py
3
1569
from head import Head from git.util import join_path from gitdb.util import join import os __all__ = ["RemoteReference"] class RemoteReference(Head): """Represents a reference pointing to a remote head.""" _common_path_default = Head._remote_common_path_default @classmethod def iter_i...
bsd-3-clause
morelab/weblabdeusto
server/src/test/unit/weblab/core/test_wsgi_manager.py
3
1543
from __future__ import print_function, unicode_literals import unittest import requests import time from voodoo.configuration import ConfigurationManager import test.unit.configuration as configuration_module from test.util.module_disposer import uses_module from test.util.ports import new as new_port import weblab.c...
bsd-2-clause
bdang2012/taiga-back-casting
taiga/base/utils/signals.py
1
1646
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2015 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
kholidfu/django
tests/from_db_value/tests.py
399
1075
from django.db import connection from django.db.models import Max from django.test import TestCase from .models import Cash, CashModel class FromDBValueTest(TestCase): def setUp(self): CashModel.objects.create(cash='12.50') def test_simple_load(self): instance = CashModel.objects.get() ...
bsd-3-clause
mattclark/osf.io
osf/models/tag.py
28
1187
from django.db import models from .base import BaseModel class TagManager(models.Manager): """Manager that filters out system tags by default. """ def get_queryset(self): return super(TagManager, self).get_queryset().filter(system=False) class Tag(BaseModel): name = models.CharField(db_inde...
apache-2.0
mvcsantos/QGIS
python/plugins/processing/algs/gdal/gdaltindex.py
3
2813
# -*- coding: utf-8 -*- """ *************************************************************************** gdaltindex.py --------------------- Date : February 2015 Copyright : (C) 2015 by Pedro Venancio Email : pedrongvenancio at gmail dot com ****************...
gpl-2.0
hurricup/intellij-community
python/testData/inspections/PyMissingConstructorInspection/py3k.py
83
1072
class A(object): def __init__(self): pass class AA(A): def __init__(self): A.__init__(self) print("Constructor AA was called") class B(A): def <warning descr="Call to __init__ of super class is missed">__init__</warning>(self): print("Constructor B was called") class C(B): def __init__(self):...
apache-2.0
falkolab/titanium_mobile
support/module/module.py
34
13545
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Module Project Create Script # import os, sys, shutil, string, uuid, re, zipfile, glob from string import capitalize from StringIO import StringIO from datetime import date template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) sdk_dir =...
apache-2.0
liuwenf/moose
python/chigger/tests/color/color.py
6
1156
#!/usr/bin/env python #pylint: disable=missing-docstring ################################################################# # DO NOT MODIFY THIS HEADER # # MOOSE - Multiphysics Object Oriented Simulation Environment # # #...
lgpl-2.1
husk00/audiogames
2.1-argentina/src/lib/readgamestart.py
3
1784
# readgamestart.py import GameLogic import socket import OSC import Game import bge def receive_osc(data, port): try: # getting first data value from buffer data, port = GameLogic.socket.recvfrom(1024) # keep trying to get new data until buffer is empty try: trash = da...
gpl-3.0
uwosh/UWOshCommitteeOnCommittees
content/College.py
1
3093
# -*- coding: utf-8 -*- # # File: College.py # # Copyright (c) 2007 by [] # Generator: ArchGenXML Version 1.5.2 # http://plone.org/products/archgenxml # # GNU General Public License (GPL) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public L...
gpl-2.0
codeforamerica/epa_python
setup.py
1
6118
#!/usr/bin/env python """ Author: Zach Williams, <zach AT codeforamerica DOT org> Copyright (c) 2011, Code for America. 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 mu...
bsd-3-clause
d-mittal/pystruct
pystruct/models/latent_graph_crf.py
3
8415
import numbers import numpy as np from scipy import sparse from sklearn.cluster import KMeans from . import GraphCRF from ..inference import inference_dispatch def kmeans_init(X, Y, all_edges, n_labels, n_states_per_label, symmetric=True): all_feats = [] # iterate over samples for x, y,...
bsd-2-clause
40223246/0622cdb-Final-TEST2-1
static/Brython3.1.1-20150328-091302/Lib/xml/sax/_exceptions.py
625
4885
"""Different kinds of SAX Exceptions""" #in brython the 4 lines below causes an $globals['Exception'] error #import sys #if sys.platform[:4] == "java": # from java.lang import Exception #del sys # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can con...
gpl-3.0
progrium/growl
external_dependencies/simple-mailer.py
1
2584
#!/usr/bin/env python # Usage: simple-mailer [--[no-]tls] username[:password]@server[:port] from to subject import optparse parser = optparse.OptionParser(usage='%prog [options] username[:password]@server[:port] from to subject', description='Sends an email message, reading the password (unless specified on the comma...
bsd-3-clause
benoitbryon/xal
setup.py
1
2352
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python packaging.""" import os import sys from setuptools import setup from setuptools.command.test import test as TestCommand class Tox(TestCommand): """Test command that runs tox.""" def finalize_options(self): TestCommand.finalize_options(self) ...
bsd-3-clause
vipul-sharma20/oh-mainline
vendor/packages/twisted/twisted/mail/pop3.py
17
33601
# -*- test-case-name: twisted.mail.test.test_pop3 -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Post-office Protocol version 3 @author: Glyph Lefkowitz @author: Jp Calderone """ import string import base64 import binascii import warnings from zope.interface import implements, In...
agpl-3.0
supertanglang/shadowsocks
shadowsocks/eventloop.py
51
7513
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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 requi...
apache-2.0
svanschalkwyk/datafari
debian7/elk/kibana/node/lib/node_modules/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
270
8338
#!/usr/bin/env python # Copyright (c) 2012 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. """Argument-less script to select what to run on the buildbots.""" import filecmp import os import shutil import subprocess import sys i...
apache-2.0
mbaijal/incubator-mxnet
example/image-classification/train_imagenet.py
4
2563
# 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 u...
apache-2.0
igabriel85/dmon-adp
adpengine/multiprocRun.py
1
1604
import multiprocessing import time def test(times, processID): print "Starting engine Point process %s" % processID time.sleep(times) print "Exit process %s" % processID class AdpPointProcess(): def __init__(self, engine, processID): self.processID = processID self.engine = engine ...
apache-2.0
40223144/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/browser/indexed_db.py
632
3008
class EventListener: def __init__(self, events=[]): self._events=events def append(self, event): self._events.append(event) def fire(self, e): for _event in self._events: _event(e) class IndexedDB: def __init__(self): if not __BRYTHON__.has_indexedDB: raise NotImple...
gpl-3.0
40223225/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/shutil.py
720
39101
"""Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat from os.path import abspath import fnmatch import collections import errno import tarfile try: import bz2 del bz2 _...
gpl-3.0
mcardillo55/django
tests/urlpatterns_reverse/erroneous_urls.py
199
1350
import warnings from django.conf.urls import url from django.utils.deprecation import RemovedInDjango110Warning from . import views # Test deprecated behavior of passing strings as view to url(). # Some of these can be removed in Django 1.10 as they aren't convertable to # callables. with warnings.catch_warnings(): ...
bsd-3-clause
oleg-alexandrov/StereoPipeline
src/asp/Python/asp_string_utils.py
2
4239
#!/usr/bin/env python # -*- coding: utf-8 -*- # __BEGIN_LICENSE__ # Copyright (c) 2009-2013, United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. # # The NGT platform is licensed under the Apache License, Version 2.0 (the # "Lic...
apache-2.0
apcrumbleton/google-python-exercises
termux/basic/solution/list1.py
209
3656
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic list exercises # Fill in the code for the functions below. main() is already set ...
apache-2.0
v-iam/azure-sdk-for-python
azure-batch/azure/batch/models/pool_patch_options.py
3
3076
# 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 ...
mit
xinjiguaike/edx-platform
common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py
114
1475
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CourseMode.currency' db.add_column('course_modes_coursemode', 'currency', ...
agpl-3.0
AlexDoul/PyQt4
examples/itemviews/simpledommodel.py
20
7108
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
timpalpant/calibre
src/calibre/srv/sendfile.py
14
4930
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>' import os, ctypes, errno, socket from io import DEFAULT_BUFFER_SIZE from sel...
gpl-3.0
medicodesk/android-quill
jni/libhpdf-2.3.0RC2/if/python/demo/text_demo.py
32
10572
### ## * << Haru Free PDF Library 2.0.0 >> -- text_demo.c ## * ## * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that the a...
gpl-3.0
sdague/home-assistant
homeassistant/components/clicksend_tts/notify.py
21
3260
"""clicksend_tts platform for notify component.""" import json import logging from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService from homeassistant.const import ( CONF_API_KEY, CONF_RECIPIENT, ...
apache-2.0
AdaptiveApplications/carnegie
tarc_bus_locator_client/geopy-0.95.1/build/lib/geopy/geocoders/openmapquest.py
14
2474
try: import json except ImportError: try: import simplejson as json except ImportError: from django.utils import simplejson as json from urllib import urlencode from urllib2 import urlopen from geopy.geocoders.base import Geocoder from geopy.util import logger, decode_page, join_filter cl...
mit
kubeflow/kfp-tekton
backend/api/python_http_client/test/test_api_report_run_metrics_request.py
2
1852
# coding: utf-8 """ Kubeflow Pipelines API This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import ...
apache-2.0
takeshineshiro/neutron
neutron/tests/functional/agent/linux/helpers.py
26
1408
# Copyright (c) 2014 Red Hat, 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 require...
apache-2.0
jmagnusson/pip
pip/_vendor/html5lib/treebuilders/dom.py
920
8469
from __future__ import absolute_import, division, unicode_literals from xml.dom import minidom, Node import weakref from . import _base from .. import constants from ..constants import namespaces from ..utils import moduleFactoryFactory def getDomBuilder(DomImplementation): Dom = DomImplementation class A...
mit
asreimer/davitpy_asr
gme/base/fillGmedb.py
3
2982
# Copyright (C) 2012 VT SuperDARN Lab # Full license can be found in LICENSE.txt # # 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 la...
gpl-3.0
Edraak/edraak-platform
openedx/core/djangoapps/video_config/forms.py
14
1326
""" Defines a form for providing validation of HLS Playback course-specific configuration. """ import logging from django import forms from opaque_keys import InvalidKeyError from opaque_keys.edx.locator import CourseLocator from openedx.core.djangoapps.video_config.models import ( CourseHLSPlaybackEnabledFlag, ...
agpl-3.0
ABoothInTheWild/baseball-research
NBA/NBA_17/nba2017SeasonResults.py
1
2218
# -*- coding: utf-8 -*- """ Created on Fri Sep 07 14:28:16 2018 @author: Alexander """ # -*- coding: utf-8 -*- """ Created on Fri Jul 27 15:01:09 2018 @author: abooth """ from xmlstats import xmlstats import numpy as np import pandas as pd access_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
gpl-3.0
bgxavier/nova
nova/tests/unit/api/openstack/compute/contrib/test_attach_interfaces.py
33
20522
# Copyright 2012 SINA 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 app...
apache-2.0
dhananjay92/servo
tests/wpt/harness/wptrunner/hosts.py
196
3292
# 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/. from __future__ import unicode_literals class HostsLine(object): def __init__(self, ip_address, canonical_hostname...
mpl-2.0
mrinalabrol/magik
env/lib/python3.4/site-packages/werkzeug/wrappers.py
147
76919
# -*- coding: utf-8 -*- """ werkzeug.wrappers ~~~~~~~~~~~~~~~~~ The wrappers are simple request and response objects which you can subclass to do whatever you want them to do. The request object contains the information transmitted by the client (webbrowser) and the response object contains al...
gpl-3.0
googleapis/python-aiplatform
google/cloud/aiplatform_v1/services/job_service/transports/grpc_asyncio.py
1
39034
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
KyleJamesWalker/ansible
lib/ansible/plugins/connection/accelerate.py
36
13975
# (c) 2012, 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, or # (at your option) any lat...
gpl-3.0
wgcv/SWW-Crashphone
lib/python2.7/site-packages/django/contrib/gis/gdal/geomtype.py
90
2983
from django.contrib.gis.gdal.error import OGRException from django.utils import six class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0: 'Unknown', 1: 'Point', ...
apache-2.0
tylertian/Openstack
openstack F/glance/glance/api/common.py
1
2790
# Copyright 2012 OpenStack LLC. # 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...
apache-2.0
tkaitchuck/nupic
examples/opf/experiments/multistep/simple_3_sp/description.py
2
1715
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditions apply: # # This pro...
gpl-3.0
perzizzle/ansible-modules-extras
cloud/webfaction/webfaction_mailbox.py
51
4275
#!/usr/bin/python # # Create webfaction mailbox using Ansible and the Webfaction API # # ------------------------------------------ # (c) Quentin Stafford-Fraser and Andy Baker 2015 # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU Gener...
gpl-3.0
gdi2290/django
django/contrib/gis/tests/geoapp/test_sitemaps.py
28
3390
from __future__ import unicode_literals from io import BytesIO from xml.dom import minidom import warnings import zipfile from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_setting...
bsd-3-clause
azaghal/ansible
test/lib/ansible_test/_internal/payload.py
21
5772
"""Payload management for sending Ansible files and test content to other systems (VMs, containers).""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import atexit import os import stat import tarfile import tempfile import time from . import types as t from .config import (...
gpl-3.0
apir8181/DLINE
Applications/GE/example/python_script/most_popular_flickr.py
1
1164
import sys from collections import defaultdict if __name__ == "__main__": in_path = sys.argv[1] out_path = sys.argv[2] group_count = defaultdict(int) with open(in_path) as in_file: for line in in_file: args = line.strip().split() for arg in args[1:]: gro...
mit
nju520/django
tests/template_tests/filter_tests/test_linebreaks.py
310
1920
from django.template.defaultfilters import linebreaks_filter from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class LinebreaksTests(SimpleTestCase): """ The contents in "linebreaks" are escaped according to the current autoescape setting. ...
bsd-3-clause