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
spr/album-sound-check
mutagen/musepack.py
11
4118
# A Musepack reader/tagger # # Copyright 2006 Lukas Lalinsky <lalinsky@gmail.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 # published by the Free Software Foundation. # # $Id: musepack.py 4013 2007-04-23 09:18:22Z luks ...
gpl-2.0
-556,819,875,958,927,100
33.898305
79
0.595435
false
barachka/odoo
addons/website/controllers/main.py
8
18654
# -*- coding: utf-8 -*- import cStringIO import datetime from itertools import islice import json import logging import re from sys import maxint import werkzeug.utils import werkzeug.wrappers from PIL import Image import openerp from openerp.addons.web import http from openerp.http import request, Response logger ...
agpl-3.0
-8,984,082,276,017,371,000
43.308789
152
0.534738
false
aminert/scikit-learn
examples/applications/plot_model_complexity_influence.py
323
6372
""" ========================== Model Complexity Influence ========================== Demonstrate how model complexity influences both prediction accuracy and computational performance. The dataset is the Boston Housing dataset (resp. 20 Newsgroups) for regression (resp. classification). For each class of models we m...
bsd-3-clause
4,867,020,870,719,933,000
36.704142
80
0.639046
false
CS-SI/QGIS
python/plugins/processing/algs/gdal/aspect.py
1
5659
# -*- coding: utf-8 -*- """ *************************************************************************** aspect.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com ******************...
gpl-2.0
-4,678,324,985,353,725,000
42.530769
124
0.540201
false
LSS-USP/kiskadee
kiskadee/queue.py
1
2457
"""Provide kiskadee queues and operations on them.""" import time from multiprocessing import Queue import kiskadee analysis = Queue() results = Queue() packages = Queue() class Queues(): """Provide kiskadee queues objects.""" @staticmethod def enqueue_analysis(package_to_analysis): """Put a ana...
agpl-3.0
4,248,233,573,297,684,000
31.328947
73
0.540904
false
crosswalk-project/blink-crosswalk-efl
Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py
44
5791
# Copyright (C) 2013 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 ...
bsd-3-clause
-106,250,072,559,601,300
37.606667
87
0.646002
false
Didacti/elixir
tests/test_o2m.py
1
7242
""" test one to many relationships """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import six from elixir import * from sqlalchemy import and_ from sqlalchemy.ext.orderinglist import ordering_list def setup(): ...
mit
694,852,872,440,373,000
27.4
75
0.526098
false
LegoStormtroopr/mallard-questionnaire-registry
mallard_qr/models.py
1
2839
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext as _ from model_utils import Choices import aristotle_mdr as aristotle """ These models are based on the DDI3.2 and the SQBL XML formats. """ class AdministrationMode(aristotle.models.unmanagedObject...
gpl-2.0
-5,326,762,414,326,911,000
40.15942
170
0.738288
false
Revanth47/addons-server
src/olympia/tags/tests/test_helpers.py
4
1150
from jingo import get_env from mock import Mock from pyquery import PyQuery as pq from olympia import amo from olympia.addons.models import Addon def render(s, context=None): """Taken from jingo.tests.utils, previously jingo.tests.test_helpers.""" if context is None: context = {} t = get_env().fr...
bsd-3-clause
5,751,300,487,915,684,000
25.744186
76
0.566087
false
Epirex/android_external_chromium_org
third_party/tlslite/tlslite/integration/SMTP_TLS.py
87
4726
"""TLS Lite + smtplib.""" from smtplib import SMTP from tlslite.TLSConnection import TLSConnection from tlslite.integration.ClientHelper import ClientHelper class SMTP_TLS(SMTP): """This class extends L{smtplib.SMTP} with TLS support.""" def starttls(self, username=None, password=None, share...
bsd-3-clause
5,859,670,067,391,380,000
40.464912
74
0.650444
false
vladzur/radiotray
data/plugins/MateMediaKeysPlugin.py
1
2312
########################################################################## # Copyright 2009 Carlos Ribeiro # # This file is part of Radio Tray # # Radio Tray 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, eit...
gpl-2.0
4,130,183,598,858,673,000
35.125
115
0.605536
false
frodrigo/osmose-backend
analysers/analyser_merge_public_equipment_FR_rennes_toilets.py
4
2991
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Adrien Pavie 2017 ## ## ...
gpl-3.0
130,431,469,709,637,580
55.433962
137
0.458041
false
ethanrowe/python-data-packager
setup.py
1
1089
from setuptools import setup import os readme = open(os.path.join(os.path.dirname(__file__), 'README'), 'r').read() license = open(os.path.join(os.path.dirname(__file__), 'LICENSE'), 'r').read() setup( name = "data_packager", version = "0.0.1", author = "Ethan Rowe", author_email = "ethan@the-rowes.co...
mit
5,411,192,722,517,334,000
30.114286
83
0.585859
false
floresconlimon/qutebrowser
tests/unit/browser/network/test_schemehandler.py
8
1174
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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-3.0
-69,623,217,615,093,930
32.542857
70
0.752981
false
joel-airspring/Diamond
src/collectors/gridengine/gridengine.py
29
4886
# coding=utf-8 """ The GridEngineCollector parses qstat statistics from Sun Grid Engine, Univa Grid Engine and Open Grid Scheduler. #### Dependencies * Grid Engine qstat """ import os import re import subprocess import sys import xml.dom.minidom import diamond.collector class GridEngineCollector(diamond.collec...
mit
-1,557,603,442,933,474,300
32.238095
73
0.558944
false
ljgabc/lfs
usr/lib/python2.7/pdb.py
119
46016
#! /usr/bin/env python """A Python debugger.""" # (See pdb.doc for documentation.) import sys import linecache import cmd import bdb from repr import Repr import os import re import pprint import traceback class Restart(Exception): """Causes a debugger to be restarted for the debugged python program.""" pa...
gpl-2.0
4,847,551,637,663,001,000
33.391629
81
0.557415
false
ClearCorp/server-tools
base_import_match/models/base_import.py
2
10305
# -*- coding: utf-8 -*- # Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis # Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models from openerp import SUPERUSER_ID # TODO remove in v10 class BaseI...
agpl-3.0
-3,822,570,387,524,895,000
33.577181
79
0.555318
false
BTCfork/hardfork_prototype_1_mvf-bu
contrib/devtools/optimize-pngs.py
126
3201
#!/usr/bin/env python ''' Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text). #pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text ''' import os impor...
mit
-8,090,174,829,810,936,000
41.68
193
0.607935
false
wiltonlazary/arangodb
3rdParty/V8/V8-5.0.71.39/build/gyp/test/variables/commands/gyptest-commands.py
311
1208
#!/usr/bin/env python # Copyright (c) 2012 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. """ Test variable expansion of '<!()' syntax commands. """ import os import TestGyp test = TestGyp.TestGyp(format='gypd') expect = test....
apache-2.0
8,222,151,072,918,191,000
29.974359
72
0.707781
false
nburn42/tensorflow
tensorflow/python/summary/writer/writer.py
13
16422
# 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
-2,051,896,926,892,857,600
38.859223
83
0.684935
false
peterfpeterson/mantid
Framework/PythonInterface/test/python/mantid/geometry/CrystalStructureTest.py
3
3758
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # py...
gpl-3.0
4,261,383,491,313,230,300
43.211765
119
0.574508
false
marklee77/fail2ban
fail2ban/client/filterreader.py
3
3047
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
9,120,545,110,934,668,000
33.235955
88
0.687233
false
patrickod/stem
stem/response/mapaddress.py
3
1326
# Copyright 2012-2017, Damian Johnson and The Tor Project # See LICENSE for licensing information import stem.response import stem.socket class MapAddressResponse(stem.response.ControlMessage): """ Reply for a MAPADDRESS query. Doesn't raise an exception unless no addresses were mapped successfully. :var di...
lgpl-3.0
5,902,658,498,861,537,000
30.571429
101
0.661388
false
jpaalasm/pyglet
contrib/scene2d/tests/scene2d/VIEW_SUBWINDOW.py
29
1420
#!/usr/bin/env python '''Testing flat map allow_oob enforcement. Press 0-9 to set the size of the view in the window (1=10%, 0=100%) Press arrow keys to move view focal point (little ball) around map. Press "o" to turn allow_oob on and off. You should see no black border with allow_oob=False. Press escape or close...
bsd-3-clause
-8,695,129,160,914,347,000
26.843137
67
0.583803
false
loop1024/pymo-global
android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_bisect.py
41
13043
import sys import unittest from test import test_support from UserList import UserList # We do a bit of trickery here to be able to test both the C implementation # and the Python implementation of the module. # Make it impossible to import the C implementation anymore. sys.modules['_bisect'] = 0 # We must also handl...
mit
-8,524,976,102,129,539,000
40.14511
79
0.526949
false
40223151/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/http/cookies.py
735
20810
#!/usr/bin/env python3 # #### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in...
gpl-3.0
-3,975,010,980,582,204,400
34.87931
80
0.533782
false
capoe/espressopp.soap
src/storage/DomainDecompositionNonBlocking.py
2
2753
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
gpl-3.0
6,599,087,145,958,169,000
36.712329
112
0.666182
false
pothosware/gnuradio
gr-vocoder/examples/g723_40_audio_loopback.py
58
1477
#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
-694,967,656,096,583,600
31.108696
70
0.702099
false
Lineberty/kubernetes
cluster/juju/charms/trusty/kubernetes/unit_tests/lib/test_registrator.py
232
2215
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
-5,280,946,304,947,545,000
35.311475
267
0.657788
false
aps-sids/ansible-modules-extras
system/svc.py
83
9627
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
gpl-3.0
5,526,848,003,930,311,000
31.744898
114
0.575776
false
ArtsiomCh/tensorflow
tensorflow/contrib/data/python/kernel_tests/list_files_dataset_op_test.py
51
5617
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,929,717,069,308,672,000
34.327044
80
0.676696
false
RasPlex/plex-home-theatre
plex/Third-Party/gtest/scripts/upload.py
2511
51024
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
gpl-2.0
3,042,281,864,596,984,000
35.787311
80
0.619728
false
MattDevo/edk2
AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/macsupport.py
6
7828
"""\ Augment the "bgen" package with definitions that are useful on the Apple Macintosh. Intended usage is "from macsupport import *" -- this implies all bgen's goodies. """ # Import everything from bgen (for ourselves as well as for re-export) from bgen import * # Simple types Boolean = Type("Boolean"...
bsd-2-clause
9,070,596,239,462,261,000
37.736041
97
0.716275
false
BernhardDenner/libelektra
src/bindings/swig/python/tests/test_kdb.py
2
1614
import kdb, unittest TEST_NS = "user/tests/swig_py3" class Constants(unittest.TestCase): def setUp(self): pass def test_kdbconfig_h(self): self.assertIsInstance(kdb.DB_SYSTEM, str) self.assertIsInstance(kdb.DB_USER, str) self.assertIsInstance(kdb.DB_HOME, str) self.assertIsInstance(kdb.DEBUG, int...
bsd-3-clause
3,109,756,360,589,687,000
23.089552
62
0.664188
false
xodus7/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/inline.py
32
6367
# 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
-2,422,619,218,310,176,000
39.55414
80
0.678499
false
Elandril/SickRage
lib/unidecode/x0b4.py
253
4762
data = ( 'dwaen', # 0x00 'dwaenj', # 0x01 'dwaenh', # 0x02 'dwaed', # 0x03 'dwael', # 0x04 'dwaelg', # 0x05 'dwaelm', # 0x06 'dwaelb', # 0x07 'dwaels', # 0x08 'dwaelt', # 0x09 'dwaelp', # 0x0a 'dwaelh', # 0x0b 'dwaem', # 0x0c 'dwaeb', # 0x0d 'dwaebs', # 0x0e 'dwaes', # 0x...
gpl-3.0
7,938,486,689,126,531,000
17.457364
19
0.460941
false
lexxito/monitoring
ceilometer/image/glance.py
1
4868
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # # Author: Julien Danjou <julien@danjou.info> # # 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
-4,854,512,705,900,788,000
35.593985
75
0.569961
false
Blake-R/pylijm
tests/test_list.py
1
1069
# -*- coding: utf8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from unittest2 import TestCase from pylijm.list import List class TestDict(TestCase): @property def fixture(self): return List(int) def test_init_good(self): Fix = self.fixture ...
gpl-3.0
8,008,563,741,887,081,000
25.725
82
0.579981
false
ENCODE-DCC/encoded
src/encoded/tests/test_audit_characterization.py
1
2460
import pytest def test_audit_biosample_characterization_review_lane_not_required( testapp, biosample_characterization, review, ): testapp.patch_json( biosample_characterization['@id'], { 'review': review, 'characterization_method': 'immunoprecipitati...
mit
1,709,638,554,847,089,000
29.37037
91
0.614228
false
gnmiller/craig-bot
craig-bot/lib/python3.6/site-packages/pip/_vendor/packaging/specifiers.py
62
27778
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
mit
-2,955,790,614,907,081,700
36.086782
88
0.565987
false
incaser/odoo-odoo
addons/account_budget/report/__init__.py
444
1139
# -*- 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
5,983,278,381,091,800,000
41.185185
78
0.631255
false
Nexenta/cinder
cinder/volume/drivers/coprhd/helpers/virtualpool.py
7
2887
# Copyright (c) 2016 EMC Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-3,929,665,384,914,477,600
36.493506
78
0.593003
false
sencha/chromium-spacewalk
third_party/pexpect/pexpect.py
173
77354
"""Pexpect is a Python module for spawning child applications and controlling them automatically. Pexpect can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup scripts for duplicating software package installations on different servers. It can be u...
bsd-3-clause
2,995,844,815,318,937,000
38.709446
79
0.591993
false
kyle0311/oliot-llrp
ThirdParty/libxml2/python/tests/build.py
87
1542
#!/usr/bin/python -u import libxml2 import sys # Memory debug specific libxml2.debugMemory(1) doc = libxml2.newDoc("1.0") comment = doc.newDocComment("This is a generated document") doc.addChild(comment) pi = libxml2.newPI("test", "PI content") doc.addChild(pi) root = doc.newChild(None, "doc", None) ns = root.newNs("...
lgpl-2.1
-4,481,043,176,662,225,000
25.135593
70
0.677691
false
harry-7/addons-server
src/olympia/devhub/feeds.py
2
1711
import uuid from django import http from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from django.utils.feedgenerator import Rss201rev2Feed as RSS from django.utils.translation import ugettext from olympia import amo from olympia.activity.models import ActivityLog from o...
bsd-3-clause
5,334,442,605,886,305,000
29.017544
79
0.656341
false
blckshrk/Weboob
modules/parolesmania/test.py
4
1700
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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 op...
agpl-3.0
2,955,897,075,949,236,000
35.956522
77
0.687059
false
cwu2011/seaborn
doc/sphinxext/ipython_directive.py
37
37557
# -*- coding: utf-8 -*- """ Sphinx directive to support embedded IPython code. This directive allows pasting of entire interactive IPython sessions, prompts and all, and their code will actually get re-executed at doc build time, with all prompts renumbered sequentially. It also allows you to input code as a pure pyth...
bsd-3-clause
8,006,001,777,438,705,000
33.612903
124
0.569724
false
prajjwal1/prajjwal1.github.io
markdown_generator/talks.py
199
4000
# coding: utf-8 # # Talks markdown generator for academicpages # # Takes a TSV of talks with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_i...
mit
-6,477,765,706,653,022,000
35.036036
420
0.638
false
mhnatiuk/phd_sociology_of_religion
scrapper/lib/python2.7/site-packages/twisted/mail/bounce.py
26
2292
# -*- test-case-name: twisted.mail.test.test_bounce -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Support for bounce message generation. """ import StringIO import rfc822 import time import os from twisted.mail import smtp BOUNCE_FORMAT = """\ From: postmaster@%(failedDomain)s ...
gpl-2.0
4,059,714,975,690,690,000
25.651163
76
0.662304
false
taohungyang/cloud-custodian
c7n/filters/missing.py
1
2009
# Copyright 2018 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 to in...
apache-2.0
374,986,875,597,269,800
34.245614
79
0.672474
false
bjtrost/TCAG-WGS-CNV-workflow
convert_CNV_calls_to_common_format.py
1
1095
#!/usr/bin/env python # Convert calls from Canvas, cn.MOPS, CNVnator, ERDS, Genome STRiP, or RDXplorer to a common format # Usage example: # convert_CNV_calls_to_common_format.py input_filename name_of_caller # name_of_caller must be one of "Canvas", "cn.MOPS", "CNVnator", "ERDS", "Genome_STRiP" (note underscore), or ...
mit
62,324,985,761,163,590
38.107143
123
0.690411
false
AnasGhrab/scikit-learn
doc/tutorial/text_analytics/skeletons/exercise_02_sentiment.py
256
2406
"""Build a sentiment analysis / polarity model Sentiment analysis can be casted as a binary text classification problem, that is fitting a linear classifier on features extracted from the text of the user messages so as to guess wether the opinion of the author is positive or negative. In this examples we will use a ...
bsd-3-clause
7,371,653,782,344,567,000
37.190476
79
0.720698
false
kevint2u/audio-collector
server/node_modules/binaryjs/node_modules/binarypack/node_modules/buffercursor/node_modules/verror/node_modules/extsprintf/deps/javascriptlint/javascriptlint/htmlparse.py
28
1348
# vim: ts=4 sw=4 expandtab import HTMLParser import unittest class _Parser(HTMLParser.HTMLParser): def __init__(self): HTMLParser.HTMLParser.__init__(self) self._tags = [] def handle_starttag(self, tag, attributes): if tag.lower() == 'script': attr = dict(attributes) ...
mit
812,280,903,600,477,700
25.431373
70
0.538576
false
pakpoomton/CellmodellerShadow
CellModeller/Integration/CrankNicIntegrator.py
1
6405
import numpy import scipy.integrate.odepack from scipy.sparse.linalg import LinearOperator from scipy.ndimage.filters import convolve from scipy.sparse.linalg import gmres import pyopencl as cl import pyopencl.array as cl_array from pyopencl.array import vec import math class CrankNicIntegrator: def __init__(self,...
bsd-3-clause
-4,341,253,483,647,895,000
40.057692
132
0.628884
false
ykim362/mxnet
example/ssd/config/config.py
31
3112
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-3,705,892,600,971,301,000
35.611765
90
0.718188
false
Just-D/chromium-1
tools/telemetry/third_party/gsutilz/gslib/gcs_json_media.py
13
21674
# -*- coding: utf-8 -*- # 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 require...
bsd-3-clause
-3,501,952,690,221,323,000
39.211503
107
0.656455
false
jaywreddy/django
django/contrib/gis/gdal/base.py
654
1179
from ctypes import c_void_p from django.contrib.gis.gdal.error import GDALException from django.utils import six class GDALBase(object): """ Base object for GDAL objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _...
bsd-3-clause
3,358,892,005,888,274,000
30.026316
93
0.619169
false
konstruktoid/ansible-upstream
lib/ansible/plugins/lookup/aws_ssm.py
20
10325
# (c) 2016, Bill Wang <ozbillwang(at)gmail.com> # (c) 2017, Marat Bakeev <hawara(at)gmail.com> # (c) 2018, Michael De La Rue <siblemitcom.mddlr(at)spamgourmet.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_im...
gpl-3.0
-3,372,730,191,875,912,000
44.087336
147
0.642712
false
HiroIshikawa/21playground
voting/venv/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py
436
5992
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isinstance(s, text_type): ...
mit
-3,224,730,919,782,621,000
28.810945
89
0.539052
false
xmission/d-note
venv/lib/python2.7/site-packages/werkzeug/contrib/securecookie.py
254
12206
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
agpl-3.0
5,012,040,430,092,661,000
36.789474
79
0.588071
false
ros2/demos
demo_nodes_py/setup.py
1
1716
from setuptools import find_packages from setuptools import setup package_name = 'demo_nodes_py' setup( name=package_name, version='0.15.0', packages=find_packages(exclude=['test']), data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), (...
apache-2.0
6,057,231,378,288,691,000
36.304348
96
0.625874
false
nigeriacoin/p2pool
p2pool/web.py
47
25848
from __future__ import division import errno import json import os import sys import time import traceback from twisted.internet import defer, reactor from twisted.python import log from twisted.web import resource, static import p2pool from bitcoin import data as bitcoin_data from . import data as p2pool_data, p2p ...
gpl-3.0
-5,866,161,282,974,693,000
55.560175
260
0.633163
false
Noviat/account-financial-reporting-V3-intrastat
account_financial_report_webkit/wizard/balance_common.py
7
18311
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) # # Author: Guewen Baconnier (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who take the whole resp...
agpl-3.0
-4,487,714,554,082,221,600
43.336562
79
0.479985
false
dgasmith/psi4
psi4/driver/qcdb/qcformat.py
3
4080
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2019 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
lgpl-3.0
6,329,365,719,109,166,000
33
89
0.609804
false
shsingh/ansible
lib/ansible/modules/network/fortios/fortios_firewall_interface_policy.py
7
19948
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 3 of the Lic...
gpl-3.0
6,754,358,664,655,787,000
34.942342
125
0.518799
false
loopCM/chromium
native_client_sdk/src/build_tools/sdk_tools/command/info.py
4
1216
# 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. import command_common import logging import manifest_util def Info(manifest, bundle_names): valid_bundles, invalid_bundles = command_common.GetValidBu...
bsd-3-clause
7,244,273,317,173,926,000
33.742857
79
0.623355
false
webmull/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
127
4570
# Copyright (c) 2010 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 ...
bsd-3-clause
-8,580,828,464,751,876,000
45.632653
115
0.715755
false
philipgian/pre-commit
pre_commit/output.py
1
2217
from __future__ import unicode_literals import sys from pre_commit import color from pre_commit import five def get_hook_message( start, postfix='', end_msg=None, end_len=0, end_color=None, use_color=None, cols=80, ): """Prints a message for running a hook...
mit
5,790,725,397,560,274,000
27.423077
79
0.534957
false
Ryanglambert/pybrain
pybrain/structure/connections/fullnotself.py
31
1276
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from scipy import reshape, dot, outer, eye from pybrain.structure.connections import FullConnection class FullNotSelfConnection(FullConnection): """Connection which connects every element from the first module's output buffer to the second module's input ...
bsd-3-clause
-2,442,303,445,124,675,600
43
83
0.668495
false
SNAPPETITE/backend
flask/lib/python2.7/site-packages/tempita/_looper.py
140
4161
""" Helper for looping over sequences, particular in templates. Often in a loop in a template it's handy to know what's next up, previously up, if this is the first or last item in the sequence, etc. These can be awkward to manage in a normal Python loop, but using the looper you can get a better sense of the context....
mit
-8,545,492,950,607,345,000
24.527607
74
0.546984
false
alexteodor/odoo
addons/sales_team/__openerp__.py
51
1799
# -*- 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,152,143,440,756,593,700
40.837209
78
0.568093
false
sxjscience/tvm
tests/python/unittest/test_te_schedule.py
4
11434
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-7,170,016,014,588,445,000
32.629412
91
0.595767
false
awkspace/ansible
lib/ansible/plugins/filter/json_query.py
197
1857
# (c) 2015, Filipe Niero Felisbino <filipenf@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
gpl-3.0
-3,595,491,509,937,588,000
34.037736
101
0.693592
false
AkademieOlympia/sympy
sympy/physics/unitsystems/prefixes.py
91
4190
# -*- coding: utf-8 -*- """ Module defining unit prefixe class and some constants. Constant dict for SI and binary prefixes are defined as PREFIXES and BIN_PREFIXES. """ from sympy import sympify class Prefix(object): """ This class represent prefixes, with their name, symbol and factor. Prefixes are ...
bsd-3-clause
-7,314,212,655,000,997,000
28.286713
79
0.549666
false
krisys/django
django/core/serializers/xml_serializer.py
17
15681
""" XML serializer. """ from __future__ import unicode_literals from collections import OrderedDict from xml.dom import pulldom from xml.sax import handler from xml.sax.expatreader import ExpatParser as _ExpatParser from django.apps import apps from django.conf import settings from django.core.serializers import bas...
bsd-3-clause
-3,009,759,731,297,462,300
38.300752
111
0.588866
false
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9/lib/python/lib/python2.3/hotshot/stats.py
252
2582
"""Statistics analyzer for HotShot.""" import profile import pstats import hotshot.log from hotshot.log import ENTER, EXIT def load(filename): return StatsLoader(filename).load() class StatsLoader: def __init__(self, logfn): self._logfn = logfn self._code = {} self._stack = [] ...
gpl-2.0
2,576,195,772,669,107,700
26.763441
74
0.572812
false
ZhangXinNan/tensorflow
tensorflow/python/kernel_tests/distributions/uniform_test.py
11
11353
# 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
-9,176,198,563,497,223,000
32.991018
80
0.618515
false
dturner-tw/pants
tests/python/pants_test/android/tasks/test_zipalign.py
16
2041
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pant...
apache-2.0
1,583,761,434,071,562,200
38.25
99
0.653111
false
ghyde/letsencrypt
letsencrypt/plugins/disco_test.py
1
9977
"""Tests for letsencrypt.plugins.disco.""" import pkg_resources import unittest import mock import zope.interface from letsencrypt import errors from letsencrypt import interfaces from letsencrypt.plugins import standalone EP_SA = pkg_resources.EntryPoint( "sa", "letsencrypt.plugins.standalone", attrs=("Aut...
apache-2.0
3,893,390,962,680,766,500
38.12549
81
0.636865
false
yujikato/DIRAC
src/DIRAC/Interfaces/scripts/dirac_admin_get_pilot_output.py
2
1395
#!/usr/bin/env python ######################################################################## # File : dirac-admin-get-pilot-output # Author : Stuart Paterson ######################################################################## """ Retrieve output of a Grid pilot Usage: dirac-admin-get-pilot-output [options...
gpl-3.0
-7,738,591,539,812,243,000
23.051724
83
0.622222
false
balloob/home-assistant
homeassistant/components/deconz/sensor.py
5
8316
"""Support for deCONZ sensors.""" from pydeconz.sensor import ( Battery, Consumption, Daylight, Humidity, LightLevel, Power, Pressure, Switch, Temperature, Thermostat, ) from homeassistant.components.sensor import DOMAIN from homeassistant.const import ( ATTR_TEMPERATURE, ...
apache-2.0
4,234,025,814,958,995,000
27.775087
91
0.62001
false
jgao54/airflow
airflow/migrations/versions/64de9cddf6c9_add_task_fails_journal_table.py
12
1697
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-4,374,993,686,527,747,600
32.27451
68
0.711844
false
dodocat/git-repo
progress.py
143
2036
# # Copyright (C) 2009 The Android Open Source Project # # 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 la...
apache-2.0
7,858,466,868,841,076,000
25.102564
74
0.578585
false
nevir/plexability
extern/gyp/pylib/gyp/generator/make.py
17
88238
# Copyright (c) 2012 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
gpl-2.0
-4,858,679,361,650,055,000
40.060028
180
0.631191
false
sobercoder/gem5
src/arch/x86/isa/insts/x87/load_constants/load_0_1_or_pi.py
70
2454
# Copyright (c) 2007 The Hewlett-Packard Development Company # Copyright (c) 2013 Mark D. Hill and David A. Wood # 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 int...
bsd-3-clause
-4,661,555,339,145,643,000
42.052632
72
0.768134
false
nekrut/tools-iuc
tools/vsnp/vsnp_determine_ref_from_data.py
12
9491
#!/usr/bin/env python import argparse import gzip import os from collections import OrderedDict import yaml from Bio.SeqIO.QualityIO import FastqGeneralIterator OUTPUT_DBKEY_DIR = 'output_dbkey' OUTPUT_METRICS_DIR = 'output_metrics' def get_sample_name(file_path): base_file_name = os.path.basename(file_path) ...
mit
-4,905,994,647,840,912,000
41.182222
159
0.645664
false
robojukie/myrobotlab
src/resource/VirtualDevice/Arduino.py
3
3258
############################################# # This is a basic script to emulate the hardware of # an Arduino microcontroller. The VirtualDevice # service will execute this script when # createVirtualArduino(port) is called import time import math import threading from random import randint from org.myrobotlab.codec ...
apache-2.0
-504,969,585,771,665,660
27.578947
86
0.640577
false
CouchPotato/CouchPotatoServer
libs/tornado/gen.py
64
35105
"""``tornado.gen`` is a generator-based interface to make it easier to work in an asynchronous environment. Code using the ``gen`` module is technically asynchronous, but it is written as a single generator instead of a collection of separate functions. For example, the following asynchronous handler:: class Asy...
gpl-3.0
-1,741,868,975,850,850,800
35.605839
82
0.616408
false
aebrahim/cobrapy
cobra/solvers/esolver.py
5
6286
from subprocess import check_output, check_call, CalledProcessError from os import unlink, devnull from os.path import isfile from tempfile import NamedTemporaryFile from fractions import Fraction from six.moves import zip from . import cglpk from .wrappers import * # detect paths to system calls for esolver and gzip...
lgpl-2.1
5,368,479,664,408,009,000
39.554839
78
0.584314
false
shawnadelic/shuup
shuup/front/apps/auth/urls.py
2
1132
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.conf.urls import patterns, url from .views import ( LoginVi...
agpl-3.0
-7,619,571,747,156,614,000
31.342857
76
0.654594
false
tuxcoindev/tuxcoin
contrib/pyminer/pyminer.py
2
6435
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
mit
-8,682,132,293,758,735,000
24.535714
84
0.648951
false
louietsai/python-for-android
python-modules/twisted/twisted/test/test_persisted.py
60
8648
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # System Imports import sys from twisted.trial import unittest try: import cPickle as pickle except ImportError: import pickle try: import cStringIO as StringIO except ImportError: import StringIO # Twisted Imports ...
apache-2.0
7,265,969,973,151,563,000
26.541401
99
0.576318
false
ContinuumIO/ashiba
enaml/enaml/wx/wx_spin_box.py
1
16857
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
bsd-3-clause
-6,469,759,024,124,321,000
29.649091
79
0.53764
false
Finntack/pootle
pootle/apps/staticpages/templatetags/staticpages.py
3
2425
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django import template from django.core...
gpl-3.0
5,718,019,808,574,165,000
25.944444
78
0.628041
false
eworm-de/systemd
test/sd-script.py
12
21508
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later # # sd-script.py: create LOTS of sd device entries in fake sysfs # # (C) 2018 Martin Wilck, SUSE Linux GmbH # # Run after sys-script.py # Usage: sd-script.py <directory> <num> # <num> is the number of device nodes (disks + partitions) # to create in ad...
gpl-2.0
-1,557,924,637,991,903,200
61.888889
240
0.617119
false
MiLk/ansible
lib/ansible/modules/network/nxos/nxos_rollback.py
45
3780
#!/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 distribut...
gpl-3.0
6,047,403,224,673,898,000
27.854962
74
0.653968
false
mandx/pyrax
tests/unit/test_cloud_blockstorage.py
10
21816
#!/usr/bin/env python # -*- coding: utf-8 -*- import random import unittest from mock import patch from mock import MagicMock as Mock import pyrax.cloudblockstorage from pyrax.cloudblockstorage import CloudBlockStorageClient from pyrax.cloudblockstorage import CloudBlockStorageVolume from pyrax.cloudblockstorage imp...
apache-2.0
2,962,352,775,557,892,600
35.913706
80
0.616703
false
browseinfo/odoo_saas3_nicolas
addons/purchase/report/request_quotation.py
3
1571
# -*- 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...
agpl-3.0
-5,832,913,256,495,361,000
43.885714
139
0.628262
false
ShashaQin/erpnext
erpnext/setup/doctype/authorization_rule/authorization_rule.py
121
2292
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr, flt from frappe import _, msgprint from frappe.model.document import Document class AuthorizationRule(Do...
agpl-3.0
3,154,960,566,215,696,000
44.84
101
0.714223
false
ChemiKhazi/Sprytile
rx/concurrency/virtualtimescheduler.py
2
4699
import logging from rx.internal import PriorityQueue, ArgumentOutOfRangeException from .schedulerbase import SchedulerBase from .scheduleditem import ScheduledItem from .scheduleperiodic import SchedulePeriodic log = logging.getLogger("Rx") class VirtualTimeScheduler(SchedulerBase): """Virtual Scheduler. This ...
mit
-7,471,426,375,865,016,000
28.006173
80
0.614599
false