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
puckipedia/youtube-dl
youtube_dl/extractor/brightcove.py
89
15403
# encoding: utf-8 from __future__ import unicode_literals import re import json import xml.etree.ElementTree from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_str, compat_urllib_parse, compat_urllib_parse_urlparse, compat_urllib_request, compat_urlparse, comp...
unlicense
-7,732,271,752,180,358,000
43.244253
483
0.547899
false
vvv1559/intellij-community
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_set_literal.py
326
1699
""" Optional fixer to transform set() calls to set literals. """ # Author: Benjamin Peterson from lib2to3 import fixer_base, pytree from lib2to3.fixer_util import token, syms class FixSetLiteral(fixer_base.BaseFix): BM_compatible = True explicit = True PATTERN = """power< 'set' trailer< '(' ...
apache-2.0
2,146,467,694,274,560,000
31.056604
82
0.520306
false
AlexRobson/nilmtk
nilmtk/datastore/key.py
6
1916
from __future__ import print_function, division # do not edit! added by PythonBreakpoints from pdb import set_trace as _breakpoint class Key(object): """A location of data or metadata within NILMTK. Attributes ---------- building : int meter : int utility : str """ ...
apache-2.0
-6,208,034,491,554,359,000
30.474576
139
0.498434
false
credativ/gofer
src/gofer/agent/config.py
1
4642
# # Copyright (c) 2011 Red Hat, Inc. # # This software is licensed to you under the GNU Lesser General Public # License as published by the Free Software Foundation; either version # 2 of the License (LGPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # includin...
lgpl-2.1
5,193,684,612,211,942,000
24.932961
97
0.57863
false
damdam-s/project-service
service_desk/project.py
23
3700
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Daniel Reis # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software...
agpl-3.0
-7,612,059,081,528,046,000
40.573034
79
0.57
false
maciek263/django2
myvenv/Lib/site-packages/django/contrib/gis/forms/widgets.py
422
3659
from __future__ import unicode_literals import logging from django.conf import settings from django.contrib.gis import gdal from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.forms.widgets import Widget from django.template import loader from django.utils import six, translation logger = log...
mit
1,955,019,744,603,505,700
29.747899
90
0.574201
false
harshilasu/LinkurApp
y/google-cloud-sdk/platform/gsutil/third_party/boto/tests/integration/s3/test_cert_verification.py
126
1532
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # 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 withou...
gpl-3.0
-922,554,330,882,434,200
38.282051
77
0.763055
false
VanirAOSP/external_chromium-trace
trace-viewer/third_party/pywebsocket/src/example/bench_wsh.py
495
2322
# Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
3,540,708,684,949,132,300
37.7
75
0.747201
false
tensorflow/probability
tensorflow_probability/python/internal/hypothesis_testlib_test.py
1
1816
# Copyright 2018 The TensorFlow Probability 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 o...
apache-2.0
-5,489,291,136,431,777,000
33.923077
80
0.720264
false
JohnGeorgiadis/invenio
invenio/legacy/bibsched/bibtasklet.py
17
5098
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011, 2012, 2013, 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,...
gpl-2.0
-5,724,425,114,714,834,000
33.917808
79
0.635936
false
Fizzadar/pyinfra
pyinfra_cli/inventory.py
1
5989
from os import listdir, path from types import GeneratorType import six from pyinfra import logger, pseudo_inventory from pyinfra.api.inventory import Inventory from pyinfra_cli.util import exec_file # Hosts in an inventory can be just the hostname or a tuple (hostname, data) ALLOWED_HOST_TYPES = tuple( six.stri...
mit
2,418,504,696,053,098,000
29.871134
88
0.621473
false
XTAv2/Enigma2
lib/python/Components/TuneTest.py
27
10721
from enigma import eDVBFrontendParametersSatellite, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eDVBFrontendParameters, eDVBResourceManager, eTimer class Tuner: def __init__(self, frontend, ignore_rotor=False): self.frontend = frontend self.ignore_rotor = ignore_rotor # transponder = (freque...
gpl-2.0
1,107,332,522,307,350,500
35.845361
212
0.702733
false
taiwanlennon/flask-master
flask/sessions.py
6
14527
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from base64 import b64encode, b64decode from datetime import dateti...
bsd-3-clause
1,951,823,051,174,088,200
38.8
79
0.62697
false
IsCoolEntertainment/debpkg_python-boto
boto/cloudsearch/sourceattribute.py
37
3157
# Copyright (c) 202 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # 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 ...
mit
-8,686,896,786,706,751,000
41.093333
74
0.686728
false
amisrs/one-eighty
angular_flask/lib/python2.7/site-packages/requests/packages/charade/langcyrillicmodel.py
184
18054
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 Ri...
mit
3,687,166,962,634,946,600
52.87538
70
0.571785
false
joostvdg/jenkins-job-builder
tests/cmd/test_cmd.py
1
1383
import os import testtools from jenkins_jobs.cli import entry from tests.base import LoggingFixture from tests.base import mock class CmdTestsBase(LoggingFixture, testtools.TestCase): fixtures_path = os.path.join(os.path.dirname(__file__), 'fixtures') def setUp(self): super(CmdTestsBase, self).setU...
apache-2.0
457,855,546,187,904,960
32.731707
79
0.643529
false
Javier-Acosta/meran
dev-plugins/node64/lib/node/wafadmin/Tools/cc.py
4
4728
#!/usr/bin/env python # Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog, # Circulation and User's Management. It's written in Perl, and uses Apache2 # Web-Server, MySQL database and Sphinx 2 indexing. # Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP # # This file is part ...
gpl-3.0
8,856,978,331,860,506,000
32.539007
116
0.701565
false
jtimberman/omnibus
source/otp_src_R14B02/lib/asn1/test/asn1_SUITE_data/Enum.py
97
1047
Enum DEFINITIONS IMPLICIT TAGS ::= BEGIN -- EXPORTS P1, P2; -- F.2.3.1 -- Use an enumerated type to model the values of a variable -- with three or more states. -- Assign values starting with zero if their only -- constraint is distinctness. -- EXAMPLE DayOfTheWeek ::= ENUMERATED {sunday(0), monday(1), tuesday(2), ...
apache-2.0
8,045,940,656,299,935,000
21.76087
76
0.696275
false
upliftaero/MissionPlanner
Lib/site-packages/numpy/ma/tests/test_core.py
53
133084
# pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102 """Tests suite for MaskedArray & subclassing. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ __author__ = "Pierre GF Gerard-Marchant" import types import warnings import numpy as np import numpy.core.fromnumeric as fromnumeric fr...
gpl-3.0
-3,884,354,420,234,149,400
36.562518
109
0.488511
false
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Twisted-15.2.1/twisted/conch/test/test_knownhosts.py
8
45570
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.client.knownhosts}. """ import os from binascii import Error as BinasciiError, b2a_base64, a2b_base64 from twisted.python.reflect import requireModule if requireModule('Crypto') and requireModule('pyasn1'): fro...
mit
4,608,410,558,906,324,000
35.137986
81
0.629954
false
openstack/magnum
magnum/tests/unit/api/controllers/v1/test_federation.py
2
18016
# 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,718,046,955,240,449,500
42.412048
78
0.625
false
Llamatech/sis-fibo
model/queue_client/publisher.py
1
13238
# -*- coding: utf-8 -*- import time import pika import json import logging import hashlib class ExamplePublisher(object): """This is an example publisher that will handle unexpected interactions with RabbitMQ such as channel and connection closures. If RabbitMQ closes the connection, it will reopen it. ...
gpl-2.0
-5,208,578,129,497,268,000
39.359756
95
0.634461
false
adaxi/couchpotato
libs/subliminal/api.py
106
5646
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal 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 3 of...
gpl-3.0
3,682,280,531,256,942,000
50.798165
194
0.715905
false
dashmoment/facerecognition
py/apps/videofacerec/helper/video.py
3
4718
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import cv2 from time import clock from numpy import pi, sin, cos import common class VideoSynthBase(object): def __init__(self, size=None, noise=0.0, bg = None, **params): self.bg = None self.frame_size = (640, 480) ...
bsd-3-clause
-4,557,596,873,616,395,000
28.836601
109
0.494277
false
EntityFXCode/arsenalsuite
python/blur/examples/path_lister.py
11
2216
#!/usr/bin/python from PyQt4.QtCore import * from PyQt4.QtSql import * from PyQt4.QtGui import * from blur.Stone import * from blur.Classes import * from blur.Classesui import * import blur.email, blur.jabber import sys, time, re, os from math import ceil import traceback try: import popen2 except: pass app = QAppl...
gpl-2.0
-5,966,454,578,621,804,000
23.898876
102
0.686372
false
chubbymaggie/datasketch
examples/lshforest_example.py
3
1141
from datasketch import MinHashLSHForest, MinHash data1 = ['minhash', 'is', 'a', 'probabilistic', 'data', 'structure', 'for', 'estimating', 'the', 'similarity', 'between', 'datasets'] data2 = ['minhash', 'is', 'a', 'probability', 'data', 'structure', 'for', 'estimating', 'the', 'similarity', 'between', ...
mit
-4,947,305,787,395,445,000
30.694444
75
0.665206
false
gauravmm/Remote-Temperature-Monitor
utilities/colormap/colormaps.py
28
50518
# New matplotlib colormaps by Nathaniel J. Smith, Stefan van der Walt, # and (in the case of viridis) Eric Firing. # # This file and the colormaps in it are released under the CC0 license / # public domain dedication. We would appreciate credit if you use or # redistribute these colormaps, but do not impose any legal r...
mit
1,598,090,258,008,759,800
46.748582
75
0.441447
false
grow/grow
grow/translators/base.py
1
15038
"""Base translators for translating Grow content.""" import copy import json import logging import os import threading import progressbar import texttable import yaml from protorpc import message_types from protorpc import messages from protorpc import protojson from grow.common import progressbar_non from grow.common...
mit
-2,319,148,151,677,995,500
38.573684
115
0.577603
false
spottradingllc/zoom
test/entities/test_application_state.py
1
1899
from unittest import TestCase from zoom.www.entities.application_state import ApplicationState class TestApplicationState(TestCase): def setUp(self): self.state = ApplicationState(application_name="1", configuration_path="2", appl...
gpl-2.0
5,476,556,225,149,524,000
39.404255
64
0.353344
false
xliux/chess
third_party/gtest-1.7.0/test/gtest_shuffle_test.py
3023
12549
#!/usr/bin/env python # # Copyright 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...
apache-2.0
-8,143,394,493,640,840,000
37.612308
79
0.674396
false
Andrew-McNab-UK/DIRAC
RequestManagementSystem/Service/ReqManagerHandler.py
2
12793
##################################################################### # File: ReqManagerHandler.py ######################################################################## """ :mod: ReqManagerHandler .. module: ReqManagerHandler :synopsis: Implementation of the RequestDB service in the DISET framework """ __RCSID__...
gpl-3.0
-2,805,958,464,522,866,000
37.18806
132
0.666146
false
felixma/nova
nova/tests/unit/virt/hyperv/test_vhdutils.py
32
11536
# Copyright 2013 Cloudbase Solutions Srl # # 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 ...
apache-2.0
337,884,599,005,716,400
39.055556
79
0.618585
false
mihailignatenko/erp
addons/mail/tests/test_mail_gateway.py
62
43064
# -*- 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
6,799,802,151,477,369,000
57.352304
166
0.621795
false
DxCx/nzbToMedia
libs/unidecode/x097.py
252
4643
data = ( 'Xu ', # 0x00 'Ji ', # 0x01 'Mu ', # 0x02 'Chen ', # 0x03 'Xiao ', # 0x04 'Zha ', # 0x05 'Ting ', # 0x06 'Zhen ', # 0x07 'Pei ', # 0x08 'Mei ', # 0x09 'Ling ', # 0x0a 'Qi ', # 0x0b 'Chou ', # 0x0c 'Huo ', # 0x0d 'Sha ', # 0x0e 'Fei ', # 0x0f 'Weng ', # 0x10 'Z...
gpl-3.0
-2,384,405,795,851,090,400
16.996124
20
0.388757
false
eonpatapon/neutron
neutron/db/db_base_plugin_common.py
2
11824
# Copyright (c) 2015 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...
apache-2.0
-7,870,414,294,914,171,000
43.284644
78
0.566137
false
cubicova17/annet
venv/lib/python2.7/site-packages/south/management/commands/convert_to_south.py
24
3676
""" Quick conversion command module. """ from optparse import make_option import sys from django.core.management.base import BaseCommand from django.core.management.color import no_style from django.conf import settings from django.db import models from django.core import management from django.core.exceptions import...
mit
2,805,439,749,809,700,000
38.526882
143
0.622416
false
sdague/home-assistant
homeassistant/helpers/template.py
2
43562
"""Template helper methods for rendering strings with Home Assistant data.""" from ast import literal_eval import asyncio import base64 import collections.abc from datetime import datetime, timedelta from functools import partial, wraps import json import logging import math from operator import attrgetter import rando...
apache-2.0
6,641,412,523,269,485,000
30.115714
269
0.609407
false
vathpela/anaconda
tests/glade/check_mnemonics.py
8
2031
# # Copyright (C) 2015 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is dis...
gpl-2.0
-4,570,816,170,231,108,000
48.536585
175
0.666174
false
altaf-ali/luigi
setup.py
15
2810
# Copyright (c) 2012 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 or agreed to in writing, s...
apache-2.0
6,879,858,014,888,422,000
29.543478
89
0.639502
false
lino-framework/xl
lino_xl/lib/humanlinks/choicelists.py
1
4263
# -*- coding: UTF-8 -*- # Copyright 2014-2015 Rumma & Ko Ltd # # License: GNU Affero General Public License v3 (see file COPYING for details) """ Choicelists for `lino_xl.lib.humanlinks`. """ from __future__ import unicode_literals from __future__ import print_function from django.utils.translation import gettext_l...
bsd-2-clause
-2,259,216,970,079,263,500
26.326923
78
0.598874
false
disqus/pgshovel
tests/pgshovel/replication/streams/kafka.py
1
4446
from __future__ import absolute_import import pytest from itertools import islice from kafka import ( KafkaClient, SimpleProducer, ) from tests.pgshovel.fixtures import ( cluster, create_temporary_database, ) from tests.pgshovel.streams.fixtures import ( DEFAULT_PUBLISHER, begin, transacti...
apache-2.0
4,668,158,984,192,161,000
27.87013
111
0.726046
false
neilpelow/wmap-django
venv/lib/python3.5/site-packages/django/contrib/flatpages/forms.py
108
2162
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField( label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$...
gpl-3.0
8,177,578,485,117,802,000
35.644068
111
0.556429
false
Inspq/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_cancel.py
33
3250
#!/usr/bin/python #coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # # This module 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 optio...
gpl-3.0
7,162,193,001,982,518,000
26.310924
107
0.654769
false
jmacmahon/invenio
modules/bibindex/lib/bibindex_engine_stemmer_unit_tests.py
3
4306
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 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 # Li...
gpl-2.0
4,334,833,055,542,698,500
44.318182
75
0.494985
false
kingmotley/SickRage
lib/backports/ssl_match_hostname/__init__.py
134
3650
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" import re __version__ = '3.4.0.2' class CertificateError(ValueError): pass def _dnsname_match(dn, hostname, max_wildcards=1): """Matching according to RFC 6125, section 6.4.3 http://tools.ietf.org/html/rfc6125#section-6.4...
gpl-3.0
-6,926,412,779,466,656,000
34.784314
80
0.606575
false
mancoast/CPythonPyc_test
fail/300_test_urllib2net.py
2
9015
#!/usr/bin/env python import unittest from test import support from test.test_urllib2 import sanepathname2url import os import socket import sys import urllib.error import urllib.request def _retry_thrice(func, exc, *args, **kwargs): for i in range(3): try: return func(*args, **kwargs) ...
gpl-3.0
-8,871,879,098,051,866,000
33.54023
84
0.569163
false
kalahbrown/HueBigSQL
desktop/core/ext-py/Django-1.6.10/tests/requests/tests.py
47
31824
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import time import warnings from datetime import datetime, timedelta from io import BytesIO from django.db import connection, connections, DEFAULT_DB_ALIAS from django.core import signals from django.core.exceptions import SuspiciousOperation from djan...
apache-2.0
2,928,941,753,979,477,500
42.328338
261
0.574726
false
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/tensorflow/python/training/slot_creator.py
14
4942
# 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...
mit
-5,407,206,725,908,208,000
39.178862
80
0.706192
false
luofei98/qgis
python/plugins/processing/algs/saga/RasterCalculator.py
1
3148
# -*- coding: utf-8 -*- """ *************************************************************************** RasterCalculator.py --------------------- Date : May 2014 Copyright : (C) 2014 by Victor Olaya Email : volayaf at gmail dot com *************************...
gpl-2.0
198,672,020,268,016,030
38.848101
83
0.549238
false
luofei98/qgis
python/ext-libs/jinja2/_compat.py
638
4042
# -*- coding: utf-8 -*- """ jinja2._compat ~~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: Copyright 2013 by the Jinja team, see AUTHORS. :license: BSD, see LICENSE for details. ""...
gpl-2.0
6,617,438,118,607,739,000
25.946667
77
0.641762
false
bbaltz505/iotkit-libpy
iotkitclient/__init__.py
1
2339
# Copyright (c) 2015, Intel Corporation # # 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 following di...
bsd-3-clause
7,837,016,426,572,058,000
40.035088
82
0.741342
false
Tudorvr/metagoofil
hachoir_metadata/filter.py
85
1664
from hachoir_metadata.timezone import UTC from datetime import date, datetime # Year in 1850..2030 MIN_YEAR = 1850 MAX_YEAR = 2030 class Filter: def __init__(self, valid_types, min=None, max=None): self.types = valid_types self.min = min self.max = max def __call__(self, value): ...
gpl-2.0
311,876,155,678,027,970
31
60
0.58113
false
Xiangua/symphony
vendor/doctrine/orm/docs/en/conf.py
2448
6497
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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 file. ...
mit
-6,821,502,589,268,784,000
31.323383
80
0.711867
false
landscapeio/astroid
exceptions.py
87
1814
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
gpl-2.0
1,740,860,541,895,760,100
34.568627
80
0.745865
false
rukku/inasafe
realtime/sftp_client.py
5
4885
""" InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Ftp Client for Retrieving ftp data.** Contact : ole.moller.nielsen@gmail.com .. 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 th...
gpl-3.0
3,083,561,135,397,136,400
33.401408
79
0.612282
false
Alexander-M-Waldman/local_currency_site
lib/python2.7/site-packages/guardian/testapp/tests/test_custompkmodel.py
1
1179
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.test import TestCase from guardian.compat import get_user_model from guardian.shortcuts import assign_perm, remove_perm class CustomPKModelTest(TestCase): """ Tests agains custom model with primary ...
gpl-3.0
7,920,969,375,098,448,000
37.032258
97
0.70229
false
glogiotatidis/mozillians-new
vendor-local/lib/python/dateutil/zoneinfo/__init__.py
265
2575
""" Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ from dateutil.tz import tzfile from tarfile import TarFile import os __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" __all__ = ["setca...
bsd-3-clause
7,576,810,863,647,933,000
28.597701
67
0.580583
false
Pavel-Durov/pynetwork
pynetwork/wkhtmltoimage.py
1
2154
""" Python wrapper for wkhtmltopdf library, for rendering images from html files. [ doc: https://wkhtmltopdf.org/docs.html ] * Currently supporting only Linux distributions! This script designed to be run on devices without display. Uses xvfb (X virtual framebuffer) for that functionality. ...
mit
-5,862,120,179,268,780,000
27.342105
100
0.645311
false
wilvk/ansible
lib/ansible/modules/cloud/amazon/elb_application_lb.py
27
41834
#!/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
-7,529,926,183,172,013,000
39.694553
159
0.649591
false
ncdesouza/bookworm
env/lib/python2.7/site-packages/wtforms/widgets/html5.py
153
2214
""" Widgets for various HTML5 input types. """ from .core import Input __all__ = ( 'ColorInput', 'DateInput', 'DateTimeInput', 'DateTimeLocalInput', 'EmailInput', 'MonthInput', 'NumberInput', 'RangeInput', 'SearchInput', 'TelInput', 'TimeInput', 'URLInput', 'WeekInput', ) class SearchInput(Input): "...
gpl-3.0
-3,501,033,617,315,922,400
17.762712
75
0.579042
false
sem-geologist/Qstitch
ui/Ui_finalize.py
1
5411
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'finalize.ui' # # Created: Fri Apr 10 01:36:55 2015 # by: PyQt4 UI code generator 4.11.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attri...
gpl-2.0
-2,988,781,491,210,016,300
48.642202
106
0.689337
false
M3nin0/supreme-broccoli
Web/Flask/site_/lib/python3.5/site-packages/werkzeug/contrib/jsrouting.py
513
8564
# -*- coding: utf-8 -*- """ werkzeug.contrib.jsrouting ~~~~~~~~~~~~~~~~~~~~~~~~~~ Addon module that allows to create a JavaScript function from a map that generates rules. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ ...
apache-2.0
-1,409,862,288,999,653,000
31.439394
80
0.516698
false
kidaa/aurora
build-support/jenkins/review_feedback.py
5
8383
#!/usr/bin/env python2.7 # # 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, soft...
apache-2.0
-1,932,438,832,379,001,300
36.932127
99
0.656686
false
iMilind/grpc
src/python/src/grpc/_adapter/_links_test.py
7
10736
# 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
3,082,130,327,241,125,400
39.059701
80
0.692623
false
andresriancho/trunserver
trunserv/management/commands/trunserver.py
2
3573
from django.core.management.base import BaseCommand, CommandError from django.contrib.staticfiles.handlers import StaticFilesHandler from django.core.servers.basehttp import get_internal_wsgi_application #from django.utils import autoreload from trunserv import autoreload from twisted.application import internet, serv...
mit
1,833,413,221,485,000,200
32.083333
76
0.606773
false
openstack/cinder
cinder/tests/unit/volume/drivers/netapp/dataontap/performance/test_perf_cmode.py
2
19560
# Copyright (c) 2016 Clinton Knight # 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 requir...
apache-2.0
-4,240,124,413,452,378,000
40.092437
79
0.624335
false
Nepherhotep/django
tests/null_fk_ordering/models.py
210
1605
""" Regression tests for proper working of ForeignKey(null=True). Tests these bugs: * #7512: including a nullable foreign key reference in Meta ordering has un xpected results """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible ...
bsd-3-clause
3,643,811,781,240,779,000
26.20339
79
0.709034
false
nfletton/django-oscar
tests/unit/shipping/method_tests.py
44
2514
from decimal import Decimal as D from django.test import TestCase import mock from oscar.apps.shipping import methods from oscar.apps.basket.models import Basket class TestFreeShipppingForEmptyBasket(TestCase): def setUp(self): self.method = methods.Free() self.basket = Basket() self.ch...
bsd-3-clause
-3,302,589,654,243,325,400
28.576471
68
0.657916
false
kayhayen/Nuitka
tests/benchmarks/constructs/OperationIntegerAdd.py
1
1297
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # L...
apache-2.0
6,016,963,578,927,243,000
29.880952
78
0.705474
false
Saint-Joe/weewx
bin/weewx/drivers/ws1.py
4
9124
#!/usr/bin/env python # # Copyright 2014 Matthew Wall # See the file LICENSE.txt for your rights. """Driver for ADS WS1 weather stations. Thanks to Steve (sesykes71) for the testing that made this driver possible. Thanks to Jay Nugent (WB8TKL) and KRK6 for weather-2.kr6k-V2.1 http://server1.nuge.com/~weather/ """ ...
gpl-3.0
-6,054,919,194,030,121,000
32.178182
84
0.583626
false
codeworldprodigy/lab4
lib/jinja2/jinja2/testsuite/__init__.py
404
4641
# -*- coding: utf-8 -*- """ jinja2.testsuite ~~~~~~~~~~~~~~~~ All the unittests of Jinja2. These tests can be executed by either running run-tests.py using multiple Python versions at the same time. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ i...
apache-2.0
7,107,260,336,280,116,000
28.75
79
0.613876
false
masschallenge/impact-api
web/impact/impact/urls.py
1
5272
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from django.apps import apps from django.conf import settings from django.conf.urls import ( include, url, ) from django.conf.urls.static import static from django.contrib import admin from django.views.decorators.csrf import csrf_exempt from django.views....
mit
-2,869,649,170,622,418,000
34.38255
79
0.629552
false
Edraak/edx-platform
common/lib/capa/capa/safe_exec/safe_exec.py
179
4876
"""Capa's specialized use of codejail.safe_exec.""" from codejail.safe_exec import safe_exec as codejail_safe_exec from codejail.safe_exec import not_safe_exec as codejail_not_safe_exec from codejail.safe_exec import json_safe, SafeExecException from . import lazymod from dogapi import dog_stats_api import hashlib #...
agpl-3.0
-2,121,227,543,970,957,600
30.458065
90
0.652789
false
sean-/ansible
lib/ansible/playbook/attribute.py
39
1130
# (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
6,932,059,304,576,258,000
33.242424
91
0.725664
false
developmentseed/slingshotSMS
pygsm/gsmcodecs/gsm0338.py
65
19653
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ Python Character Mapping Codec based on gsm0338 generated from './GSM0338.TXT' with gencodec.py. With extra sauce to deal with the 'multibyte' extensions! """#" import codecs import re ### Codec APIs # # Shared funcs # def _encode(input,errors='strict'): ...
bsd-3-clause
-7,011,006,865,364,685,000
36.532692
318
0.560025
false
StefanRijnhart/server-tools
module_parent_dependencies/__init__.py
3
1061
# -*- encoding: utf-8 -*- ############################################################################## # # Module - Parent Dependencies module for Odoo # Copyright (C) 2014 GRAP (http://www.grap.coop) # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # # This program is free software: you can re...
agpl-3.0
7,518,560,370,747,590,000
45.130435
78
0.60886
false
2013Commons/hue
desktop/core/ext-py/Django-1.4.5/django/contrib/databrowse/datastructures.py
86
9237
""" These classes are light wrappers around Django's database API that provide convenience functionality and permalink functions for the databrowse app. """ from django.db import models from django.utils import formats from django.utils.text import capfirst from django.utils.encoding import smart_unicode, smart_str, i...
apache-2.0
5,602,749,047,855,491,000
41.56682
200
0.60983
false
hryang/flatbuffers
python/flatbuffers/table.py
65
4153
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
6,078,615,721,991,918,000
34.495726
79
0.638575
false
dgarros/ansible
test/units/modules/network/eos/test_eos_config.py
19
4969
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
-3,944,548,990,495,845,000
36.08209
100
0.660696
false
nathanial/lettuce
tests/integration/lib/Django-1.3/django/core/management/commands/startproject.py
322
1680
from django.core.management.base import copy_helper, CommandError, LabelCommand from django.utils.importlib import import_module import os import re from random import choice class Command(LabelCommand): help = "Creates a Django project directory structure for the given project name in the current directory." ...
gpl-3.0
-7,312,967,035,324,897,000
42.076923
167
0.667262
false
alxgu/ansible
lib/ansible/modules/crypto/openssl_privatekey.py
3
28149
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # 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_v...
gpl-3.0
4,469,279,267,136,207,400
39.155492
159
0.62972
false
inveniosoftware/invenio-oaiharvester
invenio_oaiharvester/__init__.py
2
2995
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2015, 2016 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 optio...
gpl-2.0
-7,768,267,571,563,254,000
31.912088
79
0.728548
false
salvadormrf/wagtailsettings
setup.py
1
1134
#!/usr/bin/env python """ Install wagtailsettings using setuptools """ from wagtailsettings import __version__ with open('README.rst', 'r') as f: readme = f.read() try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setupt...
bsd-2-clause
-7,643,069,301,862,576,000
23.12766
63
0.643739
false
kingmotley/SickRage
lib/stevedore/example/setup.py
32
1179
from setuptools import setup, find_packages setup( name='stevedore-examples', version='1.0', description='Demonstration package for stevedore', author='Doug Hellmann', author_email='doug@doughellmann.com', url='http://git.openstack.org/cgit/openstack/stevedore', classifiers=['Developmen...
gpl-3.0
5,530,840,407,365,705,000
26.418605
70
0.556404
false
wemanuel/smry
server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/boto/boto/glacier/writer.py
153
9668
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # Copyright (c) 2012 Robie Basak <robie@justgohome.co.uk> # Tree hash implementation from Aaron Brady bradya@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated...
apache-2.0
-3,012,962,671,960,907,000
35.900763
79
0.63343
false
Spicyharambe/spni.github.io
opponents/hermione/make_hermione_images.py
3
14237
import sys #emotions: #happy #calm #sad #loss #interested - clasping hands together? #horny #shocked - maybe hands in front of face, with a gap in between her fingers to see through? #excited #stunned - eyes closed, I think. #angry #clothes = shoes, socks, jumper, tie, skirt, shirt, bra, panties #11 total stages #ap...
mit
-1,510,330,534,751,289,300
52.325843
862
0.653228
false
Zhongqilong/mykbengineer
kbe/src/lib/python/Lib/test/test_subprocess.py
60
105047
import unittest from test import script_helper from test import support import subprocess import sys import signal import io import locale import os import errno import tempfile import time import re import selectors import sysconfig import warnings import select import shutil import gc import textwrap try: import...
lgpl-3.0
8,740,484,404,177,347,000
41.460388
98
0.539501
false
szibis/Diamond
src/collectors/puppetagent/puppetagent.py
57
1534
# coding=utf-8 """ Collect stats from puppet agent's last_run_summary.yaml #### Dependencies * yaml """ try: import yaml except ImportError: yaml = None import diamond.collector class PuppetAgentCollector(diamond.collector.Collector): def get_default_config_help(self): config_help = super(...
mit
5,384,970,467,072,136,000
22.96875
71
0.559974
false
cvtsi2sd/mbed-os
tools/dev/rpc_classes.py
68
5298
""" 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
-1,196,995,893,804,107,800
26.884211
113
0.469234
false
40223149/w16b_test
static/Brython3.1.0-20150301-090019/Lib/os.py
635
35582
r"""OS routines for Mac, NT, or Posix depending on what system we're on. This exports: - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc. - os.path is either posixpath or ntpath - os.name is either 'posix', 'nt', 'os2' or 'ce'. - os.curdir is a string representing the current directory ('.' or...
gpl-3.0
5,802,678,242,812,776,000
33.180596
95
0.612529
false
zemanel/ansible
v2/test/playbook/test_task_include.py
23
2579
# (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
5,804,183,248,404,834,000
39.296875
144
0.706863
false
jarvys/django-1.7-jdb
django/contrib/comments/templatetags/comments.py
53
12090
from django import template from django.template.loader import render_to_string from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib import comments from django.utils import six from django.utils.deprecation import RenameMethodsBase, RemovedInDjango18Warning fr...
bsd-3-clause
8,734,283,579,741,545,000
34.558824
127
0.619438
false
skymanaditya1/numpy
numpy/core/fromnumeric.py
35
95411
"""Module containing non-deprecated functions borrowed from Numeric. """ from __future__ import division, absolute_import, print_function import types import warnings import numpy as np from .. import VisibleDeprecationWarning from . import multiarray as mu from . import umath as um from . import numerictypes as nt ...
bsd-3-clause
-7,348,415,189,337,051,000
29.927391
79
0.591504
false
pgmillon/ansible
test/units/modules/network/nxos/nxos_module.py
29
3594
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
-8,931,996,341,473,594,000
29.982759
108
0.646912
false
virgilio/timtec
administration/tests/test_views.py
7
1181
import pytest @pytest.mark.django_db def test_course_create_view(admin_client, client, user): from django.core.urlresolvers import reverse_lazy from core.models import Course response = admin_client.get(reverse_lazy('administration.new_course')) assert response.status_code == 405 name = 'Test cou...
agpl-3.0
972,742,396,523,788,000
38.366667
91
0.702794
false
jdobes/spacewalk
client/debian/packages-already-in-debian/rhn-client-tools/src/up2date_client/messageWindow.py
21
4956
import string import gtk import gettext t = gettext.translation('rhn-client-tools', fallback=True) _ = t.ugettext # wrap a long line... def wrap_line(line, max_line_size = 100): if len(line) < max_line_size: return line ret = [] l = "" for w in string.split(line): if not len(l): ...
gpl-2.0
-5,291,645,855,768,075,000
30.974194
77
0.551655
false
AniruddhaSAtre/dd-agent
checks.d/aerospike.py
1
3350
# stdlib import os from inspect import getsourcefile from os.path import abspath # project from checks import AgentCheck from hashlib import md5 from aerospike.constants import ERROR_CODES from aerospike.constants import HASH_KEY from aerospike import interface from aerospike import log from aerospike import citrusle...
bsd-3-clause
-5,841,730,020,869,890,000
33.183673
79
0.590448
false
Foxfanmedium/python_training
OnlineCoursera/mail_ru/Python_1/Week_3/playground/env/Lib/site-packages/pkg_resources/_vendor/packaging/requirements.py
454
4355
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import string import re from pkg_resources.extern.pyparsing import string...
apache-2.0
8,159,334,263,870,704,000
33.291339
98
0.665901
false
Arafatk/sympy
sympy/ntheory/tests/test_residue.py
11
6978
from collections import defaultdict from sympy import Symbol from sympy.core.compatibility import range from sympy.ntheory import n_order, is_primitive_root, is_quad_residue, \ legendre_symbol, jacobi_symbol, totient, primerange, sqrt_mod, \ primitive_root, quadratic_residues, is_nthpow_residue, nthroot_mod, \...
bsd-3-clause
733,701,615,584,971,000
37.98324
146
0.57151
false
Acehaidrey/incubator-airflow
airflow/contrib/sensors/weekday_sensor.py
2
1121
# # 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...
apache-2.0
6,770,019,826,157,762,000
37.655172
78
0.76628
false