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
pchaigno/grreat
gui/api_object_renderers.py
2
11656
#!/usr/bin/env python """This module contains RESTful API renderers for AFF4 objects and RDFValues.""" import itertools import numbers import re from grr.lib import aff4 from grr.lib import rdfvalue from grr.lib import registry from grr.lib import utils from grr.lib.rdfvalues import structs class ApiObjectRendere...
apache-2.0
-7,277,226,933,335,509,000
30.934247
80
0.650137
false
buntyke/Flask
microblog/flask/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_insert.py
115
8132
from .. import fixtures, config from ..config import requirements from .. import exclusions from ..assertions import eq_ from .. import engines from sqlalchemy import Integer, String, select, literal_column, literal from ..schema import Table, Column class LastrowidTest(fixtures.TablesTest): run_deletes = 'each...
mit
6,111,832,288,551,379,000
29.230483
78
0.520413
false
svn2github/google-protobuf
python/google/protobuf/internal/reflection_test.py
23
120400
#! /usr/bin/python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
bsd-3-clause
-840,442,938,026,564,000
40.032038
84
0.70262
false
undoware/neutron-drive
google_appengine/google/appengine/_internal/django/core/servers/fastcgi.py
23
6483
""" FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is a adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standalo...
bsd-3-clause
5,639,596,580,653,893,000
34.42623
95
0.630881
false
eneldoserrata/marcos_openerp
addons/report_geraldo/lib/geraldo/site/newsite/site-geraldo/django/contrib/sessions/models.py
25
2675
import base64 import cPickle as pickle from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.utils.hashcompat import md5_constructor class SessionManager(models.Manager): def encode(self, session_dict): """ Returns the gi...
agpl-3.0
8,379,739,849,014,758,000
38.925373
86
0.675514
false
janocat/odoo
openerp/modules/loading.py
131
21198
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
-6,376,758,463,459,973,000
44.784017
147
0.585385
false
phlax/pootle
pootle/apps/pootle_app/views/admin/util.py
7
6759
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django import forms from django.forms.m...
gpl-3.0
-7,850,607,531,468,824,000
35.33871
79
0.599497
false
emiprotechnologies/connector-magento
__unported__/magentoerpconnect_export_partner/connector.py
32
1031
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
agpl-3.0
-8,833,262,907,906,360,000
40.24
78
0.617847
false
liyitest/rr
openstack_dashboard/usage/views.py
19
3332
# 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
4,509,277,767,616,049,700
39.634146
79
0.605042
false
mattclark/osf.io
osf/models/analytics.py
1
8085
import logging from dateutil import parser from django.db import models, transaction from django.db.models import Sum from django.db.models.expressions import RawSQL from django.utils import timezone from framework.sessions import session from osf.models.base import BaseModel, Guid from osf.models.files import BaseFi...
apache-2.0
-3,922,777,190,991,896,600
40.25
155
0.587013
false
rajrohith/blobstore
azure/storage/blob/appendblobservice.py
1
27806
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
apache-2.0
2,562,339,810,262,622,700
48.740608
109
0.636599
false
SaschaMester/delicium
build/android/pylib/gtest/gtest_test_instance_test.py
74
2367
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from pylib.gtest import gtest_test_instance class GtestTestInstanceTests(unittest.TestCase): def testParseGTestLi...
bsd-3-clause
8,328,131,488,996,295,000
26.523256
72
0.661597
false
zhaowenxiang/chisch
chisch/local_settings.py
1
2131
# -*- coding: utf-8 -*- """ Django local_settings for chisch project. import by 'setting.py. """ # Open malicious authentication OPEN_MRP = False OPEN_SSM = False # The name of the certificate ACCESS_TOKEN_NAME = 'Access-Token' # universal verify code UNIVERSAL_VERIFY_CODE = "888888" ALIYUN_OSS = { 'BUCKET_NAM...
mit
-3,275,899,260,648,494,600
26.743243
77
0.601072
false
alivecor/tensorflow
tensorflow/contrib/framework/python/framework/__init__.py
43
1458
# 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
921,204,177,520,799,200
47.6
83
0.758573
false
keelhaule/alfanous
conf.py
5
8206
# -*- coding: utf-8 -*- # # Alfanous Quranic Search Engine documentation build configuration file, created by # sphinx-quickstart on Tue Jul 8 07:42:48 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # auto...
agpl-3.0
-4,448,920,611,093,793,000
32.222672
148
0.710943
false
harmodio/poesiapueril
poesiapuerilbot.py
1
3499
#/usr/bin/env python3 # -*- coding: utf8 -*- ## ## Copyright (c) 2017 Jorge Harmodio ## poesiapuerilbot 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 ## ...
gpl-3.0
8,752,771,642,665,801,000
40.129412
94
0.638158
false
stephane-martin/salt-debian-packaging
salt-2016.3.2/tests/unit/beacons/adb_beacon_test.py
2
12498
# coding: utf-8 # Python libs from __future__ import absolute_import # Salt libs from salt.beacons import adb # Salt testing libs from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch, Mock # Globals adb.__salt__ = {} ...
apache-2.0
-2,684,216,269,642,742,300
33.524862
107
0.521523
false
NCAR/mizuRoute
manage_externals/test/doc/conf.py
1
5279
# -*- coding: utf-8 -*- # # Manage Externals documentation build configuration file, created by # sphinx-quickstart on Wed Nov 29 10:53:25 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
gpl-3.0
5,567,753,618,490,878,000
29.69186
79
0.677022
false
davgibbs/django
tests/get_object_or_404/models.py
409
1133
""" DB-API Shortcuts ``get_object_or_404()`` is a shortcut function to be used in view functions for performing a ``get()`` lookup and raising a ``Http404`` exception if a ``DoesNotExist`` exception was raised during the ``get()`` call. ``get_list_or_404()`` is a shortcut function to be used in view functions for per...
bsd-3-clause
-8,077,363,394,293,510,000
28.815789
96
0.706973
false
c7zero/chipsec
chipsec/modules/common/secureboot/variables.py
9
7895
#CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2015, Intel Corporation # #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as published by the Free Software Foundation; Version 2. # #This program is distributed in the hope...
gpl-2.0
2,682,047,869,320,711,000
43.857955
139
0.579481
false
sebfung/yellowpillowcase
vendor/cache/gems/pygments.rb-0.6.3/vendor/pygments-main/setup.py
36
2931
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Hig...
mit
8,159,362,825,115,150,000
31.566667
85
0.620266
false
munyirik/python
cpython/Lib/test/test_threading.py
2
39155
""" Tests for the threading module. """ import test.support from test.support import verbose, strip_python_stderr, import_module, cpython_only from test.support.script_helper import assert_python_ok, assert_python_failure import random import re import sys _thread = import_module('_thread') threading = import_module(...
bsd-3-clause
-5,379,710,562,470,613,000
34.530853
89
0.55242
false
Dino0631/RedRain-Bot
lib/youtube_dl/extractor/alphaporno.py
64
2724
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_iso8601, parse_duration, parse_filesize, int_or_none, ) class AlphaPornoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?alphaporno\.com/videos/(?P<id>[^/]+)' _TEST = { 'url': 'ht...
gpl-3.0
-7,001,275,518,864,416,000
34.376623
99
0.534875
false
Dino0631/RedRain-Bot
cogs/lib/youtube_dl/extractor/miomio.py
61
5068
# coding: utf-8 from __future__ import unicode_literals import random from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( xpath_text, int_or_none, ExtractorError, sanitized_Request, ) class MioMioIE(InfoExtractor): IE_NAME = 'miomio.tv' _VALID_URL = r...
gpl-3.0
3,032,880,996,017,745,000
33.964539
118
0.534686
false
40123242/cdw11-bg3
static/plugin/liquid_tags/diag.py
270
4096
""" Blockdiag Tag --------- This tag implements a liquid style tag for blockdiag [1]. You can use different diagram types like blockdiag, seqdiag, packetdiag etc. [1] [1] http://blockdiag.com/en/blockdiag/ Syntax ------ {% blockdiag { <diagramm type> { <CODE> } } %} Examples -------...
agpl-3.0
625,922,952,458,892,900
22.141243
136
0.532471
false
beezee/GAE-Django-site
django/contrib/gis/geos/tests/test_geos_mutation.py
245
5464
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Modified from original contribution by Aryeh Leib Taurog, which was # released under the New BSD license. import django.utils.copycompat as copy from django.contrib.gis.geos import * from django.contrib.gis.geos.error import GEOSIndexError from djang...
bsd-3-clause
2,208,856,231,685,410,300
38.883212
104
0.554356
false
notriddle/servo
tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_terminal.py
30
40391
""" terminal reporting of the full testing process. """ from __future__ import absolute_import, division, print_function import collections import sys import pluggy import _pytest._code import py import pytest from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.terminal import TerminalReporter, repr_pythonvers...
mpl-2.0
5,908,586,696,443,622,000
30.879242
106
0.517566
false
dago/ansible-modules-extras
notification/nexmo.py
153
3819
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net> # # 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, ...
gpl-3.0
-4,732,420,763,299,700,000
26.085106
82
0.618748
false
camilonova/sentry
src/sentry/web/forms/__init__.py
15
3194
""" sentry.web.forms ~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django import forms from django.utils.translation import ugettext_lazy as _ from sentry.constants import HTTP_...
bsd-3-clause
-8,581,853,727,075,517,000
32.978723
99
0.659048
false
mrgloom/DeepCL
cog-batteries/cog_fluent.py
6
4556
# Copyright Hugh Perkins 2014,2015 hughperkins at gmail # # 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/. import cog def go(classname, ints = [], floats = []): c...
mpl-2.0
-1,334,337,233,916,262,700
41.981132
94
0.513169
false
gmalmquist/pants
contrib/cpp/src/python/pants/contrib/cpp/targets/cpp_binary.py
14
1101
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.base.payl...
apache-2.0
-1,457,806,170,085,769,000
31.382353
93
0.673025
false
jhsenjaliya/incubator-airflow
airflow/api/common/experimental/trigger_dag.py
9
1706
# -*- coding: utf-8 -*- # # 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 ...
apache-2.0
-402,296,971,686,159,040
27.915254
79
0.678781
false
Pirata-Repository/Pirata
plugin.video.movie25/resources/libs/documentaries/documentary.py
2
18086
import urllib,urllib2,re,cookielib,urlresolver,sys,os import xbmc, xbmcgui, xbmcaddon, xbmcplugin from resources.libs import main #Mash Up - by Mash2k3 2012. from t0mm0.common.addon import Addon from resources.universal import playbackengine, watchhistory addon_id = 'plugin.video.movie25' selfAddon = xbmcaddon.Addon(...
gpl-2.0
-2,529,665,593,083,284,000
54.140244
256
0.525876
false
Polyconseil/tornado
tornado/test/template_test.py
63
18390
from __future__ import absolute_import, division, print_function, with_statement import os import sys import traceback from tornado.escape import utf8, native_str, to_unicode from tornado.template import Template, DictLoader, ParseError, Loader from tornado.test.util import unittest from tornado.util import u, Object...
apache-2.0
7,295,087,187,409,388,000
37.232848
124
0.545459
false
fighterCui/L4ReFiascoOC
l4/pkg/python/contrib/Lib/test/test_startfile.py
77
1201
# Ridiculously simple test of the os.startfile function for Windows. # # empty.vbs is an empty file (except for a comment), which does # nothing when run with cscript or wscript. # # A possible improvement would be to have empty.vbs do something that # we can detect here, to make sure that not only the os.startfile() #...
gpl-2.0
4,059,184,933,307,990,000
31.459459
76
0.691091
false
eLBati/odoo
addons/sale_journal/__init__.py
443
1067
# -*- 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
-8,675,248,885,532,506,000
41.68
78
0.614808
false
Plain-Andy-legacy/android_external_chromium_org
tools/telemetry/telemetry/web_components/web_components_project.py
45
1359
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from telemetry.core import util from trace_viewer import trace_viewer_project def _FindAllFilesRecursive(source_paths, pred): all_filenames = ...
bsd-3-clause
-8,483,411,306,923,649,000
32.975
77
0.679176
false
songmonit/CTTMSONLINE
addons/account/wizard/account_change_currency.py
385
3751
# -*- encoding: 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 G...
agpl-3.0
3,110,865,850,051,920,000
47.714286
132
0.597974
false
ma-compbio/PEP
genVecs.py
1
7271
#encoding:utf-8 from gensim.models import Word2Vec from gensim.models.word2vec import LineSentence import pandas as pd import numpy as np import os import sys import math import random import processSeq import warnings import threading from multiprocessing.dummy import Pool as ThreadPool from sklearn imp...
mit
-1,418,906,687,575,747,000
29.206009
111
0.683537
false
Karosuo/Linux_tools
xls_handlers/xls_sum_venv/lib/python3.6/site-packages/wheel/cli/pack.py
8
2263
from __future__ import print_function import os.path import re import sys from wheel.cli import WheelError from wheel.wheelfile import WheelFile DIST_INFO_RE = re.compile(r"^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$") def pack(directory, dest_dir, build_number): """Repack a previously unpacked whee...
gpl-3.0
-1,602,685,190,057,727,500
38.017241
98
0.642952
false
brianhelba/pylibtiff
libtiff/tiff_sample_plane.py
2
11678
""" Implements TIFF sample plane. """ # Author: Pearu Peterson # Created: Jan 2011 import numpy import tif_lzw __all__ = ['TiffSamplePlane'] def set_array(output_array, input_array): dtype = numpy.uint8 numpy.frombuffer(output_array.data, dtype=dtype)[:] = numpy.frombuffer(input_array.data, dtype=dtype) cl...
bsd-3-clause
-2,672,315,780,794,638,300
39.408304
192
0.57664
false
jalexvig/tensorflow
tensorflow/contrib/gan/python/eval/python/summaries_impl.py
15
8343
# 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
7,843,686,979,834,491,000
36.412556
80
0.706101
false
charlesvdv/servo
tests/wpt/web-platform-tests/tools/six/test_six.py
418
22226
import operator import sys import types import py import six def test_add_doc(): def f(): """Icky doc""" pass six._add_doc(f, """New doc""") assert f.__doc__ == "New doc" def test_import_module(): from logging import handlers m = six._import_module("logging.handlers") asser...
mpl-2.0
6,219,015,943,173,747,000
27.241423
97
0.58877
false
thnee/ansible
lib/ansible/modules/cloud/amazon/aws_ses_rule_set.py
13
8315
#!/usr/bin/python # Copyright (c) 2017, Ben Tomasik <ben@tomasik.io> # 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,478,112,122,292,689,000
31.73622
140
0.642814
false
noelbk/neutron-juniper
neutron/plugins/nec/db/api.py
9
7966
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 NEC Corporation. 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.or...
apache-2.0
7,108,348,914,384,952,000
33.188841
78
0.625659
false
F5Networks/f5-common-python
f5/bigip/tm/asm/test/functional/test_signature_statuses.py
1
2730
# Copyright 2015 F5 Networks 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 writi...
apache-2.0
-731,689,270,512,665,200
40.363636
89
0.692308
false
shaufi10/odoo
openerp/addons/base/ir/ir_exports.py
338
1672
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
725,517,684,823,619,500
36.155556
94
0.586124
false
cucs-numpde/class
fdtools.py
1
3922
import numpy def cosspace(a, b, n=50): return (a + b)/2 + (b - a)/2 * (numpy.cos(numpy.linspace(-numpy.pi, 0, n))) def vander_chebyshev(x, n=None): if n is None: n = len(x) T = numpy.ones((len(x), n)) if n > 1: T[:,1] = x for k in range(2,n): T[:,k] = 2 * x * T[:,k-1] - T[:...
bsd-2-clause
-1,203,509,709,460,108,800
27.838235
106
0.478327
false
UrusTeam/android_ndk_toolchain_cross
lib/python2.7/ctypes/test/test_arrays.py
72
4269
import unittest from ctypes import * formats = "bBhHiIlLqQfd" formats = c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, \ c_long, c_ulonglong, c_float, c_double, c_longdouble class ArrayTestCase(unittest.TestCase): def test_simple(self): # create classes holding simple numeric types, and che...
gpl-2.0
1,291,114,521,704,471,300
30.858209
74
0.548606
false
arpankapoor/pambu
pambu.py
1
9458
#!/usr/bin/env python3 import copy import curses import curses.ascii from enum import Enum import locale import math import sys import signal class Direction(Enum): north, east, south, west = range(4) def is_opp(self, other): return ((self == Direction.north and other == Direction.south) or ...
isc
8,667,717,734,897,335,000
31.501718
130
0.533411
false
theflofly/tensorflow
tensorflow/tools/docs/doc_generator_visitor.py
9
10118
# 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
8,502,523,155,235,694,000
34.626761
80
0.658035
false
wartman4404/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/standalone.py
410
46785
#!/usr/bin/env python # # Copyright 2012, 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...
mpl-2.0
-9,203,037,277,841,670,000
38.216262
80
0.589249
false
philoniare/horizon
openstack_dashboard/test/integration_tests/tests/test_user_create_delete.py
16
1186
# 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
3,659,609,443,971,908,000
42.925926
78
0.700675
false
wevote/WeVoteServer
elected_office/urls.py
1
1066
# elected_office/urls.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.conf.urls import re_path from . import views_admin urlpatterns = [ # views_admin re_path(r'^$', views_admin.elected_office_list_view, name='elected_office_list', ), re_path(r'^delete/$', views_admin.elected...
mit
5,324,175,033,883,957,000
49.761905
120
0.69137
false
vincepandolfo/django
django/contrib/auth/management/commands/changepassword.py
4
2639
from __future__ import unicode_literals import getpass from django.contrib.auth import get_user_model from django.contrib.auth.password_validation import validate_password from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT...
bsd-3-clause
-2,274,539,071,948,456,200
34.662162
103
0.597954
false
tensorflow/lingvo
lingvo/tools/beam_utils.py
1
3573
# Lint as: python3 # 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 ...
apache-2.0
8,200,211,608,645,151,000
30.069565
80
0.707809
false
zofuthan/edx-platform
common/lib/xmodule/xmodule/library_root_xblock.py
47
5037
""" 'library' XBlock (LibraryRoot) """ import logging from xmodule.studio_editable import StudioEditableModule from xblock.fields import Scope, String, List, Boolean from xblock.fragment import Fragment from xblock.core import XBlock log = logging.getLogger(__name__) # Make '_' a no-op so we can scrape strings _ = ...
agpl-3.0
-1,216,554,820,114,427,400
36.311111
118
0.625174
false
mnunberg/couchbase-python-client
examples/search_keywords.py
1
3016
#!/usr/bin/env python # # Copyright 2013, Couchbase, 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 r...
apache-2.0
4,338,166,786,258,678,300
30.416667
78
0.613395
false
jackru/pybrain
pybrain/rl/environments/simplerace/simpleracetcp.py
25
4101
from __future__ import print_function __author__ = 'Julian Togelius, julian@idsia.ch' from pybrain.rl.environments import Environment from math import sqrt import socket import string from scipy import zeros class SimpleraceEnvironment(Environment): firstCarScore = 0 secondCarScore = 0 lastStepCurrentWp...
bsd-3-clause
-927,768,900,925,742,200
35.616071
153
0.52158
false
arkatebi/DynamicalSystems
toggleSwitch/tSwitch-det-pSet-3.py
1
9567
#/usr/bin/env python import auxiliary_functions as aux import PyDSTool as dst from PyDSTool import common as cmn import numpy as np from matplotlib import pyplot as plt import sys #------------------------------------------------------------------------------# def defineSystem(): ''' Create an object that def...
gpl-3.0
-2,041,364,280,348,762,000
37.732794
80
0.486987
false
thomasgilgenast/spqr-nonrel
django/contrib/localflavor/uy/forms.py
310
2083
# -*- coding: utf-8 -*- """ UY-specific form helpers. """ import re from django.core.validators import EMPTY_VALUES from django.forms.fields import Select, RegexField from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from django.contrib.localflavor.uy.util import get_vali...
bsd-3-clause
4,501,689,286,524,326,000
33.716667
95
0.62554
false
catapult-project/catapult
dashboard/dashboard/update_test_suites_test.py
3
13778
# 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. from __future__ import print_function from __future__ import division from __future__ import absolute_import import unittest import webapp2 import webtest ...
bsd-3-clause
-5,500,318,224,445,049,000
28.503212
80
0.409784
false
Odingod/mne-python
mne/gui/tests/test_kit2fiff_gui.py
13
3412
# Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import os import warnings import numpy as np from numpy.testing import assert_allclose, assert_array_equal from nose.tools import assert_true, assert_false, assert_equal import mne from mne.io.kit.tests import data_dir as kit_data_...
bsd-3-clause
546,221,746,524,923,460
31.188679
69
0.66823
false
t-artistik/browserscope
categories/richtext2/tests/forwarddelete.py
14
15254
FORWARDDELETE_TESTS = { 'id': 'FD', 'caption': 'Forward-Delete Tests', 'command': 'forwardDelete', 'checkAttrs': True, 'checkStyle': False, 'Proposed': [ { 'desc': '', 'tests': [ ] }, { 'desc': 'forward-delete single characters', 'tests': ...
apache-2.0
7,594,298,882,866,077,000
47.425397
137
0.456339
false
slightstone/SickRage
lib/hachoir_parser/image/tga.py
90
2927
""" Truevision Targa Graphic (TGA) picture parser. Author: Victor Stinner Creation: 18 december 2006 """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import FieldSet, UInt8, UInt16, Enum, RawBytes from lib.hachoir_core.endian import LITTLE_ENDIAN from lib.hachoir_parser.image.common import Palett...
gpl-3.0
-4,023,663,025,822,488,600
33.435294
86
0.567475
false
nacc/autotest
mirror/config-sample.py
6
4369
""" Sample configuration file for the "mirror" script that will use rsync://rsync.kernel.org to fetch a kernel file list and schedule jobs on new kernel releases. This file has to be valid python code executed by the "mirror" script. The file may define and do anything but the following "names" are special: - a globa...
gpl-2.0
-5,366,178,294,447,292,000
45.978495
79
0.706111
false
wenxer/fbone
fbone/settings/views.py
8
2765
# -*- coding: utf-8 -*- import os import hashlib from datetime import datetime from flask import Blueprint, render_template, current_app, request, flash from flask.ext.login import login_required, current_user from ..extensions import db from ..user import User from ..utils import allowed_file, make_dir from .forms...
bsd-3-clause
-8,871,672,834,084,120,000
32.719512
104
0.620253
false
newmediamedicine/indivo_server_1_0
indivo/tests/integration/test_modules/messaging.py
1
2631
import data PRD = 'prd' from utils import * def test_messaging(IndivoClient): try: BODY = 'body' SUBJECT = 'subject' MSG_ID = 'message_id' SEVERITY = 'severity' admin_client = IndivoClient(data.machine_app_email, data.machine_app_secret) admin_client.set_app_id(data.app_email) ac...
gpl-3.0
-3,509,521,892,431,867,000
40.109375
162
0.617636
false
anaruse/chainer
tests/chainer_tests/utils_tests/test_type_check.py
2
11918
import sys import unittest import numpy from chainer.backends import cuda from chainer import testing from chainer.testing import attr from chainer.utils import type_check as T class TestConstant(unittest.TestCase): def setUp(self): self.x = T.Constant(10) def test_str(self): self.assertEq...
mit
-6,694,363,271,389,401,000
29.09596
75
0.52685
false
JamesTFarrington/flask
flask/debughelpers.py
318
6024
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string, text_type from .app import Flask from .bl...
bsd-3-clause
153,376,277,367,974,400
37.864516
83
0.586819
false
PeterDaveHello/eden
modules/templates/CRMT/controllers.py
20
3102
# -*- coding: utf-8 -*- from gluon import current #from gluon.html import * from gluon.storage import Storage from s3 import S3CustomController THEME = "CRMT" # ============================================================================= class index(S3CustomController): """ Custom Home Page """ def __call...
mit
-5,698,911,844,655,157,000
35.494118
81
0.413282
false
2014c2g12/c2g12
c2wp/w2/static/Brython2.0.0-20140209-164925/Lib/ui/slider.py
111
2275
import widget from browser import doc,html class Slider(widget.Widget): def __init__(self, id=None, label=False): self._div_shell=html.DIV(Class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all") widget.Widget.__init__(self, self._div_shell, 'slider', id) self._handle=h...
gpl-2.0
990,390,930,725,214,300
30.597222
112
0.600879
false
uclaros/QGIS
tests/src/python/test_selective_masking.py
22
29190
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsVirtualLayerDefinition From build dir, run: ctest -R PyQgsSelectiveMasking -V QGIS_PREFIX_PATH=/home/hme/src/QGIS/build_ninja/output PYTHONPATH=/home/hme/src/QGIS/build_ninja/output/python/:/home/hme/src/QGIS/build_ninja/output/python/plugins:/home/hme/src/QGIS/tests/...
gpl-2.0
8,355,357,951,410,459,000
40.404255
262
0.614183
false
CapOM/ChromiumGStreamerBackend
chrome/test/chromedriver/embed_js_in_cpp.py
165
1485
#!/usr/bin/env python # 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. """Embeds standalone JavaScript snippets in C++ code. Each argument to the script must be a file containing an associated JavaScri...
bsd-3-clause
-1,214,148,523,748,064,500
32
78
0.680135
false
JoaquimPatriarca/senpy-for-gis
gasp/gdal/manage/general.py
1
3528
""" General tools for data management """ def copy_features(inLyr, outLyr, outDefn, only_geom=True): """ Copy the features of one layer to another layer... If the layers have the same fields, this method could also copy the tabular data TODO: See if the input is a layer or not and make ar...
gpl-3.0
-1,015,224,049,050,324,400
28.4
81
0.541667
false
hkariti/ansible
test/runner/lib/sanity/ansible_doc.py
16
3498
"""Sanity test for ansible-doc.""" from __future__ import absolute_import, print_function import re from lib.sanity import ( SanityMultipleVersion, SanityFailure, SanitySuccess, SanitySkipped, SanityMessage, ) from lib.util import ( SubprocessError, display, intercept_command, ) from...
gpl-3.0
-5,135,083,825,371,624,000
32
138
0.602916
false
ryfeus/lambda-packs
Tensorflow/source/tensorboard/plugins/distribution/distributions_plugin.py
5
3411
# 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...
mit
5,950,952,465,529,346,000
33.806122
80
0.701847
false
telwertowski/QGIS
tests/src/python/test_qgscolorbutton.py
35
3786
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsColorButton. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __...
gpl-2.0
-6,647,135,460,310,048,000
33.733945
127
0.644216
false
tingletech/solr_api
testindex/grab_random_solr_docs.py
1
2229
import solr import random import json import datetime SOLR_NEW = solr.Solr('http://127.0.0.1:8983/solr/dc-collection') SOLR=solr.SearchHandler(solr.Solr('https://registry.cdlib.org/solr', post_headers = { 'X-Authentication-Token':'xxxyyyzzz'}), "/query") def get_collection_urls(): q_collections=SOLR(q="*:*", rows...
bsd-3-clause
5,988,211,790,530,985,000
32.268657
83
0.605653
false
matteo88/gasistafelice
gasistafelice/rest/views/blocks/transactions.py
2
6543
from django.utils.translation import ugettext as _, ugettext_lazy as _lazy from django.core import urlresolvers from django.http import HttpResponse, HttpResponseServerError from flexi_auth.models import ObjectWithContext from gasistafelice.rest.views.blocks.base import BlockSSDataTables, ResourceBlockAction, CREATE_...
agpl-3.0
-1,768,851,906,807,601,700
35.966102
134
0.583066
false
lostdj/Jaklin-OpenJFX
modules/web/src/main/native/Tools/gtk/gtkdoc.py
2
18084
# Copyright (C) 2011 Igalia S.L. # # 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 of the License, or (at your option) any later version. # # This library is distribute...
gpl-2.0
405,790,641,965,444,400
41.650943
110
0.575592
false
jumpstarter-io/cinder
cinder/tests/brick/fake_lvm.py
9
2074
# 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
454,912,133,152,369,660
26.653333
79
0.631148
false
puneetgkaur/backup_sugar_shell_for_cordova
src/jarabe/model/screen.py
4
1532
# Copyright (C) 2006-2008 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distribute...
gpl-2.0
2,906,281,008,176,276,500
33.044444
76
0.701044
false
onecue/pybbm
test/test_project/test_app/south_migrations/0001_initial.py
6
8667
# -*- 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 from pybb.compat import get_image_field_full_name, get_user_model_path, get_user_frozen_models AUTH_USER = get_user_model_path() class Migration(Schema...
bsd-2-clause
-9,191,989,882,362,526,000
64.172932
193
0.586593
false
chouseknecht/galaxy
galaxy/wsgi.py
1
1085
# (c) 2012-2018, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
apache-2.0
3,226,432,793,933,311,000
30.911765
73
0.76129
false
dcalacci/Interactive_estimation
game/interactive/migrations/0001_squashed_0011_interactive_channel.py
2
3024
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-25 06:31 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): replaces = [('interactive', '0001_initial'), ('intera...
mit
3,200,143,205,543,564,300
42.826087
489
0.60086
false
interactomix/iis
iis/tests/test_daemonize.py
1
1182
import time from iis.extensions import db from test_utils.base import BaseTestCase from iis.util.daemons import daemonize import iis.models class TestDaemonize(BaseTestCase): DAEMON_PID_PATH = "/tmp" def test_no_exception_raised_and_returns_pid(self): self.app.logger.debug("Testing daemonize") ...
agpl-3.0
2,391,770,002,420,793,300
35.9375
78
0.614213
false
SRabbelier/Melange
app/soc/modules/gci/logic/models/timeline.py
1
1347
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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 applic...
apache-2.0
4,513,322,473,889,183,000
27.659574
74
0.701559
false
hojel/calibre
src/chardet/escprober.py
215
3029
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
-1,624,288,395,901,451,500
37.341772
81
0.623638
false
Vimos/scikit-learn
sklearn/metrics/__init__.py
28
3604
""" The :mod:`sklearn.metrics` module includes score functions, performance metrics and pairwise metrics and distance computations. """ from .ranking import auc from .ranking import average_precision_score from .ranking import coverage_error from .ranking import label_ranking_average_precision_score from .ranking imp...
bsd-3-clause
-9,053,754,419,972,987,000
30.068966
79
0.758879
false
nikitasingh981/scikit-learn
sklearn/decomposition/fastica_.py
9
18717
""" Python implementation of the fast ICA algorithms. Reference: Tables 8.3 and 8.4 page 196 in the book: Independent Component Analysis, by Hyvarinen et al. """ # Authors: Pierre Lafaye de Micheaux, Stefan van der Walt, Gael Varoquaux, # Bertrand Thirion, Alexandre Gramfort, Denis A. Engemann # License: BS...
bsd-3-clause
-5,049,595,735,058,600,000
31.382353
87
0.587594
false
sysalexis/kbengine
kbe/src/lib/python/Lib/tokenize.py
78
24876
"""Tokenization help for Python programs. tokenize(readline) is a generator that breaks a stream of bytes into Python tokens. It decodes the bytes according to PEP-0263 for determining source file encoding. It accepts a readline-like method which is called repeatedly to get the next line of input (or b"" for EOF). ...
lgpl-3.0
4,470,033,518,050,312,000
35
83
0.514994
false
pattisdr/osf.io
osf/migrations/0086_pre_migrate_collections.py
17
4590
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-03-05 16:30 from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import osf.models.validato...
apache-2.0
-7,832,653,434,278,711,000
49.43956
174
0.61329
false
DarkSand/Sasila
sasila/system_normal/downloader/http/selenium_response.py
1
1112
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import re from posixpath import normpath if sys.version_info < (3, 0): reload(sys) sys.setdefaultencoding('utf-8') from urlparse import urljoin, urlparse, urlunparse else: from urllib.parse import urljoin, urlparse, urlunparse class SeleniumRes...
apache-2.0
-6,278,777,995,057,327,000
28.263158
121
0.603417
false
apixandru/intellij-community
python/lib/Lib/site-packages/django/db/backends/sqlite3/base.py
93
12206
""" SQLite3 backend for django. Python 2.4 requires pysqlite2 (http://pysqlite.org/). Python 2.5 and later can use a pysqlite2 module or the sqlite3 module in the standard library. """ import re import sys import datetime from django.db import utils from django.db.backends import * from django.db.backends.signals i...
apache-2.0
3,400,505,049,174,793,000
39.686667
129
0.642143
false
sxjscience/tvm
python/tvm/relay/frontend/qnn_torch.py
2
27334
# 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
-9,203,850,802,481,740,000
34.088575
99
0.601339
false
lamby/jenkins.debian.net
bin/reproducible_scheduler.py
1
31885
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Copyright © 2015 Mattia Rizzolo <mattia@mapreri.org> # Copyright © 2015-2017 Holger Levsen <holger@layer-acht.org> # Based on reproducible_scheduler.sh © 2014-2015 Holger Levsen <holger@layer-acht.org> # Licensed under GPL-2 # # Depends: python3 python3-debian # # Schedule...
gpl-2.0
7,887,690,692,806,665,000
40.785059
124
0.545072
false
sdague/home-assistant
homeassistant/components/lifx_cloud/scene.py
15
2756
"""Support for LIFX Cloud scenes.""" import asyncio import logging from typing import Any import aiohttp from aiohttp.hdrs import AUTHORIZATION import async_timeout import voluptuous as vol from homeassistant.components.scene import Scene from homeassistant.const import ( CONF_PLATFORM, CONF_TIMEOUT, CONF...
apache-2.0
-475,669,396,795,656,100
28.634409
86
0.653483
false
tiexinliu/odoo_addons
smile_model_methods/wizard/wizard_ir_model_method.py
5
1527
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Smile (<http://www.smile.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
agpl-3.0
-1,046,811,137,113,192,200
41.416667
121
0.626064
false
alfredodeza/boto
boto/sqs/regioninfo.py
167
1524
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 res...
mit
2,435,055,160,840,179,000
45.181818
74
0.739501
false