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
LegoStormtroopr/canard
SQBLWidgets/languagePicker.py
1
4028
import sqblUI from SQBLutil import * # Dont like this, need to fix later. from PyQt4 import QtGui, QtCore import isoLangCodes from lxml import etree def languagePickerDialog(title = "Enter Language", default = None): lang,success = QtGui.QInputDialog.getItem(None, title, """Enter a <a href='http://...
gpl-3.0
3,230,996,148,769,951,000
40.102041
184
0.676266
false
bols-blue/ansible
lib/ansible/parsing/__init__.py
19
7957
# (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
911,921,087,727,697,300
34.842342
118
0.628629
false
dattatreya303/zulip
zerver/tests/test_reactions.py
13
10382
# -*- coding: utf-8 -*- from __future__ import absolute_import import ujson from typing import Any, Dict, List from six import string_types from zerver.lib.test_helpers import tornado_redirected_to_list, get_display_recipient from zerver.lib.test_classes import ZulipTestCase from zerver.models import get_user_profile...
apache-2.0
8,963,641,880,823,532,000
40.528
114
0.541803
false
PwnArt1st/searx
utils/fabfile.py
8
2621
from fabric.api import cd, run, sudo, put from cStringIO import StringIO base_dir = '/usr/local' hostname = 'searx.me' searx_dir = base_dir + '/searx' searx_ve_dir = searx_dir + '/searx-ve' current_user = run('whoami').stdout.strip() uwsgi_file = ''' [uwsgi] # Who will run the code uid = {user} gid = {user} # Numbe...
agpl-3.0
6,148,656,638,491,134,000
21.401709
94
0.622663
false
atheed/servo
tests/wpt/harness/wptrunner/wptmanifest/tests/test_tokenizer.py
195
11355
# 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 sys import os import unittest sys.path.insert(0, os.path.abspath("..")) from cStringIO import StringIO from .. ...
mpl-2.0
-2,026,876,783,122,045,200
30.454294
75
0.471422
false
jnmclarty/trump
trump/extensions/source/tx-dbapi/dbapiext.py
2
2524
""" The DBAPI driver, will use by default the same driver SQLAlchemy is using for trump. There is currently no way to change this default. It's assumed that the driver is DBAPI 2.0 compliant. Required kwargs include: - 'dbinsttype' which must be one of 'COMMAND', 'KEYCOL', 'TWOKEYCOL' - 'dsn', 'user', 'password', '...
bsd-3-clause
4,612,658,125,963,389,000
31.358974
111
0.553487
false
cyc805/VM
waf-tools/misc.py
53
11741
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2010 (ita) """ This tool is totally deprecated Try using: .pc.in files for .pc files the feature intltool_in - see demos/intltool make-like rules """ import shutil, re, os from waflib import TaskGen, Node, Task, Utils, Build, Errors from waflib.TaskGen i...
gpl-2.0
-2,328,467,615,840,488,400
27.223558
116
0.686909
false
nickster5001/ctracker
flask/lib/python3.4/site-packages/pymysql/err.py
4
4306
import struct try: Exception, Warning except ImportError: try: from exceptions import Exception, Warning except ImportError: import sys e = sys.modules['exceptions'] Exception = e.Exception Warning = e.Warning from .constants import ER import sys class MySQLEr...
mit
7,623,619,764,364,948,000
28.292517
80
0.686716
false
andreaso/ansible
lib/ansible/modules/net_tools/ipinfoio_facts.py
50
4074
#!/usr/bin/python # # (c) 2016, Aleksei Kostiuk <unitoff@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 o...
gpl-3.0
5,952,106,428,594,388,000
27.690141
77
0.62273
false
QuLogic/meson
mesonbuild/backend/vs2010backend.py
1
81951
# Copyright 2014-2016 The Meson development 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 # Unless required by applicable law or agree...
apache-2.0
3,410,752,762,889,756,700
52.52776
137
0.584703
false
iamApalive/robocop
bin/execute.py
1
1957
import robot,os from robot import libraries #from robot import robot_imports #from robot.api import ExecutionResult #from robot.api import TestData def main(): #Push required data in builtins from optparse import OptionParser parser = OptionParser() parser.add_option("-t", "--test", dest="testlist...
apache-2.0
-5,823,500,524,515,763,000
53.361111
151
0.681145
false
Crystalnix/house-of-life-chromium
third_party/harfbuzz/contrib/tables/category-parse.py
55
2223
import sys from unicode_parse_common import * # http://www.unicode.org/Public/5.1.0/ucd/extracted/DerivedGeneralCategory.txt category_to_harfbuzz = { 'Mn': 'HB_Mark_NonSpacing', 'Mc': 'HB_Mark_SpacingCombining', 'Me': 'HB_Mark_Enclosing', 'Nd': 'HB_Number_DecimalDigit', 'Nl': 'HB_Number_Letter', 'No': 'H...
bsd-3-clause
-8,029,093,537,978,823,000
30.757143
90
0.637877
false
CharithYMendis/Helium
utility/drclient.py
1
3592
import os import subprocess import common def get_drclient_command(client_args,exec_args): dr32 = os.environ.get('DYNAMORIO_32_RELEASE_HOME') dr_path = dr32 + '/bin32/drrun.exe' command = dr_path + ' -root ' + dr32 + ' -syntax_intel -c exalgo.dll ' + client_args + ' -- ' + exec_args re...
mit
4,375,205,477,405,711,400
40.767442
140
0.52255
false
hslee16/ansible-modules-extras
packaging/os/svr4pkg.py
126
7874
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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 th...
gpl-3.0
-7,796,063,220,856,292,000
31.270492
147
0.639319
false
alanquillin/quark
quark/protocols.py
3
5847
# Copyright 2014 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
-1,000,830,491,151,123,100
34.436364
79
0.603899
false
zwaters/CLAtoolkit
clatoolkit_project/xapi/tincan/context_activities.py
7
3538
# Copyright 2014 Rustici Software # # 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...
gpl-3.0
8,302,812,838,483,145,000
26.426357
77
0.622386
false
biddyweb/merchant
billing/tests/test_world_pay.py
3
2608
try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse from xml.dom import minidom from django.test import TestCase from django.template import Template, Context from django.conf import settings from django.utils.unittest import skipIf from billing import get_integration @s...
bsd-3-clause
3,732,140,793,508,197,000
37.925373
102
0.626917
false
dgwakeman/mne-python
mne/io/proc_history.py
13
11641
# -*- coding: utf-8 -*- # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # License: Simplified BSD import numpy as np from scipy.sparse import csc_matrix import warnings from .open import read_tag from .tree import dir_tree_find from .write import (start_block, ...
bsd-3-clause
9,045,859,422,633,780,000
39.141379
78
0.514131
false
hammerlab/cohorts
cohorts/provenance.py
1
2332
# Copyright (c) 2017. Mount Sinai School of Medicine # # 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
-2,992,552,527,831,262,700
34.876923
112
0.674099
false
RobotLocomotion/director
src/python/scripts/cameraViewer.py
1
2349
import argparse from director.consoleapp import ConsoleApp from director import cameraview from director import vtkAll as vtk import PythonQt from PythonQt import QtCore, QtGui, QtUiTools def addWidgetsToDict(widgets, d): for widget in widgets: if widget.objectName: d[str(widget.objectName)] =...
bsd-3-clause
8,476,660,284,654,006,000
29.115385
73
0.660707
false
antoviaque/edx-platform
lms/djangoapps/gating/tests/test_api.py
11
6311
""" Unit tests for gating.signals module """ from mock import patch from ddt import ddt, data, unpack from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from courseware.tests.helpers import LoginEnrollmentTestCase from miles...
agpl-3.0
58,090,751,121,986,180
33.113514
111
0.651085
false
reflechant/eulerproject
.vscode/.ropeproject/config.py
41
4774
# The default ``config.py`` # flake8: noqa def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_fil...
unlicense
7,511,925,054,516,250,000
41.625
100
0.677419
false
fxia22/ASM_xf
PythonD/site_python/twisted/test/test_imap.py
2
47492
# Twisted, the Framework of Your Internet # Copyright (C) 2001 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in t...
gpl-2.0
2,379,290,569,724,047,000
33.020774
115
0.554999
false
artemh/asuswrt-merlin
release/src/router/samba36/source3/build/dynconfig.py
19
4157
import string, Utils # list of directory options to offer in configure dir_options = { 'with-cachedir' : [ '${PREFIX}/var/locks', 'where to put temporary cache files' ], 'with-codepagedir' : [ '${PREFIX}/lib/samba', 'where to put codepages' ], 'with-configdir' ...
gpl-2.0
9,128,600,073,514,185,000
56.736111
126
0.492422
false
sillydan1/WhatEverEngine
packages/IronPython.StdLib.2.7.5/content/Lib/wsgiref/handlers.py
109
15932
"""Base classes for server/gateway implementations""" from types import StringType from util import FileWrapper, guess_scheme, is_hop_by_hop from headers import Headers import sys, os, time __all__ = ['BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler'] try: dict except NameError: def dict(items)...
apache-2.0
3,821,485,359,176,663,600
34.5625
79
0.62114
false
factorlibre/OCB
addons/note_pad/__openerp__.py
312
1691
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
3,940,159,063,534,811,600
33.510204
83
0.57126
false
caesar2164/edx-platform
lms/djangoapps/instructor/tests/test_services.py
10
5649
""" Tests for the InstructorService """ import json from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from courseware.models import StudentModule from lms.djangoapps.instructor.access import allow_access from lms.djangoapps.instru...
agpl-3.0
5,714,664,984,746,693,000
33.236364
114
0.614976
false
KousikaGanesh/purchaseandInventory
openerp/addons/sale_stock/sale_stock.py
11
34326
# -*- 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,113,200,217,397,163,300
49.703102
337
0.57353
false
indashnet/InDashNet.Open.UN2000
android/external/chromium_org/third_party/pexpect/screen.py
171
11281
"""This implements a virtual screen. This is used to support ANSI terminal emulation. The screen representation and state is implemented in this class. Most of the methods are inspired by ANSI screen control codes. The ANSI class extends this class to add parsing of ANSI escape codes. PEXPECT LICENSE This license...
apache-2.0
-4,719,746,328,399,164,000
27.487374
101
0.571935
false
efdutra/zaproxy
python/scripts/watcher/watcher.py
28
8154
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2012 ZAP Development 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 ob...
apache-2.0
-5,172,537,633,220,105,000
36.28169
152
0.659676
false
lujinda/gale
sample/login/run.py
1
1105
#!/usr/bin/env python #coding:utf-8 # Author : tuxpy # Email : q8886888@qq.com.com # Last modified : 2015-06-09 15:20:13 # Filename : test.py # Description : from gale.web import app_run, router, RequestHandler class BaseHandler(RequestHandler): def get_current_user(self): return sel...
mit
-7,656,263,590,322,026,000
27.333333
68
0.651584
false
jiajiechen/mxnet
example/kaggle-ndsb1/train_dsb.py
41
4039
# 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
1,754,920,422,216,337,200
38.990099
102
0.635553
false
levkar/odoo
addons/website_sale/models/res_config.py
20
7095
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields class WebsiteConfigSettings(models.TransientModel): _inherit = 'website.config.settings' def _default_order_mail_template(self): if self.env['ir.module.module'].sea...
agpl-3.0
6,818,163,870,383,461,000
56.217742
212
0.643693
false
Jorge-Rodriguez/ansible
lib/ansible/modules/cloud/google/gce_labels.py
104
12673
#!/usr/bin/python # Copyright 2017 Google 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
-2,670,281,631,069,084,700
38.114198
123
0.609011
false
alshedivat/tensorflow
tensorflow/contrib/mixed_precision/python/loss_scale_optimizer.py
20
6862
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-513,078,801,232,219,000
38.66474
80
0.694404
false
keedio/hue
desktop/core/ext-py/PyYAML-3.09/tests/lib/test_canonical.py
60
1135
import yaml, canonical def test_canonical_scanner(canonical_filename, verbose=False): data = open(canonical_filename, 'rb').read() tokens = list(yaml.canonical_scan(data)) assert tokens, tokens if verbose: for token in tokens: print token test_canonical_scanner.unittest = ['.canon...
apache-2.0
-4,266,917,524,867,631,000
27.375
75
0.660793
false
Leeft/three.js
utils/exporters/blender/addons/io_three/exporter/io.py
201
2836
import os import shutil from .. import constants, logger from . import _json def copy_registered_textures(dest, registration): """Copy the registered textures to the destination (root) path :param dest: destination directory :param registration: registered textures :type dest: str :type registrat...
mit
-6,637,956,004,533,076,000
26.009524
75
0.61213
false
michaelld/gnuradio
gr-blocks/python/blocks/qa_unpack_k_bits.py
7
1845
#!/usr/bin/env python # # Copyright 2006,2010,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
gpl-3.0
-7,482,672,415,865,631,000
30.271186
70
0.645528
false
lucidmotifs/codenamev
mediaplayer/migrations/0002_auto_20150211_0549.py
1
4196
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('mediaplayer', '0001_initial'), ] ...
mit
-286,532,153,139,026,600
35.807018
114
0.511916
false
VictoriaRoux/oppia
core/domain/value_generators_domain_test.py
34
1211
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-374,436,367,218,607,360
33.6
76
0.720066
false
anandpdoshi/frappe
frappe/core/doctype/doctype/doctype.py
2
21596
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import re import MySQLdb import frappe from frappe import _ from frappe.utils import now, cint from frappe.model import no_value_fields from frappe.model.document import Documen...
mit
-1,331,930,829,922,321,200
34.519737
149
0.688461
false
t794104/ansible
test/units/modules/network/nxos/test_nxos_vrf.py
68
3059
# (c) 2016 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 option) any later version. # # Ansible is dis...
gpl-3.0
5,271,322,226,520,757,000
37.721519
94
0.668846
false
zhuango/python
pythonLearning/oo/vector.py
2
2835
from array import array import reprlib import math import numbers import functools import operator import itertools class Vector: typecode = 'd' def __init__(self, components): self._components = array(self.typecode, components) def __iter__(self): return iter(self._components) ...
gpl-2.0
7,786,916,047,197,369,000
30.853933
64
0.54321
false
Zumochi/eve-wspace
evewspace/Map/default_settings.py
5
1540
# Eve W-Space # Copyright 2014 Andrew Austin and contributors # # 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 requi...
apache-2.0
-7,051,287,040,011,681,000
33.222222
76
0.612987
false
fusion809/fusion809.github.io-old
vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/pygments/formatters/latex.py
49
17273
# -*- coding: utf-8 -*- """ pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for LaTeX fancyvrb output. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import division from pygments.formatter import Forma...
gpl-3.0
-1,509,321,526,598,820,400
35.751064
85
0.534997
false
Glutanimate/image-occlusion-2-enhanced
src/image_occlusion_enhanced/template.py
1
8175
# -*- coding: utf-8 -*- # Image Occlusion Enhanced Add-on for Anki # # Copyright (C) 2016-2020 Aristotelis P. <https://glutanimate.com/> # Copyright (C) 2012-2015 Tiago Barroso <tmbb@campus.ul.pt> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General ...
bsd-2-clause
1,233,133,579,582,542,800
23.848024
74
0.627523
false
aaronorosen/horizon-congress
openstack_dashboard/dashboards/project/networks/ports/forms.py
4
2591
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
6,717,944,019,125,245,000
39.484375
78
0.60633
false
redknight1138/First
attack/ftp.py
3
2460
#!./env/bin/python """ FTP Scanner/Brute Forcer Use this to either scan a host for anonymous FTP logins or to try a password list against a host. Don't be a moron, please don't use this for something illegal. Usage: ftp.py brute [-v] <host> <user> <password_file> ftp.py anon [-v] <ho...
mit
1,171,876,462,818,232,600
27.275862
123
0.569919
false
pitrou/numba
numba/funcdesc.py
2
6703
""" Function descriptors. """ from __future__ import print_function, division, absolute_import from collections import defaultdict import itertools import sys from types import ModuleType from . import six, types def transform_arg_name(arg): if isinstance(arg, types.Record): return "Record_%s" % arg._co...
bsd-2-clause
5,825,912,725,351,149,000
33.374359
83
0.588841
false
sidzan/netforce
netforce_account/netforce_account/models/account_budget.py
4
1571
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, publ...
mit
6,020,272,555,940,924,000
42.638889
85
0.723743
false
ukanga/SickRage
lib/unidecode/x084.py
252
4646
data = ( 'Hu ', # 0x00 'Qi ', # 0x01 'He ', # 0x02 'Cui ', # 0x03 'Tao ', # 0x04 'Chun ', # 0x05 'Bei ', # 0x06 'Chang ', # 0x07 'Huan ', # 0x08 'Fei ', # 0x09 'Lai ', # 0x0a 'Qi ', # 0x0b 'Meng ', # 0x0c 'Ping ', # 0x0d 'Wei ', # 0x0e 'Dan ', # 0x0f 'Sha ', # 0x10 'Hu...
gpl-3.0
-7,254,953,113,444,465,000
17.007752
24
0.387215
false
florianholzapfel/home-assistant
homeassistant/components/sleepiq.py
15
3418
""" Support for SleepIQ from SleepNumber. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sleepiq/ """ import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helper...
mit
2,832,404,081,076,921,300
25.913386
78
0.633996
false
keedio/hue
desktop/core/ext-py/Django-1.6.10/tests/admin_changelist/admin.py
52
3133
from __future__ import absolute_import from django.contrib import admin from django.core.paginator import Paginator from .models import (Event, Child, Parent, Genre, Band, Musician, Group, Quartet, Membership, ChordsMusician, ChordsBand, Invitation, Swallow) site = admin.AdminSite(name="admin") class CustomPag...
apache-2.0
-7,460,381,594,641,713,000
27.743119
93
0.68752
false
nguyentu1602/statsmodels
statsmodels/stats/tests/test_groups_sw.py
34
2750
# -*- coding: utf-8 -*- """Test for a helper function for PanelHAC robust covariance the functions should be rewritten to make it more efficient Created on Thu May 17 21:09:41 2012 Author: Josef Perktold """ import numpy as np from numpy.testing import assert_equal, assert_raises import statsmodels.stats.sandwich_co...
bsd-3-clause
-2,665,996,803,205,696,000
34.25641
98
0.494545
false
markusappel/McCode
tools/Python/www/www-django/mcwww/mcwww/wsgi.py
3
1132
""" WSGI config for mcwww project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
gpl-2.0
-8,129,405,261,898,038,000
39.428571
79
0.79947
false
drewandersonnz/openshift-tools
ansible/roles/lib_zabbix/library/zbx_graphprototype.py
16
10207
#!/usr/bin/env python ''' Ansible module for zabbix graphprototypes ''' # vim: expandtab:tabstop=4:shiftwidth=4 # # Zabbix graphprototypes ansible module # # # Copyright 2015 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with t...
apache-2.0
-5,983,438,661,443,240,000
29.836858
102
0.549721
false
protochron/aurora
src/main/python/apache/thermos/core/helper.py
7
14943
# # 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
3,467,253,521,211,049,000
35.535452
100
0.667938
false
dandan94/OpenGLTest
finalOpenGL/HelloGLFW/lib/boost_1_59_0/libs/python/test/pickle1.py
46
1189
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) r'''>>> import pickle1_ext >>> import pickle >>> pickle1_ext.world.__module__ 'pickle1_ext' >>> pickle1_ext.world.__safe...
gpl-3.0
-5,396,050,070,502,541,000
28
71
0.599664
false
ahojjati/grr
lib/aff4_objects/aff4_grr_test.py
6
9733
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Test the grr aff4 objects.""" import time from grr.lib import aff4 from grr.lib import flow from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib import utils from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdf...
apache-2.0
2,688,559,501,686,791,000
34.137184
80
0.634029
false
abstract-open-solutions/hr
__unported__/hr_report_payroll_attendance_summary/report/attendance_summary.py
21
9460
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licens...
agpl-3.0
4,764,162,334,123,626,000
35.384615
77
0.526216
false
codepython/restcommander
play-1.2.4/python/Lib/pkgutil.py
66
20001
"""Utilities to support packages.""" # NOTE: This module must remain compatible with Python 2.3, as it is shared # by setuptools for distribution with Python 2.3 and up. import os import sys import imp import os.path from types import ModuleType __all__ = [ 'get_importer', 'iter_importers', 'get_loader', 'find_l...
apache-2.0
-8,815,676,701,688,771,000
33.307033
79
0.60102
false
debugger22/sympy
sympy/matrices/tests/test_interactions.py
58
1881
""" We have a few different kind of Matrices Matrix, ImmutableMatrix, MatrixExpr Here we test the extent to which they cooperate """ from sympy import symbols from sympy.matrices import (Matrix, MatrixSymbol, eye, Identity, ImmutableMatrix) from sympy.core.compatibility import range from sympy.matrices.expres...
bsd-3-clause
-973,157,637,153,099,300
27.074627
71
0.621478
false
hehongliang/tensorflow
tensorflow/compiler/tests/permute_test.py
16
3387
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
8,228,656,646,681,334,000
37.488636
80
0.599941
false
Shrulik/Open-Knesset
mks/migrations/0009_add_action_stream.py
10
28666
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def _get_FIELD_display(self, field): value = getattr(self, field.attname) return force_unicode(dict(field.flatchoices).get(value, value), string...
bsd-3-clause
-8,502,535,806,786,915,000
79.522472
243
0.542106
false
pgdeniverville/Hidden-Sector-Limits
Hidden_Sector_Limits.py
1
8466
#!/usr/bin/env python from Hidden_Sec_Utilities import * from Hidden_Sec_Physics import * import itertools """ I use kappa and epsilon interchangeably. They mean the same thing. Many of these limits are not valid in the off-shell regime, or change dramatically. Use at your own risk! """ #Default value of alpha_p to...
mit
-1,278,347,884,730,586,000
51.583851
168
0.693244
false
heke123/chromium-crosswalk
native_client_sdk/src/build_tools/extract_artifacts.py
25
4283
#!/usr/bin/env python # Copyright (c) 2014 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 argparse import glob import os import sys if sys.version_info < (2, 7, 0): sys.stderr.write("python 2.7 or later is requi...
bsd-3-clause
-8,594,949,021,464,773,000
29.81295
80
0.679897
false
lahosken/pants
src/python/pants/engine/rules.py
2
5514
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from ...
apache-2.0
-5,564,196,766,072,002,000
35.76
100
0.653065
false
Buggaboo/Triathlon
TriathlonBeta/Triathlon-Breeder.py
1
34773
#!/usr/bin/python # -*- coding: iso-8859-1 -*- # Howto, Code license, Credits, etc: http://code.google.com/B/BCI-Project-Triathlon/ noGL = False # Set noGL to True for disabling the use of OpenGL (to gain speed, or to avoid python-wx-opengl problems) import pyfann from pyfann import libfann import string import o...
mit
-3,211,078,224,814,583,000
48.045134
164
0.557473
false
Praveen-1987/devstack-Quantumleap
files/pip-1.4.1/pip/vendor/distlib/database.py
79
49606
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """PEP 376 implementation.""" from __future__ import unicode_literals import base64 import codecs import hashlib import logging import os import sys import zipimport from . import DistlibExce...
apache-2.0
6,840,298,047,811,313,000
37.129131
86
0.545015
false
golismero/golismero-devel
thirdparty_libs/django/conf/locale/nb/formats.py
107
1585
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATET...
gpl-2.0
2,050,092,660,626,518,800
39.641026
81
0.535016
false
jstammers/EDMSuite
NavPython/IronPython/Tutorial/Extend/csxtest.py
1
1219
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of t...
mit
5,197,148,566,254,455,000
22
97
0.628384
false
pgleeson/TestArea
lib/jython/Lib/test/test_methods.py
10
1114
# Python test set -- part 7, bound and unbound methods from test_support import * print 'Bound and unbound methods (test_methods.py)' class A: def one(self): return 'one' class B(A): def two(self): return 'two' class C(A): def one(self): return 'another one' a = A() b = B() c = C() print 'unbound met...
gpl-2.0
-5,978,282,553,769,381,000
16.967742
54
0.61939
false
rhattersley/iris
lib/iris/tests/unit/fileformats/pp_rules/test__dim_or_aux.py
12
2233
# (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
lgpl-3.0
2,609,937,718,619,282,000
38.175439
75
0.655172
false
uclouvain/osis_louvain
assessments/tests/views/test_score_sheet.py
1
5429
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
5,302,085,797,211,989,000
50.207547
128
0.66986
false
ogenstad/ansible
lib/ansible/modules/monitoring/airbrake_deployment.py
56
3599
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2013 Bruce Pennypacker <bruce@pennypacker.org> # 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_versio...
gpl-3.0
-2,904,783,041,118,055,400
27.338583
118
0.642956
false
harrijs/gns3-server
gns3server/modules/dynamips/hypervisor.py
1
6210
# -*- coding: utf-8 -*- # # Copyright (C) 2015 GNS3 Technologies 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 the License, or # (at your option) any later version. ...
gpl-3.0
3,943,120,844,863,544,300
31.010309
108
0.578744
false
boundlessgeo/QGIS
python/plugins/processing/tests/ProjectProvider.py
8
4883
# -*- coding: utf-8 -*- """ *************************************************************************** Project Provider tests --------------------- Date : July 2018 Copyright : (C) 2018 by Nyall Dawson Email : nyall dot dawson at gmail dot com ************...
gpl-2.0
297,816,019,104,723,400
35.440299
82
0.580176
false
insiderr/insiderr-app
ios-patches/basemodules/twisted/python/test/test_runtime.py
33
5431
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.runtime}. """ from __future__ import division, absolute_import import sys from twisted.trial.util import suppress as SUPRESS from twisted.trial.unittest import SynchronousTestCase from twisted.python.runtime impo...
gpl-3.0
2,304,804,071,937,037,800
31.915152
80
0.631375
false
vprusso/youtube_tutorials
data_structures/linked_list/circular_linked_list/circular_linked_list_remove.py
1
2755
# YouTube Video: https://www.youtube.com/watch?v=op42w-5o3nE class Node: def __init__(self, data): self.data = data self.next = None class CircularLinkedList: def __init__(self): self.head = None def prepend(self, data): new_node = Node(data) cur = self.head ...
gpl-3.0
3,223,161,314,811,393,000
22.956522
65
0.471143
false
fiddlerwoaroof/sandbox
unsorted/pythonsnippets_0045.py
1
1853
import functools import collections def instantiate(cls): return cls() class Namespace(object): def registry(name, bases, dict_): cls = type(name, bases, dict_) cls.__dict = {} return cls __metaclass__ = registry def __init__(self, instance=None): self.__dict__ = self.__dict...
bsd-3-clause
-4,709,682,532,446,254,000
30.423729
78
0.560712
false
CollabQ/CollabQ
poboxopenid/util.py
1
2590
import logging from django import http from django.conf import settings from common import api from common import clean from common.models import ExternalProfile from common import memcache from common import twitter from common import user from common import util def get_nick_from_email(email): nick = util.displa...
apache-2.0
-1,672,527,653,483,588,600
25.989583
103
0.676834
false
bmc/digest
setup.py
1
2013
#!/usr/bin/env python # # EasyInstall setup script for digest # # $Id$ # --------------------------------------------------------------------------- import sys import os sys.path += [os.getcwd()] from setuptools import setup, find_packages import re import imp PKG = 'digest' DESCRIPTION = 'Calculate message digests ...
bsd-3-clause
-1,755,184,100,655,136,500
29.969231
77
0.525584
false
wkschwartz/django
tests/auth_tests/models/custom_user.py
73
3779
from django.contrib.auth.models import ( AbstractBaseUser, AbstractUser, BaseUserManager, Group, Permission, PermissionsMixin, UserManager, ) from django.db import models # The custom user uses email as the unique identifier, and requires # that every user provide a date of birth. This lets us test # changes ...
bsd-3-clause
17,085,836,832,844,920
32.741071
93
0.677693
false
cherry-wb/viper
viper/core/ui/commands.py
1
10438
import os import getopt import tempfile from viper.common.out import * from viper.common.objects import File from viper.common.colors import bold, cyan, white from viper.common.network import download from viper.core.session import __session__ from viper.core.plugins import __modules__ from viper.core.database import ...
bsd-3-clause
-4,457,562,119,359,480,300
32.88961
108
0.511017
false
quanganh/fckeditor
public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py
93
7095
#!/usr/bin/env python """ * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2008 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or l...
mit
-392,230,004,533,565,630
46.59589
340
0.69852
false
rcrowder/nupic
tests/swarming/nupic/swarming/experiments/dummyV2/permutations.py
10
3634
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
64,258,846,940,821,384
36.854167
170
0.694276
false
moyogo/defcon
Lib/defcon/objects/image.py
1
9304
from __future__ import absolute_import import weakref from defcon.objects.base import BaseDictObject from defcon.objects.color import Color _defaultTransformation = { "xScale" : 1, "xyScale" : 0, "yxScale" : 0, "yScale" : 1, "xOffset" : 0, "yOffset" : 0 } class Image(BaseDictObject): "...
mit
-8,821,778,087,892,059
33.080586
267
0.617906
false
britcey/ansible
lib/ansible/utils/module_docs_fragments/ios.py
101
4360
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
8,027,521,662,355,475,000
43.489796
88
0.674771
false
nikitasingh981/scikit-learn
examples/tree/plot_tree_regression_multioutput.py
73
1854
""" =================================================================== Multi-output Decision Tree Regression =================================================================== An example to illustrate multi-output regression with decision tree. The :ref:`decision trees <tree>` is used to predict simultaneously the ...
bsd-3-clause
-209,652,577,239,711,070
32.107143
79
0.638619
false
rubyinhell/brython
www/src/Lib/test/test_syntax.py
87
18064
"""This module tests SyntaxErrors. Here's an example of the sort of thing that is tested. >>> def f(x): ... global x Traceback (most recent call last): SyntaxError: name 'x' is parameter and global The tests are all raise SyntaxErrors. They were created by checking each C call that raises SyntaxError. There ar...
bsd-3-clause
-3,719,575,714,766,748,700
29.462057
78
0.582761
false
abhattad4/Digi-Menu
build/lib.linux-x86_64-2.7/django/utils/ipv6.py
225
7971
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
bsd-3-clause
8,907,170,792,437,575,000
28.413284
75
0.585623
false
iradul/qtwebkit
Tools/Scripts/webkitpy/port/image_diff_unittest.py
121
2509
# Copyright (C) 2012 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...
gpl-2.0
1,433,616,131,712,398,300
43.017544
116
0.740933
false
openhatch/oh-mainline
vendor/packages/python-social-auth/social/pipeline/disconnect.py
88
1082
from social.exceptions import NotAllowedToDisconnect def allowed_to_disconnect(strategy, user, name, user_storage, association_id=None, *args, **kwargs): if not user_storage.allowed_to_disconnect(user, name, association_id): raise NotAllowedToDisconnect() def get_entries(strate...
agpl-3.0
5,841,264,762,316,133,000
33.903226
74
0.624769
false
simone-campagna/zapper
lib/python/zapper/text.py
1
1993
#!/usr/bin/env python3 # # Copyright 2013 Simone Campagna # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
557,389,295,216,239,200
31.145161
157
0.677371
false
miptliot/edx-platform
cms/envs/yaml_config.py
12
8323
""" This is the default template for our main set of AWS servers. Before importing this settings file the following MUST be defined in the environment: * SERVICE_VARIANT - can be either "lms" or "cms" * CONFIG_ROOT - the directory where the application yaml config files are located """ #...
agpl-3.0
4,286,653,009,028,260,400
31.135135
109
0.66971
false
associatedpress/datakit-data
tests/commands/test_init.py
1
4495
import os from unittest import mock from conftest import ( create_plugin_config, create_project_config, dir_contents ) from datakit.utils import read_json from datakit_data import Init def test_project_buildout(caplog, fake_project, monkeypatch, tmpdir): """ Init should auto-generate directories...
isc
392,055,649,879,973,000
33.576923
82
0.668966
false
Sklearn-HMM/scikit-learn-HMM
sklean-hmm/naive_bayes.py
3
20231
# -*- coding: utf-8 -*- """ The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These are supervised learning methods based on applying Bayes' theorem with strong (naive) feature independence assumptions. """ # Author: Vincent Michel <vincent.michel@inria.fr> # Minor fixes by Fabian Pedre...
bsd-3-clause
618,567,034,910,407,600
34.485965
79
0.599743
false
kubeflow/kubeflow
testing/test_tf_serving.py
1
4781
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018 The Kubeflow 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/licens...
apache-2.0
1,005,149,825,542,019,700
29.647436
79
0.642753
false
vit2/vit-e2
lib/python/Screens/Dish.py
7
8474
# -*- coding: utf-8 -*- from Screen import Screen from Components.BlinkingPixmap import BlinkingPixmapConditional from Components.Pixmap import Pixmap from Components.config import config, ConfigInteger from Components.Sources.Boolean import Boolean from Components.Label import Label from Components.ProgressBar import ...
gpl-2.0
-1,301,455,545,273,344,800
36.157895
178
0.694995
false
Jorge-Rodriguez/ansible-modules-core
network/junos/junos_template.py
14
5097
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
-6,058,528,165,231,092,000
32.754967
80
0.683147
false