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
yatinkumbhare/openstack-nova
nova/tests/unit/matchers.py
14
19003
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2012 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the L...
apache-2.0
-3,120,832,476,873,085,400
34.854717
78
0.56128
false
snamstorm/rockstor-core
src/rockstor/smart_manager/views/samba_service.py
2
3041
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
gpl-3.0
7,879,832,917,047,382,000
39.013158
97
0.606379
false
HWal/paparazzi
sw/supervision/python/lib/environment.py
33
2810
# Paparazzi center utilities # # Copyright (C) 2016 ENAC, Florian BITARD (intern student) # # This file is part of paparazzi. # # paparazzi 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, or ...
gpl-2.0
-2,095,534,345,075,784,000
29.879121
79
0.648399
false
0Chencc/CTFCrackTools
Lib/test/test_linecache.py
96
4079
""" Tests for the linecache module """ import linecache import unittest import os.path from test import test_support as support FILENAME = linecache.__file__ INVALID_NAME = '!@$)(!@#_1' EMPTY = '' TESTS = 'inspect_fodder inspect_fodder2 mapping_tests' TESTS = TESTS.split() TEST_PATH = os.path.dirname(support.__file_...
gpl-3.0
-4,781,393,995,727,246,000
30.137405
75
0.613631
false
ulule/django-linguist
linguist/mixins.py
1
14692
# -*- coding: utf-8 -*- import copy from contextlib import contextmanager import django from django.db.models import Q from django.db import models from django.utils.functional import cached_property from . import utils from .cache import CachedTranslation from .helpers import prefetch_translations if django.VERSI...
mit
-4,250,697,571,011,368,000
29.672234
99
0.575211
false
LoHChina/nova
nova/tests/unit/virt/xenapi/image/test_bittorrent.py
51
4959
# Copyright 2013 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-4,185,249,355,794,871,000
36.854962
78
0.597701
false
PRIMEDesigner15/PRIMEDesigner15
Test_files/dependencies/Lib/site-packages/pygame/pkgdata.py
603
2146
"""pkgdata is a simple, extensible way for a package to acquire data file resources. The getResource function is equivalent to the standard idioms, such as the following minimal implementation:: import sys, os def getResource(identifier, pkgname=__name__): pkgpath = os.path.dirname(sys.modules[p...
bsd-3-clause
-7,383,633,257,207,339,000
30.101449
75
0.669618
false
julian-seward1/servo
tests/wpt/web-platform-tests/css/tools/w3ctestlib/Indexer.py
26
9812
#!/usr/bin/python # CSS Test Suite Manipulation Library # Initial code by fantasai, joint copyright 2010 W3C and Microsoft # Licensed under BSD 3-Clause: <http://www.w3.org/Consortium/Legal/2008/03-bsd-license> # Define contains vmethod for Template Toolkit from template.stash import list_op @list_op("contains") def l...
mpl-2.0
-3,048,860,606,646,770,000
38.091633
123
0.616082
false
karwa/swift
utils/split_file.py
65
1410
#!/usr/bin/env python # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIB...
apache-2.0
1,131,666,928,957,080,700
29.652174
79
0.67234
false
chidea/GoPythonDLLWrapper
bin/lib/tkinter/test/test_ttk/test_functions.py
79
17143
# -*- encoding: utf-8 -*- import unittest import tkinter from tkinter import ttk class MockTkApp: def splitlist(self, arg): if isinstance(arg, tuple): return arg return arg.split(':') def wantobjects(self): return True class MockTclObj(object): typename = 'test' ...
mit
3,695,775,312,891,148,300
35.982684
80
0.518378
false
timou/volatility
volatility/plugins/mac/route.py
44
3443
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # 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 Software Foundation; either version 2 of the License, or # (at your o...
gpl-2.0
4,526,063,615,913,475,600
30.587156
114
0.497531
false
AlexanderFabisch/scikit-learn
doc/tutorial/text_analytics/solutions/exercise_02_sentiment.py
46
2798
"""Build a sentiment analysis / polarity model Sentiment analysis can be casted as a binary text classification problem, that is fitting a linear classifier on features extracted from the text of the user messages so as to guess wether the opinion of the author is positive or negative. In this examples we will use a ...
bsd-3-clause
7,565,929,258,493,155,000
36.810811
79
0.702287
false
meh/servo
tests/wpt/update/upstream.py
43
13551
import os import re import subprocess import sys import urlparse from wptrunner.update.sync import LoadManifest from wptrunner.update.tree import get_unique_name from wptrunner.update.base import Step, StepRunner, exit_clean, exit_unclean from .tree import Commit, GitTree, Patch import github from .github import GitH...
mpl-2.0
4,577,795,398,955,674,600
33.746154
134
0.583352
false
ubc/compair
compair/kaltura/media.py
1
3320
import requests from flask import current_app from compair.core import abort from . import KalturaCore class Media(object): @classmethod def generate_media_entry(cls, ks, upload_token_id, media_type): entry = cls._api_add(ks, media_type) entry = cls._api_add_content(ks, entry.get('id'), upload...
gpl-3.0
6,936,201,873,541,614,000
35.097826
95
0.584639
false
paladin74/neural-network-animation
matplotlib/tests/test_dviread.py
15
1788
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from nose.tools import assert_equal import matplotlib.dviread as dr import os.path original_find_tex_file = dr.find_tex_file def setup(): dr.find_tex_file = lambda x: x def teardown(): dr...
mit
-7,607,979,195,476,649,000
32.111111
71
0.607383
false
alexgleith/Quantum-GIS
python/plugins/sextante/algs/QGISAlgorithmProvider.py
2
8315
# -*- coding: utf-8 -*- """ *************************************************************************** QGISAlgorithmProvider.py --------------------- Date : December 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***************...
gpl-2.0
-8,402,037,225,636,832,000
50.32716
102
0.674564
false
Novasoft-India/OperERP-AM-Motors
openerp/conf/deprecation.py
76
1602
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
-2,799,482,923,310,135,300
42.297297
78
0.670412
false
eezee-it/account-invoicing
account_invoice_merge_payment/models/account_invoice.py
24
1583
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of account_invoice_merge_payment, # an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # account_invoice_merge_payment is free software: # you can redi...
agpl-3.0
1,144,842,138,672,018,700
37.609756
78
0.610865
false
patricklaw/pants
src/python/pants/backend/python/goals/setup_py_test.py
3
33865
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import textwrap from typing import Iterable, Type import pytest from pants.backend.python import target_types_rules from pants.backend.python.goals.se...
apache-2.0
4,948,554,645,173,518,000
30.561044
99
0.545017
false
xin3liang/platform_external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/common/system/logutils.py
68
7376
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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...
bsd-3-clause
-4,395,460,413,797,681,000
34.63285
86
0.678688
false
SerCeMan/intellij-community
plugins/hg4idea/testData/bin/hgext/convert/cvsps.py
91
31477
# Mercurial built-in replacement for cvsps. # # Copyright 2008, Frank Kingswood <frank@kingswood-consulting.co.uk> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import os import re import cPickle as pickle from mercurial import ...
apache-2.0
4,155,353,966,522,496,500
34.891676
80
0.492836
false
scith/htpc-manager_ynh
sources/libs/cherrypy/test/test_routes.py
22
2383
import os curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import cherrypy from cherrypy.test import helper import nose class RoutesDispatchTest(helper.CPWebCase): def setup_server(): try: import routes except ImportError: raise nose.SkipTest('Install route...
gpl-3.0
732,328,340,054,777,500
30.773333
79
0.55854
false
QualiSystems/Ansible-Shell
package/cloudshell/cm/ansible/domain/temp_folder_scope.py
1
1075
import os from .file_system_service import FileSystemService from logging import Logger class TempFolderScope(object): def __init__(self, file_system, logger): """ :type file_system: FileSystemService :type logger: Logger """ self.file_system = file_system self.logg...
apache-2.0
2,545,673,079,394,849,300
34.866667
90
0.630698
false
eamars/shadowsocks
tests/nose_plugin.py
1072
1164
#!/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
7,752,022,061,003,969,000
26.069767
75
0.701031
false
sargas/scipy
scipy/weave/examples/md5_speed.py
3
2569
""" Storing actual strings instead of their md5 value appears to be about 10 times faster. >>> md5_speed.run(200,50000) md5 build(len,sec): 50000 0.870999932289 md5 retrv(len,sec): 50000 0.680999994278 std build(len,sec): 50000 0.259999990463 std retrv(len,sec): 50000 0.0599999427795 This test actually takes several ...
bsd-3-clause
6,058,637,610,128,392,000
27.230769
73
0.645387
false
BellScurry/gem5-fault-injection
src/python/m5/main.py
9
14422
# Copyright (c) 2005 The Regents of The University of Michigan # 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 ...
bsd-3-clause
8,299,503,101,823,709,000
33.668269
81
0.619262
false
napkindrawing/ansible
lib/ansible/plugins/callback/logstash.py
22
6893
# (C) 2016, Ievgen Khmelenko <ujenmr@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 later ver...
gpl-3.0
6,037,096,040,697,717,000
31.980861
83
0.566807
false
zuowang/incubator-hawq
tools/bin/gppylib/commands/dca.py
54
1705
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2011. All Rights Reserved. # """ Module for commands that are DCA specific """ import os from gppylib.gplog import get_default_logger from base import Command, LOCAL, REMOTE logger = get_default_logger() # NOTE THIS IS A CHECK FOR 1040 or later appliance def is...
apache-2.0
8,576,588,073,601,996,000
27.898305
67
0.592375
false
bksim/chinese-translation
nltk/metrics/scores.py
5
7814
# Natural Language Toolkit: Evaluation # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function from itertools import iz...
apache-2.0
351,886,317,692,098,500
33.27193
88
0.642437
false
damdam-s/OpenUpgrade
addons/mass_mailing/tests/test_mail.py
388
1221
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
8,265,798,047,625,629,000
41.103448
80
0.620803
false
youprofit/zato
code/zato-common/src/zato/common/util.py
6
44974
# -*- coding: utf-8 -*- """ Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import copy, errno, gc, inspect, json, linecache, logging, os, random, r...
gpl-3.0
-2,609,610,930,229,438,000
33.944833
132
0.571997
false
rohitwaghchaure/frappe-alec
frappe/website/permissions.py
28
2434
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def remove_empty_permissions(): permissions_cache_to_be_cleared = frappe.db.sql_list("""select distinct user from `tabWebsite Route Permission` where ifnull...
mit
533,428,006,666,393,800
30.61039
86
0.692687
false
nexusz99/boto
boto/ses/exceptions.py
151
1830
""" Various exceptions that are specific to the SES module. """ from boto.exception import BotoServerError class SESError(BotoServerError): """ Sub-class all SES-related errors from here. Don't raise this error directly from anywhere. The only thing this gets us is the ability to catch SESErrors separ...
mit
-4,281,894,817,755,082,000
21.875
81
0.698361
false
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/production_ml/labs/samples/contrib/azure-samples/databricks-pipelines/databricks_notebook_pipeline.py
3
5367
"""Import a notebook into a Databricks workspace and submit a job run to execute it in a cluster. Notebook will accept some parameters and access a file in DBFS and some secrets in a secret scope. """ from pathlib import Path import base64 import kfp.dsl as dsl import kfp.compiler as compiler import databricks def cre...
apache-2.0
-8,546,186,863,759,329,000
31.137725
98
0.631079
false
celiafish/VisTrails
vistrails/core/modules/abstraction.py
2
8400
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
bsd-3-clause
6,886,101,278,988,253,000
47.837209
106
0.580119
false
shivarammysore/faucet
faucet/check_faucet_config.py
7
2275
#!/usr/bin/env python """Standalone script to check FAUCET configuration, return 0 if provided config OK.""" # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed unde...
apache-2.0
-7,007,769,032,501,777,000
31.971014
86
0.663736
false
eos87/Booktype
lib/booktype/convert/assets.py
7
2181
# This file is part of Booktype. # Copyright (c) 2013 Borko Jandras <borko.jandras@sourcefabric.org> # # Booktype 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 # (a...
agpl-3.0
7,956,055,558,859,131,000
32.045455
105
0.663916
false
sajeeshcs/nested_quota_final
nova/ipv6/account_identifier.py
97
1952
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-1,095,685,927,883,627,900
37.27451
78
0.667008
false
krkini16/Floascope
server.py
1
1533
from flask import Flask import eventlet eventlet.monkey_patch() from flask import render_template from sniffer import Sniffer from flask_socketio import SocketIO, emit import argparse PORT = 8000 app = Flask(__name__) app.config['SECRET_KEY'] = 'kmh_floascope' socketio = SocketIO(app, async_mode="eventlet") app.debug ...
mit
-2,521,627,182,634,455,000
24.55
108
0.675799
false
TwinkleChawla/nova
nova/api/openstack/compute/extended_status.py
24
2633
# Copyright 2011 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 a...
apache-2.0
-3,797,333,930,282,630,000
36.084507
79
0.647171
false
sysadminmatmoz/odoo-clearcorp
product_category_code/__init__.py
3
1059
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
agpl-3.0
-5,515,819,379,399,347,000
45.086957
78
0.610954
false
alexanderturner/ansible
lib/ansible/modules/cloud/amazon/ec2.py
10
62187
#!/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 distributed...
gpl-3.0
8,160,491,159,207,863,000
36.666263
442
0.605512
false
nitin-cherian/LifeLongLearning
Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/IPython/lib/inputhook.py
12
23594
# coding: utf-8 """ Deprecated since IPython 5.0 Inputhook management for GUI event loop integration. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. try: import ctypes except ImportError: ctypes = None except SystemError: # IronPython issue, 2/8/2014 ...
mit
198,810,192,360,309,100
34.426426
116
0.611088
false
davidbuzz/ardupilot
Tools/ardupilotwaf/boards.py
1
30037
#!/usr/bin/env python # encoding: utf-8 from collections import OrderedDict import sys, os import fnmatch import waflib from waflib import Utils from waflib.Configure import conf _board_classes = {} _board = None class BoardMeta(type): def __init__(cls, name, bases, dct): super(BoardMeta, cls).__init__(...
gpl-3.0
5,604,133,191,178,550,000
29.870504
203
0.526051
false
Harunx9/Transaltors
Lexer/Lexer/env/Lib/site-packages/pip/_vendor/html5lib/html5parser.py
310
117029
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import with_metaclass import types from . import inputstream from . import tokenizer from . import treebuilders from .treebuilders._base import Marker from . import utils from . import constants from .constants import spaceChara...
mit
3,425,835,429,953,337,300
42.13638
118
0.544156
false
Alwnikrotikz/visvis.dev
core/events.py
5
18145
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. """ Module events Defines the events and a timer class. """ import sys import time import traceback import weakref class CallableObject: ...
bsd-3-clause
7,537,723,742,780,408,000
26.450832
80
0.530008
false
sharoonthomas/fulfil-python-api
fulfil_client/signals.py
2
1553
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop. :copyright: (c) 2018 Fulfil.IO Inc. The blinker fallback code is inspired by Armin's implementation on Flask. :copyright: (c) 2015 by Armin...
isc
-472,426,181,890,298,750
31.354167
71
0.612363
false
tximikel/kuma
vendor/packages/logilab/common/deprecation.py
92
7417
# copyright 2003-2012 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 General Public License as publ...
mpl-2.0
8,762,382,446,301,548,000
38.243386
87
0.620601
false
sbalun/namebench
nb_third_party/dns/tsig.py
215
7851
# Copyright (C) 2001-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,920,231,732,224,256,000
35.347222
81
0.635333
false
adamchainz/ansible
lib/ansible/modules/network/dellos10/dellos10_command.py
46
7522
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2017 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
gpl-3.0
-8,384,145,032,778,589,000
29.827869
83
0.650758
false
crdrost/fm-demo
accumulators.py
1
3054
import itertools ''' An `accumulator` adds some push-based stream semantics to Python iterators, which are pull-based (they do stuff when you ask for values, not when data is available). To do this we define an accumulator as a function from iterators to iterators, where the output iterator will make exactly one reque...
mpl-2.0
-6,240,679,903,793,889,000
35.795181
97
0.645056
false
vied12/superdesk
server/superdesk/commands/rebuild_elastic_index.py
1
1856
# -*- 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 superd...
agpl-3.0
2,689,080,870,052,166,000
39.347826
90
0.667565
false
kanagasabapathi/python-for-android
python-modules/twisted/twisted/conch/test/test_openssh_compat.py
60
3381
# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.openssh_compat}. """ import os from twisted.trial.unittest import TestCase from twisted.python.filepath import FilePath from twisted.python.compat import set try: import Crypto.Cipher.DES3 import ...
apache-2.0
2,300,305,429,708,760,000
32.147059
79
0.647146
false
kostyll/usb-flash-network-monitor
server/indexpage.py
2
23167
import html from html import * from copy import deepcopy import web_face_gen_templatete from web_face_gen_templatete import render_html from utils import _ DEBUG = web_face_gen_templatete.DEBUG class rendered(object): def __call__(self,func): def wrapper(class_instance,ctx): context = deepco...
mit
8,339,156,264,657,054,000
48.714592
169
0.361462
false
jchanvfx/bpNodeGraph
NodeGraphQt/widgets/properties_bin.py
1
6926
#!/usr/bin/python from NodeGraphQt import QtWidgets, QtCore, QtGui, QtCompat from NodeGraphQt.widgets.properties import NodePropWidget class PropertiesDelegate(QtWidgets.QStyledItemDelegate): def paint(self, painter, option, index): """ Args: painter (QtGui.QPainter): opt...
mit
8,317,684,385,320,458,000
32.298077
77
0.566705
false
aabadie/scikit-learn
sklearn/utils/tests/test_testing.py
24
7902
import warnings import unittest import sys from nose.tools import assert_raises from sklearn.utils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_equal, set_random_state, assert_raise_message, ig...
bsd-3-clause
-6,105,728,323,976,568,000
32.914163
79
0.656036
false
msegado/edx-platform
lms/djangoapps/instructor/tests/utils.py
121
2732
""" Utilities for instructor unit tests """ import datetime import json import random from django.utils.timezone import utc from util.date_utils import get_default_time_display class FakeInfo(object): """Parent class for faking objects used in tests""" FEATURES = [] def __init__(self): for featur...
agpl-3.0
-1,175,585,858,115,970,800
28.376344
91
0.593704
false
ak2703/edx-platform
lms/djangoapps/instructor/features/common.py
63
4609
""" Define common steps for instructor dashboard acceptance tests. """ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from __future__ import absolute_import from lettuce import world, step from mock import patch from nose.tools import assert_in # pylint: disable=no-name-in-module from c...
agpl-3.0
-3,228,770,466,886,106,000
33.140741
87
0.645476
false
matthiasdiener/spack
var/spack/repos/builtin/packages/r-desolve/package.py
5
1817
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
7,118,987,011,877,411,000
46.815789
78
0.681893
false
Khan/agar
lib/unittest2/test/test_functiontestcase.py
122
5570
import unittest2 from unittest2.test.support import LoggingResult class Test_FunctionTestCase(unittest2.TestCase): # "Return the number of tests represented by the this test object. For # unittest2.TestCase instances, this will always be 1" def test_countTestCases(self): test = unittest2.Functio...
mit
-5,134,299,802,133,616,000
36.38255
78
0.640754
false
pheelee/tinynfogen
libs/enzyme/mkv.py
163
30439
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # Copyright 2003-2006 Jason Tackaberry <tack@urandom.ca> # # This file is part of enzyme. # # en...
gpl-2.0
1,115,094,374,092,317,600
35.236905
109
0.566116
false
TaiwanStat/real.taiwanstat.com
wind-weather/update_data10hpa.py
1
2850
import sys import subprocess import datetime ''' http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_1p00.pl?dir=%2Fgfs.2015051406 http://www.nco.ncep.noaa.gov/pmb/products/gfs/gfs.t00z.pgrbf00.grib2.shtml ''' import os base_dir = os.path.dirname(os.path.abspath(__file__)) os.chdir(base_dir) i = (datetime.datetime.now() - ...
mit
-6,616,466,082,712,689,000
39.714286
203
0.670526
false
njwilson23/rasterio
examples/total.py
7
1277
import numpy import rasterio import subprocess with rasterio.drivers(CPL_DEBUG=True): # Read raster bands directly to Numpy arrays. with rasterio.open('tests/data/RGB.byte.tif') as src: r, g, b = src.read() # Combine arrays using the 'iadd' ufunc. Expecting that the sum will # exceed the 8-bi...
bsd-3-clause
-1,124,811,744,500,072,300
32.605263
75
0.669538
false
scriptnull/coala
coalib/misc/StringConverter.py
2
4772
from collections import Iterable, OrderedDict import re from coalib.misc import Constants from coalib.parsing.StringProcessing import (unescaped_split, unescaped_strip, unescape) class StringConverter: """ Converts strin...
agpl-3.0
-2,037,965,668,950,800,100
31.684932
79
0.544216
false
maclandrol/ete
ete2/nexml/_nexml.py
3
749187
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # t...
gpl-3.0
-1,944,905,481,634,956,000
45.380672
186
0.601387
false
phobson/statsmodels
statsmodels/sandbox/tsa/movstat.py
34
14871
'''using scipy signal and numpy correlate to calculate some time series statistics original developer notes see also scikits.timeseries (movstat is partially inspired by it) added 2009-08-29 timeseries moving stats are in c, autocorrelation similar to here I thought I saw moving stats somewhere in python, maybe not)...
bsd-3-clause
8,793,057,058,855,931,000
34.833735
109
0.501984
false
mattmccarthy11/vidly-development
bk/mediadrop/lib/tests/players_test.py
10
1427
# -*- coding: utf-8 -*- # This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code in this file is dual licensed under the MIT license or # the GPLv3 or (at your option) any later version. ...
gpl-3.0
-5,284,924,251,811,783,000
39.771429
76
0.702873
false
Wen777/beets
beets/util/functemplate.py
16
19245
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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
-101,856,990,673,709,700
32.704028
79
0.570538
false
MariaSolovyeva/inasafe
safe/impact_functions/volcanic/volcano_point_building/impact_function.py
2
8807
# coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Volcano Point on Building Impact Function. Contact : ole.moller.nielsen@gmail.com .. note:: 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 Soft...
gpl-3.0
-7,143,313,462,268,060,000
36.961207
78
0.590099
false
somehume/wavefu
src/python/api/django_oauth.py
9
4076
#!/usr/bin/python2.4 # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
-684,923,610,145,496,000
35.720721
91
0.728901
false
GeyerA/android_external_chromium_org
build/extract_from_cab.py
51
2058
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Extracts a single file from a CAB archive.""" import os import shutil import subprocess import sys import tempfile def run_qui...
bsd-3-clause
5,800,780,010,886,944,000
31.666667
80
0.702138
false
Johnetordoff/osf.io
api_tests/providers/preprints/views/test_preprint_provider_list.py
13
3037
import mock import pytest from waffle.testutils import override_switch from osf import features from api.base.settings.defaults import API_BASE from osf_tests.factories import ( AuthUserFactory, PreprintProviderFactory, ) @pytest.fixture(params=['/{}preprint_providers/?version=2.2&', '/{}providers/preprints/?...
apache-2.0
-1,628,141,364,614,244,400
32.01087
106
0.645044
false
wireservice/agate
tests/test_py3.py
1
7971
#!/usr/bin/env python # -*- coding: utf-8 -*- import csv import six import os try: import unittest2 as unittest except ImportError: import unittest from agate import csv_py3 from agate.exceptions import FieldSizeLimitError @unittest.skipIf(six.PY2, "Not supported in Python 2.") class TestReader(unittest.Te...
mit
6,415,743,156,098,564,000
30.375494
112
0.531116
false
otsaloma/pan-bikes
providers/test/test_hsl.py
1
1746
# -*- coding: utf-8 -*- # Copyright (C) 2017 Osmo Salomaa # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pr...
gpl-3.0
-664,667,520,893,831,800
33.235294
71
0.655785
false
ecosoft-odoo/odoo
openerp/report/render/rml.py
457
3244
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
2,985,192,007,941,506,600
33.510638
117
0.638409
false
sarakha63/persomov
libs/git/repository.py
109
20401
# Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com> # 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 li...
gpl-3.0
-3,482,014,355,300,039,700
44.134956
118
0.591197
false
QingChenmsft/azure-cli
src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py
4
8044
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
1,069,968,979,070,967,800
41.560847
154
0.623322
false
jemmyw/ansible
lib/ansible/plugins/callback/oneline.py
144
3487
# (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
-1,577,456,518,478,467,300
45.493333
161
0.643246
false
ryfeus/lambda-packs
Keras_tensorflow/source/tensorflow/python/debug/cli/offline_analyzer.py
16
2561
# 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...
mit
-5,667,775,896,312,566,000
31.833333
80
0.659118
false
naturali/tensorflow
tensorflow/python/kernel_tests/stack_ops_test.py
21
5173
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-4,666,431,057,331,929,000
35.95
80
0.64334
false
mattclay/ansible
lib/ansible/inventory/group.py
22
9603
# (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
4,227,640,101,337,740,300
32.34375
157
0.577007
false
okor/thumbor
tests/error_handlers/test_file.py
7
4551
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com import json import tempfile from preggy import expect from thumbor...
mit
7,503,229,424,551,974,000
29.959184
102
0.535487
false
moreati/django
django/contrib/admin/templatetags/admin_urls.py
553
1812
from django import template from django.contrib.admin.utils import quote from django.core.urlresolvers import Resolver404, get_script_prefix, resolve from django.utils.http import urlencode from django.utils.six.moves.urllib.parse import parse_qsl, urlparse, urlunparse register = template.Library() @register.filter ...
bsd-3-clause
2,418,852,975,091,757,600
31.945455
93
0.671634
false
d40223223/2015cdb_g6-team
static/Brython3.1.1-20150328-091302/Lib/_imp.py
625
2115
"""(Extremely) low-level import machinery bits as used by importlib and imp.""" class __loader__(object):pass def _fix_co_filename(*args,**kw): raise NotImplementedError("%s:not implemented" % ('_imp.py:_fix_co_filename')) def acquire_lock(*args,**kw): """acquire_lock() -> None Acquires the interpreter's...
gpl-3.0
29,880,410,602,242,250
38.166667
122
0.685579
false
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Cython-0.22.1/tests/run/for_in_iter.py
26
2837
# mode: run # tag: forin import sys import cython try: from builtins import next except ImportError: def next(it): return it.next() def for_in_pyiter_pass(it): """ >>> it = Iterable(5) >>> for_in_pyiter_pass(it) >>> next(it) Traceback (most recent call last): StopIteration ...
mit
-1,638,258,002,163,644,400
20.330827
55
0.47797
false
Ma233/django-xadmin-fonts
setup.py
19
1635
#!/usr/bin/env python from setuptools import setup # version_tuple = __import__('xadmin.version').VERSION # version = ".".join([str(v) for v in version_tuple]) setup( name='django-xadmin', version='0.5.0', description='Drop-in replacement of Django admin comes with lots of goodies, fully extensible with p...
bsd-3-clause
4,567,632,696,779,578,400
36.159091
158
0.615902
false
justinpotts/mozillians
mozillians/users/migrations/0058_auto__add_field_userprofile_geo_country__add_field_userprofile_geo_reg.py
3
16957
# -*- 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 'UserProfile.geo_country' db.add_column('profile', 'geo_country', self....
bsd-3-clause
5,857,814,047,486,598,000
76.429224
226
0.546913
false
Architektor/PySnip
venv/lib/python2.7/site-packages/twisted/spread/ui/tkutil.py
11
12919
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Utilities for building L{PB<twisted.spread.pb>} clients with L{Tkinter}. """ from Tkinter import ( ACTIVE, Button, Canvas, E, END, Entry, Frame, Label, LEFT, Listbox, mainloop, N, S, StringVar, Toplevel, Tk, W) from tkSimpleDialog impor...
gpl-3.0
3,900,782,560,477,357,600
31.541562
90
0.561963
false
ianstalk/Flexget
flexget/components/tmdb/api.py
2
5008
from flask import jsonify from flask_restx import inputs from flexget import plugin from flexget.api import APIResource, api from flexget.api.app import BadRequest, NotFoundError, etag tmdb_api = api.namespace('tmdb', description='TMDB lookup endpoint') class ObjectsContainer: poster_object = { 'type': ...
mit
6,849,651,799,074,813,000
32.837838
97
0.527955
false
dendisuhubdy/tensorflow
tensorflow/contrib/linear_optimizer/__init__.py
158
1308
# 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
4,466,800,726,282,348,000
39.875
100
0.742355
false
Yannig/ansible
lib/ansible/modules/packaging/language/bundler.py
12
7076
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Tim Hoiberg <tim.hoiberg@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 = {'metadata_version': '1.1', ...
gpl-3.0
-2,652,761,394,970,442,000
31.911628
106
0.650085
false
wizkid057/eloipool
bitcoin/txn.py
16
4465
# Eloipool - Python Bitcoin pool server # Copyright (C) 2011-2012 Luke Dashjr <luke-jr+eloipool@utopios.org> # # 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 # L...
agpl-3.0
-4,985,720,360,342,966,000
29.582192
110
0.668981
false
IV-GII/SocialCookies
ENV1/lib/python2.7/site-packages/django/contrib/gis/db/models/sql/where.py
118
3987
from django.db.models.constants import LOOKUP_SEP from django.db.models.fields import FieldDoesNotExist from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sql.where import Constraint, WhereNode from django.contrib.gis.db.models.fields import GeometryField class GeoConstraint(Constraint): ...
gpl-2.0
1,616,657,416,054,123,000
42.813187
89
0.638826
false
JioCloud/horizon
openstack_dashboard/test/test_data/glance_data.py
2
8133
# Copyright 2012 Nebula, 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 agree...
apache-2.0
6,121,455,572,586,872,000
41.581152
78
0.478421
false
skevy/django
django/contrib/auth/models.py
2
18017
import datetime import hashlib import urllib from django.contrib import auth from django.contrib.auth.signals import user_logged_in from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.manager import EmptyManager from django.contrib.contenttypes.models import Conte...
bsd-3-clause
-1,978,428,257,980,205,800
38.860619
367
0.63207
false
mheap/ansible
test/units/module_utils/urls/test_generic_urlparse.py
144
1919
# -*- coding: utf-8 -*- # (c) 2018 Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.module_utils.urls import generic_urlparse from ansible.module_u...
gpl-3.0
-892,557,624,600,443,800
32.666667
92
0.701928
false
v-iam/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/service_type_health_policy.py
2
3884
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-720,340,589,298,986,400
53.704225
153
0.720134
false
40023256/2015cdag1man
static/Brython3.1.3-20150514-095342/Lib/unittest/test/test_suite.py
791
12066
import unittest import sys from .support import LoggingResult, TestEquality ### Support code for Test_TestSuite ################################################################ class Test(object): class Foo(unittest.TestCase): def test_1(self): pass def test_2(self): pass def test_3(self...
gpl-3.0
-103,806,423,116,763,330
31.788043
86
0.594563
false
niieani/rethinkdb
external/gtest_1.6.0/test/gtest_xml_outfiles_test.py
2526
5340
#!/usr/bin/env python # # Copyright 2008, 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...
agpl-3.0
376,496,266,199,360,300
39.454545
140
0.699625
false
camradal/ansible
lib/ansible/modules/notification/sendgrid.py
9
9032
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Makai <matthew.makai@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 ...
gpl-3.0
-2,279,522,992,965,938,200
31.843636
188
0.629318
false