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
pbrazdil/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/gc.py
146
2038
# Copyright (C) 2009 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
1,754,592,146,930,344,200
45.318182
72
0.740432
false
benlangmuir/swift
utils/type-layout-fuzzer.py
32
4228
#!/usr/bin/env python # This script outputs a Swift source with randomly-generated type definitions, # which can be used for ABI or layout algorithm fuzzing. # TODO: generate types with generics, existentials, compositions from __future__ import print_function import random import sys maxDepth = 5 maxMembers = 5 t...
apache-2.0
-6,604,167,780,531,561,000
25.591195
78
0.598628
false
Bismarrck/tensorflow
tensorflow/python/ops/linalg/linear_operator.py
3
33838
# 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
-4,438,973,360,618,543,600
33.992761
99
0.646788
false
thesuperzapper/tensorflow
tensorflow/python/kernel_tests/attention_ops_test.py
85
7316
# 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
-4,091,728,654,811,364,000
35.39801
80
0.602242
false
staslev/incubator-beam
sdks/python/apache_beam/runners/dataflow/internal/clients/dataflow/dataflow_v1b3_messages.py
5
195799
# # 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
2,631,222,436,543,351,000
38.667545
102
0.732394
false
meteokid/python-rpn
share/examples/fst_to_lalo.py
1
4082
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Barbara Casati <Barbara.Casati@canada.ca> # Author: Stephane Chamberland <stephane.chamberland@canada.ca> """ Interpolate RPNSTD rec to latlon points """ import sys import optparse import numpy as np from scipy import interpolate import rpnpy.librmn.all as rmn if...
lgpl-2.1
2,521,296,638,424,310,300
36.796296
139
0.60877
false
tlangerak/Multi-Agent-Systems
build/lib.win-amd64-2.7/tlslite/utils/cipherfactory.py
357
3177
"""Factory functions for symmetric cryptography.""" import os import Python_AES import Python_RC4 import cryptomath tripleDESPresent = False if cryptomath.m2cryptoLoaded: import OpenSSL_AES import OpenSSL_RC4 import OpenSSL_TripleDES tripleDESPresent = True if cryptomath.cryptlibpyLoaded: impo...
lgpl-2.1
8,611,247,989,210,163,000
27.630631
76
0.60938
false
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/idlelib/configSectionNameDialog.py
150
3720
""" Dialog that allows user to specify a new config file section name. Used to get new highlight theme and keybinding set names. """ from Tkinter import * import tkMessageBox class GetCfgSectionNameDialog(Toplevel): def __init__(self,parent,title,message,usedNames): """ message - string, informatio...
gpl-2.0
-5,951,943,864,343,026,000
37.350515
84
0.606452
false
osiell/server-tools
base_user_reset_access/tests/test_base_user_reset_access.py
21
1728
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of base_user_reset_access, # an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # base_user_reset_access is free software: # you can redistribute it an...
agpl-3.0
8,368,598,698,231,628,000
39.186047
78
0.605324
false
Shnatsel/cjdns
node_build/dependencies/libuv/build/gyp/test/win/gyptest-link-generate-manifest.py
238
4708
#!/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. """ Make sure we generate a manifest file when linking binaries, including handling AdditionalManifestFiles. """ import TestGyp import sys...
gpl-3.0
1,823,264,268,685,988,400
36.070866
77
0.636151
false
cedadev/cloudhands-web
cloudhands/web/main.py
1
41523
#!/usr/bin/env python3 # encoding: UTF-8 import argparse import datetime import functools import logging import operator import os.path import platform import re import sqlite3 import sys import uuid import bcrypt from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLA...
bsd-3-clause
-7,116,761,765,409,089,000
33.981466
80
0.645305
false
fedora-infra/packagedb
pkgdb/lib/validators.py
2
10016
# -*- coding: utf-8 -*- # # Copyright © 2008, 2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2, or (at your option) any later version. This # program is distribute...
gpl-2.0
-560,606,515,482,172,000
37.079848
87
0.650325
false
ekg/multichoose
multipermute.py
6
2680
#!/usr/bin/python # -*- coding: utf-8 -*- # multipermute.py - permutations of a multiset # Erik Garrison <erik.garrison@bc.edu> 2010 """ This module encodes functions to generate the permutations of a multiset following this algorithm: Algorithm 1 Visits the permutations of multiset E. The permutations are stored in...
mit
6,965,374,735,325,676,000
26.091837
79
0.587947
false
eltonsantos/django
django/core/management/validation.py
107
23840
import collections import sys from django.conf import settings from django.core.management.color import color_style from django.utils.encoding import force_str from django.utils.itercompat import is_iterable from django.utils import six class ModelErrorCollection: def __init__(self, outfile=sys.stdout): ...
bsd-3-clause
-1,712,950,021,564,630,800
63.086022
264
0.536242
false
vedujoshi/tempest
tempest/lib/services/network/ports_client.py
2
3105
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-2,296,830,568,639,693,000
35.104651
89
0.643156
false
xbezdick/tempest
tempest/services/compute/json/floating_ip_pools_client.py
6
1314
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
2,848,230,105,475,330,000
37.647059
78
0.71309
false
tudorian/eden
tests/unit_tests/modules/s3/s3gis/YahooLayer.py
43
1342
s3gis_tests = load_module("tests.unit_tests.modules.s3.s3gis") test_utils = local_import("test_utils") yahoo_layer = dict( name = "Test Yahoo Layer", description = "Test Yahoo", enabled = True, created_on = datetime.datetime.now(), modified_on = datetime.datetime.now(), satellite_enabled = Tru...
mit
8,925,445,179,543,354,000
26.958333
83
0.528316
false
qedsoftware/commcare-hq
corehq/apps/reports/standard/__init__.py
1
8604
from datetime import datetime import dateutil from django.core.cache import cache from django.core.urlresolvers import reverse from corehq.apps.casegroups.models import CommCareCaseGroup from corehq.apps.groups.models import Group from corehq.apps.reports import util from corehq.apps.reports.dispatcher import ProjectRe...
bsd-3-clause
1,340,669,533,181,470,000
30.516484
115
0.640748
false
yanchen036/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/matrix_inverse_tril.py
3
5272
# Copyright 2018 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
-1,486,163,193,245,675,300
35.358621
80
0.609067
false
webgeodatavore/django
django/templatetags/static.py
197
4052
from django import template from django.utils.encoding import iri_to_uri from django.utils.six.moves.urllib.parse import urljoin register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __init__(self, varname=None, name=None): ...
bsd-3-clause
-8,520,686,526,535,047,000
25.311688
116
0.586624
false
sammyshj/gci
modules/s3db/fire.py
4
21906
# -*- coding: utf-8 -*- """ Sahana Eden Fire Models @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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...
mit
944,320,506,550,705,900
41.618677
135
0.411988
false
thilaire/CodingGameServer
games/Networks/server/AliceRandomPlayer.py
1
4279
""" * --------------------- * | | | Coding Game Server | | | * --------------------- * Authors: M. Pecheux (based on T. Hilaire and J. Brajard template file) Licence: GPL File: aliceRandomPlayer.py Contains the class aliceRandomPlayer -> defines a dummy Alice player t...
gpl-3.0
-3,197,027,953,746,433,500
29.564286
128
0.618369
false
mmnelemane/nova
nova/api/openstack/compute/legacy_v2/contrib/agents.py
7
7919
# Copyright 2012 IBM Corp. # # 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 t...
apache-2.0
2,919,998,625,518,551,600
40.031088
79
0.623185
false
pyhmsa/pyhmsa
pyhmsa/fileformat/xmlhandler/condition/region.py
1
1491
""" XML handler for region condition """ # Standard library modules. # Third party modules. # Local modules. from pyhmsa.spec.condition.region import RegionOfInterest from pyhmsa.fileformat.xmlhandler.condition.condition import _ConditionXMLHandler # Globals and constants variables. class RegionOfInterestXMLHandle...
mit
-4,484,722,228,571,843,600
29.428571
81
0.669349
false
CXQERP/ODOOERP
addons/mail/tests/test_mail_features.py
76
59326
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
518,284,203,778,857,500
64.108672
175
0.612924
false
jbaiter/plugin.video.brmediathek
resources/lib/xbmcswift2/__init__.py
2
2442
''' xbmcswift2 ---------- A micro framework to enable rapid development of XBMC plugins. :copyright: (c) 2012 by Jonathan Beluch :license: GPLv3, see LICENSE for more details. ''' from types import ModuleType class module(ModuleType): '''A wrapper class for a module used to override __getatt...
gpl-3.0
-3,516,369,758,686,775,000
31.131579
79
0.667895
false
jsirois/commons
src/python/twitter/checkstyle/plugins/missing_contextmanager.py
14
1726
# ================================================================================================== # Copyright 2014 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
-4,280,281,676,137,923,600
42.15
100
0.60197
false
eandersson/amqp-storm
amqpstorm/exception.py
2
4462
"""AMQPStorm Exception.""" AMQP_ERROR_MAPPING = { 311: ('CONTENT-TOO-LARGE', 'The client attempted to transfer content larger than the ' 'server could accept at the present time. The client may ' 'retry at a later time.'), 312: ('NO-ROUTE', 'Undocumented AMQP Soft Error'), 31...
mit
6,412,930,167,972,811,000
38.140351
76
0.625504
false
hyperNURb/ggrc-core
src/ggrc_workflows/services/workflow_cycle_calculator/annually_cycle_calculator.py
5
2706
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: urban@reciprocitylabs.com # Maintained By: urban@reciprocitylabs.com import datetime from dateutil import relativedelta from cycle_calculator impo...
apache-2.0
-5,756,818,069,688,133,000
37.657143
79
0.691057
false
goodwinnk/intellij-community
python/helpers/python-skeletons/nose/tools/__init__.py
80
5457
"""Skeleton for 'nose.tools' module. Project: nose 1.3 <https://nose.readthedocs.org/> Skeleton by: Andrey Vlasovskikh <andrey.vlasovskikh@jetbrains.com> """ import sys def assert_equal(first, second, msg=None): """Fail if the two objects are unequal as determined by the '==' operator. """ pass def a...
apache-2.0
6,184,661,431,717,149,000
29.149171
79
0.634415
false
rabipanda/tensorflow
tensorflow/python/training/training_ops.py
131
1046
# 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
4,086,360,359,569,015,000
39.230769
80
0.711281
false
tacrow/tacrow
node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
960
45344
# 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
mit
-1,713,747,280,117,781,500
40.410046
80
0.640371
false
fxfitz/ansible
lib/ansible/modules/cloud/google/gcp_compute_backend_service.py
14
36795
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
7,372,240,479,186,199,000
41.984813
140
0.570186
false
ring00/bbl-ucore
related_info/ostep/ostep10-lottery.py
54
3990
#! /usr/bin/env python import sys from optparse import OptionParser import random parser = OptionParser() parser.add_option('-s', '--seed', default=0, help='the random seed', action='store', type='int', dest='seed') parser.add_option('-j', '--jobs', default=3, help='number of jobs in the system', action=...
gpl-2.0
2,357,221,937,666,445,300
32.529412
279
0.570677
false
orangeduck/PyAutoC
Python27/Lib/ctypes/test/test_array_in_pointer.py
117
1729
import unittest from ctypes import * from binascii import hexlify import re def dump(obj): # helper function to dump memory contents in hex, with a hyphen # between the bytes. h = hexlify(memoryview(obj)) return re.sub(r"(..)", r"\1-", h)[:-1] class Value(Structure): _fields_ = [("val", c_byte)] ...
bsd-2-clause
420,706,099,086,015,360
26.015625
73
0.561018
false
riteshshrv/django
django/contrib/gis/geos/prototypes/geom.py
288
4069
from ctypes import POINTER, c_char_p, c_int, c_size_t, c_ubyte from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck import ( check_geom, check_minus_one, check_sized_string, check_string, check_zero, ) # This is the return type used by bina...
bsd-3-clause
5,216,675,870,689,809,000
34.382609
85
0.736299
false
sbalde/edxplatform
openedx/core/djangoapps/content/course_overviews/migrations/0006_add_version_and_timestamp.py
56
4600
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'CourseOverview.created' db.add_column('course_overviews_c...
agpl-3.0
7,028,308,691,445,154,000
60.346667
141
0.596522
false
dd00/commandergenius
project/jni/python/src/Lib/test/test_uu.py
61
5316
""" Tests for uu module. Nick Mathewson """ import unittest from test import test_support import sys, os, uu, cStringIO import uu plaintext = "The smooth-scaled python crept over the sleeping dog\n" encodedtext = """\ M5&AE('-M;V]T:\"US8V%L960@<'ET:&]N(&-R97!T(&]V97(@=&AE('-L965P (:6YG(&1O9PH """ encodedtextwrappe...
lgpl-2.1
-594,843,575,768,431,400
27.891304
86
0.545523
false
abtink/openthread
tests/toranj/test-034-poor-link-parent-child-attach.py
9
3302
#!/usr/bin/env python3 # # Copyright (c) 2019, 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 # ...
bsd-3-clause
-8,807,192,311,029,769,000
42.447368
121
0.612962
false
jotes/ansible
lib/ansible/runner/return_data.py
133
2102
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-4,510,780,908,862,235,000
35.241379
198
0.650333
false
brototyp/CouchPotato
library/sqlalchemy/dialects/mssql/mxodbc.py
18
3274
""" Support for MS-SQL via mxODBC. mxODBC is available at: http://www.egenix.com/ This was tested with mxODBC 3.1.2 and the SQL Server Native Client connected to MSSQL 2005 and 2008 Express Editions. Connecting ~~~~~~~~~~ Connection is via DSN:: mssql+mxodbc://<username>:<password>@<dsnname> Executio...
gpl-3.0
2,943,022,538,837,989,000
34.978022
78
0.721747
false
jsirois/pex
pex/vendor/_vendored/pip/pip/_vendor/chardet/universaldetector.py
244
12485
######################## 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...
apache-2.0
5,384,070,764,618,037,000
42.653846
80
0.547938
false
erkanay/django
tests/null_fk_ordering/tests.py
44
2014
from __future__ import unicode_literals from django.test import TestCase from .models import Author, Article, SystemInfo, Forum, Post, Comment class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Key...
bsd-3-clause
6,266,639,399,453,080,000
46.952381
90
0.682721
false
radhika-raghavendran/mbed-os5.1-onsemi
tools/host_tests/wait_us_auto.py
122
2871
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
319,921,671,935,296,450
40.608696
99
0.634274
false
xdevelsistemas/taiga-back-community
taiga/base/api/utils/formatting.py
2
4697
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
agpl-3.0
-7,965,320,073,523,837,000
38.125
83
0.717785
false
wangyou/XX-Net
code/default/gae_proxy/server/lib/google/appengine/api/backendinfo.py
14
6551
#!/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...
bsd-2-clause
6,294,244,531,255,962,000
26.410042
78
0.684934
false
fichter/grpc
src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
3
10601
# 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
-4,736,542,116,059,037,000
41.404
96
0.72163
false
mfazliazran/raft
analysis/resultsclasses/AnalysisResults.py
11
6849
# # Author: Justin Engler # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT 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
2,790,215,453,586,914,000
41.018405
135
0.585779
false
dennybaa/st2
st2common/st2common/models/system/actionchain.py
8
5983
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
3,221,834,506,381,522,400
36.39375
98
0.508608
false
peter-jang/ansible-modules-core
network/junos/junos_facts.py
19
4038
#!/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 distribut...
gpl-3.0
4,739,418,881,217,886,000
30.546875
77
0.688212
false
381426068/MissionPlanner
Lib/encodings/unicode_internal.py
103
1241
""" Python 'unicode-internal' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to meth...
gpl-3.0
7,888,333,760,609,532,000
25.577778
69
0.695407
false
lnielsen/invenio
invenio/legacy/bibformat/templates.py
3
75703
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 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 ...
gpl-2.0
206,509,986,830,123,460
42.911253
507
0.525475
false
claudio-idra/subterfuge
dbconfigure.py
22
1470
##################################################################### #This file is for use to fully reset the Subterfuge Database #It should only be necessary due to significant develompent changes #Usage MUST be as follows: #rm db && rm base_db #./manage.py syncdb #python dbconfigure.py #This will rebuild the Databas...
gpl-3.0
-8,627,531,776,754,089,000
29
69
0.633333
false
emrecamasuvi/appengineTmp
lib/flask/wrappers.py
773
6709
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.exce...
apache-2.0
-4,530,983,491,010,492,000
35.461957
79
0.631987
false
execunix/vinos
external/bsd/wpa/dist/wpa_supplicant/examples/p2p/p2p_find.py
29
4714
#!/usr/bin/python # Tests p2p_find # Will list all devices found/lost within a time frame (timeout) # Then Program will exit ######### MAY NEED TO RUN AS SUDO ############# import dbus import sys, os import time import gobject import threading import getopt from dbus.mainloop.glib import DBusGMainLoop def usage(): p...
apache-2.0
-3,100,834,918,593,524,700
23.552083
72
0.690709
false
moandcompany/luigi
examples/terasort.py
59
3445
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
apache-2.0
3,561,607,410,017,211,000
28.698276
90
0.643251
false
intgr/django-cms
cms/migrations/0045_auto__add_field_page_application_urls.py
15
16500
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
bsd-3-clause
2,625,375,170,202,780,700
80.285714
187
0.555455
false
izak/xhtml2pdf
demo/tgpisa/tgpisa/commands.py
155
1630
# -*- coding: utf-8 -*- """This module contains functions called from console script entry points.""" import os import sys from os.path import dirname, exists, join import pkg_resources pkg_resources.require("TurboGears") import turbogears import cherrypy cherrypy.lowercase_api = True class ConfigurationError(Exc...
apache-2.0
-2,788,601,249,287,152,000
30.346154
77
0.676687
false
anksp21/Community-Zenpacks
ZenPacks.community.zenAppProfiler/ZenPacks/community/zenAppProfiler/__init__.py
2
5384
import Globals import os.path skinsDir = os.path.join(os.path.dirname(__file__), 'skins') from Products.CMFCore.DirectoryView import registerDirectory if os.path.isdir(skinsDir): registerDirectory(skinsDir, globals()) import transaction from Products.ZenModel.ZenossInfo import ZenossInfo from Products.ZenModel.Ze...
gpl-2.0
-3,753,552,154,679,509,000
40.736434
108
0.534547
false
eduNEXT/edx-platform
lms/djangoapps/certificates/generation.py
2
6695
""" Course certificate generation These methods generate course certificates (they create a new course certificate if it does not yet exist, or update the existing cert if it does already exist). For now, these methods deal primarily with allowlist certificates, and are part of the V2 certificates revamp. These meth...
agpl-3.0
-6,237,152,878,046,844,000
37.924419
120
0.688275
false
ar7z1/ansible
lib/ansible/modules/identity/opendj/opendj_backendprop.py
77
6939
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Werner Dijkerman (ikben@werner-dijkerman.nl) # Copyright: (c) 2017, 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_...
gpl-3.0
7,237,501,349,423,861,000
33.014706
112
0.557141
false
koushikcgit/xen
tools/python/xen/xm/opts.py
43
17981
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
gpl-2.0
4,655,203,752,074,545,000
27.677831
80
0.49975
false
kimegitee/python-koans
python2/libs/colorama/ansitowin32.py
287
6621
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. import re import sys from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll if windll is not None: winterm = WinTerm() def is_a_tty(stream): return hasattr(s...
mit
-9,201,103,425,506,319,000
34.031746
79
0.584655
false
ltilve/chromium
gin/fingerprint/fingerprint_v8_snapshot.py
64
2442
#!/usr/bin/env python # # 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. """Fingerprints the V8 snapshot blob files. Constructs a SHA256 fingerprint of the V8 natives and snapshot blob files and creates a ...
bsd-3-clause
1,358,686,302,995,075,800
27.395349
80
0.692465
false
shiblon/pytour
static/js/pypyjs/pypy-nojit.js-0.3.1/lib/modules/test/test_coding.py
121
1212
import test.test_support, unittest import os class CodingTest(unittest.TestCase): def test_bad_coding(self): module_name = 'bad_coding' self.verify_bad_module(module_name) def test_bad_coding2(self): module_name = 'bad_coding2' self.verify_bad_module(module_name) def veri...
apache-2.0
-2,760,748,927,685,283,300
31.756757
76
0.616337
false
cetic/ansible
lib/ansible/modules/network/cloudengine/ce_snmp_location.py
39
6774
#!/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 distribut...
gpl-3.0
-8,808,908,371,850,308,000
25.880952
95
0.596693
false
Tatsh/Clementine
dist/codesign.py
10
1320
#!/usr/bin/python2 # Emulates the behaviour of codesign --deep which is missing on OS X < 10.9 import os import re import subprocess import sys def SignPath(path, developer_id, deep=True): args = [ 'codesign', '--preserve-metadata=identifier,entitlements,resource-rules,requirements', '-s', developer_id,...
gpl-3.0
-8,318,172,586,712,644,000
25.938776
95
0.639394
false
aozima/rt-thread
bsp/taihu/rtconfig.py
52
1285
import os # toolchains options ARCH='ppc' CPU='ppc405' CROSS_TOOL='gcc' TextBase = '0x00000000' PLATFORM = 'gcc' EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' BUILD = 'debug' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') if PLATFORM == 'gcc': # toolchains PREFIX...
gpl-2.0
1,832,310,962,624,093,000
26.934783
131
0.595331
false
blefaudeux/Pinta
pinta/model/model_rnn.py
1
2323
import logging from typing import List import numpy as np import torch import torch.nn as nn from pinta.model.model_base import NN LOG = logging.getLogger("ConvRNN") class ConvRNN(NN): """ Combination of a convolutional front end and an RNN (GRU) layer below >> see https://gist.github.com/spro/c87cc706...
gpl-3.0
-6,373,979,256,973,989,000
28.0375
86
0.591477
false
mmalyska/eve-wspace
evewspace/SiteTracker/migrations/0003_auto__add_systemweight.py
17
15303
# -*- 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 model 'SystemWeight' db.create_table('SiteTracker_systemweight', ( ('system', self.gf('...
gpl-3.0
-3,545,544,864,596,970,500
74.762376
182
0.550284
false
tealover/nova
nova/network/api.py
17
23539
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
apache-2.0
-4,378,524,625,044,181,500
41.184588
79
0.609797
false
crakensio/django_training
lib/python2.7/site-packages/django/contrib/sessions/models.py
173
1997
from django.db import models from django.utils.translation import ugettext_lazy as _ class SessionManager(models.Manager): def encode(self, session_dict): """ Returns the given session dictionary serialized and encoded as a string. """ return SessionStore().encode(session_dict) ...
cc0-1.0
3,697,134,009,628,584,000
35.981481
80
0.68002
false
ArneBab/pypyjs
website/demo/home/rfk/repos/pypy/lib-python/2.7/plat-mac/lib-scriptpackages/StdSuites/__init__.py
73
12854
""" Package generated from /Volumes/Sap/System Folder/Extensions/AppleScript Resource aeut resid 0 Standard Event Suites for English """ from warnings import warnpy3k warnpy3k("In 3.x, the StdSuites package is removed.", stacklevel=2) import aetools Error = aetools.Error import Text_Suite import AppleScript_Suite imp...
mit
-1,221,008,212,516,907,500
26.061053
86
0.699238
false
nirmeshk/oh-mainline
vendor/packages/gdata/src/gdata/tlslite/HandshakeSettings.py
359
6364
"""Class for setting handshake parameters.""" from constants import CertificateType from utils import cryptomath from utils import cipherfactory class HandshakeSettings: """This class encapsulates various parameters that can be used with a TLS handshake. @sort: minKeySize, maxKeySize, cipherNames, certifi...
agpl-3.0
3,388,806,609,643,869,000
39.025157
76
0.641892
false
nyasara/azuremono-docker
IronPython-2.7.4/Lib/ctypes/_endian.py
51
2101
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### import sys from ctypes import * _array_type = type(c_int * 3) def _other_endian(typ): """Ret...
mit
-5,636,234,720,495,956,000
33.016667
76
0.540219
false
duramato/SickRage
tornado/template.py
142
31156
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
gpl-3.0
879,205,442,838,889,100
35.018497
98
0.577064
false
SDSG-Invenio/invenio
invenio/modules/formatter/format_elements/bfe_arxiv_link.py
13
1776
# This file is part of Invenio. # Copyright (C) 2014 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 later version. # # Invenio is d...
gpl-2.0
-7,887,750,564,828,021,000
36.787234
107
0.664414
false
alexandrul-ci/robotframework
src/robot/running/namespace.py
2
18101
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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
655,373,593,165,000,000
40.138636
85
0.595768
false
zero323/spark
python/pyspark/sql/tests/test_serde.py
23
6188
# # 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
2,659,824,447,473,668,000
40.530201
89
0.641726
false
PriceChild/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py
69
20312
#!/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
-8,742,478,343,534,994,000
32.684909
143
0.596101
false
alisidd/tensorflow
tensorflow/compiler/tests/adam_test.py
79
7193
# 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
-3,378,759,170,013,651,500
39.869318
80
0.622411
false
moto-timo/ironpython3
Src/StdLib/Lib/test/test_pep277.py
10
7007
# Test the Unicode versions of normal file functions # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir import os import sys import unittest import warnings from unicodedata import normalize from test import support filenames = [ '1_abc', '2_ascii', '3_Gr\xfc\xdf-Gott'...
apache-2.0
-467,772,535,308,125,630
34.933333
88
0.605823
false
bzennn/blog_flask
python/lib/python3.5/site-packages/wheel/metadata.py
62
11561
""" Tools for converting old- to new-style metadata. """ import email.parser import os.path import re import textwrap from collections import namedtuple, OrderedDict import pkg_resources from . import __version__ as wheel_version from .pkginfo import read_pkg_info from .util import OrderedDefaultDict METADATA_VERSI...
gpl-3.0
3,996,073,833,613,758,500
33.204142
99
0.594845
false
antsant/namebench
nb_third_party/dns/rdata.py
215
14860
# Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
-1,446,574,658,464,633,900
31.587719
86
0.602355
false
nguyentran/openviber
tools/scons-local/scons-local-2.0.1/SCons/Environment.py
61
91318
"""SCons.Environment Base class for construction Environments. These are the primary objects used to communicate dependency and construction information to the build engine. Keyword arguments supplied when the construction Environment is created are construction variables used to initialize the Environment """ # # ...
mit
2,234,776,760,919,675,600
38.395168
135
0.558203
false
joymarquis/mscc
general/lib/python/pexpect-4.0.1/pexpect/pxssh.py
12
18725
'''This class extends pexpect.spawn to specialize setting up SSH connections. This adds methods for login, logout, and expecting the shell prompt. PEXPECT LICENSE This license is approved by the OSI and FSF as GPL-compatible. http://opensource.org/licenses/isc-license.txt Copyright (c) 2012, Noah Spu...
gpl-3.0
2,238,996,445,178,845,200
45.12069
255
0.619546
false
Zkin/pf-kernel-updates
tools/perf/scripts/python/check-perf-trace.py
1997
2539
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
8,903,976,013,017,196,000
29.963415
78
0.64553
false
APM602/APM602
mk/PX4/Tools/genmsg/src/genmsg/template_tools.py
215
9443
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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...
gpl-3.0
-2,896,237,510,579,740,700
42.717593
146
0.644181
false
ville-k/tensorflow
tensorflow/python/kernel_tests/string_join_op_test.py
134
1896
# 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
-8,828,361,939,091,260,000
35.461538
80
0.647152
false
brandonium21/snowflake
snowflakeEnv/lib/python2.7/site-packages/pip/vcs/bazaar.py
280
4427
from __future__ import absolute_import import logging import os import tempfile import re # TODO: Get this into six.moves.urllib.parse try: from urllib import parse as urllib_parse except ImportError: import urlparse as urllib_parse from pip.utils import rmtree, display_path from pip.vcs import vcs, VersionC...
bsd-2-clause
-5,683,181,305,543,581,000
32.537879
79
0.545516
false
etuna-SBF-kog/Stadsparken
env/lib/python2.7/site-packages/django/contrib/auth/hashers.py
2
15500
import functools import hashlib from django.conf import settings from django.utils import importlib from django.utils.datastructures import SortedDict from django.utils.encoding import smart_str from django.core.exceptions import ImproperlyConfigured from django.utils.crypto import ( pbkdf2, constant_time_compare,...
gpl-3.0
379,891,299,878,125,100
32.477322
85
0.630129
false
srajag/contrail-controller
src/config/common/svc_info.py
9
2236
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # _MGMT_STR = "management" _LEFT_STR = "left" _RIGHT_STR = "right" _SVC_VN_MGMT = "svc-vn-mgmt" _SVC_VN_LEFT = "svc-vn-left" _SVC_VN_RIGHT = "svc-vn-right" _VN_MGMT_SUBNET_CIDR = '10.250.1.0/24' _VN_LEFT_SUBNET_CIDR = '10.250.2.0/24' _VN_RIGHT_SUBNET_...
apache-2.0
3,348,741,132,744,944,600
21.585859
64
0.681574
false
google/starthinker
dags/sheets_copy_dag.py
1
4462
########################################################################### # # 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 # # https://www.apache.org/l...
apache-2.0
1,329,078,104,768,230,100
29.353741
145
0.53429
false
jtattermusch/grpc
src/python/grpcio/grpc/experimental/session_cache.py
27
1533
# Copyright 2018 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
-8,292,878,371,721,113,000
33.066667
89
0.72407
false
jstoja/TsinghuaMailSystem
src/com/mailsystem/__main__.py
1
1654
#!/usr/bin/env python # coding: utf-8 import sys import json import argparse from bottle import run import src.com.mailsystem.api.routes as api import src.com.mailsystem.codes as codes from src.com.mailsystem.orm.Database import Database from src.com.mailsystem.populate import populate_db def read_config(setup_fil...
mit
-3,172,127,379,199,545,000
24.446154
75
0.598549
false
openstack/keystone
keystone/common/sql/expand_repo/versions/066_expand_add_role_and_project_option_tables.py
2
1880
# 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
1,087,692,778,344,981,500
35.862745
77
0.65266
false
SecurityFTW/cs-suite
tools/Scout2/AWSScout2/services/cloudformation.py
3
1472
# -*- coding: utf-8 -*- import json from AWSScout2.configs.regions import RegionalServiceConfig, RegionConfig, api_clients ######################################## # CloudFormationRegionConfig ######################################## class CloudFormationRegionConfig(RegionConfig): """ CloudFormation confi...
gpl-3.0
-305,419,418,660,980,740
30.319149
86
0.58288
false
xuweiliang/Codelibrary
openstack_dashboard/api/authcode_back.py
1
2953
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time import base64 import hashlib class AuthCode(object): @classmethod def code_init(cls, cipher): try: encrypted_data = getattr(cipher, 'encrypted_license') encrypted_str = encrypted_data.strip() decr...
apache-2.0
-6,609,390,570,486,604,000
28.237624
107
0.483915
false
ashhher3/cvxpy
cvxpy/atoms/elementwise/elementwise.py
10
1354
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
6,384,567,152,979,306,000
29.772727
73
0.694239
false
JackKelly/neuralnilm_prototype
scripts/e127.py
2
4534
from __future__ import print_function, division import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import c...
mit
-3,386,471,041,713,052,000
24.47191
92
0.576533
false