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
reinhrst/panda
usr/lib/python2.7/encodings/cp1140.py
593
13361
""" Python Character Mapping Codec cp1140 generated from 'python-mappings/CP1140.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_table) def decode(self,input,errors='stri...
gpl-3.0
7,960,416,192,734,304,000
42.521173
103
0.528029
false
monash-merc/karaage
karaage/legacy/applications/south_migrations/0022_auto__add_field_projectapplication_project_tmp.py
3
17279
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): depends_on = ( ('projects', '0014_move_projects'), ) def forwards(self, orm): # Adding field 'ProjectApplication.project_tmp' db.add_column('applications_project...
gpl-3.0
-1,041,012,787,816,944,100
90.909574
250
0.553099
false
kiszk/spark
python/pyspark/sql/tests/test_functions.py
11
14255
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
1,883,714,875,110,646,500
43.133127
98
0.586882
false
antoviaque/edx-platform
lms/djangoapps/notifier_api/serializers.py
61
2580
from django.contrib.auth.models import User from django.http import Http404 from rest_framework import serializers from openedx.core.djangoapps.course_groups.cohorts import is_course_cohorted from notification_prefs import NOTIFICATION_PREF_KEY from lang_pref import LANGUAGE_KEY class NotifierUserSerializer(serializ...
agpl-3.0
-6,479,230,841,245,813,000
36.391304
90
0.614729
false
abstract-open-solutions/OCB
addons/mrp/company.py
381
1383
# -*- 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
-1,255,041,143,927,766,500
38.514286
84
0.614606
false
ansible/ansible-modules-extras
system/lvol.py
23
17012
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@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 So...
gpl-3.0
-8,710,446,202,842,914,000
33.367677
224
0.563191
false
sibskull/synaptiks
synaptiks/_bindings/xinput.py
1
10525
# -*- coding: utf-8 -*- # Copyright (C) 2010, 2011 Sebastian Wiesner <lunaryorn@googlemail.com> # 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 ...
bsd-2-clause
-1,087,341,911,444,940,700
37.694853
80
0.666508
false
google/mirandum
alerts/streamjar/views.py
1
2919
# 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 required by applica...
apache-2.0
-5,435,160,154,917,147,000
37.407895
195
0.683453
false
brianjgeiger/osf.io
api/osf_groups/permissions.py
10
1463
from rest_framework import permissions from api.base.utils import assert_resource_type, get_user_auth from osf.utils.permissions import MANAGE from osf.models import OSFGroup, OSFUser class IsGroupManager(permissions.BasePermission): acceptable_models = (OSFGroup,) def has_object_permission(self, request, ...
apache-2.0
-8,123,730,830,468,334,000
36.512821
82
0.675325
false
Alwnikrotikz/smap-data
python/smap/drivers/veris.py
6
7104
""" Copyright (c) 2011, 2012, Regents of the University of California 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 l...
bsd-2-clause
-3,971,766,044,113,021,400
36.193717
96
0.617962
false
2015fallhw/cptocadp
static/Brython3.2.3-20151122-082712/Lib/importlib/abc.py
13
14999
"""Abstract base classes related to import.""" from . import _bootstrap from . import machinery try: import _frozen_importlib except ImportError as exc: if exc.name != '_frozen_importlib': raise _frozen_importlib = None import abc import imp import marshal import sys import tokenize im...
agpl-3.0
3,471,733,793,902,550,500
35.126238
79
0.615574
false
zmarano/compute-image-packages
packages/python-google-compute-engine/google_compute_engine/network_utils.py
6
3281
#!/usr/bin/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 required by appli...
apache-2.0
-5,498,860,609,738,152,000
31.485149
78
0.689424
false
abhishek-ch/hue
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/worksheet.py
61
18052
# file openpyxl/worksheet.py # Copyright (c) 2010 openpyxl # # 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, modi...
apache-2.0
8,396,409,353,804,506,000
32.805243
110
0.586528
false
ljgabc/lfs
usr/lib/python2.7/lib-tk/test/runtktests.py
61
4100
""" Use this module to get and run all tk tests. Tkinter tests should live in a package inside the directory where this file lives, like test_tkinter. Extensions also should live in packages following the same rule as above. """ import os import sys import unittest import importlib import test.test_support this_dir_...
gpl-2.0
3,877,968,707,506,603,500
34.964912
80
0.584634
false
aselle/tensorflow
tensorflow/python/training/ftrl.py
16
12154
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
4,072,737,452,814,642,000
44.014815
80
0.636416
false
Azure/azure-sdk-for-python
sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py
1
13103
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-1,892,358,378,943,695,000
47.172794
224
0.636495
false
MaximNevrov/neutron
neutron/tests/unit/plugins/ml2/drivers/macvtap/mech_driver/test_mech_macvtap.py
4
4005
# Copyright (c) 2015 IBM Corp. # 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...
apache-2.0
7,222,537,233,397,726,000
42.532609
79
0.605743
false
emergence/django-simple-history
setup.py
1
1376
from setuptools import setup import simple_history tests_require = [ 'Django>=1.6', 'WebTest==2.0.24', 'django-webtest==1.8.0', 'mock==1.0.1'] setup( name='django-simple-history', version=simple_history.__version__, description='Store model history and view/revert changes from admin site.', long_d...
bsd-3-clause
4,350,315,994,798,762,500
32.560976
79
0.610465
false
cheehieu/bitcoin
qa/rpc-tests/invalidblockrequest.py
87
4077
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, Te...
mit
-2,163,825,666,265,542,400
34.452174
98
0.641648
false
kouaw/CouchPotatoServer
couchpotato/core/downloaders/transmission.py
6
14359
from base64 import b64encode from datetime import timedelta import httplib import json import os.path import re import urllib2 from couchpotato.core._base.downloader.main import DownloaderBase, ReleaseDownloadList from couchpotato.core.helpers.encoding import isInt, sp from couchpotato.core.helpers.variable import try...
gpl-3.0
-4,280,763,762,690,680,000
40.261494
307
0.537363
false
praba230890/PYPOWER
pypower/t/t_opf_dc_pips.py
2
5674
# Copyright (c) 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Tests for DC optimal power flow using PIPS solver. """ from os.path import dirname, join from numpy import array, ones, Inf, arange, r_ from scipy.io import ...
bsd-3-clause
-7,920,979,353,764,380,000
36.328947
86
0.52203
false
rajpushkar83/cloudmesh
cloudmesh/iaas/openstack/queue/tasks.py
1
1498
from __future__ import absolute_import from celery import current_task from celery.utils.log import get_task_logger from cloudmesh.iaas.openstack.queue.celery import celery_openstack_queue from cloudmesh.cm_mongo import cm_mongo import time # # logger = get_task_logger(__name__) # @celery_openstack_queue.task(track_...
apache-2.0
-5,613,488,089,893,839,000
28.96
79
0.700267
false
Ms2ger/servo
tests/wpt/web-platform-tests/old-tests/webdriver/command_contexts/window_size_test.py
141
1050
import os import sys import random import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test repo_root = os.path.abspath(os.path.join(__file__, "../../..")) sys.path.insert(1, os.path.join(repo_root, "tools", "webdriver")) from webdriver import exceptions class WindowSizeT...
mpl-2.0
8,772,035,126,237,110,000
29
90
0.649524
false
rosmo/ansible
lib/ansible/modules/cloud/openstack/os_nova_host_aggregate.py
31
6134
#!/usr/bin/python # Copyright 2016 Jakub Jursa <jakub.jursa1@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-7,254,327,900,279,599,000
32.703297
133
0.585915
false
waheedahmed/edx-platform
lms/djangoapps/bulk_email/migrations/0001_initial.py
49
2975
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import xmodule_django.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
agpl-3.0
1,173,517,489,612,155,600
46.983871
172
0.580168
false
hashworks/CouchPotatoServer
libs/cache/posixemulation.py
193
3541
# -*- coding: utf-8 -*- r""" werkzeug.posixemulation ~~~~~~~~~~~~~~~~~~~~~~~ Provides a POSIX emulation for some features that are relevant to web applications. The main purpose is to simplify support for systems such as Windows NT that are not 100% POSIX compatible. Currently this only imple...
gpl-3.0
1,396,238,265,477,445,400
32.72381
78
0.531771
false
frouty/odoogoeen
openerp/addons/base/res/report/__init__.py
79
1201
# -*- 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
720,474,190,798,623,700
41.892857
111
0.623647
false
zrhans/python
exemplos/diveintopythonzh-cn-5.4b/py/plural/stage3/pluraltest3.py
4
1615
"""Unit test for plural3.py This program is part of "Dive Into Python", a free Python book for experienced programmers. Visit http://diveintopython.org/ for the latest version. """ __author__ = "Mark Pilgrim (mark@diveintopython.org)" __version__ = "$Revision: 1.2 $" __date__ = "$Date: 2004/03/17 14:34:40 $" __copyr...
gpl-2.0
4,886,057,901,165,194,000
31.3
70
0.534985
false
luci/luci-py
client/third_party/infra_libs/utils.py
3
8205
# 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. """Miscellaneous utility functions.""" import contextlib import datetime import errno import json import os import shutil import subprocess import sys impo...
apache-2.0
47,282,429,338,528,530
32.353659
80
0.673979
false
dschwoerer/espresso
testsuite/python/nonBondedInteractions.py
3
5356
# # Copyright (C) 2013,2014,2015,2016 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gpl-3.0
1,206,363,249,799,621,600
41.173228
205
0.617438
false
timabbott/zulip
zerver/tests/test_thumbnail.py
2
17251
import base64 import urllib from io import StringIO import ujson from django.conf import settings from zerver.lib.test_classes import ZulipTestCase from zerver.lib.test_helpers import ( create_s3_buckets, get_test_image_file, override_settings, use_s3_backend, ) from zerver.lib.upload import upload_ba...
apache-2.0
3,161,627,716,120,505,300
45.610811
203
0.628494
false
cgvarela/grpc
tools/buildgen/bunch.py
27
2417
# 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
-7,019,754,291,295,980,000
35.074627
78
0.709971
false
julien78910/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/hark.py
167
1344
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor class HarkIE(InfoExtractor): _VALID_URL = r'https?://www\.hark\.com/clips/(?P<id>.+?)-.+' _TEST = { 'url': 'http://www.hark.com/clips/mmbzyhkgny-obama-beyond-the-afghan-theater-we-only-target-al-qaeda-on...
gpl-3.0
2,036,868,768,088,238,600
39.727273
276
0.585565
false
sloanyang/aquantic
Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
122
2151
# Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
gpl-2.0
2,769,724,141,780,598,300
52.775
114
0.777778
false
Himon-SYNCRAFT/taskplus
tests/core/shared/test_action.py
1
1595
from unittest import mock from taskplus.core.shared.request import RequestError from taskplus.core.shared.response import ResponseFailure from taskplus.core.shared.action import Action def test_action_cannot_process_valid_requests(): request = mock.MagicMock() request.__bool__.return_value = True action...
bsd-3-clause
8,626,479,006,705,309,000
28.537037
76
0.715361
false
arne-cl/rst_discourse_parser
tools/crfsuite/crfsuite-0.12/swig/python/setup.py
2
1025
#!/usr/bin/env python """ setup.py file for SWIG example """ import sys import os.path def get_rootdir(): return '' #return '/home/users/okazaki/local' def get_includedir(): return os.path.join(get_rootdir(), 'include') def get_librarydir(): return os.path.join(get_rootdir(), 'lib') import os; os.en...
bsd-2-clause
4,028,055,360,962,945,500
21.777778
63
0.581463
false
Ayrx/pyDropSecure
src/aes.py
1
2502
import cPickle as pickle import hashlib import hmac import os from Crypto.Cipher import AES class AuthenticationError(Exception): pass class Crypticle(object): """Authenticated encryption class Encryption algorithm: AES-CBC Signing algorithm: HMAC-SHA256 """ PICKLE_PAD = "pickle::" AES...
mit
-6,204,774,813,830,192,000
33.763889
72
0.626699
false
eric-stanley/NewsBlur
vendor/paypal/standard/pdt/models.py
2
3434
#!/usr/bin/env python # -*- coding: utf-8 -*- from urllib import unquote_plus import urllib2 from django.db import models from django.conf import settings from django.http import QueryDict from django.utils.http import urlencode from vendor.paypal.standard.models import PayPalStandardBase from vendor.paypal.standard.co...
mit
-997,422,446,273,730,600
37.166667
138
0.610658
false
pulse-vadc/neutron-lbaas-device-driver
setup.py
2
1997
#!/usr/bin/env python from distutils.core import setup import os from subprocess import check_output driver_path = None try: cmd_output = check_output( ["/usr/bin/locate", "neutron_lbaas/drivers/brocade/driver_v2.py"] ) if len(cmd_output) > 0: path_guess = os.path.dirname(cmd_output.split(...
apache-2.0
8,304,207,922,768,679,000
30.698413
73
0.617426
false
Charlotte-Morgan/inasafe
safe/report/test/hello_world_report.py
3
2707
# coding=utf-8 """Reporting 101.""" import os import unittest from safe.common.utilities import safe_dir from safe.definitions.constants import INASAFE_TEST from safe.definitions.reports import ( jinja2_component_type, final_product_tag, table_product_tag, html_product_tag) from safe.impact_function....
gpl-3.0
902,935,875,375,863,800
27.797872
77
0.673439
false
GuillaumeGomez/servo
tests/wpt/web-platform-tests/cors/resources/cors-makeheader.py
122
2224
import json def main(request, response): origin = request.GET.first("origin", request.headers.get('origin')) if "check" in request.GET: token = request.GET.first("token") value = request.server.stash.take(token) if value is not None: if request.GET.first("check", None) == "...
mpl-2.0
-9,182,872,012,219,639,000
32.19403
98
0.598921
false
xiaojunwu/crosswalk-test-suite
webapi/webapi-nativefilesystem-xwalk-tests/inst.xpk.py
187
5919
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=u...
bsd-3-clause
8,789,043,934,424,453,000
27.456731
89
0.541814
false
vlegoff/tsunami
src/primaires/pnj/commandes/chemin/supprimer.py
1
2940
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
bsd-3-clause
3,209,211,412,660,445,700
43.333333
79
0.701982
false
nichung/wwwflaskBlogrevA
env/lib/python2.7/site-packages/pymongo/database.py
19
44900
# Copyright 2009-2015 MongoDB, 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 writin...
mit
-4,766,031,925,684,181,000
39.414041
80
0.574967
false
rsteca/python-social-auth
social/tests/backends/test_soundcloud.py
92
1631
import json from social.tests.backends.oauth import OAuth2Test class SoundcloudOAuth2Test(OAuth2Test): backend_path = 'social.backends.soundcloud.SoundcloudOAuth2' user_data_url = 'https://api.soundcloud.com/me.json' expected_username = 'foobar' access_token_body = json.dumps({ 'access_token'...
bsd-3-clause
-6,488,635,597,201,635,000
29.203704
64
0.551196
false
jchevin/MissionPlanner-master
Lib/wsgiref/headers.py
229
5879
"""Manage HTTP Response Headers Much of this module is red-handedly pilfered from email.message in the stdlib, so portions are Copyright (C) 2001,2002 Python Software Foundation, and were written by Barry Warsaw. """ from types import ListType, TupleType # Regular expression that matches `special' characters in para...
gpl-3.0
3,154,750,482,921,257,000
33.786982
80
0.607756
false
neutralio/nio-cli
tests/test_buildrelease.py
2
1172
import unittest from unittest import skipIf try: from nio_cli.commands.buildrelease import BuildRelease niocore_installed = True except: niocore_installed = False class TestCLI(unittest.TestCase): @skipIf(not niocore_installed, 'niocore required for buildrelease') def test_buildrelease_git_remot...
apache-2.0
-8,013,304,329,857,981,000
36.806452
72
0.616041
false
x4dr/NossiNet
NossiInterface/reminder.py
1
5119
import pathlib import re import sqlite3 import time from datetime import datetime, timedelta, tzinfo from typing import List, Tuple import discord import pytz from dateutil.tz import gettz from pytz import reference last = {} delete = [] date_formats = [ "%d.%m.%y %H:%M:%S", "%d.%m.%Y %H:%M:%S", "%d.%m.%...
gpl-2.0
-893,522,602,274,144,500
28.085227
85
0.533503
false
gilneidp/TADD
lib/packet/packet_base.py
46
6226
# Copyright 2011 James McCauley # Copyright 2008 (C) Nicira, 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 ap...
apache-2.0
2,777,338,238,279,902,700
29.077295
79
0.548346
false
mradamcox/ead
ead/models/forms.py
1
49635
''' ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund 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 Founda...
agpl-3.0
6,611,774,625,548,482,000
38.612929
197
0.553541
false
mancoast/CPythonPyc_test
fail/335_test_loader.py
4
4957
from importlib import machinery import imp import unittest from .. import abc from .. import util from test.support import captured_stdout class LoaderTests(abc.LoaderTests): def test_module(self): with util.uncache('__hello__'), captured_stdout() as stdout: module = machinery.FrozenImporter.l...
gpl-3.0
5,204,936,333,826,768,000
40.308333
76
0.549728
false
NirBenTalLab/proorigami-ptgraph
domeval.py
2
18915
############################################################################### # # domeval.py - functions to evaluate domain decomposition accuracy # # File: domeval.py # Author: Alex Stivala # Created: December 2007 # # $Id: domeval.py 3236 2010-01-13 02:06:50Z alexs $ # ##########################################...
mit
-7,267,921,905,100,535,000
40.20915
113
0.598996
false
0x7678/ZeroNet
src/lib/pybitcointools/bitcoin/py3specials.py
1
3405
import sys, os import binascii import hashlib if sys.version_info.major == 3: string_types = (str) string_or_bytes_types = (str, bytes) int_types = (int, float) # Base switching code_strings = { 2: '01', 10: '0123456789', 16: '0123456789abcdef', 32: 'abcdefghijklmno...
gpl-2.0
-352,043,717,480,660,300
27.855932
78
0.55536
false
liangwang/m5
ext/ply/test/testlex.py
102
22409
# testlex.py import unittest try: import StringIO except ImportError: import io as StringIO import sys sys.path.insert(0,"..") sys.tracebacklimit = 0 import ply.lex def check_expected(result,expected): if sys.version_info[0] >= 3: if isinstance(result,str): result = result.encode('as...
bsd-3-clause
-1,833,723,081,429,282,800
37.569707
126
0.486635
false
eammx/proyectosWeb
proyectoPython/env/lib/python3.6/site-packages/pip/_vendor/html5lib/serializer.py
56
15758
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import re from codecs import register_error, xmlcharrefreplace_errors from .constants import voidElements, booleanAttributes, spaceCharacters from .constants import rcdataElements, entities, xmlEntities from . im...
mit
6,872,549,106,018,664,000
37.528117
116
0.53871
false
Tithen-Firion/youtube-dl
youtube_dl/extractor/ustudio.py
64
4392
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, unescapeHTML, ) class UstudioIE(InfoExtractor): IE_NAME = 'ustudio' _VALID_URL = r'https?://(?:(?:www|v1)\.)?ustudio\.com/video/(?P<id>[^/]+)/(?P<display_id>[^/...
unlicense
-1,976,392,681,627,435,000
34.136
103
0.513889
false
dsullivan7/scikit-learn
examples/cluster/plot_lena_segmentation.py
271
2444
""" ========================================= Segmenting the picture of Lena in regions ========================================= This example uses :ref:`spectral_clustering` on a graph created from voxel-to-voxel difference on an image to break this image into multiple partly-homogeneous regions. This procedure (spe...
bsd-3-clause
2,210,860,306,139,603,500
32.027027
79
0.638707
false
uniphil/heroku-buildpack-pythonsass
vendor/setuptools-2.1/setup.py
5
7973
#!/usr/bin/env python """Distutils setup file, used to install or test 'setuptools'""" import sys import os import textwrap # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) src_root = None from distutils.util import convert_path command_ns = {} init_path = convert...
mit
-6,242,205,037,892,891,000
38.865
123
0.626364
false
msabramo/ansible
lib/ansible/module_utils/ansible_tower.py
50
3887
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
-899,668,914,267,376,300
43.678161
94
0.694109
false
cchristelis/feti
django_project/core/wsgi.py
2
2100
# coding=utf-8 """ WSGI config for projecta project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSG...
bsd-2-clause
-1,181,652,181,885,218,000
36.5
79
0.774286
false
YannickB/odoo-hosting
clouder_website/__manifest__.py
1
1442
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron, Nicolas Petit # Copyright 2015, TODAY Clouder SASU # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License with...
agpl-3.0
-6,727,422,062,542,398,000
35.974359
79
0.608877
false
nikhilprathapani/python-for-android
python-modules/twisted/twisted/conch/client/direct.py
60
3234
# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.internet import defer, protocol, reactor from twisted.conch import error from twisted.conch.ssh import transport from twisted.python import log class SSHClientFactory(protocol.ClientFactory): def __init__(self, d, o...
apache-2.0
643,218,857,491,411,000
29.224299
86
0.644094
false
antring/RssThingyServer
server.py
1
1585
__author__ = 'Antring' import urllib.request import os import feedparser import datetime from time import * class rssReader: '''Class for finding and downloading podcast''' def __init__(self, url): self.rssurl = url self.podstream = feedparser.parse(self.rssurl) self.podLink = self.p...
mit
1,476,858,080,664,317,400
32.041667
118
0.601262
false
cosma/phest
fabfile.py
1
3679
from __future__ import print_function from fabric.api import local, run, env, parallel, roles, hide, sudo, hosts, \ task, execute, cd, warn_only from fabric.contrib.files import exists from fabric.contrib.console import confirm from fabric.colors import red, green, yellow from datetime import timedelta import json ...
mit
-3,133,260,982,558,655,500
32.445455
77
0.585757
false
Midrya/chromium
testing_support/super_mox.py
25
5140
# Copyright (c) 2011 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. """Simplify unit tests based on pymox.""" import os import random import shutil import string import StringIO import subprocess import sys sys.path.app...
bsd-3-clause
3,505,060,097,957,324,000
33.266667
78
0.653891
false
MQQiang/kbengine
kbe/res/scripts/common/Lib/test/test_range.py
67
23223
# Python test set -- built-in functions import test.support, unittest import sys import pickle import itertools # pure Python implementations (3 args only), for comparison def pyrange(start, stop, step): if (start - stop) // step < 0: # replace stop with next element in the sequence of integers # ...
lgpl-3.0
-6,879,267,852,571,927,000
34.618098
80
0.526805
false
atmark-techno/atmark-dist
user/mosquitto/mosquitto-1.3.4/test/broker/08-tls-psk-pub.py
18
1866
#!/usr/bin/env python import subprocess import socket import ssl import sys import time if sys.version < '2.7': print("WARNING: SSL not supported on Python 2.6") exit(0) if ssl.OPENSSL_VERSION_NUMBER < 0x10000000: print("WARNING: TLS-PSK not supported on OpenSSL < 1.0") exit(0) import inspect, os, ...
gpl-2.0
2,695,088,943,380,013,000
25.28169
129
0.660772
false
shashisp/blumix-webpy
app/gluon/contrib/simplejsonrpc.py
16
5041
# -*- coding: utf-8 -*- # 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 3, or (at your option) any later # version. # # This program is distributed in the hope that it will...
mit
-8,154,049,407,800,428,000
31.733766
103
0.620512
false
xyzz/vcmi-build
project/jni/python/src/Lib/mhlib.py
290
33434
"""MH interface -- purely object-oriented (well, almost) Executive summary: import mhlib mh = mhlib.MH() # use default mailbox directory and profile mh = mhlib.MH(mailbox) # override mailbox location (default from profile) mh = mhlib.MH(mailbox, profile) # override mailbox and profile mh.error(format, ...)...
lgpl-2.1
5,916,842,880,405,519,000
32.267662
79
0.529551
false
choderalab/openpathsampling
openpathsampling/engines/features/shared.py
1
10616
import copy import numpy as np from openpathsampling.netcdfplus import StorableObject, ObjectStore, WeakLRUCache from openpathsampling.integration_tools import error_if_no_simtk_unit, unit def unmask_quantity(quantity): """Force a maskedarray quantity to be unmasked. NetCDF keeps giving us masked arrays, eve...
lgpl-2.1
8,604,886,152,840,035,000
30.315634
97
0.55162
false
pylada/pylada-light
tests/vasp/test_parse.py
1
3004
############################### # This file is part of PyLaDa. # # Copyright (C) 2013 National Renewable Energy Lab # # PyLaDa is a high throughput computational platform for Physics. It aims to make it easier to submit # large numbers of jobs on supercomputers. It provides a python interface to physical input, suc...
gpl-3.0
975,606,928,899,043,700
39.594595
103
0.552264
false
jamming/FrameworkBenchmarks
toolset/databases/mongodb/mongodb.py
14
2832
import pymongo import traceback from colorama import Fore from toolset.utils.output_helper import log from toolset.databases.abstract_database import AbstractDatabase class Database(AbstractDatabase): @classmethod def get_connection(cls, config): return pymongo.MongoClient(host = config.database_host...
bsd-3-clause
-8,361,612,614,892,630,000
33.962963
124
0.580862
false
caogang/wgan-gp
tflib/ops/linear.py
6
4548
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def disable_default_weightnorm(): global _default_weightnorm _default_weightnorm = False _weights_stdev = None def set_wei...
mit
7,615,435,405,939,389,000
29.736486
98
0.504617
false
ar7z1/ansible
lib/ansible/plugins/action/net_vrf.py
756
1058
# (c) 2017, Ansible 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 di...
gpl-3.0
-2,841,375,943,077,635,600
36.785714
73
0.736295
false
supercheetah/diceroller
pyinstaller/buildtests/basic/test_pkg_structures.py
2
1265
# Copyright (C) 2005, Giovanni Bajo # Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, 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...
artistic-2.0
-2,836,117,741,437,454,000
27.111111
82
0.693281
false
maclandrol/ete
ete2/evol/parser/__init__.py
3
1603
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # t...
gpl-3.0
-4,214,002,456,937,048,600
35.431818
75
0.65315
false
chris-wood/SCoNet
ns-3-dev/src/visualizer/visualizer/plugins/ndnsim_pit.py
8
2831
import gtk import ns.core import ns.network import ns.internet import ns.ndnSIM from visualizer.base import InformationWindow class ShowNdnPit(InformationWindow): ( COLUMN_PREFIX, COLUMN_FACE ) = range(2) def __init__(self, visualizer, node_index): InformationWindow.__init__(...
gpl-2.0
-296,941,484,494,716,540
30.455556
91
0.574355
false
wkritzinger/asuswrt-merlin
release/src/router/nfs-utils/tools/nfs-iostat/nfs-iostat.py
16
20312
#!/usr/bin/env python # -*- python-mode -*- """Emulate iostat for NFS mount points using /proc/self/mountstats """ __copyright__ = """ Copyright (C) 2005, Chuck Lever <cel@netapp.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as...
gpl-2.0
5,856,829,283,884,515,000
35.014184
98
0.547804
false
Jgarcia-IAS/SAT
openerp/addons-extra/odoo-pruebas/odoo-server/addons-extra/l10n_co_account_extra/account_voucher.py
5
2058
# -*- 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 ...
agpl-3.0
-4,777,135,844,288,609,000
42.73913
251
0.580661
false
francisco-dlp/hyperspy
hyperspy/_components/eels_cl_edge.py
2
14796
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
8,309,615,112,963,823,000
37.431169
79
0.60638
false
ucsb-seclab/ictf-framework
database/ictf-db-export-s3.py
1
4447
#!/usr/bin/env python import sys from subprocess import check_output, CalledProcessError, Popen import logging import os import signal import re import boto3 import yaml import glob from os.path import join, basename import threading from time import sleep from filecmp import cmp as fcmp sys.path.append(os.path.abspa...
gpl-2.0
-5,391,890,521,695,865,000
32.689394
103
0.585114
false
mikefullerton/Piecemeal-Scripts
Scripts/pieces/commands/install-xcode-configs.py
1
1975
#!/usr/bin/python # pieces.py # fishlamp-install # # Created by Mike Fullerton on 8/3/13. # import sys import os scriptName = os.path.basename(sys.argv[0]) scriptPath = os.path.dirname(sys.argv[0]) sharedPath = os.path.join(scriptPath, "../../shared/") sys.path.append(os.path.abspath(sharedPath)) import Utils im...
mit
-6,021,633,853,614,896,000
23.6875
78
0.642025
false
RaumZeit/gdesklets-core
display/TargetDisplay.py
2
1317
from TargetGroup import TargetGroup from utils.datatypes import * from layout import Unit class TargetDisplay(TargetGroup): def __init__(self, name, parent): TargetGroup.__init__(self, name, parent) self._register_property("desktop-borders", TYPE_UNIT_LIST, self....
gpl-2.0
4,332,440,241,181,806,600
31.121951
71
0.570995
false
Godiyos/python-for-android
python-modules/twisted/twisted/internet/error.py
49
8649
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Exceptions and errors for use in twisted.internet modules. Maintainer: Itamar Shtull-Trauring """ import socket from twisted.python import deprecate from twisted.python.versions import Version class BindError(Exception): ""...
apache-2.0
-732,345,982,880,151,600
24.215743
92
0.609435
false
glove747/liberty-neutron
neutron/tests/unit/extensions/test_dns.py
5
22551
# Copyright 2015 Rackspace # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
8,403,493,286,332,073,000
46.575949
79
0.523835
false
marinho/geraldo
site/newsite/site-geraldo/django/contrib/webdesign/lorem_ipsum.py
439
4872
""" Utility functions for generating "lorem ipsum" Latin text. """ import random COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo con...
lgpl-3.0
2,889,187,188,153,059,300
47.237624
459
0.609401
false
towerjoo/mindsbook
djangoappengine/storage.py
110
5599
import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.core.files.uploadedfile import UploadedFile from django.core.files.uploadhandler im...
bsd-3-clause
-7,455,518,658,176,394,000
32.130178
89
0.618325
false
sarakha63/persomov
libs/enzyme/core.py
180
15208
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
gpl-3.0
886,517,308,164,273,200
32.795556
103
0.541294
false
kageiit/buck
python-dsl/buck_parser/buck_test.py
5
25737
# Copyright (c) Facebook, Inc. and its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
-4,905,152,681,879,350,000
33.5
95
0.489412
false
flyher/pymo
android/pgs4a-0.9.6/python-install/bin/smtpd.py
4
18597
#!/home/tom/ab/android/python-for-android/build/python-install/bin/python2.7 """An RFC 2821 smtp proxy. Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]] Options: --nosetuid -n This program generally tries to setuid `nobody', unless this flag is set. The setuid call ...
mit
-2,804,617,339,395,250,700
32.508108
78
0.550949
false
alisidd/tensorflow
tensorflow/python/client/device_lib.py
149
1308
# 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
1,701,532,477,360,626,000
35.333333
80
0.707187
false
lpsinger/astropy
docs/conftest.py
8
1593
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This file needs to be included here to make sure commands such # as ``pytest docs/...`` works, since this # will ignore the conftest.py file at the root of the repository # and the one in astropy/conftest.py import os import tempfile import pytest # M...
bsd-3-clause
-2,538,814,335,000,128,500
37.853659
82
0.711864
false
thaim/ansible
lib/ansible/modules/network/f5/bigip_pool_member.py
21
54988
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # Copyright: (c) 2013, Matt Hite <mhite@hotmail.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type AN...
mit
-395,011,032,665,641,700
32.165259
139
0.573852
false
andrewleech/script.module.raven
lib/raven/transport/gevent.py
20
1660
""" raven.transport.gevent ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from raven.transport.base import AsyncTransport from raven.transport.http import HTTPTransport try: ...
bsd-3-clause
-1,404,247,219,207,063,000
30.320755
86
0.648795
false
francescobaldi86/Ecos2015PaperExtension
Python files/input.py
1
6118
import os from helpers import d2df import numpy as np def filenames(project_path): #project_path = os.path.realpath('..') #project_path = os.path.dirname(os.path.realpath(__file__)) #project_path = project_path + os.sep + ".." output = {} # Input files output["dataset_raw"] = project_path + o...
mit
8,425,017,206,775,058,000
69.321839
177
0.635011
false
jotes/ansible-modules-core
cloud/google/gce_net.py
104
9311
#!/usr/bin/python # Copyright 2013 Google 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 vers...
gpl-3.0
-3,584,834,994,835,716,600
30.778157
95
0.595962
false
Zhongqilong/mykbengineer
kbe/src/lib/python/Lib/plat-freebsd5/IN.py
374
7777
# Generated by h2py from /usr/include/netinet/in.h IPPROTO_IP = 0 IPPROTO_HOPOPTS = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 IPPROTO_GGP = 3 IPPROTO_IPV4 = 4 IPPROTO_IPIP = IPPROTO_IPV4 IPPROTO_TCP = 6 IPPROTO_ST = 7 IPPROTO_EGP = 8 IPPROTO_PIGP = 9 IPPROTO_RCCMON = 10 IPPROTO_NVPII = 11 IPPROTO_PUP = 12 IPPROTO_ARGUS = 13 ...
lgpl-3.0
5,018,303,573,493,367,000
20.907042
76
0.731387
false
livni/old-OK
src/knesset/user/migrations/0002_follow_with_activity_stream.py
1
11633
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from actstream import follow from django.contrib.auth.models import User from knesset.mks.models import Party, Member class Migration(DataMigration): def forwards(self, orm): "Write yo...
bsd-3-clause
7,230,188,513,006,434,000
76.553333
200
0.548698
false
puyilio/Application-for-PyBoard
3d.py
1
3205
# -*- coding: utf-8 -*- """ Demonstrate use of GLLinePlotItem to draw cross-sections of a surface. """ ## Add path to library (just for examples; you do not need this) #import initExample from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph.opengl as gl import pyqtgraph as pg import numpy as np import scipy.ndimag...
gpl-3.0
3,607,923,558,022,148,600
20.366667
97
0.590016
false
fifengine/fifengine
engine/python/fife/extensions/pychan/widgets/spacer.py
1
3729
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
lgpl-2.1
-1,472,018,678,801,020,200
27.037594
71
0.626441
false