repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
linkedin/Zopkio
examples/zookeeper/zookeeper_example.py
4
1235
# Copyright 2015 LinkedIn Corp. # # 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....
apache-2.0
-6,807,697,375,829,529,000
43.107143
98
0.732794
false
nwokeo/supysonic
venv/lib/python2.7/site-packages/psycopg2/errorcodes.py
7
13246
"""Error codes for PostgresSQL This module contains symbolic names for all PostgreSQL error codes. """ # psycopg2/errorcodes.py - PostgreSQL error codes # # Copyright (C) 2006-2010 Johan Dahlin <jdahlin@async.com.br> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU ...
agpl-3.0
-9,134,851,522,338,565,000
30.538095
73
0.75185
false
samuelhavron/heroku-buildpack-python
Python-3.4.3/Lib/test/test_itertools.py
8
89289
import unittest from test import support from itertools import * import weakref from decimal import Decimal from fractions import Fraction import sys import operator import random import copy import pickle from functools import reduce import sys import struct maxsize = support.MAX_Py_ssize_t minsize = -maxsize-1 def l...
mit
-6,215,571,929,767,405,000
39.67836
124
0.537625
false
elmgone/coligui
vendor.etc/json-to-elm/generate.py
5
3247
from __future__ import print_function, unicode_literals import json import sys from type_alias import create_type_alias, find_type_aliases, find_union_types from decoder import create_decoder, create_encoder, create_union_type_decoder, create_union_type_encoder from helpers import * def test(): testJson = """...
apache-2.0
-5,751,564,635,275,268,000
23.78626
104
0.615029
false
chirilo/kuma
vendor/packages/setuptools/command/test.py
363
6471
from distutils.errors import DistutilsOptionError from unittest import TestLoader import unittest import sys from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, add_activation_listener, require, EntryPoint...
mpl-2.0
-689,609,350,898,940,000
35.977143
79
0.5673
false
uchida/selenium
py/selenium/webdriver/ie/service.py
8
2235
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-3,066,655,136,672,969,000
43.7
216
0.667114
false
Adjective-Object/ligament
ligament/__init__.py
1
2250
""" A python task automator, with a focus on task composition """ import ligament import helpers import buildtarget import buildcontext import buildcontextfseventhandler import exceptions import sys import getopt from helpers import pout def print_helptext(): """ print helptext for command-line interface """ ...
apache-2.0
2,881,781,953,091,548,700
27.846154
79
0.569778
false
edx/edx-load-tests
loadtests/ecommerce_deadlock/authentication.py
1
2577
import uuid from locust import TaskSet from helpers import settings LMS_HOST = settings.data['LMS_HOST'].rstrip('\/') class AuthenticationMixin(TaskSet): """Mixin that gives tasks different authentication methods.""" def __init__(self, parent): super().__init__(parent) self._setup_basic_au...
apache-2.0
4,022,099,700,658,425,000
32.467532
85
0.578968
false
henriquejensen/marolo
controllers/default.py
2
3682
# -*- coding: utf-8 -*- def index(): pagina = request.args(0, cast=int, default=1) itens_por_pagina = 5 total = db(db.noticias).count() paginas = total / itens_por_pagina if total % itens_por_pagina: paginas += 1 limites = (itens_por_pagina * (pagina - 1), (itens_por_pagina * pagina)) ...
mit
-7,240,190,339,175,269,000
26.654135
77
0.587819
false
CloudWareChile/OpenChile
openerp/addons/account_analytic_plans/account_analytic_plans.py
6
24178
# -*- 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...
agpl-3.0
-7,756,863,172,319,786,000
47.259481
228
0.587766
false
jonathanverner/brython
www/src/Lib/test/test_imp.py
23
19284
import imp import importlib import os import os.path import shutil import sys from test import support from test.test_importlib import util import unittest import warnings class LockTests(unittest.TestCase): """Very basic test of import lock functions.""" def verify_lock_state(self, expected): self.a...
bsd-3-clause
6,684,130,573,024,004,000
39.175
116
0.56928
false
Distrotech/qtcreator
tests/system/tools/findUnusedObjects.py
6
5941
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this fil...
lgpl-2.1
3,091,050,271,457,245,700
38.085526
89
0.640296
false
pescobar/easybuild-framework
easybuild/toolchains/mpi/__init__.py
2
1244
## # Copyright 2012-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
5,614,074,828,948,896,000
39.129032
96
0.73955
false
mengqiy/kubernetes
cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py
24
55854
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-7,516,812,032,296,352,000
36.236
117
0.652147
false
savoirfairelinux/odoo
addons/hr_expense/hr_expense.py
22
25312
# -*- 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...
agpl-3.0
-5,828,210,009,029,769,000
51.514523
209
0.578935
false
geometalab/Vector-Tiles-Reader-QGIS-Plugin
ext-libs/google/protobuf/internal/text_encoding_test.py
126
2903
#! /usr/bin/env python # # 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 ...
gpl-2.0
-7,788,057,653,604,887,000
39.319444
72
0.703066
false
emilio/servo
tests/wpt/web-platform-tests/tools/third_party/html5lib/html5lib/tests/test_sanitizer.py
29
5540
from __future__ import absolute_import, division, unicode_literals from html5lib import constants, parseFragment, serialize from html5lib.filters import sanitizer def runSanitizerTest(_, expected, input): parsed = parseFragment(expected) expected = serialize(parsed, omit_optional_tag...
mpl-2.0
-8,783,747,234,179,834,000
42.622047
105
0.561913
false
benoitsteiner/tensorflow-xsmm
tensorflow/python/profiler/pprof_profiler_test.py
70
5174
# 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...
apache-2.0
9,124,647,373,301,902,000
30.54878
80
0.671821
false
odootr/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
384
11372
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
-783,279,875,261,735,600
44.126984
193
0.581428
false
ozzyjohnson/zaproxy
python/api/src/zapv2/users.py
15
2918
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2015 the ZAP 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...
apache-2.0
-1,770,106,822,242,331,600
53.037037
239
0.705963
false
ajnirp/servo
tests/wpt/web-platform-tests/tools/pytest/testing/test_unittest.py
171
22302
from _pytest.main import EXIT_NOTESTSCOLLECTED import pytest def test_simple_unittest(testdir): testpath = testdir.makepyfile(""" import unittest class MyTestCase(unittest.TestCase): def testpassing(self): self.assertEquals('foo', 'foo') def test_failing(self...
mpl-2.0
-667,679,839,511,862,700
29.260516
71
0.533002
false
blahgeek/xiami_downloader
lib/track.py
1
2132
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by i@BlahGeek.com at 2014-04-18 import os from .decrypt import decrypt from .http import download from mutagen.easyid3 import EasyID3 from mutagen.id3 import ID3, APIC class Track(object): ''' A song ''' def __init__(self, tag): ''' @tag: a Beau...
mit
-6,433,817,167,316,788,000
35.758621
82
0.583959
false
cryptickp/libcloud
libcloud/test/compute/test_types.py
26
1969
from unittest import TestCase from libcloud.compute.types import Provider, NodeState, StorageVolumeState, \ VolumeSnapshotState, Type class TestType(Type): INUSE = "inuse" class TestTestType(TestCase): model = TestType attribute = TestType.INUSE def test_provider_tostring(self): self.a...
apache-2.0
4,908,080,004,619,732,000
27.128571
78
0.703911
false
lmprice/ansible
lib/ansible/modules/web_infrastructure/htpasswd.py
48
8684
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Nimbis Services, Inc. # 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
-5,869,652,246,539,103,000
31.04428
110
0.616191
false
nephila/cmsplugin-filer
cmsplugin_filer_teaser/south_migrations/0002_add_teaser_style_choice.py
11
14099
from south.db import db from django.db import models from cmsplugin_filer_teaser.models import * from cmsplugin_filer_utils.migration import rename_tables_new_to_old class Migration: cms_plugin_table_mapping = ( # (old_name, new_name), ('cmsplugin_filerteaser', 'cmsplugin_filer_teaser_filertease...
bsd-3-clause
-5,500,905,532,602,201,000
83.42515
189
0.556635
false
EKiefer/edge-starter
py34env/Lib/site-packages/pip/utils/outdated.py
513
5455
from __future__ import absolute_import import datetime import json import logging import os.path import sys from pip._vendor import lockfile from pip._vendor.packaging import version as packaging_version from pip.compat import total_seconds, WINDOWS from pip.models import PyPI from pip.locations import USER_CACHE_DI...
mit
1,773,374,036,934,296,800
32.67284
78
0.580202
false
tyndare/osmose-backend
analysers/analyser_merge_bicycle_rental_FR_bm.py
1
3368
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2014 ## ## ...
gpl-3.0
-5,211,930,841,178,215,000
62.490566
176
0.455572
false
fabioz/Pydev
plugins/org.python.pydev.jython/Lib/sysconfig.py
13
26368
"""Provide access to Python's configuration information. """ import sys import os from os.path import pardir, realpath _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{base}/lib/python{py_version_short}', 'platstdlib': '{platbase}/lib/python{py_version_short}', 'purelib': '{base}/lib/pyt...
epl-1.0
-9,214,944,933,696,906,000
35.981767
79
0.537128
false
Endika/django
tests/many_to_one/tests.py
15
29129
import datetime from copy import deepcopy from django.core.exceptions import FieldError, MultipleObjectsReturned from django.db import models, transaction from django.db.utils import IntegrityError from django.test import TestCase from django.utils import six from django.utils.deprecation import RemovedInDjango20Warni...
bsd-3-clause
-956,513,722,556,745,300
46.364228
119
0.623468
false
TangibleDisplay/garden-ddd
view.py
4
7639
from object_renderer import ObjectRenderer from kivy.core.window import Window # noqa from kivy.lang import Builder from kivy.properties import NumericProperty, BooleanProperty from kivy.clock import Clock from kivy.animation import Animation from math import cos, sin, pi def dist(p1, p2): return ((p1[0] - p2[0...
mit
-6,346,216,295,763,786,000
25.992933
87
0.514989
false
timeyyy/PyUpdater
pyupdater/utils/keydb.py
1
4569
# -------------------------------------------------------------------------- # Copyright 2014 Digital Sapphire 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://...
bsd-2-clause
7,798,155,614,872,261,000
27.917722
76
0.512585
false
osamak/student-portal
api/serializers.py
2
4168
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth import authenticate from rest_framework import serializers, exceptions from rest_framework.authtoken.serializers import AuthTokenSerializer from activities.mode...
agpl-3.0
2,935,201,702,626,434,600
35.043478
125
0.661037
false
p-l-/miasm
example/jitter/mips32.py
6
2383
#!/usr/bin/env python #-*- coding:utf-8 -*- from argparse import ArgumentParser from miasm2.analysis import debugging, gdbserver from miasm2.jitter.csts import * from miasm2.analysis.machine import Machine from pdb import pm parser = ArgumentParser( description="""Sandbox raw binary with mips32 engine (ex: jit_mi...
gpl-2.0
-7,182,589,132,059,392,000
30.355263
84
0.619807
false
cyberark-bizdev/ansible
lib/ansible/modules/remote_management/hpilo/hpilo_boot.py
56
6644
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.com> # 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
8,933,881,236,778,294,000
30.942308
142
0.629892
false
landrito/api-client-staging
generated/python/gapic-google-cloud-monitoring-v3/google/cloud/gapic/monitoring/v3/metric_service_client.py
7
30336
# Copyright 2017, 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 ...
bsd-3-clause
7,041,997,193,956,691,000
45.173516
170
0.630538
false
mdeemer/XlsxWriter
xlsxwriter/test/comparison/test_chartsheet09.py
8
1773
############################################################################### # # 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): """...
bsd-2-clause
607,511,633,272,432,300
25.462687
106
0.545403
false
louisLouL/pair_trading
capstone_env/lib/python3.6/site-packages/pip/_vendor/distlib/locators.py
328
51013
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import gzip from io import BytesIO import json import logging import os import posixpath import re try: import threading except Impo...
mit
3,617,018,064,776,846,300
38.760717
95
0.524905
false
MarkWh1te/xueqiu_predict
python3_env/lib/python3.4/site-packages/pymysql/converters.py
20
12487
from ._compat import PY2, text_type, long_type, JYTHON, IRONPYTHON, unichr import datetime from decimal import Decimal import re import time from .constants import FIELD_TYPE, FLAG from .charset import charset_by_id, charset_to_encoding def escape_item(val, charset, mapping=None): if mapping is None: ma...
mit
2,490,726,471,220,942,000
28.801909
112
0.618563
false
rayNymous/nupic
src/nupic/regions/ImageSensorExplorers/Jiggle.py
17
5887
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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 progra...
agpl-3.0
-7,993,967,387,821,285,000
34.251497
87
0.583319
false
peterheim1/robbie
bin/follow_head.py
1
5817
#!/usr/bin/env python # freely inspired by http://www.ros.org/wiki/arbotix_python/follow_controller import roslib import rospy, actionlib from control_msgs.msg import FollowJointTrajectoryAction from dynamixel_msgs.msg import JointState as JointStateDynamixel from std_msgs.msg import Float64 ...
gpl-3.0
-3,832,184,821,617,121,300
29.615789
134
0.509025
false
hospace/ToughRADIUS
toughradius/radiusd/plugins/auth_rate_limit.py
5
2192
#!/usr/bin/env python #coding=utf-8 from twisted.python import log from toughradius.radiusd.settings import * import datetime def std_rate(resp,_in,_out): input_limit = str(_in) output_limit = str(_out) _class = input_limit.zfill(8) + input_limit.zfill(8) + output_limit.zfill(8) + output_limit.zfill(8) ...
agpl-3.0
3,105,824,620,084,847,000
25.409639
104
0.618613
false
TeamExodus/external_chromium_org
tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py
89
8377
# 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. """This module classifies NativeHeap objects filtering their allocations. The only filter currently available is 'stacktrace', which works as follows: {'na...
bsd-3-clause
8,135,106,956,259,978,000
38.706161
80
0.681867
false
cloudwatt/contrail-controller
src/opserver/stats.py
7
5232
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # stats # # Query StatsOracle info from analytics # import sys import argparse import json import datetime from opserver_util import OpServerUtils from sandesh_common.vns.ttypes import Module from sandesh_common.vns.constants im...
apache-2.0
-2,767,403,548,630,975,500
31.90566
95
0.546827
false
JinfengChen/CIRCfinder
script/extract_anchor.py
1
1494
#!/usr/bin/env python import sys import pysam def main(): if len(sys.argv) != 5: print('extract_anchor.py sam fa i length') sys.exit(0) i = sys.argv[3] length = int(sys.argv[4]) + 10 flag = '' fa = pysam.Fastafile(sys.argv[2]) with open(sys.argv[1], 'r') as sam: for lin...
mit
-3,681,476,219,729,401,000
35.439024
88
0.409639
false
Nirvedh/CoarseCoherence
src/mem/slicc/symbols/Event.py
92
1754
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
8,345,566,959,039,847,000
50.588235
72
0.777081
false
Phrozyn/MozDef
alerts/auditd_sftp.py
2
1625
#!/usr/bin/env python # 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) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.que...
mpl-2.0
-5,377,241,139,030,886,000
32.854167
105
0.610462
false
auferack08/edx-platform
common/lib/xmodule/xmodule/tests/test_editing_module.py
27
2425
""" Tests for editing descriptors""" import unittest import os import logging from mock import Mock from pkg_resources import resource_string from opaque_keys.edx.locations import Location from xmodule.editing_module import TabsEditingDescriptor from xblock.field_data import DictFieldData from xblock.fields import Sco...
agpl-3.0
-3,890,044,568,305,784,300
34.661765
115
0.583918
false
nitin-cherian/LifeLongLearning
Python/Experiments/JINJA/RealPython/jinja_env/lib/python3.5/site-packages/flask/sessions.py
119
14394
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from base64 import b64encode, b64decode from datetime import dateti...
mit
60,907,406,748,023,920
38.327869
78
0.636098
false
BjerknesClimateDataCentre/QuinCe
external_scripts/NRT/configure_nrt.py
2
5398
import os, logging import toml, json import urllib.error import base64 from tabulate import tabulate # Local modules import quince, nrtdb, nrtftp import RetrieverFactory, PreprocessorFactory # Extract the list of IDs from a set of instruments def get_ids(instruments): result = [] for instrument in instruments: ...
gpl-3.0
-3,764,827,567,584,822,000
30.202312
92
0.584661
false
odoousers2014/LibrERP
account_invoice_force_number/invoice.py
2
1305
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) # All Rights Reserved # # This program is free software: you ca...
agpl-3.0
-4,286,218,238,635,117,600
42.5
120
0.609195
false
paltman/nashvegas
nashvegas/management/commands/syncdb.py
4
1185
from django.core.management import call_command from django.core.management.commands.syncdb import Command as SyncDBCommand from optparse import make_option class Command(SyncDBCommand): option_list = SyncDBCommand.option_list + ( make_option('--skip-migrations', action='store_false', ...
mit
-2,027,725,637,822,243,000
33.852941
79
0.58481
false
Wilee999/panda3d
direct/src/controls/NonPhysicsWalker.py
11
11774
""" NonPhysicsWalker.py is for avatars. A walker control such as this one provides: - creation of the collision nodes - handling the keyboard and mouse input for avatar movement - moving the avatar it does not: - play sounds - play animations although it does send messeges that allow a listener t...
bsd-3-clause
5,563,674,779,308,692,000
35.909091
103
0.630967
false
dkavraal/typecatcher
typecatcher/html_preview.py
1
5738
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2012 Andrew Starr-Bochicchio <a.starr.b@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the...
gpl-3.0
248,349,567,679,156,740
39.111888
325
0.649059
false
arouzrokh1/jon
synth.py
1
1436
from pyttsx.drivers import _espeak import ctypes import wave import time import threading import StringIO class Synth(object): _done = False def __init__(self): self.rate = _espeak.Initialize(_espeak.AUDIO_OUTPUT_RETRIEVAL, 1000) assert self.rate != -1, 'could not initialize espeak' _esp...
apache-2.0
-7,920,153,173,975,050,000
29.553191
76
0.547354
false
pincopallino93/rdfendpoints
lib/rdflib/plugins/parsers/structureddata.py
6
12225
#!/usr/bin/env python """ Extraction parsers for structured data embedded into HTML or XML files. The former may include RDFa or microdata. The syntax and the extraction procedures are based on: * The RDFa specifications: http://www.w3.org/TR/#tr_RDFa * The microdata specification: http://www.w3.org/TR/microdata/ * Th...
apache-2.0
3,758,386,639,521,115,600
42.97482
114
0.632638
false
nkalodimas/invenio
modules/websession/lib/websession_web_tests.py
27
12821
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2011 CERN. ## ## Invenio 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...
gpl-2.0
1,825,924,449,962,784,500
51.979339
122
0.663365
false
mozilla-metrics/socorro-toolbox
src/main/python/graphics-correlations.py
1
6775
from optparse import OptionParser import psycopg2 import os, sys import csv import re from collections import namedtuple p = OptionParser(usage='usage: %prog [options] outfile') p.add_option('-V', '--product-version', dest='productversion', help='Firefox version', default=None) p.add_option('-s', '--start...
apache-2.0
-4,394,518,590,229,906,400
27.829787
125
0.671144
false
mdtraj/mdtraj
mdtraj/__init__.py
6
2628
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: # # MDTraj is free software: y...
lgpl-2.1
-5,419,075,364,981,252,000
36.542857
95
0.714612
false
decebel/dataAtom_alpha
bin/plug/py/external/pattern/text/search.py
1
41884
#### PATTERN | EN | PATTERN MATCHING ############################################################### # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ####################################...
apache-2.0
-573,557,773,068,196,400
40.967936
150
0.528603
false
hanx11/shadowsocks
shadowsocks/crypto/rc4_md5.py
1042
1339
#!/usr/bin/env python # # Copyright 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 required by applicable law or ...
apache-2.0
-5,927,778,082,856,169,000
25.254902
75
0.671397
false
mrquim/repository.mrquim
script.video.F4mProxy/lib/f4mUtils/codec.py
88
2613
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """Classes for reading/writing binary data (such as TLS records).""" from .compat import * class Writer(object): def __init__(self): self.bytes = bytearray(0) def add(self, x, length): self.bytes...
gpl-2.0
3,949,432,043,730,541,000
28.359551
72
0.581707
false
alphafoobar/intellij-community
python/lib/Lib/site-packages/django/contrib/auth/backends.py
230
4582
from django.db import connection from django.contrib.auth.models import User, Permission class ModelBackend(object): """ Authenticates against django.contrib.auth.models.User. """ supports_object_permissions = False supports_anonymous_user = True supports_inactive_user = True # TODO: Mode...
apache-2.0
-5,614,252,204,261,928,000
35.365079
143
0.61567
false
hilaskis/UAV_MissionPlanner
Lib/xml/sax/xmlreader.py
113
12632
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ import handler from _exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReader is the...
gpl-2.0
724,130,147,819,564,400
32.154856
78
0.661574
false
codepython/CollectorCity-Market-Place
stores/apps/sell/migrations/0004_auto__add_field_sell_cancel.py
2
11769
# encoding: 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 'Sell.cancel' db.add_column('sell_sell', 'cancel', self.gf('django.db.models.fields.Boolean...
apache-2.0
-3,764,220,601,543,705,600
73.018868
193
0.541847
false
eusi/MissionPlanerHM
Lib/site-packages/numpy/distutils/from_template.py
51
7890
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" """ process_file(filename) takes templated file .xxx.src and produces .xxx file where .xxx is .pyf .f90 or .f using the following template rules: '<..>' denotes a template. All function and subroutine blocks...
gpl-3.0
-2,672,470,971,787,896,300
29.820313
100
0.560963
false
av8ramit/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/softplus.py
81
5398
# 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
2,437,748,543,157,167,600
36.486111
80
0.62375
false
mith1979/ansible_automation
applied_python/applied_python/lib64/python2.7/site-packages/Crypto/Hash/MD4.py
124
2716
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
apache-2.0
-602,851,722,341,652,100
28.846154
78
0.643225
false
40223125/w17t2
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/event.py
603
19086
#!/usr/bin/env python '''Pygame module for interacting with events and queues. Pygame handles all it's event messaging through an event queue. The routines in this module help you manage that event queue. The input queue is heavily dependent on the pygame display module. If the display has not been initialized and a ...
gpl-3.0
6,297,146,859,464,066,000
34.084559
79
0.627947
false
botswana-harvard/ba-namotswe
ba_namotswe/models/pregnancy.py
1
1266
from django.db import models from simple_history.models import HistoricalRecords from .crf_model_mixin import CrfModelMixin, CrfInlineModelMixin class PregnancyHistory(CrfModelMixin): history = HistoricalRecords() class Meta(CrfModelMixin.Meta): app_label = 'ba_namotswe' verbose_name = 'Pr...
gpl-3.0
3,529,876,229,850,320,400
27.133333
73
0.678515
false
pratapvardhan/pandas
pandas/tests/test_base.py
2
46174
# -*- coding: utf-8 -*- from __future__ import print_function import re import sys from datetime import datetime, timedelta import pytest import numpy as np import pandas as pd import pandas.compat as compat from pandas.core.dtypes.common import ( is_object_dtype, is_datetimetz, is_datetime64_dtype, needs_i8_...
bsd-3-clause
-5,006,351,442,534,482,000
36.147224
79
0.505869
false
invisiblek/python-for-android
python-modules/twisted/twisted/names/secondary.py
57
3201
# Copyright (c) 2001-2006 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.internet import task, defer from twisted.names import dns from twisted.names import common from twisted.names import client from twisted.names import resolve from twisted.python import log, failure from twisted.application i...
apache-2.0
-7,817,506,953,968,229,000
30.382353
99
0.634177
false
dkluffy/dkluff-code
code/work/testpassport.py
1
2023
#!/usr/bin/env python # coding=utf-8 import re import json import sys fmt = '\033[0;3{}m{}\033[0m'.format def cls(): print chr(27) + "[2J" def fmtAnswer(s,sp=None): r=re.sub("Answer:| |\r|\n","",s) if sp is None: a=[] for i in r.upper(): a+=[i] return a return r.upper().split(sp) def fmtI...
apache-2.0
-2,902,105,228,599,343,600
15.184
56
0.524963
false
kmacinnis/sympy
examples/intermediate/infinite_1d_box.py
116
2911
#!/usr/bin/env python """ Applying perturbation theory to calculate the ground state energy of the infinite 1D box of width ``a`` with a perturbation which is linear in ``x``, up to second order in perturbation """ from sympy.core import pi from sympy import Integral, var, S from sympy.functions import sin, sqrt de...
bsd-3-clause
4,209,410,431,733,299,700
25.463636
82
0.544486
false
atheed/servo
tests/wpt/web-platform-tests/tools/pytest/_pytest/genscript.py
191
4129
""" (deprecated) generate a single-file self-contained version of pytest """ import os import sys import pkgutil import py import _pytest def find_toplevel(name): for syspath in sys.path: base = py.path.local(syspath) lib = base/name if lib.check(dir=1): return lib mo...
mpl-2.0
-3,636,961,366,474,976,000
30.280303
84
0.604505
false
gitaarik/django
tests/m2m_through/models.py
58
4699
from datetime import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible # M2M described on one of the models @python_2_unicode_compatible class Person(models.Model): name = models.CharField(max_length=128) class Meta: ordering = ('name',) def __s...
bsd-3-clause
-7,930,515,699,810,865,000
29.121795
102
0.69036
false
NicolasHerin/game_book_share
node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
1569
23354
#!/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. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
mit
4,744,965,596,486,516,000
37.285246
80
0.665967
false
jelugbo/ddi
lms/djangoapps/instructor/tests/test_ecommerce.py
13
13342
""" Unit tests for Ecommerce feature flag in new instructor dashboard. """ from django.test.utils import override_settings from django.core.urlresolvers import reverse from courseware.tests.tests import TEST_DATA_MONGO_MODULESTORE from student.tests.factories import AdminFactory from xmodule.modulestore.tests.django_...
agpl-3.0
3,010,905,836,662,867,000
47.871795
135
0.661145
false
vipulroxx/sympy
sympy/core/core.py
30
3814
""" The core's core. """ from __future__ import print_function, division # used for canonical ordering of symbolic sequences # via __cmp__ method: # FIXME this is *so* irrelevant and outdated! ordering_of_classes = [ # singleton numbers 'Zero', 'One', 'Half', 'Infinity', 'NaN', 'NegativeOne', 'NegativeInfinity...
bsd-3-clause
-423,659,651,413,438,700
26.839416
80
0.579444
false
archilogic-com/three.js
utils/exporters/blender/addons/io_three/exporter/utilities.py
1
2246
import uuid import hashlib from .. import constants ROUND = constants.DEFAULT_PRECISION def bit_mask(flags): """Generate a bit mask. :type flags: dict :return: int """ bit = 0 true = lambda x, y: (x | (1 << y)) false = lambda x, y: (x & (~(1 << y))) for mask, position in constant...
mit
2,366,144,468,725,731,300
18.876106
79
0.607747
false
j00bar/ansible
test/units/playbook/test_helpers.py
60
19182
# (c) 2016, Adrian Likins <alikins@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, either version 3 of the License, or # (at your option) any later vers...
gpl-3.0
-8,338,170,430,065,940,000
47.31738
148
0.564435
false
SGCreations/Flask
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/jinja2/testsuite/security.py
415
6204
# -*- coding: utf-8 -*- """ jinja2.testsuite.security ~~~~~~~~~~~~~~~~~~~~~~~~~ Checks the sandbox and other security features. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import E...
apache-2.0
-5,241,616,003,818,179,000
36.373494
94
0.553997
false
jnerin/ansible
lib/ansible/module_utils/ovirt.py
3
26081
# -*- coding: utf-8 -*- # # Copyright (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) ...
gpl-3.0
-4,524,963,097,820,722,700
32.437179
121
0.595721
false
lenstr/rethinkdb
test/rql_test/connections/http_support/werkzeug/testsuite/multipart/collect.py
248
1584
#!/usr/bin/env python """ Hacky helper application to collect form data. """ from werkzeug.serving import run_simple from werkzeug.wrappers import Request, Response def copy_stream(request): from os import mkdir from time import time folder = 'request-%d' % time() mkdir(folder) environ = request.e...
agpl-3.0
3,515,731,322,545,033,000
27.285714
76
0.636364
false
philippjfr/bokeh
bokeh/embed/tests/test_server.py
1
11784
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
bsd-3-clause
-8,731,078,012,785,231,000
36.056604
114
0.506365
false
google/gfw-toolkit
toolkit/third_party/oauth2client/client.py
122
44282
# Copyright (C) 2010 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 or agreed to in writ...
apache-2.0
-282,568,818,409,263,330
31.464809
80
0.663633
false
ptrendx/mxnet
tests/nightly/test_kvstore.py
12
10372
#!/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...
apache-2.0
-4,466,153,824,638,980,000
39.20155
107
0.575106
false
dannyperez/bolivarcoin
share/seeds/generate-seeds.py
79
4297
#!/usr/bin/python # Copyright (c) 2014 Wladmir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory that...
mit
2,846,191,250,811,500,000
30.82963
98
0.575983
false
Panos512/inspire-next
inspirehep/modules/authors/__init__.py
3
1142
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2016 CERN. # # INSPIRE 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...
gpl-2.0
3,912,756,386,225,137,000
33.606061
76
0.747811
false
alphagov/notifications-admin
tests/app/main/views/test_notifications.py
1
29605
import base64 from functools import partial from unittest.mock import mock_open import pytest from flask import url_for from freezegun import freeze_time from notifications_python_client.errors import APIError from PyPDF2.utils import PdfReadError from tests.conftest import ( SERVICE_ONE_ID, create_active_cas...
mit
8,759,862,887,065,441,000
29.265097
116
0.642125
false
tensorflow/models
research/delf/delf/python/examples/extract_boxes.py
1
7510
# 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 applicab...
apache-2.0
-4,798,036,224,904,665,000
31.79476
80
0.641145
false
DG-i/openshift-ansible
roles/lib_openshift/src/ansible/oc_edit.py
42
1774
# pylint: skip-file # flake8: noqa def main(): ''' ansible oc module for editing objects ''' module = AnsibleModule( argument_spec=dict( kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'), state=dict(default='present', type='str', ...
apache-2.0
-5,314,907,019,347,981,000
35.958333
87
0.456595
false
demon-ru/iml-crm
addons/hw_posbox_upgrade/controllers/main.py
172
4161
# -*- coding: utf-8 -*- import logging import os import time import openerp import openerp.addons.hw_proxy.controllers.main as hw_proxy import threading from openerp import http from openerp.http import request from openerp.tools.translate import _ _logger = logging.getLogger(__name__) upgrade_template = """ <!DOCTY...
agpl-3.0
-6,774,643,513,960,914,000
32.02381
148
0.503244
false
mindm/2017Challenges
challenge_6/python/slandau3/ranges.py
5
1713
#!/usr/bin/env python3 # @author Slandau3 def ranges(input: list) -> list: # The patterns_found list keeps track of the definite ranges we have completed patterns_found = [] # pattern_in_progress keeps track of a pattern we are tracing pattern_in_progress = [] for i in input: if len(patter...
mit
7,001,529,812,573,667,000
45.324324
117
0.630473
false
bentilly/heroes
lib/werkzeug/contrib/limiter.py
295
1333
# -*- coding: utf-8 -*- """ werkzeug.contrib.limiter ~~~~~~~~~~~~~~~~~~~~~~~~ A middleware that limits incoming data. This works around problems with Trac_ or Django_ because those directly stream into the memory. .. _Trac: http://trac.edgewall.org/ .. _Django: http://www.djangoproject.com/ ...
apache-2.0
-5,936,152,903,061,632,000
32.325
79
0.662416
false
vrenkens/Nabu-asr
nabu/neuralnetworks/components/layer.py
2
3940
'''@file layer.py Neural network layers ''' import tensorflow as tf from tensorflow.python.ops.rnn import bidirectional_dynamic_rnn from nabu.neuralnetworks.components import ops def blstm( inputs, sequence_length, num_units, layer_norm=False, scope=None): ''' a BLSTM l...
mit
8,420,736,518,116,136,000
30.269841
78
0.621574
false
dohoangkhiem/ansible-modules-extras
cloud/rackspace/rax_mon_entity.py
123
6171
#!/usr/bin/python # 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 distributed...
gpl-3.0
-6,354,907,272,350,982,000
31.140625
82
0.634905
false
marcoscaceres/AlarmAPI
node_modules/grunt-contrib-uglify/node_modules/gzip-js/test/zipTest.py
182
1836
import os from helpers import run_cmd from colorama import Fore defaultTestDir = 'test-files' defaultOutDir = 'test-outs' """ Run a single test @param tFile- required; the full path to the file to run @param level- optional (default: all); the compression level [1-9] @return True if all tests passed; False if at lea...
mit
7,189,911,731,008,144,000
29.6
133
0.665577
false
AICP/external_chromium_org
build/android/pylib/instrumentation/test_jar.py
11
9038
# Copyright (c) 2013 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. """Helper class for instrumenation test jar.""" # pylint: disable=W0702 import collections import logging import os import pickle import re import sys ...
bsd-3-clause
-1,017,126,872,567,058,200
37.459574
80
0.610201
false
carloshwa/apps-android-wikipedia
scripts/make-templates.py
2
6090
#!/usr/bin/env python2 # coding=utf-8 import copy import os import json import unicodecsv as csv import codecs from urllib2 import urlopen from jinja2 import Environment, FileSystemLoader CHINESE_WIKI_LANG = "zh" SIMPLIFIED_CHINESE_LANG = "zh-hans" TRADITIONAL_CHINESE_LANG = "zh-hant" # Wikis that cause problems an...
apache-2.0
6,847,877,917,796,116,000
31.875676
98
0.665735
false
shsingh/ansible
test/units/modules/network/fortios/test_fortios_log_syslogd_override_filter.py
21
9346
# Copyright 2019 Fortinet, 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, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
-488,594,555,072,151,900
35.65098
133
0.601755
false