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
IKholopov/HackUPC2017
hackupc/env/lib/python3.5/site-packages/social_core/backends/odnoklassniki.py
4
7024
""" Odnoklassniki OAuth2 and Iframe Application backends, docs at: https://python-social-auth.readthedocs.io/en/latest/backends/odnoklassnikiru.html """ from hashlib import md5 from six.moves.urllib_parse import unquote from .base import BaseAuth from .oauth import BaseOAuth2 from ..exceptions import AuthFailed ...
apache-2.0
-4,009,894,273,014,803,500
39.837209
85
0.566486
false
jtoppins/beaker
Server/bkr/server/pools.py
1
18936
# 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. import re from flask import jsonify, request from bkr.server import id...
gpl-2.0
-1,867,289,688,546,506,000
38.865263
97
0.617448
false
rdelval/aurora
src/test/python/apache/thermos/core/test_runner_integration.py
14
6126
# # 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
-8,940,817,400,334,118,000
35.464286
97
0.642344
false
diogommartins/pox
pox/lib/packet/ethernet.py
45
5486
# Copyright 2011,2012,2013 James McCauley # Copyright 2008 (C) Nicira, 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 requ...
apache-2.0
6,745,358,192,403,361,000
29.648045
79
0.628327
false
Shemahmforash/playcert
playcert/lib/event.py
1
1199
import logging from playcert.lib.artist import Artist from playcert.cache import cache_data_in_hash log = logging.getLogger(__name__) class Event(object): def __init__(self, title, when, venue, artist_name=None, redis=None): self.title = title self.when = when self.venue = venue ...
gpl-2.0
-2,110,399,972,067,798,000
26.883721
93
0.589658
false
sacherjj/array_devices
baud_test.py
1
2376
from __future__ import division import serial import time from array_devices import array3710 __author__ = 'JoeSacher' """ This is a crude script to play with PC baud rates while the load is set to a fixed baud rate. """ load_addr = 1 # This should match load base_baud_rate = 9600 serial_conn = serial.Serial('COM4'...
mit
-1,785,297,088,008,296,200
31.121622
96
0.651936
false
popazerty/blackhole-vuplus
lib/python/Components/MediaPlayer.py
32
3735
from MenuList import MenuList from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename from os import path from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter from Tools.LoadPixmap import LoadPixmap import skin STATE_PLAY = 0 STATE_PAUSE = 1 STATE_STOP = 2 STATE_REWIND = ...
gpl-2.0
-2,370,759,973,291,924,500
29.867769
110
0.72664
false
hogarthj/ansible
test/units/modules/network/edgeos/test_edgeos_command.py
39
4249
# (c) 2018 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
-6,532,834,230,542,704,000
39.084906
100
0.648859
false
liberorbis/libernext
apps/frappe/frappe/__init__.py
3
19151
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt """ globals attached to frappe module + some utility functions that should probably be moved """ from __future__ import unicode_literals from werkzeug.local import Local, release_local import os, importlib, inspect, ...
gpl-2.0
-6,950,182,057,607,951,000
27.039531
176
0.710041
false
2013Commons/HUE-SHARK
build/env/lib/python2.7/site-packages/Pygments-1.3.1-py2.7.egg/pygments/lexer.py
58
22989
# -*- coding: utf-8 -*- """ pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.filter import apply_filters, Filter from pygments.filters import get_filter_by_name ...
apache-2.0
-986,447,255,852,400,400
33.831818
84
0.510723
false
derekjchow/models
official/keras_application_models/benchmark_main.py
1
8439
# 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
5,247,751,943,607,803,000
36.013158
80
0.688352
false
RevolutionTech/hummingbird
hummingbird_django/settings.py
1
2852
""" Django settings for hummingbird_django project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_D...
isc
1,061,643,904,173,831,800
22.377049
71
0.719495
false
mlassnig/pilot
NordugridATLASSiteInformation.py
3
1933
# Class definition: # NordugridATLASSiteInformation # This class is the Nordugrid-ATLAS site information class inheriting from ATLASSiteInformation # Instances are generated with SiteInformationFactory via pUtil::getSiteInformation() # Implemented as a singleton class # http://stackoverflow.com/questions/4255...
apache-2.0
-4,017,108,199,240,480,000
32.327586
112
0.665804
false
Chuban/moose
python/peacock/tests/postprocessor_tab/test_AxesSettingsPlugin.py
6
4831
#!/usr/bin/env python import sys import unittest from PyQt5 import QtCore, QtWidgets from peacock.PostprocessorViewer.plugins.AxesSettingsPlugin import main from peacock.utils import Testing class TestAxesSettingsPlugin(Testing.PeacockImageTestCase): """ Test class for the ArtistToggleWidget which toggles po...
lgpl-2.1
-3,835,865,617,230,231,000
35.323308
98
0.645415
false
denys-duchier/django
tests/gis_tests/layermap/models.py
21
2409
from django.contrib.gis.db import models class NamedModel(models.Model): name = models.CharField(max_length=25) class Meta: abstract = True required_db_features = ['gis_enabled'] def __str__(self): return self.name class State(NamedModel): pass class County(NamedModel): ...
bsd-3-clause
-7,026,902,760,400,785,000
23.09
95
0.618099
false
Addepar/buck
python-dsl/buck_parser/glob_internal.py
5
2442
# Copyright (c) Facebook, Inc. and its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
6,282,425,279,018,637,000
29.911392
88
0.612203
false
flightcoin/flightcoin
contrib/pyminer/pyminer.py
1257
6438
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file license.txt or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib im...
mit
-6,198,909,457,326,139,000
24.547619
84
0.648959
false
HKUST-SING/tensorflow
tensorflow/python/ops/cloud/bigquery_reader_ops_test.py
12
9585
# 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
6,620,960,106,350,109,000
32.513986
80
0.622744
false
kenorb-contrib/BitTorrent
launchmany-console.py
2
6333
#!/usr/bin/env python # 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 that ...
gpl-3.0
-6,538,406,648,143,412,000
41.790541
100
0.64156
false
flyher/pymo
android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_xml_etree.py
16
53139
# xml.etree test. This file contains enough tests to make sure that # all included components work as they should. # Large parts are extracted from the upstream test suite. # IMPORTANT: the same doctests are run from "test_xml_etree_c" in # order to ensure consistency between the C implementation and the # Python imp...
mit
9,105,284,904,654,779,000
27.175504
129
0.564745
false
tim-janik/beast
yapps2_deb/yapps/grammar.py
42
8821
# grammar.py, part of Yapps 2 - yet another python parser system # Copyright 1999-2003 by Amit J. Patel <amitp@cs.stanford.edu> # # This version of the Yapps 2 grammar can be distributed under the # terms of the MIT open source license, either found in the LICENSE # file included with the Yapps distribution # <http://t...
lgpl-2.1
-7,380,445,027,330,821,000
40.805687
158
0.534973
false
nhicher/ansible
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py
16
4457
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 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 #...
gpl-3.0
9,221,037,693,799,865,000
33.550388
144
0.660085
false
bakhtout/odoo-educ
addons/product_expiry/__init__.py
442
1053
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
agpl-3.0
-5,407,138,796,067,826,000
44.782609
79
0.615385
false
kartikgupta0909/gaia
test/unittest/test_parser.py
3
5700
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Gaia # # Gaia 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 (FSF), either ve...
agpl-3.0
-1,018,737,581,797,000,100
33.969325
87
0.570877
false
backmari/moose
python/peacock/tests/input_tab/InputFileEditorWithMesh/test_InputFileEditorWithMesh.py
1
9015
#!/usr/bin/env python from peacock.Input.InputFileEditorWithMesh import InputFileEditorWithMesh from PyQt5.QtWidgets import QMainWindow, QMessageBox from peacock.Input.ExecutableInfo import ExecutableInfo from peacock.utils import Testing import argparse, os from mock import patch class BaseTests(Testing.PeacockTester...
lgpl-2.1
-819,407,972,654,807,900
37.037975
86
0.641043
false
petewarden/tensorflow
tensorflow/python/debug/wrappers/disk_usage_test.py
11
4453
# 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
2,000,309,103,865,044,200
39.481818
80
0.702448
false
danlrobertson/servo
tests/wpt/web-platform-tests/tools/third_party/py/py/_code/_assertionnew.py
60
11450
""" Find intermediate evalutation results in assert statements through builtin AST. This should replace _assertionold.py eventually. """ import sys import ast import py from py._code.assertion import _format_explanation, BuiltinAssertionError def _is_ast_expr(node): return isinstance(node, ast.expr) def _is_ast...
mpl-2.0
4,941,451,064,539,613,000
34.559006
82
0.549607
false
marc-sensenich/ansible
test/units/modules/network/netvisor/test_pn_user.py
9
3099
# Copyright: (c) 2018, Pluribus Networks # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json from units.compat.mock import patch from ansible.modules.network.netvisor import pn...
gpl-3.0
3,382,621,277,372,873,700
39.776316
130
0.605034
false
nwjs/chromium.src
third_party/blink/web_tests/external/wpt/tools/third_party/pytest/testing/test_parseopt.py
30
13227
from __future__ import absolute_import, division, print_function import argparse import sys import os import py import pytest from _pytest.config import argparsing as parseopt @pytest.fixture def parser(): return parseopt.Parser() class TestParser(object): def test_no_help_by_default(self, capsys): ...
bsd-3-clause
-373,345,755,749,597,440
38.366071
86
0.581311
false
bufferx/tornado
tornado/test/web_test.py
1
68872
from __future__ import absolute_import, division, print_function, with_statement from tornado import gen from tornado.escape import json_decode, utf8, to_unicode, recursive_unicode, native_str, to_basestring from tornado.httputil import format_timestamp from tornado.iostream import IOStream from tornado.log import app_...
apache-2.0
4,746,392,921,405,410,000
37.583754
231
0.589877
false
jgraham/servo
tests/wpt/harness/wptrunner/update/base.py
196
2148
# 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/. exit_unclean = object() exit_clean = object() class Step(object): provides = [] def __init__(self, logger): ...
mpl-2.0
-216,479,394,361,351,000
30.130435
87
0.585661
false
Pal3love/otRebuilder
Package/otRebuilder/Dep/fontTools/misc/xmlReader.py
1
4302
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools import ttLib from fontTools.misc.textTools import safeEval from fontTools.ttLib.tables.DefaultTable import DefaultTable import sys import os import logging log = logging.getLogger(__name__) class TTXPars...
mit
5,323,565,127,717,191,000
26.401274
72
0.688517
false
ganeshrn/ansible
test/units/galaxy/test_collection_install.py
15
43234
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import copy import json import os import py...
gpl-3.0
-5,942,629,006,617,492,000
45.86413
155
0.692914
false
hnakamur/django
django/contrib/gis/gdal/srs.py
366
12043
""" The Spatial Reference class, represents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY...
bsd-3-clause
3,933,069,457,942,029,300
33.606322
97
0.603836
false
pmghalvorsen/gramps_branch
gramps/plugins/gramplet/topsurnamesgramplet.py
2
3999
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007-2009 Douglas S. Blank <doug.blank@gmail.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 2 of the Lic...
gpl-2.0
-2,794,664,892,853,630,000
36.027778
81
0.544136
false
daoluan/decode-Django
Django-1.5.1/tests/regressiontests/fixtures_regress/models.py
60
5752
from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Animal(models.Model): name = models.CharField(max_length=...
gpl-2.0
3,504,672,174,795,047,000
23.270042
85
0.660814
false
zanderle/django
django/contrib/gis/gdal/envelope.py
477
7009
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
bsd-3-clause
5,974,041,769,423,588,000
38.376404
99
0.55015
false
Hellenn/doctors_joomla
templates/doctors/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
1467
4228
#!/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. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os....
gpl-2.0
-8,050,265,196,797,189,000
30.088235
117
0.626064
false
cloudbase/cinder
cinder/tests/unit/group/test_groups_manager.py
4
31202
# Copyright (C) 2016 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
4,636,621,172,082,472,000
42.037241
79
0.547882
false
CTSRD-SOAAP/chromium-42.0.2311.135
build/android/pylib/valgrind_tools.py
40
9131
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Classes in this file define additional actions that need to be taken to run a test under some kind of runtime error detection tool. The interface is...
bsd-3-clause
-5,759,298,061,306,272,000
29.036184
80
0.668601
false
globau/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/testdata/handlers/blank_wsh.py
499
1557
# 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
5,047,748,141,726,140,000
49.225806
72
0.782274
false
wbc2010/django1.2.5
django/core/mail/backends/filebased.py
394
2485
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import EmailBackend as ConsoleEmailBackend class EmailBackend(ConsoleEmailBackend): def __init__(self, *arg...
bsd-3-clause
-7,158,368,009,309,340,000
41.118644
131
0.614889
false
brainelectronics/towerdefense
_build/lib/pyglet/gl/glu.py
45
25679
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
-3,376,340,563,036,097,000
48.765504
252
0.721329
false
analyseuc3m/ANALYSE-v1
lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py
12
2030
""" Tests for BlockCountsTransformer. """ # pylint: disable=protected-access from openedx.core.lib.block_structure.factory import BlockStructureFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import SampleCourseFactory from ..block_counts import ...
agpl-3.0
-1,705,462,066,008,102,400
39.6
119
0.704926
false
pombreda/libforensics
code/lf/win/shell/link/dtypes.py
13
5891
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics 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 later ver...
gpl-3.0
-113,635,050,440,121,060
25.299107
78
0.708708
false
lishensan/xbmc
lib/gtest/test/gtest_output_test.py
184
12027
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-2.0
6,393,144,828,064,978,000
34.901493
80
0.675896
false
atul-bhouraskar/django
tests/model_inheritance_regress/models.py
243
5863
from __future__ import unicode_literals import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) class Meta: ...
bsd-3-clause
-3,870,764,939,350,760,000
22.082677
93
0.704418
false
Adnn/django
tests/responses/tests.py
226
4171
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.http import HttpResponse from django.http.response import HttpResponseBase from django.test import SimpleTestCase UTF8 = 'utf-8' ISO88591 = 'iso-8859-1' class HttpResponseBaseTests(SimpleTestCase): def ...
bsd-3-clause
-5,156,841,790,988,676,000
35.570175
106
0.667546
false
0Chencc/CTFCrackTools
Lib/Lib/distutils/util.py
6
22225
"""distutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. """ __revision__ = "$Id: util.py 83588 2010-08-02 21:35:06Z ezio.melotti $" import sys, os, string, re from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from d...
gpl-3.0
-8,828,049,446,129,417,000
37.187285
79
0.576828
false
chrisdev/wagtail-cookiecutter-foundation
{{cookiecutter.project_slug}}/pages/migrations/0014_auto_20170817_1705.py
2
2045
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-17 17:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.fields import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('wagta...
mit
1,442,260,757,259,978,500
36.181818
191
0.607824
false
alanlhutchison/empirical-JTK_CYCLE-with-asymmetry
previous_files/jtk7.py
1
19118
#!/usr/bin/env python """ Created on April 20 2014 @author: Alan L. Hutchison, alanlhutchison@uchicago.edu, Aaron R. Dinner Group, University of Chicago This script is one in a series of scripts for running empirical JTK_CYCLE analysis as described in Hutchison, Maienschein-Cline, and Chiang et al. Improved statisti...
mit
-671,654,815,076,224,900
36.782609
422
0.546187
false
blooparksystems/odoo
addons/mass_mailing/controllers/main.py
18
1211
# -*- coding: utf-8 -*- import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request class MassMailController(http.Controller): @http.route('/mail/track/<int:mail_id>/blank.gif', type='http', auth='none') def track_mail_open(self, mail_id, **post): """ Email tracking. """...
gpl-3.0
2,881,848,456,850,798,000
45.576923
184
0.685384
false
benpatterson/edx-platform
common/djangoapps/track/migrations/0001_initial.py
189
2527
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'TrackingLog' db.create_table('track_trackinglog', ( ('id', self.gf('django.db.mo...
agpl-3.0
-953,182,245,877,072,800
51.645833
117
0.582905
false
happyleavesaoc/home-assistant
tests/components/camera/test_init.py
15
3572
"""The tests for the camera component.""" import asyncio from unittest.mock import patch import pytest from homeassistant.setup import setup_component from homeassistant.const import ATTR_ENTITY_PICTURE import homeassistant.components.camera as camera import homeassistant.components.http as http from homeassistant.ex...
apache-2.0
-237,461,647,704,012,670
32.383178
77
0.636618
false
quinot/ansible
lib/ansible/modules/network/cloudengine/ce_switchport.py
20
27667
#!/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
7,935,151,372,722,523,000
32.947239
123
0.553728
false
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models47488.py
2
17589
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
1,244,318,513,115,747,800
46.155496
75
0.699756
false
craigderington/studentloan5
studentloan5/Lib/encodings/cp874.py
272
12595
""" Python Character Mapping Codec cp874 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inpu...
bsd-3-clause
-1,250,610,034,300,649,700
40.026059
117
0.52759
false
pchauncey/ansible
lib/ansible/modules/cloud/rackspace/rax_files.py
33
11750
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.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
5,000,722,813,322,906,000
29.361757
98
0.584766
false
wanghao524151/scrapy_joy
open_insurance/models.py
1
2916
#!/usr/bin/python # -*- coding: utf-8 -*- from django.db import models from django.db.models.signals import pre_delete from django.dispatch import receiver from django.db.models.signals import pre_save from scrapy.contrib.djangoitem import DjangoItem from dynamic_scraper.models import Scraper, SchedulerRuntime class...
apache-2.0
9,013,831,063,802,531,000
35.194805
110
0.679828
false
craftytrickster/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/test_http_header_util.py
496
3372
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
mpl-2.0
4,985,388,599,685,385,000
36.466667
79
0.692467
false
redhat-openstack/nova
nova/db/sqlalchemy/utils.py
14
5568
# Copyright (c) 2013 Boris Pavlovic (boris@pavlovic.me). # 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...
apache-2.0
-7,538,963,703,526,424,000
39.941176
78
0.648886
false
krieger-od/nwjs_chromium.src
tools/telemetry/telemetry/timeline/inspector_importer.py
12
2626
# Copyright 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. '''Imports event data obtained from the inspector's timeline.''' import telemetry.timeline.slice as tracing_slice import telemetry.timeline.thread as timelin...
bsd-3-clause
-512,878,484,294,045,400
34.972603
79
0.677456
false
avedaee/DIRAC
WorkloadManagementSystem/Service/OptimizationMindHandler.py
1
9803
import types from DIRAC import S_OK, S_ERROR from DIRAC.Core.Utilities import DEncode, ThreadScheduler from DIRAC.Core.Security import Properties from DIRAC.Core.Base.ExecutorMindHandler import ExecutorMindHandler from DIRAC.WorkloadManagementSystem.Client.JobState.JobState import JobState from DIRAC.WorkloadManagement...
gpl-3.0
-990,969,427,920,183,300
38.055777
123
0.636132
false
sunils34/buffer-django-nonrel
django/core/xheaders.py
518
1157
""" Pages in Django can are served up with custom HTTP headers containing useful information about those pages -- namely, the content type and object ID. This module contains utility functions for retrieving and doing interesting things with these special "X-Headers" (so called because the HTTP spec demands that custo...
bsd-3-clause
3,068,264,548,416,674,300
47.208333
102
0.707001
false
jannekai/project-euler
017.py
1
1222
import time import math import sys start = time.time() w = dict() w[1] = "one" w[2] = "two" w[3] = "three" w[4] = "four" w[5] = "five" w[6] = "six" w[7] = "seven" w[8] = "eight" w[9] = "nine" w[10] = "ten" w[11] = "eleven" w[12] = "twelve" w[13] = "thirteen" w[14] = "fourteen" w[15] = "fifteen" ...
mit
971,198,617,764,273,700
15.211268
50
0.478723
false
dreucifer/chargenstart
product/views.py
1
2302
""" @todo """ from flask import render_template, request, flash, session, Blueprint, abort from product.models import Product, Category from cart.forms import AddToCartForm from product.utils import get_or_404, first_or_abort, get_for_page, get_by_slug from cart import ShoppingCart, SessionCart Products = Blueprint('p...
mit
-357,783,510,925,507,500
38.689655
84
0.682016
false
2hdddg/pyvidstream
test/vidanalyze.py
1
3170
from unittest import TestCase from vidutil.vidstream import Frame import vidutil.vidanalyze as a def _num_f(num): f = Frame(type='P', key_frame=False, width=1, height=1, coded_picture_number=num) return f class TestSplitFramesMissing(TestCase): def test_no_missing(self): """ Verifi...
mit
8,810,837,594,561,955,000
24.983607
59
0.529022
false
chafique-delli/OpenUpgrade
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
382
3763
########################################################################## # # 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 Gener...
agpl-3.0
621,330,875,642,178,600
41.280899
84
0.666224
false
SjorsVanGelderen/Graduation
python_3/data_structures/heap.py
1
5731
"""Heap data structure example Copyright 2017, Sjors van Gelderen """ import random """Heap data structure The 'max' property determines whether this is a max or min heap """ class Heap: def __init__(self, property): self.property = property self.keys = [] def __repr__(self): ret...
mit
-7,478,037,339,931,518,000
31.5625
85
0.517711
false
corburn/scikit-bio
skbio/alignment/__init__.py
4
7301
r""" Alignments and Sequence collections (:mod:`skbio.alignment`) ============================================================ .. currentmodule:: skbio.alignment This module provides functionality for working with biological sequence collections and alignments. These can be composed of generic sequences, nucelotide s...
bsd-3-clause
-3,175,329,109,081,393,700
30.334764
79
0.679085
false
gameduell/duell
bin/win/python2.7.9/Lib/quopri.py
424
6969
#! /usr/bin/env python """Conversions to/from quoted-printable transport encoding as per RFC 1521.""" # (Dec 1991 version). __all__ = ["encode", "decode", "encodestring", "decodestring"] ESCAPE = '=' MAXLINESIZE = 76 HEX = '0123456789ABCDEF' EMPTYSTRING = '' try: from binascii import a2b_qp, b2a_qp except Impo...
bsd-2-clause
-7,141,771,964,586,269,000
28.405063
78
0.531066
false
yamamatsu2/pimouse_ros
scripts/lightsensors.py
1
1258
#!/usr/bin/env python #encoding: utf8 import sys, rospy from pimouse_ros.msg import LightSensorValues def get_freq(): f = rospy.get_param('lightsensors_freq',10) try: if f <= 0.0: raise Exception() except: rospy.logerr("value error: ligtsensors_freq") sys.exit(1)...
gpl-3.0
-1,690,007,248,208,470,800
26.347826
74
0.503975
false
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Hash/SHA256.py
2
6305
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive licens...
mit
-5,691,074,405,908,422,000
34.445087
99
0.549881
false
authman/Python201609
pairol_alex/Assignments/pylotNinja/controllers/Ninja.py
1
1500
from system.core.controller import* import random import datetime from time import strftime class Ninja(Controller): def __init__(self, action): super(Ninja, self).__init__(action) def index(self): try: session['gold'] except: session['gold'] = 0 try: ...
mit
7,202,244,967,128,972,000
22.809524
93
0.529333
false
dbrgn/fahrplan
fahrplan/tests/test.py
1
9255
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import sys from datetime import datetime from subprocess import Popen, PIPE if sys.version_info[0] == 2 and sys.version_info[1] < 7: import unittest2 as unittest else: import unittest from .. import met...
gpl-3.0
-7,256,230,340,062,512,000
34.629344
90
0.60013
false
EducationForDevelopment/webapp
lib/flask/__init__.py
345
1672
# -*- coding: utf-8 -*- """ flask ~~~~~ A microframework based on Werkzeug. It's extensively documented and follows best practice patterns. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ __version__ = '0.10' # utilities we import from Werkzeug and J...
mit
241,608,978,765,968,220
32.44
77
0.746411
false
sshleifer/object_detection_kitti
object_detection/core/matcher_test.py
21
7101
# Copyright 2017 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
5,129,903,649,712,732,000
46.34
80
0.698071
false
caidongyun/pylearn2
pylearn2/datasets/avicenna.py
37
1062
""" .. todo:: WRITEME """ from pylearn2.datasets import utlc import numpy as N class Avicenna(object): """ .. todo:: WRITEME Parameters ---------- which_set : WRITEME standardize : WRITEME """ def __init__(self, which_set, standardize): train, valid, test = utl...
bsd-3-clause
-4,869,421,321,122,092,000
20.24
66
0.499058
false
iem-projects/WILMAmix
WILMA/gui/Translator.py
1
1678
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright © 2013, IOhannes m zmölnig, IEM # This file is part of WILMix # # 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 th...
gpl-2.0
-1,814,120,234,432,210,200
36.244444
101
0.711814
false
dstufft/sqlalchemy
test/dialect/mysql/test_query.py
12
6313
# coding: utf-8 from sqlalchemy.testing import eq_, is_ from sqlalchemy import * from sqlalchemy.testing import fixtures, AssertsCompiledSQL from sqlalchemy import testing class IdiosyncrasyTest(fixtures.TestBase, AssertsCompiledSQL): __only_on__ = 'mysql' __backend__ = True @testing.emits_warning() ...
mit
9,029,266,385,025,060,000
34.268156
81
0.503564
false
jsilhan/dnf-plugins-core
plugins/copr.py
1
16500
# supplies the 'copr' command. # # Copyright (C) 2014-2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is dis...
gpl-2.0
-5,778,732,182,900,510,000
38.007092
125
0.568424
false
jcsirot/kubespray
roles/kubernetes-apps/ansible/library/kube.py
7
8019
#!/usr/bin/python # -*- coding: utf-8 -*- DOCUMENTATION = """ --- module: kube short_description: Manage Kubernetes Cluster description: - Create, replace, remove, and stop resources within a Kubernetes Cluster version_added: "2.0" options: name: required: false default: null description: - The n...
apache-2.0
-4,585,314,485,349,802,500
25.291803
108
0.570894
false
Kamp9/scipy
scipy/io/tests/test_idl.py
38
19231
from __future__ import division, print_function, absolute_import from os import path from warnings import catch_warnings DATA_PATH = path.join(path.dirname(__file__), 'data') import numpy as np from numpy.testing import (assert_equal, assert_array_equal, run_module_suite, assert_) from scipy.io.idl import reads...
bsd-3-clause
-8,347,595,664,585,654,000
43.31106
105
0.605533
false
jkonecki/autorest
ClientRuntimes/Python/msrest/doc/conf.py
2
7620
# -*- coding: utf-8 -*- # # azure-sdk-for-python documentation build configuration file, created by # sphinx-quickstart on Fri Jun 27 15:42:45 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerate...
mit
-8,192,403,536,649,779,000
31.016807
83
0.709974
false
mapr/hue
desktop/core/ext-py/Django-1.6.10/django/utils/encoding.py
92
9512
from __future__ import unicode_literals import codecs import datetime from decimal import Decimal import locale import warnings from django.utils.functional import Promise from django.utils import six from django.utils.six.moves.urllib.parse import quote class DjangoUnicodeDecodeError(UnicodeDecodeError): def __...
apache-2.0
-8,279,716,757,792,622,000
36.596838
80
0.612174
false
CiscoUcs/Ironic-UCS
build/lib.linux-x86_64-2.7/ironic/openstack/common/jsonutils.py
7
6832
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-8,270,880,727,049,315,000
34.957895
79
0.643443
false
sogis/Quantum-GIS
python/plugins/processing/core/ProcessingLog.py
5
9837
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingLog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
gpl-2.0
6,255,954,867,690,181,000
33.759717
79
0.536952
false
moble/sympy
sympy/polys/domains/tests/test_polynomialring.py
99
3314
"""Tests for the PolynomialRing classes. """ from sympy.polys.domains import QQ, ZZ from sympy.polys.polyerrors import ExactQuotientFailed, CoercionFailed, NotReversible from sympy.abc import x, y from sympy.utilities.pytest import raises def test_build_order(): R = QQ.old_poly_ring(x, y, order=(("lex", x), ("...
bsd-3-clause
4,203,609,760,696,980,500
31.490196
102
0.588715
false
nwiizo/workspace_2017
ansible-modules-core/network/eos/eos_eapi.py
13
13144
#!/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...
mit
-6,866,054,699,081,414,000
34.333333
108
0.658932
false
hatwar/Das_erpnext
erpnext/accounts/doctype/journal_entry/test_journal_entry.py
25
7835
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest, frappe from frappe.utils import flt from erpnext.accounts.utils import get_actual_expense, BudgetError, get_fiscal_year class TestJou...
agpl-3.0
1,435,088,348,423,113,500
37.596059
120
0.698149
false
iaklampanos/dj-vercereg
dj_vercereg/dj_vercereg/settings.py
1
6595
# Copyright 2014 The University of Edinburgh # # 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...
apache-2.0
-7,229,218,075,049,728,000
29.532407
97
0.651554
false
jstammers/EDMSuite
NavPython/IronPython/Lib/pprint.py
147
11932
# Author: Fred L. Drake, Jr. # fdrake@acm.org # # This is a simple little module I wrote to make life easier. I didn't # see anything quite like it in the library, though I may have overlooked # something. I wrote this when I was trying to read some heavily nested # tuples with fairly non-desc...
mit
-9,020,407,297,888,988,000
33.091429
81
0.526986
false
m4nolo/steering-all
src/entities/relativeentity.py
2
1279
from entity import Entity class RelativeEntity(Entity): def __init__(self, width, height): Entity.__init__(self, width, height) self.margin = [0, 0, 0, 0] def below(self, entity): self.y = entity.y + entity.height + self.margin[1] def above(self, entity): self.y = entity.y - self.height - self...
mit
-8,583,138,722,605,353,000
22.254545
63
0.635653
false
etkirsch/scikit-learn
examples/svm/plot_custom_kernel.py
171
1546
""" ====================== SVM with custom kernel ====================== Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface and the support vectors. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import svm, datasets # import some data...
bsd-3-clause
-3,280,248,896,302,629,000
26.122807
76
0.596378
false
petercable/mi-instrument
mi/platform/rsn/simulator/oms_events.py
5
10097
#!/usr/bin/env python """ @package ion.agents.platform.rsn.simulator.oms_events @file ion/agents/platform/rsn/simulator/oms_events.py @author Carlos Rueda @brief OMS simulator event definitions and supporting functions. Demo program included that allows to run both a listener server and a notif...
bsd-2-clause
2,641,930,980,059,355,000
34.059028
263
0.596811
false
neurokernel/retina
retina/screen/map/pointmap.py
1
2303
from abc import ABCMeta, abstractmethod class PointMap(object): """ Interface of mapping a point from one surface to another (hence the 2 parameters) """ __metaclass__ = ABCMeta @abstractmethod def map(self, p1, p2): """ map of point (p1, p2) from one surface to another """ ...
bsd-3-clause
2,626,748,361,710,813,700
24.876404
73
0.582718
false
initialed85/mac_os_scripts
mac_os_scripts/set_firmware_password.py
1
1788
""" This script is responsible for setting the firmware password Commands used: - expect -d -f /usr/local/zetta/mac_os_scripts/external/set_firmware_password_expect set password [lindex $argv 0]; spawn firmwarepasswd -setpasswd -setmode command expect { "Enter new password:" { send "$passw...
mit
7,004,433,027,221,430,000
21.35
127
0.574944
false
KerkhoffTechnologies/django-connectwise
djconnectwise/migrations/0107_auto_20190729_1352.py
1
1172
# Generated by Django 2.1 on 2019-07-29 13:52 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0106_auto_20190722_1524'), ] operations = [ migrations.AddField( model_name='con...
mit
2,023,568,476,454,551,800
33.470588
166
0.599829
false
a11r/grpc
src/python/grpcio_health_checking/grpc_health/v1/health.py
15
2677
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
1,560,193,642,846,013,200
40.184615
72
0.719089
false
MjAbuz/watchdog
vendor/rdflib-2.4.0/rdflib/sparql/bison/SolutionModifier.py
4
1223
ASCENDING_ORDER = 1 DESCENDING_ORDER = 2 UNSPECIFIED_ORDER = 3 ORDER_VALUE_MAPPING = { ASCENDING_ORDER : 'Ascending', DESCENDING_ORDER : 'Descending', UNSPECIFIED_ORDER : 'Default', } class SolutionModifier(object): def __init__(self,orderClause=None,limitClause=None,offsetClause=None): ...
agpl-3.0
3,920,645,265,022,297,600
33
100
0.647588
false