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
ojake/pytest
_pytest/assertion/oldinterpret.py
41
18298
import traceback import types import py import sys, inspect from compiler import parse, ast, pycodegen from _pytest.assertion.util import format_explanation, BuiltinAssertionError passthroughex = py.builtin._sysex class Failure: def __init__(self, node): self.exc, self.value, self.tb = sys.exc_info() ...
mit
-4,955,701,541,419,846,000
31.328622
85
0.542628
false
mapzen/vector-datasource
integration-test/484-include-state-pois.py
2
1216
# -*- encoding: utf-8 -*- from shapely.wkt import loads as wkt_loads import dsl from . import FixtureTest class IncludeStatePois(FixtureTest): def test_proposed_stations(self): # Antioch Station self.generate_fixtures(dsl.way(3353451464, wkt_loads('POINT (-121.785229642994 37.99688077243528)'), {u...
mit
57,475,647,718,731,416
56.904762
408
0.648849
false
p4datasystems/CarnotKEdist
dist/Lib/socket.py
13
2462
# dispatches to _socket for actual implementation from _socket import ( socket, SocketType, error, herror, gaierror, timeout, has_ipv6, create_connection, getdefaulttimeout, setdefaulttimeout, getfqdn, gethostbyaddr, gethostbyname, gethostbyname_ex, gethostname, getprotob...
apache-2.0
5,281,908,101,320,620,000
16.338028
67
0.619821
false
javivi001/horus
src/horus/engine/uvc/mac/__init__.py
3
5157
''' ---------------------------------------------- - Horus Project - Jesus Arroyo Torrens <jesus.arroyo@bq.com> - May 2015 Mundo Readers S.L. ---------------------------------------------- (*)~---------------------------------------------------------------------------------- Pupil - eye tracking platform Cop...
gpl-2.0
4,613,428,689,483,882,000
32.277419
98
0.550902
false
sdonapar/CompStats
check_env.py
7
1130
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2013 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import math import numpy from matplotlib import pyplot import thinkplot i...
mit
-6,667,441,445,842,350,000
23.565217
77
0.627434
false
umass-forensics/Yapr-forensics
yapr/YaffsClasses/YaffsObject.py
1
7663
import math from . import YaffsChunk class YaffsObject: def __init__(self, obj_id): #tuple of type tag, chunk self.chunk_pairs = [] self.object_id = obj_id self.versions = [] self.is_deleted = False self.hasNoHeader = False self.name = None self.o...
gpl-2.0
8,031,917,286,478,674,000
36.568627
87
0.533212
false
avgoor/python-cudet
cudet/fuel_client.py
3
2842
# -*- coding: utf-8 -*- # Copyright 2016 Mirantis, 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 requi...
gpl-2.0
-870,327,387,352,534,800
32.833333
78
0.582688
false
ricard33/cloud-mailing
cloud_mailing/common/settings.py
1
4809
# Copyright 2015-2019 Cedric RICARD # # This file is part of CloudMailing. # # CloudMailing 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 License, or # (at your option) any lat...
agpl-3.0
8,328,160,698,335,105,000
42.324324
209
0.722396
false
enthought/pyside
tests/QtCore/qthread_test.py
6
1878
#!/usr/bin/python '''Test cases for QThread''' import unittest from PySide.QtCore import QThread, QCoreApplication, QObject, SIGNAL, QMutex, QTimer from PySide.QtCore import QEventLoop from helper import UsesQCoreApplication mutex = QMutex() class Dummy(QThread): '''Dummy thread''' def __init__(self, *args)...
lgpl-2.1
8,739,463,915,080,134,000
23.076923
84
0.597444
false
whuaegeanse/mapnik
scons/scons-local-2.3.6/SCons/compat/_scons_collections.py
4
1848
# # Copyright (c) 2001 - 2015 The SCons Foundation # # 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...
lgpl-2.1
-247,165,558,219,018,700
40.066667
119
0.753788
false
MOA-2011/e2openplugin-OpenWebif
plugin/controllers/views/web/moviedelete.py
1
5203
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
gpl-2.0
-7,490,806,011,654,685,000
34.155405
212
0.63252
false
AndresVillan/pyafipws.web2py-app
controllers/email.py
12
2505
# -*- coding: utf-8 -*- # módulo para envío de correos import os COMPROBANTES_PATH = os.path.join(request.env.web2py_path,'applications',request.application,'private', 'comprobantes') @auth.requires(auth.has_membership('administrador') or auth.has_membership('emisor')) def enviar_comprobante(): comprobante = db.c...
agpl-3.0
699,383,110,120,476,000
48.019608
334
0.6612
false
mfherbst/spack
var/spack/repos/builtin/packages/bib2xhtml/package.py
5
2210
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-148,352,556,650,403,000
44.102041
88
0.656561
false
spaceone/pyjs
examples/libtest/BuiltinTest.py
6
39967
from UnitTest import UnitTest, PY27_BEHAVIOUR try: builtin_value = builtin.value except: builtin_value = None if False: import builtin import builtin from imports.cls import CLS from imports.cls1 import CLS as CLS1 def other(**kwargs): return kwargs def foo(_some, _long, _list, _of, _arguments): ...
apache-2.0
-290,746,517,224,576,060
35.835945
134
0.510721
false
deved69/pelican-1
pelican/tests/test_cache.py
12
7304
from __future__ import unicode_literals import os from codecs import open try: from unittest.mock import MagicMock except ImportError: try: from mock import MagicMock except ImportError: MagicMock = False from shutil import rmtree from tempfile import mkdtemp from pelican.generators impor...
agpl-3.0
-920,149,951,727,094,500
38.481081
81
0.644578
false
rallylee/gem5
tests/quick/se/00.hello/test.py
10
1808
# Copyright (c) 2006 The Regents of The University of Michigan # 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 ...
bsd-3-clause
4,237,835,582,691,025,000
55.5
72
0.769358
false
wpic/flask-appointment-calendar
fbone/production_config.py
1
1211
import os from .config import DefaultConfig class ProductionConfig(DefaultConfig): DEBUG = False SECRET_KEY = 'secret key' INSTANCE_FOLDER_PATH = os.path.join('/tmp', 'instance') # Flask-Sqlalchemy: http://packages.python.org/Flask-SQLAlchemy/config.html SQLALCHEMY_ECHO = True # SQLITE for ...
bsd-3-clause
405,773,673,421,662,850
30.051282
79
0.659785
false
listamilton/supermilton.repository
plugin.video.sbt-thenoite/UniversalAnalytics/HTTPLog.py
19
3860
#!/usr/bin/python ############################################################################### # Formatting filter for urllib2's HTTPHandler(debuglevel=1) output # Copyright (c) 2013, Analytics Pros # # This project is free software, distributed under the BSD license. # Analytics Pros offers consulting and integra...
gpl-2.0
-2,030,346,191,084,365,300
30.900826
123
0.579534
false
inirudebwoy/pulsar
pulsar/utils/websocket.py
5
12387
# -*- coding: utf-8 -*- '''WebSocket_ Protocol is implemented via the :class:`Frame` and :class:`FrameParser` classes. To obtain a frame parser one should use the :func:`frame_parser` function. frame parser ~~~~~~~~~~~~~~~~~~~ .. autofunction:: frame_parser Frame ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: Frame ...
bsd-3-clause
6,373,649,098,871,250,000
29.212195
77
0.559942
false
brandon-rhodes/numpy
numpy/core/defchararray.py
14
67932
""" This module contains a set of functions for vectorized string operations and methods. .. note:: The `chararray` class exists for backwards compatibility with Numarray, it is not recommended for new development. Starting from numpy 1.4, if one needs arrays of strings, it is recommended to use arrays of ...
bsd-3-clause
-4,129,378,087,275,058,700
24.281727
86
0.573471
false
sectalks/sectalks.github.io
ctf101/02-cryptanalysis/brute-force-caesar-cipher.py
1
1040
"""SecTalks CTF101 - 02 - Cryptoanalysis Brute-force Caesar cipher """ cipher = 'FVBJHUIYLHRJVKLHUKFVBHYLWYVBKVMPA' #cipher = 'FRPGNYXFZRRGHCFNERNOBHGCNEGVPVCNGVATVAVGFRPHEVGLQVFPHFFVBAFYRNEAVATSEBZBGUREFNAQVZCEBIVATCEBOYRZFBYIVATFXVYYF' LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' for key in range(len(LETTERS)): plain...
mit
-5,942,980,410,473,219,000
36.142857
121
0.675
false
cigalsace/signalement
lib/externals/openlayers-2.11/tools/mergejs.py
4
8079
#!/usr/bin/env python # # Merge multiple JavaScript source code files into one. # # Usage: # This script requires source files to have dependencies specified in them. # # Dependencies are specified with a comment of the form: # # // @requires <file path> # # e.g. # # // @requires Geo/DataSource.js ...
gpl-3.0
2,651,481,233,804,135,000
29.19305
105
0.574205
false
zofuthan/zulip
zproject/local_settings_template.py
4
9015
# Settings for Zulip Voyager ### MANDATORY SETTINGS # # These settings MUST be set in production. In a development environment, # sensible default values will be used. # The user-accessible Zulip hostname for this installation, e.g. # zulip.example.com EXTERNAL_HOST = 'zulip.example.com' # The email address for the ...
apache-2.0
-2,120,378,649,518,153,500
40.353211
102
0.75563
false
satishgoda/programmingusingpython
sandbox/inheritance/areaspaces.py
1
1540
class Space(object): def __init__(self): self.tag = self.__class__.__name__ def __repr__(self): return "{0}: {1}".format(self.__class__.__bases__[0].__name__, self.tag) class View3D(Space): def draw(self, area): print("Drawing view3d {0}".format(area.dimensions)) cl...
gpl-2.0
-8,398,200,256,312,645,000
20.388889
80
0.522078
false
GeoscienceAustralia/eo-datasets
tests/integration/__init__.py
2
3856
# coding=utf-8 """ Module """ from __future__ import absolute_import import binascii import hashlib import rasterio import tempfile from pathlib import Path from rasterio import DatasetReader from typing import Dict, Tuple import numpy allow_anything = object() def assert_image( image: Path, overviews=allow...
apache-2.0
6,989,911,014,639,718,000
28.212121
88
0.612552
false
tmerrick1/spack
var/spack/repos/builtin/packages/py-isort/package.py
5
1589
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-4,541,510,042,882,006,500
43.138889
78
0.674638
false
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/pyqtgraph/flowchart/library/Data.py
3
16128
# -*- coding: utf-8 -*- from ..Node import Node from ...Qt import QtGui, QtCore import numpy as np import sys from .common import * from ...SRTTransform import SRTTransform from ...Point import Point from ...widgets.TreeWidget import TreeWidget from ...graphicsItems.LinearRegionItem import LinearRegionItem from . impo...
gpl-3.0
-5,559,612,180,351,713,000
32.530146
177
0.534288
false
drix00/pysemeels
tests/hitachi/eels_su/test_elv_file.py
1
4864
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. py:currentmodule:: xrayspectrummodeling.map.test_simulation_data .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> Tests for the module :py:mod:`xrayspectrummodeling.map.simulation_data as simulation_data`. """ #####################################...
apache-2.0
4,892,551,114,688,287,000
35.571429
113
0.61801
false
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/test/test_class.py
3
17777
"Test the functionality of Python classes implementing operators." import unittest from test import test_support testmeths = [ # Binary operations "add", "radd", "sub", "rsub", "mul", "rmul", "div", "rdiv", "mod", "rmod", "divmod", "rdivmod", "pow", "rpow", ...
apache-2.0
1,378,322,549,443,257,000
27.397764
90
0.472408
false
ckaestne/CIDE
CIDE_Language_Python-test/testfiles/UserString.py
8
7995
#!/usr/bin/env python ## vim:ts=4:et:nowrap """A user-defined wrapper around string objects Note: string objects have grown methods in Python 1.6 This module requires Python 1.6 or later. """ from types import StringType, UnicodeType import sys __all__ = ["UserString","MutableString"] class UserString: def __ini...
gpl-3.0
-1,615,208,924,488,896,000
42.928571
80
0.627017
false
ctxis/canape
CANAPE.Scripting/Lib/urlparse.py
76
14379
"""Parse (absolute and relative) URLs. urlparse module is based upon the following RFC specifications. RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding and L. Masinter, January 2005. RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter and L.Masinter, Decemb...
gpl-3.0
2,681,928,501,818,154,000
35.219144
102
0.572432
false
gsobczyk/hamster
waflib/Tools/xlcxx.py
56
1468
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2018 (ita) # Ralf Habacker, 2006 (rh) # Yinon Ehrlich, 2009 # Michael Kuhn, 2009 from waflib.Tools import ccroot, ar from waflib.Configure import conf @conf def find_xlcxx(conf): """ Detects the Aix C++ compiler """ cxx = conf.find_program(['xlc++_r', 'x...
gpl-3.0
-7,471,754,562,801,903,000
21.584615
62
0.568801
false
kaplun/ops
modules/miscutil/lib/upgrades/invenio_2013_09_02_new_bibARXIVPDF.py
18
1424
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013 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; either version 2 of the ## License, or (at your option) a...
gpl-2.0
-1,647,460,054,138,615,300
32.904762
75
0.71559
false
dagwieers/ansible
lib/ansible/modules/network/meraki/meraki_content_filtering.py
7
7671
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net> # 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 = { ...
gpl-3.0
361,729,657,431,473,340
33.554054
113
0.620388
false
spektom/incubator-airflow
airflow/api/common/experimental/get_task_instance.py
5
1648
# # 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...
apache-2.0
9,167,267,415,565,550,000
42.368421
91
0.740291
false
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/scipy/misc/tests/test_common.py
23
5076
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_equal, assert_) from scipy.misc import pade, logsumexp, face, ascent def test_pade_trivial(): nump,...
gpl-3.0
-4,715,039,854,342,177,000
28.511628
77
0.55595
false
vsajip/django
tests/modeltests/prefetch_related/tests.py
1
26898
from __future__ import absolute_import, unicode_literals from django.contrib.contenttypes.models import ContentType from django.db import connection from django.test import TestCase from django.test.utils import override_settings from django.utils import six from .models import (Author, Book, Reader, Qualification, T...
bsd-3-clause
-5,650,380,728,051,720,000
42.807818
118
0.590193
false
Eric89GXL/numpy
numpy/core/tests/test_shape_base.py
8
20018
from __future__ import division, absolute_import, print_function import warnings import numpy as np from numpy.core import ( array, arange, atleast_1d, atleast_2d, atleast_3d, block, vstack, hstack, newaxis, concatenate, stack ) from numpy.testing import ( assert_, assert_raises, assert_array_equal, as...
bsd-3-clause
2,054,650,482,986,785,300
33.395189
84
0.46688
false
exic/spade2
spade/mtp/simba.py
1
3010
from spade import MTP from spade import AID from spade import ACLParser from spade import Envelope import socket import SocketServer import xmpp #try: # import stack_thread as thread #except: # import thread import thread class SimbaRequestHandler(SocketServer.DatagramRequestHandler): ''' Request h...
lgpl-2.1
8,704,821,167,077,461,000
25.637168
121
0.634884
false
Intel-tensorflow/tensorflow
tensorflow/python/client/pywrap_tf_session.py
6
2973
# Copyright 2019 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
7,151,792,356,379,686,000
41.471429
100
0.745711
false
willingc/oh-mainline
vendor/packages/celery/celery/contrib/rdb.py
18
4469
# -*- coding: utf-8 -*- """ celery.contrib.rdb ================== Remote debugger for Celery tasks running in multiprocessing pool workers. Inspired by http://snippets.dzone.com/posts/show/7248 **Usage** .. code-block:: python from celery.contrib import rdb from celery.decorators import task @task ...
agpl-3.0
-5,303,194,896,927,360,000
27.647436
76
0.583576
false
VirgilSecurity/virgil-sdk-python
virgil_sdk/jwt/jwt_verifier.py
1
2886
# Copyright (C) 2016-2019 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # 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) Redistribution...
bsd-3-clause
-1,359,941,264,242,722,600
40.228571
96
0.691615
false
dzan/xenOnArm
tools/libxl/gentest.py
19
9405
#!/usr/bin/python import os import sys import re import random import idl def randomize_char(c): if random.random() < 0.5: return str.lower(c) else: return str.upper(c) def randomize_case(s): r = [randomize_char(c) for c in s] return "".join(r) def randomize_enum(e): return rand...
gpl-2.0
-7,528,817,808,149,349,000
30.989796
85
0.474428
false
davidcox/freetype-py
setup.py
2
1174
#!/usr/bin/env python # ----------------------------------------------------------------------------- # FreeType high-level python API - copyright 2011 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # ----------------------------------------------------------------------------- from distutil...
bsd-3-clause
-2,967,915,028,320,317,400
40.928571
79
0.498296
false
abretaud/tools-iuc
tools/circos/text-from-gff3.py
17
1131
#!/usr/bin/env python import logging import sys from BCBio import GFF logging.basicConfig(level=logging.INFO) log = logging.getLogger() if __name__ == "__main__": attr = sys.argv[2] for record in GFF.parse(sys.argv[1]): if len(record.features) == 0: continue for feature in sort...
mit
7,988,875,520,059,622,000
25.928571
88
0.519894
false
kromain/chromium-tools
clang_format.py
3
2643
#!/usr/bin/env python # 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. """Redirects to the version of clang-format checked into the Chrome tree. clang-format binaries are pulled down from Google Cloud Stor...
bsd-3-clause
5,868,807,343,760,346,000
34.716216
80
0.680288
false
Injabie3/Red-DiscordBot
cogs/lottery.py
2
25131
# Lottery was created by Redjumpman for Redbot # This will create 2 data folders with 1 JSON file import os import asyncio from discord.ext import commands from .utils.dataIO import dataIO from .utils import checks from __main__ import send_cmd_help from random import choice as randchoice class Lottery: ...
gpl-3.0
-2,850,040,692,678,702,000
51.42766
193
0.538409
false
TheParrotsAreComing/PAWS
TestingAssets/Fosters/foster_filter.py
2
2061
import time import sys import _mysql import random import string import re from selenium import webdriver from selenium.webdriver.support.ui import Select import selenium.webdriver.chrome.service as service from selenium.webdriver.common.keys import Keys service = service.Service('D:\ChromeDriver\chromedriver') serv...
mit
7,965,257,144,329,852,000
31.714286
191
0.724891
false
donny/mako-mori
external/boto/mturk/notification.py
40
4178
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
mit
-8,757,323,337,122,954,000
39.563107
134
0.649354
false
d1hotpep/cacheable
cacheable/tests/PeeweeTTLTest.py
1
1473
#!/usr/bin/python import os import sys from time import sleep from time import time import unittest sys.path = [ os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) ] + sys.path from cacheable import Cacheable from cacheable.adapter import PeeweeAdapter from peewee import SqliteDatabase class TimeCac...
mit
-7,904,872,723,253,051,000
21.661538
91
0.617787
false
MRod5/pyturb
miscelanea/dispositivos_aerorreactor.py
1
7724
# -*- coding: utf-8 -*- """ Created on Thu May 7 12:54:28 2020 @author: marco """ import numpy as np # Condiciones de iteración iter_max = 100 tolerancia = 1e-6 def compresor_tempsalida_rend_adiab(eta, Tet, rel_compresion, gamma, verboso=False): """ Solución de la temperatura de remanso a la salida de ...
mit
2,013,426,033,461,439,500
30.35102
108
0.555729
false
magsilva/scriptLattes
scriptLattes/grupo.py
1
34361
#!/usr/bin/python # encoding: utf-8 # filename: grupo.py # # scriptLattes V8 # Copyright 2005-2013: Jesús P. Mena-Chalco e Roberto M. Cesar-Jr. # http://scriptlattes.sourceforge.net/ # # # Este programa é um software livre; você pode redistribui-lo e/ou # modifica-lo dentro dos termos da Licença Pública Geral GNU...
gpl-2.0
-2,055,407,080,451,436,800
45.378378
309
0.743153
false
GREO/GNU-Radio
gnuradio-core/src/python/gnuradio/blks2impl/pfb_channelizer.py
2
2164
#!/usr/bin/env python # # Copyright 2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your opt...
gpl-3.0
3,062,746,194,167,319,000
35.677966
93
0.674214
false
IDragonfire/modular-client
src/games/_gameswidget.py
1
16522
#------------------------------------------------------------------------------- # Copyright (c) 2012 Gael Honorez. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0 # which accompanies this distribution, and is available at # htt...
gpl-3.0
7,961,750,450,102,302,000
33.995643
227
0.606585
false
bentley-historical-library/migration-tools
ead/agents/create_json_then_post-famname.py
2
4772
''' first things first, import what we need''' # requests takes all of the work out of python http making your integration with web services seamless, you'll need to install it import requests # csv implements classes to read and write tabular data in csv format import csv # json is a lightweight data interchange fo...
cc0-1.0
-424,870,795,608,711,040
27.410714
129
0.598491
false
jiaphuan/models
research/delf/delf/python/datum_io_test.py
2
2695
# 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 applicab...
apache-2.0
8,100,915,956,753,142,000
36.430556
80
0.716883
false
mozilla/olympia
src/olympia/scanners/admin.py
2
31066
from django.conf import settings from django.contrib import admin, messages from django.contrib.admin import SimpleListFilter from django.core.exceptions import FieldDoesNotExist from django.db.models import Count, Prefetch from django.http import Http404 from django.shortcuts import redirect from django.template.loade...
bsd-3-clause
8,228,025,103,084,832,000
32.440258
88
0.553048
false
Ictp/indico
indico/MaKaC/webinterface/common/abstractDataWrapper.py
2
12340
# -*- 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
6,805,822,890,231,442,000
38.42492
154
0.568152
false
conorkcorbin/tractometry
tests.py
1
1763
import argparse import numpy as np import pandas as pd import nibabel as nib from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from dipy.tracking.streamline import set_number_of_points import utils parser = argparse.ArgumentParser() parser.add_argument('-testName', '--testName', required=True) p...
mit
-5,613,614,758,966,588,000
35
84
0.734543
false
rdo-management/heat
heat/engine/resources/openstack/neutron/provider_net.py
2
4623
# # 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
-4,678,954,023,445,764,000
31.787234
79
0.61843
false
writefaruq/lionface-app
django/contrib/gis/tests/geo3d/models.py
12
1904
from django.contrib.gis.db import models class City3D(models.Model): name = models.CharField(max_length=30) point = models.PointField(dim=3) objects = models.GeoManager() def __unicode__(self): return self.name class Interstate2D(models.Model): name = models.CharField(max_lengt...
bsd-3-clause
1,716,627,517,714,469,600
25.594203
52
0.654412
false
Jai-Chaudhary/termite-data-server
web2py/scripts/cpdb.py
8
25004
import os import sys from collections import deque import string import argparse import cStringIO import operator import cPickle as pickle from collections import deque import math import re import cmd try: import pyreadline as readline except ImportError: import readline try: from gluon import DAL except Impor...
bsd-3-clause
-3,011,977,756,521,602,000
35.028818
157
0.480683
false
caesar2164/edx-platform
common/djangoapps/student/views.py
1
114210
""" Student Views """ import datetime import logging import uuid import json import warnings from collections import defaultdict from urlparse import urljoin, urlsplit, parse_qs, urlunsplit from django.views.generic import TemplateView from pytz import UTC from requests import HTTPError from ipware.ip import get_ip i...
agpl-3.0
1,533,828,457,470,076,200
40.500727
146
0.651475
false
rossjones/ScraperWikiX
web/frontend/specs/user_upgrade_spec.py
1
1051
from nose.tools import assert_equals, raises from frontend.models import UserProfile from django.contrib.auth.models import User def setup(): global user username,password = 'tester','pass' user = User.objects.create_user(username, '%s@example.com' % username, password) def ensure_can_upgrade_account(): ...
agpl-3.0
7,040,054,505,104,011,000
30.848485
84
0.707897
false
spacy-io/spaCy
spacy/tests/lang/da/test_exceptions.py
2
1824
import pytest @pytest.mark.parametrize("text", ["ca.", "m.a.o.", "Jan.", "Dec.", "kr.", "jf."]) def test_da_tokenizer_handles_abbr(da_tokenizer, text): tokens = da_tokenizer(text) assert len(tokens) == 1 @pytest.mark.parametrize("text", ["Jul.", "jul.", "Tor.", "Tors."]) def test_da_tokenizer_handles_ambigu...
mit
-3,821,526,467,111,707,600
29.762712
81
0.592837
false
xAKLx/pox
pox/info/recoco_spy.py
46
2718
# Copyright 2012 James McCauley # # 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 writi...
apache-2.0
-3,226,294,816,008,024,600
24.166667
75
0.592347
false
guiniol/py3status
py3status/storage.py
2
4614
from __future__ import with_statement import os from collections import Iterable, Mapping from pickle import dump, load from tempfile import NamedTemporaryFile from time import time class Storage: data = {} initialized = False def init(self, py3_wrapper, is_python_2): self.is_python_2 = is_pyt...
bsd-3-clause
-575,864,646,525,704,060
31.723404
79
0.554183
false
shashank971/edx-platform
common/djangoapps/enrollment/views.py
38
27557
""" The Enrollment API Views should be simple, lean HTTP endpoints for API access. This should consist primarily of authentication, request validation, and serialization. """ import logging from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from opaque_keys impo...
agpl-3.0
-3,390,536,105,199,150,000
42.39685
120
0.598868
false
openqt/algorithms
projecteuler/pe165-intersections.py
1
1824
#!/usr/bin/env python # coding=utf-8 """165. Intersections https://projecteuler.net/problem=165 A segment is uniquely defined by its two endpoints. By considering two line segments in plane geometry there are three possibilities: the segments have zero points, one point, or infinitely many points in common. More...
gpl-3.0
2,148,431,976,965,857,000
34.745098
78
0.747669
false
jgeewax/gcloud-python
monitoring/google/cloud/monitoring/resource.py
7
6625
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
1,638,923,971,437,702,100
31.960199
79
0.61766
false
HEPData/hepdata-converter-ws-client
hepdata_converter_ws_client/testsuite/__init__.py
1
3956
# -*- encoding: utf-8 -*- __author__ = 'Michał Szostak' import os from random import randint import shutil import tempfile import time import unittest import yaml # We try to load using the CSafeLoader for speed improvements. try: from yaml import CSafeLoader as Loader except ImportError: #pragma: no cover f...
gpl-2.0
5,510,302,980,980,426,000
32.803419
110
0.603793
false
hyphaltip/cndtools
util/randSeq.py
1
1185
#!/usr/bin/env python # Copyright (c) 2006 # Colin Dewey (University of Wisconsin-Madison) # cdewey@biostat.wisc.edu # # 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 Li...
gpl-2.0
8,426,622,635,996,024,000
27.214286
75
0.723207
false
napjon/krisk
krisk/tests/test_title_legend_toolbox.py
1
3970
def test_title(bar_simple): # Blank Title assert bar_simple.option['title'] == {'text': ''} # Title with set position c_t = bar_simple.set_title('Hellow', x_pos='auto', y_pos='-5%') assert bar_simple.option['title'] == {'left': 'auto', 'text': 'Hellow', ...
bsd-3-clause
-1,553,210,094,076,432,100
46.261905
78
0.348363
false
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/printing/theanocode.py
21
8160
from __future__ import print_function, division import inspect from sympy.utilities import default_sort_key from sympy.external import import_module from sympy.printing.printer import Printer import sympy from functools import partial theano = import_module('theano') if theano: ts = theano.scalar tt = theano...
bsd-3-clause
1,578,785,401,999,373,300
34.633188
84
0.563358
false
max-arnold/uwsgi-backports
uwsgistatus.py
7
2418
import uwsgi import time import sys import os def application(env, start_response): print env start_response('200 OK', [('Content-Type', 'text/html')]) yield '<h1>uWSGI %s status</h1>' % uwsgi.version yield 'masterpid: <b>' + str(uwsgi.masterpid()) + '</b><br/>' yield 'started on: <b>' + time.c...
gpl-2.0
6,243,679,049,501,226,000
29.607595
250
0.516543
false
Lana-B/Pheno4T
madanalysis/layout/histogram.py
1
4207
################################################################################ # # Copyright (C) 2012-2013 Eric Conte, Benjamin Fuks # The MadAnalysis development team, email: <ma5team@iphc.cnrs.fr> # # This file is part of MadAnalysis 5. # Official website: <https://launchpad.net/madanalysis5> # # MadAnal...
gpl-3.0
-4,322,020,847,721,325,000
28.626761
82
0.559306
false
temnoregg/django-helpdesk
helpdesk/south_migrations/0011_populate_usersettings.py
5
5022
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models from django.contrib.auth import get_user_model from helpdesk.settings import DEFAULT_USER_SETTINGS def pickle_settings(data): """Pickling as defined at...
bsd-3-clause
3,055,535,137,414,424,600
54.8
195
0.5908
false
anushreejangid/csmpe-main
csmpe/core_plugins/csm_install_operations/ios_xr/add.py
1
4725
# ============================================================================= # # Copyright (c) 2016, Cisco Systems # All rights reserved. # # # Author: Klaudiusz Staniek # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met...
bsd-2-clause
-5,918,361,077,678,879,000
46.25
119
0.65545
false
cmdunkers/DeeperMind
PythonEnv/lib/python2.7/site-packages/theano/sandbox/cuda/tests/test_blocksparse.py
2
2710
import numpy from nose.plugins.skip import SkipTest import theano from theano import tensor import theano.tests.unittest_tools as utt import theano.tensor.nnet.tests.test_blocksparse import theano.sandbox.cuda as cuda_ndarray from theano.sandbox.cuda.blocksparse import (GpuSparseBlockOuter, ...
bsd-3-clause
-5,929,907,997,292,509,000
34.657895
79
0.62214
false
bigsassy/sms-playground
kidmuseum.py
1
14316
import sys import time import json from datetime import datetime try: from urllib2 import Request, urlopen, HTTPError except: from urllib.request import Request, urlopen, HTTPError def handle_server_down(exctype, value, traceback): if exctype == HTTPError and 'HTTP Error 502' in str(value): print(...
mit
-1,191,694,240,274,205,700
42.250755
121
0.643266
false
dtroyer/cliff
cliff/tests/test_formatters_yaml.py
1
3058
#!/usr/bin/env python # # 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, s...
apache-2.0
-9,176,197,613,891,788,000
29.58
76
0.519294
false
tarasane/h2o-3
py2/testdir_hosts/test_parse_manyfile_hack.py
21
1857
import unittest, sys sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_cmd, h2o_import as h2i from h2o_test import find_file, dump_json, verboseprint print "Do a hack to import files individually, then parse, to avoid Frames.json on unused files" class Basic(unittest.TestCase): def tearDown(...
apache-2.0
-3,269,395,069,711,012,000
32.763636
96
0.578891
false
gooddata/openstack-nova
nova/tests/unit/api/openstack/compute/test_migrations.py
1
16823
# 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 agreed to in...
apache-2.0
-8,953,287,839,083,142,000
38.49061
78
0.588599
false
sofiane87/lasagne-GAN
dcgan/dcgan_celeba2.py
1
9831
from __future__ import print_function from keras.datasets import mnist from keras.layers import Input, Dense, Reshape, Flatten, Dropout from keras.layers import BatchNormalization, Activation, ZeroPadding2D, Cropping2D from keras.layers.advanced_activations import LeakyReLU from keras.layers.convolutional import UpSam...
mit
7,477,022,988,520,904,000
33.254355
108
0.556912
false
GabrielNicolasAvellaneda/chemlab
chemlab/mviewer/QIPythonWidget.py
6
3102
import atexit from PyQt4.QtCore import QTimer from IPython.kernel.zmq.kernelapp import IPKernelApp from IPython.lib.kernel import find_connection_file from IPython.qt.inprocess import QtInProcessKernelManager from IPython.qt.console.rich_ipython_widget import RichIPythonWidget from IPython.config.application import...
gpl-3.0
-6,670,682,393,399,999,000
32.365591
74
0.628627
false
sbuss/voteswap
lib/django/contrib/gis/db/backends/base/models.py
10
7113
import re from django.contrib.gis import gdal from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class SpatialRefSysMixin(object): """ The SpatialRefSysMixin is a class used by the database-dependent SpatialRefSys objects to reduce redu...
mit
-4,119,974,290,265,707,000
31.62844
115
0.557149
false
bccp/nbodykit
nbodykit/io/tests/test_fits.py
2
2943
from runtests.mpi import MPITest from nbodykit.io.fits import FITSFile import os import numpy import tempfile import pickle import contextlib import pytest try: import fitsio except ImportError: fitsio is None @contextlib.contextmanager def temporary_data(data='table'): """ Write some temporary FITS data to ...
gpl-3.0
-2,176,975,253,572,595,500
25.513514
85
0.599728
false
Yaco-Sistemas/yith-library-server
yithlibraryserver/contributions/models.py
1
1714
# Yith Library Server is a password storage server. # Copyright (C) 2013 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publ...
agpl-3.0
-968,914,231,171,617,800
33.28
78
0.661027
false
MrLeeh/pdftools
setup.py
1
1912
#!/usr/bin/env python """ Setupfile for pdftools. :author: Stefan Lehmann <stlm@posteo.de> :license: MIT, see license file or https://opensource.org/licenses/MIT :created on 2018-04-14 20:40:27 :last modified by: Stefan Lehmann :last modified time: 2018-04-14 21:03:58 """ import ast import io import re import os f...
mit
9,132,928,565,743,975,000
27.537313
104
0.635983
false
gantta/grovepi
sbsunit/boards/rasp_pi_legacy.py
2
4169
''' Copyright 2014-2015 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the "license" file accompany...
apache-2.0
-2,160,852,300,227,973,600
36.9
266
0.655313
false
WangWenjun559/Weiss
classifier/feature.py
2
5801
""" This script extracts features from the query. ============================================= Usage: This file cannot run standalone, the functions will be used in other scripts, such as "train.py" and "classify.py" TODO(wenjunw@cs.cmu.edu): - Consider encoding issue Author: Wenjun Wang Date: June 28, 2015 """ i...
apache-2.0
-59,786,810,808,692,360
29.856383
90
0.595759
false
tchx84/sugar
src/jarabe/model/notifications.py
2
3598
# Copyright (C) 2008 One Laptop Per Child # # 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. # # This program is distribu...
gpl-2.0
1,321,024,111,071,749,400
33.932039
79
0.61423
false
jordanemedlock/psychtruths
temboo/core/Library/Foursquare/Checkins/RecentCheckins.py
5
4415
# -*- coding: utf-8 -*- ############################################################################### # # RecentCheckins # Returns a list of recent friends' check-ins. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
apache-2.0
-6,873,900,823,442,688,000
40.261682
188
0.674745
false
arskom/spyne
spyne/test/interop/test_pyramid.py
2
2730
# coding: utf-8 # # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version....
lgpl-2.1
-6,575,140,074,578,834,000
34.921053
78
0.676923
false
nuwainfo/trac-code-comments-plugin
code_comments/web.py
2
11501
import re import copy from trac.core import * from trac.web.chrome import INavigationContributor, ITemplateProvider, add_script, add_script_data, add_stylesheet, add_notice, add_link from trac.web.main import IRequestHandler, IRequestFilter from trac.util import Markup from trac.util.text import to_unicode from trac.ut...
gpl-2.0
4,607,735,256,648,059,400
38.386986
136
0.621946
false
Jajcus/pyxmpp2
pyxmpp2/test/stream_reader.py
1
4892
#!/usr/bin/python -u # -*- coding: UTF-8 -*- # pylint: disable=C0111 import os import logging from pyxmpp2.test._support import DATA_DIR logger = logging.getLogger("pyxmpp2.test.stream_reader") import unittest from xml.etree import ElementTree from pyxmpp2 import xmppparser from pyxmpp2.utils import xml_elements_...
lgpl-2.1
9,048,098,941,547,246,000
31.613333
79
0.564186
false
Purg/kwiver
sprokit/tests/bindings/python/sprokit/pipeline_util/test-export_.py
4
2608
#!@PYTHON_EXECUTABLE@ #ckwg +28 # Copyright 2011-2013 by Kitware, 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,...
bsd-3-clause
7,324,491,306,691,780,000
30.047619
80
0.715107
false
jakejhansen/minesweeper_solver
evolutionary/hpcjobs/Minesweeper10-1/run-minesweeper.py
13
10466
import argparse import cProfile import multiprocessing as mp import os import pstats import time import gym import IPython import numpy as np from keras.layers import Dense from keras.models import Input, Model, Sequential, clone_model, load_model from keras.optimizers import Adam from context import core from core.st...
mit
2,059,481,714,279,348,500
44.112069
173
0.637875
false
mitya57/django
tests/model_formsets/tests.py
5
78307
import datetime import re from datetime import date from decimal import Decimal from django import forms from django.core.exceptions import ImproperlyConfigured from django.db import models from django.forms.models import ( BaseModelFormSet, _get_foreign_key, inlineformset_factory, modelformset_factory, ) from...
bsd-3-clause
-54,937,005,986,186,290
43.798055
119
0.574891
false
nirbheek/cerbero
cerbero/tools/osxrelocator.py
20
4868
#!/usr/bin/env python # cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free So...
lgpl-2.1
8,574,183,854,850,085,000
35.328358
79
0.607025
false