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
jviada/QuantEcon.py
quantecon/tests/tests_models/test_optgrowth.py
7
2959
""" tests for quantecon.models.optgrowth @author : Spencer Lyon @date : 2014-08-05 10:20:53 TODO: I'd really like to see why the solutions only match analytical counter part up to 1e-2. Seems like we should be able to do better than that. """ from __future__ import division from math import log import num...
bsd-3-clause
-2,522,454,977,369,108,500
24.95614
78
0.629605
false
haiyangd/Gelatin
src/Gelatin/util.py
2
3376
import generator from parser import Parser from compiler import SyntaxCompiler def compile_string(syntax): """ Builds a converter from the given syntax and returns it. @type syntax: str @param syntax: A Gelatin syntax. @rtype: compiler.Context @return: The compiled converter. """ r...
gpl-2.0
5,705,423,890,039,226,000
31.152381
75
0.66795
false
yglazko/socorro
socorro/unittest/lib/test_search_common.py
4
16114
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime from nose.tools import eq_, ok_, assert_raises from configman import ConfigurationManager, Namespace f...
mpl-2.0
-6,764,534,929,840,768,000
31.035785
79
0.506454
false
tod31/pyload
module/plugins/accounts/RPNetBiz.py
5
2680
# -*- coding: utf-8 -*- from module.plugins.internal.MultiAccount import MultiAccount from module.plugins.internal.misc import json class RPNetBiz(MultiAccount): __name__ = "RPNetBiz" __type__ = "account" __version__ = "0.19" __status__ = "testing" __config__ = [("mh_mode" , "all;liste...
gpl-3.0
-4,124,174,330,721,369,000
36.746479
97
0.544403
false
GdZ/scriptfile
software/googleAppEngine/lib/django_1_2/django/contrib/gis/db/backends/oracle/creation.py
620
2283
from django.db.backends.oracle.creation import DatabaseCreation from django.db.backends.util import truncate_name class OracleCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): "Return any spatial index creation SQL for the field." from django.contrib.gis.db.models.field...
mit
-4,128,103,675,427,760,600
53.357143
118
0.47788
false
mwaskom/seaborn
doc/tools/generate_logos.py
2
6982
import numpy as np import seaborn as sns from matplotlib import patches import matplotlib.pyplot as plt from scipy.signal import gaussian from scipy.spatial import distance XY_CACHE = {} STATIC_DIR = "_static" plt.rcParams["savefig.dpi"] = 300 def poisson_disc_sample(array_radius, pad_radius, candidates=100, d=2, ...
bsd-3-clause
-850,889,678,444,726,100
30.169643
88
0.526353
false
omnirom/android_kernel_htc_flounder
scripts/tracing/dma-api/plotting.py
96
4043
"""Ugly graph drawing tools""" import matplotlib.pyplot as plt import matplotlib.cm as cmap #import numpy as np from matplotlib import cbook # http://stackoverflow.com/questions/4652439/is-there-a-matplotlib-equivalent-of-matlabs-datacursormode class DataCursor(object): """A simple data cursor widget that displays...
gpl-2.0
4,874,003,485,658,362,000
39.43
103
0.610685
false
bjackman/workload-automation
wlauto/workloads/rt_app/__init__.py
2
11959
# Copyright 2015 ARM Limited # # 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 writin...
apache-2.0
-7,769,145,582,805,069,000
41.407801
99
0.570115
false
manderson23/NewsBlur
apps/rss_feeds/icon_importer.py
2
14448
import urllib2 import lxml.html import numpy import scipy import scipy.misc import scipy.cluster import urlparse import struct import operator import gzip import datetime import requests import httplib from PIL import BmpImagePlugin, PngImagePlugin, Image from socket import error as SocketError from boto.s3.key import ...
mit
4,603,313,469,235,750,000
35.951407
130
0.535161
false
tcheehow/MissionPlanner
Lib/dircache.py
67
1167
"""Read and cache directory listings. The listdir() routine returns a sorted list of the files in a directory, using a cache to avoid reading the directory more often than necessary. The annotate() routine appends slashes to directories.""" from warnings import warnpy3k warnpy3k("the dircache module has been rem...
gpl-3.0
6,026,284,473,240,823,000
26.463415
76
0.621251
false
alizamus/pox_controller
pox/lib/recoco/recoco.py
38
24045
# Copyright 2011-2013 James McCauley # # 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,462,541,213,605,385,700
27.590963
80
0.611562
false
cchurch/ansible
test/units/modules/network/f5/test_bigip_profile_fastl4.py
16
5811
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
667,295,744,268,473,900
31.283333
91
0.609534
false
Groestlcoin/electrumx-grs
tests/server/test_compaction.py
4
4366
# Test of compaction code in server/db.py import array from collections import defaultdict from os import environ, urandom from struct import pack import random from lib.hash import hash_to_str from server.env import Env from server.db import DB def create_histories(db, hashX_count=100): '''Creates a bunch of r...
mit
-8,026,047,905,074,800,000
32.075758
76
0.605131
false
ujjwalwahi/odoo
addons/l10n_in_hr_payroll/report/__init__.py
424
1262
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
agpl-3.0
7,518,664,075,045,500,000
39.709677
80
0.64897
false
Didou09/tofu
tofu/mag/regression_test.py
2
11158
# -*- coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # Also if needed: retab ''' Regression test ''' from __future__ import (unicode_literals, absolute_import, \ print_function, division) import argparse import matplotlib.pyplot as plt import numpy as np import os i...
mit
-3,750,873,140,125,080,000
38.427562
128
0.551174
false
lanfker/vPRKS
examples/realtime/realtime-udp-echo.py
195
3526
# # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the implied w...
gpl-2.0
6,179,340,659,892,682,000
29.929825
108
0.701361
false
camptocamp/ngo-addons-backport
addons/document_page/wizard/wiki_wiki_page_open.py
46
2658
# -*- 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,180,352,243,157,455,000
39.212121
109
0.550113
false
mcfiredrill/libcaca-old
python/caca/display.py
1
9283
# -*- coding: utf-8 -*- # # libcaca Colour ASCII-Art library # Python language bindings # Copyright (c) 2010 Alex Foulon <alxf@lavabit.com> # All Rights Reserved # # This library is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redis...
lgpl-2.1
3,700,314,750,346,737,700
30.467797
78
0.582139
false
sopac/pacgeo
geonode/base/tests.py
3
4298
from django.test import TestCase from geonode.base.models import ResourceBase from geonode.utils import OGC_Servers_Handler class ThumbnailTests(TestCase): def setUp(self): self.rb = ResourceBase.objects.create() def tearDown(self): t = self.rb.thumbnail if t: t.delete() ...
gpl-3.0
-3,041,813,468,189,370,400
36.701754
86
0.578409
false
truetone/AutobahnPython
examples/wamp/pubsub/simple/example2/server.py
27
1919
############################################################################### ## ## Copyright 2011,2012 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http:...
apache-2.0
7,116,800,499,513,708,000
29.951613
80
0.643043
false
lancezlin/ml_template_py
lib/python2.7/site-packages/sklearn/tests/test_kernel_approximation.py
78
7586
import numpy as np from scipy.sparse import csr_matrix from sklearn.utils.testing import assert_array_equal, assert_equal, assert_true from sklearn.utils.testing import assert_not_equal from sklearn.utils.testing import assert_array_almost_equal, assert_raises from sklearn.utils.testing import assert_less_equal from ...
mit
2,919,219,850,194,552,000
34.12037
79
0.670577
false
rcbops/nova-buildpackage
contrib/boto_v6/ec2/connection.py
17
5286
''' Created on 2010/12/20 @author: Nachi Ueno <ueno.nachi@lab.ntt.co.jp> ''' import boto import base64 import boto.ec2 from boto_v6.ec2.instance import ReservationV6 from boto.ec2.securitygroup import SecurityGroup class EC2ConnectionV6(boto.ec2.EC2Connection): ''' EC2Connection for OpenStack IPV6 mode ...
apache-2.0
5,483,503,310,760,045,000
36.489362
72
0.559024
false
hsum/sqlalchemy
lib/sqlalchemy/orm/scoping.py
80
6101
# orm/scoping.py # Copyright (C) 2005-2015 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, ...
mit
-1,438,035,557,354,477,300
33.468927
77
0.596132
false
BeZazz/lamebench
nb_third_party/dns/rdtypes/ANY/GPOS.py
248
5304
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
8,364,750,386,886,855,000
33
79
0.604638
false
mesheven/pyOCD
pyocd/rtos/common.py
1
2964
""" mbed CMSIS-DAP debugger Copyright (c) 2016 ARM Limited 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 o...
apache-2.0
6,770,886,525,556,499,000
26.962264
98
0.601889
false
rwl/muntjac
muntjac/demo/sampler/features/dragndrop/DragDropRearrangeComponentsExample.py
1
5450
from muntjac.api import VerticalLayout, Label, Embedded, Button, Alignment from muntjac.terminal.theme_resource import ThemeResource from muntjac.ui.css_layout import CssLayout from muntjac.ui.button import IClickListener from muntjac.ui.custom_component import CustomComponent from muntjac.ui.horizontal_layout import ...
apache-2.0
7,614,097,714,359,371,000
31.248521
78
0.632661
false
emccode/HeliosBurn
heliosburn/django/hbproject/api/views/testplan_rule.py
1
5048
from bson import ObjectId import json import logging from bson.errors import InvalidId from django.http import JsonResponse, HttpResponseNotFound, HttpResponseBadRequest, HttpResponse from django.views.decorators.csrf import csrf_exempt from api.models import db_model from api.models.auth import RequireLogin from api...
mit
8,245,647,728,802,355,000
30.354037
119
0.644017
false
mark-ignacio/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/amountchangedpattern_unittest.py
124
3350
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
-8,446,825,185,731,397,000
46.857143
107
0.718507
false
Alexsaphir/TP_EDP_Python
TP2_error.py
1
1912
# -*- coding: utf-8 -*- from numpy import * # importation du module numpy from numpy.linalg import * # importation du module numpy.linalg from numpy.random import * from matplotlib.pyplot import * from mpl_toolkits.mplot3d import Axes3D #Calcul l'erreur en faisant varier Ns def Ud(x): y = sin(2*pi*x)*sinh(2*pi) ...
lgpl-3.0
726,813,045,074,689,400
22.825
64
0.60021
false
rancherio/validation-tests
tests/v2_validation/cattlevalidationtest/core/test_network_policy.py
3
33957
from common_fixtures import * # NOQA test_network_policy = os.environ.get( 'TEST_NETWORK_POLICY', "False") np_reason = \ 'Intended to not execute this network policy test' if_network_policy = pytest.mark.skipif(test_network_policy != "ALL", reason=np_reason) if_network_...
apache-2.0
5,042,175,571,779,921,000
40.665031
79
0.659893
false
equitania/myodoo-addons-v10
eq_report_pattern/models/account_invoice.py
1
4656
# -*- coding: utf-8 -*- ############################################################################## # # Odoo Addon, Open Source Management Solution # Copyright (C) 2014-now Equitania Software GmbH(<http://www.equitania.de>). # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
3,180,108,466,985,038,000
41.715596
163
0.591837
false
aoakeson/home-assistant
homeassistant/components/device_tracker/unifi.py
4
2555
""" Support for Unifi WAP controllers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.unifi/ """ import logging import urllib from homeassistant.components.device_tracker import DOMAIN from homeassistant.const import CONF_HOST, CONF_USERN...
mit
-1,591,578,676,206,852,000
30.158537
74
0.629746
false
android-ia/hardware_intel_parameter-framework
tools/xmlGenerator/domainGenerator.py
6
12409
#! /usr/bin/python # # Copyright (c) 2011-2014, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this...
bsd-3-clause
-7,375,780,924,124,000,000
36.60303
93
0.639778
false
SEL-Columbia/commcare-hq
corehq/apps/app_manager/tests/__init__.py
1
1477
from __future__ import absolute_import try: from corehq.apps.app_manager.tests.test_app_manager import * from corehq.apps.app_manager.tests.test_xml_parsing import * from corehq.apps.app_manager.tests.test_xform_parsing import * from corehq.apps.app_manager.tests.test_form_versioning import * from ...
bsd-3-clause
3,810,090,146,654,896,000
42.441176
82
0.736628
false
davidegurgone/pyang
pyang/syntax.py
8
11241
"""Description of YANG & YIN syntax.""" import re ### Regular expressions - constraints on arguments # keywords and identifiers identifier = r"[_A-Za-z][._\-A-Za-z0-9]*" prefix = identifier keyword = '((' + prefix + '):)?(' + identifier + ')' comment = '(/\*([^*]|[\r\n\s]|(\*+([^*/]|[\r\n\s])))*\*+/)|(//.*)|(/\*.*)'...
isc
-692,287,418,674,032,300
41.741445
80
0.492839
false
Maccimo/intellij-community
plugins/hg4idea/testData/bin/hgext/convert/convcmd.py
90
17238
# convcmd - convert extension commands definition # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from common import NoRepo, MissingTool, SKIPREV, mapfile from cvs import conv...
apache-2.0
4,172,597,347,992,331,300
34.763485
80
0.538752
false
Centreon-Community/centreon-discovery
modPython/setuptools-0.6c11/setuptools/command/easy_install.py
32
63580
#!python """\ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ http://peak.telecommunity.com/DevCenter/EasyInstall """ import sys, os.path, ...
gpl-2.0
5,445,354,093,314,815,000
35.922184
89
0.561261
false
mathslinux/ceilometer
ceilometer/event/storage/pymongo_base.py
9
5978
# # 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
-4,756,277,102,346,441,000
39.666667
79
0.558548
false
SRLFoundry/HookedGL
HookedGL/Communication.py
1
3837
import socket import sys import math def bytes_needed(n): if type(n) is str: return len(n) elif type(n) is list: if type(n[0]) is int: return 4 * len(n) if n == 0: return 1 return int(math.log(n, 256)) + 1 class Communication: def __init__(self, address, port):...
gpl-2.0
-6,044,514,802,947,662,000
28.068182
100
0.542611
false
santidediego/LearningDjango
lib/python3.5/site-packages/django/conf/locale/de_CH/formats.py
115
1445
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATE...
mit
-6,485,561,238,095,977,000
37.026316
107
0.641522
false
cgvarela/graphite-web
webapp/graphite/events/models.py
33
1383
import os from django.db import models from tagging.managers import ModelTaggedItemManager from tagging.models import Tag if os.environ.get('READTHEDOCS'): TagField = lambda *args, **kwargs: None else: from tagging.fields import TagField class Event(models.Model): when = models.DateTimeField() what =...
apache-2.0
2,464,827,064,386,104,300
25.09434
72
0.618944
false
rkmaddox/mne-python
mne/gui/_backend.py
11
1500
"""Deal with pyface backend issues.""" # Author: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import os import sys from ..utils import warn, _check_pyqt5_version def _get_pyface_backend(): """Check the currently selected Pyface backend. Returns ------- backend : str ...
bsd-3-clause
-8,578,787,198,836,276,000
27.301887
79
0.618
false
mahak/neutron
neutron/plugins/ml2/extensions/qos.py
5
2024
# Copyright (c) 2015 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...
apache-2.0
-2,585,839,556,351,544,000
36.481481
78
0.700593
false
rbalda/neural_ocr
env/lib/python2.7/site-packages/scipy/ndimage/tests/test_regression.py
123
1429
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_array_almost_equal, run_module_suite import scipy.ndimage as ndimage def test_byte_order_median(): """Regression test for #413: median_filter does not handle bytes orders.""" a = np.arange(9,...
mit
-3,514,207,177,535,382,000
27.58
79
0.589223
false
vortex-ape/scikit-learn
examples/model_selection/plot_nested_cross_validation_iris.py
9
4415
""" ========================================= Nested versus non-nested cross-validation ========================================= This example compares non-nested and nested cross-validation strategies on a classifier of the iris data set. Nested cross-validation (CV) is often used to train a model in which hyperparam...
bsd-3-clause
-7,680,972,611,148,786,000
36.735043
79
0.716648
false
AMObox/teammaniac
plugin.video.PsychoTV/resources/lib/resolvers/filehoot.py
23
1140
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
gpl-2.0
-6,204,576,070,987,236,000
29.810811
73
0.65614
false
kevinpt/ripyl
ripyl/protocol/iso_k_line.py
1
20293
#!/usr/bin/python # -*- coding: utf-8 -*- '''ISO K-line protocol decoder Decodes ISO9141 and ISO14230 automotive data bus protocols ''' # Copyright © 2013 Kevin Thibedeau # This file is part of Ripyl. # Ripyl is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General ...
lgpl-3.0
-346,342,081,301,365,200
34.978723
122
0.60753
false
xzYue/odoo
addons/account/wizard/account_report_common.py
342
10353
# -*- 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
5,632,839,077,237,639,000
54.363636
201
0.570752
false
V155/qutebrowser
qutebrowser/config/configexc.py
1
5311
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
-7,419,751,989,713,305,000
30.613095
75
0.579552
false
RainDogSoftware/pingpung
pingpung/pingpung.py
1
22103
#!/usr/bin/env python3 import sys import time import os from collections import OrderedDict from itertools import count from gettext import gettext as _ from PyQt4 import QtCore, QtGui, uic from pingpung import pplib from pingpung.pplib import pping from pingpung.pplib import audio __date__ = "$Date: 2015/03/17 $" _...
gpl-2.0
-2,972,945,418,487,119,000
43.37751
120
0.583149
false
whummer/moto
moto/config/responses.py
1
2064
import json from moto.core.responses import BaseResponse from .models import config_backends class ConfigResponse(BaseResponse): @property def config_backend(self): return config_backends[self.region] def put_configuration_recorder(self): self.config_backend.put_configuration_recorder(se...
apache-2.0
-4,800,245,809,924,316,000
37.943396
119
0.71657
false
Lambdanaut/crits
crits/screenshots/forms.py
21
2748
from django import forms from django.forms.widgets import HiddenInput from crits.core import form_consts from crits.core.handlers import get_source_names from crits.core.user_tools import get_user_organization class AddScreenshotForm(forms.Form): """ Django form for adding an Object. """ error_css_cla...
mit
7,126,618,230,706,638,000
56.25
94
0.483988
false
chrisfranko/MIM-MM
qa/rpc-tests/skeleton.py
148
2426
#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Skeleton for python-based regression tests using # JSON-RPC # Add python-bitcoinrpc to module search pa...
mit
2,149,419,293,907,796,000
28.228916
99
0.648805
false
tiborsimko/invenio-utils
invenio_utils/hash.py
5
1142
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 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 your option) any...
gpl-2.0
6,314,778,940,442,812,000
30.722222
74
0.732925
false
adam111316/SickGear
sickbeard/providers/torrentleech.py
3
5655
# coding=utf-8 # # This file is part of SickGear. # # SickGear 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. # # SickGear is distribu...
gpl-3.0
-2,470,997,224,323,254,000
37.732877
121
0.563042
false
makdharma/grpc
src/python/grpcio/grpc/framework/interfaces/base/base.py
19
13144
# Copyright 2015, 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
2,349,964,979,429,028,400
37.098551
82
0.70283
false
jlublin/landpatterngen
gen_library.py
1
2880
#!/usr/bin/env python3 import re import importlib import sqlite3 import sys def parse_tollens(part): keys = list(part.keys()); for key in keys: if(key[-2:] == '_l' and key[:-2] + '_h' in part): part[key[:-2]] = TolLen(float(part[key[:-2] + '_l']), float(part[key[:-2] + '_h'])) part.pop(key[:-2] + '_l')...
gpl-3.0
8,369,730,098,118,879,000
28.090909
99
0.623264
false
flagxor/swtoolkit
test/directx_9_0_c_test.py
9
2384
#!/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...
bsd-3-clause
4,264,606,565,617,713,000
35.121212
72
0.747064
false
seraphlnWu/in_trip
in_trip/in_trip/lib/arbiter.py
1
16076
#coding=utf-8 # This module implement prefork model, used for spawn and manage child process import os import sys import time import errno import signal import random import select import traceback from in_trip.lib.pidfile import Pidfile from in_trip.lib.config import Config from in_trip.lib.errors import HaltServer...
mit
2,622,871,367,507,350,000
32.146392
160
0.539002
false
renegelinas/mi-instrument
mi/dataset/parser/test/test_auv_eng_auv.py
7
22058
#!/usr/bin/env python """ @package mi.dataset.parser.test @fid marine-integrations/mi/dataset/parser/test/test_auv_eng_auv.py @author Jeff Roy @brief Test code for a auv_eng_auv data parser NOTE: there have been several other parsers built on auv_common tested already all negative paths through the code are not again...
bsd-2-clause
-3,635,885,871,912,073,700
38.960145
101
0.595793
false
abergeron/pylearn2
pylearn2/utils/image.py
39
18841
""" Utility functions for working with images. """ import logging import numpy as np plt = None axes = None from theano.compat.six.moves import xrange from theano.compat.six import string_types import warnings try: import matplotlib.pyplot as plt import matplotlib.axes except (RuntimeError, ImportError, TypeErr...
bsd-3-clause
-1,614,721,749,162,781,200
28.439063
79
0.569237
false
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/PyAMF-0.6.1/pyamf/remoting/__init__.py
27
19278
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ AMF Remoting support. A Remoting request from the client consists of a short preamble, headers, and bodies. The preamble contains basic information about the nature of the request. Headers can be used to request debugging information, send authenti...
bsd-3-clause
-2,675,121,205,040,012,300
26.979681
89
0.622004
false
robmagee/django-cms
cms/signals/permissions.py
58
2695
# -*- coding: utf-8 -*- from cms.cache.permissions import clear_user_permission_cache from cms.models import PageUser, PageUserGroup from menus.menu_pool import menu_pool def post_save_user(instance, raw, created, **kwargs): """Signal called when new user is created, required only when CMS_PERMISSION. Assign...
bsd-3-clause
-233,311,907,361,722,720
29.625
81
0.698701
false
ramadhane/odoo
addons/project/__openerp__.py
259
2562
# -*- 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
265,801,292,055,401,760
34.09589
158
0.586651
false
zhsso/ubunto-one
src/backends/filesync/utilities/keyword_script.py
6
4521
#!/usr/bin/env python # Copyright 2008-2015 Canonical # # 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) any later version. # # This...
agpl-3.0
4,300,147,247,506,838,000
34.320313
79
0.585269
false
steedos/odoo
addons/account/edi/invoice.py
342
13984
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
-5,161,701,962,735,126,000
46.726962
153
0.612271
false
DolphinDream/sverchok
utils/curve/knotvector.py
1
8165
# This file is part of project Sverchok. It's copyrighted by the contributors # recorded in the version control history of the file, available from # its original location https://github.com/nortikin/sverchok/commit/master # # SPDX-License-Identifier: GPL3 # License-Filename: LICENSE # # Adopted from Geomdl library: ht...
gpl-3.0
7,084,361,023,358,314,000
29.466418
131
0.627557
false
jmp0xf/raven-python
raven/transport/base.py
19
1335
""" raven.transport.base ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import class Transport(object): """ All transport implementations need to subclass this class You mus...
bsd-3-clause
-5,264,411,162,263,836,000
25.7
75
0.658427
false
cwisecarver/osf.io
api/users/urls.py
12
1402
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.UserList.as_view(), name=views.UserList.view_name), url(r'^(?P<user_id>\w+)/$', views.UserDetail.as_view(), name=views.UserDetail.view_name), url(r'^(?P<user_id>\w+)/addons/$', views.UserAddonList.as_view(), name=views.U...
apache-2.0
7,226,210,865,273,650,000
81.470588
171
0.693295
false
Mellthas/quodlibet
quodlibet/quodlibet/qltk/menubutton.py
2
1425
# Copyright 2011, 2014 Christoph Reiter # # 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 later version. from gi.repository import Gtk...
gpl-2.0
5,995,788,123,701,225,000
27.5
76
0.609123
false
whn09/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/wishart_test.py
38
14437
# 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
9,144,064,952,967,672,000
36.694517
80
0.596315
false
ADM91/PowerSystem-RL
system/line_connection_cases/within_energized.py
1
3779
import numpy as np from system.take_snapshot import take_snapshot from copy import deepcopy def within_energized(ps, island_1, bus_ids, spad_lim): # Take preliminary snapshot of the system state_list, island_list = take_snapshot(ps, 'Preliminary state', [], []) # Set opf constraint to SPA diff # Mak...
gpl-3.0
-3,863,125,528,417,258,000
48.723684
116
0.549352
false
spinellic/Mission-Planner
Lib/getpass.py
62
5742
"""Utilities to get a password and/or the current user name. getpass(prompt[, stream]) - Prompt for a password, with echo turned off. getuser() - Get the user name from the environment or password database. GetPassWarning - This UserWarning is issued when getpass() cannot prevent echoing of the...
gpl-3.0
-9,152,677,063,866,399,000
30.078212
77
0.585684
false
s3nk4s/flaskTutorials
FlaskApp/FlaskApp/venv/local/lib/python2.7/sre_compile.py
156
16427
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import _sre, sys import sre_parse from sre_constants impo...
mit
798,597,196,005,829,400
30.349237
75
0.508005
false
ismailsunni/inasafe
safe_extras/raven/conf/remote.py
6
4164
from __future__ import absolute_import import logging import os import warnings from raven.utils.compat import PY2, text_type from raven.exceptions import InvalidDsn from raven.utils.encoding import to_string from raven.utils.urlparse import parse_qsl, urlparse ERR_UNKNOWN_SCHEME = 'Unsupported Sentry DSN scheme: {0...
gpl-3.0
-1,194,075,126,029,025,800
32.047619
139
0.626081
false
ericgriffin/fflock
web2py/gluon/contrib/login_methods/motp_auth.py
44
4592
#!/usr/bin/env python import time from hashlib import md5 from gluon.dal import DAL def motp_auth(db=DAL('sqlite://storage.sqlite'), time_offset=60): """ motp allows you to login with a one time password(OTP) generated on a motp client, motp clients are available for practically all platfo...
apache-2.0
-6,878,157,147,357,338,000
40.369369
119
0.605836
false
guorendong/iridium-browser-ubuntu
tools/telemetry/telemetry/core/backends/chrome/desktop_browser_finder_unittest.py
8
8800
# 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. import unittest from telemetry.core.backends.chrome import desktop_browser_finder from telemetry.core import browser_options from telemetry.core.platform imp...
bsd-3-clause
4,231,438,101,732,675,600
32.846154
78
0.654545
false
miyakz1192/neutron
neutron/plugins/sriovnicagent/sriov_nic_agent.py
15
14528
# Copyright 2014 Mellanox Technologies, Ltd # # 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
5,965,411,418,668,627,000
40.508571
79
0.571861
false
Oliver2213/NVDAYoutube-dl
addon/globalPlugins/nvdaYoutubeDL/youtube_dl/extractor/soundgasm.py
149
2041
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class SoundgasmIE(InfoExtractor): IE_NAME = 'soundgasm' _VALID_URL = r'https?://(?:www\.)?soundgasm\.net/u/(?P<user>[0-9a-zA-Z_\-]+)/(?P<title>[0-9a-zA-Z_\-]+)' _TEST = { 'url': 'http://soundgasm....
gpl-2.0
-9,015,994,547,492,136,000
30.890625
108
0.530132
false
hasgeek/coaster
coaster/views/misc.py
1
6508
""" Miscellaneous view helpers -------------------------- Helper functions for view handlers. All items in this module can be imported directly from :mod:`coaster.views`. """ from urllib.parse import urlsplit import re from flask import Response, current_app, json, request from flask import session as request_sessi...
bsd-2-clause
2,179,115,423,942,877,000
33.073298
87
0.638906
false
yavalvas/yav_com
build/matplotlib/doc/mpl_examples/axes_grid/demo_edge_colorbar.py
11
2597
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import AxesGrid def get_demo_image(): import numpy as np from matplotlib.cbook import get_sample_data f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False) z = np.load(f) # z is a numpy array of 15x15 return z, (-3,4,...
mit
6,050,217,293,223,723,000
28.179775
74
0.510589
false
ramaganapathy1/AMuDA-Ir-back-end
vEnv/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/version.py
1151
11556
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import collections import itertools import re from ._structures import In...
mit
7,036,424,311,778,572,000
28.40458
79
0.553998
false
Nirvedh/CoarseCoherence
src/arch/x86/isa/insts/__init__.py
91
2409
# Copyright (c) 2007 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 implemen...
bsd-3-clause
-6,260,872,121,821,057,000
47.18
72
0.761727
false
mozilla/django-badger
badger/templatetags/badger_tags.py
3
2006
# django import django from django import template from django.conf import settings from django.shortcuts import get_object_or_404 from badger.models import Award, Badge from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse import hashlib import urllib from django.utils....
bsd-3-clause
-6,691,558,226,554,742,000
22.880952
145
0.654038
false
curiosityio/taiga-docker
taiga-back/taiga-back/taiga/projects/attachments/api.py
3
3874
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
mit
8,116,993,833,499,532,000
37.336634
92
0.736054
false
kalebhartje/schoolboost
cms/envs/acceptance_static.py
3
2314
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. This is used in the django-admin call as acceptance.py contains random seeding, causing django-admin to create a random collection """ # We intentionally define lots of variables that aren't used, and # wan...
agpl-3.0
5,504,239,063,943,171,000
29.051948
94
0.675886
false
egoid/baytree
lib/python2.7/site-packages/django/contrib/gis/gdal/prototypes/generation.py
68
4298
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_int64, c_void_p from functools import partial from django.contrib.gis.gdal.prototypes.errcheck import ( check_arg_errcode, check_const_string, check_errcode, check_geom, ...
mit
-3,492,415,687,919,891,500
28.238095
85
0.665426
false
digibyte/digibyte
contrib/gitian-build.py
1
12593
#!/usr/bin/env python3 import argparse import os import subprocess import sys def setup(): global args, workdir programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget'] if args.kvm: programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils'] elif args.docker: dockers = ['docker.io',...
mit
-8,202,137,611,812,247,000
56.240909
232
0.642579
false
asterix135/infonex_crm
home/views.py
1
9135
import datetime from calendar import monthrange, month_name from pprint import pprint from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.db.models import Count, Sum from django.http import HttpResponse from django.views.generic import TemplateView from d...
mit
-8,105,168,294,487,810,000
38.717391
87
0.571757
false
supriyasingh01/github_basics
Internetworking Distributed Project/finalProject/ovs/pox-master/pox/openflow/nicira_ext.py
32
3980
# Copyright 2011 Andreas Wundsam # # This file is part of POX. # # POX 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. # # POX is distr...
cc0-1.0
6,336,399,523,812,043,000
26.260274
75
0.637437
false
mikewiebe-ansible/ansible
lib/ansible/modules/cloud/openstack/os_volume_snapshot.py
63
6004
#!/usr/bin/python # coding: utf-8 -*- # Copyright (c) 2016, Mario Santos <mario.rf.santos@gmail.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 = {'status': ['prev...
gpl-3.0
6,731,607,858,950,711,000
32.730337
92
0.575616
false
popazerty/e2-gui
lib/python/Screens/InputBox.py
14
5004
from enigma import getPrevAsciiCode from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.Input import Input from Components.config import config from Tools.BoundFunction import boundFunction from T...
gpl-2.0
-4,012,037,587,445,265,000
26.8
161
0.691647
false
DepthDeluxe/ansible
lib/ansible/utils/display.py
45
11885
# (c) 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) any lat...
gpl-3.0
5,685,644,794,708,581,000
33.853372
134
0.574253
false
wakermahmud/sync-engine
inbox/models/secret.py
6
1400
from sqlalchemy import Column, Enum, Integer from sqlalchemy.types import BLOB from sqlalchemy.orm import validates from inbox.models.base import MailSyncBase from inbox.security.oracles import get_encryption_oracle, get_decryption_oracle class Secret(MailSyncBase): """Simple local secrets table.""" _secret ...
agpl-3.0
8,345,268,595,100,056,000
30.818182
79
0.655714
false
codeworldprodigy/lab4
lib/jinja2/defaults.py
659
1068
# -*- coding: utf-8 -*- """ jinja2.defaults ~~~~~~~~~~~~~~~ Jinja default filters and tags. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2._compat import range_type from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner # defaults for ...
apache-2.0
-8,165,559,962,966,646,000
23.837209
61
0.652622
false
CallaJun/hackprince
indico/networkx/algorithms/components/tests/test_strongly_connected.py
11
5264
#!/usr/bin/env python from nose.tools import * import networkx as nx from networkx import NetworkXNotImplemented class TestStronglyConnected: def setUp(self): self.gc=[] G=nx.DiGraph() G.add_edges_from([(1,2),(2,3),(2,8),(3,4),(3,7), (4,5),(5,3),(5,6),(7,4),(7,6),...
lgpl-3.0
3,014,595,638,838,495,700
34.567568
90
0.539324
false
sajeeshcs/nested_quota_final
nova/cells/rpc_driver.py
63
7123
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/license...
apache-2.0
1,271,718,306,778,839,600
38.572222
78
0.636951
false
12AngryMen/votca-scripts
xtp/xtp_sendjobstocluster.py
2
5551
#!/usr/bin/env python from __tools__ import MyParser from __tools__ import XmlParser from __tools__ import XmlWriter from __tools__ import make_sure_path_exists from __tools__ import addsuffixtofile from __cluster__ import write_cluster_batch from __xtpJobfile__ import splittjobfile from __xtpJobfile__ import mergejobf...
apache-2.0
-4,258,504,541,384,111,600
31.273256
183
0.723113
false
alexanderturner/ansible
lib/ansible/playbook/conditional.py
12
9210
# (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
-7,206,018,428,900,623,000
42.857143
135
0.601303
false
rjoudrey/volatility
volatility/win32/lsasecrets.py
44
4501
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # This file is part of Volatility. # # Volatility 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
-8,957,751,289,988,664,000
28.227273
82
0.65852
false