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
thaole16/Boids
boids/boids.py
1
4866
""" A refactored implementation of Boids from a deliberately bad implementation of [Boids](http://dl.acm.org/citation.cfm?doid=37401.37406): an exercise for class. """ from matplotlib import pyplot as plt from matplotlib import animation import numpy as np class Boids(object): def __init__(self, ...
mit
-4,863,632,825,812,648,000
42.446429
113
0.622894
false
Eric-Zhong/odoo
addons/resource/faces/utils.py
433
3231
############################################################################ # Copyright (C) 2005 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; you can redistribute it and/or modify # ...
agpl-3.0
-8,170,183,780,738,484
24.642857
76
0.561746
false
fhaoquan/kbengine
kbe/src/lib/python/Lib/difflib.py
72
81679
""" Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context diff format. Function nd...
lgpl-3.0
848,720,548,558,049,800
39.058362
83
0.565739
false
Bionetbook/bionetbook
bnbapp/bionetbook/protocols/forms/verbs/resuspend.py
2
1489
from protocols.forms import forms from core.utils import VOLUME_UNITS, CONCENTRATION_UNITS, TIME_UNITS class ResuspendForm(forms.VerbForm): name = "Resuspend" slug = "resuspend" # has_component = True has_manual = True layers = ['item_to_act', 'reagent', 'settify'] item_to_act = forms.CharFie...
mit
-441,155,153,899,768,770
56.269231
116
0.723304
false
EKiefer/edge-starter
py34env/Lib/site-packages/authtools/views.py
4
11578
""" Mostly equivalent to the views from django.contrib.auth.views, but implemented as class-based views. """ from __future__ import unicode_literals import warnings from django.conf import settings from django.contrib.auth import get_user_model, REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_requ...
mit
-81,026,986,573,845,260
34.406728
102
0.67516
false
larsmans/numpy
numpy/random/tests/test_random.py
9
31521
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_raises, assert_equal, assert_warns) from numpy import random from numpy.compat import asbytes import sys class TestSeed(TestCase): def test_sc...
bsd-3-clause
-7,220,779,066,877,924,000
42.962343
87
0.575172
false
jhseu/tensorflow
tensorflow/python/kernel_tests/summary_ops_test.py
6
46187
# 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
-6,128,232,882,227,762,000
36.127814
85
0.65421
false
Ziqi-Li/bknqgis
pandas/pandas/tests/io/parser/quoting.py
18
5813
# -*- coding: utf-8 -*- """ Tests that quoting specifications are properly handled during parsing for all of the parsers defined in parsers.py """ import csv import pandas.util.testing as tm from pandas import DataFrame from pandas.compat import PY3, StringIO, u class QuotingTests(object): def test_bad_quote_...
gpl-2.0
-1,652,748,299,100,699,400
36.993464
76
0.537244
false
bailey1234/hyeri7846
lib/werkzeug/wsgi.py
312
37386
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
apache-2.0
-6,134,742,769,974,321,000
35.017341
81
0.604478
false
cjayb/mne-python
mne/channels/montage.py
1
41279
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Marijn van Vliet <w.m.vanvliet@gmail.com> # Jona Sassenhagen <jona.sassenhagen@gmai...
bsd-3-clause
7,078,422,319,586,289,000
32.752249
79
0.579496
false
kytvi2p/Sigil
3rdparty/python/Lib/test/test_script_helper.py
8
5187
"""Unittests for test.script_helper. Who tests the test helper?""" import subprocess import sys from test import script_helper import unittest from unittest import mock class TestScriptHelper(unittest.TestCase): def test_assert_python_expect_success(self): t = script_helper._assert_python(True, '-c', 'i...
gpl-3.0
4,734,193,920,613,768,000
46.587156
80
0.644881
false
0asa/scikit-learn
sklearn/feature_selection/univariate_selection.py
5
18520
"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..prepr...
bsd-3-clause
9,161,403,944,473,077,000
29.815308
79
0.591361
false
ric2b/Vivaldi-browser
chromium/tools/binary_size/libsupersize/concurrent_test.py
2
5418
#!/usr/bin/env python # Copyright 2017 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 os import threading import unittest import concurrent def _ForkTestHelper(arg1, arg2, pickle_me_not, test_instance, parent_pi...
bsd-3-clause
2,737,504,394,054,580,700
35.608108
79
0.691953
false
quarkslab/irma
probe/tests/probe/controllers/test_ftpctrl.py
1
1780
from unittest import TestCase from mock import patch, MagicMock, call import probe.controllers.ftpctrl as module from irma.common.base.exceptions import IrmaFtpError class TestFtpctrl(TestCase): @patch("probe.controllers.ftpctrl.os.path.isdir") @patch('probe.controllers.ftpctrl.config.IrmaSFTPv2') def te...
apache-2.0
2,803,622,803,782,412,000
43.5
77
0.596067
false
thanatoskira/cansina
core/payload.py
2
3505
import threading import Queue import time from core.task import Task def _populate_list_with_file(file_name): """ Open a file, read its content and strips it. Returns a list with the content additionally it filter and clean some splinters """ with open(file_name, 'r') as f: tmp_list = f.r...
gpl-3.0
1,638,703,656,410,932,500
30.576577
92
0.59515
false
willseward/cattle
tests/integration/cattletest/core/test_user_preferences.py
8
2401
from common_fixtures import * # NOQA from gdapi import ApiError @pytest.fixture(scope='module') def user_client(context): return context.user_client def _user_preference(client, name=None): if name is None: name = random_str() preference = client.wait_success(client.create_user_preference( ...
apache-2.0
-2,528,450,583,300,333,000
35.938462
73
0.718451
false
mdublin/Brightcove-Dynamic-Ingest-App
ENV/lib/python2.7/site-packages/pip/_vendor/packaging/__about__.py
441
1073
# Copyright 2014 Donald Stufft # # 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, so...
mit
-2,791,858,947,414,828,000
33.612903
74
0.680336
false
Enucatl/pilatus-experiments
scripts/time_series2csv.py
1
1133
"""Read the time series and output a csv""" import argparse import h5py import csv import sys import numpy as np parser = argparse.ArgumentParser( __doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( "file", nargs=1, help="hdf5 file" ) if __name__ == '__main__': ...
gpl-3.0
3,053,433,939,669,690,000
28.815789
73
0.60812
false
redhat-performance/tuned
tuned/plugins/plugin_irqbalance.py
1
3151
from . import base from .decorators import command_custom from tuned import consts import tuned.logs import errno import perf import re log = tuned.logs.get() class IrqbalancePlugin(base.Plugin): """ Plugin for irqbalance settings management. """ def __init__(self, *args, **kwargs): super(IrqbalancePlugin, sel...
gpl-2.0
-2,159,136,969,307,826,700
27.645455
87
0.695017
false
rggjan/gegl-global-matting
bindings/pygegl/Gegl/__init__.py
7
1702
# PyGEGL - Python bindings for the GEGL image processing library # Copyright (C) 2007 Manish Singh # # __init__.py: initialization file for the Gegl package # # PyGEGL 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 Softw...
gpl-3.0
-7,241,721,958,495,886,000
27.366667
73
0.670975
false
Natim/sentry
tests/sentry/api/endpoints/test_project_group_index.py
8
19043
from __future__ import absolute_import from datetime import timedelta from django.core.urlresolvers import reverse from django.utils import timezone from mock import patch from sentry.models import ( EventMapping, Group, GroupBookmark, GroupSeen, GroupStatus ) from sentry.testutils import APITestCase from sentry....
bsd-3-clause
-1,518,718,468,204,667,100
36.634387
91
0.58788
false
gigglesninja/senior-design
MAVProxy/MAVProxy/modules/lib/mp_menu.py
4
10663
#!/usr/bin/env python ''' menu handling widgets for wx Andrew Tridgell November 2013 ''' import wx from MAVProxy.modules.lib import mp_util class MPMenuGeneric(object): '''a MP menu separator''' def __init__(self): pass def find_selected(self, event): return None def _append(self, m...
gpl-2.0
-5,167,212,183,719,611,000
32.012384
111
0.526775
false
eusi/MissionPlanerHM
Lib/site-packages/scipy/ndimage/interpolation.py
55
25609
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
gpl-3.0
2,290,035,108,452,676,900
37.860395
79
0.625913
false
ToonTownInfiniteRepo/ToontownInfinite
toontown/minigame/DistributedIceGameAI.py
2
15666
from pandac.PandaModules import Point3 from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import ClassicFSM, State from direct.task import Task from toontown.minigame import DistributedMinigameAI from toontown.minigame import MinigameGlobals from toontown.minigame import IceGameGlobals from toon...
mit
-5,404,933,960,941,281,000
43.254237
226
0.654538
false
msbeta/apollo
modules/tools/prediction/data_pipelines/common/rotation2d.py
3
1121
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo 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 ...
apache-2.0
-7,731,610,705,715,456,000
31.028571
79
0.61463
false
ikrauchanka/flask-jsonrpc
examples/flask-httpauth/auth.py
2
2733
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Cenobit Technologies, Inc. http://cenobit.es/ # 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 sour...
bsd-3-clause
-6,505,728,027,492,959,000
34.038462
78
0.742774
false
KontorConsulting/odoo
addons/account_accountant/__init__.py
892
1046
# -*- 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,304,520,672,803,910,000
44.478261
78
0.610899
false
willzhang05/postgrestesting1
postgrestesting1/lib/python3.5/site-packages/django/conf/locale/it/formats.py
115
2079
# -*- 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 = 'd F Y' # 25 Ottobre 2006 TIME_FO...
mit
-117,522,891,818,072,210
42.270833
77
0.502648
false
hifly/OpenUpgrade
addons/account/wizard/account_report_general_journal.py
378
1697
# -*- 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
2,172,252,810,657,236,500
43.657895
153
0.638185
false
kidaa/aurora
src/test/python/apache/thermos/monitoring/test_resource.py
8
3705
# # 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 ...
apache-2.0
-6,488,680,674,287,525,000
38.414894
95
0.74197
false
sanderator/lab-o-matic
test/test_lab_o_matic/test_compiler.py
1
1208
''' Created on May 8, 2011 @author: sander ''' import os.path import shutil import sys ''' nose.tools has to be imported into the Eclipse project, eg, from /usr/local/lib/python2.6/dist-packages/nose-1.0.0-py2.6.egg/nose/tools.py ''' from tools import with_setup, raises, nottest import lab_o_matic.compiler paths ...
gpl-2.0
5,628,246,233,826,935,000
26.454545
94
0.680464
false
anair13/where-am-i
flaskapp/flask/bin/activate_this.py
669
1129
"""By using execfile(this_file, dict(__file__=this_file)) you will activate this virtualenv environment. This can be used when you must use an existing Python interpreter, not the virtualenv bin/python """ try: __file__ except NameError: raise AssertionError( "You must run this like execfile('path/to/...
mit
713,843,416,466,405,600
32.205882
113
0.689105
false
cs207-project/TimeSeries
tsdb/tsdb_constants.py
1
1455
#################################################### # # This file records all the constant variables used # in tsdb module # #################################################### OPMAP = { '<': 0, '>': 1, '==': 2, '!=': 3, '<=': 4, '>=': 5 } FILES_DIR = 'persistent_files' MAX_CARD = 8 INDEX...
mit
2,109,068,200,658,952,400
18.931507
95
0.442612
false
esthermm/odoomrp-wip
mrp_subcontracting/models/procurement_order.py
25
1258
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class Procurement...
agpl-3.0
2,030,272,376,812,338,400
42.37931
78
0.514308
false
sirinath/root
interpreter/llvm/src/tools/clang/bindings/python/tests/cindex/test_token_kind.py
97
1064
from clang.cindex import TokenKind from nose.tools import eq_ from nose.tools import ok_ from nose.tools import raises def test_constructor(): """Ensure TokenKind constructor works as expected.""" t = TokenKind(5, 'foo') eq_(t.value, 5) eq_(t.name, 'foo') @raises(ValueError) def test_bad_register():...
lgpl-2.1
-5,445,447,430,254,963,000
23.744186
69
0.673872
false
glaubitz/fs-uae-debian
launcher/launcher/setup/setupwizarddialog.py
2
1290
import fsui from launcher.i18n import gettext from launcher.setup.setupwelcomepage import SetupWelcomePage from launcher.ui.skin import LauncherTheme from launcher.ui.widgets import PrevButton, NextButton, CloseButton class SetupWizardDialog(fsui.Window): @classmethod def open(cls, parent=None): retur...
gpl-2.0
88,827,779,302,788,960
35.857143
75
0.662016
false
roderickmackenzie/gpvdm
gpvdm_gui/gui/materials_main.py
1
7747
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD...
gpl-2.0
7,798,414,526,064,103,000
30.364372
161
0.718214
false
rickerc/cinder_audit
cinder/tests/db/test_name_id.py
5
2344
# Copyright 2013 IBM Corp. # # 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 t...
apache-2.0
-2,809,393,644,744,328,700
38.066667
78
0.655717
false
jpshort/odoo
marcos_addons/marcos_l10n_do/__init__.py
3
1085
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
8,095,760,275,109,491,000
44.208333
80
0.62212
false
widelands/widelands
utils/fix_formatting.py
1
4107
#!/usr/bin/env python # -*- coding: utf-8 -*- """The code base had inconsistent usage of tabs/spaces for indenting in Lua. files. Spaces were more prominent - and I prefer them over tabs. So I wrote this small script to fix leading tabs in Lua files to spaces. It also saves files in unix file endings ("\r\n") and s...
gpl-2.0
8,557,288,437,539,116,000
34.713043
81
0.551254
false
louyihua/edx-platform
lms/djangoapps/badges/migrations/0001_initial.py
17
3499
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import jsonfield.fields import badges.models from django.conf import settings import django.utils.timezone from model_utils import fields import xmodule_django.models class Migration(migrations.Migration): d...
agpl-3.0
4,522,359,262,542,806,000
49.710145
247
0.616748
false
drglove/SickRage
sickbeard/clients/rtorrent.py
2
5258
# Author: jkaberg <joel.kaberg@gmail.com>, based on fuzemans work (https://github.com/RuudBurger/CouchPotatoServer/blob/develop/couchpotato/core/downloaders/rtorrent/main.py) # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modif...
gpl-3.0
-4,681,479,207,629,375,000
27.89011
174
0.583492
false
zoggn/kernel_tcl_msm8610
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
-4,823,889,916,626,149,000
31.536585
93
0.669415
false
mavenlin/tensorflow
tensorflow/python/debug/cli/cli_shared_test.py
45
15872
# 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
-5,888,650,789,050,836,000
41.100796
80
0.66255
false
aforalee/RRally
rally/plugins/openstack/scenarios/murano/utils.py
2
10549
# Copyright 2015: 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
-7,280,454,918,527,431,000
35.884615
79
0.625083
false
elelsee/pycfn-elasticsearch
pycfn_elasticsearch/vendored/docutils/utils/error_reporting.py
104
7765
#!/usr/bin/env python # -*- coding: utf-8 -*- # :Id: $Id: error_reporting.py 7668 2013-06-04 12:46:30Z milde $ # :Copyright: © 2011 Günter Milde. # :License: Released under the terms of the `2-Clause BSD license`_, in short: # # Copying and distribution of this file, with or without modification, # are permitted...
apache-2.0
4,528,100,260,759,167,000
35.791469
129
0.57452
false
xiaoyaozi5566/DynamicCache
src/mem/ruby/network/simple/SimpleLink.py
18
1846
# Copyright (c) 2011 Advanced Micro Devices, 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...
bsd-3-clause
-7,001,011,454,336,312,000
46.333333
72
0.788732
false
earshel/PokeyPyManager
POGOProtos/Enums/IapItemCategory_pb2.py
16
2408
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Enums/IapItemCategory.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.prot...
mit
2,174,317,528,529,845,200
32.444444
342
0.749169
false
irwinlove/django
tests/template_tests/filter_tests/test_linebreaks.py
310
1920
from django.template.defaultfilters import linebreaks_filter from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class LinebreaksTests(SimpleTestCase): """ The contents in "linebreaks" are escaped according to the current autoescape setting. ...
bsd-3-clause
-3,341,272,972,340,112,400
35.226415
102
0.605729
false
kevthehermit/SpearPhisher
testdata.py
2
3851
# This file will generate random test data and write it to a database. import os import sys import string import django import random # Fake Factory from faker import Faker fake = Faker() # Connect to the Django Database sys.path.insert(1,'/home/spearphisher/spearphisher') script_path = os.path.dirname(__file__) sys...
gpl-3.0
-5,972,295,223,162,244,000
38.306122
149
0.64295
false
yanheven/cinder
cinder/volume/drivers/block_device.py
3
8381
# Copyright (c) 2013 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
2,925,538,829,464,596,500
37.095455
79
0.575826
false
YosaiProject/yosai_account_alchemy
yosai_alchemystore/accountstore/accountstore.py
2
10153
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
apache-2.0
5,269,965,566,354,407,000
37.604563
113
0.600118
false
matthewoliver/swift
test/unit/common/test_utils.py
2
275026
# Copyright (c) 2010-2012 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 agree...
apache-2.0
-7,391,450,644,393,529,000
40.295195
79
0.548559
false
varunarya10/python-ironicclient
ironicclient/client.py
3
4613
# -*- coding: utf-8 -*- # # 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 i...
apache-2.0
4,589,553,237,861,276,700
36.811475
78
0.603945
false
amohanta/miasm
miasm2/expression/expression_helper.py
5
18131
# # Copyright (C) 2011 EADS France, Fabrice Desclaux <fabrice.desclaux@eads.net> # # 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 your option) any late...
gpl-2.0
4,514,579,523,865,483,300
31.727437
80
0.534995
false
owaiskhan/Retransmission-Combining
gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py
11
1510
#!/usr/bin/env python # # Copyright 2005,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at you...
gpl-3.0
2,707,806,410,430,273,500
31.12766
72
0.66755
false
Hoekz/hackness-monster
venv/lib/python2.7/site-packages/jinja2/parser.py
336
35442
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.lexer impo...
mit
-3,097,034,657,908,402,000
38.423804
82
0.545398
false
patrioticcow/MessagesForSkype
packages/win32/bundle/MessagesForSkype/modules/python/1.3.1-beta/Lib/idlelib/PyParse.py
185
19510
import re import sys # Reason last stmt is continued (or C_NONE if it's not). (C_NONE, C_BACKSLASH, C_STRING_FIRST_LINE, C_STRING_NEXT_LINES, C_BRACKET) = range(5) if 0: # for throwaway debugging output def dump(*stuff): sys.__stdout__.write(" ".join(map(str, stuff)) + "\n") # Find what looks like the...
mit
-4,247,327,307,918,890,500
31.845118
79
0.489288
false
davidvon/pipa-pay-server
site-packages/sqlalchemy/orm/scoping.py
18
6109
# orm/scoping.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .. import exc as sa_exc from ..util import ScopedRegistry, ThreadLocalRegistry, wa...
apache-2.0
2,887,174,544,559,926,300
33.710227
84
0.594696
false
zjuchenyuan/BioWeb
Lib/Bio/Index.py
1
4980
# Copyright 1999 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Index.py This module provides a way to create indexes to text files. Classes: Index D...
mit
5,823,405,821,340,564,000
32.2
76
0.554418
false
wyc/django
django/contrib/syndication/views.py
192
8680
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404, HttpResponse from django.template import Templat...
bsd-3-clause
5,143,231,024,307,370,000
39.185185
99
0.579954
false
royredman4/Rubik_Cube
Rubik_Info.py
1
7722
try: # for Python 2 from Tkinter import * except ImportError: # for Python 3 from tkinter import * import time import Solving_algorithm # Converts a set of coordinates into indexes in the cube # returns square index horizontally and vertically (x,y) def CoordinatesToIndex(coordinates): t = (coordi...
gpl-3.0
-2,129,485,634,200,387,600
27.6
127
0.462574
false
MrNuggles/HeyBoet-Telegram-Bot
temboo/Library/Uber/Estimates/GetPriceEstimates.py
5
4198
# -*- coding: utf-8 -*- ############################################################################### # # GetPriceEstimates # Returns an estimated price range for each product offered at a given location. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version...
gpl-3.0
-8,830,977,029,070,973,000
40.156863
157
0.68223
false
lbeltrame/bcbio-nextgen
bcbio/structural/gatkcnv.py
2
17264
"""Support for Copy Number Variations (CNVs) with GATK4 https://software.broadinstitute.org/gatk/documentation/article?id=11682 https://gatkforums.broadinstitute.org/dsde/discussion/11683/ """ import glob import os import shutil import numpy as np import toolz as tz from bcbio import broad, utils from bcbio.distribu...
mit
-3,875,645,723,407,961,600
50.380952
112
0.579414
false
bemcdonnell/SWMMOutputAPI
swmmoutputapi/swmmbinreader.py
1
24788
""" SWMM Output File Wrapper for the New OutputAPI. Author: Bryant E. McDonnell Date: 1/10/2016 """ from ctypes import * from _toolkitpyswmm import * from datetime import datetime, timedelta import os __author__ = 'Bryant E. McDonnell (bemcdonnell@gmail.com)' __copyright__ = 'Copyright (c) 2016 Bryant E. McDonnell' ...
bsd-2-clause
2,478,650,889,802,605,600
38.408585
154
0.592746
false
geokala/cloudify-plugins-common
cloudify/workflows/tasks.py
2
24871
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
-3,628,943,667,350,454,300
34.888889
79
0.571187
false
akintolga/superdesk-aap
server/aap/commands/import_text_archive.py
2
15489
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from bson im...
agpl-3.0
-5,094,927,837,455,075,000
39.97619
120
0.486797
false
dawran6/zulip
zerver/management/commands/generate_invite_links.py
22
2688
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from confirmation.models import Confirmation from zerver.models import UserProfile, PreregistrationUser, \ get_user_profile_by...
apache-2.0
8,779,287,674,726,566,000
40.353846
104
0.547991
false
igemsoftware/SYSU-Software2013
project/Python27_32/Lib/test/test_anydbm.py
93
2288
#! /usr/bin/env python """Test script for the anydbm module based on testdumbdbm.py """ import os import unittest import glob from test import test_support _fname = test_support.TESTFN # Silence Py3k warning anydbm = test_support.import_module('anydbm', deprecated=True) def _delete_files(): # we don't know t...
mit
8,362,809,782,611,743,000
22.587629
65
0.523601
false
stevemao/brackets-shell
gyp/pylib/gyp/generator/msvs.py
17
118480
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml import gyp.MSVSNew a...
mit
-6,071,213,355,596,386,000
36.387188
134
0.641602
false
dulems/hue
desktop/core/ext-py/configobj/validate.py
42
46768
# validate.py # A Validator object # Copyright (C) 2005 Michael Foord, Mark Andrews, Nicola Larosa # E-mail: fuzzyman AT voidspace DOT org DOT uk # mark AT la-la DOT com # nico AT tekNico DOT net # This software is licensed under the terms of the BSD license. # http://www.voidspace.org.uk/python/licens...
apache-2.0
-7,835,903,823,894,607,000
30.923549
104
0.545095
false
wuzhy/autotest
client/tests/linus_stress/linus_stress.py
5
1435
import os from autotest_lib.client.bin import test, utils class linus_stress(test.test): version = 1 def setup(self): os.mkdir(self.srcdir) os.chdir(self.bindir) utils.system('cp linus_stress.c src/') os.chdir(self.srcdir) utils.system(utils.get_cc() + ' linus_stress.c...
gpl-2.0
-4,460,709,582,484,501,500
30.195652
97
0.604878
false
garbear/EventGhost
plugins/RadioSure/__init__.py
1
248696
version="0.2.13" # plugins/RadioSure/__init__.py # # Copyright (C) 2009, 2010, 2011 Pako (lubos.ruckl@quick.cz) # # This file is a plugin for EventGhost. # # 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...
gpl-2.0
-4,150,490,300,528,661,500
38.438699
136
0.51269
false
scikit-learn-contrib/py-earth
examples/plot_feature_importance.py
3
2142
""" =========================== Plotting feature importance =========================== A simple example showing how to compute and display feature importances, it is also compared with the feature importances obtained using random forests. Feature importance is a measure of the effect of the features on the outputs....
bsd-3-clause
-7,920,168,771,436,378,000
28.75
119
0.641457
false
makerbot/ReplicatorG
skein_engines/skeinforge-47/fabmetheus_utilities/vector3index.py
12
8587
""" Vector3 is a three dimensional vector class. Below are examples of Vector3 use. >>> from vector3 import Vector3 >>> origin = Vector3() >>> origin 0.0, 0.0, 0.0 >>> pythagoras = Vector3( 3, 4, 0 ) >>> pythagoras 3.0, 4.0, 0.0 >>> pythagoras.magnitude() 5.0 >>> pythagoras.magnitudeSquared() 25 >>> triplePythagoras ...
gpl-2.0
-4,169,895,940,327,702,500
30
157
0.673111
false
Pasithea/Flask-RESTFul-Sample
sample/exception.py
1
1163
from flask import jsonify class NotUniqueException(Exception): pass class ExistedException(Exception): pass class DoesNotExistsException(Exception): pass class HttpException(Exception): pass except_dict = { 'LoginFailed': { 'code': 403, 'message': "Login Failed" }, 'Ne...
mit
345,196,142,304,916,500
16.621212
49
0.569218
false
akosel/servo
python/servo/devenv_commands.py
31
4939
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
-7,794,453,175,304,286,000
36.70229
103
0.591618
false
willthames/ansible
test/units/parsing/vault/test_vault.py
13
18751
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, 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 So...
gpl-3.0
3,975,710,180,156,028,400
43.786925
129
0.678272
false
alphatwirl/alphatwirl
alphatwirl/collector/ToDataFrameWithDatasetColumn.py
1
1326
# Tai Sakuma <tai.sakuma@gmail.com> import pandas as pd from .ToTupleListWithDatasetColumn import ToTupleListWithDatasetColumn ##__________________________________________________________________|| class ToDataFrameWithDatasetColumn: def __init__(self, summaryColumnNames, datasetColumnName = 'co...
bsd-3-clause
3,453,909,577,626,807,300
33.894737
79
0.549774
false
FilipDominec/python-meep-utils
scripts_postpro/plot_TY.py
1
4307
#!/usr/bin/env python #-*- coding: utf-8 -*- simtime = 80e-12 size_y = 1400e-6 c = 3e8 maxfreq = 2e12 ## Import common moduli import numpy as np from scipy.constants import c, hbar, pi import matplotlib, sys, os, time import matplotlib.pyplot as plt ## Start figure + subplot (interactive) fig = plt.figure(figsize=(1...
gpl-2.0
3,451,224,569,395,763,000
35.193277
162
0.636174
false
danielharbor/openerp
addons/stock_picking_wave/__init__.py
374
1105
# -*- 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
2,129,930,119,616,902,100
41.5
78
0.624434
false
xzturn/tensorflow
tensorflow/python/distribute/input_lib.py
2
49393
# 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,307,326,775,798,725,000
39.091721
114
0.666957
false
bloomberg/phabricator-tools
py/aon/aoncmd_taskquery.py
4
8598
"""display and filter the list of maniphest tasks. you can use the 'task id' output from this command as input to the 'arcyon task-update' command. usage examples: list all tasks: $ arcyon task-query output formats: --format-ids 3 2 1 --format-short 8 / Open / High / ...
apache-2.0
-5,671,145,255,759,464,000
29.489362
79
0.571528
false
fkie-cad/FACT_core
src/objects/firmware.py
1
2206
from objects.file import FileObject from helperFunctions.hash import get_md5 from helperFunctions.tag import TagColor from contextlib import suppress class Firmware(FileObject): ''' This objects represents a firmware ''' def __init__(self, binary=None, file_name=None, file_path=None, scheduled_analys...
gpl-3.0
3,670,237,960,476,488,700
30.070423
153
0.612874
false
asendecka/djangae
djangae/tests/test_transactional.py
7
6364
from djangae.test import TestCase from djangae.db import transaction from djangae.contrib import sleuth class TransactionTests(TestCase): def test_repeated_usage_in_a_loop(self): from .test_connector import TestUser pk = TestUser.objects.create(username="foo").pk for i in xrange(4): ...
bsd-3-clause
-1,173,051,211,443,170,300
33.586957
105
0.603708
false
ryuunosukeyoshi/PartnerPoi-Bot
lib/aiohttp/multipart.py
20
32684
import asyncio import base64 import binascii import io import json import mimetypes import os import re import sys import uuid import warnings import zlib from collections import Mapping, Sequence, deque from pathlib import Path from urllib.parse import parse_qsl, quote, unquote, urlencode from multidict import CIMult...
gpl-3.0
-6,627,738,167,722,210,000
32.590956
79
0.559876
false
TacticalGoat/reddit
ErroneousQuotes/erroneousquotes.py
3
3063
#/u/GoldenSights import praw # simple interface to the reddit API, also handles rate limiting of requests import time import sqlite3 import random '''USER CONFIGURATION''' USERNAME = "" #This is the bot's Username. In order to send mail, he must have some amount of Karma. PASSWORD = "" #This is the bot's Password. ...
mit
-1,687,144,039,775,525,400
32.67033
149
0.612471
false
jkorell/PTVS
Python/Product/PythonTools/visualstudio_py_repl.py
19
51102
 # ############################################################################ # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution...
apache-2.0
-5,157,967,153,413,950,000
35.136628
220
0.553053
false
atopuzov/nitro-python
nssrc/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlerrorpage.py
3
6286
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
-261,051,988,979,751,780
28.511737
187
0.699809
false
mavteam13/paparazzi
sw/tools/tcp_aircraft_server/phoenix/xmlobject.py
86
17644
#Copyright 2014, Antoine Drouin """ Allows XML files to be operated on like Python objects. Features: - load XML source from file pathnames, readable file objects or raw strings - add, get and set tag attributes like with python attributes - iterate over nodes - save the modified XMLFile or XMLObject t...
gpl-2.0
-8,518,920,597,523,127,000
30.173145
92
0.55492
false
grani/grpc
src/python/grpcio_tests/tests/unit/_rpc_test.py
21
36230
# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
7,213,980,074,858,184,000
41.87574
80
0.639829
false
abadger/ansible
lib/ansible/module_utils/facts/virtual/linux.py
15
17328
# 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 distributed in the hope that ...
gpl-3.0
8,108,010,358,189,152,000
42.868354
117
0.504675
false
cgalleguillosm/accasim
accasim/utils/plot_factory.py
1
51706
""" MIT License Copyright (c) 2017 cgalleguillosm, AlessioNetti 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, ...
mit
-8,890,675,378,469,619,000
46.595865
208
0.588674
false
dmsimard/ansible
test/support/windows-integration/plugins/action/win_template.py
269
1198
# (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
6,576,294,700,988,176,000
40.310345
80
0.775459
false
asterisk/ari-py
ari/client.py
1
11612
# # Copyright (c) 2013, Digium, Inc. # """ARI client library. """ import json import logging import urlparse import swaggerpy.client from ari.model import * log = logging.getLogger(__name__) class Client(object): """ARI Client object. :param base_url: Base URL for accessing Asterisk. :param http_clie...
bsd-3-clause
-3,331,569,382,110,264,000
37.83612
91
0.573114
false
KISSMonX/micropython
tests/extmod/uctypes_native_le.py
10
2037
# This test is exactly like uctypes_le.py, but uses native structure layout. # Codepaths for packed vs native structures are different. This test only works # on little-endian machine (no matter if 32 or 64 bit). import sys import uctypes if sys.byteorder != "little": print("SKIP") sys.exit() desc = { "s...
mit
-281,293,852,833,337,500
25.802632
79
0.602847
false
williamsandrew/kubernetes
hack/jenkins/test-history/gen_html_test.py
12
2491
#!/usr/bin/env python # Copyright 2016 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
-540,147,821,993,442,560
33.123288
95
0.598956
false
cjhak/b2share
invenio/ext/session/legacy_session.py
12
3341
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 2014, 2015 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...
gpl-2.0
8,962,688,884,133,845,000
32.41
79
0.632445
false
motion2015/a3
openedx/core/djangoapps/course_groups/migrations/0003_auto__add_coursecohort__add_coursecohortssettings.py
100
7464
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CourseCohort' db.create_table('course_groups_coursecohort', ( ('id', self.gf('dj...
agpl-3.0
7,775,110,186,029,337,000
68.12037
183
0.579046
false
JamesLiAndroid/django-blog-practice
blogproject/blog/migrations/0001_initial.py
1
1880
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 06:16 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
gpl-3.0
-7,716,185,392,384,086,000
35.862745
120
0.565957
false