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
arun6582/django
django/db/models/sql/compiler.py
2
56499
import re from itertools import chain from django.core.exceptions import EmptyResultSet, FieldError from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import OrderBy, Random, RawSQL, Ref from django.db.models.query_utils import QueryWrapper, select_related_descend from django.db.models...
bsd-3-clause
-4,896,346,399,500,584,000
43.522459
118
0.565037
false
arthurfurlan/django-shortim
src/shortim/migrations/0004_auto__add_field_shorturl_collect_tries.py
1
2388
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ShortURL.collect_tries' db.add_column('shortim_shorturl', 'collect_tries', self.gf('django...
gpl-3.0
-5,950,783,668,536,782,000
53.272727
145
0.56742
false
kbidarkar/robottelo
tests/foreman/rhai/test_rhai.py
2
6626
"""Tests for Red Hat Access Insights :Requirement: Rhai :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: UI :TestType: Functional :CaseImportance: High :Upstream: No """ import time from fauxfactory import gen_string from nailgun import entities from robottelo import manifests from robottelo.ap...
gpl-3.0
-4,276,507,252,918,347,000
38.915663
79
0.594627
false
mancoast/CPythonPyc_test
cpython/221_test_cl.py
21
3925
#! /usr/bin/env python """Whimpy test script for the cl module Roger E. Masse """ import cl from test_support import verbose clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID', 'ALGORITHM_VERSION', 'AUDIO', 'AWARE_ERROR', 'AWARE_MPEG_AUDIO', 'AWARE_MULTIRATE', 'AWCMP_CONST_QUAL', 'AWCMP_FIXED_RATE', 'AWCMP_...
gpl-3.0
-3,731,051,349,121,502,700
49.320513
70
0.69758
false
mancoast/CPythonPyc_test
cpython/272_test_slice.py
113
4413
# tests for slice objects; in particular the indices method. import unittest from test import test_support from cPickle import loads, dumps import sys class SliceTest(unittest.TestCase): def test_constructor(self): self.assertRaises(TypeError, slice) self.assertRaises(TypeError, slice, 1, 2, 3, ...
gpl-3.0
-5,527,695,207,957,464,000
31.932836
73
0.544528
false
RCHG/blog_backup
_vendor/bundle/ruby/2.1.0/gems/pygments.rb-0.6.0/vendor/pygments-main/scripts/get_vimkw.py
38
1478
from __future__ import print_function import re r_line = re.compile(r"^(syn keyword vimCommand contained|syn keyword vimOption " r"contained|syn keyword vimAutoEvent contained)\s+(.*)") r_item = re.compile(r"(\w+)(?:\[(\w+)\])?") def getkw(input, output): out = file(output, 'w') output_in...
mit
2,092,608,149,730,451,500
33.372093
80
0.518268
false
cernops/nova
nova/db/sqlalchemy/migrate_repo/versions/273_sqlite_foreign_keys.py
79
4690
# Copyright 2014 Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
4,451,525,298,448,156,700
42.425926
78
0.641365
false
engdan77/edoAutoHomeMobile
twisted/runner/procmontap.py
65
2298
# -*- test-case-name: twisted.runner.test.test_procmontap -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Support for creating a service which runs a process monitor. """ from twisted.python import usage from twisted.runner.procmon import ProcessMonitor class Options(usage.Options): ...
mit
-4,269,868,125,983,666,700
30.479452
78
0.601828
false
mandeepdhami/neutron
neutron/db/migration/alembic_migrations/firewall_init_ops.py
61
3536
# Copyright 2014 OpenStack Foundation # # 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 ...
apache-2.0
7,335,430,847,341,203,000
46.146667
78
0.63405
false
0x7678/youtube-dl
youtube_dl/extractor/slideshare.py
16
2025
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( ExtractorError, ) class SlideshareIE(InfoExtractor): _VALID_URL = r'https?://www\.slideshare\.net/[^/]+?/(?P<title>.+?)($|\?)' _TEST = { ...
unlicense
1,844,048,444,652,582,100
35.818182
191
0.56642
false
foreni-packages/golismero
misc/old_tests/plugin_tests/ui/test.py
8
4271
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = """ GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Golismero project site: https://github.com/golismero Golismero project mail: contact@golismero-project.com This program is free software; you can redistribute it and/or modify it under the terms of...
gpl-2.0
-2,678,954,885,038,705,000
38.915888
118
0.584641
false
micropython/micropython
examples/asmled.py
15
1679
# flash LED #1 using inline assembler # this version is overly verbose and uses word stores @micropython.asm_thumb def flash_led(r0): movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF) movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF) movw(r2, 1 << 13) movt(r2, 0) movw(r3, 0) movt(r3, 1 << 13...
mit
-8,229,000,693,064,108,000
18.298851
85
0.575342
false
saadqc/Sub-Merge
VideoPlayer.py
1
7603
#! /usr/bin/python # # Qt example for VLC Python bindings # Copyright (C) 2009-2010 the VideoLAN team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at...
gpl-3.0
-4,836,117,426,121,215,000
33.09417
79
0.61502
false
bluedynamics/node.ext.python
src/node/ext/python/parser.py
1
23088
import os import _ast import ast import types import copy import exceptions from odict import odict from zope.component import provideHandler from node.ext.directory.interfaces import IFileAddedEvent from utils import get_dotted_name_from_astnode from node.ext.python.interfaces import ( CODESECTION_STARTTOKEN, ...
bsd-3-clause
-3,549,827,161,211,386,000
36.178744
92
0.545825
false
kouaw/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/ndr.py
9
3029
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, qualities, ) class NDRIE(InfoExtractor): IE_NAME = 'ndr' IE_DESC = 'NDR.de - Mediathek' _VALID_URL = r'https?://www\.ndr\.de/.+?(?P<id>\d+)...
gpl-3.0
-8,857,106,535,945,729,000
31.234043
110
0.482998
false
solashirai/edx-platform
common/djangoapps/student/tests/test_roles.py
147
7798
""" Tests of student.roles """ import ddt from django.test import TestCase from courseware.tests.factories import UserFactory, StaffFactory, InstructorFactory from student.tests.factories import AnonymousUserFactory from student.roles import ( GlobalStaff, CourseRole, CourseStaffRole, CourseInstructorRole, Or...
agpl-3.0
1,205,417,160,697,388,500
38.989744
98
0.649141
false
tadeo/xhtml2pdf
xhtml2pdf/w3c/cssParser.py
53
39118
#!/usr/bin/env python ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##~ Copyright (C) 2002-2004 TechGame Networks, LLC. ##~ ##~ This library is free software; you can redistribute it and/or ##~ modify it under the terms of the BSD style License as found in the ##~ LICENSE file included with this distribution....
apache-2.0
8,179,135,156,528,571,000
35.321263
155
0.537016
false
bilderbuchi/GCode_Z_Splice
splicer_GUI.py
1
3376
import splicer_GUI_FB from templatesGCodePanel import GCodePanel from templatesTransitionPanel import TransitionPanel import wx import wx.xrc import logging import splicer logger = logging.getLogger(__name__) # Logic implementation file for the GUI class MyFrame( splicer_GUI_FB.mainFrameGUI ): def __init__( self, p...
agpl-3.0
9,203,873,516,078,526,000
31.152381
132
0.716528
false
jedie/pypyjs-standalone
website/js/pypy.js-0.3.0/lib/modules/pyrepl/console.py
13
2560
# Copyright 2000-2004 Michael Hudson-Doyle <micahel@gmail.com> # # All Rights Reserved # # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice appear in all copies and #...
mit
-7,316,285,660,186,032,000
26.526882
71
0.630469
false
googleads/google-ads-python
google/ads/googleads/v7/services/types/detail_placement_view_service.py
1
1273
# -*- 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
-2,607,583,219,530,520,000
31.641026
140
0.725844
false
dharmasam9/moose-core
scripts/cmake_sanity_check.py
1
2830
#!/usr/bin/env python # -*- coding: utf-8 -*- """cmake_sanity_check.py: Check if Cmake files are ok. Last modified: Sat Jan 18, 2014 05:01PM NOTE: Run in this directory only. """ __author__ = "Dilawar Singh" __copyright__ = "Copyright 2013, Dilawar Singh and NCBS Bangalore" __credits__ = ...
gpl-3.0
-4,250,139,840,957,038,600
27.877551
97
0.506714
false
laiqiqi886/kbengine
kbe/res/scripts/common/Lib/abc.py
106
8624
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) according to PEP 3119.""" from _weakrefset import WeakSet def abstractmethod(funcobj): """A decorator indicating abstract methods. Requires that the metaclass is ABCMeta or de...
lgpl-3.0
-1,269,972,387,605,203,500
33.774194
79
0.619666
false
caphrim007/ansible
lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase_facts.py
14
5925
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
5,414,794,238,133,418,000
28.331683
149
0.560675
false
willkg/phil
phil/check.py
1
5531
###################################################################### # This file is part of phil. # # Copyright (C) 2011, 2012, 2013 Will Kahn-Greene # # phil 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-3.0
2,489,440,115,486,904,000
34.455128
79
0.542036
false
ocadotechnology/boto
boto/fps/response.py
153
7866
# Copyright (c) 2012 Andy Davidoff http://www.disruptek.com/ # Copyright (c) 2010 Jason R. Coombs http://www.jaraco.com/ # Copyright (c) 2008 Chris Moyer http://coredumped.org/ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy ...
mit
-3,586,349,682,251,648,500
37
80
0.659166
false
dancingdan/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/softplus_test.py
24
5768
# 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
6,750,358,959,788,787,000
36.212903
94
0.66973
false
SPriyaJain/studybuddy
env/lib/python2.7/site-packages/click/__init__.py
135
2858
# -*- coding: utf-8 -*- """ click ~~~~~ Click is a simple Python module that wraps the stdlib's optparse to make writing command line scripts fun. Unlike other modules, it's based around a simple API that does not come with too much magic and is composable. In case optparse ever gets removed ...
mit
8,275,908,814,108,918,000
28.163265
78
0.678796
false
mrquim/repository.mrquim
script.module.youtube.dl/lib/youtube_dl/extractor/libraryofcongress.py
44
4662
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, float_or_none, int_or_none, parse_filesize, ) class LibraryOfCongressIE(InfoExtractor): IE_NAME = 'loc' IE_DESC = 'Library of Congress' _VALID_URL = r...
gpl-2.0
2,632,613,533,775,188,500
31.601399
153
0.472973
false
nikste/tensorflow
tensorflow/python/debug/cli/tensor_format.py
43
16359
# 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
-8,063,628,864,559,425,000
34.180645
80
0.656825
false
jeremiahmarks/sl4a
python/gdata/src/gdata/tlslite/integration/IMAP4_TLS.py
319
5145
"""TLS Lite + imaplib.""" import socket from imaplib import IMAP4 from gdata.tlslite.TLSConnection import TLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper # IMAP TLS PORT IMAP4_TLS_PORT = 993 class IMAP4_TLS(IMAP4, ClientHelper): """This class extends L{imaplib.IMAP4} with TLS suppor...
apache-2.0
4,755,418,242,885,402,000
37.977273
71
0.651895
false
ajaali/django
tests/gis_tests/geo3d/models.py
302
1294
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
bsd-3-clause
311,652,091,095,572,100
18.606061
61
0.710201
false
x2nie/odoo
openerp/osv/fields.py
14
69520
# -*- 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 GNU...
agpl-3.0
-3,693,199,041,015,428,000
41.390244
228
0.564758
false
zofuthan/edx-platform
cms/djangoapps/contentstore/tests/test_orphan.py
77
4598
""" Test finding orphans via the view and django config """ import json from contentstore.tests.utils import CourseTestCase from student.models import CourseEnrollment from contentstore.utils import reverse_course_url class TestOrphanBase(CourseTestCase): """ Base class for Studio tests that require orphaned ...
agpl-3.0
-301,997,989,622,962,700
42.790476
114
0.669204
false
zBMNForks/graphite-web
webapp/tests/test_storage.py
34
1383
import logging from graphite.storage import Store from django.conf import settings from django.test import TestCase # Silence logging during tests LOGGER = logging.getLogger() # logging.NullHandler is a python 2.7ism if hasattr(logging, "NullHandler"): LOGGER.addHandler(logging.NullHandler()) class StorageTes...
apache-2.0
-5,297,889,125,240,194,000
31.928571
87
0.678236
false
gavinandresen/bitcoin-git
qa/rpc-tests/getchaintips.py
101
2205
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the getchaintips API. We introduce a network split, work # on chains of different lengths, an...
mit
-5,874,657,404,396,146,000
34.564516
70
0.618594
false
CameronLonsdale/sec-tools
python2/lib/python2.7/site-packages/pip/_vendor/html5lib/_tokenizer.py
385
76580
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import unichr as chr from collections import deque from .constants import spaceCharacters from .constants import entities from .constants import asciiLetters, asciiUpper2Lower from .constants import digits, hexDigits, EOF from .c...
mit
5,114,314,706,089,042,000
43.497385
109
0.529303
false
simartin/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/android_webview.py
1
3825
from .base import require_arg from .base import get_timeout_multiplier # noqa: F401 from .chrome import executor_kwargs as chrome_executor_kwargs from .chrome_android import ChromeAndroidBrowserBase from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401 ...
mpl-2.0
4,554,100,334,446,729,000
42.465909
97
0.632157
false
Integral-Technology-Solutions/ConfigNOW
Lib/dumbdbm.py
4
4248
"""A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, space once o...
mit
923,222,966,603,874,400
27.702703
78
0.519068
false
koobonil/Boss2D
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/keras/python/keras/utils/generic_utils.py
21
10625
# 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...
mit
-4,840,637,424,776,162,000
30.067251
80
0.622776
false
yalp/fiware-orion
scripts/managedb/garbage-collector.py
12
3881
#!/usr/bin/python # -*- coding: latin-1 -*- # Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U # # This file is part of Orion Context Broker. # # Orion Context Broker 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 Fr...
agpl-3.0
-4,381,295,755,405,768,000
37.04902
100
0.604483
false
Anonymike/pasta-bot
plugins/_junk.py
3
9285
from util import hook, user, database import os import sys import re import json import time import subprocess # @hook.command(autohelp=False, permissions=["permissions_users"], adminonly=True) # def permissions(inp, bot=None, notice=None): # """permissions [group] -- lists the users and their permission level w...
gpl-3.0
3,346,684,342,997,001,000
32.763636
403
0.597307
false
codeforamerica/skillcamp
ENV/lib/python2.7/site-packages/setuptools/ssl_support.py
332
7663
import os import socket import atexit import re import pkg_resources from pkg_resources import ResolutionError, ExtractionError from setuptools.compat import urllib2 try: import ssl except ImportError: ssl = None __all__ = [ 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_available', 'cert_paths', 'op...
mit
7,073,828,417,901,418,000
31.747863
82
0.592196
false
phantomlinux/vaughn_aiy_raspberrypi
src/action.py
1
14088
# Copyright 2017 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 or agreed to in writing, ...
apache-2.0
-8,102,192,599,866,398,000
36.073684
146
0.60697
false
alvarolopez/nova
plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py
54
7407
#!/usr/bin/env python # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "...
apache-2.0
-156,587,064,218,959,680
32.977064
78
0.619684
false
ztianjin/jna
native/libffi/generate-osx-source-and-headers.py
100
5200
#!/usr/bin/env python import subprocess import re import os import errno import collections import sys class Platform(object): pass sdk_re = re.compile(r'.*-sdk ([a-zA-Z0-9.]*)') def sdkinfo(sdkname): ret = {} for line in subprocess.Popen(['xcodebuild', '-sdk', sdkname, '-version'], stdout=subprocess.PIP...
lgpl-2.1
-4,828,630,680,775,520,000
32.986928
112
0.536538
false
coderabhishek/scrapy
scrapy/utils/log.py
108
6012
# -*- coding: utf-8 -*- import sys import logging import warnings from logging.config import dictConfig from twisted.python.failure import Failure from twisted.python import log as twisted_log import scrapy from scrapy.settings import overridden_settings, Settings from scrapy.exceptions import ScrapyDeprecationWarni...
bsd-3-clause
3,704,174,574,180,508,700
31.497297
99
0.662841
false
sarvex/depot-tools
third_party/logilab/common/logging_ext.py
93
6975
# -*- coding: utf-8 -*- # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser Genera...
bsd-3-clause
8,370,586,293,973,365,000
34.769231
83
0.616631
false
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/ThirdParty/Twisted/twisted/tap/ftp.py
67
2002
# -*- test-case-name: twisted.test.test_ftp_options -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ I am the support module for making a ftp server with twistd. """ from twisted.application import internet from twisted.cred import portal, checkers, strcred from twisted.protocols impor...
gpl-3.0
2,855,521,591,296,898,600
28.014493
79
0.640859
false
rossjones/ScraperWikiX
web/codewiki/viewsrpc.py
1
14719
from django.template import RequestContext from django.http import HttpResponseRedirect, HttpResponse, HttpResponseNotFound, HttpResponseForbidden from django.template.loader import render_to_string from django.shortcuts import render_to_response from django.core.urlresolvers import reverse from django.views.decorators...
agpl-3.0
2,163,062,842,310,524,000
42.806548
211
0.630274
false
LinkCareServices/cairotft
docs/conf.py
1
8584
# -*- coding: utf-8 -*- # # Fitch documentation build configuration file, created by # sphinx-quickstart on Tue Jul 10 18:37:45 2012. # # 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 co...
bsd-3-clause
-4,289,442,062,764,914,700
31.515152
79
0.693267
false
KanoComputing/kano-profile
kano_profile/tracker/__init__.py
1
9447
# # __init__.py # # Copyright (C) 2014 - 2018 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2 # # Kano-tracker module # # A small module for tracking various metrics the users do in Kano OS # __author__ = 'Kano Computing Ltd.' __email__ = 'dev@kano.me' import time import atexit imp...
gpl-2.0
-717,632,270,318,076,000
26.949704
80
0.596803
false
miguelgrinberg/heat
heat/tests/api/openstack_v1/test_stacks.py
2
93167
# # 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 writing, software # ...
apache-2.0
-1,535,811,039,123,686,100
41.061851
79
0.520989
false
thequbit/yellr-server
yellr-serv/yellrserv/ep_client_assignment.py
1
2188
from pyramid.view import view_config import client_utils import utils @view_config(route_name='get_assignments.json') def get_assignments(request): result = {'success': False} status_code = 200 #try: if True: success, error_text, language_code, lat, lng, \ client = client_utils....
agpl-3.0
-8,832,418,995,809,838,000
23.043956
58
0.5617
false
jhsenjaliya/incubator-airflow
airflow/migrations/versions/64de9cddf6c9_add_task_fails_journal_table.py
59
1452
# # 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 writing, software # distributed under the ...
apache-2.0
-7,374,129,793,547,358,000
30.565217
74
0.700413
false
GeoffreyFrogeye/syncthing-gtk
syncthing_gtk/timermanager.py
2
1640
#!/usr/bin/env python2 """ Syncthing-GTK - Timer manager Simple abstract class for named, cancelable timers """ from __future__ import unicode_literals from gi.repository import GLib class TimerManager(object): def __init__(self): self._timers = {} def timer(self, name, delay, callback, *data, **kwdata): """...
gpl-2.0
8,937,110,810,102,361,000
25.451613
86
0.676829
false
scigghia/account-payment
__unported__/purchase_payment/__openerp__.py
4
2019
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010 Pexego S.L. (http://www.pexego.es) All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it und...
agpl-3.0
-1,617,378,283,571,020,800
36.388889
79
0.616147
false
raboof/supybot
src/utils/iter.py
14
5180
### # Copyright (c) 2002-2005, Jeremiah Fincher # 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 co...
bsd-3-clause
-5,058,259,824,459,064,000
29.116279
79
0.6139
false
boedy1996/SPARC
geonode/maps/urls.py
1
4070
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 versio...
gpl-3.0
-3,159,580,514,517,918,700
45.781609
97
0.37543
false
Endika/odoomrp-wip
quality_control_sale_stock/__openerp__.py
19
1562
# -*- 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
-860,217,897,303,152,100
35.325581
79
0.571703
false
PeterWangPo/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/feeders.py
121
4477
# 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
-3,685,260,596,144,805,400
44.683673
129
0.703373
false
wisdark/Empire
lib/stagers/osx/dylib.py
11
3528
from lib.common import helpers import os class Stager: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'dylib', 'Author': ['@xorrior'], 'Description': ('Generates a dylib.'), 'Comments': [ '' ] } ...
bsd-3-clause
3,498,324,674,440,841,700
36.136842
184
0.486111
false
apple/llvm-project
lldb/test/API/lang/c/set_values/TestSetValues.py
8
5017
"""Test settings and readings of program variables.""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class SetValuesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp()....
apache-2.0
4,376,658,706,758,031,400
35.093525
81
0.580626
false
duramato/CouchPotatoServer
libs/dateutil/parser.py
103
33736
# -*- coding:iso-8859-1 -*- """ Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard Python datetime module. """ from __future__ import unicode_literals __license__ = "Simplified BSD" import datetime import string import time import collections try: from...
gpl-3.0
4,849,568,721,540,897,000
36.195149
94
0.358312
false
rishigb/bro
remindMe/venv/lib/python2.7/site-packages/wheel/bdist_wheel.py
232
17441
""" Create a wheel (.whl) distribution. A wheel is a built archive format. """ import csv import hashlib import os import subprocess import warnings import shutil import json import wheel try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig i...
mit
-786,342,773,173,166,800
37.501104
106
0.559601
false
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/test/test_copy_reg.py
129
4256
import copy_reg import unittest from test import test_support from test.pickletester import ExtensionSaver class C: pass class WithoutSlots(object): pass class WithWeakref(object): __slots__ = ('__weakref__',) class WithPrivate(object): __slots__ = ('__spam',) class WithSingleString(object): ...
gpl-2.0
5,836,294,233,127,825,000
34.173554
77
0.566729
false
hortonworks/hortonworks-sandbox
desktop/core/ext-py/Twisted/doc/words/examples/xmpp_client.py
1
2125
# Copyright (c) 2001-2006 Twisted Matrix Laboratories. # See LICENSE for details. import sys from twisted.internet import reactor from twisted.names.srvconnect import SRVConnector from twisted.words.xish import domish from twisted.words.protocols.jabber import xmlstream, client, jid class XMPPClientConnector(SRVConn...
apache-2.0
-1,757,602,001,811,589,400
24.914634
76
0.658353
false
mattclay/ansible
test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py
13
14512
"""Sanity test to check integration test aliases.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import textwrap import os from ... import types as t from . import ( SanityVersionNeutral, SanityMessage, SanityFailure, SanitySuccess, SanityTa...
gpl-3.0
3,838,539,741,865,526,000
34.743842
156
0.582552
false
nevillehay/gbi-nevillehay
src/error.py
2
1775
#!/usr/local/bin/python # Copyright (c) 2011 GhostBSD # # See COPYING for licence terms. import gtk from subprocess import Popen lyrics = """ Please report to , and be sure to provide /tmp/.pc-sysinstall/pc-sysinstall.log. """ class PyApp: def on_reboot(self, widget): Popen('sudo reboot', shell=True) ...
bsd-3-clause
-6,885,649,683,964,739,000
28.583333
197
0.604507
false
DirtyPiece/dancestudio
Build/Tools/Python27/Lib/sgmllib.py
306
17884
"""A parser for SGML, using the derived class as a static DTD.""" # XXX This only supports those SGML features used by HTML. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are ...
mit
-6,998,580,800,550,058,000
31.339964
79
0.503019
false
SickGear/SickGear
lib/js2py/constructors/jsfunction.py
9
1399
from ..base import * try: from ..translators.translator import translate_js except: pass @Js def Function(): # convert arguments to python list of strings a = [e.to_string().value for e in arguments.to_list()] body = ';' args = () if len(a): body = '%s;' % a[-1] args = a[:-...
gpl-3.0
-547,553,859,711,474,100
25.903846
74
0.637598
false
agry/NGECore2
scripts/mobiles/dynamicgroups/dantooine_kunga.py
2
1024
# Spawn Group file created with PSWG Planetary Spawn Tool import sys from java.util import Vector from services.spawn import DynamicSpawnGroup from services.spawn import MobileTemplate def addDynamicGroup(core): dynamicGroup = DynamicSpawnGroup() mobileTemplates = Vector() mobileTemplates.add('kunga_clan_leader') ...
lgpl-3.0
-4,403,630,866,965,822,500
35.571429
67
0.81543
false
phobson/pycvc
setup.py
2
1510
# Setup script for the pycvc package # # Usage: python setup.py install # import os from setuptools import setup, find_packages DESCRIPTION = "pycvc: Analyze CVC stormwater data" LONG_DESCRIPTION = DESCRIPTION NAME = "pycvc" VERSION = "0.3.0" AUTHOR = "Paul Hobson (Geosyntec Consultants)" AUTHOR_EMAIL = "phobson@geosy...
bsd-3-clause
-4,860,293,613,332,010,000
27.490566
67
0.675497
false
xen0l/ansible
lib/ansible/modules/network/f5/bigip_hostname.py
14
7419
#!/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
-4,969,176,442,007,283,000
27.425287
91
0.628656
false
Dioptas/Dioptas
dioptas/controller/integration/ImageController.py
1
49794
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher (clemens.prescher@gmail.com) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany ...
gpl-3.0
661,299,400,228,834,300
44.973223
120
0.619655
false
DJMuggs/ansible-modules-extras
notification/campfire.py
8
4899
#!/usr/bin/python # -*- coding: utf-8 -*- DOCUMENTATION = ''' --- module: campfire version_added: "1.2" short_description: Send a message to Campfire description: - Send a message to Campfire. - Messages with newlines will result in a "Paste" message being sent. version_added: "1.2" options: subscription: ...
gpl-3.0
1,198,253,725,349,094,700
33.258741
73
0.545213
false
markwal/OctoPrint-ScreenSquish
setup.py
1
1331
# coding=utf-8 ######################################################################################################################## plugin_identifier = "ScreenSquish" plugin_package = "octoprint_%s" % plugin_identifier plugin_name = "OctoPrint-ScreenSquish" plugin_version = "0.4" plugin_description = "Scalable UI ...
agpl-3.0
-7,360,801,327,034,253,000
34.026316
120
0.631104
false
djenniex/CouchPotatoServer
libs/pyasn1/type/univ.py
74
44619
# ASN.1 "universal" data types import operator, sys, math from pyasn1.type import base, tag, constraint, namedtype, namedval, tagmap from pyasn1.codec.ber import eoo from pyasn1.compat import octets from pyasn1 import error # "Simple" ASN.1 types (yet incomplete) class Integer(base.AbstractSimpleAsn1Item): tagSet...
gpl-3.0
6,276,555,602,748,372,000
37.597751
105
0.548937
false
unreal666/outwiker
src/outwiker/pages/text/textpage.py
3
1215
# -*- coding: utf-8 -*- """ Необходимые классы для создания страниц с текстом """ from outwiker.core.tree import WikiPage from outwiker.pages.text.textpanel import TextPanel from outwiker.core.factory import PageFactory class TextWikiPage (WikiPage): """ Класс текстовых страниц """ def __init__(self...
gpl-3.0
-1,954,552,624,407,208,000
22.302326
74
0.651697
false
filippog/pysnmp
pysnmp/proto/secmod/rfc3414/auth/hmacmd5.py
4
3369
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # try: from hashlib import md5 except ImportError: import md5 md5 = md5.new from pyasn1.type import univ from pysnmp.proto.secmod.rfc3414.auth import base from pys...
bsd-3-clause
194,906,958,389,056,930
26.614754
74
0.5794
false
mongkok/defocus
defocus/users/migrations/0001_initial.py
1
2373
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-16 21:25 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alte...
mit
2,583,022,840,345,795,600
56.878049
266
0.636747
false
jjingrong/PONUS-1.2
venv/build/django/django/contrib/auth/management/commands/changepassword.py
76
2071
from __future__ import unicode_literals import getpass from optparse import make_option from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS from django.utils.encoding import force_str class Command(BaseCommand): ...
mit
-1,031,634,272,322,229,500
31.873016
103
0.598745
false
MjAbuz/watchdog
import/parse/voteview.py
3
1969
""" parse voteview partisanship data """ HOUSE_DAT = "../data/crawl/voteview/HL01110C21_PRES_BSSE.DAT" SENATE_DAT = "../data/crawl/voteview/SL01110C21_BSSE.dat" state_map = { #@@ import to state json as icpsr 41: 'AL', 81: 'AK', 61: 'AZ', 42: 'AR', 71: 'CA', 62: 'CO', 1: 'CT', 11: 'DE', 43: 'FL', 44: 'GA', 82: 'H...
agpl-3.0
-7,038,240,073,142,130,000
36.150943
86
0.485526
false
twiest/openshift-tools
ansible/roles/lib_zabbix/library/zbx_user.py
13
7263
#!/usr/bin/env python ''' ansible module for zabbix users ''' # vim: expandtab:tabstop=4:shiftwidth=4 # # Zabbix user ansible module # # # Copyright 2015 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
apache-2.0
-3,983,789,163,029,495,300
35.497487
94
0.571527
false
mubix/pth-toolkit
lib/python2.7/site-packages/samba/tests/samba_tool/ntacl.py
42
6329
# Unix SMB/CIFS implementation. # Copyright (C) Andrew Bartlett 2012 # # Based on user.py: # Copyright (C) Sean Dague <sdague@linux.vnet.ibm.com> 2011 # # 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 Found...
bsd-2-clause
5,131,043,824,513,855,000
45.881481
379
0.619055
false
chrislit/abydos
tests/distance/test_distance_baroni_urbani_buser_ii.py
1
7009
# Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
gpl-3.0
-7,501,122,559,139,735,000
40.229412
77
0.603795
false
h3biomed/ansible
test/units/plugins/lookup/test_manifold.py
38
27127
# (c) 2018, Arigato Machine Inc. # (c) 2018, 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 from units.compat import unittest from units.compat.mock import patch, call f...
gpl-3.0
6,783,216,871,838,835,000
49.610075
157
0.56265
false
schreiberx/sweet
benchmarks_sphere/galewsky_varying_varying_dt_and_tsm/benchmark_create_jobs.py
1
6312
#! /usr/bin/env python3 import os import sys import math import numpy as np from itertools import product from mule_local.JobGeneration import * from mule.JobParallelization import * from mule.JobParallelizationDimOptions import * p = JobGeneration() verbose = False #verbose = True ###############################...
mit
3,381,570,057,641,261,000
25.3
80
0.59379
false
lokirius/python-for-android
python-build/python-libs/gdata/src/gdata/youtube/service.py
141
57914
#!/usr/bin/python # # Copyright (C) 2008 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 ...
apache-2.0
8,379,104,848,166,723,000
36.124359
94
0.67191
false
ds-hwang/chromium-crosswalk
build/download_gold_plugin.py
19
1658
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script to download LLVM gold plugin from google storage.""" import find_depot_tools import json import os import shutil import subp...
bsd-3-clause
-3,897,716,713,393,981,400
32.836735
80
0.658022
false
ah-anssi/SecuML
SecuML/experiments/ExperimentFactory.py
1
1834
# SecuML # Copyright (C) 2016-2017 ANSSI # # SecuML is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # SecuML is distributed in the h...
gpl-2.0
6,305,072,350,794,199,000
35.68
86
0.633588
false
gabrieladt/kops-ec2-autoscaler
autoscaler/kube.py
1
13310
import datetime import json import logging from dateutil.parser import parse as dateutil_parse import pykube.exceptions import autoscaler.utils as utils logger = logging.getLogger(__name__) class KubePodStatus(object): RUNNING = 'Running' PENDING = 'Pending' CONTAINER_CREATING = 'ContainerCreating' ...
mit
4,107,491,487,797,331,000
37.137536
127
0.581518
false
AgostonSzepessy/servo
tests/wpt/css-tests/tools/runner/report.py
278
9660
import argparse import json import sys from cgi import escape from collections import defaultdict import types def html_escape(item, escape_quote=False): if isinstance(item, types.StringTypes): rv = escape(item) if escape_quote: rv = rv.replace('"', "&quot;") return rv els...
mpl-2.0
-7,210,168,331,505,407,000
30.16129
101
0.530021
false
zaccoz/odoo
addons/l10n_be_intrastat/__openerp__.py
257
1631
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
-2,219,014,505,261,441,500
36.930233
83
0.59534
false
qrkourier/ansible
lib/ansible/modules/system/sefcontext.py
56
7940
#!/usr/bin/python # (c) 2016, Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['...
gpl-3.0
5,549,401,864,826,840,000
30.137255
140
0.619395
false
jeffzheng1/tensorflow
tensorflow/contrib/learn/python/learn/dataframe/transforms/in_memory_source.py
82
6157
# 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
-174,137,666,437,107,840
33.016575
84
0.585025
false
zahodi/ansible
lib/ansible/utils/module_docs_fragments/dellos10.py
42
2591
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # Copyright (c) 2016 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licens...
gpl-3.0
-1,529,598,488,391,523,300
34.986111
80
0.708607
false
ceibal-tatu/software-center
tests/test_login_backend.py
3
1423
import os import unittest from tests.utils import ( setup_test_env, ) setup_test_env() from softwarecenter.backend.login import get_login_backend from softwarecenter.backend.login_impl.login_sso import ( LoginBackendDbusSSO) from softwarecenter.backend.login_impl.login_fake import ( LoginBackendDbusSSOFake...
lgpl-3.0
-1,117,801,081,300,315,900
33.707317
74
0.654252
false
Thraxis/SickRage
sickbeard/name_parser/parser.py
3
24350
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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...
gpl-3.0
-9,206,293,839,359,749,000
38.787582
190
0.547515
false
mgraupe/acq4
acq4/pyqtgraph/widgets/JoystickButton.py
52
2460
from ..Qt import QtGui, QtCore __all__ = ['JoystickButton'] class JoystickButton(QtGui.QPushButton): sigStateChanged = QtCore.Signal(object, object) ## self, state def __init__(self, parent=None): QtGui.QPushButton.__init__(self, parent) self.radius = 200 self.setCheckable(True)...
mit
-3,343,453,610,123,480,000
24.905263
67
0.511382
false
AnderEnder/ansible-modules-extras
web_infrastructure/jenkins_plugin.py
12
25559
#!/usr/bin/python # encoding: utf-8 # (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 Software Foundation, either version 3 of the License, or #...
gpl-3.0
2,062,749,394,826,865,700
29.793976
79
0.562581
false