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
pixelated-project/pixelated-user-agent
service/test/functional/features/page_objects/backup_account_page.py
2
1111
# # Copyright (c) 2017 ThoughtWorks, Inc. # # Pixelated 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 Foundation, either version 3 of the License, or # (at your option) any later version. # # Pixelated is distrib...
agpl-3.0
-5,102,962,663,372,319,000
36.033333
90
0.715572
false
gnowledge/ncert_nroer
objectapp/cnlgb.py
3
21411
from objectapp.models import * from gstudio.models import * from django.template.defaultfilters import slugify import inflect def get_cnlgb_list(self): z = [] k = get_lex_sentence(self) if not k: pass else: z.extend(k) l = get_lex_sentence_optional(self) if not l: pass else: z.extend(l) m = get...
agpl-3.0
7,259,495,591,314,798,000
32.824645
177
0.429499
false
dbbhattacharya/kitsune
vendor/packages/logilab-common/optparser.py
6
3225
# -*- coding: utf-8 -*- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser Genera...
bsd-3-clause
2,284,299,466,963,705,900
34.054348
82
0.631628
false
agilemobiledev/spiderfoot
ext/dns/rdtypes/ANY/NSEC3PARAM.py
85
3169
# Copyright (C) 2004-2007, 2009-2011 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 "...
gpl-2.0
8,172,667,477,668,317,000
35.011364
89
0.623541
false
ilastikdev/ilastik
ilastik/applets/objectClassification/opObjectClassification.py
1
59400
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
gpl-3.0
-8,452,644,986,475,700,000
40.772152
178
0.599865
false
direvus/ansible
lib/ansible/modules/cloud/amazon/ecs_cluster.py
25
7340
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
2,366,873,363,764,501,000
31.334802
137
0.624251
false
dbjohnson/spanner
test/test_countdown.py
1
1191
import unittest import sys from cStringIO import StringIO from spanner import countdown include = True class CountdownTestCase(unittest.TestCase): def setUp(self): # redirect stdout self.old_stdout = sys.stdout self.trapped_stdout = sys.stdout = StringIO() def tearDown(self): ...
mit
-4,540,423,269,309,845,500
28.04878
71
0.641478
false
nsmoooose/csp
csp/data/ui/scripts/windows/quitresume.py
1
2828
#!/usr/bin/python # Combat Simulator Project # Copyright (C) 2002-2005 The Combat Simulator Project # http://csp.sourceforge.net # # 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...
gpl-2.0
9,025,672,013,542,257,000
37.216216
125
0.682107
false
ferchaure/bci
Parsers/beta_fpga.py
1
7945
# -*- coding: utf-8 -*- """ Created on Mon Nov 30 17:28:58 2015 @author: fernando chaure """ from configuration import GENERAL_CONFIG as CONFIG from multiprocess_config import * import numpy as np from configuration import CONFIG_PARSER from os import path COMM = {} for x in CONFIG_PARSER['FORMAT_CONFIG']: if CO...
mit
3,970,772,683,720,532,000
44.66092
171
0.555318
false
pynag/pynag
tests/test_utils.py
1
18547
from __future__ import absolute_import import os import sys # Make sure we import from working tree pynagbase = os.path.dirname(os.path.realpath(__file__ + "/..")) sys.path.insert(0, pynagbase) import unittest2 as unittest from mock import patch import shutil import tempfile import pynag.Utils as utils import pynag.M...
gpl-2.0
-4,237,721,732,372,206,000
38.715203
174
0.618429
false
IveWong/jasmine
setup.py
56
1974
from setuptools import setup, find_packages, os import json with open('package.json') as packageFile: version = json.load(packageFile)['version'] setup( name="jasmine-core", version=version, url="http://jasmine.github.io", author="Pivotal Labs", author_email="jasmine-js@googlegroups.com", de...
mit
-2,955,940,814,518,186,500
41
115
0.618541
false
semonte/intellij-community
plugins/hg4idea/testData/bin/mercurial/repo.py
88
1379
# repo.py - repository base classes for mercurial # # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ im...
apache-2.0
-534,216,216,974,158,300
30.340909
73
0.607687
false
angelapper/edx-platform
common/djangoapps/track/tests/test_shim.py
24
10533
"""Ensure emitted events contain the fields legacy processors expect to find.""" from collections import namedtuple import ddt from django.test.utils import override_settings from mock import sentinel from openedx.core.lib.tests.assertions.events import assert_events_equal from . import FROZEN_TIME, EventTrackingTe...
agpl-3.0
7,864,666,722,493,166,000
31.915625
110
0.565461
false
m-urban/beets
test/test_mpdstats.py
24
1572
# This file is part of beets. # Copyright 2015 # # 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 restriction, including # without limitation the rights to use, copy, modify, merge, pu...
mit
-2,219,937,740,855,212,800
29.823529
71
0.702926
false
nysan/yocto-autobuilder
lib/python2.6/site-packages/SQLAlchemy-0.7.1-py2.6-linux-x86_64.egg/sqlalchemy/dialects/postgresql/base.py
8
53160
# postgresql/base.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the PostgreSQL database. For information on connecting using specif...
gpl-2.0
6,457,700,991,169,302,000
35.687371
91
0.543435
false
shssoichiro/servo
tests/wpt/css-tests/tools/pytest/_pytest/cacheprovider.py
188
8939
""" merged implementation of the cache provider the name cache was not choosen to ensure pluggy automatically ignores the external pytest-cache """ import py import pytest import json from os.path import sep as _sep, altsep as _altsep class Cache(object): def __init__(self, config): self.config = config...
mpl-2.0
-7,212,911,681,018,630,000
35.485714
79
0.583175
false
krafczyk/spack
var/spack/repos/builtin/packages/font-bh-type1/package.py
5
2082
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
2,262,413,580,171,185,200
39.038462
85
0.660423
false
ddayguerrero/blogme
flask/lib/python3.4/site-packages/werkzeug/contrib/atom.py
259
15588
# -*- coding: utf-8 -*- """ werkzeug.contrib.atom ~~~~~~~~~~~~~~~~~~~~~ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: def atom_feed(request): feed = AtomFeed("My Blog", feed...
mit
4,130,128,834,609,485,000
42.909859
93
0.549397
false
alexbredo/site-packages
mail.py
1
2015
# Copyright (c) 2014 Alexander Bredo # 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 notice, this list of conditions ...
bsd-2-clause
7,450,823,667,318,306,000
37.018868
63
0.744913
false
matmutant/sl4a
python/src/Lib/lib-tk/FixTk.py
49
2844
import sys, os # Delay import _tkinter until we have set TCL_LIBRARY, # so that Tcl_FindExecutable has a chance to locate its # encoding directory. # Unfortunately, we cannot know the TCL_LIBRARY directory # if we don't know the tcl version, which we cannot find out # without import Tcl. Fortunately, Tcl will itself ...
apache-2.0
-2,717,771,428,278,003,700
36.421053
69
0.580169
false
txm/potato
django/conf/locale/en_GB/formats.py
234
2048
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'N j, Y' # 'Oct. 25, 2006' TIME_FORMAT = 'P' ...
bsd-3-clause
-446,027,609,695,267,260
45.545455
79
0.434082
false
prarthitm/edxplatform
pavelib/servers.py
15
10450
""" Run and manage servers for local development. """ from __future__ import print_function import argparse import sys from paver.easy import call_task, cmdopts, consume_args, needs, sh, task from .assets import collect_assets from .utils.cmd import django_cmd from .utils.process import run_process, run_multi_process...
agpl-3.0
-8,044,404,277,697,591,000
35.666667
146
0.645933
false
louyihua/edx-platform
common/djangoapps/contentserver/admin.py
27
1455
""" Django admin page for CourseAssetCacheTtlConfig, which allows you to configure the TTL that gets used when sending cachability headers back with request course assets. """ from django.contrib import admin from config_models.admin import ConfigurationModelAdmin from .models import CourseAssetCacheTtlConfig, CdnUserA...
agpl-3.0
-863,985,471,842,398,600
28.693878
86
0.709278
false
ioef/tlslite-ng
tlslite/utils/asn1parser.py
206
1191
# Author: Trevor Perrin # Patch from Google adding getChildBytes() # # See the LICENSE file for legal information regarding use of this file. """Class for parsing ASN.1""" from .compat import * from .codec import * #Takes a byte array which has a DER TLV field at its head class ASN1Parser(object): def __init__(se...
lgpl-2.1
7,525,213,748,959,431,000
27.357143
72
0.611251
false
gemmaan/moviesenal
Hasil/Lib/site-packages/pip/_vendor/ipaddress.py
339
80176
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
mit
-5,227,305,051,057,775,000
32.062268
86
0.568387
false
bubichain/blockchain
src/3rd/src/jsoncpp/scons-2.1.0/engine/SCons/Script/__init__.py
21
14158
"""SCons.Script This file implements the main() function used by the scons script. Architecturally, this *is* the scons script, and will likely only be called from the external "scons" wrapper. Consequently, anything here should not be, or be considered, part of the build engine. If it's something that we expect ot...
apache-2.0
1,617,008,442,936,210,700
33.364078
101
0.681876
false
abligh/xen
tools/python/xen/xend/XendTask.py
48
7801
#=========================================================================== # 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 tha...
gpl-2.0
4,239,047,939,605,134,000
33.825893
78
0.548391
false
tcheehow/MissionPlanner
Lib/distutils/command/bdist_dumb.py
50
5259
"""distutils.command.bdist_dumb Implements the Distutils 'bdist_dumb' command (create a "dumb" built distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" __revision__ = "$Id$" import os from sysconfig import get_python_version from distutils.util import get_platform ...
gpl-3.0
5,214,269,814,029,726,000
37.840909
77
0.508652
false
pypingou/mock
docs/conf.py
7
6297
# -*- coding: utf-8 -*- # # Mock documentation build configuration file, created by # sphinx-quickstart on Mon Nov 17 18:12:00 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable...
bsd-2-clause
96,406,130,217,954,750
29.274038
82
0.711768
false
wtmmac/airflow
airflow/operators/hive_stats_operator.py
38
6082
from builtins import str from builtins import zip from collections import OrderedDict import json import logging from airflow.utils import AirflowException from airflow.hooks import PrestoHook, HiveMetastoreHook, MySqlHook from airflow.models import BaseOperator from airflow.utils import apply_defaults class HiveSta...
apache-2.0
-445,765,531,088,700,800
34.156069
79
0.546695
false
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/flower/events.py
16
4189
from __future__ import absolute_import from __future__ import with_statement import time import shelve import logging import threading import collections from functools import partial import celery from tornado.ioloop import PeriodicCallback from tornado.ioloop import IOLoop from celery.events import EventReceiver...
gpl-3.0
6,311,138,550,801,763,000
29.576642
74
0.571258
false
bbenko/shinkicker
django/core/management/commands/diffsettings.py
411
1296
from django.core.management.base import NoArgsCommand def module_to_dict(module, omittable=lambda k: k.startswith('_')): "Converts a module namespace to a Python dictionary. Used by get_settings_diff." return dict([(k, repr(v)) for k, v in module.__dict__.items() if not omittable(k)]) class Command(NoArgsComm...
bsd-3-clause
2,969,228,023,142,232,600
39.5
87
0.635031
false
RackSec/ansible
lib/ansible/modules/network/lenovo/cnos_vlag.py
59
13338
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, 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 # ...
gpl-3.0
9,027,011,899,004,421,000
37.108571
145
0.670715
false
jbbskinny/sympy
sympy/series/kauers.py
94
1807
from __future__ import print_function, division def finite_diff(expression, variable, increment=1): """ Takes as input a polynomial expression and the variable used to construct it and returns the difference between function's value when the input is incremented to 1 and the original function value. I...
bsd-3-clause
-1,509,883,331,748,980,500
31.854545
78
0.589928
false
smscannell/crazyflie-clients-python
lib/cfclient/utils/input/inputinterfaces/__init__.py
5
3515
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
gpl-2.0
-1,196,066,169,088,873,500
33.460784
75
0.607966
false
RubikonAlpha/RIOT
dist/tools/pyterm/pytermcontroller/pytermcontroller.py
100
4769
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (C) 2014 Philipp Rosenkranz <philipp.rosenkranz@fu-berlin.de> # # 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 # versi...
lgpl-2.1
-1,344,511,049,823,811,000
29.375796
89
0.634515
false
dmillington/ansible-modules-core
files/template.py
11
3875
# this is a virtual module that is entirely implemented server side # 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 op...
gpl-3.0
-1,277,305,428,280,286,000
37.75
111
0.707355
false
spasovski/zamboni
apps/versions/views.py
3
4674
import posixpath from django import http from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404, redirect import caching.base as caching import commonware.log import jingo from mobility.decorators import mobile_template import amo from amo.urlresolvers import reverse from ...
bsd-3-clause
-6,525,775,521,087,783,000
36.095238
78
0.665811
false
AbsentMoniker/ECE463Honors
web2py/gluon/contrib/feedparser.py
22
165632
"""Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit https://code.google.com/p/feedparser/ for the latest version Visit http://packages.python.org/feedparser/ for the latest documentation Required: Python 2.4 or later Recommended: iconv_codec <http://cjkpython.i18n.org...
gpl-2.0
768,292,287,514,934,000
40.543015
302
0.566455
false
eadgarchen/tensorflow
tensorflow/python/kernel_tests/numerics_test.py
45
5057
# 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
-1,354,743,083,804,603,600
37.310606
80
0.637334
false
alexmilesyounger/ds_basics
src/numpy_utils.py
2
3188
# coding: utf-8 # numpy_utils for Intro to Data Science with Python # Author: Kat Chuang # Created: Nov 2014 # -------------------------------------- import numpy ## Stage 2 begin fieldNames = ['', 'id', 'priceLabel', 'name','brandId', 'brandName', 'imageLink', 'desc', 'vendor', 'patterned', 'materi...
mit
2,955,030,263,153,201,700
24.709677
107
0.568381
false
sameetb-cuelogic/edx-platform-test
common/djangoapps/student/management/commands/add_to_group.py
182
1968
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User, Group class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--list', action='store_true', de...
agpl-3.0
3,640,178,042,292,162,000
30.238095
80
0.519309
false
flavour/tldrmp
modules/tests/inv/create_item.py
25
2382
# -*- coding: utf-8 -*- """ Sahana Eden Automated Tests - INV005 Create Item @copyright: 2011-2012 (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 dea...
mit
-2,625,177,039,953,814,000
38.065574
110
0.600336
false
XiaodunServerGroup/ddyedx
cms/envs/common.py
1
18114
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
agpl-3.0
-3,742,054,748,391,241,700
28.891089
98
0.659932
false
HonzaKral/django
tests/generic_inline_admin/tests.py
15
22206
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from django.contrib.contenttypes.admin import GenericTabularInline from django.contrib.contenttypes.forms import...
bsd-3-clause
-8,932,824,797,791,606,000
45.749474
530
0.648383
false
insta-code1/Instafit-ecommerce-Django
Scripts/enhancer.py
1
1522
#!d:\e-commers\scripts\python.exe # # The Python Imaging Library # $Id$ # # this demo script creates four windows containing an image and a slider. # drag the slider to modify the image. # try: from tkinter import Tk, Toplevel, Frame, Label, Scale, HORIZONTAL except ImportError: from Tkinter import Tk, Topleve...
mit
-4,311,511,396,518,780,000
24.79661
80
0.641261
false
thesuperzapper/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/data_feeder_test.py
71
12923
# 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
-3,217,039,612,851,633,000
35.609065
80
0.589337
false
creyesp/RF_Estimation
Clustering/clustering/gmm.py
2
6063
#!/usr/bin/env python # -*- coding: utf-8 -*- # # SpectralClustering.py # # Copyright 2014 Carlos "casep" Sepulveda <casep@alumnos.inf.utfsm.cl> # # 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 Fo...
gpl-2.0
2,732,410,993,761,357,300
37.132075
217
0.729177
false
txamqp/txamqp
src/examples/simple/txconsumer.py
1
2216
from twisted.internet.defer import inlineCallbacks from twisted.internet import reactor from twisted.internet.protocol import ClientCreator from twisted.python import log from txamqp.protocol import AMQClient from txamqp.client import TwistedDelegate import txamqp.spec @inlineCallbacks def gotConnection(conn, userna...
apache-2.0
-6,316,527,555,034,640,000
28.157895
103
0.689531
false
platformio/platformio-core
platformio/debug/exception.py
2
1138
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-490,257,605,046,786,700
33.484848
74
0.746924
false
Alkemic/yaCBV
yacbv/mixins.py
1
1041
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.http.response import HttpResponseNotAllowed class HttpMethodRestrictMixin(object): allowed_methods = [ 'options', 'get', 'head', 'post', 'put', 'delete', 'trace', 'connect', ] de...
mit
-3,343,326,777,970,065,400
31.53125
79
0.664745
false
slipstream/SlipStreamClient
client/src/external/chardet/mbcssm.py
289
25481
######################## 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...
apache-2.0
-6,302,124,043,890,133,000
43.547203
226
0.581296
false
bbenko/shinkicker
django/contrib/localflavor/in_/forms.py
309
1741
""" India-specific Form helpers. """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import gettext import re class INZipCodeField(RegexFiel...
bsd-3-clause
5,026,612,602,488,794,000
30.089286
78
0.646755
false
michaelwu/servo
components/script/dom/bindings/codegen/Configuration.py
6
13290
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from WebIDL import IDLInterface autogenerated_comment = "/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n" class Confi...
mpl-2.0
5,403,474,975,054,670,000
37.746356
105
0.572009
false
Turlough/keyczar
cpp/src/tools/swtoolkit/site_scons/site_tools/collada_dom.py
12
1830
#!/usr/bin/python2.4 # 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
-2,211,243,350,085,568,800
40.590909
72
0.75847
false
wakatime/wakatime
wakatime/packages/py26/pygments/lexers/configs.py
25
28266
# -*- coding: utf-8 -*- """ pygments.lexers.configs ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for configuration file formats. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, default, words, bygro...
bsd-3-clause
5,063,656,968,978,506,000
32.932773
82
0.477889
false
JCBarahona/edX
common/djangoapps/course_modes/migrations/0007_add_description.py
114
2270
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CourseMode.description' db.add_column('course_modes_coursemode', 'description', ...
agpl-3.0
5,266,291,405,919,106,000
50.590909
147
0.598678
false
c0hen/django-venv
lib/python3.4/site-packages/django/contrib/gis/db/backends/spatialite/models.py
510
2946
""" The GeometryColumns and SpatialRefSys models for the SpatiaLite backend. """ from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin from django.contrib.gis.db.backends.spatialite.base import DatabaseWrapper from django.db import connection, models from django.db.backends.signals import connectio...
gpl-3.0
-7,353,927,209,493,205,000
34.071429
106
0.679566
false
smily77/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/connectionpool.py
184
20547
# urllib3/connectionpool.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import logging import socket import errno from socket import error as SocketError, time...
lgpl-2.1
804,300,333,193,412,700
34.487047
93
0.583881
false
timothycrosley/isort
isort/stdlibs/py39.py
3
3295
""" File contains the standard library of Python 3.9. DO NOT EDIT. If the standard library changes, a new list should be created using the mkstdlibs.py script. """ stdlib = { "_thread", "abc", "aifc", "argparse", "array", "ast", "asynchat", "asyncio", "asyncore", "atexit", ...
mit
5,877,927,733,263,382,000
13.775785
74
0.464036
false
olemis/brython
www/src/Lib/encodings/cp861.py
37
35331
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP861.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors=...
bsd-3-clause
-6,628,472,447,995,054,000
48.617479
97
0.592737
false
entwanne/Rodolphe
rodolphe/main/views/tag.py
2
1805
from django.shortcuts import render_to_response from django.db.models import Q from django.template import RequestContext from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.utils.translation import ugettext as _ from main.models import Post, Tag from main.forms import PostForm from ut...
bsd-2-clause
-4,771,190,324,839,397,000
32.425926
72
0.660942
false
KyoungRan/Django_React_ex
Django_React_Workshop-mbrochh/django/myvenv/lib/python3.4/site-packages/pip/_vendor/progress/helpers.py
521
2854
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software 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 "AS IS" AND THE A...
mit
-7,695,649,357,062,729,000
30.362637
74
0.616328
false
BigRefT/bionic_cms
vendor/plugins/bionic-fckeditor/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py
89
5685
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
mit
7,320,153,503,641,974,000
28.239362
94
0.692348
false
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_textwrap.py
55
23220
# # Test suite for the textwrap module. # # Original tests written by Greg Ward <gward@python.net>. # Converted to PyUnit by Peter Hansen <peter@engcorp.com>. # Currently maintained by Greg Ward. # # $Id: test_textwrap.py 67896 2008-12-21 17:01:26Z benjamin.peterson $ # import unittest from test import test_support f...
apache-2.0
-1,212,507,766,355,925,500
37.128079
79
0.528079
false
alexpilotti/stackalytics-1
stackalytics/openstack/common/importutils.py
19
2186
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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/L...
apache-2.0
2,317,949,527,008,469,000
31.147059
75
0.68344
false
thepiper/standoff
venv/lib/python2.7/site-packages/pip/_vendor/requests/utils.py
618
21334
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct import wa...
gpl-3.0
6,211,973,571,984,631,000
29.175389
118
0.602091
false
mathLab/RBniCS
rbnics/problems/elliptic/elliptic_coercive_compliant_rb_reduced_problem.py
1
1383
# Copyright (C) 2015-2021 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later from math import sqrt from numpy import isclose from rbnics.problems.elliptic.elliptic_coercive_compliant_problem import EllipticCoerciveCompliantProblem from rbnics.problems.elliptic.ellipti...
lgpl-3.0
9,077,032,819,618,299,000
43.612903
120
0.799711
false
Buggaarde/youtube-dl
youtube_dl/extractor/livestream.py
107
10261
from __future__ import unicode_literals import re import json import itertools from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_urlparse, compat_urlparse, ) from ..utils import ( ExtractorError, find_xpath_attr, int_or_none, orderedSet, xpath_wit...
unlicense
-961,867,645,565,188,400
36.043321
142
0.528603
false
ActionAdam/osmc
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x0a4.py
252
4437
data = ( 'qiet', # 0x00 'qiex', # 0x01 'qie', # 0x02 'qiep', # 0x03 'quot', # 0x04 'quox', # 0x05 'quo', # 0x06 'quop', # 0x07 'qot', # 0x08 'qox', # 0x09 'qo', # 0x0a 'qop', # 0x0b 'qut', # 0x0c 'qux', # 0x0d 'qu', # 0x0e 'qup', # 0x0f 'qurx', # 0x10 'qur', # 0x11 ...
gpl-2.0
6,609,237,519,416,604,000
16.264591
18
0.380437
false
fibbo/DIRAC
DataManagementSystem/scripts/dirac-dms-remove-catalog-replicas.py
2
1490
#!/usr/bin/env python ######################################################################## # $Header: $ ######################################################################## __RCSID__ = "$Id$" from DIRAC import exit as DIRACExit from DIRAC.Core.Base import Script Script.setUsageMessage( """ Remove th...
gpl-3.0
-6,068,450,115,769,496,000
30.702128
113
0.639597
false
indiereign/shaka-player
build/checkversion.py
3
2606
#!/usr/bin/env python # # Copyright 2016 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 requir...
apache-2.0
6,620,711,093,445,984,000
30.780488
78
0.672678
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.5.9/Python-3.5.9/Lib/test/test_fractions.py
1
26461
"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.support import requires_IEEE_754 import math import numbers import operator import fractions import sys import unittest import warnings from copy import copy, deepcopy from pickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd cla...
apache-2.0
-7,246,032,613,650,884,000
40.736593
78
0.563962
false
poornimakshirsagar/sos
sos/plugins/cobbler.py
12
1483
# 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 distributed in the hope that it will be useful, # but...
gpl-2.0
1,689,091,794,866,927,600
28.66
72
0.662171
false
saquiba2/numpy2
numpy/distutils/command/build_ext.py
149
22493
""" Modified version of build_ext that handles fortran source files. """ from __future__ import division, absolute_import, print_function import os import sys from glob import glob from distutils.dep_util import newer_group from distutils.command.build_ext import build_ext as old_build_ext from distutils.errors impo...
bsd-3-clause
-5,282,162,224,618,680,000
42.090038
131
0.522207
false
snphbaum/scikit-gpuppy
skgpuppy/MLE.py
1
5756
# Copyright (C) 2015 Philipp Baumgaertel # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE.txt file for details. import numpy as np from scipy.optimize import fmin from scipy.misc import derivative from scipy.stats import norm from .Utiliti...
bsd-3-clause
-5,072,560,813,698,661,000
28.823834
158
0.680681
false
jusdng/odoo
openerp/addons/base/tests/test_acl.py
338
6323
import unittest2 from lxml import etree import openerp from openerp.tools.misc import mute_logger from openerp.tests import common # test group that demo user should not have GROUP_TECHNICAL_FEATURES = 'base.group_no_one' class TestACL(common.TransactionCase): def setUp(self): super(TestACL, self).setU...
agpl-3.0
3,459,967,571,127,203,000
50.406504
118
0.642417
false
lushfuture/Phys-Comp
five-test/node_modules/johnny-five/junk/firmata-latest/node_modules/serialport/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/xcodeproj_file.py
42
116836
# Copyright (c) 2009 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. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
mit
-4,960,518,596,211,695,000
40.168428
80
0.654678
false
alexryndin/ambari
ambari-server/src/main/resources/stacks/ADH/1.0/services/HDFS/package/scripts/journalnode.py
2
6746
""" 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 use this ...
apache-2.0
9,085,197,930,481,679,000
35.863388
114
0.669286
false
zackslash/scrapy
scrapy/shell.py
44
6963
"""Scrapy Shell See documentation in docs/topics/shell.rst """ from __future__ import print_function import os import signal import warnings from twisted.internet import reactor, threads, defer from twisted.python import threadable from w3lib.url import any_to_uri from scrapy.crawler import Crawler from scrapy.exc...
bsd-3-clause
-5,611,503,319,833,055,000
34.345178
78
0.61597
false
andante20/volatility
volatility/plugins/gui/vtypes/win2003.py
58
2168
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
gpl-2.0
4,136,559,547,899,335,700
37.714286
76
0.58072
false
OpenPymeMx/OCB
addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
90
10565
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
-5,215,002,769,034,946,000
46.376682
175
0.587601
false
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/Amazon/CloudDrive/Children/AddChild.py
5
5572
# -*- coding: utf-8 -*- ############################################################################### # # AddChild # Moves a specified folder into a parent folder. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
apache-2.0
-2,735,268,273,463,755,000
44.672131
265
0.680546
false
jepler/linuxcnc-mirror
configs/sim/axis/orphans/pysubs/task.py
5
1340
# This is a component of LinuxCNC # Copyright 2011, 2013, 2014 Dewey Garrett <dgarrett@panix.com>, # Michael Haberler <git@mah.priv.at> # # 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 Foundati...
lgpl-2.1
-6,668,584,115,566,551,000
29.454545
81
0.720149
false
TeemuAhola/sailelfcloud
src/qml/python/elfcloudclient.py
1
9585
''' Created on Sep 17, 2016 @author: Teemu Ahola [teemuahola7@gmail.com] ''' import os import elfcloud import worker import binascii import logger APIKEY = 'swrqwb95d98ou8d' VALULT_TYPES = [elfcloud.utils.VAULT_TYPE_DEFAULT, 'com.ahola.sailelfcloud'] DEFAULT_REQUEST_SIZE_BYTES = 256 * 1024 # Size of one request wh...
gpl-3.0
8,277,677,444,831,336,000
31.938144
132
0.610746
false
CopeX/odoo
addons/hw_scale/__openerp__.py
220
1699
# -*- 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
3,756,798,229,618,466,000
35.148936
98
0.60565
false
hrayr-artunyan/shuup
shuup/xtheme/migrations/0001_initial.py
9
1682
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import enumfields.fields import shuup.core.fields import shuup.xtheme.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name...
agpl-3.0
-3,279,893,957,301,471,700
45.722222
149
0.623068
false
youprofit/servo
components/script/dom/bindings/codegen/Configuration.py
4
14097
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from WebIDL import IDLInterface class Configuration: """ Represents global configuration state based on IDL pa...
mpl-2.0
3,562,373,444,955,077,600
36.895161
105
0.578988
false
analyseuc3m/ANALYSE-v1
openedx/core/djangoapps/credit/tests/test_partition.py
76
7030
# -*- coding: utf-8 -*- """ Tests for In-Course Reverification Access Control Partition scheme """ import ddt import unittest from django.conf import settings from lms.djangoapps.verify_student.models import ( VerificationCheckpoint, VerificationStatus, SkippedReverification, ) from openedx.core.djangoap...
agpl-3.0
4,481,977,371,273,984,500
37.839779
112
0.668137
false
tarballs-are-good/sympy
sympy/integrals/tests/test_rationaltools.py
3
2614
from sympy import symbols, S, I, atan, log, Poly from sympy.integrals.rationaltools import ratint, \ ratint_ratpart, ratint_logpart, log_to_atan, log_to_real from sympy.abc import a, x, t half = S(1)/2 def test_ratint(): assert ratint(S(0), x) == 0 assert ratint(S(7), x) == 7*x assert ratint(x, x) ...
bsd-3-clause
-5,423,839,229,775,236,000
27.725275
100
0.435731
false
leppa/home-assistant
tests/components/vacuum/common.py
24
6031
"""Collection of helper methods. All containing methods are legacy helpers that should not be used by new components. Instead call the service directly. """ from homeassistant.components.vacuum import ( ATTR_FAN_SPEED, ATTR_PARAMS, DOMAIN, SERVICE_CLEAN_SPOT, SERVICE_LOCATE, SERVICE_PAUSE, ...
apache-2.0
3,158,031,097,565,718,500
33.267045
87
0.704195
false
aksh1/wagtail-cookiecutter-foundation
{{cookiecutter.repo_name}}/pages/migrations/0001_initial.py
5
12936
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion import modelcluster.fields import wagtail.wagtailcore.fields import wagtail.wagtailcore.blocks class Migration(migrations.Migration): dependencies = [ ('wagtailimages...
mit
-7,302,656,029,798,066,000
51.37247
217
0.571892
false
willdonetang/taisi360
tools/parse/parse.py
1
2303
#!/bin/env # -*- coding: utf-8 -*- from langconv import * from bs4 import BeautifulSoup import re import os import json #输入Unicode编辑,输出Unicode def big2simple(line): #转换繁体到简体 line = Converter('zh-hans').convert(line) return line def save_img_url(img_url,num): img_url_file = open("img_url.txt","a") line = num+"...
apache-2.0
-1,982,061,156,409,271,300
20.747573
56
0.65297
false
pabloborrego93/edx-platform
lms/djangoapps/staticbook/views.py
11
6395
""" Views for serving static textbooks. """ from django.contrib.auth.decorators import login_required from django.http import Http404 from edxmako.shortcuts import render_to_response from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.annotator_token import retrieve_token from courseware.acces...
agpl-3.0
-4,165,255,807,668,865,000
34.726257
98
0.641439
false
econchick/heroku-buildpack-python
vendor/pip-1.2.1/contrib/packager/template.py
12
1308
#! /usr/bin/env python sources = """ @SOURCES@""" import os import sys import base64 import zlib import tempfile import shutil def unpack(sources): temp_dir = tempfile.mkdtemp('-scratchdir', 'unpacker-') for package, content in sources.items(): filepath = package.split(".") dirpath = os.sep....
mit
-7,528,958,298,495,622,000
26.25
77
0.590979
false
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Mac/Modules/cf/cfscan.py
34
5533
# Scan an Apple header file, generating a Python file of generator calls. import sys from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner_OSX LONG = "CoreFoundation" SHORT = "cf" OBJECTS = ("CFTypeRef", "CFArrayRef", "CFMutableArrayRef", ...
mit
5,106,745,876,747,666,000
38.241135
88
0.525935
false
jmesteve/medical
openerp/addons/point_of_sale/wizard/pos_session_opening.py
46
5175
from openerp import netsvc from openerp.osv import osv, fields from openerp.tools.translate import _ from openerp.addons.point_of_sale.point_of_sale import pos_session class pos_session_opening(osv.osv_memory): _name = 'pos.session.opening' _columns = { 'pos_config_id' : fields.many2one('pos.config...
agpl-3.0
-3,633,765,165,747,156,500
42.125
110
0.547826
false
terbolous/CouchPotatoServer
libs/suds/transport/__init__.py
209
3895
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
5,351,110,417,002,252,000
28.961538
76
0.597433
false
nicememory/pie
pyglet/pyglet/extlibs/future/py2_3/future/backports/urllib/response.py
82
3180
"""Response classes used by urllib. The base class, addbase, defines a minimal file-like interface, including read() and readline(). The typical response object is an addinfourl instance, which defines an info() method that returns headers and a geturl() method that returns the url. """ from __future__ import absolut...
apache-2.0
875,265,067,722,785,800
29.873786
78
0.59434
false
zaxliu/scipy
doc/source/tutorial/examples/normdiscr_plot2.py
84
1642
import numpy as np import matplotlib.pyplot as plt from scipy import stats npoints = 20 # number of integer support points of the distribution minus 1 npointsh = npoints / 2 npointsf = float(npoints) nbound = 4 #bounds for the truncated normal normbound = (1 + 1 / npointsf) * nbound #actual bounds of truncated normal ...
bsd-3-clause
4,621,654,733,094,236,000
33.208333
79
0.683922
false