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
micwypych/github-cmake-project-checker
project_checker/tests/studentprojecttest.py
1
2674
from unittest import TestCase from unittest.mock import MagicMock from project_checker.checker.project import StudentProject class ReportTest(TestCase): def test_result_ranking_of_two_labs(self): r1 = MagicMock(report={'lab1_ex1': 0, 'lab1_ex2': 2, 'lab1_ex3': 0}, __getitem__=lambd...
mit
-5,848,522,784,214,554,000
51.431373
122
0.636874
false
damdam-s/partner-contact
portal_partner_merge/__openerp__.py
15
1376
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
-8,885,114,962,480,289,000
37.222222
78
0.614099
false
mgraupe/acq4
acq4/devices/DAQGeneric/DOChannelTemplate.py
3
5756
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DOChannelTemplate.ui' # # Created: Sun Feb 22 13:29:09 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exc...
mit
8,225,729,153,040,414,000
42.606061
96
0.687109
false
azureplus/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/admindocs/tests/test_fields.py
111
1192
from __future__ import absolute_import, unicode_literals from django.contrib.admindocs import views from django.db import models from django.db.models import fields from django.utils import unittest from django.utils.translation import ugettext as _ class CustomField(models.Field): description = "A custom field ...
apache-2.0
-7,971,042,608,818,485,000
27.380952
74
0.642617
false
todaychi/hue
desktop/core/ext-py/Django-1.6.10/django/utils/translation/trans_null.py
119
1990
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. from django.conf import settings from django.utils.encoding import force_text from django.ut...
apache-2.0
5,080,365,982,834,172,000
30.587302
77
0.731156
false
NixaSoftware/CVis
venv/lib/python2.7/site-packages/setuptools/monkey.py
39
5789
""" Monkey patching of distutils. """ import sys import distutils.filelist import platform import types import functools from importlib import import_module import inspect from setuptools.extern import six import setuptools __all__ = [] """ Everything is private. Contact the project team if you think you need this ...
apache-2.0
-4,296,069,666,140,777,000
28.385787
78
0.663327
false
imsplitbit/nova
nova/tests/integrated/api_samples_test_base.py
10
13015
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # 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...
apache-2.0
-6,391,338,843,755,152,000
39.927673
79
0.509335
false
melviso/phycpp
beatle/activity/models/ui/pane/PyModulePane.py
2
12276
# -*- coding: utf-8 -*- """Subclass of PyModulePane, which is generated by wxFormBuilder.""" #import wx import wx.stc from beatle import tran, localpath from beatle.ctx import THE_CONTEXT as context from beatle.app.ui import pane, dlg from beatle.lib.handlers import Identifiers from beatle.activity.models.ui import ...
gpl-2.0
8,699,776,043,122,229,000
37.603774
123
0.60158
false
hyperized/ansible
lib/ansible/module_utils/docker/common.py
13
41043
# # Copyright 2016 Red Hat | Ansible # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
gpl-3.0
-2,313,762,744,370,426,000
39.317289
142
0.558366
false
fayf/pyload
module/plugins/hoster/MegaCoNz.py
14
8273
# -*- coding: utf-8 -*- import array import os # import pycurl import random import re from base64 import standard_b64decode from Crypto.Cipher import AES from Crypto.Util import Counter from module.common.json_layer import json_loads, json_dumps from module.plugins.internal.Hoster import Hoster from module.utils i...
gpl-3.0
75,720,038,548,672,740
36.265766
224
0.546235
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/archiveuploader/tests/test_nascentupload.py
1
5083
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test NascentUpload functionality.""" __metaclass__ = type from testtools import TestCase from testtools.matchers import MatchesStructure from lp.archiveuploader.changesf...
agpl-3.0
1,737,089,366,364,711,200
35.307143
78
0.661224
false
iambibhas/django
tests/admin_custom_urls/tests.py
6
5517
from __future__ import unicode_literals from django.contrib.admin.utils import quote from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase, override_settings from .models import Action, Person, Car @override_settings(PASSWORD_HASHERS=('dj...
bsd-3-clause
-2,435,715,907,686,626,300
39.866667
98
0.63259
false
primiano/blink-gitcs
Source/bindings/scripts/compute_interfaces_info_individual.py
5
13781
#!/usr/bin/python # # Copyright (C) 2013 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
-2,025,943,132,070,951,200
45.244966
212
0.668311
false
pwong-mapr/private-hue
desktop/core/ext-py/elementtree/setup.py
45
1306
#!/usr/bin/env python # # Setup script for the elementtree library # $Id: setup.py 2326 2005-03-17 07:45:21Z fredrik $ # # Usage: python setup.py install # from distutils.core import setup try: # add download_url syntax to distutils from distutils.dist import DistributionMetadata DistributionMetadata.clas...
apache-2.0
1,262,741,445,518,790,100
28.681818
71
0.691424
false
savoirfairelinux/OpenUpgrade
addons/website_mail/models/mail_message.py
27
4601
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # 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
2,863,038,646,190,860,000
50.696629
212
0.617474
false
DURAARK/duraark-pointcloud-viewer
lastools/ArcGIS_toolbox/scripts_production/lasboundaryPro.py
1
5636
# # lasboundaryPro.py # # (c) 2013, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # uses lasboundary.exe to compute a boundary polygon for the # points. This is a concave hull of the points with a "concavity" # defined by the user that is 50 m (or 150 ft) by default. It i...
mit
3,605,801,258,602,662,400
27.464646
130
0.660575
false
zhhf/charging
charging/tests/unit/ml2/drivers/brocade/test_brocade_mechanism_driver.py
5
2414
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
apache-2.0
556,125,703,609,272,260
33
78
0.672328
false
letuananh/beautifulsoup
bs4-python3/tests/test_lxml.py
16
2962
"""Tests to ensure that the lxml tree builder generates good trees.""" import re import warnings try: import lxml.etree LXML_PRESENT = True LXML_VERSION = lxml.etree.LXML_VERSION except ImportError as e: LXML_PRESENT = False LXML_VERSION = (0,) if LXML_PRESENT: from bs4.builder import LXMLTre...
mit
-7,859,285,333,474,280,000
31.549451
86
0.649899
false
yongtang/tensorflow
tensorflow/python/kernel_tests/linalg/linear_operator_block_lower_triangular_test.py
14
12091
# Copyright 2020 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
105,083,119,243,628,430
39.847973
105
0.676619
false
anand-c-goog/tensorflow
tensorflow/python/kernel_tests/array_ops_test.py
3
33485
# 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,078,277,621,589,218,000
36.413408
80
0.598119
false
CKehl/pylearn2
pylearn2/sampling/remove_samples.py
1
6030
''' Created on Apr 16, 2015 @author: christian ''' from optparse import OptionParser import numpy import os from os import listdir from os.path import isfile, join import cPickle import glob def unpickle(file): fo = open(file, 'rb') dictionary = cPickle.load(fo) fo.close() return dictionary if __na...
bsd-3-clause
-4,077,327,466,683,873,000
34.05814
141
0.587728
false
jjscarafia/odoo
openerp/tools/mail.py
1
29387
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2012-TODAY OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
529,717,719,563,844,700
42.536296
174
0.553476
false
hsbhathiya/stratos
components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/gen/ThriftSecureEventTransmissionService/ThriftSecureEventTransmissionService.py
17
47704
# 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 u...
apache-2.0
-9,034,030,914,786,004,000
30.718085
188
0.651119
false
newswangerd/ansible
lib/ansible/plugins/loader.py
8
55324
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others # (c) 2017, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ...
gpl-3.0
4,573,200,731,788,875,000
42.425432
157
0.624051
false
hguochen/mediapop
mediapop/mediapop/settings/local.py
58
1632
"""Development settings and globals.""" from __future__ import absolute_import from os.path import join, normpath from .base import * ########## DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-deb...
mit
7,304,981,278,894,472,000
24.5
93
0.661765
false
lewisc/spark-tk
regression-tests/generatedata/movie_user_5ratings.py
14
1717
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
4,140,875,695,712,233,500
20.853333
78
0.622331
false
wazeerzulfikar/scikit-learn
examples/model_selection/plot_grid_search_digits.py
56
2761
""" ============================================================ Parameter estimation using grid search with cross-validation ============================================================ This examples shows how a classifier is optimized by cross-validation, which is done using the :class:`sklearn.model_selection.GridS...
bsd-3-clause
-6,329,792,344,676,367,000
33.5125
78
0.655197
false
sudarkoff/ansible
contrib/inventory/proxmox.py
74
5579
#!/usr/bin/env python # Copyright (C) 2014 Mathieu GAUTHIER-LAFAYE <gauthierl@lapth.cnrs.fr> # # 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 op...
gpl-3.0
1,716,725,734,240,943,600
29.994444
96
0.629145
false
myangeline/pygame
flightgame/plane.py
1
1930
# _*_ coding:utf-8 _*_ import random import pygame __author__ = 'Administrator' class Plane(): def __init__(self, width, height, value, image, type): self.width = width self.height = height self.value = value self.image = image self.type = type self.rect = pygame.R...
apache-2.0
-79,476,545,461,662,660
28.707692
81
0.53886
false
ethguo/xpify
legacy/main - LEGACY (S).py
1
34036
#!/usr/bin/env python ### # XPify - An application to gamify learning. # Version: DEV # Timestamp: NULL # # Written by Ethan Guo # Using Google App Engine and the webapp2 framework # ### ### IMPORTS ### import time import uuid import cgi import webapp2 from google.appengine.ext.webapp import util from google.app...
gpl-3.0
-1,486,731,001,866,950,000
33.766088
139
0.666118
false
toshywoshy/ansible
lib/ansible/modules/network/ios/ios_system.py
18
12129
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
851,267,599,762,547,600
30.918421
102
0.592464
false
shail2810/nova
nova/servicegroup/drivers/zk.py
49
8221
# Copyright (c) AT&T 2012-2013 Yun Mao <yunmao@gmail.com> # Copyright 2012 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 # # Unle...
apache-2.0
8,283,415,193,996,450,000
40.105
79
0.567692
false
arangodb/arangodb
3rdParty/V8/gypfiles/broken/verify_source_deps.py
2
4450
#!/usr/bin/env python # Copyright 2015 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Script to print potentially missing source dependencies based on the actual .h and .cc files in the source tree and which files a...
apache-2.0
3,145,889,344,934,678,000
24.872093
77
0.642247
false
golismero/golismero
plugins/testing/recon/punkspider.py
5
5708
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = """ GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Golismero project site: https://github.com/golismero Golismero project mail: contact@golismero-project.com This program is free software; you can redistribute it and/or modify it under the terms of...
gpl-2.0
-4,865,292,197,255,436,000
34.675
79
0.531359
false
fxtentacle/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/outputtee_unittest.py
124
1987
# Copyright (C) 2012 Zan Dobersek <zandobersek@gmail.com> # # 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 t...
bsd-3-clause
-7,379,613,120,402,263,000
45.209302
72
0.75994
false
adamkh/kivy
kivy/config.py
2
30423
''' Configuration object ==================== The :class:`Config` object is an instance of a modified Python ConfigParser. See the `ConfigParser documentation <http://docs.python.org/library/configparser.html>`_ for more information. Kivy has a configuration file which determines the default settings. In order to cha...
mit
-611,994,835,104,639,000
37.558935
79
0.616672
false
liucode/tempest-master
tempest/scenario/test_server_basic_ops.py
1
6234
# Copyright 2012 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
5,100,954,249,495,509,000
41.69863
79
0.591594
false
jcoliver/OSUScratchpads
sites/all/libraries/mediaelement/src/Builder.py
14
4203
import sys import os import shutil me_filename = 'mediaelement' mep_filename = 'mediaelementplayer' combined_filename = 'mediaelement-and-player' # BUILD MediaElement (single file) print('building MediaElement.js') me_files = [] me_files.append('me-header.js') me_files.append('me-namespace.js') me_file...
gpl-2.0
-4,207,544,131,139,605,500
30.330769
140
0.650726
false
Anonymous-X6/django
tests/mail/test_sendtestemail.py
327
3088
from __future__ import unicode_literals from django.core import mail from django.core.management import call_command from django.test import SimpleTestCase, override_settings @override_settings( ADMINS=(('Admin', 'admin@example.com'), ('Admin and Manager', 'admin_and_manager@example.com')), MANAGERS=(('Manag...
bsd-3-clause
-4,849,351,667,732,678,000
35.761905
106
0.613666
false
liusen09003110-163-com/linux
tools/perf/scripts/python/syscall-counts.py
1996
1700
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
2,748,624,274,754,344,400
25.5625
77
0.634118
false
MarekSuchanek/repocribro
repocribro/controllers/webhooks.py
1
1567
import flask from ..models import Repository webhooks = flask.Blueprint('webhooks', __name__, url_prefix='/webhook/github') @webhooks.route('', methods=['POST']) def gh_webhook(): """Point for GitHub webhook msgs (POST handler)""" db = flask.current_app.container.get('db') ext_master = flask.current_app...
mit
1,850,935,231,306,624,300
31.645833
78
0.634333
false
GdZ/scriptfile
software/googleAppEngine/lib/django_1_4/tests/modeltests/custom_pk/tests.py
34
5733
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.db import transaction, IntegrityError from django.test import TestCase, skipIfDBFeature from .models import Employee, Business, Bar, Foo class CustomPKTests(TestCase): def test_custom_pk(self): dan = Employee.objects.create( ...
mit
6,608,729,773,741,134,000
30.662983
92
0.54528
false
ChromiumWebApps/chromium
third_party/closure_linter/closure_linter/not_strict_test.py
142
2332
#!/usr/bin/env python # # Copyright 2011 The Closure Linter Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
bsd-3-clause
-8,877,382,859,558,854,000
30.513514
78
0.681818
false
idrogeno/enigma2
lib/python/Components/Converter/ClockToText.py
30
3734
from Converter import Converter from time import localtime, strftime from Components.Element import cached class ClockToText(Converter, object): DEFAULT = 0 WITH_SECONDS = 1 IN_MINUTES = 2 DATE = 3 FORMAT = 4 AS_LENGTH = 5 TIMESTAMP = 6 FULL = 7 SHORT_DATE = 8 LONG_DATE = 9 VFD = 10 AS_LENGTHHOURS = 11 AS...
gpl-2.0
-3,796,398,393,066,045,400
28.872
132
0.643546
false
mrknow/filmkodi
plugin.video.fanfilm/resources/lib/libraries/cachemeta.py
2
2532
# -*- coding: utf-8 -*- ''' FanFilm 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 ...
apache-2.0
2,694,656,886,893,859,000
28.103448
143
0.583728
false
xiaoyaozi5566/DynamicCache
src/arch/x86/isa/insts/general_purpose/flags/load_and_store.py
91
2246
# 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
-2,183,945,833,208,535,600
47.826087
72
0.787622
false
AccelAI/accel.ai
flask-aws/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py
354
3406
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
mit
-5,808,740,195,795,561,000
43.815789
79
0.681738
false
khosrow/metpx
sundew/unittests/unittest_Ingestor.py
1
2061
# -*- coding: iso-8859-1 -*- ############################################################################################# # Name: unittest_Ingestor.py # Author: Jun Hu # Date: 2012-04-30 # Description: test cases for Ingestor class ######################################################################################...
gpl-2.0
5,817,037,858,811,731,000
37.886792
94
0.6623
false
Zekom/fofix
src/Scene.py
4
3747
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire X (FoFiX) # # Copyright (C) 2006 Sami Kyöstilä ...
gpl-2.0
6,871,720,039,674,359,000
36.47
71
0.50467
false
xiandiancloud/ji
common/test/acceptance/pages/lms/courseware.py
6
1321
""" Courseware page. """ from .course_page import CoursePage class CoursewarePage(CoursePage): """ Course info. """ url_path = "courseware/" xblock_component_selector = '.vert .xblock' def is_browser_on_page(self): return self.q(css='body.courseware').present @property def ...
agpl-3.0
5,295,265,260,763,608,000
27.106383
97
0.6162
false
Work4Labs/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/delete_regress/models.py
28
1583
from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = models.ForeignKey(ContentType) content_obje...
gpl-3.0
6,071,022,743,050,361,000
28.867925
80
0.740998
false
agaffney/ansible
test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py
6
106436
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
gpl-3.0
-5,032,915,957,416,952,000
42.532106
157
0.487805
false
googleapis/python-texttospeech
samples/snippets/audio_profile_test.py
1
1085
# Copyright 2018, Google, LLC. # 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, s...
apache-2.0
6,429,958,090,097,832,000
31.878788
86
0.735484
false
tcheehow/MissionPlanner
Lib/httplib.py
50
49485
"""HTTP/1.1 client library <intro stuff goes here> <other stuff, too> HTTPConnection goes through a number of "states", which define when a client may legally make another request or fetch the response for a particular request. This diagram details these state transitions: (null) | | HTTPC...
gpl-3.0
-1,192,432,866,777,114,600
33.549569
85
0.545761
false
timvdm/Helium
test/python/bitvec.py
2
2947
import helium import unittest class TestBitvec(unittest.TestCase): def test_Fingerprint(self): fp = helium.Fingerprint(8) self.assertEqual(8, fp.numWords) fp = helium.Fingerprint(1) self.assertEqual('0000000000000000', fp.hex()) self.assertEqual('0000000000000000 000000000...
bsd-3-clause
8,816,500,402,253,032,000
34.083333
107
0.629454
false
Alt90/Student_progress_bar
progress_bar/settings.py
1
3133
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep th...
mit
-3,227,936,893,803,328,000
25.550847
91
0.665496
false
shishengjia/OnlineCourses
apps/organisation/adminx.py
1
1321
# -*- encoding: utf-8 -*- from .models import CityDict, CourseOrg, Teacher import xadmin _author_ = 'shishengjia' _date_ = '05/01/2017 13:36' class CityDictAdmin(object): list_display = ['name', 'desc', 'add_time'] search_fields = ['name', 'desc'] list_filter = ['name', 'desc', 'add_time'] class Cour...
apache-2.0
3,242,610,478,965,099,000
36.484848
130
0.640259
false
SpaceKatt/CSPLN
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/gluon/contrib/redis_session.py
11
9611
""" Developed by niphlod@gmail.com """ import redis from gluon import current from gluon.storage import Storage import time import logging import thread logger = logging.getLogger("web2py.session.redis") locker = thread.allocate_lock() def RedisSession(*args, **vars): """ Usage example: put in models f...
gpl-3.0
3,525,284,596,324,926,000
33.08156
93
0.568827
false
rlugojr/kubernetes
hack/update_owners.py
94
7705
#!/usr/bin/env python # Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-3,251,967,386,403,479,000
37.718593
120
0.614925
false
nicolaspanel/djangularjs
server/settings/base.py
1
3798
""" Django settings for server project. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ NOTE: __generator-djangularjs__ may automatically modified this file. """ # Bu...
mit
3,388,176,514,682,531,300
27.992366
105
0.694839
false
dhimmel/networkx
networkx/algorithms/bipartite/tests/test_project.py
31
13836
#!/usr/bin/env python from nose.tools import assert_equal import networkx as nx from networkx.algorithms import bipartite from networkx.testing import assert_edges_equal, assert_nodes_equal class TestBipartiteProject: def test_path_projected_graph(self): G=nx.path_graph(4) P=bipartite.projected_gr...
bsd-3-clause
-6,704,246,753,898,094,000
37.115702
104
0.496603
false
fx19880617/helix
contributors/py-helix-admin/helix/zkfunctions.py
7
22919
# # 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...
apache-2.0
8,469,143,383,561,162,000
41.442593
173
0.640647
false
rlucio/cinder-violin-driver-icehouse
cinder/volume/drivers/violin/vxg/vshare/snapshot.py
1
23168
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Violin Memory, 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 # # ...
apache-2.0
7,535,253,686,383,953,000
39.43281
78
0.524344
false
huggingface/pytorch-transformers
src/transformers/models/squeezebert/modeling_squeezebert.py
1
44192
# coding=utf-8 # Copyright 2020 The SqueezeBert authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
apache-2.0
-8,100,293,820,342,059,000
39.138056
122
0.634843
false
tklaus/ansible
lib/ansible/playbook/included_file.py
34
5081
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
2,537,304,547,961,573,400
44.774775
134
0.547924
false
CatMe0w/shadowsocks
shadowsocks/obfsplugin/http_simple.py
11
13800
#!/usr/bin/env python # # Copyright 2015-2015 breakwa11 # # 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 la...
apache-2.0
5,833,156,027,680,830,000
36.704918
353
0.57
false
Zanzibar82/streamondemand.test
channels/channels_sports/main.py
1
5373
# -*- coding: utf-8 -*- #------------------------------------------------------------ # streamondemand - XBMC Plugin # Canal para sports-main # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys from cor...
gpl-3.0
-3,297,042,805,615,267,300
38.19708
166
0.596089
false
keflavich/TurbuStat
turbustat/statistics/wavelets/wavelet_transform.py
1
13165
# Licensed under an MIT open source license - see LICENSE import numpy as np import warnings from astropy.convolution import convolve_fft, MexicanHat2DKernel import statsmodels.formula.api as sm from pandas import Series, DataFrame try: from scipy.fftpack import fftn, ifftn, fftfreq except ImportError: from ...
mit
8,550,277,107,879,780,000
30.420048
79
0.552222
false
andyxhadji/incubator-airflow
airflow/hooks/pig_hook.py
13
3181
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
-3,895,459,253,786,723,300
32.840426
73
0.573405
false
KyoungRan/Django_React_ex
Django_React_Workshop-mbrochh/django/myvenv/lib/python3.4/site-packages/pyasn1/codec/der/encoder.py
160
1139
# DER encoder from pyasn1.type import univ from pyasn1.codec.cer import encoder from pyasn1 import error class SetOfEncoder(encoder.SetOfEncoder): def _cmpSetComponents(self, c1, c2): tagSet1 = isinstance(c1, univ.Choice) and \ c1.getEffectiveTagSet() or c1.getTagSet() tagSet2 = i...
mit
-3,418,131,364,041,862
34.59375
76
0.689201
false
Yelp/fullerite
src/diamond/collectors/userscripts/userscripts.py
51
3524
# coding=utf-8 """ Runs third party scripts and collects their output. Scripts need to be +x and should output metrics in the form of ``` metric.path.a 1 metric.path.b 2 metric.path.c 3 ``` They are not passed any arguments and if they return an error code, no metrics are collected. #### Dependencies * [subproce...
apache-2.0
-2,859,930,820,702,307,300
33.891089
78
0.531215
false
ampax/edx-platform-backup
common/djangoapps/student/migrations/0004_add_email_index.py
188
7971
# encoding: 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): db.execute("create unique index email on auth_user (email)") pass def backwards(self, orm): db.execut...
agpl-3.0
1,883,257,342,709,081,000
74.914286
182
0.554008
false
nirmeshk/oh-mainline
vendor/packages/irc/irc/functools.py
22
1030
from __future__ import absolute_import, print_function, unicode_literals import functools import collections def save_method_args(method): """ Wrap a method such that when it is called, we save the args and kwargs with which it was called. >>> class MyClass(object): ... @save_method_args ...
agpl-3.0
6,809,071,395,883,889,000
27.611111
78
0.578641
false
hnarayanan/django-rest-framework
tests/test_viewsets.py
5
1240
from django.test import TestCase from rest_framework import status from rest_framework.response import Response from rest_framework.test import APIRequestFactory from rest_framework.viewsets import GenericViewSet factory = APIRequestFactory() class BasicViewSet(GenericViewSet): def list(self, request, *args, **...
bsd-2-clause
8,590,283,206,184,764,000
34.428571
79
0.624194
false
Obus/scikit-learn
sklearn/tests/test_learning_curve.py
225
10791
# Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de> # # License: BSD 3 clause import sys from sklearn.externals.six.moves import cStringIO as StringIO import numpy as np import warnings from sklearn.base import BaseEstimator from sklearn.learning_curve import learning_curve, validation_curve from sklearn.u...
bsd-3-clause
5,173,862,076,298,208,000
41.317647
75
0.611343
false
JonathanStein/odoo
addons/account/tests/test_account_move_closed_period.py
127
1623
from datetime import date from openerp.tests.common import TransactionCase from openerp.osv.orm import except_orm class TestPeriodState(TransactionCase): """ Forbid creation of Journal Entries for a closed period. """ def setUp(self): super(TestPeriodState, self).setUp() cr, uid = sel...
agpl-3.0
-963,312,942,517,087,600
38.585366
122
0.522489
false
RichardLitt/wyrd-django-dev
django/contrib/localflavor/mx/mx_states.py
110
1304
# -*- coding: utf-8 -*- """ A list of Mexican states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ # All 31 states, plus the `D...
bsd-3-clause
-7,485,673,256,291,786,000
27.217391
74
0.497689
false
Benolds/kachMIT-myo-2015
myo/utils/__init__.py
9
1097
# Copyright (c) 2015 Niklas Rosenstein # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, ...
mit
4,939,756,194,920,569,000
56.736842
79
0.78031
false
ghandiosm/Test
addons/account/tests/account_test_users.py
46
1657
from openerp.addons.account.tests.account_test_classes import AccountingTestCase class AccountTestUsers(AccountingTestCase): """Tests for diffrent type of user 'Accountant/Adviser' and added groups""" def setUp(self): super(AccountTestUsers, self).setUp() self.res_user_model = self.env['res....
gpl-3.0
5,712,050,980,016,103,000
46.342857
105
0.634882
false
darionyaphet/spark
python/pyspark/sql/tests/test_conf.py
21
2361
# # 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 us...
apache-2.0
-8,104,818,811,657,853,000
41.160714
96
0.697586
false
spring-week-topos/cinder-week
cinder/tests/api/extensions/foxinsocks.py
12
2929
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-8,401,543,320,027,122,000
31.186813
78
0.664391
false
robinro/ansible
lib/ansible/plugins/lookup/first_found.py
18
6606
# (c) 2013, seth vidal <skvidal@fedoraproject.org> red hat, inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
gpl-3.0
7,513,449,445,681,220,000
33.227979
157
0.605964
false
Axiologue/DjangoRestMultipleModels
drf_multiple_model/mixins.py
1
12380
import warnings from django.core.exceptions import ValidationError from django.db.models.query import QuerySet from rest_framework.response import Response class BaseMultipleModelMixin(object): """ Base class that holds functions need for all MultipleModelMixins/Views """ querylist = None # Keys...
mit
1,465,457,697,237,993,000
35.955224
118
0.597415
false
knossos-project/PythonQt
examples/NicePyConsole/pygments/formatters/svg.py
76
5840
# -*- coding: utf-8 -*- """ pygments.formatters.svg ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for SVG output. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_bool_opt, get...
lgpl-2.1
7,100,618,844,707,284,000
37.169935
81
0.555651
false
ansible/ansible
test/units/executor/test_task_queue_manager_callbacks.py
68
4502
# (c) 2016, Steve Kuznetsov <skuznets@redhat.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 v...
gpl-3.0
3,454,560,521,000,473,000
36.206612
84
0.649711
false
agermanidis/autosub
setup.py
1
1496
#!/usr/bin/env python from __future__ import unicode_literals try: from setuptools import setup except ImportError: from distutils.core import setup long_description = ( 'Autosub is a utility for automatic speech recognition and subtitle generation. ' 'It takes a video or an audio file as input, perfo...
mit
-5,678,691,593,651,409,000
33.790698
85
0.669786
false
deepakselvaraj/federated-horizon
openstack_dashboard/dashboards/project/overview/views.py
2
2120
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
8,770,195,952,193,473,000
33.754098
78
0.66934
false
rapilabs/django
tests/template_tests/templatetags/custom.py
161
5408
import operator import warnings from django import template from django.template.defaultfilters import stringfilter from django.utils import six from django.utils.html import escape, format_html register = template.Library() @register.filter @stringfilter def trim(value, num): return value[:num] @register.fil...
bsd-3-clause
1,891,258,562,372,593,200
32.177914
116
0.699334
false
bristy/login_app_flask
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py
304
4273
from collections import namedtuple from ..exceptions import LocationParseError class Url(namedtuple('Url', ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'])): """ Datastructure for representing an HTTP URL. Used as a return value for :func:`parse_url`. """ slots = () def __new...
mit
-5,506,939,554,004,395,000
25.376543
105
0.557454
false
aifil/odoo
addons/event/models/event_mail.py
33
5792
# -*- coding: utf-8 -*- from datetime import datetime from dateutil.relativedelta import relativedelta from openerp import api, fields, models, tools _INTERVALS = { 'hours': lambda interval: relativedelta(hours=interval), 'days': lambda interval: relativedelta(days=interval), 'weeks': lambda interval: r...
gpl-3.0
-886,859,512,333,969,500
46.867769
194
0.648135
false
PythonNut/servo
python/mach/mach/mixin/process.py
124
6762
# 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/. # This module provides mixins to perform process execution. from __future__ import absolute_import, unicode_literals i...
mpl-2.0
3,249,258,620,521,707,500
37.64
82
0.633392
false
hwine/build-relengapi
relengapi/blueprints/slaveloan/model.py
2
5153
# 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/. from __future__ import absolute_import import sqlalchemy as sa from sqlalchemy.orm import relationship from sqlalchemy....
mpl-2.0
4,872,488,556,467,990,000
35.034965
83
0.595769
false
0x90sled/catapult
third_party/gsutil/third_party/boto/tests/unit/manage/test_ssh.py
114
2004
#!/usr/bin/env python # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
bsd-3-clause
292,889,131,147,557,600
36.111111
80
0.717565
false
gpoesia/servo
tests/wpt/web-platform-tests/tools/lint/tests/test_path_lints.py
93
1350
from __future__ import unicode_literals from ..lint import check_path from .base import check_errors import pytest import six def test_allowed_path_length(): basename = 29 * "test/" for idx in range(5): filename = basename + idx * "a" errors = check_path("/foo/", filename, False) che...
mpl-2.0
1,005,862,233,288,981,200
31.926829
90
0.571852
false
zhangtuoparis13/Vintageous
ex/plat/windows.py
9
1838
import subprocess from subprocess import PIPE import os import tempfile try: import ctypes except ImportError: import plat if plat.HOST_PLATFORM == plat.WINDOWS: raise EnvironmentError("ctypes module missing for Windows.") ctypes = None def get_startup_info(): # Hide the child process wi...
mit
4,722,940,306,975,876,000
28.174603
92
0.572361
false
jamesls/boto
boto/mturk/qualification.py
20
6762
# Copyright (c) 2008 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, ...
mit
-7,893,759,396,119,655,000
48.357664
198
0.717835
false
40223249-1/-w16b_test
static/Brython3.1.1-20150328-091302/Lib/tempfile.py
728
22357
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. The interfaces listed as "safe" just below can be used without fear of race conditions. Those listed as "unsafe" cannot, and are provided for backward compatibility only. This module also pr...
agpl-3.0
2,027,741,912,908,578,800
30.22486
77
0.591448
false
red-hood/calendarserver
twistedcaldav/directory/calendaruserproxyloader.py
1
5460
## # Copyright (c) 2009-2015 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
56,557,382,659,109,624
30.744186
119
0.608425
false
rsnakamura/oldape
apetools/lexicographers/parametertree.py
1
3506
# python standard library from collections import namedtuple Parameters = namedtuple("Parameters", "name parameters".split()) class TreeNode(object): """ A Class to represent a node in a tree with arbitrary number of children """ def __init__(self, cargo, children=None): """ :param:...
apache-2.0
270,953,674,146,198,140
30.026549
124
0.556475
false
Bl4ckb0ne/ring-api
ring_api/server/flask/api/crypto.py
1
1832
# # Copyright (C) 2016 Savoir-faire Linux Inc # # Authors: Simon Zeni <simon.zeni@savoirfairelinux.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # ...
gpl-3.0
-7,458,843,126,301,511,000
29.533333
80
0.593886
false