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
lucasrangit/twitter-winner
twitter-winner/requests_oauthlib/oauth1_session.py
4
14418
from __future__ import unicode_literals try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import logging from oauthlib.common import add_params_to_uri, urldecode from oauthlib.oauth1 import SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER import requests from . import OAuth1...
mit
8,263,807,682,558,604,000
43.915888
145
0.624705
false
r888888888/models
inception/inception/slim/losses_test.py
34
6414
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
5,058,567,921,013,717,000
35.237288
80
0.593545
false
rinsewester/SDFkit
tests/testsdfgraph.py
1
2225
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Validation of the CSDF class usign unittests author: Rinse Wester """ import unittest from csdfgraph import CSDFGraph class SDFGraphTestCase(unittest.TestCase): def setUp(self): # create a graph with a cycle self.cycle_cons_sdf_graph = CSDFGraph(...
mit
-6,286,117,221,439,113,000
33.78125
117
0.613933
false
eonpatapon/rally
tests/unit/doc/test_task_samples.py
4
5334
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-6,061,148,946,496,242,000
41
78
0.533933
false
jdobes/cobbler
cobbler/collection_images.py
15
2652
""" A image instance represents a ISO or virt image we want to track and repeatedly install. It differs from a answer-file based installation. Copyright 2006-2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This software may be freely redistributed under the terms of the GNU general public license. You should...
gpl-2.0
3,060,962,506,036,341,000
33
121
0.608974
false
Thingee/cinder
cinder/volume/drivers/vmware/io_util.py
2
7026
# Copyright (c) 2013 VMware, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
3,197,994,758,696,005,000
34.846939
79
0.528039
false
gonzolino/heat
heat/tests/openstack/monasca/test_alarm_definition.py
3
9351
# # 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 # ...
apache-2.0
-6,299,625,332,925,267,000
38.125523
79
0.62496
false
hmrc/wristband
config/settings/production.py
1
2863
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure ''' from __future__ import absolute_import, unicode_literals import ldap from django_auth_ldap.config import LDAPSearch, GroupOfNamesType from .common import * # noqa # SECRET CONFIGURATION # -----------------------------------------------...
apache-2.0
-2,168,328,555,000,413,400
33.493976
112
0.679707
false
macs03/demo-cms
cms/lib/python2.7/site-packages/djangocms_video/migrations/0001_initial.py
6
6735
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models, connection class Migration(SchemaMigration): def forwards(self, orm): table_names = connection.introspection.table_names() if 'cmsplugin_video' in table_names: ...
mit
-6,523,938,234,987,935,000
73.844444
157
0.58441
false
baishancloud/pykit
shell/command.py
2
3735
#!/usr/bin/env python2 # coding: utf-8 import argparse import copy import sys import logging import os from pykit import dictutil logger = logging.getLogger(__name__) def command(**kwargs): root, parser = add_command_help(kwargs) inputs = sys.argv[1:] try: cmds = [] while len(inputs)...
mit
7,613,730,976,120,087,000
22.34375
114
0.558233
false
vnsofthe/odoo-dev
openerp/addons/base/tests/test_view_validation.py
396
3427
# This test can be run stand-alone with something like: # > PYTHONPATH=. python2 openerp/tests/test_view_validation.py from lxml import etree from StringIO import StringIO import unittest2 from openerp.tools.view_validation import (valid_page_in_book, valid_att_in_form, valid_type_in_colspan, ...
agpl-3.0
-7,848,214,223,956,524,000
25.160305
104
0.552378
false
flavio-fernandes/networking-odl
networking_odl/openstack/common/_i18n.py
3
1735
# 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 # d...
apache-2.0
-243,356,905,549,016,200
37.555556
78
0.697406
false
henocdz/dotcom
PIL/WalImageFile.py
40
5422
# -*- coding: iso-8859-1 -*- # # The Python Imaging Library. # $Id$ # # WAL file handling # # History: # 2003-04-23 fl created # # Copyright (c) 2003 by Fredrik Lundh. # # See the README file for information on usage and redistribution. # # NOTE: This format cannot be automatically recognized, so the reader # is not...
mit
7,677,720,786,642,503,000
42.031746
73
0.664515
false
ozamiatin/glance
glance/tests/functional/db/__init__.py
27
1077
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
168,201,600,713,842,100
32.65625
78
0.714949
false
egoid/baytree
lib/python2.7/site-packages/django/template/engine.py
87
7582
from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache, six from django.utils.functional import cached_property from django.utils.module_loading import import_string from .base import Context, Template from .context import _builtin_context_processors from .exceptions import Template...
mit
-4,994,552,040,760,800,000
37.48731
87
0.607228
false
pablohoffman/scrapy
scrapy/tests/test_contrib_spiderstate.py
29
1069
import os from datetime import datetime from twisted.trial import unittest from scrapy.contrib.spiderstate import SpiderState from scrapy.spider import BaseSpider class SpiderStateTest(unittest.TestCase): def test_store_load(self): jobdir = self.mktemp() os.mkdir(jobdir) spider = BaseSpi...
bsd-3-clause
749,920,403,694,161,500
28.694444
76
0.63985
false
nickdex/cosmos
code/artificial_intelligence/src/k_nearest_neighbours/k_nearest_neighbours.py
3
2391
# k Nearest Neighbours implemented from Scratch in Python import csv import random import math import operator def loadDataset(filename, split, trainingSet=[], testSet=[]): with open(filename, "rt") as csvfile: lines = csv.reader(csvfile) dataset = list(lines) for x in range(len(dataset) ...
gpl-3.0
-2,804,288,332,234,084,400
28.158537
86
0.613969
false
lunatik-210/microservices
case-study/flask-auth/test.py
1
1391
import requests from time import sleep from base64 import b64encode url = "http://localhost:5001/v1" def post_users(): for i in range(10): email = "andrew.d.lapin{0}@gmail.com".format(i) user = dict(email=email, password="root") requests.post(url+"/users", data=user, headers=headers) def ...
gpl-3.0
6,636,801,650,176,980,000
37.638889
105
0.624012
false
haripradhan/MissionPlanner
Lib/site-packages/numpy/distutils/fcompiler/vast.py
94
1709
import os from numpy.distutils.fcompiler.gnu import GnuFCompiler compilers = ['VastFCompiler'] class VastFCompiler(GnuFCompiler): compiler_type = 'vast' compiler_aliases = () description = 'Pacific-Sierra Research Fortran 90 Compiler' version_pattern = r'\s*Pacific-Sierra Research vf90 '\ ...
gpl-3.0
2,512,722,758,402,617,000
30.648148
83
0.586308
false
dhenrygithub/QGIS
python/ext-libs/pytz/tzinfo.py
95
19212
'''Base classes and helpers for building zone specific tzinfo classes''' from datetime import datetime, timedelta, tzinfo from bisect import bisect_right try: set except NameError: from sets import Set as set import pytz from pytz.exceptions import AmbiguousTimeError, NonExistentTimeError __all__ = [] _time...
gpl-2.0
-4,907,540,597,123,897,000
33.124334
79
0.585519
false
sio2project/oioioi
oioioi/forum/migrations/0008_post_reactions.py
1
1242
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-01-23 01:34 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import oioioi.base.fields class Migration(migrations.Migration): dependencies = [ m...
gpl-3.0
-7,883,747,741,073,896,000
36.636364
153
0.633655
false
w495/python-video-shot-detector
shot_detector/features/extractors/parallel_extractor.py
1
3728
# -*- coding: utf8 -*- """ This is part of shot detector. Produced by w495 at 2017.05.04 04:18:27 """ from __future__ import absolute_import, division, print_function import itertools import logging import multiprocessing as mp from concurrent.futures import ProcessPoolExecutor, as_completed from shot_detect...
bsd-3-clause
-341,418,870,714,332,700
24.710345
72
0.568401
false
Glucksistemi/EGS-DSM
core/connections/database/migrate.py
1
2704
""" creating tables in selected database. launch this script in case of new database """ import models import json print "creating tables..." models.Player.create_table() models.Playfield.create_table() models.CoreLog.create_table() models.HeartBeat.create_table() models.PlayerLogonEvent.create_table() models.PlayerTra...
bsd-3-clause
1,819,970,798,220,263,400
21.923729
80
0.485947
false
makerbot/conveyor
src/test/python/pi_test_Address.py
1
3686
import unittest import sys import os #override sys.path for testing only sys.path.insert(0,'./src/main/python') import conveyor import conveyor.address class TestAddress(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_address_factory(self): with sel...
agpl-3.0
-5,923,699,794,721,154,000
32.207207
87
0.655453
false
tommo/gii
lib/3rdparty/common/pyqode/core/panels/checker.py
4
4447
""" Checker panels: - CheckerPanel: draw checker messages in front of each line - GlobalCheckerPanel: draw all checker markers as colored rectangle to offer a global view of all errors """ from pyqode.core import icons from pyqode.core.api import DelayJobRunner, TextHelper, CodeEdit from pyqode.core.api....
mit
-3,597,888,632,308,117,000
36.686441
78
0.569822
false
msherry/litle-sdk-for-python-114
litleSdkPythonTest/unit/TestPostGenerationScript.py
2
12954
#Copyright (c) 2011-2012 Litle & Co. # #Permission is hereby granted, free of charge, to any person #obtaining a copy of this software and associated documentation #files (the "Software"), to deal in the Software without #restriction, including without limitation the rights to use, #copy, modify, merge, publish, distri...
mit
2,379,809,239,932,692,500
47.520599
549
0.691755
false
fidomason/kbengine
kbe/src/lib/python/Lib/test/test_pwd.py
88
4229
import sys import unittest from test import support pwd = support.import_module('pwd') class PwdTest(unittest.TestCase): def test_values(self): entries = pwd.getpwall() for e in entries: self.assertEqual(len(e), 7) self.assertEqual(e[0], e.pw_name) self.assert...
lgpl-3.0
-6,717,953,874,314,743,000
36.096491
78
0.562544
false
shashankbassi92/tornado
tornado/test/websocket_test.py
99
14775
from __future__ import absolute_import, division, print_function, with_statement import traceback from tornado.concurrent import Future from tornado import gen from tornado.httpclient import HTTPError, HTTPRequest from tornado.log import gen_log, app_log from tornado.testing import AsyncHTTPTestCase, gen_test, bind_u...
apache-2.0
5,854,549,755,275,691,000
34.26253
84
0.627208
false
lopp2005/HiSpatialCluster
tool_densfilter.py
2
5412
# -*- coding: utf-8 -*- """ Density Filter Tool Created on Thu May 11 11:03:05 2017 @author: cheny """ from arcpy import Parameter import arcpy from section_cpu import dens_filter_cpu from multiprocessing import cpu_count class DensFilterTool(object): def __init__(self): """Classify Tool""" self...
apache-2.0
-2,409,742,214,411,060,000
33.037736
115
0.53289
false
shizeeg/pyicqt
src/xdb/pgsql.py
1
8944
# Copyright 2005-2006 Daniel Henninger <jadestorm@nc.rr.com> # Licensed for distribution under the GPL version 2, check COPYING for details # # Ported to PostgreSQL by sh!zeeg <shizeeque@gmail.com> # # PostgreSQL database storage. See db-setup.pgsql in the tools directory in # the root of the distribution, as well as ...
gpl-2.0
7,557,762,496,462,895,000
32.878788
183
0.65653
false
danielpalomino/gem5
src/mem/slicc/ast/OodAST.py
90
1802
# # Copyright (c) 2011 Mark D. Hill and David A. Wood # 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 condit...
bsd-3-clause
4,820,654,106,682,465,000
44.05
72
0.758047
false
wibbe/ZumGo
vendor/src/github.com/ericlagergren/decimal/_testdata/tables.py
1
8662
#!/usr/bin/env python3.6 from decimal import * import gzip import random import sys import math ops = { "*": "multiplication", "+": "addition", "-": "subtraction", "/": "division", "qC": "comparison", "quant": "quantization", "A": "absolute-value", "cfd": "convert-to-string", "~": ...
mit
-1,783,186,415,024,315,000
23.819484
78
0.402101
false
tsufiev/horizon
openstack_dashboard/dashboards/project/networks/urls.py
65
1987
# 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
-4,578,084,213,599,172,000
42.195652
78
0.700554
false
unreal666/youtube-dl
youtube_dl/extractor/teletask.py
215
1739
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unified_strdate class TeleTaskIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tele-task\.de/archive/video/html5/(?P<id>[0-9]+)' _TEST = { 'url': 'http://www.tele-task.de/archive/video/html5/2...
unlicense
-5,556,642,569,329,664,000
31.811321
87
0.489937
false
PabloCastellano/nodeshot
nodeshot/core/metrics/models.py
2
3990
from datetime import datetime from django.contrib.gis.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONField from nodeshot.core.base.models import BaseDate fro...
gpl-3.0
-2,678,595,289,679,171,000
35.944444
95
0.580952
false
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
python-packages/nolearn-0.5/build/lib.linux-x86_64-2.7/nolearn/tests/test_console.py
2
2473
import os from tempfile import NamedTemporaryFile from mock import patch from test_inischema import SAMPLE_CONFIGURATION from test_inischema import SAMPLE_SCHEMA SAMPLE_CONFIGURATION += """ [env] somekey = somevalue """ class TestCommand(object): with NamedTemporaryFile(delete=False) as config_file: ...
bsd-3-clause
-5,985,149,937,599,332,000
25.308511
67
0.556409
false
lukeiwanski/tensorflow
tensorflow/python/lib/io/python_io.py
14
1054
# 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
402,154,051,791,472,450
36.642857
80
0.705882
false
marc-sensenich/ansible
test/units/modules/network/ftd/test_ftd_file_download.py
52
4046
# Copyright (c) 2018 Cisco and/or its affiliates. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
gpl-3.0
-4,172,483,841,583,855,000
40.285714
106
0.680919
false
geertj/pyskiplist
tests/test_skiplist.py
1
11345
# # This file is part of PySkiplist. PySkiplist is Copyright (c) 2012-2015 by # the PySkiplist authors. # # PySkiplist is free software available under the MIT license. See the file # named LICENSE distributed with this file for the exact licensing terms. from __future__ import absolute_import, print_function import ...
mit
202,990,929,904,099,230
36.943144
82
0.5658
false
mach0/QGIS
src/plugins/grass/scripts/r.external.all.py
45
3255
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ *************************************************************************** r.external.all.py --------------------- Date : July 2009 Copyright : (C) 2009 by Lorenzo Masini Email : rugginoso at develer dot c...
gpl-2.0
-6,980,155,506,468,818,000
29.420561
172
0.525038
false
Dmitry-Me/cppcheck
tools/test_matchcompiler.py
2
8033
#!/usr/bin/env python # # Cppcheck - A tool for static C/C++ code analysis # Copyright (C) 2007-2016 Cppcheck team. # # 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 Lice...
gpl-3.0
-5,796,094,311,468,842,000
45.703488
110
0.587576
false
howthebodyworks/mlmistrels
src/encoder.py
1
3657
#!/bin/local/bin/python3 # A utility, script, or potentially one day class to convert audio waveforms in to windowed, reduced descriptors, for some machine learning algorithm to go nuts on later # Authors: James Nichols, Darwin Vickers # Includes a test of converting then reversing the predictor to see how things so...
gpl-3.0
-2,580,676,542,119,037,400
30.534483
169
0.621274
false
damdam-s/OpenUpgrade
addons/account_payment/wizard/account_payment_populate_statement.py
274
4160
# -*- 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
-626,145,156,765,524,900
44.714286
173
0.596635
false
BaconPancakes/valor
lib/discord/opus.py
17
8695
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2016 Rapptz 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 u...
gpl-3.0
-5,729,227,780,509,829,000
30.389892
116
0.634043
false
googleads/google-ads-python
google/ads/googleads/v7/enums/types/matching_function_operator.py
1
1216
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-3,386,492,190,598,914,000
29.4
74
0.689967
false
Lilykos/invenio
invenio/legacy/search_engine/utils.py
19
1783
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014 CERN. # # Invenio 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; eithe...
gpl-2.0
-8,573,056,373,499,265,000
36.145833
86
0.68424
false
jamescr/osm2gtfs
osm2gtfs/tests/creators/tests_cr_gam.py
2
1547
import unittest import os import logging from osm2gtfs.tests.creators.creators_tests import CreatorsTestsAbstract # Define logging level logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO")) class TestCreatorsCrGam(CreatorsTestsAbstract): def _get_selector(self): return "cr_gam" def _get_re...
gpl-3.0
-2,552,784,787,872,128,500
31.229167
98
0.616677
false
CSavvy/coursebuilder
models/content.py
22
21971
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
-7,790,398,736,420,187,000
30.076379
78
0.534022
false
mariosky/evo-drawings
venv/lib/python2.7/site-packages/django/utils/2to3_fixes/fix_unicode.py
349
1181
"""Fixer for __unicode__ methods. Uses the django.utils.encoding.python_2_unicode_compatible decorator. """ from __future__ import unicode_literals from lib2to3 import fixer_base from lib2to3.fixer_util import find_indentation, Name, syms, touch_import from lib2to3.pgen2 import token from lib2to3.pytree import Leaf,...
agpl-3.0
8,355,684,258,759,564,000
31.805556
100
0.617273
false
flamholz/equilibrator
gibbs/info_pages.py
1
1097
from django.shortcuts import render_to_response from equilibrator.gibbs import constants from django.template.context import RequestContext def AboutPage(request): """Renders the about page.""" return render_to_response('about.html', {}) def FAQPage(request): """Renders the FAQ page.""" return rende...
mit
-7,771,816,585,690,856,000
26.45
73
0.660893
false
AlexLitvino/pyASSA
examples/example_documentation_project/rules_definition.py
1
7677
# ----------------------------------------------------------------------------- # Copyright 2017 Aleksey Litvinov litvinov.aleks@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
apache-2.0
-3,978,930,908,852,987,000
45.246988
155
0.660023
false
lucienfostier/gaffer
python/GafferArnoldUI/__init__.py
7
2549
########################################################################## # # Copyright (c) 2012, John Haddon. 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 so...
bsd-3-clause
-5,127,617,585,927,348,000
40.786885
92
0.719106
false
normanjaeckel/openslides-votecollector
openslides_votecollector/apps.py
1
2500
from django.apps import AppConfig from . import __description__, __verbose_name__, __version__ class VoteCollectorAppConfig(AppConfig): name = 'openslides_votecollector' verbose_name = __verbose_name__ description = __description__ version = __version__ angular_site_module = True angular_proj...
mit
-5,252,763,574,945,421,000
37.461538
102
0.6576
false
khwon/iTerm2
tests/esctest/tests/cht.py
31
1268
import esccmd from esctypes import Point from escutil import AssertEQ, GetCursorPosition, knownBug class CHTTests(object): @knownBug(terminal="iTerm2", reason="iTerm2 doesn't support CHT") def test_CHT_OneTabStopByDefault(self): esccmd.CHT() position = GetCursorPosition() AssertEQ(position.x(), 9) @...
gpl-2.0
7,574,766,339,309,061,000
29.190476
80
0.69795
false
leeon/annotated-django
tests/invalid_models_tests/test_ordinary_fields.py
6
12212
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import unittest from django.core.checks import Error from django.db import connection, models from .base import IsolatedModelsTestCase class AutoFieldTests(IsolatedModelsTestCase): def test_valid_case(self): class Model(models.Model): ...
bsd-3-clause
477,013,636,697,161,000
29.453865
103
0.523256
false
h4wkmoon/shinken
shinken/misc/logevent.py
1
4102
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2014 - Savoir-Faire Linux inc. # # This file is part of Shinken. # # Shinken 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 ...
agpl-3.0
-8,440,242,523,598,199,000
37.336449
143
0.557045
false
aleprovencio/cookiecutter-django
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_urls.py
116
1716
from django.core.urlresolvers import reverse, resolve from test_plus.test import TestCase class TestUserURLs(TestCase): """Test URL patterns for users app.""" def setUp(self): self.user = self.make_user() def test_list_reverse(self): """users:list should reverse to /users/.""" s...
bsd-3-clause
-6,417,563,680,597,816,000
32.647059
79
0.608974
false
WilsonWangTHU/fast-rcnn
lib/utils/blob.py
63
1625
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Blob helper functions.""" import numpy as np import cv2 def im_lis...
mit
3,607,375,123,828,012,000
35.111111
75
0.581538
false
rallylee/gem5
src/cpu/kvm/KvmVM.py
14
2351
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
2,774,187,606,707,257,300
47.979167
72
0.785623
false
smerritt/swift
test/functional/test_access_control.py
3
109044
#!/usr/bin/python # Copyright (c) 2015 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
-1,310,468,589,718,097,000
31.913975
79
0.535004
false
larroy/mxnet
cpp-package/scripts/OpWrapperGenerator.py
4
17414
# 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
3,054,437,083,622,532,600
38.757991
110
0.507695
false
flyapen/UgFlu
flumotion/test/test_porter.py
2
5495
# -*- Mode: Python; test-case-name: flumotion.test.test_porter -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public L...
gpl-2.0
351,927,389,730,944,700
28.702703
74
0.648408
false
NAMD/mediacloud
justice/external/babel/messages/extract.py
67
23063
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software cons...
lgpl-3.0
-3,589,335,831,055,853,600
39.629964
80
0.548237
false
CydarLtd/ansible
lib/ansible/modules/cloud/amazon/ec2_key.py
52
8584
#!/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,918,141,568,616,891,000
31.029851
108
0.5565
false
gnowledge/OTM2
opentreemap/treemap/migrations/0013_auto__del_field_tree_created_by__del_field_plot_created_by.py
3
15159
# -*- 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): # Deleting field 'Tree.created_by' db.delete_column(u'treemap_tree', 'created_by_id') # Deleting fi...
gpl-3.0
4,626,933,150,229,683,000
78.371728
187
0.55162
false
DevicePilot/synth
synth/devices/helpers/dark_sky.py
1
6316
#T!/usr/bin/env python # # Looks up historical weather data in Dark Sky # # Copyright (c) 2019 DevicePilot 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, includin...
mit
-3,524,919,604,821,285,400
36.152941
195
0.664978
false
BrixInMotion/RaspiRobot-Webcontrol
robot_controller.py
1
13931
#! /usr/bin/env python # Copyright (c) 2014, Dawn Robotics Ltd # 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, this # ...
bsd-3-clause
-8,837,728,989,299,235,000
41.215152
108
0.551001
false
Raag079/self-driving-car
Term03-PathPlanning-SemanticSegmentation-and-Systems/P3-Capstone-Project/ros/src/waypoint_loader/waypoint_loader.py
2
2683
#!/usr/bin/env python import os import csv import math from geometry_msgs.msg import Quaternion from styx_msgs.msg import Lane, Waypoint import tf import rospy CSV_HEADER = ['x', 'y', 'z', 'yaw'] MAX_DECEL = 1.0 class WaypointLoader(object): def __init__(self): rospy.init_node('waypoint_loader', log...
mit
7,900,848,680,130,507,000
29.146067
80
0.564666
false
clofresh/xbmc-vhx
resources/lib/requests/structures.py
5
1725
# -*- coding: utf-8 -*- """ requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. """ class CaseInsensitiveDict(dict): """Case-insensitive Dictionary For example, ``headers['content-encoding']`` will return the value of a ``'Content-Encoding'`` response header.""" @property...
bsd-3-clause
-4,688,465,842,960,330,000
25.151515
76
0.571594
false
stshine/servo
tests/heartbeats/process_logs.py
139
16143
#!/usr/bin/env python # 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 argparse import matplotlib.pyplot as plt import numpy as np import os from os import path ...
mpl-2.0
-3,197,069,618,919,523,000
38.566176
117
0.608871
false
Big-B702/python-for-android
python-build/python-libs/gdata/src/gdata/tlslite/utils/Python_AES.py
359
2121
"""Pure-Python AES implementation.""" from cryptomath import * from AES import * from rijndael import rijndael def new(key, mode, IV): return Python_AES(key, mode, IV) class Python_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "python") self.rijndael = rijnda...
apache-2.0
-1,141,953,740,812,125,000
30.191176
78
0.606318
false
Salat-Cx65/python-for-android
python3-alpha/python3-src/Tools/unicode/comparecodecs.py
45
1434
#!/usr/bin/env python3 """ Compare the output of two codecs. (c) Copyright 2005, Marc-Andre Lemburg (mal@lemburg.com). Licensed to PSF under a Contributor Agreement. """ import sys def compare_codecs(encoding1, encoding2): print('Comparing encoding/decoding of %r and %r' % (encoding1, encoding2)) ...
apache-2.0
5,076,607,881,968,973,000
26.056604
82
0.514644
false
jasonwzhy/django
django/contrib/staticfiles/management/commands/runserver.py
248
1361
from django.conf import settings from django.contrib.staticfiles.handlers import StaticFilesHandler from django.core.management.commands.runserver import \ Command as RunserverCommand class Command(RunserverCommand): help = "Starts a lightweight Web server for development and also serves static files." d...
bsd-3-clause
4,230,479,456,887,627,300
45.931034
104
0.695812
false
rodgerd/cobbler
koan/register.py
12
6112
""" registration tool for cobbler. Copyright 2009 Red Hat, Inc. Michael DeHaan <mdehaan@redhat.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 License, or (at your optio...
gpl-2.0
8,437,291,891,359,846,000
30.183673
87
0.547611
false
manu-chroma/whatsapp-parser
test/test_chat.py
1
1133
import sys import unittest from wp_parser.wp_chat import main as parser # for capturing print() output from contextlib import contextmanager try: from StringIO import StringIO except ImportError: #python3 from io import StringIO @contextmanager def captured_output(): new_out, new_err = StringIO(), Strin...
mit
-7,634,616,539,788,909,000
26.634146
81
0.618711
false
yongshengwang/hue
desktop/core/ext-py/Django-1.6.10/tests/many_to_one/tests.py
59
21778
from __future__ import absolute_import from copy import deepcopy import datetime from django.core.exceptions import MultipleObjectsReturned, FieldError from django.test import TestCase from django.utils import six from django.utils.translation import ugettext_lazy from .models import Article, Reporter class ManyTo...
apache-2.0
3,494,263,122,851,306,000
48.160271
112
0.560336
false
sahutd/youtube-dl
youtube_dl/extractor/ellentv.py
107
2708
# coding: utf-8 from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( ExtractorError, ) class EllenTVIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?:ellentv|ellentube)\.com/videos/(?P<id>[a-z0-9_-]+)' _TEST = { 'url': 'http://www.elle...
unlicense
2,347,100,662,693,638,700
31.238095
99
0.536928
false
salguarnieri/intellij-community
python/helpers/epydoc/docwriter/dotgraph.py
91
53233
# epydoc -- Graph generation # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: dotgraph.py 1663 2007-11-07 15:29:47Z dvarrazzo $ """ Render Graphviz directed graphs as images. Below are some examples. .. importgraph:: .. classtree:: epydoc.apidoc.A...
apache-2.0
-7,796,531,162,840,161,000
38.402665
79
0.537881
false
SAM-IT-SA/odoo
openerp/modules/graph.py
260
7763
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
6,195,100,856,697,878,000
34.774194
139
0.574263
false
jortel/gofer
test/unit/test_proxy.py
1
1174
# Copyright (c) 2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the impl...
lgpl-2.1
-5,370,716,219,270,498,000
35.6875
80
0.703578
false
ingadhoc/odoo
addons/account_accountant/__openerp__.py
313
1878
# -*- 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,354,759,255,862,153,000
38.957447
114
0.617146
false
dvitme/odoomrp-wip
mrp_production_project_estimated_cost/models/project_project.py
16
1028
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
930,152,022,451,695,900
38.538462
78
0.613813
false
vrv/tensorflow
tensorflow/python/ops/distributions/gamma.py
74
10671
# 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
1,382,384,141,297,657,300
33.986885
146
0.657577
false
Outernet-Project/librarian-football
setup.py
1
1157
import os from setuptools import setup, find_packages import librarian_football as pkg def read(fname): """ Return content of specified file """ return open(os.path.join(os.path.dirname(__file__), fname)).read() VERSION = pkg.__version__ setup( name='librarian-football', version=VERSION, licen...
gpl-3.0
2,292,057,318,748,273,000
27.95
100
0.618842
false
chaen/DIRAC
Core/DISET/private/ServiceConfiguration.py
8
3606
# $HeadURL$ __RCSID__ = "$Id$" from DIRAC.Core.Utilities import Network, List from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData from DIRAC.ConfigurationSystem.Client import PathFinder from DIRAC.Core.DISET.private.Protocols import gDefaultProtocol class ServiceConfiguration: def __i...
gpl-3.0
5,761,482,205,801,275,000
25.130435
87
0.626456
false
jmcarp/regulations-parser
regparser/layer/table_of_contents.py
4
1240
#vim: set encoding=utf-8 from layer import Layer from regparser.tree.struct import Node class TableOfContentsLayer(Layer): def check_toc_candidacy(self, node): """ To be eligible to contain a table of contents, all of a node's children must have a title element. If one of the children is an ...
cc0-1.0
-7,920,647,577,945,744,000
34.428571
78
0.533871
false
facebookresearch/Detectron
tools/generate_testdev_from_test.py
1
3208
#!/usr/bin/env python # Copyright (c) 2017-present, Facebook, 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 a...
apache-2.0
8,931,581,703,210,130,000
32.416667
80
0.637469
false
snnn/tensorflow
tensorflow/contrib/layers/python/layers/layers.py
6
138784
# -*- coding: utf-8 -*- # 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 # # Un...
apache-2.0
-572,823,579,835,192,800
40.688195
95
0.658186
false
WillieMaddox/numpy
numpy/distutils/fcompiler/nag.py
228
1403
from __future__ import division, absolute_import, print_function import sys from numpy.distutils.fcompiler import FCompiler compilers = ['NAGFCompiler'] class NAGFCompiler(FCompiler): compiler_type = 'nag' description = 'NAGWare Fortran 95 Compiler' version_pattern = r'NAGWare Fortran 95 compiler Relea...
bsd-3-clause
5,522,289,150,524,043,000
30.177778
86
0.566643
false
kvar/ansible
lib/ansible/plugins/cliconf/exos.py
31
9970
# # (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 # (at your option) any later version. # # Ansible is d...
gpl-3.0
2,502,893,211,738,394,600
42.347826
145
0.612939
false
django-leonardo/django-leonardo
leonardo/settings.py
1
11033
from __future__ import absolute_import import os import six import logging import warnings from django.apps import apps from django import VERSION from leonardo.conf.spec import DJANGO_CONF from leonardo.base import leonardo, default from leonardo.utils.settings import (get_conf_from_module, merge, ...
bsd-3-clause
-9,168,658,784,692,803,000
32.843558
92
0.583432
false
pigeonflight/strider-plone
docker/appengine/lib/django-1.3/django/contrib/messages/storage/user_messages.py
308
2303
""" Storages used to assist in the deprecation of contrib.auth User messages. """ from django.contrib.messages import constants from django.contrib.messages.storage.base import BaseStorage, Message from django.contrib.auth.models import User from django.contrib.messages.storage.fallback import FallbackStorage class ...
mit
-6,975,310,009,906,799,000
34.984375
78
0.657838
false
Ictp/indico
bin/utils/changeCreatorToReservation.py
1
4132
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
gpl-3.0
5,215,825,622,834,660,000
30.30303
111
0.67667
false
da1z/intellij-community
python/helpers/pydev/pydevd_attach_to_process/winappdbg/disasm.py
102
24409
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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 ...
apache-2.0
-3,323,806,728,976,143,400
32.807479
94
0.559015
false
pombreda/xhtml2pdf
sx/w3c/cssSpecial.py
1
12815
# -*- coding: ISO-8859-1 -*- ############################################# ## (C)opyright by Dirk Holtwick, 2002-2007 ## ## All rights reserved ## ############################################# __reversion__ = "$Revision: 20 $" __author__ = "$Author: holtwick $" __date__ = "$Date: 2007-10-09...
gpl-2.0
-5,896,197,675,144,287,000
33.176
159
0.437768
false
gcrahay/fir_irma_plugin
fir_irma/urls.py
1
1221
from django.conf.urls import include, url from fir_irma.settings import settings api_urlpatterns = [ url(r'^$', 'fir_irma.views.not_found', name='base'), url(r'^scans$', 'fir_irma.views.irma_scan_new'), url(r'^scans/(?P<scan_id>[^/]+)/files$', 'fir_irma.views.irma_scan_upload'), url(r'^scans/(?P<scan_...
apache-2.0
-2,165,479,627,896,113,200
39.7
112
0.617527
false
chunywang/crosswalk-test-suite
cordova/cordova-feature-android-tests/feature/app_multiple_apk_false.py
14
2665
#!/usr/bin/env python # # Copyright (c) 2016 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
439,649,152,303,156,600
38.776119
98
0.690056
false
linktlh/Toontown-journey
otp/ai/GarbageLeakServerEventAggregator.py
6
1454
from direct.showbase.DirectObject import DirectObject from direct.showbase import GarbageReport class GarbageLeakServerEventAggregator(DirectObject): def __init__(self, cr): self.cr = cr self._doLaterName = None self._sentLeakDesc2num = {} self._curLeakDesc2num = {} self.ac...
apache-2.0
6,794,102,400,420,355,000
32.045455
94
0.622421
false
LabAdvComp/tukey_middleware
tools/utils.py
1
4144
# Copyright 2013 Open Cloud Consortium # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-5,049,732,694,285,872,000
39.627451
77
0.656129
false
viniciuschiele/flask-webapi
flask_webapi/fields.py
1
23621
""" Provides a set of classes to serialize Python objects. """ import copy import datetime import decimal import uuid from collections import OrderedDict from werkzeug.utils import cached_property from .exceptions import ValidationError from .utils import dateparse, formatting, html, missing, timezone from .validator...
mit
-5,550,454,490,040,553,000
29.400257
117
0.575632
false