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
fedral/ITK
Wrapping/Generators/Python/Tests/BinaryErodeImageFilter.py
19
1673
#!/usr/bin/env python #========================================================================== # # Copyright Insight Software Consortium # # 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 Licen...
apache-2.0
-1,586,508,986,531,938,800
28.350877
77
0.704722
false
2014c2g12/c2g12
wsgi/exts/w2/static/Brython2.0.0-20140209-164925/Lib/reprlib.py
923
5110
"""Redo the builtin repr() (representation) but with limits on most sizes.""" __all__ = ["Repr", "repr", "recursive_repr"] import builtins from itertools import islice try: from _thread import get_ident except ImportError: from _dummy_thread import get_ident def recursive_repr(fillvalue='...'): 'Decorato...
gpl-2.0
-7,938,004,207,631,271,000
31.547771
79
0.526614
false
timcera/mettoolbox
mettoolbox/pet.py
1
10467
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import warnings from typing import Optional, Union import numpy as np import pandas as pd import typic from solarpy import declination from tstoolbox import tsutils from . import meteolib, utils warnings.filterwarnings("ignore...
bsd-3-clause
-2,276,524,630,884,471,300
24.277778
87
0.587387
false
Teamxrtc/webrtc-streaming-node
third_party/depot_tools/third_party/logilab/common/optparser.py
92
3386
# -*- 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...
mit
-7,316,781,646,560,002,000
35.804348
90
0.630538
false
bob-the-hamster/commandergenius
project/jni/python/src/Lib/bsddb/dbrecio.py
203
5308
""" File-like objects that read from or write to a bsddb record. This implements (nearly) all stdio methods. f = DBRecIO(db, key, txn=None) f.close() # explicitly release resources held flag = f.isatty() # always false pos = f.tell() # get current position f.seek(pos) # set current position ...
lgpl-2.1
-5,446,701,761,817,104,000
26.936842
78
0.546722
false
eckucukoglu/arm-linux-gnueabihf
arm-linux-gnueabihf/libc/usr/lib/python2.7/unittest/test/test_break.py
105
9641
import gc import os import sys import signal import weakref from cStringIO import StringIO import unittest @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill") @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows") @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on f...
gpl-2.0
5,198,870,914,712,312,000
32.947183
79
0.625972
false
GaryBrittain/DB2S3
process.py
1
3210
import dropbox import sys from sqlsync import * from boto.s3.connection import S3Connection from boto.s3.key import Key import os from pushover import message import json if check_lock() == 1: print 'Database is locked or unreachable, quitting...' sys.exit() conn = S3Connection('', '') pb = conn.get_bucket('') a...
mit
8,403,771,263,856,615,000
25.75
149
0.643614
false
yongtang/tensorflow
tensorflow/python/distribute/cluster_resolver/tfconfig_cluster_resolver.py
14
6847
# 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 applicable ...
apache-2.0
-3,824,496,371,474,636,000
32.563725
90
0.672703
false
saydulk/horizon
openstack_dashboard/usage/views.py
32
4722
# 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 t...
apache-2.0
-7,567,539,970,578,892,000
41.160714
79
0.56925
false
krahman/BuildingMachineLearningSystemsWithPython
ch04/build_lda.py
1
2472
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License from __future__ import print_function try: import nltk.corpus except ImportError: print("nltk n...
mit
2,488,482,030,953,443,000
26.466667
73
0.676375
false
point97/hapifis
server/apps/survey/migrations/0069_auto__add_field_response_answer_number.py
1
15989
# -*- 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 field 'Response.answer_number' db.add_column(u'survey_response', 'answer_number', ...
gpl-3.0
8,509,431,234,108,823,000
83.603175
207
0.547439
false
nuagenetworks/vspk-python
vspk/v6/nuzfbrequest.py
1
35457
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
4,490,000,848,658,600,000
30.574354
296
0.581324
false
os2webscanner/os2webscanner
scrapy-webscanner/scanners/rules/regexrule.py
1
6057
# The contents of this file are subject to the Mozilla Public 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.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS"basis, #...
mpl-2.0
-2,763,163,922,065,293,000
37.826923
118
0.575698
false
magcius/dolphin
Tools/find-includes-cycles.py
157
2630
#! /usr/bin/env python ''' Run this script from Source/Core/ to find all the #include cycles. ''' import subprocess def get_local_includes_for(path): lines = open(path).read().split('\n') includes = [l.strip() for l in lines if l.strip().startswith('#include')] return [i.split()[1][1:-1] for i in include...
gpl-2.0
259,585,647,588,296,740
31.875
107
0.587452
false
stevelle/glance
glance/registry/api/v2/__init__.py
20
1125
# Copyright 2013 Red Hat, 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...
apache-2.0
4,267,301,022,425,531,400
31.142857
78
0.671111
false
bolkedebruin/airflow
airflow/providers/docker/example_dags/example_docker_swarm_operator.py
1
1606
# -*- 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
1,583,269,313,751,345,400
30.490196
79
0.704857
false
mezz64/home-assistant
homeassistant/components/rpi_pfio/binary_sensor.py
14
2527
"""Support for binary sensor using the PiFace Digital I/O module on a RPi.""" import voluptuous as vol from homeassistant.components import rpi_pfio from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME import homeassistant...
apache-2.0
2,840,896,854,696,157,700
30.5875
86
0.657697
false
geishatokyo-lightning/lightning
lightning_core/test/testvg.py
1
5533
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2011 Geisha Tokyo Entertainment, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including witho...
mit
349,963,908,923,093,100
37.423611
98
0.632207
false
glorizen/nupic
tests/integration/nupic/opf/opf_description_template_test/opf_description_template_test.py
12
10082
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
284,778,791,718,727,900
32.384106
80
0.621702
false
fdzh/shadowsocks
shadowsocks/crypto/openssl.py
1038
5414
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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,075,317,264,500,755,000
28.911602
77
0.597525
false
MattDevo/edk2
AppPkg/Applications/Python/Python-2.7.2/Lib/colorsys.py
75
3847
"""Conversion functions between RGB and other color systems. This modules provides two functions for each color system ABC: rgb_to_abc(r, g, b) --> a, b, c abc_to_rgb(a, b, c) --> r, g, b All inputs and outputs are triples of floats in the range [0.0...1.0] (with the exception of I and Q, which covers a ...
bsd-2-clause
8,328,727,964,265,440,000
22.660256
76
0.493371
false
srault95/netcall
examples/threading/server_threading_prefork.py
1
3725
#!/usr/bin/env python # vim: fileencoding=utf-8 et ts=4 sts=4 sw=4 tw=0 fdm=indent """ A simple RPC server that shows how to: * start several worker processes * use zmq proxy device to load balance requests to the workers * make each worker to serve multiple RPC services asynchronously using the Python Threading mu...
bsd-3-clause
4,683,893,067,149,815,000
30.302521
79
0.600537
false
flavoi/diventi
diventi/adventures/migrations/0017_auto_20200504_2229.py
1
1287
# Generated by Django 2.2.12 on 2020-05-04 20:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('adventures', '0016_auto_20200503_1924'), ] operations = [ migrations.RemoveField( model_name='...
apache-2.0
6,941,592,988,053,494,000
33.783784
169
0.614608
false
n3storm/django-dynamic-preferences
dynamic_preferences/models.py
1
4395
""" Preference models, queryset and managers that handle the logic for persisting preferences. """ from django.db import models from django.db.models.query import QuerySet from django.conf import settings from django.utils.functional import cached_property from dynamic_preferences import user_preferences_registry, gl...
bsd-3-clause
-5,948,715,740,910,205,000
28.695946
132
0.689647
false
nekulin/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/Demos/cerapi.py
17
7436
# A demo of the Windows CE Remote API # # This connects to a CE device, and interacts with it. import wincerapi import win32event import win32api import win32con import os import sys import getopt from repr import repr def DumpPythonRegistry(): try: h = wincerapi.CeRegOpenKeyEx(win32con.HKEY_LOCAL_MACHIN...
apache-2.0
-3,793,568,527,841,336,000
34.075472
182
0.617805
false
AnishShah/tensorflow
tensorflow/contrib/boosted_trees/lib/learner/batch/categorical_split_handler_test.py
2
22613
# 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
-7,559,824,180,958,474,000
37.853952
88
0.617079
false
dinghino/ecommerce_api
tests/test_pictures.py
2
7336
""" Test suite for PictureHandler and ItemPictureHandler """ from tests.test_case import TestCase import json from io import BytesIO import os import uuid import http.client as client from models import Item, Picture from tests import test_utils import utils EXPECTED_RESULTS = test_utils.RESULTS['pictures'] TEST_...
gpl-3.0
403,378,789,863,538,800
34.960784
79
0.605234
false
amagdas/eve
eve/tests/methods/delete.py
10
29272
from eve.tests import TestBase from eve.tests.utils import DummyEvent from eve.tests.test_settings import MONGO_DBNAME from eve import ETAG from bson import ObjectId from eve.utils import ParsedRequest import simplejson as json import copy from eve.methods.delete import deleteitem_internal class TestDelete(TestBase)...
bsd-3-clause
-8,660,333,842,002,928,000
39.48686
86
0.61827
false
mrucci/moto
moto/cloudwatch/models.py
3
3720
from moto.core import BaseBackend import boto.ec2.cloudwatch import datetime class Dimension(object): def __init__(self, name, value): self.name = name self.value = value class FakeAlarm(object): def __init__(self, name, comparison_operator, evaluation_periods, period, thres...
apache-2.0
-609,949,406,410,304,500
33.444444
104
0.625
false
robk5uj/invenio
modules/websubmit/lib/functions/Ask_For_Record_Details_Confirmation.py
35
5952
## This file is part of Invenio. ## Copyright (C) 2008, 2010, 2011 CERN. ## ## Invenio 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 versio...
gpl-2.0
-7,923,146,746,006,533,000
40.048276
80
0.598958
false
olhoneles/politicos
settings.py
1
1327
# -*- coding: utf-8 -*- # # Copyright (c) 2018, Marcelo Jorge Vieira <metal@alucinados.com> # # 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 License, or (at yo...
agpl-3.0
6,976,442,247,888,095,000
43.233333
79
0.740015
false
GheRivero/ansible
lib/ansible/modules/cloud/azure/azure_rm_acs.py
15
29357
#!/usr/bin/python # # Copyright (c) 2017 Julien Stroheker, <juliens@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
4,845,411,957,356,731,000
38.247326
135
0.600266
false
drmateo/ecto
test/benchmark/metrics.py
4
4501
#!/usr/bin/env python # # Copyright (c) 2011, Willow Garage, 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 # n...
bsd-3-clause
7,519,755,807,337,033,000
33.891473
96
0.688291
false
hpcugent/hanythingondemand
hod/subcommands/relabel.py
2
2618
#!/usr/bin/env python # # # Copyright 2009-2016 Ghent University # # This file is part of hanythingondemand # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), ...
gpl-2.0
-950,074,991,606,819,100
35.361111
119
0.694423
false
aferr/TemporalPartitioningMemCtl
src/arch/x86/isa/insts/general_purpose/flags/push_and_pop.py
90
2440
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
bsd-3-clause
-3,986,826,135,170,318,300
44.185185
72
0.772951
false
aaltinisik/OCBAltinkaya
addons/fetchmail/fetchmail.py
6
15874
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-3,146,645,553,006,914,600
48.145511
195
0.525702
false
gnuhub/intellij-community
python/lib/Lib/site-packages/django/utils/autoreload.py
135
4239
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
apache-2.0
898,659,058,366,997,100
34.621849
107
0.664308
false
anomitra/articleScraper
PyQt-gpl-5.4.1/examples/widgets/stylesheet/stylesheeteditor.py
3
4557
############################################################################# ## ## Copyright (C) 2010 Hans-Peter Jansen <hpj@urpla.net>. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE:BSD$ ## You may ...
gpl-2.0
5,889,234,866,323,355,000
38.626087
77
0.667983
false
nebril/fuel-web
nailgun/nailgun/openstack/common/timeutils.py
16
5967
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
apache-2.0
-4,972,100,476,774,550,000
29.28934
78
0.652589
false
molobrakos/home-assistant
homeassistant/components/fints/sensor.py
7
9289
"""Read the balance of your bank accounts via FinTS.""" from collections import namedtuple from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_USERNAME, CONF_PIN, CONF_URL, CONF_NAME import homeassistan...
apache-2.0
-8,379,134,397,970,261,000
31.823322
78
0.616859
false
irwinlove/django
django/template/__init__.py
198
2022
""" Django's support for templates. The django.template namespace contains two independent subsystems: 1. Multiple Template Engines: support for pluggable template backends, built-in backends and backend-independent APIs 2. Django Template Language: Django's own template engine, including its built-in loaders, ...
bsd-3-clause
8,233,015,189,121,580,000
27.478873
89
0.705242
false
lawl/pmbootstrap
pmb/aportgen/linux.py
2
4781
""" Copyright 2017 Oliver Smith This file is part of pmbootstrap. pmbootstrap 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. pmbootstrap ...
gpl-3.0
-4,634,088,153,215,434,000
35.776923
107
0.560552
false
a-b/PopClip-Extensions
source/InstantTranslate/requests/packages/chardet/gb2312prober.py
2994
1681
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
8,072,512,576,601,159,000
40
69
0.718025
false
stevenmizuno/QGIS
python/user.py
7
4676
# -*- coding: utf-8 -*- """ *************************************************************************** user.py --------------------- Date : January 2015 Copyright : (C) 2015 by Nathan Woodrow Email : woodrow dot nathan at gmail dot com ********************...
gpl-2.0
-5,102,627,090,604,626,000
36.709677
116
0.605004
false
heidtn/PyDataLearn
PyDataLearn/NeuralNet.py
1
6181
from math import tanh from pysqlite2 import dbapi2 as sqlite def dtanh(y): #this effectively creates a smaller change multiplier when the value is closest to 0 (when the slope is steepest) P_D controller? return 1.0-y*y class SearchNet: def __init__(self, dbname): self.con = sqlite.connect(dbname) def __del__(...
mit
-4,046,923,939,482,413,000
36.011976
130
0.695195
false
dfdx2/ancfinder
scripts/update_311.py
1
2533
import datetime, json, urllib2, os, errno, requests # Open/create file, deleting info already in it so that we can make fresh info file_name = open('data/311.json', 'w') issues = [] working = {'issues':issues} data = {} # Get date in the past to start start_date = (datetime.datetime.today() + datetime.timedelta(-180...
cc0-1.0
4,926,069,178,004,750,000
35.185714
134
0.562179
false
aveshagarwal/openshift-ansible
roles/lib_openshift/src/lib/storageclass.py
18
3122
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class StorageClassConfig(object): ''' Handle service options ''' # pylint: disable=too-many-arguments def __init__(self, name, provisioner, parameters=None, ...
apache-2.0
-6,098,967,058,869,367,000
32.934783
100
0.607944
false
izpack/izpack
izpack-wrapper/src/main/resources/utils/wrappers/izpack2jnlp/setup.py
26
1070
#!/usr/bin/env python # ........................................................................... # # # IzPack - Copyright 2008 Julien Ponge, All Rights Reserved. # # http://izpack.org/ # http://izpack.codehaus.org/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
apache-2.0
2,066,892,054,722,120,400
33.666667
79
0.58972
false
bbc/kamaelia
Code/Python/Kamaelia/Kamaelia/Apps/Compose/GUI/ArgumentsPanel.py
6
6027
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
apache-2.0
2,363,039,460,338,130,000
36.90566
115
0.51767
false
NoahFlowa/glowing-spoon
forms.py
2
1139
from flask_wtf import Form from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import DataRequired, Email, Length class SignupForm(Form): first_name = StringField('First name', validators=[DataRequired("Please enter your first name.")]) last_name = StringField('Last name', validato...
apache-2.0
-1,769,809,363,986,679,800
59
159
0.75417
false
tangfeng1/flask
flask/helpers.py
133
36499
# -*- coding: utf-8 -*- """ flask.helpers ~~~~~~~~~~~~~ Implements various helpers. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys import pkgutil import posixpath import mimetypes from time import time from zlib import adler32 from th...
bsd-3-clause
6,769,140,311,341,379,000
39.554444
85
0.628264
false
AlphaX2/FotoShareN9
1.6.1/fotoshare/opt/FotoShareN9/plugins/flickr/libs/flickrapi/reportinghttp.py
10
2712
# -*- encoding: utf-8 -*- '''HTTPHandler that supports a callback method for progress reports. ''' import urllib2 import httplib import logging __all__ = ['urlopen'] logging.basicConfig() LOG = logging.getLogger(__name__) progress_callback = None class ReportingSocket(object): '''Wrapper around a socket. Give...
gpl-3.0
4,877,104,695,099,435,000
25.588235
69
0.610988
false
CyrilPeponnet/Archipel
ArchipelAgent/archipel-agent-vmparking/setup.py
4
3362
# # setup.py # # Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu> # 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 # License, or (at your option...
agpl-3.0
8,921,930,473,874,930,000
40.506173
84
0.640988
false
pantaloons/4charm
libvpx/tools/intersect-diffs.py
98
2364
#!/usr/bin/env python ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. ## ## Use of this source code is governed by a BSD-style license ## that can be found in the LICENSE file in the root of the source ## tree. An additional intellectual property rights grant can be found ## in the file PATENT...
mit
4,926,596,401,171,371,000
30.105263
79
0.619289
false
SatelliteQE/robottelo
tests/foreman/api/test_hostcollection.py
1
14844
"""Unit tests for host collections. :Requirement: Hostcollection :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: HostCollections :Assignee: swadeley :TestType: Functional :CaseImportance: High :Upstream: No """ from random import choice from random import randint import pytest from broker imp...
gpl-3.0
-7,841,114,450,710,041,000
31.060475
100
0.699542
false
druids/django-chamber
setup.py
1
1138
from setuptools import setup, find_packages from chamber.version import get_version setup( name='django-chamber', version=get_version(), description='Utilities library meant as a complement to django-is-core.', author='Lubos Matl, Oskar Hollmann', author_email='matllubos@gmail.com, oskar@hollmann...
bsd-3-clause
-6,346,957,805,061,011,000
31.514286
89
0.615114
false
rgom/Pydev
plugins/org.python.pydev.jython/Lib/cmd.py
145
15026
"""A generic class to build line-oriented command interpreters. Interpreters constructed with this class obey the following conventions: 1. End of file on input is processed as the command 'EOF'. 2. A command is parsed out of each line by collecting the prefix composed of characters in the identchars member. 3. A ...
epl-1.0
2,622,969,642,988,453,400
36.193069
79
0.554239
false
Jhaefner/PressureDrop
master_example.py
1
2607
""" @author: Jonah Haefner and Lane Carasik Title: master_example.py The purpose of this script is to ensure the four functions included in this package are functioning properly and as an example of use for the user. It currently only provides checks for the inline geometry with the fluid at a Reynolds number ...
mit
-4,553,694,799,183,054,000
43.736842
148
0.703874
false
krkhan/azure-linux-extensions
OSPatching/test/FakePatching3.py
8
1623
#!/usr/bin/python # # Copyright 2014 Microsoft Corporation # # 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,190,143,803,900,370,000
27.982143
78
0.635243
false
hehongliang/tensorflow
tensorflow/contrib/specs/python/summaries_test.py
25
3070
# 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,874,759,165,899,760,000
35.547619
80
0.661564
false
markYoungH/chromium.src
third_party/closure_linter/closure_linter/not_strict_test.py
129
2318
#!/usr/bin/env python # # Copyright 2011 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,590,271,656,067,317,000
30.324324
75
0.680759
false
gertingold/scipy
benchmarks/benchmarks/go_benchmark_functions/go_funcs_Y.py
47
2514
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from numpy import abs, sum, cos, pi from .go_benchmark import Benchmark class YaoLiu04(Benchmark): r""" Yao-Liu 4 objective function. This class defines the Yao-Liu function 4 [1]_ global optimization problem. This...
bsd-3-clause
-3,328,109,869,316,967,400
28.232558
84
0.57677
false
achals/servo
tests/wpt/web-platform-tests/tools/py/py/_path/local.py
171
32118
""" local path implementation. """ from __future__ import with_statement from contextlib import contextmanager import sys, os, re, atexit, io import py from py._path import common from py._path.common import iswin32 from stat import S_ISLNK, S_ISDIR, S_ISREG from os.path import abspath, normpath, isabs, exists, isdir...
mpl-2.0
-6,434,963,838,657,129,000
34.255763
88
0.517654
false
carolinux/QGIS
scripts/mkuidefaults.py
23
1400
from PyQt4.QtCore import QCoreApplication, QSettings def chunks(l, n): for i in xrange(0, len(l), n): yield l[i:i+n] QCoreApplication.setOrganizationName( "QGIS" ) QCoreApplication.setOrganizationDomain( "qgis.org" ) QCoreApplication.setApplicationName( "QGIS2" ) s = QSettings() ba = s.value...
gpl-2.0
7,778,649,341,955,544,000
30.111111
114
0.616429
false
pinterest/pinball
tests/pinball/master/master_handler_test.py
6
3216
# Copyright 2015, Pinterest, 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
6,024,022,944,879,980,000
35.545455
76
0.689988
false
isandlaTech/cohorte-runtime
python/src/lib/python/unidecode/x057.py
252
4631
data = ( 'Guo ', # 0x00 'Yin ', # 0x01 'Hun ', # 0x02 'Pu ', # 0x03 'Yu ', # 0x04 'Han ', # 0x05 'Yuan ', # 0x06 'Lun ', # 0x07 'Quan ', # 0x08 'Yu ', # 0x09 'Qing ', # 0x0a 'Guo ', # 0x0b 'Chuan ', # 0x0c 'Wei ', # 0x0d 'Yuan ', # 0x0e 'Quan ', # 0x0f 'Ku ', # 0x10 'F...
apache-2.0
6,737,367,888,080,055,000
16.949612
20
0.389117
false
akashsinghal/Speech-Memorization-App
Python_Backend/env/lib/python3.6/site-packages/pip/utils/packaging.py
343
2080
from __future__ import absolute_import from email.parser import FeedParser import logging import sys from pip._vendor.packaging import specifiers from pip._vendor.packaging import version from pip._vendor import pkg_resources from pip import exceptions logger = logging.getLogger(__name__) def check_requires_pyth...
apache-2.0
219,264,717,010,636,830
32.015873
77
0.666827
false
nickanderson/ansible
lib/ansible/inventory/ini.py
25
7628
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
2,175,336,850,531,327,700
36.392157
102
0.510881
false
matteoalessiocarrara/HTML-Facebook-API
src/lib/fbwrapper/src/lib/bot_virtualbrowser/src/lib/human/src/requests2.py
6
2370
#!/usr/bin/python2 # -*- coding: utf-8 -*- # # Copyright 2015 - 2016 Matteo Alessio Carrara <sw.matteoac@gmail.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 ...
gpl-2.0
-9,117,452,735,417,555,000
28.962025
131
0.705957
false
UTSA-ICS/keystone-kerberos
keystone/credential/backends/sql.py
15
3846
# Copyright 2013 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 or agreed to in...
apache-2.0
3,235,210,525,702,219,300
35.980769
75
0.639626
false
topic2k/EventGhost
_build/builder/__init__.py
1
7152
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2019 EventGhost Project <http://www.eventghost.org/> # # EventGhost 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-2.0
-2,435,615,217,317,113,000
30.641593
80
0.549154
false
wolverineav/neutron
neutron/tests/unit/agent/common/test_ovs_lib.py
3
39120
# Copyright 2012, VMware, 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 agre...
apache-2.0
1,059,533,844,783,685,100
41.155172
79
0.547393
false
Ken69267/config-stuff
.vim/eclim/autoload/eclim/python/rope/base/oi/objectinfo.py
115
8767
import warnings from rope.base import exceptions, resourceobserver from rope.base.oi import objectdb, memorydb, transform class ObjectInfoManager(object): """Stores object information It uses an instance of `objectdb.ObjectDB` for storing information. """ def __init__(self, project): s...
mit
-5,783,436,503,925,363,000
36.788793
77
0.58994
false
AntidoteLabs/Antidote-DM
Antidotes DM/youtube_dl/extractor/footyroom.py
13
1647
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class FootyRoomIE(InfoExtractor): _VALID_URL = r'http://footyroom\.com/(?P<id>[^/]+)' _TESTS = [{ 'url': 'http://footyroom.com/schalke-04-0-2-real-madrid-2015-02/', 'info_dict': { 'id': 'scha...
gpl-2.0
-7,329,513,082,234,937,000
31.86
81
0.530736
false
FeMTTU/femus
external/jsoncpp/jsoncpp-src-0.5.0/test/rununittests.py
249
2507
import sys import os import os.path import subprocess from glob import glob import optparse VALGRIND_CMD = 'valgrind --tool=memcheck --leak-check=yes --undef-value-errors=yes' class TestProxy(object): def __init__( self, test_exe_path, use_valgrind=False ): self.test_exe_path = os.path.normpath( os.path.a...
lgpl-2.1
5,270,087,245,698,930,000
33.342466
91
0.603111
false
xutian/virt-test
virttest/libvirt_xml/nwfilter_protocols/ah_ipv6.py
26
5826
""" ah-ipv6 protocl support class(es) http://libvirt.org/formatnwfilter.html#nwfelemsRulesProtoMiscv6 """ from virttest.libvirt_xml import accessors, xcepts from virttest.libvirt_xml.nwfilter_protocols import base class Ah_ipv6(base.TypedDeviceBase): """ Create new Ah_ipv6 xml instances Properties: ...
gpl-2.0
6,297,954,871,406,577,000
44.874016
86
0.555784
false
olafhauk/mne-python
mne/datasets/__init__.py
6
1103
"""Functions for fetching remote datasets. See :ref:`datasets` for more information. """ from . import fieldtrip_cmc from . import brainstorm from . import visual_92_categories from . import kiloword from . import eegbci from . import hf_sef from . import misc from . import mtrf from . import sample from . import som...
bsd-3-clause
710,153,336,659,270,500
28.810811
79
0.703536
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdeui/KButtonGroup.py
1
1093
# encoding: utf-8 # module PyKDE4.kdeui # from /usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyKDE4.kdecore as __PyKDE4_kdecore import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtGui as __PyQt4_QtGui import PyQt4.QtSvg as __PyQt4_QtSvg cl...
gpl-2.0
-3,835,212,938,206,663,000
24.418605
82
0.654163
false
Intel-tensorflow/tensorflow
tensorflow/python/ops/ctc_ops.py
6
57164
# 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
-1,484,289,627,133,780,500
37.993179
80
0.662322
false
schmidtc/pysal
pysal/spreg/diagnostics.py
6
35451
""" Diagnostics for regression estimations. """ __author__ = "Luc Anselin luc.anselin@asu.edu, Nicholas Malizia nicholas.malizia@asu.edu " import pysal from pysal.common import * import scipy.sparse as SP from math import sqrt from utils import spmultiply, sphstack, spmin, spmax __all__ = [ "f_stat", "...
bsd-3-clause
-1,719,425,724,766,710,800
25.396873
181
0.546416
false
olologin/scikit-learn
examples/linear_model/plot_sgd_iris.py
286
2202
""" ======================================== Plot multi-class SGD on the iris dataset ======================================== Plot decision surface of multi-class SGD on iris dataset. The hyperplanes corresponding to the three one-versus-all (OVA) classifiers are represented by the dashed lines. """ print(__doc__) ...
bsd-3-clause
-297,516,978,173,786,430
26.525
75
0.620345
false
qvit/django-color-captcha
color_captcha/utils.py
1
1095
# -*- coding: utf-8 -*- class IncorrectCaptchaColorsFormatError(Exception): message = "Incorrect 'CAPTCHA_COLORS' setting format (must be iterable of two-string-value tuples)" def __str__(self): return self.message class TooFewCaptchaColorsError(Exception): message = "Please specify al least tw...
mit
5,993,354,313,832,439,000
27.815789
103
0.624658
false
salabim/salabim
test/test_componentgenerator.py
1
4345
import salabim as sim import pytest class X(sim.Component): def setup(self, color='red'): self.color = color self.enter(components) class Vehicle(sim.Component): def setup(self): self.enter(components) class Car(Vehicle): pass class Bus(Vehicle): pass cla...
mit
-4,639,386,344,932,780,000
33.76
101
0.625547
false
imatge-upc/unsupervised-2017-cvprw
autoencoder_train.py
1
7127
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='1' from os import listdir import sys import time import tools.ops import subprocess import numpy as np import tensorflow as tf import scipy.misc as sm from models.autoencoder_net import * from tools.utilities import * from tools.ops import * from random import randint ...
mit
-5,307,854,796,434,053,000
30.816964
104
0.664515
false
pichillilorenzo/JavaScriptEnhancements
src/libs/__init__.py
1
1423
from . import global_vars from .javascript_enhancements_settings import javaScriptEnhancements from . import util from .node import NodeJS from .npm import NPM from .flow import main as flow from .flow.flow_cli import FlowCLI from .flow.flow_ide_server import FlowIDEServer, flow_ide_clients, JavascriptEnhancementsStart...
mit
8,745,076,949,346,265,000
31.340909
151
0.804638
false
ESOedX/edx-platform
lms/djangoapps/commerce/tests/test_signals.py
1
13844
# coding=UTF-8 """ Tests for signal handling in commerce djangoapp. """ from __future__ import absolute_import, unicode_literals import base64 import json import ddt import httpretty import mock from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.test import TestCase from...
agpl-3.0
-3,551,410,567,111,405,000
41.457055
119
0.65306
false
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/encodings/punycode.py
586
6813
# -*- coding: iso-8859-1 -*- """ Codec for the Punicode encoding, as specified in RFC 3492 Written by Martin v. Löwis. """ import codecs ##################### Encoding ##################################### def segregate(str): """3.1 Basic code point segregation""" base = [] extended = {} for c in st...
gpl-2.0
5,143,402,574,014,110,000
27.62605
74
0.552033
false
groschovskiy/keyczar
cpp/src/tools/swtoolkit/test/help_test.py
18
2153
#!/usr/bin/python2.4 # Copyright 2009, 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...
apache-2.0
1,675,598,016,119,672,600
34.883333
75
0.741291
false
erdc-cm/air-water-vv
2d/floatingStructures/floating_caisson_chrono/redist_n.py
12
3054
from proteus.default_n import * from proteus import (StepControl, TimeIntegration, NonlinearSolvers, LinearSolvers, LinearAlgebraTools, NumericalFlux) from proteus.mprans import RDLS import redist_p as physics from ...
mit
4,571,420,932,611,224,600
30.8125
88
0.714473
false
ishanic/scikit-learn
sklearn/manifold/tests/test_t_sne.py
162
9771
import sys from sklearn.externals.six.moves import cStringIO as StringIO import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_raises_regexp ...
bsd-3-clause
-2,494,690,223,185,617,400
34.791209
79
0.631767
false
adamreis/nyc-jazz
src/lib/werkzeug/testsuite/multipart/collect.py
78
1584
#!/usr/bin/env python """ Hacky helper application to collect form data. """ from werkzeug.serving import run_simple from werkzeug.wrappers import Request, Response def copy_stream(request): from os import mkdir from time import time folder = 'request-%d' % time() mkdir(folder) environ = request.e...
mit
-1,148,820,576,218,409,100
27.285714
76
0.636364
false
mikhail-gorobets/chipsec
chipsec/modules/tools/smm/smm_ptr.py
8
24962
#CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2015, 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 distributed in the hope...
gpl-2.0
3,814,541,026,084,775,000
47.469903
182
0.557367
false
afaheem88/rally
tests/unit/plugins/openstack/scenarios/sahara/test_node_group_templates.py
12
3700
# Copyright 2014: 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
-6,835,626,747,357,833,000
42.023256
78
0.627027
false
flingone/frameworks_base_cmds_remoted
libs/boost/libs/python/pyste/src/Pyste/infos.py
13
9212
# Copyright Bruno da Silva de Oliveira 2003. Use, modification and # distribution is subject to the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import os.path import copy import exporters from ClassExporter import ClassExpo...
apache-2.0
-8,874,559,424,288,964,000
33.567568
90
0.499566
false
aerickson/ansible
lib/ansible/modules/network/nxos/_nxos_mtu.py
59
11681
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
-6,297,521,848,106,136,000
29.578534
94
0.582912
false
grpc/grpc
src/python/grpcio/support.py
10
4388
# Copyright 2016 gRPC 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 agreed to in writing...
apache-2.0
1,985,814,918,368,222,200
36.186441
85
0.672288
false
loco-odoo/localizacion_co
openerp/addons-extra/print_receipt/reports/account_cheque_bancolombia.py
3
1068
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp import pooler class account_voucher(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(account_voucher, self).__init__(cr, uid, name, context=context) self.localcontext.update({ ...
agpl-3.0
-3,243,311,462,761,863,700
37.142857
96
0.571161
false
dbarbier/privot-doc
src/UseCasesGuide/script_WhiteNoise.py
1
1386
from openturns import * # Time grid over which all the processes will be defined nt = 100 timeGrid = RegularGrid(0.0, 1.0, nt) # Definition of the distribution sigma = 1.0 myDistribution = Normal(0., sigma) # Definition of the process myProcess = WhiteNoise(myDistribution, timeGrid) # We get a realization of the w...
lgpl-2.1
2,781,032,347,835,453,400
29.8
95
0.777056
false
AdrianGaudebert/elmo
vendor-local/lib/python/south/management/commands/datamigration.py
10
4665
""" Data migration creation command """ from __future__ import print_function import sys import os import re from optparse import make_option try: set except NameError: from sets import Set as set from django.core.management.base import BaseCommand from django.core.management.color import no_style from djan...
mpl-2.0
-2,866,289,819,673,576,400
35.445313
128
0.620579
false
ehashman/oh-mainline
vendor/packages/sqlparse/tests/test_parse.py
16
6668
# -*- coding: utf-8 -*- """Tests sqlparse function.""" import pytest from tests.utils import TestCaseBase import sqlparse import sqlparse.sql from sqlparse import tokens as T class SQLParseTest(TestCaseBase): """Tests sqlparse.parse().""" def test_tokenize(self): sql = 'select * from foo;' ...
agpl-3.0
-7,683,300,934,872,038,000
34.657754
77
0.603629
false