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
tysonclugg/django
tests/auth_tests/test_validators.py
25
10145
import os from django.contrib.auth import validators from django.contrib.auth.models import User from django.contrib.auth.password_validation import ( CommonPasswordValidator, MinimumLengthValidator, NumericPasswordValidator, UserAttributeSimilarityValidator, get_default_password_validators, get_password_v...
bsd-3-clause
-290,188,637,694,032,100
42.230769
110
0.667655
false
shootstar/ctest
ceilometer/agent.py
1
3976
# -*- encoding: utf-8 -*- # # Copyright © 2013 Julien Danjou # # Author: Julien Danjou <julien@danjou.info> # # 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/lice...
apache-2.0
2,645,021,736,772,453,000
36.018692
87
0.644282
false
hy-2013/scrapy
scrapy/xlib/tx/_newclient.py
159
55339
# -*- test-case-name: twisted.web.test.test_newclient -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client. The way to use the functionality provided by this module is to: - Connect a L{HTTP11ClientProtocol} to an HT...
bsd-3-clause
-1,537,035,971,554,219,800
35.503298
92
0.622671
false
Changaco/oh-mainline
vendor/packages/Django/django/contrib/formtools/tests/wizard/forms.py
90
7721
from __future__ import unicode_literals from django import forms, http from django.conf import settings from django.db import models from django.test import TestCase from django.template.response import TemplateResponse from django.utils.importlib import import_module from django.contrib.auth.models import User from...
agpl-3.0
4,668,045,561,474,885,000
33.779279
92
0.626344
false
prodromou87/gem5
src/mem/ruby/network/BasicRouter.py
53
1825
# Copyright (c) 2011 Advanced Micro Devices, 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...
bsd-3-clause
-5,291,621,779,156,777,000
49.694444
72
0.783562
false
cmunk/protwis
build/management/commands/find_protein_templates.py
3
5163
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.db import connection from build.management.commands.base_build import Command as BaseBuild from protein.models import (Protein, ProteinConformation, ProteinSequenceType, ProteinSegment, ProteinConformati...
apache-2.0
9,122,762,605,943,273,000
43.517241
119
0.635871
false
njvack/ge-mri-rtafni
scanner-console/vendor/dicom/filereader.py
4
30365
# filereader.py """Read a dicom media file""" # Copyright (c) 2008-2012 Darcy Mason # This file is part of pydicom, released under a modified MIT license. # See the file license.txt included with this distribution, also # available at http://pydicom.googlecode.com from __future__ import absolute_import # Need zli...
mit
-4,455,271,611,898,587,600
43.328467
98
0.592195
false
jctanner/ansible
test/support/integration/plugins/modules/mongodb_parameter.py
49
6737
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Loic Blot <loic.blot@unix-experience.fr> # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ impo...
gpl-3.0
-2,628,535,095,379,755,000
29.210762
119
0.62179
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.3/Lib/bsddb/test/test_thread.py
3
15518
"""TestCases for multi-threaded access to a DB. """ import os import sys import time import errno import shutil import tempfile from pprint import pprint from whrandom import random try: True, False except NameError: True = 1 False = 0 DASH = '-' try: from threading import Thread, currentThread ...
mit
-1,714,255,267,183,319,300
30.036
88
0.501418
false
vipulkanade/EventbriteDjango
lib/python2.7/site-packages/gunicorn/_compat.py
30
8763
import sys from gunicorn import six PY26 = (sys.version_info[:2] == (2, 6)) PY33 = (sys.version_info >= (3, 3)) def _check_if_pyc(fname): """Return True if the extension is .pyc, False if .py and None if otherwise""" from imp import find_module from os.path import realpath, dirname, basename, splite...
mit
5,232,737,172,263,703,000
31.820225
99
0.585758
false
richardcs/ansible
lib/ansible/modules/network/cloudengine/ce_dldp_interface.py
7
22686
#!/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
-2,418,286,735,730,111,000
33.52968
124
0.569294
false
apache/airflow
tests/providers/google/common/utils/test_id_token_credentials.py
3
6936
# 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
-6,909,240,019,518,783,000
40.783133
110
0.629614
false
bhairavmehta95/flashcard-helper-alexa-skill
sqlalchemy/__init__.py
10
2217
# sqlalchemy/__init__.py # Copyright (C) 2005-2016 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 from .sql import ( alias, all_, and_, any_, asc, bet...
mit
-4,962,913,042,351,135,000
14.184932
77
0.583672
false
thisispuneet/potato-blog
django/middleware/gzip.py
321
1455
import re from django.utils.text import compress_string from django.utils.cache import patch_vary_headers re_accepts_gzip = re.compile(r'\bgzip\b') class GZipMiddleware(object): """ This middleware compresses content if the browser allows gzip compression. It sets the Vary header accordingly, so that cac...
bsd-3-clause
-7,578,307,989,054,543,000
37.289474
79
0.656357
false
peiyuwang/pants
src/python/pants/util/netrc.py
33
1725
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import collections i...
apache-2.0
-8,505,929,409,016,100,000
32.823529
93
0.653913
false
shawngraham/music-lab-scripts
07_louisiana/louisiana.py
3
11115
# -*- coding: utf-8 -*- ## # TRACK 7 # TOO BLUE # Brian Foo (brianfoo.com) # This file builds the sequence file for use with ChucK from the data supplied ## # Library dependancies import csv import json import math import os import pprint import time # Config BPM = 100 # Beats per minute, e.g. 60, 75, 100, 120, 150 D...
mit
1,060,422,183,825,063,800
36.298658
192
0.603509
false
alsrgv/tensorflow
tensorflow/python/platform/self_check.py
6
2436
# 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
225,487,111,714,470,720
41
80
0.676108
false
EliotBerriot/django
django/contrib/admin/__init__.py
562
1243
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.decorators import register from django.contrib.admin.filters import ( AllValuesFieldListFilter, BooleanFieldListFilter, ChoicesFieldListFilter, DateFieldListFilter, Fiel...
bsd-3-clause
5,927,016,434,097,670,000
41.862069
79
0.786002
false
wkschwartz/django
tests/string_lookup/tests.py
123
2332
from django.test import TestCase from .models import Article, Bar, Base, Child, Foo, Whiz class StringLookupTests(TestCase): def test_string_form_referencing(self): """ Regression test for #1661 and #1662 String form referencing of models works, both as pre and post reference, o...
bsd-3-clause
-3,081,739,055,040,176,600
29.272727
108
0.607036
false
naro/django-guardian
guardian/tests/other_test.py
35
12667
import guardian from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import Group from django.contrib.auth.models import Permission from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError fr...
bsd-2-clause
1,039,504,633,094,305,000
40.667763
92
0.671509
false
charukiewicz/beer-manager
venv/lib/python3.4/site-packages/flask/module.py
850
1363
# -*- coding: utf-8 -*- """ flask.module ~~~~~~~~~~~~ Implements a class that represents module blueprints. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os from .blueprints import Blueprint def blueprint_is_module(bp): """Used to figure ou...
mit
-3,892,983,344,031,195,000
31.452381
76
0.634629
false
DBuildService/atomic-reactor
tests/plugins/test_build_source_container.py
1
8892
""" Copyright (c) 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import os import subprocess import tempfile from flexmock import flexmock import pytest import json import tarfile import re from atomic_rea...
bsd-3-clause
8,574,303,398,522,537,000
36.518987
99
0.627643
false
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.6.173.0.59/roles/lib_openshift/library/oc_label.py
7
59170
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
1,205,464,759,380,454,100
32.772831
118
0.530201
false
apache/spark
python/pyspark/sql/functions.py
14
161861
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
-4,960,368,121,740,678,000
31.058031
309
0.584804
false
vitorespindola/home-assistant
homeassistant/components/light/tellstick.py
4
2926
""" Support for Tellstick lights. """ import logging # pylint: disable=no-name-in-module, import-error from homeassistant.components.light import Light, ATTR_BRIGHTNESS from homeassistant.const import ATTR_FRIENDLY_NAME import tellcore.constants as tellcore_constants def setup_platform(hass, config, add_devices_callb...
mit
9,059,041,214,639,521,000
32.632184
76
0.613465
false
cpd4t/CPD4T_Minecraft_Workshop
trafficlights.py
2
1305
# import modules import mcpi.minecraft as minecraft from time import sleep # connect python to minecraft mc = minecraft.Minecraft.create() # create CONSTANTS for block and light colours AIR = 0 STONE = 1 WOOL = 35 BLACK = 15 RED = 14 AMBER = 4 GREEN = 5 # clear area in middle of map and move player there mc.setBlock...
cc0-1.0
1,322,080,360,059,579,400
20.75
51
0.636015
false
crossbario/crossbar-fabric-cli
docs/conf.py
1
5424
# -*- coding: utf-8 -*- ##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below appl...
mit
-4,284,822,098,671,075,000
32.689441
85
0.683075
false
powlo/script.module.pydevd
lib/tests/check_pydevconsole.py
7
3892
import sys import os #Put pydevconsole in the path. sys.argv[0] = os.path.dirname(sys.argv[0]) sys.path.insert(1, os.path.join(os.path.dirname(sys.argv[0]))) print('Running tests with:', sys.executable) print('PYTHONPATH:') print('\n'.join(sorted(sys.path))) import threading import unittest import pydevconsole fro...
epl-1.0
-538,343,551,622,194,500
36.066667
122
0.507965
false
umkay/zulip
zerver/logging_handlers.py
9
3074
from __future__ import absolute_import from django.conf import settings import logging import traceback import platform from django.core import mail from django.http import HttpRequest from django.utils.log import AdminEmailHandler from django.views.debug import ExceptionReporter, get_exception_reporter_filter from...
apache-2.0
-5,967,621,564,974,732,000
35.595238
96
0.562459
false
vanzaj/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
Chapter3_MCMC/github_pull.py
95
2327
#github data scrapper """ variables of interest: indp. variables - language, given as a binary variable. Need 4 positions for 5 langagues - #number of days created ago, 1 position - has wiki? Boolean, 1 position - followers, 1 position - following, 1 position - constant dep. variab...
mit
2,395,613,771,689,942,500
27.036145
127
0.576708
false
yahman72/robotframework
src/robot/output/loggerhelper.py
4
4060
# Copyright 2008-2015 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
604,106,667,064,531,500
26.808219
78
0.598768
false
Lkhagvadelger/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/performance_tests/perftest.py
115
17075
# Copyright (C) 2012 Google Inc. All rights reserved. # Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. 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 ...
bsd-3-clause
-8,570,852,912,088,339,000
38.43418
190
0.611186
false
exploreodoo/datStruct
odoo/openerp/addons/test_impex/tests/test_import.py
231
30712
# -*- coding: utf-8 -*- import openerp.modules.registry import openerp from openerp.tests import common from openerp.tools.misc import mute_logger def ok(n): """ Successful import of ``n`` records :param int n: number of records which should have been imported """ return n, 0, 0, 0 def error(row, me...
gpl-2.0
7,760,320,796,659,249,000
33.396184
103
0.491206
false
quiet-oceans/motuclient-setuptools
motu/utils_messages.py
1
2031
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Python motu client # # Motu, a high efficient, robust and Standard compliant Web Server for # Geographic Data Dissemination. # # http://cls-motu.sourceforge.net/ # # (C) Copyright 2009-2010, by CLS (Collecte Localisation Satellites) - # http://www.cls.fr - and Contr...
lgpl-3.0
-5,541,262,570,118,658,000
35.267857
78
0.659281
false
p0psicles/SickGear
sickbeard/notifiers/plex.py
3
11492
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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,...
gpl-3.0
-5,119,957,435,221,077,000
41.72119
146
0.580056
false
JeremieSamson/jasper
client/vocabcompiler.py
34
19268
# -*- coding: utf-8-*- """ Iterates over all the WORDS variables in the modules and creates a vocabulary for the respective stt_engine if needed. """ import os import tempfile import logging import hashlib import subprocess import tarfile import re import contextlib import shutil from abc import ABCMeta, abstractmetho...
mit
-3,122,387,151,979,729,000
33.223801
79
0.554027
false
thuswa/subdms
subdms/repository.py
1
5729
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id$ # Last modified Wed Jul 7 20:53:01 2010 on stalker # update count: 604 # # subdms - A document management system based on subversion. # Copyright (C) 2009 Albert Thuswaldner # # This program is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
2,118,118,750,216,691,000
38.239726
76
0.595916
false
gromez/Sick-Beard
lib/imdb/linguistics.py
50
9220
""" linguistics module (imdb package). This module provides functions and data to handle in a smart way languages and articles (in various languages) at the beginning of movie titles. Copyright 2009-2012 Davide Alberani <da@erlug.linux.it> 2012 Alberto Malagoli <albemala AT gmail.com> 2009 H. Turg...
gpl-3.0
-2,224,904,809,962,816,500
44.418719
532
0.627766
false
brandonrobertz/namecoin-core
contrib/zmq/zmq_sub.py
9
3056
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ ZMQ example using python3's asyncio Bitcoin should be started with the command line argument...
mit
-1,572,662,996,304,262,000
35.380952
107
0.637435
false
alessandrocamilli/l10n-italy
l10n_it_base_location_geonames_import/geonames_import.py
12
1409
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Agile Business Group (http://www.agilebg.com) # @author Lorenzo Battistini <lorenzo.battistini@agilebg.com> # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
5,053,863,013,718,167,000
41.69697
78
0.627395
false
Evervolv/android_external_chromium_org
media/tools/layout_tests/layouttests.py
144
8952
# 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. """Layout tests module that is necessary for the layout analyzer. Layout tests are stored in an SVN repository and LayoutTestCaseManager collects these ...
bsd-3-clause
-5,619,286,742,419,377,000
35.688525
79
0.642761
false
CydarLtd/ansible
lib/ansible/cli/pull.py
30
12743
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
4,841,745,649,648,492,000
43.400697
150
0.60237
false
FlorianLudwig/odoo
addons/account_followup/wizard/account_followup_print.py
217
16379
# -*- 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
4,183,829,698,044,093,400
48.483384
181
0.573112
false
appneta/boto
boto/ec2/blockdevicemapping.py
149
6372
# Copyright (c) 2009-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software wit...
mit
-153,593,812,756,178,620
37.618182
93
0.572191
false
h3biomed/ansible
lib/ansible/parsing/yaml/constructor.py
28
6151
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
5,346,259,552,239,621,000
37.93038
129
0.667371
false
DDEFISHER/servo
components/script/dom/bindings/codegen/parser/tests/test_incomplete_types.py
276
1731
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestIncompleteTypes { attribute FooInterface attr1; FooInterface method1(FooInterface arg); }; interface FooInterface { }; """) results = parser.finish() harness.ok(True, "T...
mpl-2.0
5,511,528,726,485,117,000
38.340909
101
0.65338
false
Charence/stk-code
tools/batch.py
16
3189
from matplotlib import pyplot from os import listdir def is_numeric(x): try: float(x) except ValueError: return False return True avg_lap_time = {} avg_pos = {} avg_speed = {} avg_top = {} total_rescued = {} tests = len(listdir('../../batch'))-1 for file in listdir('...
gpl-3.0
35,945,694,768,538,510
29.961165
75
0.550329
false
camilonova/django
tests/model_inheritance/test_abstract_inheritance.py
27
12010
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.checks import Error from django.core.exceptions import FieldDoesNotExist, FieldError from django.db import models from django.test import TestCase from d...
bsd-3-clause
6,525,059,401,537,391,000
33.119318
102
0.581932
false
hbhzwj/imalse
tools/ns-allinone-3.14.1/ns-3.14.1/src/csma-layout/bindings/modulegen__gcc_LP64.py
12
456237
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-3.0
-8,632,934,393,277,049,000
65.711069
934
0.60958
false
engdan77/edoAutoHomeMobile
twisted/internet/test/test_inotify.py
10
16534
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the inotify wrapper in L{twisted.internet.inotify}. """ from twisted.internet import defer, reactor from twisted.python import filepath, runtime from twisted.python.reflect import requireModule from twisted.trial import unittest if...
mit
8,347,262,096,192,893,000
31.870775
80
0.59169
false
BlueBrain/deap
deap/tools/indicator.py
10
3372
# Copyright (C) 2010 Simon Wessing # TU Dortmund University # # 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 v...
lgpl-3.0
4,887,505,473,405,924,000
34.882979
84
0.685943
false
dulems/hue
desktop/core/ext-py/Paste-1.7.2/paste/wsgilib.py
27
20134
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ A module of many disparate routines. """ # functions which moved to paste.request and paste.response # Deprecated around 15 Dec 2005 from paste.r...
apache-2.0
3,644,816,129,580,292,600
32.725293
95
0.576289
false
hltbra/pyhistorian
specs/story.py
1
1089
''' >>> story.run() True >>> print output.getvalue() Story: Faked Story #1 In order to write specifications As a python developer I want to write them in Python language <BLANKLINE> Scenario 1: Fake scenario Given I run it ... OK When I type X ... OK Then it shows me X ... OK <BLANKLINE> Ran 1 scenario with...
mit
5,868,556,030,415,097,000
23.2
60
0.630854
false
lukeiwanski/tensorflow-opencl
tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py
5
43745
# 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
5,806,019,406,498,299,000
38.09294
96
0.573048
false
Danisan/pyafipws
wsfexv1.py
8
33017
#!/usr/bin/python # -*- coding: latin-1 -*- # 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, or (at your option) any later # version. # # This program is distributed in t...
gpl-3.0
9,018,860,600,986,043,000
41.500659
104
0.507678
false
belltailjp/scikit-learn
sklearn/decomposition/base.py
313
5647
"""Principal Component Analysis Base Classes""" # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <d.engemann@fz-juelich.de> # Kyle Kastner <kastnerkyle@gmail.com> # # Licen...
bsd-3-clause
-5,669,231,022,497,587,000
33.858025
81
0.59359
false
WinterNis/sqlalchemy
test/sql/test_ddlemit.py
27
8886
from sqlalchemy.testing import fixtures from sqlalchemy.sql.ddl import SchemaGenerator, SchemaDropper from sqlalchemy import MetaData, Table, Column, Integer, Sequence, ForeignKey from sqlalchemy import schema from sqlalchemy.testing.mock import Mock class EmitDDLTest(fixtures.TestBase): def _mock_connection(sel...
mit
-915,979,538,789,082,900
32.659091
79
0.530948
false
overtherain/scriptfile
software/googleAppEngine/lib/django_1_3/django/utils/daemonize.py
452
1907
import os import sys if os.name == 'posix': def become_daemon(our_home_dir='.', out_log='/dev/null', err_log='/dev/null', umask=022): "Robustly turn into a UNIX daemon, running in our_home_dir." # First fork try: if os.fork() > 0: sys.exit(0...
mit
1,644,142,384,879,278,800
31.87931
81
0.513896
false
jmiseikis/HomeAutomation
node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
2214
1347
#!/usr/bin/env python import re import json # http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
mit
3,808,997,447,876,716,000
27.659574
78
0.703786
false
dphiggs01/ask_amy
ask_amy/cli/cli_deploy.py
1
10749
import json from subprocess import Popen, PIPE import os import shutil import sys from ask_amy.cli.code_gen.code_generator import CodeGenerator from time import sleep class DeployCLI(object): def create_template(self, skill_name, aws_role='', intent_schema_nm=None): with open(intent_schema_nm) as json_dat...
apache-2.0
3,663,360,728,587,405,000
43.60166
140
0.533817
false
bewest/amforth
core/devices/at90usb647/device.py
5
13009
# Partname: AT90USB647 # generated automatically, do not edit MCUREGS = { 'WDTCSR': '&96', 'WDTCSR_WDIF': '$80', 'WDTCSR_WDIE': '$40', 'WDTCSR_WDP': '$27', 'WDTCSR_WDCE': '$10', 'WDTCSR_WDE': '$08', 'PORTA': '&34', 'DDRA': '&33', 'PINA': '&32', 'PORTB': '&37', 'DDRB': '&36', 'PINB': '&35', 'PORT...
gpl-2.0
5,561,276,221,375,628,000
22.190731
38
0.486202
false
debasishm89/OpenXMolar
ExtDepLibs/autoit/__init__.py
1
4371
# -*- coding: utf-8 -*- __author__ = 'Jace Xu' __version__ = "0.3" from .autoit import options, properties, commands from .autoit import AutoItError from .autoit import error from .autoit import auto_it_set_option from .autoit import clip_get from .autoit import clip_put from .autoit import is_admin from .autoit imp...
bsd-3-clause
3,863,321,307,305,719,300
33.698413
49
0.79547
false
MartynShaw/audacity
lib-src/lv2/lv2/plugins/eg-midigate.lv2/waflib/Options.py
330
5458
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,tempfile,optparse,sys,re from waflib import Logs,Utils,Context cmds='distclean configure build install clean uninstall check dist distcheck'.split() options={} comma...
gpl-2.0
8,558,848,824,587,358,000
39.42963
131
0.685233
false
omazapa/root
interpreter/llvm/src/bindings/python/llvm/tests/test_object.py
95
2143
from .base import TestBase from ..object import ObjectFile from ..object import Relocation from ..object import Section from ..object import Symbol class TestObjectFile(TestBase): def get_object_file(self): source = self.get_test_binary() return ObjectFile(filename=source) def test_create_from...
lgpl-2.1
-8,599,541,845,863,039,000
30.985075
63
0.604293
false
jngeist/hyde
hyde/tests/ext/test_auto_extend.py
3
2111
# -*- coding: utf-8 -*- """ Use nose `$ pip install nose` `$ nosetests` """ from hyde.fs import File, Folder from hyde.generator import Generator from hyde.site import Site from pyquery import PyQuery from nose.tools import nottest TEST_SITE = File(__file__).parent.parent.child_folder('_test') class TestAutoExtend...
mit
-9,195,950,221,603,894,000
28.333333
95
0.602558
false
Glasgow2015/team-10
env/lib/python2.7/site-packages/cms/tests/signals.py
23
2433
# -*- coding: utf-8 -*- from __future__ import with_statement from contextlib import contextmanager from django.test import TestCase from cms.api import create_page from cms.signals import urls_need_reloading class SignalTester(object): def __init__(self): self.call_count = 0 self.calls = [] ...
apache-2.0
2,484,821,567,090,287,600
29.4125
58
0.531032
false
KitKatXperience/platform_external_chromium_org
win8/util/check_sdk_patch.py
68
1559
#!/usr/bin/env python # 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. """Script to check that the Windows 8 SDK has been appropriately patched so that it can be used with VS 2010. In practice, t...
bsd-3-clause
-73,301,774,088,960,400
31.479167
80
0.644644
false
hahalml/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/ifl.py
61
2810
"""SCons.Tool.ifl Tool-specific initialization for the Intel Fortran compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The...
apache-2.0
-9,216,190,532,521,528,000
38.027778
121
0.724199
false
syci/OCB
addons/l10n_sg/__openerp__.py
27
1438
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>) { 'name': 'Singapore - Accounting', 'version': '1.0', 'author': 'Tech Receptives', 'website': 'http://www.techreceptives.com', 'ca...
agpl-3.0
2,928,132,745,244,388,400
37.864865
89
0.64395
false
onlyjus/pyqtgraph
doc/extensions/qt_doc.py
28
4791
""" Extension for building Qt-like documentation. - Method lists preceding the actual method documentation - Inherited members documented separately - Members inherited from Qt have links to qt-project documentation - Signal documentation """ def setup(app): # probably we will be making a wrapper around au...
mit
6,174,758,800,019,132,000
31.154362
94
0.617199
false
bev-a-tron/pledge_service
lib/validictory/__init__.py
14
2300
#!/usr/bin/env python from validictory.validator import (SchemaValidator, FieldValidationError, ValidationError, SchemaError) __all__ = ['validate', 'SchemaValidator', 'FieldValidationError', 'ValidationError', 'SchemaError'] __version__ = '0.9.3' def validate(data, sch...
apache-2.0
-7,516,891,790,587,058,000
40.071429
79
0.647826
false
vvw/deep_q_rl
deep_q_rl/ale_data_set.py
4
12078
"""This class stores all of the samples for training. It is able to construct randomly selected batches of phi's from the stored history. It allocates more memory than necessary, then shifts all of the data back to 0 when the samples reach the end of the allocated memory. """ import pyximport import numpy as np pyxi...
bsd-3-clause
-8,620,320,135,838,170,000
35.379518
79
0.573025
false
hypermindr/barbante
barbante/maintenance/tests/TestTasks.py
1
3272
""" Tests for barbante.maintenance.tasks.py. """ import datetime as dt import nose.tools import barbante.maintenance.tasks as tasks from barbante.maintenance.tests.fixtures.MaintenanceFixture import MaintenanceFixture import barbante.tests as tests class TestTasks(MaintenanceFixture): """ Test class for mainten...
mit
4,051,082,729,903,806,500
43.821918
113
0.636919
false
wnoc-drexel/gem5-stable
src/cpu/kvm/BaseKvmCPU.py
39
3087
# 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
7,443,840,767,391,245,000
39.618421
90
0.751863
false
Drooids/odoo
addons/web/doc/conf.py
494
8552
# -*- coding: utf-8 -*- # # OpenERP Technical Documentation configuration file, created by # sphinx-quickstart on Fri Feb 17 16:14:06 2012. # # 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 # autogenerated file. # #...
agpl-3.0
-1,367,210,753,899,688,200
31.892308
103
0.702175
false
thiriel/maps
django/contrib/localflavor/pl/pl_administrativeunits.py
433
13194
# -*- coding: utf-8 -*- """ Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski """ ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', u'Wrocław'), ('jeleniagora', u'Jelenia Góra'), ('legnica', u'Legnica'), ('boleslawiecki', u'bolesławiecki'), ('dzierzoniows...
bsd-3-clause
-2,675,467,900,154,316,300
32.631169
98
0.5865
false
JohnReid/seqan
util/py_lib/seqan/pyclangcheck/simple_checks.py
26
4137
#!/usr/bin/env python """Simple source code checks, e.g. trailing whitespace.""" from __future__ import with_statement import bisect import re import sys import violations RULE_TRAILING_WHITESPACE = 'whitespace.trailing' RULE_TEXT_TRAILING_WHITESPACE = 'Trailing whitespace is not allowed.' RULE_TODO_ONE_SPACE = '...
bsd-3-clause
-2,441,971,052,331,757,600
34.358974
91
0.544598
false
lidavidm/sympy
sympy/polys/tests/test_densebasic.py
3
21443
"""Tests for dense recursive polynomials' basic tools. """ from sympy.polys.densebasic import ( dup_LC, dmp_LC, dup_TC, dmp_TC, dmp_ground_LC, dmp_ground_TC, dmp_true_LT, dup_degree, dmp_degree, dmp_degree_in, dmp_degree_list, dup_strip, dmp_strip, dmp_validate, dup_reverse, dup...
bsd-3-clause
-5,866,670,252,548,682,000
28.699446
81
0.449937
false
appneta/boto
boto/ec2/autoscale/activity.py
152
3058
# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # # 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, mod...
mit
-8,752,645,475,448,993,000
40.890411
90
0.590582
false
h3biomed/ansible
lib/ansible/modules/network/avi/avi_wafprofile.py
31
3819
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
gpl-3.0
-676,973,080,193,106,200
29.309524
92
0.59911
false
vberaudi/scipy
scipy/weave/examples/swig2_example.py
100
1596
"""Simple example to show how to use weave.inline on SWIG2 wrapped objects. SWIG2 refers to SWIG versions >= 1.3. To run this example you must build the trivial SWIG2 extension called swig2_ext. To do this you need to do something like this:: $ swig -c++ -python -I. -o swig2_ext_wrap.cxx swig2_ext.i $ g++ -Wall ...
bsd-3-clause
-9,217,083,417,520,616,000
28.018182
69
0.672306
false
square/pants
src/python/pants/cache/artifact.py
2
4458
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) import errno import ...
apache-2.0
-6,264,832,763,316,345,000
34.951613
101
0.658591
false
amisrs/one-eighty
venv2/lib/python2.7/site-packages/sqlalchemy/sql/elements.py
15
148811
# sql/elements.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 """Core SQL expression elements, including :class:`.ClauseElement`, :class:`.ColumnE...
mit
1,248,150,173,061,195,300
32.797638
101
0.593068
false
shubhamVerma/code-eval
Category - Easy/multiplicationTablesCodeEval.py
1
1412
''' tableCodeEval.py - Solution to Problem Multiplication Tables (Category - Easy) Copyright (C) 2013, Shubham Verma This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of ...
gpl-3.0
-4,420,376,842,689,809,400
27.836735
117
0.675637
false
moble/sympy
sympy/plotting/pygletplot/managed_window.py
120
3178
from __future__ import print_function, division from pyglet.gl import * from pyglet.window import Window from pyglet.clock import Clock from threading import Thread, Lock gl_lock = Lock() class ManagedWindow(Window): """ A pyglet window with an event loop which executes automatically in a separate thre...
bsd-3-clause
1,215,223,031,426,437,400
28.155963
74
0.525488
false
azureplus/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/models/sql/query.py
209
5406
from django.db import connections from django.db.models.query import sql from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import aggregates as gis_aggregates from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField from django.contri...
apache-2.0
5,247,311,618,120,358,000
43.677686
97
0.637995
false
AISpace2/AISpace2
aispace2/jupyter/csp/csp_xml_to_python.py
1
3954
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 27 12:21:17 2019 @author: zijiazhang """ import itertools import xml.etree.ElementTree as ET from ast import literal_eval as make_tuple from string import Template def findcontain(elem, tag): for child in elem: if tag in child.tag: ...
gpl-3.0
3,163,983,078,657,377,300
31.409836
114
0.452959
false
stefanlaheij/ha-buderus
buderus/__init__.py
1
5715
""" Support to communicate with a Buderus KM200 unit. """ import logging import base64 import json import binascii import urllib.request, urllib.error, urllib.parse import voluptuous as vol from io import StringIO from Crypto.Cipher import AES from homeassistant.helpers import config_validation as cv fr...
gpl-3.0
-6,367,909,157,888,069,000
34.183544
118
0.549606
false
HybridF5/nova
nova/tests/unit/api/openstack/compute/test_flavors.py
7
25560
# 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
7,101,779,594,173,789,000
35
79
0.466628
false
salaria/odoo
addons/calendar/calendar.py
81
86439
# -*- coding: utf-8 -*- import pytz import re import time import openerp import openerp.service.report import uuid import collections import babel.dates from werkzeug.exceptions import BadRequest from datetime import datetime, timedelta from dateutil import parser from dateutil import rrule from dateutil.relativedelta...
agpl-3.0
7,130,926,470,672,528,000
45.901248
246
0.56434
false
mancoast/CPythonPyc_test
fail/320_test_profile.py
91
7006
"""Test suite for the profile module.""" import sys import pstats import unittest from difflib import unified_diff from io import StringIO from test.support import run_unittest import profile from test.profilee import testfunc, timer class ProfileTest(unittest.TestCase): profilerclass = profile.Profile met...
gpl-3.0
-6,049,563,263,557,726,000
42.7875
81
0.535826
false
tosolveit/scikit-learn
sklearn/ensemble/tests/test_partial_dependence.py
365
6996
""" Testing for the partial dependence module. """ import numpy as np from numpy.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import if_matplotlib from sklearn.ensemble.partial_dependence import partial_dependence from sklearn.ensemble.partial_dependence...
bsd-3-clause
-229,281,754,264,315,600
32.961165
74
0.617067
false
felixma/nova
nova/tests/functional/api_sample_tests/test_security_group_default_rules.py
26
2374
# Copyright 2014 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
4,859,057,978,577,465,000
42.163636
79
0.645746
false
caseyclements/bokeh
bokeh/compat/mplexporter/exporter.py
32
12403
""" Matplotlib Exporter =================== This submodule contains tools for crawling a matplotlib figure and exporting relevant pieces to a renderer. """ import warnings import io from . import utils import matplotlib from matplotlib import transforms from matplotlib.backends.backend_agg import FigureCanvasAgg clas...
bsd-3-clause
4,762,143,605,527,384,000
43.13879
79
0.527776
false
nmercier/linux-cross-gcc
win32/bin/Lib/robotparser.py
2
7821
""" robotparser.py Copyright (C) 2000 Bastian Kleineidam You can choose between two licenses when using this package: 1) GNU GPLv2 2) PSF license for Python 2.2 The robots.txt Exclusion Protocol is implemented as specified in http://www.robotstxt.org/norobots-rfc.txt """ import ...
bsd-3-clause
6,720,270,426,358,403,000
31.566524
79
0.520394
false
zaheerm/gst-python
testsuite/common.py
1
5702
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # gst-python - Python bindings for GStreamer # Copyright (C) 2002 David I. Lehn # Copyright (C) 2004 Johan Dahlin # Copyright (C) 2005 Edward Hervey # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General...
lgpl-2.1
-47,007,662,577,367,220
28.697917
80
0.647141
false
tvald/Jink
python/jink/extension.py
1
1038
import types class LazyFactory(object): def __init__(self, module_str, callable_str): self.module_str = module_str self.callable_str = callable_str self.factory = None def resolve(self): if self.factory == None: self.factory = reduce(lambda x, y: getattr(x, y), ...
mit
164,330,639,631,910,080
24.317073
60
0.570328
false
ARMmbed/yotta_osx_installer
workspace/lib/python2.7/site-packages/pip/_vendor/ipaddress.py
198
79659
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
apache-2.0
519,145,322,772,369,600
32.039818
86
0.568285
false
jancsarc/KIM-Online
src/accounts/views.py
1
2138
from __future__ import unicode_literals from django.core.urlresolvers import reverse_lazy from django.views import generic from django.shortcuts import redirect from django.contrib.auth import get_user_model from django.contrib import auth from django.contrib import messages from authtools import views as authviews fro...
mit
3,617,738,547,562,631,000
34.04918
75
0.721235
false
ibinti/intellij-community
python/lib/Lib/site-packages/django/utils/itercompat.py
294
1169
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import itertools # Fallback for Python 2.4, Python 2.5 def product(*args, **kwds): """ Taken from http://docs...
apache-2.0
3,406,856,339,700,060,700
24.977778
78
0.635586
false