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
trunet/txXBee
setup.py
2
1115
#!/usr/bin/env python """ txXBee installation script """ from setuptools import setup import os import sys import subprocess import txXBee setup( name = "txXBee", version = txXBee.__version__, author = "Wagner Sartori Junior", author_email = "wsartori@gmail.com", url = "http://github.com/trunet/txx...
gpl-3.0
1,638,000,466,300,498,000
29.972222
206
0.654709
false
farhi-naz/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/xml.py
187
2044
# Copyright (C) 2010 Apple 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: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
-6,648,370,728,099,772,000
44.422222
98
0.721624
false
wavemind/gcb17ml
modules/announcements/announcements.py
5
14259
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
-202,883,165,307,012,600
33.778049
80
0.619959
false
nvoron23/hue
desktop/core/ext-py/Paste-1.7.2/tests/test_httpheaders.py
9
6173
from paste.httpheaders import * import time def _test_generic(collection): assert 'bing' == VIA(collection) REFERER.update(collection,'internal:/some/path') assert 'internal:/some/path' == REFERER(collection) CACHE_CONTROL.update(collection,max_age=1234) CONTENT_DISPOSITION.update(collection,filena...
apache-2.0
-5,122,450,152,580,128,000
40.42953
76
0.62984
false
optima-ict/odoo
addons/report_webkit/convert.py
47
1389
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # Author : Nicolas Bessi (Camptocamp) from openerp.tools import convert original_xml_import = convert.xml_import class WebkitXMLImport(original_xml_import...
agpl-3.0
2,283,837,287,337,972,500
42.40625
80
0.640029
false
Nick-Hall/gramps
gramps/gen/plug/docgen/paperstyle.py
4
6305
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2002 Gary Shao # Copyright (C) 2007 Brian G. Matherly # Copyright (C) 2009 Benny Malengier # Copyright (C) 2009 Gary Burton # # This program is free software; you can redistribute i...
gpl-2.0
4,056,584,327,782,283,000
27.022222
79
0.499286
false
kordano/samba-ldb-mdb
buildtools/wafadmin/3rdparty/batched_cc.py
16
4654
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006 (ita) """ Batched builds - compile faster instead of compiling object files one by one, c/c++ compilers are often able to compile at once: cc -c ../file1.c ../file2.c ../file3.c Files are output on the directory where the compiler is called, and dependencies...
gpl-3.0
-1,363,906,210,099,814,700
24.431694
101
0.669317
false
t4skforce/pyspider
pyspider/database/__init__.py
3
3182
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-08 15:04:08 import urlparse def connect_database(url): """ create database object by url mysql: mysql+type://user:passwd@hos...
apache-2.0
-9,000,055,961,375,214,000
31.469388
115
0.552483
false
levigross/pyscanner
mytests/django/contrib/gis/db/backends/spatialite/base.py
77
3463
from ctypes.util import find_library from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.base import ( _sqlite_extract, _sqlite_date_trunc, _sqlite_regexp, _sqlite_format_dtdelta, connection_created, Database, DatabaseWrapper as SQLiteDatabas...
mit
1,495,187,806,561,042,000
53.109375
104
0.624025
false
John-Hart/autorest
src/client/Python/msrestazure/test/unittest_exceptions.py
10
7224
#-------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""),...
mit
5,662,963,116,100,797,000
42.506024
598
0.626558
false
jbarbuto/raven-python
raven/contrib/zope/__init__.py
3
4165
#!/usr/bin/python # -*- coding: utf-8 -*- """ raven.contrib.zope ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from inspect import getouterframes, currentframe, getinnerframes from ...
bsd-3-clause
6,916,941,142,347,289,000
37.925234
89
0.513565
false
andrewyoung1991/abjad
abjad/tools/scoretools/test/test_scoretools_Note_grace.py
2
2385
# -*- encoding: utf-8 -*- from abjad import * def test_scoretools_Note_grace_01(): r'''Attach one grace note. ''' note = Note("c'4") grace_container = scoretools.GraceContainer([Note(2, (1, 16))]) attach(grace_container, note) assert systemtools.TestManager.compare( note, r''...
gpl-3.0
2,186,864,990,318,604,300
18.557377
107
0.49434
false
sid-kap/pants
src/python/pants/scm/scm.py
16
3749
# coding=utf-8 # Copyright 2014 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) from abc import abst...
apache-2.0
1,771,888,200,601,544,200
32.473214
98
0.720726
false
klmitch/glance
glance/tests/functional/v2/test_metadef_resourcetypes.py
2
10755
# Copyright (c) 2014 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
1,549,523,508,167,408,000
39.738636
79
0.613668
false
fspaolo/scikit-learn
sklearn/datasets/svmlight_format.py
2
13301
"""This module implements a loader and dumper for the svmlight format This format is a text-based format, with one sample per line. It does not store zero valued features hence is suitable for sparse dataset. The first element of each line can be used to store a target variable to predict. This format is used as the...
bsd-3-clause
-7,167,305,385,788,414,000
37.221264
79
0.641831
false
jsilhan/dnf
dnf/__init__.py
5
1394
# __init__.py # The toplevel DNF package. # # Copyright (C) 2012-2016 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This prog...
gpl-2.0
5,876,685,958,310,217,000
35.684211
77
0.76901
false
GroestlCoin/encompass
gui/qt/console.py
4
10130
# source: http://stackoverflow.com/questions/2758159/how-to-embed-a-python-interpreter-in-a-pyqt-widget import sys, os, re import traceback, platform from PyQt4 import QtCore from PyQt4 import QtGui from chainkey import util if platform.system() == 'Windows': MONOSPACE_FONT = 'Lucida Console' elif platform.syste...
gpl-3.0
8,991,427,489,111,007,000
30.755486
123
0.552517
false
lsinfo/odoo
openerp-wsgi.py
363
1811
# WSGI Handler sample configuration file. # # Change the appropriate settings below, in order to provide the parameters # that would normally be passed in the command-line. # (at least conf['addons_path']) # # For generic wsgi handlers a global application is defined. # For uwsgi this should work: # $ uwsgi_python --...
agpl-3.0
-6,431,368,624,361,317,000
31.927273
77
0.590834
false
whilo/toolz
doc/source/conf.py
25
9229
# -*- coding: utf-8 -*- # # Toolz documentation build configuration file, created by # sphinx-quickstart on Sun Sep 22 18:06:00 2013. # # 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. # # All c...
bsd-3-clause
2,957,503,965,418,176,500
31.156794
107
0.704843
false
gpu/CLBlast
scripts/database/database/bests.py
2
2360
# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This file follows the # PEP8 Python style guide and uses a max-width of 120 characters per line. # # Author(s): # Cedric Nugteren <www.cedricnugteren.nl> import sys import database.clblast as clblast def get_best_result...
apache-2.0
-1,271,343,812,265,340,400
37.064516
140
0.670339
false
briancoutinho0905/2dsampling
src/mem/slicc/ast/IfStatementAST.py
71
3124
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
-6,104,572,857,406,810,000
40.105263
79
0.682458
false
aranjan7/contrail-controller-aranjan
src/config/common/network.py
19
1506
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from quantumclient.quantum import client from quantumclient.client import HTTPClient from quantumclient.common import exceptions class CommonQuantumClient(object): def __init__(self, project, user, passwd, api_server_ip): AUTH_URL = 'ht...
apache-2.0
3,274,170,569,762,897,000
37.615385
72
0.588313
false
vheon/ycmd
ycmd/handlers.py
2
13157
# Copyright (C) 2013-2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # #...
gpl-3.0
290,315,326,878,103,040
30.934466
80
0.701072
false
ardi69/pyload-0.4.10
pyload/plugin/account/FilerNet.py
1
1976
# -*- coding: utf-8 -*- import re import time from pyload.plugin.Account import Account class FilerNet(Account): __name = "FilerNet" __type = "account" __version = "0.04" __description = """Filer.net account plugin""" __license = "GPLv3" __authors = [("stickell", "l.stickell@y...
gpl-3.0
6,758,993,398,583,416,000
32.474576
90
0.540253
false
zorojean/scrapy
tests/test_mail.py
129
2331
import unittest from io import BytesIO from scrapy.mail import MailSender class MailSenderTest(unittest.TestCase): def test_send(self): mailsender = MailSender(debug=True) mailsender.send(to=['test@scrapy.org'], subject='subject', body='body', _callback=self._catch_mail_sent) assert self...
bsd-3-clause
4,569,859,179,631,541,000
35.421875
141
0.623338
false
asiviero/brbeerindex
beerindex/spiders/winespider.py
1
8963
# -*- coding: utf-8 -*- from scrapy.spiders import Spider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request from scrapy.conf import settings from beerindex.items import WineIndexItem import logging import lxml.html from urlparse import urlparse import re class WineSpider(Spider): name =...
lgpl-2.1
-2,371,376,386,529,648,600
62.468085
134
0.575148
false
wndhydrnt/airflow
tests/macros/test_hive.py
15
1957
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
6,297,661,285,416,821,000
41.543478
99
0.67348
false
broferek/ansible
lib/ansible/modules/cloud/openstack/os_image_info.py
20
5933
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # 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
-3,270,259,837,774,312,400
29.270408
125
0.605764
false
40223204/w16b_test
static/Brython3.1.3-20150514-095342/Lib/test/test_re.py
718
56009
# FIXME: brython: implement test.support #from test.support import verbose, run_unittest, gc_collect, bigmemtest, _2G, \ # cpython_only verbose = True # FIXME: brython: Not used in this module ? #import io import re # FIXME: brython: implement re.Scanner #from re import Scanner import sre_constants import sys...
agpl-3.0
8,335,110,074,549,752,000
45.93283
86
0.508668
false
jeremiahmarks/dangerzone
scripts/python/turtleRelated/newhex.py
1
4150
from fvh import MyTurtle masterHexSet=[] masterHexList=[] distanceBetweenLayers=None points=["sw","se","e","ne","nw","w"] def drawit(circleXfromCenter,rootHex): heading=90 rootHex.turt.pu() rootHex.turt.seth(heading) rootHex.setDistanceBetweenLayers() rootHex.turt.fd(distanceBetweenLayers) newt...
mit
-552,311,326,565,044,000
29.291971
71
0.584578
false
juga0/dhcpcanon
tests/dhcpcap_leases.py
3
1968
# -*- coding: utf-8 -*- # vim:ts=4:sw=4:expandtab # Copyright 2016, 2017 juga (juga at riseup dot net), MIT license. """.""" from dhcpcanon.dhcpcaplease import DHCPCAPLease LEASE_INIT = DHCPCAPLease(interface='enp0s25', address='', server_id='', next_server='', router='', subnet_mask='', ...
mit
-8,116,113,738,290,483,000
52.189189
79
0.454268
false
atheed/servo
tests/wpt/css-tests/tools/py/testing/code/test_assertion.py
160
7843
import pytest, py def exvalue(): return py.std.sys.exc_info()[1] def f(): return 2 def test_assert(): try: assert f() == 3 except AssertionError: e = exvalue() s = str(e) assert s.startswith('assert 2 == 3\n') def test_assert_within_finally(): excinfo = py.test.r...
mpl-2.0
-3,569,439,137,519,116,000
24.464286
80
0.518807
false
srikantbmandal/ansible
lib/ansible/modules/cloud/openstack/os_ironic_inspect.py
22
6024
#!/usr/bin/python # coding: utf-8 -*- # (c) 2015-2016, Hewlett Packard Enterprise Development Company LP # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (...
gpl-3.0
-533,016,749,776,063,500
32.842697
118
0.629482
false
jmcbailey/django-cached-hitcount
cached_hitcount/south_migrations/0002_auto__chg_field_hit_added.py
2
2148
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Hit.added' db.alter_column(u'cached_hitcount_hit', 'ad...
gpl-3.0
-3,851,098,665,365,695,500
48.976744
169
0.576816
false
Darkdadaah/pywikibot-core
tests/wikidataquery_tests.py
1
9750
# -*- coding: utf-8 -*- """Test cases for the WikidataQuery query syntax and API.""" # # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals import os import time import pywikibot import pywikibot.data.wikidataquery as query from py...
mit
-838,298,079,280,254,500
32.62069
98
0.591897
false
theflofly/tensorflow
tensorflow/python/ops/list_ops.py
15
12749
# Copyright 2018 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
5,252,810,499,537,570,000
33.363881
81
0.6777
false
pivie/cctools
galaxy/makeflow_gatk_wrapper.py
9
3066
#!/usr/bin/env cctools_python # CCTOOLS_PYTHON_VERSION 2.7 2.6 # #Copyright (C) 2013- The University of Notre Dame #This software is distributed under the GNU General Public License. #See the file COPYING for details. # # This program implements a way to organize and manage a large number of # concurrently running GATK...
gpl-2.0
5,636,724,724,180,602,000
31.273684
112
0.70287
false
gameduell/duell
bin/win/python2.7.9/Lib/distutils/tests/test_build_py.py
46
5064
"""Tests for distutils.command.build_py.""" import os import sys import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution from distutils.errors import DistutilsFileError from distutils.tests import support from test.test_support import run_unittest cla...
bsd-2-clause
-2,268,772,633,425,349,400
32.098039
76
0.562006
false
chippey/gaffer
python/GafferDispatch/Wedge.py
1
5185
########################################################################## # # Copyright (c) 2015, Image Engine Design 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: # # * Redistrib...
bsd-3-clause
4,099,585,810,692,022,300
30.424242
106
0.656895
false
YueLinHo/Subversion
tools/dev/wc-ng/count-progress.py
7
3223
#!/usr/bin/env python # # # 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 #...
apache-2.0
6,645,936,300,226,661,000
26.547009
79
0.628917
false
peiyuwang/pants
src/python/pants/reporting/reporter.py
26
3119
# coding=utf-8 # Copyright 2014 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) from collections imp...
apache-2.0
2,318,235,632,379,834,000
33.274725
93
0.693171
false
hieukypc/ERP
openerp/addons/hr_expense/report/hr_expense_report.py
29
2924
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from openerp.osv import osv from openerp.tools.misc import formatLang from openerp.tools.translate import _ from openerp.report import report_sxw from openerp.exceptions import UserError class report_expens...
gpl-3.0
7,997,089,325,891,065,000
47.733333
127
0.560192
false
aidanhs/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/benchmark_helper_wsh.py
451
3234
# Copyright 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 f...
mpl-2.0
-433,271,808,245,726,850
37.047059
75
0.644712
false
liampauling/betfair
tests/test_scoresresources.py
2
1117
import unittest from betfairlightweight import resources from tests.tools import create_mock_json class ScoreResourcesTest(unittest.TestCase): def test_racedetails(self): mock_response = create_mock_json("tests/resources/racedetails.json") resource = resources.RaceDetails(**mock_response.json()) ...
mit
-5,779,643,678,496,150,000
36.233333
82
0.685765
false
oubiwann/metaphone
metaphone/word.py
1
1414
# -*- coding: utf-8 -*- from __future__ import unicode_literals import unicodedata class Word(object): """ """ def __init__(self, input): self.original = input if isinstance(input, bytes): self.decoded = input.decode('utf-8', 'ignore') else: self.decoded = i...
bsd-3-clause
5,413,331,995,755,329,000
32.666667
73
0.548798
false
shootstar/novatest
nova/tests/virt/baremetal/test_utils.py
16
2105
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # 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 Lic...
apache-2.0
4,523,494,353,125,243,400
30.41791
78
0.658432
false
dennisss/sympy
sympy/logic/tests/test_inference.py
15
9755
"""For more tests on satisfiability, see test_dimacs""" from sympy import symbols, Q from sympy.logic.boolalg import And, Implies, Equivalent, true, false from sympy.logic.inference import literal_symbol, \ pl_true, satisfiable, valid, entails, PropKB from sympy.logic.algorithms.dpll import dpll, dpll_satisfiable...
bsd-3-clause
-8,982,438,633,875,124,000
37.710317
89
0.563198
false
botify-labs/moto
tests/test_cloudformation/fixtures/route53_health_check.py
8
1122
from __future__ import unicode_literals template = { "Resources": { "HostedZone": { "Type": "AWS::Route53::HostedZone", "Properties": { "Name": "my_zone" } }, "my_health_check": { "Type": "AWS::Route53::HealthCheck", ...
apache-2.0
-9,001,231,790,349,889,000
27.769231
60
0.37344
false
FHannes/intellij-community
python/helpers/pydev/pydevd_attach_to_process/winappdbg/textio.py
102
62691
#!~/.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 ...
apache-2.0
-5,247,712,314,072,015,000
32.364023
139
0.520665
false
ndp-systemes/odoo-addons
fix_export_rows/fix_export_rows.py
1
6461
# -*- coding: utf8 -*- # # Copyright (C) 2017 NDP Systèmes (<http://www.ndp-systemes.fr>). # # 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 Foundation, either version 3 of the # Licen...
agpl-3.0
-9,209,401,330,679,715,000
45.811594
118
0.474303
false
rcarmo/yaki-gae
lib/pygments/formatters/other.py
363
3811
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
mit
2,355,698,694,452,845,000
32.13913
77
0.548412
false
programulya/three.js
utils/exporters/blender/modules/msgpack/__init__.py
659
1385
# coding: utf-8 from msgpack._version import version from msgpack.exceptions import * from collections import namedtuple class ExtType(namedtuple('ExtType', 'code data')): """ExtType represents ext type in msgpack.""" def __new__(cls, code, data): if not isinstance(code, int): raise TypeE...
mit
7,540,531,114,479,434,000
24.648148
70
0.649097
false
tbinjiayou/Odoo
openerp/tools/pdf_utils.py
456
3659
# -*- 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
2,388,767,414,513,064,000
27.146154
94
0.598797
false
zero-ui/miniblink49
v8_7_5/testing/gmock/scripts/generator/cpp/keywords.py
1157
2004
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions 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...
gpl-3.0
8,899,779,250,848,893,000
32.966102
97
0.727046
false
andresriancho/qotd
qotd/qotd.py
1
6626
# -*- coding: utf-8 -*- # Copyright (C) 2010 Yuen Ho Wong # # 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 late...
gpl-3.0
-4,557,086,563,569,629,700
34.20765
112
0.55735
false
ralphwort/chef-repo
build/python-neutronclient/pbr-0.8.2-py2.7.egg/pbr/hooks/files.py
44
3600
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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://...
apache-2.0
-2,495,582,286,060,571,000
34.643564
79
0.603889
false
Semi-global/edx-platform
lms/djangoapps/lms_xblock/migrations/0001_initial.py
110
4883
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'XBlockAsidesConfig' db.create_table('lms_xblock_xblockasidesconfig', ( ('id', se...
agpl-3.0
-144,565,150,344,930,620
65
182
0.573418
false
dlazz/ansible
lib/ansible/modules/network/f5/bigip_policy.py
14
36820
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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
5,396,449,130,497,112,000
31.526502
91
0.568713
false
stevelle/openstack-ansible
playbooks/roles/repo_server/files/openstack-wheel-builder.py
2
12732
#!/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
1,127,248,750,078,754,000
30.437037
78
0.470075
false
gh0std4ncer/doit
tests/test_exceptions.py
7
2565
from doit import exceptions class TestInvalidCommand(object): def test_just_string(self): exception = exceptions.InvalidCommand('whatever string') assert 'whatever string' == str(exception) def test_task_not_found(self): exception = exceptions.InvalidCommand(not_found='my_task') ...
mit
-5,575,185,337,138,224,000
34.625
80
0.632359
false
Lupino/containerops
component/python/test/mamba/bootstrap.py
5
4405
#!/usr/bin/env python3 import subprocess import os import sys import glob import json import anymarkup REPO_PATH = 'git-repo' def git_clone(url): r = subprocess.run(['git', 'clone', url, REPO_PATH]) if r.returncode == 0: return True else: print("[COUT] Git clone error: Invalid argument ...
apache-2.0
80,203,484,195,094,460
23.472222
108
0.588195
false
dsquareindia/scikit-learn
sklearn/tests/test_cross_validation.py
79
47914
"""Test the cross_validation module""" from __future__ import division import warnings import numpy as np from scipy.sparse import coo_matrix from scipy.sparse import csr_matrix from scipy import stats from sklearn.exceptions import ConvergenceWarning from sklearn.utils.testing import assert_true from sklearn.utils.t...
bsd-3-clause
3,739,636,191,999,930,000
37.269968
79
0.61145
false
gatieme/AderXCoding
language/python/re/memFI.py
1
2785
#!/usr/bin/python # encoding=utf-8 #!coding:utf-8 import re import sys import urllib2 import argparse import commands import os import subprocess if __name__ == "__main__" : # 测试正则表达式 reload(sys) sys.setdefaultencoding("utf-8") if len(sys.argv) > 1: # 如果在程序运行时,传递了命令行参数 # 打...
gpl-2.0
5,526,196,995,264,820,000
25.774194
145
0.549217
false
gautam1858/tensorflow
tensorflow/python/keras/wrappers/scikit_learn.py
4
12808
# 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
-7,102,144,004,389,751,000
34.977528
80
0.645144
false
ferrants/ansible-modules-core
utilities/logic/async_wrapper.py
189
6183
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
gpl-3.0
3,199,080,624,362,945,500
29.915
118
0.595504
false
steedos/odoo
addons/account_budget/wizard/account_budget_analytic.py
375
2045
# -*- 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
-1,306,162,017,658,074,600
39.098039
134
0.596088
false
lowfatcomputing/amforth
core/devices/atmega323/device.py
5
1689
# Partname: ATmega323 # Built using part description XML file version 203 # generated automatically, do not edit MCUREGS = { 'ADCH': '$25', 'ADCL': '$24', 'ADCSR': '$26', 'ADMUX': '$27', 'ACSR': '$28', 'SFIOR': '$50', 'MCUCR': '$55', 'MCUCSR': '$54', 'OSCCAL': '$51', 'SPH': '$5E', 'SPL': '$5D', 'SPMCR': '$5...
gpl-2.0
3,347,434,635,173,448,000
17.988764
51
0.477205
false
maftieu/CouchPotatoServer
libs/sqlalchemy/dialects/mssql/adodbapi.py
18
2284
# mssql/adodbapi.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ The adodbapi dialect is not implemented for 0.6 at this time. """ import dateti...
gpl-3.0
7,886,686,937,042,845,000
32.101449
84
0.625219
false
cartertech/odoo-hr-ng
hr_infraction/wizard/batch.py
1
3336
#-*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2015 One Click Software (http://oneclick.solutions) # and Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you ca...
agpl-3.0
-1,827,862,370,709,828,900
39.192771
137
0.578237
false
mtcode/autoscaler
hack/scripts/break_mig.py
1
5500
#!/usr/bin/env python # Copyright 2017 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
3,485,497,537,221,733,000
35.666667
149
0.658364
false
wetneb/django
tests/timezones/tests.py
10
54662
from __future__ import unicode_literals import datetime import re import sys import warnings from unittest import skipIf from xml.dom.minidom import parseString from django.contrib.auth.models import User from django.core import serializers from django.core.urlresolvers import reverse from django.db.models import Max...
bsd-3-clause
7,140,633,815,190,074,000
46.949123
144
0.61465
false
mjtamlyn/django
django/contrib/messages/storage/base.py
18
6090
from django.conf import settings from django.contrib.messages import constants, utils from django.utils.encoding import force_text LEVEL_TAGS = utils.get_level_tags() class Message: """ Represent an actual message that can be stored in any of the supported storage classes (typically session- or cookie-ba...
bsd-3-clause
3,079,829,087,269,167,000
32.646409
93
0.605419
false
drinkssu/YourVoiceAlarmBackend
lib/werkzeug/contrib/securecookie.py
318
12204
# -*- 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 ...
apache-2.0
-4,273,788,621,177,237,500
37.018692
79
0.588168
false
googleads/google-ads-python
google/ads/googleads/v8/enums/types/price_placeholder_field.py
1
2698
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
apache-2.0
-5,350,295,550,560,609,000
29.659091
74
0.601927
false
koyuawsmbrtn/eclock
windows/Python27/Lib/idlelib/idle_test/test_config_name.py
49
2431
"""Unit tests for idlelib.configSectionNameDialog""" import unittest from idlelib.idle_test.mock_tk import Var, Mbox from idlelib import configSectionNameDialog as name_dialog_module name_dialog = name_dialog_module.GetCfgSectionNameDialog class Dummy_name_dialog(object): # Mock for testing the following methods ...
gpl-2.0
673,649,227,250,559,500
31.413333
65
0.66269
false
lambder/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/masm.py
61
2998
"""SCons.Tool.masm Tool-specific initialization for the Microsoft Assembler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The S...
apache-2.0
-1,772,780,591,041,742,800
37.935065
100
0.723816
false
roger-zhao/ardupilot-3.5-dev
Tools/ardupilotwaf/mavgen.py
36
3330
#!/usr/bin/env python # encoding: utf-8 # (c) Siddharth Bharat Purohit, 3DRobotics Inc. """ The **mavgen.py** program is a code generator which creates mavlink header files. """ from waflib import Logs, Task, Utils, Node from waflib.TaskGen import feature, before_method, extension import os import os.path from xml.et...
gpl-3.0
-4,479,118,023,521,520,000
29.272727
91
0.558859
false
GreatFruitOmsk/snakefood
lib/python/snakefood/fallback/collections.py
3
1609
""" Safe fallback for defaultdict, in order to support 2.4. """ ## From http://code.activestate.com/recipes/523034/ try: from collections import defaultdict except: class defaultdict(dict): def __init__(self, default_factory=None, *a, **kw): if (default_factory is not None and ...
gpl-2.0
-3,497,040,540,529,710,000
37.309524
66
0.510255
false
OaklandPeters/fastnode
fast/test_node.py
1
1831
""" Unit-tests and examples of syntax and behavior desired for AST-nodes. """ import unittest import operator import pdb from .node import denode, FASTNode, NodeInterface a, b, c = 5, 4, 2 inner = FASTNode(operator.__mul__, b, c) outer = FASTNode(operator.__add__, a, inner) # tree = FASTNode( # operator.__add__,...
mit
5,159,212,003,545,314,000
21.329268
69
0.522665
false
pcmanus/cassandra-dtest
loadmaker_test.py
2
1189
import time import loadmaker from dtest import Tester class TestLoadmaker(Tester): def loadmaker_test(self): cluster = self.cluster cluster.populate(1).start() node1 = cluster.nodelist()[0] time.sleep(.2) host, port = node1.network_interfaces['thrift'] lm = loadm...
apache-2.0
-7,591,864,788,823,068,000
27.309524
80
0.583684
false
srowen/spark
python/run-tests.py
15
13614
#!/usr/bin/env python3 # # 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 "L...
apache-2.0
-1,917,147,960,618,669,800
40.129909
100
0.613413
false
ndaniel/fusioncatcher
bin/generate_1000genomes.py
1
9395
#!/usr/bin/env python # -*- coding: utf-8 -*- """ It generates the list of candidate fusion genes. This list is hard coded in here and it is manually curated from: Greger et al. Tandem RNA Chimeras Contribute to Transcriptome Diversity in Human Population and Are Associated with Intronic Genetic Variants, Plos One,...
gpl-3.0
2,071,112,059,427,890,000
32.553571
221
0.528579
false
pacoqueen/odfpy
contrib/html2odt/shtml2odt.py
7
22876
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008-2009 Søren Roug, European Environment Agency # # This is free software. You may redistribute it under the terms # of the Apache license and the GNU General Public License Version # 2 or at your option any later version. # # This program is distributed in t...
gpl-2.0
-554,272,951,505,942,340
35.954766
141
0.555716
false
michaelgira23/JEREMY
Skype4Py/filetransfer.py
21
3643
"""File transfers. """ __docformat__ = 'restructuredtext en' import os from utils import * class FileTransfer(Cached): """Represents a file transfer. """ _ValidateHandle = int def __repr__(self): return Cached.__repr__(self, 'Id') def _Alter(self, AlterName, Args=None): return...
bsd-3-clause
-637,936,135,923,729,400
21.213415
76
0.640406
false
hexcap/dpkt
dpkt/tns.py
6
1079
# $Id: tns.py 23 2006-11-08 15:45:33Z dugsong $ # -*- coding: utf-8 -*- """Transparent Network Substrate.""" import dpkt class TNS(dpkt.Packet): __hdr__ = ( ('length', 'H', 0), ('pktsum', 'H', 0), ('type', 'B', 0), ('rsvd', 'B', 0), ('hdrsum', 'H', 0), ('msg', '0s'...
bsd-3-clause
-8,576,773,103,628,848,000
23.522727
81
0.495829
false
tedsunnyday/SE-Server
server/lib/requests/packages/charade/hebrewprober.py
206
13642
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Shy Shalom # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reser...
apache-2.0
3,815,987,289,869,030,400
46.204947
79
0.670723
false
Pankaj-Sakariya/android-source-browsing.platform--external--chromium-trace
trace-viewer/third_party/closure_linter/closure_linter/ecmalintrules.py
123
34907
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
bsd-3-clause
1,058,497,181,553,646,600
43.410941
80
0.627639
false
HwisooSo/gemV-update
src/mem/slicc/ast/StatementListAST.py
91
2240
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
3,050,231,607,699,587,000
47.695652
72
0.751339
false
icodemachine/Stem
stem/util/lru_cache.py
7
7373
# Drop in replace for python 3.2's collections.lru_cache, from... # http://code.activestate.com/recipes/578078-py26-and-py30-backport-of-python-33s-lru-cache/ # # ... which is under the MIT license. Stem users should *not* rely upon this # module. It will be removed when we drop support for python 3.2 and below. """ M...
lgpl-3.0
-671,562,248,038,299,100
39.510989
95
0.539401
false
alfasin/st2
st2client/st2client/utils/httpclient.py
3
4996
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
3,152,012,599,682,095,600
32.306667
87
0.613891
false
roadmapper/ansible
lib/ansible/module_utils/network/exos/exos.py
20
8830
# 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
4,468,465,737,025,988,600
39.319635
160
0.662967
false
userzimmermann/pytest
testing/test_argcomplete.py
179
3582
from __future__ import with_statement import py, pytest # test for _argcomplete but not specific for any application def equal_with_bash(prefix, ffc, fc, out=None): res = ffc(prefix) res_bash = set(fc(prefix)) retval = set(res) == res_bash if out: out.write('equal_with_bash %s %s\n' % (retval,...
mit
-3,191,844,721,087,826,400
38.8
86
0.580681
false
paulmathews/nova
nova/api/openstack/compute/contrib/aggregates.py
4
7879
# Copyright (c) 2012 Citrix Systems, 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 ...
apache-2.0
-4,422,814,386,179,159,000
34.490991
78
0.59703
false
liaotup/AutoDeployer
Tomcat Server (Git Client)/commanderService/main.py
1
1639
#! /bin/bash # -*- coding: utf-8 -* import urlparse import os import comm_log import tornado.ioloop import tornado.web import tornado.options from tornado.options import define, options # 监听端口 define("port", default=8978, help="run on the given port", type=int) # 日志输出 define("log", default=comm_log.get_logging('gohook...
mit
-2,461,844,700,018,480,000
32.8125
134
0.669131
false
naziris/HomeSecPi
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py
2375
11628
"""Utilities for writing code that runs on Python 2 and 3""" #Copyright (c) 2010-2011 Benjamin Peterson #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 l...
apache-2.0
-1,163,574,057,291,105,800
29.202597
81
0.600361
false
redhat-openstack/rally
tests/unit/common/objects/test_deploy.py
10
9189
# Copyright 2013: Mirantis 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
-8,984,990,281,588,321,000
44.044118
79
0.643704
false
munnerz/CouchPotatoServer
couchpotato/core/media/movie/providers/automation/popularmovies.py
17
1465
from couchpotato import fireEvent from couchpotato.core.logger import CPLog from couchpotato.core.media.movie.providers.automation.base import Automation log = CPLog(__name__) autoload = 'PopularMovies' class PopularMovies(Automation): interval = 1800 url = 'https://s3.amazonaws.com/popular-movies/movies.j...
gpl-3.0
-3,669,287,052,438,123,500
29.520833
246
0.559044
false
mezz64/home-assistant
homeassistant/components/demo/air_quality.py
21
1585
"""Demo platform that offers fake air quality data.""" from homeassistant.components.air_quality import AirQualityEntity async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Air Quality.""" async_add_entities( [DemoAirQuality("Home", 14, 23, 100), DemoAi...
apache-2.0
-1,705,059,968,178,346,500
27.818182
86
0.621451
false
ArvinPan/pyzmq
zmq/auth/base.py
7
10384
"""Base implementation of 0MQ authentication.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import logging import zmq from zmq.utils import z85 from zmq.utils.strtypes import bytes, unicode, b, u from zmq.error import _check_version from .certs import load_certificat...
bsd-3-clause
2,936,030,060,399,855,000
37.176471
92
0.567604
false
js0701/chromium-crosswalk
tools/perf/page_sets/polymer.py
33
10354
# Copyright 2014 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. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class PolymerPage(page_module.Page):...
bsd-3-clause
-6,355,936,965,174,978,000
38.976834
80
0.655109
false