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
clemkoa/scikit-learn
examples/covariance/plot_outlier_detection.py
15
5121
""" ========================================== Outlier detection with several methods. ========================================== When the amount of contamination is known, this example illustrates three different ways of performing :ref:`outlier_detection`: - based on a robust estimator of covariance, which is assum...
bsd-3-clause
-2,388,725,839,652,824,000
39.642857
79
0.627807
false
backtou/longlab
gnuradio-core/src/python/gnuradio/gr/qa_copy.py
18
1851
#!/usr/bin/env python # # Copyright 2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your optio...
gpl-3.0
5,000,358,698,534,241,000
30.913793
70
0.634252
false
dimdung/boto
tests/unit/vpc/test_internetgateway.py
114
6080
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, InternetGateway class TestDescribeInternetGateway(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return b""" <DescribeInternetGatewaysResp...
mit
-487,131,552,712,800,450
39
95
0.590625
false
tanderegg/ansible-modules-core
cloud/amazon/ec2_facts.py
110
6444
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
-4,794,432,008,604,515,000
34.60221
99
0.579764
false
SantosDevelopers/sborganicos
venv/lib/python3.5/site-packages/django/contrib/gis/measure.py
100
12463
# Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, #...
mit
6,680,551,965,291,689,000
34.916427
112
0.574581
false
edulramirez/nova
nova/weights.py
70
4450
# Copyright (c) 2011-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 # # Un...
apache-2.0
491,235,432,058,026,900
30.118881
78
0.636854
false
Fizzixnerd/frontdown
installer.py
1
1654
import subprocess class InstallError(Exception): pass class AptError(InstallError): pass class YumError(InstallError): pass class UnsupportedInstallerError(InstallError): pass class Installer: """Abstract Base Class for an installer. Represents the installation system for the current ...
gpl-3.0
6,210,993,864,312,144,000
20.763158
128
0.66445
false
darmaa/odoo
addons/base_import/test_models.py
97
2366
from openerp.osv import orm, fields def name(n): return 'base_import.tests.models.%s' % n class char(orm.Model): _name = name('char') _columns = { 'value': fields.char('unknown', size=None) } class char_required(orm.Model): _name = name('char.required') _columns = { 'value': fie...
agpl-3.0
-6,245,972,364,200,473,000
22.425743
106
0.579882
false
agusc/scrapy
tests/test_spidermiddleware_offsite.py
113
2551
from unittest import TestCase from six.moves.urllib.parse import urlparse from scrapy.http import Response, Request from scrapy.spiders import Spider from scrapy.spidermiddlewares.offsite import OffsiteMiddleware from scrapy.utils.test import get_crawler class TestOffsiteMiddleware(TestCase): def setUp(self): ...
bsd-3-clause
-8,960,045,200,606,087,000
37.074627
85
0.639749
false
kontais/EFI-MIPS
ToolKit/cmds/python/Lib/stringprep.py
12
13492
# This file is generated by mkstringprep.py. DO NOT EDIT. """Library that exposes various tables found in the StringPrep RFC 3454. There are two kinds of tables: sets, for which a member test is provided, and mappings, for which a mapping function is provided. """ import unicodedata assert unicodedata.unidata_versio...
bsd-3-clause
2,963,525,229,846,881,300
48.602941
151
0.663875
false
bhavin04890/finaldashboard
modules/savage/graph/__init__.py
24
9731
from base import BaseGraph, UnifiedGraph from canvas import ScatterCanvas, DoubleScatterCanvas, BarCanvas, HorizontalBarCanvas, PieCanvas, LineCanvas from axes import YAxis from ..utils.struct import Vector as V from ..graphics.utils import ViewBox, Translate, Rotate, addAttr, blank, boolean from ..graphics.color imp...
mit
-2,421,170,796,185,139,000
33.507092
108
0.564382
false
lianqiw/maos
scripts/interface.py
1
12202
#!/Usr/bin/env python #Use ctypes to interface with C libraries #POINTER is the class type of pointer #pointer() acts on actual array, while POINTER() works on class type. #pointer(cell(arr)) #creates cell Structure for np.array type arr and makes a pointer #pcell=POINTER(cell) ; pcell() #Creates a class for cell Stru...
gpl-3.0
-7,094,381,525,359,293,000
33.763533
116
0.5277
false
Chilledheart/gyp
test/compiler-override/gyptest-compiler-env.py
14
3332
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the user can override the compiler and linker using CC/CXX/LD environment variables. """ import TestGyp import os import co...
bsd-3-clause
6,040,763,236,472,243,000
29.568807
75
0.667167
false
pfnet/chainercv
chainercv/links/model/faster_rcnn/region_proposal_network.py
3
6706
import numpy as np import chainer from chainer.backends import cuda import chainer.functions as F import chainer.links as L from chainercv.links.model.faster_rcnn.utils.generate_anchor_base import \ generate_anchor_base from chainercv.links.model.faster_rcnn.utils.proposal_creator import \ ProposalCreator c...
mit
2,033,087,664,001,716,500
39.642424
78
0.58977
false
agutieda/QuantEcon.py
quantecon/tests/test_matrix_eqn.py
7
1050
""" tests for quantecon.util """ from __future__ import division from collections import Counter import unittest import numpy as np from numpy.testing import assert_allclose from nose.plugins.attrib import attr import pandas as pd from quantecon import matrix_eqn as qme def test_solve_discrete_lyapunov_zero(): '...
bsd-3-clause
-6,728,560,543,262,172,000
22.863636
71
0.602857
false
vv1133/home_web
django/db/backends/postgresql_psycopg2/creation.py
60
3814
from django.db.backends.creation import BaseDatabaseCreation from django.db.backends.util import truncate_name class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated PostgreSQL column # types, as strings. Column-type strings can contain format strings; they'll ...
bsd-3-clause
-2,422,059,111,492,486,700
48.532468
146
0.554536
false
tyagiarpit/servo
python/mach/mach/test/providers/conditions.py
128
1324
# 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 unicode_literals from mach.decorators import ( CommandProvider, Command, ) def is_foo(c...
mpl-2.0
-497,926,431,847,197,300
23.981132
79
0.639728
false
WimPessemier/uaf
unittests/pyuaftests/client/client_discovery.py
3
2861
import pyuaf import unittest from pyuaf.util.unittesting import parseArgs, TestResults import thread, time ARGS = parseArgs() def suite(args=None): if args is not None: global ARGS ARGS = args return unittest.TestLoader().loadTestsFromTestCase(ClientDiscoveryTest) def testParalle...
lgpl-3.0
4,160,934,910,780,872,700
32.658824
99
0.655365
false
Endika/django
tests/update/models.py
282
1196
""" Tests for the update() queryset method that allows in-place, multi-object updates. """ from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class DataPoint(models.Model): name = models.CharField(max_length=20) ...
bsd-3-clause
3,164,474,899,840,068,000
22
73
0.710702
false
ixs/func
func/yaml/load.py
12
10649
""" pyyaml legacy Copyright (c) 2001 Steve Howell and Friends; All Rights Reserved (see open source license information in docs/ directory) """ import re, string from implicit import convertImplicit from inline import InlineTokenizer from klass import DefaultResolver from stream import YamlLoaderException, F...
gpl-2.0
1,194,643,404,956,306,200
29.978979
84
0.533947
false
Itxaka/st2
st2actions/st2actions/runners/python_action_wrapper.py
6
4417
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
-7,786,053,132,188,463,000
37.077586
88
0.635726
false
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/Amazon/IAM/ListVirtualMFADevices.py
5
4701
# -*- coding: utf-8 -*- ############################################################################### # # ListVirtualMFADevices # Lists the virtual MFA devices under the AWS account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); ...
apache-2.0
-2,138,961,115,561,622,000
42.934579
267
0.689215
false
wbond/subversion
contrib/hook-scripts/case-insensitive.py
3
4628
#!/usr/bin/env python # Licensed under the same terms as Subversion. # A pre-commit hook to detect case-insensitive filename clashes. # # What this script does: # - Detects new paths that 'clash' with existing, or other new, paths. # - Ignores existings paths that already 'clash' # - Exits with an error code, and ...
apache-2.0
-6,640,162,807,570,445,000
35.440945
79
0.671997
false
tlakshman26/cinder-bug-fix-volume-conversion-full
cinder/objects/volume.py
2
13218
# Copyright 2015 SimpliVity Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-8,163,795,531,553,758,000
40.17757
78
0.591996
false
leighpauls/k2cro4
third_party/python_26/Lib/site-packages/win32/scripts/regsetup.py
21
19756
# A tool to setup the Python registry. class error(Exception): pass import sys # at least we can count on this! def FileExists(fname): """Check if a file exists. Returns true or false. """ import os try: os.stat(fname) return 1 except os.error, details: return 0 def ...
bsd-3-clause
-4,757,676,226,586,110,000
37.661448
182
0.648006
false
leki75/ansible
lib/ansible/modules/monitoring/nagios.py
71
36457
#!/usr/bin/python # -*- coding: utf-8 -*- # # This file is largely copied from the Nagios module included in the # Func project. Original copyright follows: # # func-nagios - Schedule downtime and enables/disable notifications # Copyright 2011, Red Hat, Inc. # Tim Bielawa <tbielawa@redhat.com> # # This software may be ...
gpl-3.0
8,060,819,141,069,020,000
32.446789
143
0.600379
false
yinwenpeng/rescale
en/parser/nltk_lite/stem/regexp.py
9
1677
# Natural Language Toolkit: Stemmers # # Copyright (C) 2001-2006 University of Melbourne # Author: Trevor Cohn <tacohn@cs.mu.oz.au> # Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT from en.parse...
gpl-3.0
3,809,936,516,278,807,000
26.95
70
0.608229
false
ajnirp/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/testdata/handlers/sub/plain_wsh.py
499
1789
# Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mpl-2.0
3,938,430,287,483,820,000
43.725
72
0.759642
false
waveform80/ctutils
ctutils/ctinfo.py
1
2101
# vim: set et sw=4 sts=4 fileencoding=utf-8: # Copyright 2014 Dave Jones <dave@waveform.org.uk>. # # This file is part of ctutils. # # ctutils 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 ...
gpl-3.0
-5,083,303,698,079,360,000
34.610169
79
0.687292
false
manterd/myPhyloDB
functions/analysis/spls_graphs.py
1
32640
import datetime from django.http import HttpResponse import logging import pandas as pd from pyper import * from scipy import stats import json from database.models import Kingdom, Phyla, Class, Order, Family, Genus, Species, OTU_99, \ ko_lvl1, ko_lvl2, ko_lvl3, \ nz_lvl1, nz_lvl2, nz_lvl3, nz_lvl4 import fun...
gpl-3.0
-5,018,934,051,595,870,000
52.24633
214
0.447917
false
KodiColdkeys/coldkeys-addons
repository/plugin.video.white.devil/resources/lib/sources/afdah_wp.py
6
3239
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-2.0
6,610,243,343,099,286,000
33.457447
177
0.570546
false
conejoninja/xbmc-seriesly
servers/zippyshare.py
1
2002
# -*- coding: utf-8 -*- #------------------------------------------------------------ # seriesly - XBMC Plugin # Conector para zippyshare # http://blog.tvalacarta.info/plugin-xbmc/seriesly/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import scrap...
gpl-3.0
1,196,410,013,671,276,000
32.366667
118
0.610195
false
harayz/raspberry_pwn
src/pentest/sqlmap/plugins/dbms/oracle/fingerprint.py
7
3732
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.common import Backend from lib.core.common import Format from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger ...
gpl-3.0
4,609,657,013,334,637,000
28.856
178
0.580118
false
salaria/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
384
3903
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
-6,020,361,088,547,412,000
38.826531
179
0.638739
false
istehem/laundry_booking_bot
classes.py
1
1814
class calendar: def __repr__(self): def color(text): colors = { 'BLUE' : '\033[94m', 'GREEN' : '\033[92m', 'YELLOW' : '\033[93m', 'RED' : '\033[91m', 'ENDC' : '\033[0m' ...
bsd-3-clause
2,414,067,194,950,932,500
36.020408
105
0.351709
false
J-Liu/qemu
scripts/tracetool/format/tcg_helper_wrapper_h.py
24
2167
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generate trace/generated-helpers-wrappers.h. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__...
gpl-2.0
-846,805,332,940,118,900
29.492958
85
0.518707
false
shakamunyi/tensorflow
tensorflow/__init__.py
81
1481
# 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
-592,881,706,878,708,000
34.261905
80
0.736664
false
Jorge-Rodriguez/ansible
lib/ansible/modules/cloud/azure/azure_rm_sqlfirewallrule.py
22
9610
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.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
-3,101,940,032,950,997,000
34.330882
160
0.565453
false
shubhdev/edx-platform
cms/djangoapps/contentstore/views/tests/test_entrance_exam.py
83
12383
""" Test module for Entrance Exams AJAX callback handler workflows """ import json from mock import patch from django.conf import settings from django.contrib.auth.models import User from django.test.client import RequestFactory from contentstore.tests.utils import AjaxEnabledTestClient, CourseTestCase from contentst...
agpl-3.0
2,910,304,563,596,529,000
43.865942
116
0.601954
false
jtauber/dcpu16py
terminals/curses_terminal.py
3
2833
import curses class Terminal: style_bold = False keymap = {'A': 0x3, 'C': 0x2, 'D': 0x1} def setup_colors(self): curses.start_color() curses.use_default_colors() self.colors = {} self.colors[(0, 0)] = 0 self.colors[(7, 0)] = 0 self.color_index = 1 s...
mit
-2,002,509,363,815,710,000
29.793478
79
0.509354
false
laslabs/odoo-connector-carepoint
connector_carepoint/unit/mapper.py
1
4874
# -*- coding: utf-8 -*- # Copyright 2015-2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.addons.connector.unit.mapper import (mapping, changed_by, ImportMapper, ...
agpl-3.0
3,400,426,285,687,859,700
27.337209
77
0.576529
false
kurli/crosswalk
app/tools/android/gyp/jar.py
4
1783
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=F0401 import fnmatch import optparse import os import sys from util import build_utils from util import md5_check ...
bsd-3-clause
4,906,098,912,364,500,000
28.716667
79
0.701066
false
HumanExposure/factotum
dashboard/tests/unit/test_product_to_puc.py
1
8439
from django.db.utils import IntegrityError from django.test import TestCase, tag from dashboard.models import Product, PUC, ProductToPUC, ProductUberPuc, PUCKind from dashboard.tests.loader import load_model_objects, fixtures_standard from dashboard.views.product_curation import ProductForm import time @tag("puc") ...
gpl-3.0
-7,496,887,131,479,149,000
38.251163
101
0.627089
false
cmeeren/apexpy
setup.py
1
3229
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import import io import re from glob import glob from os import path, environ from setuptools import find_packages # Include extensions only when not on readthedocs.org if environ.get('READTHEDOCS', None) == 'True': from setuptools i...
mit
-2,962,109,356,124,107,300
34.097826
80
0.521214
false
chengjf/database-interface-doc-management
flask-demo/flask/Lib/site-packages/pip/_vendor/progress/helpers.py
404
2894
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software 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 "AS IS" AND THE A...
apache-2.0
-7,961,596,642,957,417,000
30.456522
74
0.618521
false
letmaik/lensfunpy
test/tests.py
2
5821
import numpy as np import lensfunpy as lensfun import gc from numpy.testing.utils import assert_equal # the following strings were taken from the lensfun xml files cam_maker = 'NIKON CORPORATION' cam_model = 'NIKON D3S' lens_maker = 'Nikon' lens_model = 'Nikon AI-S Nikkor 28mm f/2.8' def testDatabaseLoading(): db...
mit
1,605,617,574,332,892,200
33.443787
104
0.645594
false
tjsavage/tmrwmedia
djangotoolbox/fields.py
7
10758
# All fields except for BlobField written by Jonas Haag <jonas@lophus.org> from django.db import models from django.core.exceptions import ValidationError from django.utils.importlib import import_module __all__ = ('RawField', 'ListField', 'DictField', 'SetField', 'BlobField', 'EmbeddedModelField') class ...
bsd-3-clause
-6,270,491,817,875,390,000
38.992565
90
0.631902
false
OndroNR/ga-bitbot
gts.py
16
20392
""" gts v0.01 genetic test sequencer Copyright 2011 Brian Monkaba This file is part of ga-bitbot. ga-bitbot 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
-182,186,091,381,218,530
39.540755
167
0.54286
false
SUSE/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_assignments_operations.py
2
30831
# 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
6,938,475,820,851,304,000
45.362406
231
0.639389
false
ipashchenko/uvmod
uvmod/utils.py
1
8522
import math import psycopg2 import numpy as np mas_to_rad = 4.8481368 * 1E-09 n_q = 0.637 vfloat = np.vectorize(float) band_cm_dict = {'c': 6., 'l': 18., 'p': 94., 'k': 1.35} SEFD_dict = {'RADIO-AS': {'K': {'L': 46700., 'R': 36800}, 'C': {'L': 11600., 'R': None}, 'L...
mit
-3,182,100,353,803,740,000
37.044643
81
0.417625
false
hslee16/ansible-modules-extras
monitoring/rollbar_deployment.py
138
3898
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014, Max Riveiro, <kavu13@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
3,346,562,037,111,369,700
28.089552
97
0.631606
false
bartvm/pylearn2
pylearn2/scripts/papers/jia_huang_wkshp_11/fit_final_model.py
44
3913
from __future__ import print_function import numpy as np from optparse import OptionParser from pylearn2.models.independent_multiclass_logistic import IndependentMulticlassLogistic from galatea.s3c.feature_loading import get_features from pylearn2.utils import serial from pylearn2.datasets.cifar10 import CIFAR10 from ...
bsd-3-clause
6,836,480,216,472,130,000
30.304
99
0.623818
false
4eek/edx-platform
common/djangoapps/enrollment/tests/fake_data_api.py
104
3705
""" A Fake Data API for testing purposes. """ import copy import datetime _DEFAULT_FAKE_MODE = { "slug": "honor", "name": "Honor Code Certificate", "min_price": 0, "suggested_prices": "", "currency": "usd", "expiration_datetime": None, "description": None } _ENROLLMENTS = [] _COURSES = [...
agpl-3.0
-1,222,491,505,215,174,100
28.879032
108
0.651822
false
russellgeoff/blog
Control/Controllers/gc.py
4
2183
''' Copyright (C) 2013 Travis DeWolf 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 program is distributed in the hope t...
gpl-3.0
1,348,096,549,485,841,400
31.58209
73
0.615667
false
willingc/oh-mainline
vendor/packages/django-extensions/django_extensions/management/commands/passwd.py
41
1180
from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User import getpass class Command(BaseCommand): help = "Clone of the UNIX program ``passwd'', for django.contrib.auth." requires_model_validation = False def handle(self, *args, **options): i...
agpl-3.0
-363,040,011,538,661,600
30.052632
81
0.582203
false
dorianpula/paramiko
demos/demo.py
36
5396
#!/usr/bin/env python # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 2....
lgpl-2.1
-5,611,977,076,138,889,000
28.648352
88
0.614715
false
hyqneuron/pylearn2-maxsom
pylearn2/training_algorithms/tests/test_learning_rule.py
12
9942
import numpy as np from theano.compat.six.moves import zip as izip from pylearn2.costs.cost import SumOfCosts from pylearn2.testing.cost import SumOfOneHalfParamsSquared from pylearn2.testing.cost import SumOfParams from pylearn2.testing.datasets import ArangeDataset from pylearn2.training_algorithms.sgd import SGD f...
bsd-3-clause
197,006,328,474,794,600
34.255319
79
0.621304
false
cuongnv23/ansible
lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py
22
12128
#!/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
-3,137,585,488,418,320,000
34.153623
117
0.611065
false
nushio3/ghc
.arc-linters/check-cpp.py
6
1090
#!/usr/bin/env python # A linter to warn for ASSERT macros which are separated from their argument # list by a space, which Clang's CPP barfs on import sys import logging import os import json import re def setup_logging(logger): """ ``arc lint`` makes it quite tricky to catch debug output from linters. ...
bsd-3-clause
1,687,938,360,267,883,500
26.25
115
0.626606
false
cldmnky/salt-vault
_states/vault.py
2
2512
# -*- coding: utf-8 -*- ''' :maintainer: Calle Pettersson <cpettsson@gmail.com> :maturity: new :depends: python-requests :platform: all Interact with Hashicorp Vault ''' import logging import difflib import salt.exceptions log = logging.getLogger(__name__) def policy_present(name, rules): url ...
apache-2.0
5,613,529,509,486,607,000
25.723404
101
0.596338
false
johren/RackHD
test/util/display_node_firmware_versions.py
12
10942
''' Copyright 2017 Dell Inc. or its subsidiaries. All Rights Reserved. Purpose: This is a utility to display variuos node firmware and manufacturer info. ''' import fit_path # NOQA: unused import import json import pprint import fit_common import test_api_utils # Globals NODELIST = fit_common.node_select() if ...
apache-2.0
-2,759,054,859,170,837,000
43.844262
109
0.512886
false
probablytom/tomwallis.net
venv/lib/python2.7/site-packages/django/db/models/fields/related.py
21
105184
from __future__ import unicode_literals from operator import attrgetter from django.apps import apps from django.core import checks from django.db import connection, connections, router, transaction from django.db.backends import utils from django.db.models import signals, Q from django.db.models.deletion import SET_...
artistic-2.0
4,376,366,457,037,427,000
44.357482
228
0.573576
false
1st/django
django/contrib/auth/tests/custom_user.py
463
3662
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
-5,431,487,198,908,008,000
31.40708
88
0.667941
false
gohin/django
tests/admin_views/models.py
87
24003
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import tempfile from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.e...
bsd-3-clause
-8,335,779,341,034,002,000
24.745435
110
0.686053
false
mikeyarce/subscriptions-checkout-for-woocommerce
node_modules/node-gyp/gyp/tools/pretty_sln.py
1831
5099
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
gpl-2.0
3,316,468,121,732,812,000
29.171598
80
0.569523
false
yoki/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/queuecharts.py
122
6724
# 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 conditions and the ...
bsd-3-clause
-488,672,387,158,151,100
43.529801
110
0.644259
false
Cinntax/home-assistant
homeassistant/components/magicseaweed/sensor.py
1
6433
"""Support for magicseaweed data from magicseaweed.com.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_API_KEY, CONF_NAME, CONF_MONITORED_CONDITIONS, ATTR_ATTRIBUTION, ) import ...
apache-2.0
4,374,490,604,535,614,000
31.489899
84
0.606404
false
SingTel-DataCo/incubator-superset
superset/views/base.py
2
10977
import functools import json import logging import traceback from flask import g, redirect, Response, flash, abort from flask_babel import gettext as __ from flask_appbuilder import BaseView from flask_appbuilder import ModelView from flask_appbuilder.widgets import ListWidget from flask_appbuilder.actions import act...
apache-2.0
-6,809,069,399,859,635,000
32.568807
79
0.596611
false
zycdragonball/tensorflow
tensorflow/contrib/learn/python/learn/tests/dataframe/dataframe_test.py
62
3753
# 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
-3,118,896,128,274,725,000
31.921053
80
0.641886
false
distributed-system-analysis/sarjitsu
lib/backend/src/data_processor.py
1
1591
import os import subprocess import extract_sa from app import app from scripts.satools import oscode def prepare(sessionID, target, sa_filename, q): file_metadata = "file_metadata:%s:%s" % (sessionID, sa_filename) SA_FILEPATH = os.path.join(target, sa_filename) res = oscode.determine_version(file_path=SA_...
gpl-3.0
8,234,944,622,907,922,000
35.159091
78
0.595852
false
MilchReis/PicSort
src/core/input.py
1
1653
# -*- coding: utf-8 -*- ''' @author: nick ''' import pygame class InputProcessor(): def __init__(self, appModel): self.model = appModel def process(self, event): if event.type == pygame.QUIT: self.model.closeWindow() if event.type == pygame.KEYDOWN and even...
gpl-2.0
5,375,138,786,331,119,000
32.755102
103
0.568058
false
luzpaz/QGIS
tests/src/python/test_qgsmessagelog.py
15
3441
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMessageLog. .. 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 Software Foundation; either version 2 of the License, or (at your option) any later version. """ __a...
gpl-2.0
4,100,346,338,102,009,000
36.402174
79
0.657076
false
JioCloud/nova
nova/api/openstack/compute/contrib/extended_virtual_interfaces_net.py
40
2107
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
-8,212,399,059,415,874,000
38.754717
79
0.638348
false
farazaftab/sjhschool
node_modules/node-gyp/gyp/pylib/gyp/input.py
578
116086
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
mit
920,323,894,205,539,600
39.071108
84
0.654653
false
khchine5/xl
lino_xl/lib/ledger/fixtures/minimal_ledger.py
1
8612
# -*- coding: UTF-8 -*- # Copyright 2012-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """ Creates minimal accounting demo data: - a minimal accounts chart - some journals """ from __future__ import unicode_literals import logging logger = logging.getLogger(__name__) from django.conf import...
bsd-2-clause
-6,016,008,150,314,607,000
34.262295
82
0.620293
false
aksareen/balrog
auslib/web/public/base.py
1
4237
import cgi import connexion import logging import re import auslib.web from os import path from connexion import request from flask import make_response, send_from_directory, Response from raven.contrib.flask import Sentry from auslib.AUS import AUS from auslib.web.api_validator import BalrogParameterValidator fro...
mpl-2.0
-1,816,811,322,526,073,900
35.213675
116
0.695775
false
ales-erjavec/orange-bio
orangecontrib/bio/kegg/tests/test_api.py
2
3591
import unittest import tempfile import shutil try: from unittest import mock except ImportError: import backports.unittest_mock backports.unittest_mock.install() from unittest import mock try: from types import SimpleNamespace as namespace except ImportError: class namespace(object): d...
gpl-3.0
-8,012,116,879,656,298,000
29.692308
166
0.63687
false
proxysh/Safejumper-for-Desktop
buildlinux/env32/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.py
490
4141
import calendar import time from email.utils import formatdate, parsedate, parsedate_tz from datetime import datetime, timedelta TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT" def expire_after(delta, date=None): date = date or datetime.now() return date + delta def datetime_to_header(dt): return formatdate(c...
gpl-2.0
-349,287,363,617,834,800
29.007246
98
0.616518
false
ssteo/moviepy
moviepy/video/fx/freeze_region.py
13
1920
from moviepy.decorators import apply_to_mask from .crop import crop from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip #@apply_to_mask def freeze_region(clip, t=0, region=None, outside_region=None, mask=None): """ Freezes one region of the clip while the rest remains animated. Yo...
mit
9,020,259,678,958,154,000
33.285714
82
0.607813
false
hamzehd/edx-platform
common/djangoapps/student/tests/test_certificates.py
8
7756
"""Tests for display of certificates on the student dashboard. """ import unittest import ddt import mock from django.conf import settings from django.core.urlresolvers import reverse from mock import patch from django.test.utils import override_settings from xmodule.modulestore.tests.django_utils import ModuleStore...
agpl-3.0
6,241,288,495,151,705,000
37.78
107
0.667741
false
zkidkid/ssdb
deps/cpy/engine.py
8
13607
# encoding=utf-8 ################################# # Author: ideawu # Link: http://www.ideawu.net/ ################################# import sys, os, shutil, datetime import antlr3 import antlr3.tree from ExprLexer import ExprLexer from ExprParser import ExprParser class CpyEngine: found_files = set() def find_impo...
bsd-3-clause
-2,541,154,176,707,485,000
24.918095
133
0.59462
false
ktosiek/spacewalk
client/tools/rhncfg/actions/ModeControllerCreator.py
2
2565
# # Copyright (c) 2008--2011 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
-7,244,102,569,133,604,000
39.078125
155
0.723587
false
WatanabeYasumasa/edx-platform
cms/urls.py
6
6663
from django.conf import settings from django.conf.urls import patterns, include, url from xmodule.modulestore import parsers # There is a course creators admin table. from ratelimitbackend import admin admin.autodiscover() urlpatterns = patterns('', # nopep8 url(r'^transcripts/upload$', 'contentstore.views.uplo...
agpl-3.0
7,923,510,241,690,101,000
44.02027
114
0.642653
false
Lilykos/inspire-next
inspire/modules/classifier/config.py
1
1143
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2015 CERN. # # INSPIRE 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...
gpl-2.0
-6,344,380,451,561,356,000
34.71875
78
0.755031
false
scramblingbalam/Alta_Real
twit_token.py
1
1193
# -*- coding: utf-8 -*- """ Created on Thu Mar 02 17:07:02 2017 @author: Colin Drayton """ import sys import nltk import unicodedata as uniD import re # This modul uses python 3.5 # a function that turns tweets into one line tokenized strings # I wrote this for Doc2vec training but could be useful besides # the goal ...
mit
-7,263,662,056,736,341,000
26.744186
105
0.598491
false
levibostian/myBlanky
googleAppEngine/google/appengine/tools/devappserver2/admin/datastore_viewer_test.py
2
32568
#!/usr/bin/env python # # Copyright 2007 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 law o...
mit
-1,818,533,265,572,240,100
35.470325
79
0.594019
false
jnewland/home-assistant
homeassistant/components/cmus/media_player.py
7
6748
"""Support for interacting with and controlling the cmus music player.""" import logging import voluptuous as vol from homeassistant.components.media_player import ( MediaPlayerDevice, PLATFORM_SCHEMA) from homeassistant.components.media_player.const import ( MEDIA_TYPE_MUSIC, MEDIA_TYPE_PLAYLIST, SUPPORT_NEX...
apache-2.0
9,002,669,516,285,687,000
30.53271
76
0.606846
false
czgu/metaHack
env/lib/python2.7/site-packages/PIL/ImageTransform.py
71
2876
# # The Python Imaging Library. # $Id$ # # transform wrappers # # History: # 2002-04-08 fl Created # # Copyright (c) 2002 by Secret Labs AB # Copyright (c) 2002 by Fredrik Lundh # # See the README file for information on usage and redistribution. # from PIL import Image class Transform(Image.ImageTransformHandler)...
apache-2.0
-6,154,573,690,946,047,000
26.92233
70
0.684631
false
171121130/SWI
venv/Lib/site-packages/sqlalchemy/ext/declarative/base.py
5
25290
# ext/declarative/base.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Internal implementation for declarative.""" from ...schema import Table, ...
mit
-7,958,241,894,453,305,000
37.43465
79
0.520285
false
koomik/CouchPotatoServer
libs/tornado/auth.py
16
59831
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
gpl-3.0
-1,946,024,237,020,586,000
40.636047
109
0.594207
false
cloudera/hue
desktop/core/ext-py/Django-1.11.29/django/conf/locale/az/formats.py
58
1256
# -*- 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 E Y' TIME_FORMAT = 'G:i' DATETI...
apache-2.0
7,719,322,486,259,934,000
34.885714
77
0.575637
false
sankha93/servo
tests/wpt/web-platform-tests/tools/wptserve/wptserve/ranges.py
329
3003
from utils import HTTPException class RangeParser(object): def __call__(self, header, file_size): prefix = "bytes=" if not header.startswith(prefix): raise HTTPException(416, message="Unrecognised range type %s" % (header,)) parts = header[len(prefix):].split(",") rang...
mpl-2.0
-6,042,647,247,678,426,000
32.366667
86
0.522811
false
sgzsh269/django
django/contrib/auth/__init__.py
46
7785
import inspect import re from django.apps import apps as django_apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.middleware.csrf import rotate_token from django.utils.crypto import constant_time_compare from django.utils.module_loading import i...
bsd-3-clause
-7,735,517,087,375,775,000
34.226244
105
0.662171
false
joelsmith/openshift-tools
openshift/installer/vendored/openshift-ansible-3.4.40/roles/openshift_certificate_expiry/library/openshift_cert_expiry.py
18
25244
#!/usr/bin/python # -*- coding: utf-8 -*- # pylint: disable=line-too-long,invalid-name """For details on this module see DOCUMENTATION (below)""" # router/registry cert grabbing import subprocess # etcd config file import ConfigParser # Expiration parsing import datetime # File path stuff import os # Config file pars...
apache-2.0
-7,811,337,554,961,977,000
38.629513
202
0.585921
false
nugget/home-assistant
homeassistant/components/light/demo.py
7
4375
""" Demo light platform that implements lights. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ import random from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_HS_COLOR, ATTR_WHITE_VALUE, SUPP...
apache-2.0
-879,086,031,955,375,000
28.560811
78
0.601143
false
Alwnikrotikz/smap-data
python/smap/drivers/obvius/bmo.py
4
7648
""" Copyright (c) 2011, 2012, Regents of the University of California 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 l...
bsd-2-clause
3,743,487,051,369,216,500
32.54386
96
0.592442
false
linuxmcu/ardupilot
Tools/autotest/quadplane.py
29
4362
# fly ArduPlane QuadPlane in SITL from __future__ import print_function import os import pexpect import shutil from pymavlink import mavutil from common import * from pysim import util # get location of scripts testdir = os.path.dirname(os.path.realpath(__file__)) HOME_LOCATION = '-27.274439,151.290064,343,8.7' MIS...
gpl-3.0
-7,951,532,745,462,743,000
31.311111
123
0.6442
false
willm/DDEXUI
ddex/party.py
1
1146
import xml.etree.cElementTree as ET from DDEXUI.ddex.enum import enum PartyType = enum(MessageSender=1, MessageRecipient=2) class Party: def __init__(self, party_id, name, party_type=PartyType.MessageSender): self.party_id = party_id self.name = name self.party_type = party_type def w...
gpl-2.0
991,767,400,311,403,100
31.742857
118
0.628272
false
chenrenyi/flask
tests/test_regression.py
144
2467
# -*- coding: utf-8 -*- """ tests.regression ~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests regressions. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import os import gc import sys import flask import threading from werkzeug.exceptions import NotFound ...
bsd-3-clause
2,837,938,003,989,210,600
22.951456
72
0.566275
false
mariansoban/ardupilot
libraries/AP_HAL_ChibiOS/hwdef/scripts/dma_parse.py
44
2704
#!/usr/bin/env python ''' extra DMA mapping tables from a stm32 datasheet This assumes a csv file extracted from the datasheet using tablula: https://github.com/tabulapdf/tabula ''' import sys, csv, os def parse_dma_table(fname, table): dma_num = 1 csvt = csv.reader(open(fname,'rb')) i = 0 last_cha...
gpl-3.0
5,826,547,215,438,189,000
29.382022
100
0.514423
false