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
aarsan/azure-quickstart-templates
hortonworks-on-centos/scripts/vm-bootstrap.py
89
53170
# # vm-bootstrap.py # # This script is used to prepare VMs launched via HDP Cluster Install Blade on Azure. # # Parameters passed from the bootstrap script invocation by the controller (shown in the parameter order). # Required parameters: # action: "bootstrap" to set up VM and initiate cluster deployment. "check" f...
mit
-6,374,576,150,531,086,000
23.718735
457
0.464623
false
c7zero/chipsec
chipsec/hal/uefi_common.py
5
76636
#!/usr/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2016, Intel Corporation # #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; Version 2. # #This program is distr...
gpl-2.0
-3,650,301,885,846,886,000
38.831601
958
0.594186
false
proppy/appengine-try-python-flask
lib/werkzeug/testapp.py
303
9398
# -*- coding: utf-8 -*- """ werkzeug.testapp ~~~~~~~~~~~~~~~~ Provide a small test application that can be used to test a WSGI server and check it for WSGI compliance. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ impo...
apache-2.0
4,733,074,001,145,304,000
39.86087
83
0.694084
false
jazkarta/edx-platform-for-isc
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py
8
33066
import copy import ddt import unittest from bson.objectid import ObjectId from mock import MagicMock, Mock, call from xmodule.modulestore.split_mongo.split import SplitBulkWriteMixin from xmodule.modulestore.split_mongo.mongo_connection import MongoConnection from opaque_keys.edx.locator import CourseLocator class T...
agpl-3.0
-314,310,144,678,326,900
47.412884
151
0.623934
false
sandeepdsouza93/TensorFlow-15712
tensorflow/python/client/timeline.py
19
23737
# 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,041,597,068,175,007,500
36.797771
80
0.638792
false
lokirius/python-for-android
python3-alpha/python3-src/Lib/plat-freebsd6/IN.py
172
12416
# Generated by h2py from /usr/include/netinet/in.h # Included from sys/cdefs.h __GNUCLIKE_ASM = 3 __GNUCLIKE_ASM = 2 __GNUCLIKE___TYPEOF = 1 __GNUCLIKE___OFFSETOF = 1 __GNUCLIKE___SECTION = 1 __GNUCLIKE_ATTRIBUTE_MODE_DI = 1 __GNUCLIKE_CTOR_SECTION_HANDLING = 1 __GNUCLIKE_BUILTIN_CONSTANT_P = 1 __GNUCLIKE_BUILTIN_VARA...
apache-2.0
-3,358,910,974,087,255,600
21.533575
78
0.712146
false
nikolas/lettuce
tests/integration/lib/Django-1.3/django/db/backends/sqlite3/creation.py
230
3239
import os import sys from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # SQLite doesn't actually support most of these types, but it "does the right # thing" given more verbose field definitions, so leave them as is so that # schema inspection is mor...
gpl-3.0
-6,223,007,115,119,767,000
45.271429
152
0.532263
false
dex4er/django
tests/servers/tests.py
49
5773
# -*- encoding: utf-8 -*- """ Tests for django.core.servers. """ from __future__ import unicode_literals import os import socket from django.core.exceptions import ImproperlyConfigured from django.test import LiveServerTestCase from django.test.utils import override_settings from django.utils.http import urlencode fr...
bsd-3-clause
4,208,929,201,095,253,500
31.05
78
0.633385
false
engdan77/edoAutoHomeMobile
twisted/internet/test/test_default.py
24
3539
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.default}. """ from __future__ import division, absolute_import import select, sys from twisted.trial.unittest import SynchronousTestCase from twisted.python.runtime import Platform from twisted.python.reflect imp...
mit
7,378,696,779,155,456,000
28.739496
78
0.636055
false
lshain-android-source/external-chromium_org
chrome/common/extensions/docs/server2/github_file_system_test.py
23
1750
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import sys import unittest from appengine_blobstore import AppEngineBlobstore from appengine_url_fetcher imp...
bsd-3-clause
-8,866,620,653,089,136,000
34
77
0.696
false
lancezlin/ml_template_py
lib/python2.7/site-packages/pip/_vendor/pyparsing.py
417
224171
# module pyparsing.py # # Copyright (c) 2003-2016 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, cop...
mit
5,633,321,703,883,262,000
38.355864
195
0.574191
false
xR86/Algo
FII-year3sem1-SI/hw1/exe3/key_manager.py
2
2576
#!/usr/bin/python2.7 from Crypto.Cipher import AES from Crypto import Random ''' key = 'Sixteen byte key' plain_text = 'Attack at dawn' iv = Random.new().read(AES.block_size) #if ECB, use PCKS#7 # append bytes to reach mod 16 boundary. # All padding bytes have the same value: the number of bytes that you are adding...
gpl-2.0
-3,831,906,174,181,155,000
25.556701
82
0.675466
false
wemanuel/smry
server-auth/ls/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/gcloud/sdktools/components/list.py
11
1866
# Copyright 2013 Google Inc. All Rights Reserved. """The command to list installed/available gcloud components.""" import textwrap from googlecloudsdk.calliope import base class List(base.Command): """List the status of all Cloud SDK components. List all packages and individual components in the Cloud SDK and...
apache-2.0
2,947,782,261,586,296,000
36.32
79
0.677921
false
ricardaw/pismdev
util/PISMNC.py
5
4793
#!/usr/bin/env python try: import netCDF4 as netCDF except: import netCDF3 as netCDF class PISMDataset(netCDF.Dataset): def create_time(self, use_bounds = False, length = None, units = None): self.createDimension('time', size = length) t_var = self.createVariable('time', 'f8', ('time',)) ...
gpl-2.0
-2,277,154,563,205,809,700
28.22561
107
0.528896
false
gauribhoite/personfinder
env/google_appengine/lib/django-1.5/django/contrib/markup/templatetags/markup.py
104
3499
""" Set of "markup" template filters for Django. These filters transform plain text markup syntaxes to HTML; currently there is support for: * Textile, which requires the PyTextile library available at http://loopcore.com/python-textile/ * Markdown, which requires the Python-markdown library from ...
apache-2.0
2,443,722,879,962,522,000
37.877778
130
0.671049
false
ElementsProject/elements
test/functional/test_framework/address.py
1
5297
#!/usr/bin/env python3 # Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Encode and decode Bitcoin addresses. - base58 P2PKH and P2SH addresses. - bech32 segwit v0 P2WPKH and ...
mit
4,043,977,744,047,502,300
33.620915
119
0.680951
false
mikey1234/script.module.urlresolver
lib/urlresolver/plugins/crunchyroll.py
3
3019
''' Crunchyroll urlresolver plugin Copyright (C) 2013 voinage 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 later version. This program is ...
gpl-2.0
-2,115,550,390,118,779,100
42.753623
162
0.659159
false
iRGBit/QGIS
python/plugins/processing/tests/TestData.py
38
2242
# -*- coding: utf-8 -*- """ *************************************************************************** TestData.py --------------------- Date : March 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *******************************...
gpl-2.0
-1,468,384,029,864,413,700
27.379747
75
0.528992
false
tersmitten/ansible
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py
52
14722
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
-4,661,822,859,126,856,000
35.261084
147
0.617172
false
megaprojectske/megaprojects.co.ke
megaprojects/articles/mixins.py
1
1028
# See: http://hunterford.me/django-custom-model-manager-chaining/ import models class ArticleManagerMixin(object): def published(self, status=True): if status: return self.filter(status=models.Article.STATUS_PUBLISHED) else: return self.filter(status=models.Article.STATUS_...
apache-2.0
-4,660,127,067,919,884,000
28.371429
97
0.697471
false
tryton-ar/padron_afip_ar
padron_afip.py
1
7151
#! -*- coding: utf8 -*- "Herramienta para procesar y consultar el Padrón Unico de Contribuyentes AFIP" # Documentación e información adicional: # http://www.sistemasagiles.com.ar/trac/wiki/PadronContribuyentesAFIP # Basado en pyafipws padron.py de Mariano Reingart from trytond.model import ModelView, ModelSQL, fie...
gpl-2.0
-3,779,821,436,722,222,600
36.208333
123
0.517077
false
ojengwa/oh-mainline
vendor/packages/docutils/test/test_readers/test_pep/test_rfc2822.py
19
6073
#! /usr/bin/env python # $Id: test_rfc2822.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for RFC-2822 headers in PEPs (readers/pep.py). """ from __init__ import DocutilsTestSupport def suite(): s = Doc...
agpl-3.0
-8,685,670,308,198,104,000
20.013841
84
0.428618
false
mitsuhiko/sentry
src/sentry/models/auditlogentry.py
1
9023
""" sentry.models.auditlogentry ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function from django.db import models from django.utils import timezone from sentry.db...
bsd-3-clause
-5,821,903,562,131,085,000
40.013636
105
0.62651
false
mday299/ardupilot
Tools/autotest/pysim/iris_ros.py
81
3622
#!/usr/bin/env python """ Python interface to euroc ROS multirotor simulator See https://pixhawk.org/dev/ros/sitl """ import time import mav_msgs.msg as mav_msgs import px4.msg as px4 import rosgraph_msgs.msg as rosgraph_msgs import rospy import sensor_msgs.msg as sensor_msgs from aircraft import Aircraft from rotma...
gpl-3.0
6,900,844,794,029,682,000
30.77193
122
0.5381
false
RedstonerServer/redstoner-utils
iptracker.py
1
4991
import mysqlhack import org.bukkit as bukkit import json from java.util import UUID as UUID from helpers import * from org.bukkit import * from traceback import format_exc as trace from iptracker_secrets import * iptrack_permission = "utils.iptrack" iptrack_version = "1.1.0" @hook.event("player.Player...
mit
-1,135,395,695,882,114,200
44.212963
386
0.527149
false
HeraclesHX/scikit-learn
sklearn/datasets/california_housing.py
198
3877
"""California housing dataset. The original database is available from StatLib http://lib.stat.cmu.edu/ The data contains 20,640 observations on 9 variables. This dataset contains the average house value as target variable and the following input variables (features): average income, housing average age, averag...
bsd-3-clause
8,812,969,799,177,565,000
29.769841
79
0.655662
false
elopio/snapcraft
snapcraft/cli/version.py
1
1079
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
gpl-3.0
-6,026,869,107,444,008,000
27.394737
79
0.719184
false
titom1986/CouchPotatoServer
libs/tmdb3/util.py
32
16758
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------- # Name: util.py Assorted utilities used in tmdb_api # Python Library # Author: Raymond Wagner #----------------------- from copy import copy from locales import get_locale from tmdb_auth import get_session class NameRepr(object): """Mixin ...
gpl-3.0
-5,477,990,303,396,749,000
40.583127
98
0.541055
false
tobegit3hub/deep_cnn
java_predict_client/src/main/proto/tensorflow/contrib/slim/python/slim/learning_test.py
9
31311
# 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 applicable ...
apache-2.0
-2,200,278,555,366,416,000
35.966942
80
0.65964
false
edry/edx-platform
lms/djangoapps/courseware/tests/test_word_cloud.py
134
8327
# -*- coding: utf-8 -*- """Word cloud integration tests using mongo modulestore.""" import json from operator import itemgetter from nose.plugins.attrib import attr from . import BaseTestXmodule from xmodule.x_module import STUDENT_VIEW @attr('shard_1') class TestWordCloud(BaseTestXmodule): """Integration test ...
agpl-3.0
-5,679,732,946,933,814,000
31.73622
109
0.519904
false
collinss/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py
1
27007
#!/usr/bin/python3 import sys import os import glob import gettext import time import traceback import locale import urllib.request as urllib from functools import cmp_to_key import unicodedata import config from setproctitle import setproctitle import gi gi.require_version('Gtk', '3.0') gi.require_version('XApp', '...
gpl-2.0
8,306,470,051,216,251,000
42.34992
211
0.565816
false
RPGOne/Skynet
scikit-learn-0.18.1/sklearn/linear_model/tests/test_ransac.py
52
17482
from scipy import sparse import numpy as np from scipy import sparse from numpy.testing import assert_equal, assert_raises from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_equal from sklearn.utils import check_random_state from sklearn.utils.testing import assert_raises_rege...
bsd-3-clause
-7,203,407,705,068,530,000
38.022321
80
0.601419
false
heeraj123/oh-mainline
vendor/packages/django-assets/django_assets/jinja2/extension.py
16
2628
from jinja2.ext import Extension from jinja2 import nodes from django_assets.conf import settings from django_assets.merge import process from django_assets.bundle import Bundle from django_assets import registry __all__ = ('assets',) class AssetsExtension(Extension): """ As opposed to the Djan...
agpl-3.0
6,206,610,526,919,973,000
33.540541
90
0.547565
false
meteorcloudy/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/cauchy_test.py
33
16857
# 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
401,326,081,878,705,400
37.486301
80
0.649938
false
kailIII/emaresa
aeroo/report_aeroo/barcode/EANBarCode.py
13
5228
# Copyright (c) 2009-2011 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> from tools import config, ustr fontsize = 15 """ This class generate EAN bar code, it required PIL (python imaging library) installed. If the code has not checksum (12 digits),...
agpl-3.0
-404,024,201,272,994,370
32.088608
115
0.555853
false
jmighion/ansible
lib/ansible/utils/listify.py
118
1462
# (c) 2014 Michael DeHaan, <michael@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 License, or # (at your option) any later ve...
gpl-3.0
8,600,727,670,485,132,000
34.658537
111
0.742134
false
dou800/php-buildpack-legacy
builds/runtimes/python-2.7.6/lib/python2.7/lib2to3/fixes/fix_types.py
304
1806
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for removing uses of the types module. These work for only the known names in the types module. The forms above can include types. or not. ie, It is assumed the module is imported either as: import type...
mit
4,309,489,426,129,548,000
28.129032
80
0.59247
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_status_code_count_py3.py
5
1325
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
7,454,663,260,480,810,000
31.317073
79
0.579623
false
adamhajari/spyre
tests/test_app.py
1
5046
# from spyre import server from spyre import server import matplotlib.pyplot as plt import numpy as np import pandas as pd from numpy import pi class TestApp(server.App): colors = [ {"label": "Green", "value": 'g'}, {"label": "Red", "value": 'r'}, {"label": "Blue", "value": 'b'}, ...
mit
-6,567,533,694,828,392,000
27.670455
80
0.442727
false
stargaser/astropy
astropy/table/info.py
3
7420
""" Table property for providing information about table. """ # Licensed under a 3-clause BSD style license - see LICENSE.rst import sys import os from contextlib import contextmanager from inspect import isclass import numpy as np from astropy.utils.data_info import DataInfo __all__ = ['table_info', 'TableInfo', 'se...
bsd-3-clause
-3,628,156,899,267,853,300
33.835681
87
0.61496
false
brion/cerbero
cerbero/build/recipe.py
1
15439
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
lgpl-2.1
1,701,697,816,719,793,200
34.738426
79
0.587344
false
kornicameister/ansible-modules-extras
monitoring/pagerduty_alert.py
121
7587
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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. ...
gpl-3.0
375,890,904,282,253,500
34.619718
323
0.62963
false
8u1a/plaso
plaso/cli/helpers/interface.py
3
1180
# -*- coding: utf-8 -*- """The arguments helper interface.""" class ArgumentsHelper(object): """The CLI arguments helper class.""" NAME = u'baseline' # Category further divides the registered helpers down after function, # this can be something like: analysis, output, storage, etc. CATEGORY = u'' DESCRIP...
apache-2.0
-137,777,931,685,640,900
30.891892
80
0.700847
false
HyperBaton/ansible
lib/ansible/modules/network/fortios/fortios_switch_controller_sflow.py
7
8728
#!/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
9,207,733,811,954,386,000
28.586441
107
0.626948
false
cmccoy/startreerenaissance
deploy/tag-instances.py
1
1583
#!/usr/bin/env python import argparse import logging import sys import boto def main(): p = argparse.ArgumentParser() p.add_argument('cluster_name') p.add_argument('--dry-run', action='store_true') a = p.parse_args() conn = boto.connect_ec2() active = [instance for res in conn.get_all_instan...
gpl-3.0
-3,601,361,887,801,866,000
30.039216
86
0.571699
false
vmturbo/nova
nova/policies/certificates.py
1
1520
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
apache-2.0
-4,966,163,898,688,920,000
28.230769
78
0.616447
false
coxmediagroup/googleads-python-lib
examples/dfp/v201505/custom_field_service/get_all_line_item_custom_fields.py
3
2324
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
4,080,584,490,278,728,000
31.277778
77
0.701377
false
cgarciabarrera/wazztrick
src/Examples/EchoClient.py
16
3147
''' Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
mit
-3,374,776,751,430,103,600
31.78125
86
0.745154
false
PepperPD/edx-pepper-platform
common/lib/xmodule/xmodule/modulestore/parsers.py
9
4058
import re # Prefix for the branch portion of a locator URL BRANCH_PREFIX = "/branch/" # Prefix for the block portion of a locator URL BLOCK_PREFIX = "/block/" # Prefix for the version portion of a locator URL, when it is preceded by a course ID VERSION_PREFIX = "/version/" # Prefix for version when it begins the URL (...
agpl-3.0
3,609,720,307,175,718,000
29.742424
106
0.653277
false
MER-GROUP/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/db/backends/spatialite/operations.py
282
14391
import re from decimal import Decimal from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter from django.contrib.gis.geometry.backend import G...
apache-2.0
4,610,522,336,507,093,500
40.956268
112
0.603085
false
albertrdixon/CouchPotatoServer
libs/html5lib/treewalkers/genshistream.py
1730
2278
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
gpl-3.0
8,256,999,951,376,887,000
32.014493
78
0.532924
false
sestrella/ansible
lib/ansible/modules/network/fortimanager/fmgr_provisioning.py
52
11458
#!/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
-5,808,844,923,420,064,000
30.391781
114
0.609705
false
TheBraveWarrior/pyload
module/plugins/hoster/LinkifierCom.py
5
2486
# -*- coding: utf-8 -*- import hashlib import pycurl from ..internal.MultiHoster import MultiHoster from ..internal.misc import json, seconds_to_midnight class LinkifierCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" __version__ = "0.02" __status__ = "testing" __pattern__ = r'^u...
gpl-3.0
8,166,874,974,870,715,000
39.096774
100
0.563154
false
max3903/SFLphone
daemon/libs/pjproject/tests/cdash/cfg_msvc.py
107
2726
# # cfg_msvc.py - MSVC/Visual Studio target configurator # # Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) # # 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 L...
gpl-3.0
-7,746,833,368,510,346,000
32.243902
79
0.558327
false
jjx02230808/project0223
benchmarks/bench_lasso.py
297
3305
""" Benchmarks of Lasso vs LassoLars First, we fix a training set and increase the number of samples. Then we plot the computation time as function of the number of samples. In the second benchmark, we increase the number of dimensions of the training set. Then we plot the computation time as function of the number o...
bsd-3-clause
-4,633,440,937,640,423,000
33.789474
84
0.566112
false
alvarogzp/telegram-bot
bot/bot.py
1
11029
import time from bot import project_info from bot.action.core.action import Action from bot.action.core.update import Update from bot.action.standard.about import VersionAction from bot.action.standard.admin.config_status import ConfigStatus from bot.action.util.textformat import FormattedText from bot.api.api import ...
agpl-3.0
3,241,992,567,601,851,000
38.530466
118
0.63324
false
jaggu303619/asylum-v2.0
openerp/addons/point_of_sale/report/pos_payment_report_user.py
62
3251
# -*- 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
4,060,957,367,438,055,400
49.796875
177
0.581052
false
Ruide/angr-dev
angr/angr/misc/autoimport.py
4
2072
import os import importlib import logging l = logging.getLogger('angr.misc.autoimport') def auto_import_packages(base_module, base_path, ignore_dirs=(), ignore_files=(), scan_modules=True): for lib_module_name in os.listdir(base_path): if lib_module_name in ignore_dirs: continue lib_p...
bsd-2-clause
5,928,540,721,124,063,000
38.09434
132
0.600386
false
Nu3001/external_chromium_org
chrome/browser/safe_browsing/safe_browsing_testserver.py
74
1483
#!/usr/bin/env python # Copyright 2013 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. """Wraps the upstream safebrowsing_test_server.py to run in Chrome tests.""" import os import sys BASE_DIR = os.path.dirname(os.path....
bsd-3-clause
4,451,859,953,441,034,000
35.170732
79
0.640593
false
antivirtel/Flexget
flexget/plugins/input/rottentomatoes_list.py
13
2974
from __future__ import unicode_literals, division, absolute_import import logging from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.cached_input import cached try: from flexget.plugins.api_rottentomatoes import lists except ImportError: raise...
mit
-2,264,749,738,912,225,300
36.64557
110
0.569603
false
zhujzhuo/Sahara
sahara/service/edp/oozie/workflow_creator/hive_workflow.py
14
1576
# Copyright (c) 2013 Mirantis 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 writ...
apache-2.0
-161,730,020,974,715,460
36.52381
76
0.667513
false
edbrannin/library-searcher-python
render_results.py
1
2109
import click from jinja2 import Environment, FileSystemLoader from model import * session = setup_sqlalchemy()() env = Environment(loader=FileSystemLoader(".")) template = env.get_template("results.html.j2") sql = """ select r.author, r.title, h.branch_name, h.collection_name, h.call_class, count(*) as...
mit
-2,486,035,145,565,878,300
20.96875
80
0.614035
false
esrf-emotion/emotion
emotion/task_utils.py
1
2961
import sys import types import gevent import signal import functools class cleanup: def __init__(self, *args, **keys): self.cleanup_funcs = args self.keys = keys def __enter__(self): pass def __exit__(self, exc_type, value, traceback): if self.cleanup_funcs: ...
gpl-2.0
-7,357,949,262,622,977,000
23.270492
91
0.530902
false
MaDKaTZe/phantomjs
src/qt/qtwebkit/Tools/gtk/gtkdoc.py
113
17832
# Copyright (C) 2011 Igalia S.L. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distribute...
bsd-3-clause
3,566,588,341,338,195,000
41.865385
110
0.57694
false
github-account-because-they-want-it/django-activity-stream
actstream/south_migrations/0006_auto__add_field_action_data.py
8
5977
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from actstream.compat import user_model_label class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Action.data' db.add_column('actstream_action', 'dat...
bsd-3-clause
-4,569,155,226,692,120,000
71.890244
204
0.565836
false
edx/edx-platform
common/djangoapps/student/role_helpers.py
5
1412
""" Helpers for student roles """ from openedx.core.djangoapps.django_comment_common.models import ( FORUM_ROLE_ADMINISTRATOR, FORUM_ROLE_COMMUNITY_TA, FORUM_ROLE_GROUP_MODERATOR, FORUM_ROLE_MODERATOR, Role ) from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseInstruc...
agpl-3.0
-2,067,997,800,688,518,700
34.3
115
0.708924
false
ernestask/meson
mesonbuild/backend/xcodebackend.py
2
40565
# Copyright 2014-2016 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
apache-2.0
1,277,606,074,454,850,800
46.5
273
0.546062
false
berfinsari/metricbeat
membeat/vendor/github.com/elastic/beats/packetbeat/tests/system/gen/memcache/mc.py
15
1393
from contextlib import (contextmanager) import argparse import sys import pylibmc def parse_args(args=None): p = argparse.ArgumentParser() p.add_argument('--protocol', '-p', default='text', help="choose protocol type. One of text or bin") p.add_argument('--remote', '-r', default='127....
gpl-3.0
2,342,726,615,677,904,000
21.836066
67
0.607322
false
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/pypy/lib-python/2.7/lib2to3/pgen2/driver.py
98
4694
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser driver. This provides a high-level interface to parse a file into a synta...
agpl-3.0
8,154,849,403,621,065,000
32.528571
76
0.549638
false
dragonfi/snowfall
pyglet-1.1.4/tests/font/ADD_FONT.py
12
1603
#!/usr/bin/env python '''Test that a font distributed with the application can be displayed. Four lines of text should be displayed, each in a different variant (bold/italic/regular) of Action Man at 24pt. The Action Man fonts are included in the test directory (tests/font) as action_man*.ttf. Press ESC to end the ...
mit
-7,036,868,276,115,667,000
29.826923
80
0.623206
false
stscieisenhamer/ginga
ginga/tkw/TkHelp.py
1
1380
# # TkHelp.py -- help module for Ginga Tk backend # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. class Timer(object): """Abstraction of a GUI-toolkit implemented timer.""" def __init__(self, ival_sec, expire_cb, data=None, tkcanvas=None): ...
bsd-3-clause
-5,126,402,470,867,204,000
29
71
0.575362
false
12019/cyberflex-shell
tests/utilstest.py
2
1220
"""Unit test for utils.py""" import utils import unittest class APDUCase1Tests(unittest.TestCase): def setUp(self): self.a4 = utils.C_APDU("\x00\xa4\x00\x00") def tearDown(self): del self.a4 def testCreation(self): self.assertEqual(0, self.a4.CLA) self.assert...
gpl-2.0
-3,415,213,007,315,696,600
24.957447
62
0.57459
false
thaumos/ansible
test/units/modules/network/slxos/test_slxos_interface.py
38
4938
# # (c) 2018 Extreme Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ans...
gpl-3.0
-7,293,324,537,941,211,000
30.858065
75
0.557716
false
Bismarrck/tensorflow
tensorflow/lite/experimental/examples/lstm/unidirectional_sequence_lstm_test.py
9
8637
# 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
3,389,040,249,005,102,600
37.048458
81
0.672224
false
partofthething/home-assistant
homeassistant/components/nissan_leaf/__init__.py
1
17730
"""Support for the Nissan Leaf Carwings/Nissan Connect API.""" import asyncio from datetime import datetime, timedelta import logging import sys from pycarwings2 import CarwingsError, Session import voluptuous as vol from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_USERNAME, HTTP_OK from homeassistant...
mit
-5,440,146,955,563,262,000
36.326316
87
0.58291
false
zhanghenry/stocks
django/conf/locale/sk/formats.py
115
1173
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'G:i' DATET...
bsd-3-clause
872,452,780,063,872,600
35.65625
77
0.590793
false
blckshrk/Weboob
weboob/tools/value.py
1
7675
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # 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...
agpl-3.0
1,109,137,606,076,457,300
31.112971
135
0.571205
false
seanwestfall/django
tests/contenttypes_tests/test_models.py
249
12059
from __future__ import unicode_literals import warnings from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.views import shortcut from django.contrib.sites.shortcuts import get_current_site from django.db.utils import IntegrityError, OperationalError, ProgrammingError from djan...
bsd-3-clause
6,557,368,015,281,206,000
40.582759
95
0.615557
false
saukrIppl/seahub
seahub/base/accounts.py
1
22247
# encoding: utf-8 from django import forms from django.core.mail import send_mail from django.utils import translation from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from seahub.au...
apache-2.0
-2,725,696,775,162,005,000
35.650741
113
0.578505
false
jredrejo/web2pyreactpoc
languages/zh.py
152
10080
# coding: utf8 { '!langcode!': 'zh-tw', '!langname!': '中文', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"', '%s %%{row} deleted': '已刪除 %s 筆', '%s %%{row} updated': '已更新 %s 筆', '%s s...
gpl-3.0
-6,285,118,582,899,288,000
34.480519
219
0.657516
false
wshallum/ansible
lib/ansible/compat/tests/unittest.py
375
1147
# (c) 2014, Toshio Kuratomi <tkuratomi@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 License, or # (at your option) any later...
gpl-3.0
-4,917,376,785,741,402,000
30.861111
73
0.724499
false
mozilla/treeherder
treeherder/etl/taskcluster_pulse/parse_route.py
2
1512
# Code imported from https://github.com/taskcluster/taskcluster/blob/32629c562f8d6f5a6b608a3141a8ee2e0984619f/services/treeherder/src/util/route_parser.js # A Taskcluster routing key will be in the form: # treeherder.<version>.<user/project>|<project>.<revision>.<pushLogId/pullRequestId> # [0] Routing key prefix used...
mpl-2.0
-8,495,469,707,879,713,000
35.878049
154
0.684524
false
jdreaver/vispy
vispy/visuals/shaders/compiler.py
20
7684
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division import re from ... import gloo class Compiler(object): """ Compiler is used to convert Function and Variable instances into rea...
bsd-3-clause
-2,992,703,531,778,196,000
34.247706
78
0.544768
false
RDXT/django-guardian
guardian/south_migrations/0002_auto__add_field_groupobjectpermission_object_pk__add_field_userobjectp.py
85
5650
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration from guardian.compat import user_model_label class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'GroupObjectPermission.object_pk' db.add_column('guardian_groupobjectpermission', 'object_pk', se...
bsd-2-clause
4,004,785,558,221,671,000
65.470588
182
0.578938
false
ed-/solum
solum/tests/deployer/handlers/test_noop.py
1
1963
# 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 agreed to in ...
apache-2.0
-4,476,960,257,940,762,600
37.490196
75
0.691798
false
jessie935513/omaha
plugins/update/generate_plugin_idls.py
67
3325
#!/usr/bin/python2.4 # # Copyright 2007-2009 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 ...
apache-2.0
7,466,912,736,280,997,000
27.663793
76
0.643308
false
imsparsh/python-for-android
python3-alpha/extra_modules/bs4/tests/test_tree.py
46
59853
# -*- coding: utf-8 -*- """Tests for Beautiful Soup's tree traversal methods. The tree traversal methods are the main advantage of using Beautiful Soup over just using a parser. Different parsers will build different Beautiful Soup trees given the same markup, but all Beautiful Soup trees can be traversed with the me...
apache-2.0
-2,534,676,821,109,609,000
37.361538
118
0.564384
false
darjeeling/django
tests/utils_tests/test_encoding.py
53
6599
import datetime import unittest from unittest import mock from urllib.parse import quote_plus from django.test import SimpleTestCase from django.utils.encoding import ( DjangoUnicodeDecodeError, escape_uri_path, filepath_to_uri, force_bytes, force_text, get_system_encoding, iri_to_uri, smart_bytes, smart_text,...
bsd-3-clause
5,188,043,730,174,004,000
38.920245
114
0.564315
false
colejohnson66/distorm
disOps/x86header.py
29
5884
# # x86header.py # # Copyright (C) 2009 Gil Dabah, http://ragestorm.net/disops/ # class OperandType: """ Types of possible operands in an opcode. Refer to the diStorm's documentation or diStorm's instructions.h for more explanation about every one of them. """ (NONE, IMM8, IMM16, IMM_FULL, IMM32,...
gpl-3.0
-7,681,699,246,151,668,000
21.821862
118
0.573929
false
chirilo/mozillians
vendor-local/src/mimeparse/setup.py
43
1807
# -*- coding: utf-8 -*- #old way from distutils.core import setup #new way #from setuptools import setup, find_packages setup(name='mimeparse', version='0.1.3', description='A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.', long_desc...
bsd-3-clause
2,163,356,957,297,469,400
40.022727
132
0.658726
false
pimier15/PyGUI
Kivy/Kivy/Bk_Interractive/Kivy-Interractive application/sample/Chapter_04_code/python3/08 - Behaviours - enhancing widget functionality/comicwidgets.py
22
1999
# File name: comicwidgets.py import kivy kivy.require('1.9.0') from kivy.uix.scatter import Scatter from kivy.graphics import Line class DraggableWidget(Scatter): def __init__(self, **kwargs): self.selected = None self.touched = False super(DraggableWidget, self).__init__(**kwargs) de...
mit
-5,905,939,070,889,005,000
31.241935
91
0.595298
false
jamiefolsom/edx-platform
common/lib/xmodule/xmodule/imageannotation_module.py
107
7163
""" Module for Image annotations using annotator. """ from lxml import etree from pkg_resources import resource_string from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from xblock.core import Scope, String from xmodule.annotator_mixin import get_instructions, html_to_text from xmodule....
agpl-3.0
502,868,566,008,465,660
43.216049
450
0.636605
false
andreshp/Algorithms
MachineLearning/Clustering/SingleLinkedClustering/SLClusteringDistance.py
1
12524
#!/usr/bin/python ###################################################################### # Autor: Andrés Herrera Poyatos # Universidad de Granada, March, 2015 # Single-Linkage Clustering Algorithm ####################################################################### # This program read the values asociated to the v...
gpl-2.0
4,601,940,508,247,455,000
32.663978
113
0.598738
false
IZSVenezie/VetEpiGIS-Stat
plugin/local_dialog.py
1
5920
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'local_dialog_base.ui' # # Created: Sat Jan 7 15:11:01 2017 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exc...
gpl-3.0
-3,711,803,308,895,401,000
51.389381
104
0.681588
false
luomiao/docker-volume-vsphere
esx_service/utils/auth_api.py
2
39067
# Copyright 2016 VMware, 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 a...
apache-2.0
-7,017,315,525,861,771,000
34.450998
129
0.64543
false
SpatialMetabolomics/SM_distributed
tests/test_imzml_txt_converter_db.py
2
1137
import numpy as np from unittest.mock import patch from sm.engine.ms_txt_converter import MsTxtConverter from sm.engine.util import SMConfig from sm.engine.tests.util import sm_config, ds_config @patch('sm.engine.ms_txt_converter.MsTxtConverter._parser_factory') def test_convert(MockImzMLParser, sm_config): mock...
apache-2.0
-4,899,548,670,970,884,000
39.607143
93
0.651715
false
EduPepperPD/pepper2013
cms/djangoapps/contentstore/tests/test_import_export.py
7
3135
""" Unit tests for course import and export """ import os import shutil import tarfile import tempfile import copy from uuid import uuid4 from pymongo import MongoClient from .utils import CourseTestCase from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.conf impor...
agpl-3.0
6,503,613,350,077,849,000
32.351064
82
0.571292
false
google-research/rigl
rigl/imagenet_resnet/utils.py
1
4331
# coding=utf-8 # Copyright 2021 RigL 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 applicable law or agree...
apache-2.0
-6,161,119,297,711,570,000
33.648
80
0.670977
false
dsajkl/reqiop
common/test/acceptance/pages/studio/container.py
9
14433
""" Container page in Studio """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise, EmptyPromise from . import BASE_URL from utils import click_css, confirm_prompt class ContainerPage(PageObject): """ Container page in Studio """ NAME_SELECTOR = '.page-header-title' ...
agpl-3.0
-6,662,962,624,902,506,000
34.202439
152
0.613802
false
aroche/django
django/template/context.py
105
9348
import warnings from contextlib import contextmanager from copy import copy from django.utils.deprecation import RemovedInDjango110Warning # Hard-coded processor for easier use of CSRF protection. _builtin_context_processors = ('django.template.context_processors.csrf',) _current_app_undefined = object() class Con...
bsd-3-clause
-717,145,767,156,255,500
31.915493
89
0.619384
false