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
ronaldsantos63/tkGAME
tkRAD/xml/rad_xml_widget.py
1
109576
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ tkRAD - tkinter Rapid Application Development library (c) 2013+ Raphaël SEBAN <motus@laposte.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 S...
gpl-3.0
-3,760,222,958,858,657,300
19.083394
80
0.489081
false
elewis33/doorstop
doorstop/core/vcs/test/test_base.py
1
1655
"""Unit tests for the doorstop.vcs.base module.""" import unittest from unittest.mock import patch from doorstop.core.vcs.base import BaseWorkingCopy class SampleWorkingCopy(BaseWorkingCopy): """Sample WorkingCopy implementation.""" def __init__(self, path): super().__init__(path) self._ig...
lgpl-3.0
3,453,686,952,220,015,000
29.648148
69
0.641692
false
rosudrag/Freemium-winner
VirtualEnvironment/Lib/site-packages/oauthlib/oauth2/rfc6749/clients/backend_application.py
87
2498
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. """ from __future__ import absolute_import, unicode_literals from .base import Client from ..parameters import prepare_token_request from ...
mit
-2,572,113,371,859,860,500
39.95082
77
0.679744
false
rlowrance/dot-vimrc
.vim/ftplugin/orgmode/plugins/ShowHide.py
9
4095
# -*- coding: utf-8 -*- from orgmode import settings from orgmode import ORGMODE, apply_count from orgmode.menu import Submenu, ActionEntry from orgmode.keybinding import Keybinding, Plug, MODE_NORMAL import vim class ShowHide(object): u""" Show Hide plugin """ def __init__(self): u""" Initialize plugin """ o...
gpl-3.0
-5,777,757,769,350,742,000
31.76
153
0.672039
false
Jionglun/2015
2015-master/static/Brython3.1.1-20150328-091302/Lib/_io.py
629
72610
""" Python implementation of the io module. """ import os import abc import codecs import errno # Import _thread instead of threading to reduce startup cost try: from _thread import allocate_lock as Lock except ImportError: from _dummy_thread import allocate_lock as Lock import io #brython fix me #from io imp...
gpl-3.0
4,657,499,971,978,448,000
33.774904
81
0.577028
false
sharad/calibre
src/calibre/devices/mtp/books.py
9
2346
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
gpl-3.0
-7,889,939,088,412,574,000
30.28
79
0.61509
false
toshywoshy/ansible
lib/ansible/modules/cloud/amazon/ec2_group_info.py
8
5352
#!/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
8,468,275,218,005,620,000
31.240964
154
0.668161
false
librasungirl/openthread
tools/harness-automation/cases/router_5_1_1.py
18
1877
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
-3,942,452,090,727,423,000
40.711111
77
0.761854
false
lidakanari/NeuroM
neurom/check/morphtree.py
4
9010
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
bsd-3-clause
6,282,808,303,242,534,000
38.004329
100
0.664706
false
Kazade/NeHe-Website
django/contrib/gis/geos/prototypes/__init__.py
244
1319
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import create_cs, get_cs, \ cs_clone, cs_getordinate, cs_setordinate, c...
bsd-3-clause
4,009,987,618,063,445,500
42.966667
92
0.749052
false
lifeinoppo/littlefishlet-scode
RES/REF/python_sourcecode/ipython-master/IPython/terminal/embed.py
1
10539
# encoding: utf-8 """ An embedded IPython shell. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import with_statement from __future__ import print_function import sys import warnings from IPython.core import ultratb, compilerop from IPython.co...
gpl-2.0
1,614,354,513,526,684,000
36.910072
128
0.632887
false
2947721120/thumbor
thumbor/error_handlers/sentry.py
6
2455
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com import pkgutil import pkg_resources from thumbor import __version__ ...
mit
-4,518,802,225,452,221,000
28.578313
115
0.535642
false
neerajvashistha/pa-dude
lib/python2.7/site-packages/xlsxwriter/chart_scatter.py
1
9950
############################################################################### # # ChartScatter - A class for writing the Excel XLSX Scatter charts. # # Copyright 2013-2016, John McNamara, jmcnamara@cpan.org # from . import chart class ChartScatter(chart.Chart): """ A class for writing the Excel XLSX Scatte...
mit
3,647,619,945,412,625,000
29.428135
79
0.497889
false
neos/neos-development-collection
Neos.Neos/Documentation/conf.py
8
10221
# -*- coding: utf-8 -*- # # Neos CMS documentation build configuration file, created by # sphinx-quickstart on Wed May 20 21:31:09 2015. # # 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. # # ...
gpl-3.0
6,560,101,418,058,234,000
31.654952
98
0.710694
false
manuelfelipe/openstack-ansible
scripts/pw-token-gen.py
25
7433
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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...
apache-2.0
2,239,042,654,957,201,700
33.572093
78
0.623436
false
appleseedhq/gaffer
python/GafferUITest/LinearContainerTest.py
4
10687
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
bsd-3-clause
-1,169,970,368,948,616,000
48.248848
133
0.676616
false
rhyolight/nupic
tests/integration/nupic/opf/opf_checkpoint_stress_test.py
10
4775
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
4,086,625,066,712,806,000
32.159722
78
0.567749
false
softDi/clusim
ns3/ns-3.26/src/dsdv/bindings/modulegen__gcc_ILP32.py
30
524972
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
apache-2.0
1,966,422,048,008,831,000
62.834144
934
0.603821
false
tanghaibao/jcvi
jcvi/formats/contig.py
1
4644
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ TIGR contig format, see spec: <http://www.cbcb.umd.edu/research/contig_representation.shtml#contig> """ import sys import logging from jcvi.formats.base import BaseFile, read_block from jcvi.apps.base import OptionParser, ActionDispatcher class ReadLine(object): ...
bsd-2-clause
6,537,249,024,256,868,000
24.516484
82
0.528208
false
yunfeilu/scikit-learn
examples/manifold/plot_lle_digits.py
59
8576
""" ============================================================================= Manifold learning on handwritten digits: Locally Linear Embedding, Isomap... ============================================================================= An illustration of various embeddings on the digits dataset. The RandomTreesEmbed...
bsd-3-clause
-7,888,338,527,069,575,000
36.286957
93
0.557952
false
smart-developerr/my-first-blog
Lib/site-packages/django/utils/text.py
52
14636
from __future__ import unicode_literals import re import unicodedata from gzip import GzipFile from io import BytesIO from django.utils import six from django.utils.encoding import force_text from django.utils.functional import SimpleLazyObject, keep_lazy, keep_lazy_text from django.utils.safestring import SafeText, ...
gpl-3.0
2,681,938,217,134,081,000
32.415525
90
0.556914
false
msotov/SPECIES
PhotometricRelations_class.py
1
51670
from __future__ import print_function from __future__ import division from builtins import str from builtins import zip from builtins import range from dataclasses import dataclass, field from typing import List import warnings import numpy as np from astroquery.vizier import Vizier from astropy import units as u from...
mit
5,777,800,115,582,499,000
43.735931
105
0.452913
false
nickdex/cosmos
code/artificial_intelligence/src/logistic_regression/logistic_regression.py
3
1825
# Logistic regression implemented from Scratch in Python import numpy as np import matplotlib.pyplot as plt def sigmoid(scores): return 1 / (1 + np.exp(-scores)) def log_likelihood(features, target, weights): scores = np.dot(features, weights) ll = np.sum(target * scores - np.log(1 + np.exp(scores))) ...
gpl-3.0
1,587,915,003,802,502,400
24.704225
85
0.669041
false
falbassini/Samples
python/v2.1/run_report.py
3
1930
#!/usr/bin/python # # 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 b...
apache-2.0
-305,704,290,789,326,900
30.639344
77
0.704663
false
primoz-k/parilis
config/settings/local.py
1
1840
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
bsd-3-clause
3,226,516,549,890,203,000
29.163934
110
0.472826
false
yamada-h/ryu
ryu/log.py
5
3342
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp> # # 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://...
apache-2.0
7,737,270,641,920,993,000
30.233645
78
0.654099
false
40223145c2g18/c2g18
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/browser/markdown.py
53
11306
import browser.html import _jsre as re import __random as random letters = 'abcdefghijklmnopqrstuvwxyz' letters += letters.upper()+'0123456789' class URL: def __init__(self,src): elts = src.split(maxsplit=1) self.href = elts[0] self.alt = '' if len(elts)==2: alt = elts[...
gpl-2.0
-5,121,357,834,787,795,000
29.474394
78
0.409252
false
srottem/indy-sdk
docs/how-tos/write-did-and-query-verkey/python/step3.py
4
1720
# First, put a steward DID and its keypair in the wallet. This doesn't write anything to the ledger, # but it gives us a key that we can use to sign a ledger transaction that we're going to submit later. print_log('\n5. Generate and store steward DID and verkey\n') # The DID and public v...
apache-2.0
-1,700,114,655,433,358,800
80.904762
119
0.685465
false
mozilla/addons-server
tests/performance/tasks/user.py
4
8985
import logging import urlparse import random from django.conf import settings from locust import TaskSet, task import lxml.html from fxa import oauth as fxa_oauth import helpers log = logging.getLogger(__name__) MAX_UPLOAD_POLL_ATTEMPTS = 200 FXA_CONFIG = settings.FXA_CONFIG[settings.DEFAULT_FXA_CONFIG_NAME] clas...
bsd-3-clause
763,409,661,975,274,100
30.975089
87
0.554146
false
tanmaykm/edx-platform
common/djangoapps/contentserver/caching.py
16
1658
""" Helper functions for caching course assets. """ from django.core.cache import caches from django.core.cache.backends.base import InvalidCacheBackendError from opaque_keys import InvalidKeyError from xmodule.contentstore.content import STATIC_CONTENT_VERSION # See if there's a "course_assets" cache configured, and ...
agpl-3.0
-2,313,513,593,919,596,500
32.836735
105
0.721954
false
rizar/attention-lvcsr
libs/Theano/theano/tensor/blas.py
1
91536
"""Ops and optimizations for using BLAS calls BLAS = Basic Linear Algebra Subroutines Learn more about BLAS here: http://www.netlib.org/blas/blast-forum/ The standard BLAS libraries implement what is called "legacy BLAS" in that document. This documentation describes Theano's BLAS optimization pipeline. Where th...
mit
-770,717,499,347,113,300
36.871742
118
0.510149
false
Logitech/logiPy
logipy/logi_led.py
1
22401
""" logi_led.py : Defines the exported functions for the API Logitech Gaming LED SDK Copyright (C) 2011-2015 Logitech. All rights reserved. Author: Tom Lambert Email: devtechsupport@logitech.com """ import ctypes import os import platform import struct # Helpers # class Color: """ an RGBA color object that can ...
mit
-3,395,302,064,906,435,000
42.16185
218
0.586626
false
overtherain/scriptfile
software/googleAppEngine/lib/django_1_2/tests/modeltests/test_client/urls.py
99
1592
from django.conf.urls.defaults import * from django.views.generic.simple import redirect_to import views urlpatterns = patterns('', (r'^get_view/$', views.get_view), (r'^post_view/$', views.post_view), (r'^header_view/$', views.view_with_header), (r'^raw_post_view/$', views.raw_post_view), (r'^redi...
mit
-7,090,060,501,619,690,000
53.896552
104
0.657663
false
riemarc/pyinduct
pyinduct/tests/test_eigenfunctions.py
3
22740
import unittest import numpy as np import pyinduct as pi import pyinduct.parabolic as parabolic from pyinduct.tests import show_plots import matplotlib.pyplot as plt class TestAddMulFunction(unittest.TestCase): def test_it(self): a_mat = np.diag(np.ones(3)) b = np.array( [pi.AddMulFu...
gpl-3.0
-6,624,406,439,167,280,000
40.878453
118
0.503298
false
groschovskiy/personfinder
app/unidecode/x073.py
252
4646
data = ( 'Sha ', # 0x00 'Li ', # 0x01 'Han ', # 0x02 'Xian ', # 0x03 'Jing ', # 0x04 'Pai ', # 0x05 'Fei ', # 0x06 'Yao ', # 0x07 'Ba ', # 0x08 'Qi ', # 0x09 'Ni ', # 0x0a 'Biao ', # 0x0b 'Yin ', # 0x0c 'Lai ', # 0x0d 'Xi ', # 0x0e 'Jian ', # 0x0f 'Qiang ', # 0x10 'Kun...
apache-2.0
-1,690,496,657,246,755,800
17.007752
20
0.391089
false
apacha/MusicSymbolClassifier
ModelTrainer/models/ResNet1Configuration.py
1
4585
from tensorflow.keras import Input from tensorflow.keras import Model from tensorflow.keras.layers import Layer, Activation, BatchNormalization, Convolution2D, Dense, Flatten, MaxPooling2D, AveragePooling2D, \ add from tensorflow.keras.models import Sequential from tensorflow.keras.regularizers import l2 from tenso...
mit
4,156,541,043,432,627,000
44.39604
139
0.615485
false
rockaboxmedia/pexpect
examples/script.py
17
3028
#!/usr/bin/env python """This spawns a sub-shell (bash) and gives the user interactive control. The entire shell session is logged to a file called script.log. This behaves much like the classic BSD command 'script'. ./script.py [-a] [-c command] {logfilename} logfilename : This is the name of the log file. Defa...
mit
-4,560,557,366,817,638,000
28.398058
89
0.554161
false
sergio-incaser/odoo
addons/crm/crm_phonecall.py
66
14918
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-1,584,293,023,944,547,600
48.234323
145
0.569111
false
orangeduck/PyAutoC
Python27/Lib/encodings/iso8859_2.py
593
13660
""" Python Character Mapping Codec iso8859_2 generated from 'MAPPINGS/ISO8859/8859-2.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='...
bsd-2-clause
9,144,150,991,163,834,000
43.495114
107
0.537335
false
anryko/ansible
test/units/module_utils/basic/test_set_mode_if_different.py
43
5287
# -*- coding: utf-8 -*- # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ =...
gpl-3.0
7,828,596,761,579,588,000
35.972028
123
0.649139
false
chrismeyersfsu/ansible
lib/ansible/modules/cloud/amazon/ec2_elb_facts.py
23
8307
#!/usr/bin/python # # This is a 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. # # This Ansible library is distributed in the hope that i...
gpl-3.0
6,904,368,880,583,631,000
31.833992
136
0.58854
false
krsjoseph/youtube-dl
youtube_dl/extractor/malemotion.py
108
1423
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote class MalemotionIE(InfoExtractor): _VALID_URL = r'https?://malemotion\.com/video/(.+?)\.(?P<id>.+?)(#|$)' _TEST = { 'url': 'http://malemotion.com/video/bete-de-co...
unlicense
6,033,451,568,802,668,000
29.913043
75
0.513361
false
woel0007/caravel
caravel/lib/python2.7/site-packages/setuptools/py31compat.py
121
1636
import sys import unittest __all__ = ['get_config_vars', 'get_path'] try: # Python 2.7 or >=3.2 from sysconfig import get_config_vars, get_path except ImportError: from distutils.sysconfig import get_config_vars, get_python_lib def get_path(name): if name not in ('platlib', 'purelib'): ...
apache-2.0
3,082,978,124,369,007,600
30.461538
73
0.616748
false
kohlmeier/memfinity
webapp/api.py
1
13562
import datetime import json from google.appengine.api import oauth from google.appengine.api import users from google.appengine.ext import ndb import jsonify import models import search def get_oauth_user(): """Return the OAuth authenticated user, else raise an exception.""" try: # Get the db.User t...
mit
4,579,202,686,394,354,700
28.741228
79
0.627784
false
mylene-campana/hpp-rbprm-corba
script/tests/robot_bigStep_STEVE_path.py
2
2481
from hpp.corbaserver.rbprm.rbprmbuilder import Builder from hpp.gepetto import Viewer white=[1.0,1.0,1.0,1.0] green=[0.23,0.75,0.2,0.5] yellow=[0.85,0.75,0.15,1] pink=[1,0.6,1,1] orange=[1,0.42,0,1] brown=[0.85,0.75,0.15,0.5] blue = [0.0, 0.0, 0.8, 1.0] grey = [0.7,0.7,0.7,1.0] red = [0.8,0.0,0.0,1.0] rootJointType = ...
lgpl-3.0
-9,180,038,585,355,472,000
26.876404
114
0.72108
false
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/nbconvert/filters/tests/test_markdown.py
6
6613
# coding: utf-8 """Tests for conversions from markdown to other formats""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import re from copy import copy from functools import partial from ipython_genutils.py3compat import string_types from ipython_genutils.testi...
mit
5,613,243,032,965,343,000
32.912821
142
0.52548
false
yannickcr/CouchPotatoServer
libs/subliminal/tasks.py
170
2328
# -*- 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
8,328,238,625,966,280,000
33.235294
99
0.684708
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gtk/_gtk/Curve.py
1
7072
# encoding: utf-8 # module gtk._gtk # from /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so # by generator 1.135 # no doc # imports import atk as __atk import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject from DrawingArea import DrawingArea class Curve(DrawingArea): ...
gpl-2.0
-195,580,296,513,744,300
36.221053
95
0.660351
false
popazerty/EG-2
lib/python/Components/Ipkg.py
5
5550
import os from enigma import eConsoleAppContainer from Components.Harddisk import harddiskmanager from boxbranding import getImageDistro opkgDestinations = [] opkgStatusPath = '' def opkgExtraDestinations(): global opkgDestinations return ''.join([" --add-dest %s:%s" % (i,i) for i in opkgDestinations]) def opkgAdd...
gpl-2.0
-8,319,768,560,132,977,000
28.521277
74
0.695495
false
klahnakoski/ActiveData
vendor/jx_base/expressions/not_op.py
1
1316
# encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
mpl-2.0
4,154,906,808,884,111,400
24.307692
75
0.655775
false
numerigraphe/odoomrp-wip
quality_control_claim/__openerp__.py
2
1574
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) # 2015 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com) # 2015 AvanzOsc (http://www.avanzosc.es) # # This program is free software: you can redistribute it and/or modi...
agpl-3.0
397,883,064,469,848,600
35.604651
79
0.582592
false
zelotoj/ZLCommon
ZL/web/session.py
11
10789
""" Session Management (from web.py) """ import os, time, datetime, random, base64 import os.path from copy import deepcopy try: import cPickle as pickle except ImportError: import pickle try: import hashlib sha1 = hashlib.sha1 except ImportError: import sha sha1 = sha.new import utils import ...
gpl-2.0
-8,958,913,375,806,391,000
29.136872
137
0.55779
false
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/autobahn/wamp/test/test_exception.py
2
2120
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
gpl-3.0
-2,852,458,342,033,592,000
39
79
0.659434
false
powlo/script.module.pydevd
lib/pydevd_attach_to_process/winappdbg/breakpoint.py
102
168168
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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 ...
epl-1.0
8,694,717,582,278,120,000
33.875156
105
0.561563
false
trmznt/rhombus
rhombus/views/userclass.py
1
5554
from rhombus.lib.utils import get_dbhandler from rhombus.lib.roles import SYSADM from rhombus.lib.tags import (div, table, thead, tbody, th, tr, td, literal, selection_bar, br, ul, li, a, i, form, POST, GET, fieldset, input_text, input_hidden, input_select, input_password, ...
lgpl-3.0
7,051,160,052,158,998,000
29.685083
115
0.554015
false
avian2/jsonrpc2-zeromq-python
jsonrpc2_zeromq/test/helpers.py
2
3575
# Part of the jsonrpc2-zeromq-python project. # (c) 2012 Dan Brown, All Rights Reserved. # Please see the LICENSE file in the root of this project for license # information. from __future__ import division from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_imp...
bsd-3-clause
-5,852,606,340,091,916,000
32.726415
79
0.65007
false
lonnen/socorro
webapp-django/crashstats/tokens/middleware.py
1
2529
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json from functools import partial from django.contrib import auth from django.core.exceptions import Improperly...
mpl-2.0
8,649,069,182,558,249,000
33.643836
76
0.640965
false
ralphwort/chef-repo
build/cliff/pbr-0.8.2-py2.7.egg/pbr/tests/base.py
4
5632
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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 Lic...
apache-2.0
-2,494,087,181,914,715,000
38.111111
79
0.674183
false
ewbankkit/cloud-custodian
tests/test_utils.py
3
15120
# Copyright 2015-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
-7,386,945,371,088,733,000
32.230769
88
0.507937
false
jnovinger/django
tests/validation/models.py
238
4718
from __future__ import unicode_literals from datetime import datetime from django.core.exceptions import ValidationError from django.db import models from django.utils.encoding import python_2_unicode_compatible def validate_answer_to_universe(value): if value != 42: raise ValidationError('This is not t...
bsd-3-clause
5,360,190,684,253,989,000
33.948148
114
0.706231
false
TangHao1987/intellij-community
plugins/hg4idea/testData/bin/mercurial/dirstate.py
90
28061
# dirstate.py - working directory tracking for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import errno from node import nullid from i18n import _ import scmutil...
apache-2.0
-5,824,711,836,182,887,000
33.430675
80
0.494423
false
srikantbmandal/ansible
lib/ansible/modules/net_tools/ldap/ldap_entry.py
38
10266
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Peter Sagerson <psagers@ignorare.net> # (c) 2016, Jiri Tyr <jiri.tyr@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
-3,943,092,984,841,596,400
29.462908
79
0.617183
false
samuelmaudo/yepes
yepes/utils/unidecode/x063.py
252
4656
data = ( 'Bo ', # 0x00 'Chi ', # 0x01 'Gua ', # 0x02 'Zhi ', # 0x03 'Kuo ', # 0x04 'Duo ', # 0x05 'Duo ', # 0x06 'Zhi ', # 0x07 'Qie ', # 0x08 'An ', # 0x09 'Nong ', # 0x0a 'Zhen ', # 0x0b 'Ge ', # 0x0c 'Jiao ', # 0x0d 'Ku ', # 0x0e 'Dong ', # 0x0f 'Ru ', # 0x10 'Tiao ...
bsd-3-clause
8,621,293,789,581,341,000
17.046512
21
0.391108
false
Donkyhotay/MoonPy
client/main.py
1
3099
"""Copyright 2009: Isaac Carroll, Kevin Clement, Jon Handy, David Carroll, Daniel Carroll 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 3 of the License, or (at your option) any ...
gpl-3.0
4,197,426,671,199,161,000
32.684783
81
0.595999
false
alinbalutoiu/tempest
tempest/services/compute/json/flavors_client.py
7
7264
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
8,294,310,298,308,613,000
41.982249
79
0.62087
false
marcoprado17/flask-bone
src/flask_bombril/form_validators/email_format/email_format.py
1
1348
# !/usr/bin/env python # -*- coding: utf-8 -*- # ====================================================================================================================== # The MIT License (MIT) # ====================================================================================================================== # Copyr...
mit
4,459,420,841,187,035,600
43.933333
120
0.468448
false
yuhangwang/meson
tools/ac_converter.py
1
9050
#!/usr/bin/env python3 # Copyright 2015 The Meson development team # 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 appl...
apache-2.0
3,310,631,717,395,195,000
40.705069
113
0.586851
false
kengz/Unity-Lab
slm_lab/agent/net/net_util.py
1
9495
from functools import partial from slm_lab import ROOT_DIR from slm_lab.lib import logger, util import os import pydash as ps import torch import torch.nn as nn NN_LOWCASE_LOOKUP = {nn_name.lower(): nn_name for nn_name in nn.__dict__} logger = logger.get_logger(__name__) class NoOpLRScheduler: '''Symbolic LRSch...
mit
7,949,138,095,175,364,000
35.37931
289
0.639284
false
ypid/subuser
logic/subuserlib/subuser.py
1
2473
#!/usr/bin/env python # This file should be compatible with both Python 2 and 3. # If it is not, please file a bug report. """ High level operations on subusers. """ #external imports import sys #internal imports import subuserlib.classes.user,subuserlib.resolve,subuserlib.classes.subuser,subuserlib.verify,subuserlib...
lgpl-3.0
-2,552,184,638,308,389,000
41.637931
133
0.743631
false
libvirt/libvirt-test-API
libvirttestapi/repos/domain/ifstats.py
1
2454
# Copyright (C) 2010-2012 Red Hat, Inc. # This work is licensed under the GNU GPLv2 or later. # To get domain interface statistics import libvirt from libvirt import libvirtError from libvirttestapi.src import sharedmod from libvirttestapi.utils import utils from libvirttestapi.utils.utils import get_xml_value requ...
gpl-2.0
1,500,361,112,835,716,900
30.063291
83
0.608802
false
apple/llvm-project
lldb/examples/python/symbolication.py
14
28331
#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. # # To use this in the embedded python interpreter using "lldb": # # cd /path/containing/crashlog.py # lldb # (lldb) script import crashlog # "c...
apache-2.0
6,500,238,107,541,489,000
37.440977
208
0.532244
false
amalakar/dd-agent
checks.d/postgres.py
1
25315
"""PostgreSQL check Collects database-wide metrics and optionally per-relation metrics, custom metrics. """ # stdlib import socket # 3rd party import pg8000 as pg from pg8000 import InterfaceError, ProgrammingError # project from checks import AgentCheck, CheckException from config import _is_affirmative MAX_CUSTOM...
bsd-3-clause
-6,421,038,642,581,776,000
38.309006
217
0.546632
false
Captnoord/openpli-enigma2
lib/python/Components/Pixmap.py
11
3117
from ConditionalWidget import ConditionalWidget from GUIComponent import GUIComponent from enigma import ePixmap, eTimer from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE from os import path from skin import loadPixmap class Pixmap(GUIComponent): GUI_WIDGET = ePixmap def getSize(self): s = self.in...
gpl-2.0
916,957,324,303,322,400
25.193277
115
0.677575
false
tpetmanson/jsvabamorf
createbinding.py
1
1138
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import import os import json def get_sources(src_dir='src', ending='.cpp'): """Function to get a list of files ending with `ending` in `src_dir`.""" return [os.path.join(src_dir, fnm) for fnm in os.listdir(src_dir) if fnm...
lgpl-3.0
8,948,358,477,609,541,000
31.514286
94
0.64587
false
cssmlulu/zhihu-py3
test/zhihu-test.py
3
15989
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = '7sDream' import os import shutil from zhihu import ZhihuClient, ActType def test_question(): url = 'http://www.zhihu.com/question/24825703' question = client.question(url) # 获取该问题的详细描述 print(question.title) # 亲密关系之间要说「谢谢」吗? # 获取该...
mit
-4,529,672,584,682,272,000
22.26691
79
0.560541
false
postla/e2-gui
lib/python/Components/ConfigList.py
5
7657
from HTMLComponent import HTMLComponent from GUIComponent import GUIComponent from config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS, ConfigElement, ConfigText, ConfigPassword from Components.ActionMap import NumberActionMap...
gpl-2.0
880,983,254,487,845,000
28.225191
193
0.713465
false
LLluma/ea_web
addons/web_keyboard_shortcuts/__openerp__.py
4
1964
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2012 Elico Corp. All Rights Reserved. # Author: Yannick Gouin <yannick.gouin@elico-corp.com> # # This program is free software: you can r...
agpl-3.0
3,501,222,817,671,062,000
34.709091
82
0.588086
false
nirmeshk/oh-mainline
vendor/packages/Django/tests/modeltests/user_commands/tests.py
48
1689
import sys from django.core import management from django.core.management.base import CommandError from django.test import TestCase from django.utils import translation from django.utils.six import StringIO class CommandTests(TestCase): def test_command(self): out = StringIO() management.call_com...
agpl-3.0
-8,486,694,521,882,065,000
35.717391
97
0.6418
false
Soya93/Extract-Refactoring
python/lib/Lib/site-packages/django/contrib/localflavor/us/forms.py
229
4495
""" USA-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select, CharField from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re phone_digits...
apache-2.0
1,635,812,364,650,691,000
35.844262
112
0.608899
false
CapOM/ChromiumGStreamerBackend
tools/telemetry/third_party/gsutilz/third_party/boto/boto/ec2/securitygroup.py
150
14687
# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Eucalyptus Systems, Inc. # # 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 # w...
bsd-3-clause
-4,125,541,139,733,833,700
36.466837
100
0.514877
false
DSLituiev/scikit-learn
examples/svm/plot_weighted_samples.py
95
1943
""" ===================== SVM: Weighted samples ===================== Plot decision function of a weighted dataset, where the size of points is proportional to its weight. The sample weighting rescales the C parameter, which means that the classifier puts more emphasis on getting these points right. The effect might ...
bsd-3-clause
-4,967,932,995,466,328,000
29.84127
78
0.669583
false
seken/nink
pyglet/event.py
5
16578
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
gpl-3.0
-4,232,847,906,648,060,400
35.275711
78
0.615092
false
Nexenta/s3-tests
virtualenv/lib/python2.7/site-packages/boto/ec2/instanceinfo.py
152
1893
# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # 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...
mit
-5,356,975,689,745,970,000
37.632653
74
0.687269
false
Lh4cKg/brython
www/src/Lib/encodings/iso8859_6.py
37
11140
""" Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.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,i...
bsd-3-clause
5,781,751,013,393,428,000
34.286645
107
0.480521
false
mancoast/CPythonPyc_test
crash/272_test_socket.py
13
56141
#!/usr/bin/env python import unittest from test import test_support import errno import socket import select import time import traceback import Queue import sys import os import array import contextlib from weakref import proxy import signal import math def try_address(host, port=0, family=socket.AF_INET): """T...
gpl-3.0
-3,767,447,280,470,237,000
33.697775
117
0.610801
false
m2candre/ansible-modules-extras
cloud/amazon/ec2_ami_copy.py
63
6501
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
-8,128,247,058,079,337,000
30.254808
129
0.656053
false
aaiyer/bugseverywhere
libbe/command/due.py
4
4003
# Copyright (C) 2009-2012 Chris Ball <cjb@laptop.org> # W. Trevor King <wking@tremily.us> # # This file is part of Bugs Everywhere. # # Bugs Everywhere 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 # Softwa...
gpl-2.0
8,014,362,078,682,939,000
32.358333
79
0.603547
false
michalliu/OpenWrt-Firefly-Libraries
staging_dir/host/lib/python2.7/macpath.py
17
6255
"""Pathname and path-related operations for the Macintosh.""" import os import warnings from stat import * import genericpath from genericpath import * __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","getc...
gpl-2.0
6,641,795,146,192,614,000
28.093023
79
0.602718
false
raccoongang/edx-platform
lms/djangoapps/verify_student/services.py
5
1435
""" Implementation of "reverification" service to communicate with Reverification XBlock """ import logging from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db import IntegrityError from opaque_keys.edx.keys import CourseKey from student.models import Cou...
agpl-3.0
6,005,345,948,834,739,000
29.531915
88
0.68223
false
unreal666/outwiker
src/outwiker/gui/preferences/mainwindowpanel.py
2
3199
# -*- coding: utf-8 -*- import os import wx from . import configelements from outwiker.core.system import getImagesDir from outwiker.gui.guiconfig import MainWindowConfig from outwiker.gui.controls.formatctrl import FormatCtrl from outwiker.gui.preferences.baseprefpanel import BasePrefPanel class MainWindowPanel(B...
gpl-3.0
7,093,240,607,738,147,000
30.061224
76
0.55979
false
colloquium/spacewalk
client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
1
7963
#!/usr/bin/python # # Registration client for the Red Hat Network for useage with kickstart # Copyright (c) 1999-2006 Red Hat, Inc. Distributed under GPL. # # Authors: # Adrian Likins <alikins@redhat.com> # James Bowes <jbowes@redhat.com> # # see the output of "--help" for the valid options. # # The co...
gpl-2.0
-6,563,889,318,177,394,000
37.843902
149
0.596383
false
darktears/chromium-crosswalk
tools/grit/grit/tool/postprocess_unittest.py
61
1851
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Unit test that checks postprocessing of files. Tests postprocessing by having the postprocessor modify the grd data tree, ...
bsd-3-clause
5,734,658,813,504,177,000
28.380952
83
0.681253
false
DataBiosphere/data-explorer
api/data_explorer/test/test_elasticsearch_util.py
1
1045
from data_explorer.util import elasticsearch_util def test_convert_to_index_name(): dataset_name = "Project Baseline" assert "project_baseline" == elasticsearch_util.convert_to_index_name( dataset_name) def test_range_to_number(): def _inner(range_str, expected_number): actual_number = e...
bsd-3-clause
-8,956,227,708,617,208,000
28.857143
74
0.622967
false
ArteliaTelemac/PostTelemac
PostTelemac/meshlayerparsers/libs_telemac/parsers/parserKenue.py
2
15448
"""@author Sebastien E. Bourban """ """@note ... this work is based on a collaborative effort between .________. ,--. | | . ( ( |,-. / HR Wallingford EDF - LNHE / \_...
gpl-3.0
2,776,866,918,833,954,300
39.759894
310
0.433648
false
pombreda/seascope
src/web/backend/plugins/idutils/IdutilsProject.py
2
4362
#!/usr/bin/python # Copyright (c) 2010 Anil Kumar # All rights reserved. # # License: BSD import sys, os, string, re from ..PluginBase import PluginFeatureBase, ProjectBase, ConfigBase, QueryBase from ..PluginBase import PluginProcess from ..CtagsCache import CtagsThread class IdutilsFeature(PluginFeatureBase): ...
bsd-3-clause
5,495,290,565,419,289,000
21.601036
89
0.57657
false
aclifton/cpeg853-gem5
configs/dram/lat_mem_rd.py
4
10356
# Copyright (c) 2015-2016 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
bsd-3-clause
6,626,528,120,448,222,000
32.843137
73
0.701912
false
ajaxsys/dict-admin
docutils/parsers/rst/languages/lt.py
2
3600
# -*- coding: utf8 -*- # $Id: lt.py 6459 2010-10-29 22:07:34Z milde $ # Author: Dalius Dobravolskas <dalius.do...@gmail.com> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.h...
bsd-3-clause
7,254,060,006,500,495,000
31.317757
79
0.593829
false
autosportlabs/kivy
examples/3Drendering/main.py
12
2396
''' 3D Rotating Monkey Head ======================== This example demonstrates using OpenGL to display a rotating monkey head. This includes loading a Blender OBJ file, shaders written in OpenGL's Shading Language (GLSL), and using scheduled callbacks. The monkey.obj file is an OBJ file output from the Blender free 3...
mit
-5,242,385,076,472,492,000
30.526316
78
0.631052
false
shujaatak/UAV_MissionPlanner
Lib/runpy.py
111
10698
"""runpy.py - locating and running Python code using the module namespace Provides support for locating and running Python scripts using the Python module namespace instead of the native filesystem. This allows Python code to play nicely with non-filesystem based PEP 302 importers when locating support scripts as wel...
gpl-2.0
-695,836,098,950,434,200
37.482014
78
0.603945
false
kleetus/bitcoinxt
qa/rpc-tests/doublespendrelay.py
4
5948
#!/usr/bin/env python # # Test double-spend-relay and notification code # from test_framework import BitcoinTestFramework from decimal import Decimal from util import * class DoubleSpendRelay(BitcoinTestFramework): # # Create a 4-node network; roles for the nodes are: # [0] : transaction creator # [...
mit
-1,362,635,010,290,593,000
41.485714
106
0.607935
false