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
daafgo/CourseBuilder-Xapi
modules/review/peer.py
4
10698
# 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
-3,378,312,130,162,257,000
41.792
80
0.667134
false
Eksmo/calibre
src/calibre/ebooks/conversion/plugins/djvu_input.py
5
3369
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL 3' __copyright__ = '2011, Anthon van der Neut <anthon@mnt.org>' __docformat__ = 'restructuredtext en' import os from subprocess import Popen, PIPE from cStringIO imp...
gpl-3.0
-1,851,251,022,297,194,500
37.284091
86
0.597507
false
pravisankar/solum
solum/api/controllers/v1/datamodel/extension.py
6
1867
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
2,270,179,426,518,601,500
40.488889
77
0.681843
false
rbejar/odrl-ogc-cache-policies
owslib/iso.py
1
30051
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2009 Tom Kralidis # # Authors : Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Contact email: tomkralidis@gmail.com # ================================...
mit
1,370,863,431,138,408,000
47.391304
221
0.641343
false
CalthorpeAnalytics/urbanfootprint
footprint/main/models/analysis_module/core_module/core_revert_to_base_condition.py
1
5853
# UrbanFootprint v1.5 # Copyright (C) 2017 Calthorpe Analytics # # This file is part of UrbanFootprint version 1.5 # # UrbanFootprint is distributed under the terms of the GNU General # Public License version 3, as published by the Free Software Foundation. This # code is distributed WITHOUT ANY WARRANTY, without impl...
gpl-3.0
7,415,926,361,489,357,000
37.761589
84
0.724244
false
laiqiqi886/kbengine
kbe/res/scripts/common/Lib/test/test_pep277.py
73
7135
# Test the Unicode versions of normal file functions # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir import os import sys import unittest import warnings from unicodedata import normalize from test import support filenames = [ '1_abc', '2_ascii', '3_Gr\xfc\xdf-Gott'...
lgpl-3.0
-6,574,373,475,919,505,000
34.497512
88
0.602242
false
tody411/ImageViewerFramework
ivf/core/sfs/detail_layer.py
1
1105
# -*- coding: utf-8 -*- ## @package ivf.core.sfs.detail_layer # # ivf.core.sfs.detail_layer utility package. # @author tody # @date 2016/02/10 import cv2 from ivf.cv.image import to8U, to32F from ivf.core.guided_filter.guided_filter import GuidedFilter def baseDetailSeparationGaussian(I_32F, sigma=5.0...
mit
7,224,041,324,436,962,000
23.577778
76
0.640724
false
sritchie73/liftOverPlink
liftOverPlink.py
1
6309
#!/usr/bin/python # This script to be used to run liftOver on genotype data stored in # the plink format. # See: http://genome.sph.umich.edu/wiki/LiftOver # Downloaded from: http://genome.sph.umich.edu/wiki/LiftMap.py # # Modified by Scott Ritchie: # - to work with user specified chain files, rather than # the ori...
gpl-2.0
6,864,679,217,936,846,000
31.859375
85
0.573308
false
IMCG/RamCloud
bindings/python/test_testutil.py
20
5234
#!/usr/bin/env python # Copyright (c) 2010 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
isc
1,152,267,438,590,493,800
28.908571
77
0.607948
false
ruimashita/django-haystack
haystack/utils/app_loading.py
12
2913
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from django import VERSION as DJANGO_VERSION from django.conf import settings from django.core.exceptions import ImproperlyConfigured from haystack.utils import importlib __all__ = ['haystack_get_models', 'haystack_l...
bsd-3-clause
504,316,331,786,970,240
31.366667
109
0.601099
false
flavour/cert
modules/pygsm/scanwin32.py
62
8365
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import ctypes import re def ValidHandle(value): if value == 0: raise ctypes.WinError() return value NULL = 0 HDEVINFO = ctypes.c_int BOOL = ctypes.c_int CHAR = ctypes.c_char PCTSTR = ctypes.c_char_p HWND = ctypes.c_uint DWORD = ctypes...
mit
1,012,301,483,738,679,000
33.423868
147
0.606695
false
sacharya/nova
nova/openstack/common/eventlet_backdoor.py
25
4844
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation. # Administrator of the National Aeronautics and Space Administration. # 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...
apache-2.0
-7,180,921,547,226,939,000
32.178082
79
0.644096
false
yobennett/kafka
dev-utils/test-patch.py
73
17007
#!/usr/bin/env python # # 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 # "...
apache-2.0
8,965,312,597,966,549,000
35.495708
201
0.661904
false
halberom/ansible
lib/ansible/modules/files/template.py
20
4250
# this is a virtual module that is entirely implemented server side # 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 op...
gpl-3.0
-4,490,753,112,891,051,000
36.280702
125
0.696
false
ptitjes/quodlibet
gdist/search_provider.py
4
1904
# Copyright 2013-2016 Christoph Reiter # # 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, #...
gpl-2.0
-3,879,905,555,180,394,500
36.333333
73
0.704307
false
chemelnucfin/tensorflow
tensorflow/python/kernel_tests/large_concat_op_test.py
38
1690
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
2,508,487,042,240,907,300
39.238095
80
0.690533
false
jiangzhonghui/viewfinder
backend/www/json_schema.py
13
81009
# Copyright 2012 Viewfinder Inc. All Rights Reserved. """JSON Schemas for request/response pairs used with Viewfinder ops. All times are expressed in seconds (possibly subsecond floating-point precision) since the epoch (January 1st, 1970) in UTC. Every mutating request may be run synchronously by specifying 'synchr...
apache-2.0
-5,492,227,161,929,388,000
28.804636
119
0.606525
false
pchaigno/grr
lib/data_stores/sqlite_data_store_test.py
1
1333
#!/usr/bin/env python """Tests the SQLite data store.""" import shutil from grr.lib import access_control from grr.lib import config_lib from grr.lib import data_store from grr.lib import data_store_test from grr.lib import flags from grr.lib import test_lib from grr.lib import utils from grr.lib.data_stores import...
apache-2.0
-7,812,739,036,026,439,000
23.685185
75
0.684171
false
solidgoldbomb/letsencrypt
letsencrypt/plugins/standalone/tests/authenticator_test.py
8
27875
"""Tests for letsencrypt.plugins.standalone.authenticator.""" import os import psutil import signal import socket import unittest import mock import OpenSSL from acme import challenges from acme import jose from letsencrypt import achallenges from letsencrypt.tests import acme_util from letsencrypt.tests import tes...
apache-2.0
5,713,984,468,707,665,000
46.245763
81
0.668843
false
asm666/sympy
sympy/parsing/tests/test_sympy_parser.py
46
3372
from sympy.core import Symbol, Function, Float, Rational, Integer, I, Mul, Pow from sympy.functions import exp, factorial, sin from sympy.logic import And from sympy.series import Limit from sympy.utilities.pytest import raises from sympy.parsing.sympy_parser import ( parse_expr, standard_transformations, rational...
bsd-3-clause
-6,399,722,001,453,078,000
27.576271
89
0.574733
false
kromain/chromium-tools
third_party/logilab/common/textutils.py
16
17041
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
bsd-3-clause
5,651,446,262,102,386,000
31.031955
89
0.619447
false
hehongliang/tensorflow
tensorflow/python/layers/core_test.py
8
22555
# 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
-1,951,918,732,910,645,500
40.846011
99
0.666681
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_bastion_hosts_operations.py
1
23288
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
942,299,543,305,716,500
48.130802
193
0.640974
false
ZachRiegel/scriptbin
pypyjs/modules/encodings/iso2022_jp.py
816
1053
# # iso2022_jp.py: Python Unicode Codec for ISO2022_JP # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncod...
gpl-3.0
-7,784,369,523,424,791,000
26
74
0.703704
false
kaplun/invenio
modules/bibsched/lib/tasklets/bst_weblinkback_updater.py
24
2836
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012, 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 yo...
gpl-2.0
-2,107,742,281,023,520,500
44.741935
93
0.681594
false
pannal/Subliminal.bundle
Contents/Libraries/Shared/chardet/jisfreq.py
342
25777
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
-255,439,797,816,494,370
78.313846
98
0.721806
false
MPBA/pyphysio
pyphysio/estimators/Estimators.py
2
15168
# coding=utf-8 from __future__ import division import numpy as _np from ..BaseEstimator import Estimator as _Estimator from ..Signal import UnevenlySignal as _UnevenlySignal, EvenlySignal as _EvenlySignal from ..filters.Filters import IIRFilter as _IIRFilter, DeConvolutionalFilter as _DeConvolutionalFilter, \ Convo...
gpl-3.0
3,748,950,312,143,500,300
34.773585
202
0.580894
false
Intel-tensorflow/tensorflow
tensorflow/python/saved_model/revived_types.py
6
8394
# 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
-6,292,528,451,037,189,000
40.349754
80
0.717298
false
cr/fxos-certsuite
web-platform-tests/tests/tools/pywebsocket/src/example/echo_noext_wsh.py
465
2404
# Copyright 2013, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mpl-2.0
-8,450,656,326,884,334,000
38.409836
76
0.733777
false
ramaro/pomares
nectar/proto.py
1
5923
from msgpack import packb, unpackb from collections import namedtuple from zlib import compress, decompress from struct import pack, unpack import asyncio from nectar.utils import logger from concurrent.futures import ThreadPoolExecutor Ack = namedtuple('Ack', ('value',)) PubKeyReply = namedtuple('PubKeyReply', ('key'...
mit
-8,088,838,279,404,170,000
29.219388
87
0.613203
false
Sankluj/PyWidget
src/test.py
1
2188
import pyglet from dialog import Dialog from button import Button from vbox import VBox from hbox import HBox from slider import Slider from checkbox import Checkbox from label import Label from radiobutton import Radiobutton window = pyglet.window.Window(resizable=True) label1 = Label(text='<font face="Helvetica,Ari...
bsd-3-clause
-5,074,498,867,036,646,000
29.402778
94
0.675046
false
grantCelley/Todo
main.py
1
1347
import sys def saveData(data): with open("list.txt", mode = "w", encoding="utf-8") as myFile: for str in data: if(not (str is data[0])): myFile.write('\n') myFile.write(str) def readData(): with open("list.txt", mode = 'r', encoding = 'utf-8') as myFile: ...
gpl-3.0
7,552,336,622,067,748,000
25.94
68
0.501114
false
hejuna/bite-project
tools/bugs/server/appengine/kind.py
17
1205
# Copyright 2011 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 a...
apache-2.0
8,427,213,558,325,973,000
27.023256
74
0.716183
false
maniteja123/scipy
scipy/optimize/tests/test__numdiff.py
38
17617
from __future__ import division import math from itertools import product import numpy as np from numpy.testing import (assert_raises, assert_allclose, assert_equal, assert_, run_module_suite) from scipy.sparse import csr_matrix, csc_matrix, lil_matrix from scipy.optimize._numdiff import (...
bsd-3-clause
7,317,012,368,318,588,000
36.166667
79
0.523301
false
cah0211/namebench
libnamebench/data_sources.py
173
15580
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
5,991,679,167,368,587,000
34.328798
107
0.637997
false
LearnEra/LearnEraPlaftform
common/test/acceptance/tests/studio/base_studio_test.py
18
3318
from ...pages.studio.auto_auth import AutoAuthPage from ...fixtures.course import CourseFixture from ..helpers import UniqueCourseTest from ...pages.studio.overview import CourseOutlinePage from ...pages.studio.utils import verify_ordering class StudioCourseTest(UniqueCourseTest): """ Base class for all Studi...
agpl-3.0
6,694,018,633,134,202,000
32.18
117
0.61302
false
meteorcloudy/tensorflow
tensorflow/contrib/nearest_neighbor/python/ops/nearest_neighbor_ops.py
79
2852
# 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
2,933,016,525,332,870,700
43.5625
80
0.650421
false
GiladE/birde
venv/lib/python2.7/site-packages/gunicorn/workers/base.py
25
7331
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from datetime import datetime import os import signal import sys import time from random import randint from gunicorn import util from gunicorn.workers.workertmp import WorkerTmp from gunico...
mit
-8,667,899,581,217,727,000
32.474886
79
0.592552
false
nihilus/processstalker
Python Utilities/ps_idc_gen.py
2
2755
#!/usr/bin/python #!c:\python\python.exe # # Process Stalker - Python Utility # Copyright (C) 2005 Pedram Amini <pamini@idefense.com,pedram.amini@gmail.com> # # This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free S...
gpl-2.0
1,532,871,137,173,371,100
31.621951
119
0.621053
false
KASHIHARAAkira/LM60Pi
lm60.py
1
1378
''' Copyright 2017 Akira Kashihara 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, distribute, su...
mit
-6,588,128,996,700,999,000
52
460
0.764151
false
felliott/osf.io
framework/auth/signing.py
6
2195
# encoding: utf-8 import hmac import json import time import base64 import collections from website import settings # Written by @jmcarp originally def order_recursive(data): """Recursively sort keys of input data and all its nested dictionaries. Used to ensure consistent ordering of JSON payloads. """ ...
apache-2.0
6,166,462,675,315,103,000
25.130952
86
0.623235
false
iproduct/course-social-robotics
11-dnn-keras/venv/Lib/site-packages/pygments/lexers/elm.py
2
3003
# -*- coding: utf-8 -*- """ pygments.lexers.elm ~~~~~~~~~~~~~~~~~~~ Lexer for the Elm programming language. :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, words, include from pygments.token impo...
gpl-2.0
-2,901,869,917,120,355,000
23.818182
84
0.40626
false
alexeyum/scikit-learn
examples/semi_supervised/plot_label_propagation_digits.py
55
2723
""" =================================================== Label Propagation digits: Demonstrating performance =================================================== This example demonstrates the power of semisupervised learning by training a Label Spreading model to classify handwritten digits with sets of very few labels....
bsd-3-clause
4,800,159,090,405,087,000
29.595506
79
0.675725
false
Taapat/enigma2-openpli-fulan
lib/python/Tools/Notifications.py
12
1988
notifications = [ ] notificationAdded = [ ] # notifications which are currently on screen (and might be closed by similiar notifications) current_notifications = [ ] def __AddNotification(fnc, screen, id, *args, **kwargs): if ".MessageBox'>" in `screen`: kwargs["simple"] = True if ".Standby'>" in `screen`: re...
gpl-2.0
8,092,995,326,135,551,000
31.064516
108
0.727364
false
tempbottle/python-driver
tests/integration/cqlengine/query/test_datetime_queries.py
8
2565
# Copyright 2015 DataStax, 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, s...
apache-2.0
-8,798,530,883,018,711,000
34.625
91
0.689669
false
ljgabc/lfs
usr/lib/python2.7/test/test_asynchat.py
93
9203
# test asynchat import asyncore, asynchat, socket, time import unittest import sys from test import test_support try: import threading except ImportError: threading = None HOST = test_support.HOST SERVER_QUIT = 'QUIT\n' if threading: class echo_server(threading.Thread): # parameter to determine t...
gpl-2.0
3,753,365,632,855,790,000
32.710623
82
0.584592
false
s0undt3ch/Deluge
deluge/ui/console/commands/status.py
8
5301
# # status.py # # Copyright (C) 2011 Nick Lanham <nick@afternight.org> # # Deluge is free software. # # You may 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
-747,964,903,717,307,800
41.071429
132
0.633088
false
foobert/ansible-modules-core
cloud/rackspace/rax_files.py
157
11980
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.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 # (a...
gpl-3.0
-7,715,145,785,953,814,000
30.609499
98
0.600083
false
gfxprim/gfxprim
pylib/gfxprim/grabbers/__init__.py
1
1047
""" Module for GFXprim grabbers. """ # Import the SWIG wrapper from . import c_grabbers from ..utils import extend def extend_grabber(_Grabber): """ Extends _grabber class with convenience methods. Called once on module initialization. """ @extend(_Grabber) def start(self): "Starts frame capture." ...
lgpl-2.1
2,583,483,367,648,174,600
19.94
50
0.665712
false
Korkki/django
tests/template_tests/filter_tests/test_ljust.py
521
1081
from django.template.defaultfilters import ljust from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class LjustTests(SimpleTestCase): @setup({'ljust01': '{% autoescape off %}.{{ a|ljust:"5" }}. .{{ b|ljust:"5" }}.{% endautoescape %}'}) def test_lju...
bsd-3-clause
2,252,148,646,129,663,500
33.870968
105
0.60407
false
torufuru/OFPatchPanel
ryu/contrib/ncclient/operations/flowmon.py
82
1213
# Copyright 2h009 Shikhar Bhushan # # 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
282,429,068,948,492,540
30.102564
76
0.728772
false
wayneicn/crazyflie-clients-python
lib/cfclient/ui/tabs/FlightTab.py
12
18725
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
gpl-2.0
158,203,144,487,032,160
42.648019
98
0.593271
false
lzppp/mylearning
ryu/services/protocols/bgp/operator/commands/show/count.py
52
1840
import logging from ryu.services.protocols.bgp.operator.command import Command from ryu.services.protocols.bgp.operator.command import CommandsResponse from ryu.services.protocols.bgp.operator.command import STATUS_ERROR from ryu.services.protocols.bgp.operator.command import STATUS_OK from ryu.services.protocols.bgp....
apache-2.0
7,353,627,718,090,106,000
33.716981
79
0.599457
false
bop/rango
lib/python2.7/site-packages/django/contrib/localflavor/kw/forms.py
110
2016
""" Kuwait-specific Form helpers """ from __future__ import unicode_literals import re from datetime import date from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field from django.utils.translation import gettext as _ id_re = re.compile(r'^(?P<i...
gpl-2.0
-3,123,143,916,248,102,400
30.015385
111
0.619048
false
toenuff/treadmill
tests/websocket/api/endpoint_test.py
1
2612
""" Unit test for endpoint websocket API. """ import unittest # Disable W0611: Unused import import tests.treadmill_test_deps # pylint: disable=W0611 from treadmill.websocket.api import endpoint class WSEndpointAPITest(unittest.TestCase): """Tests for endpoint websocket API.""" def test_subscribe(self): ...
apache-2.0
-5,999,319,723,826,237,000
25.383838
57
0.405054
false
evelkey/vahun
vahun/Autoencoder_FFNN.py
1
1714
import tensorflow as tf import numpy as np from vahun.autoencoder import Autoencoder class Autoencoder_FFNN(Autoencoder): def create_graph(self): network_weights = self._initialize_weights() self.weights = network_weights self._create_layers() # cost self.cost = ...
apache-2.0
7,831,640,058,610,639,000
41.85
128
0.615519
false
jswope00/GAI
cms/envs/dev_with_worker.py
148
1153
""" This config file follows the dev enviroment, but adds the requirement of a celery worker running in the background to process celery tasks. The worker can be executed using: django_admin.py celery worker """ # We intentionally define lots of variables that aren't used, and # want to import all variables from bas...
agpl-3.0
-9,129,322,508,756,982,000
28.564103
79
0.717259
false
annegabrielle/secure_adhoc_network_ns-3
ns3_source_code/ns-3.10/bindings/python/apidefs/gcc-ILP32/ns3_module_udp_client_server.py
8
11996
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## packet-loss-counter.h: ns3::PacketLossCounter [class] module.add_class('PacketLossCounter') ## udp-client.h: ns3::UdpClient [class] module.add_class(...
gpl-2.0
-1,709,635,464,975,010,800
39.255034
130
0.622541
false
goodwordalchemy/thinkstats_notes_and_exercises
code/chap08ex.py
1
3809
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import thinkstats2 import thinkplot import math import random import numpy as np d...
gpl-3.0
-4,788,261,505,166,880,000
22.658385
71
0.612234
false
legrosbuffle/or-tools
examples/python/map.py
5
3176
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
-8,071,599,193,347,134,000
28.962264
74
0.683564
false
alex/sqlalchemy
test/ext/test_associationproxy.py
2
50005
from sqlalchemy.testing import eq_, assert_raises import copy import pickle from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.orm.collections import collection, attribute_mapped_collection from sqlalchemy.ext.associationproxy import * from sqlalchemy.ext.associationproxy import _AssociationList fro...
mit
1,284,010,139,842,646,800
32.403474
88
0.50063
false
lidiamcfreitas/FenixScheduleMaker
ScheduleMaker/brython/www/tests/test_suite.py
4
6547
# numbers assert 2+2==4 assert (50-5*6)/4 == 5.0 assert 8/4*2 == 4.0 assert 8/5 == 1.6 assert 7//3 == 2 assert 7//-3 == -3 assert 4-2-2 == 0 width=20 height=5*9 assert width*height == 900 x = 6 x += 7+8 assert x == 21 x=y=z=0 assert x==0 assert y==0 assert z==0 # hex, octal, binary literals a=0xaf assert a==175 a=0...
bsd-2-clause
3,767,220,113,240,314,000
16.722071
98
0.586191
false
ncoghlan/dnf
tests/test_comps.py
2
10840
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distribute...
gpl-2.0
-5,458,006,341,911,000,000
41.097276
137
0.634162
false
mnach/suds-py3k
suds/umx/attrlist.py
210
2811
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
lgpl-3.0
3,006,283,730,843,117,600
30.943182
81
0.596585
false
perezg/infoxchange
BASE/lib/python2.7/site-packages/django/contrib/gis/utils/ogrinfo.py
236
1982
""" This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.geometries import GEO_CLASSES def ogrinfo(data_source, num_...
apache-2.0
-7,183,626,429,661,218,000
36.396226
89
0.558022
false
hoosteeno/mozillians
vendor-local/lib/python/south/management/commands/datamigration.py
92
5038
""" Data migration creation command """ from __future__ import print_function import sys import os import re from optparse import make_option try: set except NameError: from sets import Set as set from django.core.management.base import BaseCommand from django.core.management.color import no_style from djan...
bsd-3-clause
-6,671,990,558,064,796,000
35.244604
128
0.620286
false
ael-code/pydirl
test/test_zipped.py
1
1924
import unittest import shutil import tempfile from zipfile import ZipFile from pydirl.app import create_app from . import populate_directory class PydirlZippedTestCase(unittest.TestCase): def setUp(self): self.root = tempfile.mkdtemp(prefix='pydirl_test_') populate_directory(self.root) def t...
gpl-3.0
1,128,534,737,892,170,400
33.357143
67
0.62578
false
farhaanbukhsh/sympy
sympy/physics/optics/gaussopt.py
66
20059
# -*- encoding: utf-8 -*- """ Gaussian optics. The module implements: - Ray transfer matrices for geometrical and gaussian optics. See RayTransferMatrix, GeometricRay and BeamParameter - Conjugation relations for geometrical and gaussian optics. See geometric_conj*, gauss_conj and conjugate_gauss_beams The co...
bsd-3-clause
-187,037,043,098,732,060
21.898402
86
0.544294
false
chand3040/cloud_that
common/test/acceptance/pages/lms/course_nav.py
96
7770
""" Course navigation page object """ import re from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise class CourseNavPage(PageObject): """ Navigate sections and sequences in the courseware. """ url = None def is_browser_on_page(self): return self.q(css='d...
agpl-3.0
4,165,929,345,218,980,400
36.177033
117
0.603861
false
softappeal/yass
py3/yass.py
1
24242
import inspect from collections import OrderedDict from io import StringIO from struct import Struct from enum import Enum from typing import cast, Any, Dict, List, TypeVar, Generic, Optional, Callable, Set def abstract(abstractClass): def newDecorator(abstractNew): def decoratedNew(subClass, *args, **kw...
bsd-3-clause
-1,409,910,280,068,946,000
32.904895
146
0.610263
false
jcftang/ansible
contrib/inventory/fleet.py
56
3069
#!/usr/bin/env python """ fleetctl base external inventory script. Automatically finds the IPs of the booted coreos instances and returns it under the host group 'coreos' """ # Copyright (C) 2014 Andrew Rothstein <andrew.rothstein at gmail.com> # # This program is free software: you can redistribute it and/or modify ...
gpl-3.0
4,567,345,588,357,101,600
27.682243
103
0.64679
false
natsheh/sensim
utils/__init__.py
1
1318
# -*- coding: utf-8 -*- # # This file is part of sensim """Helpers for sentence semantic similarity model. .. Author:: Hussein AL-NATSHEH <hussein.al-natsheh@ish-lyon.cnrs.fr> """ """Helper functions.""" from .util import get_text from .util import group_by_sentence from .util import to_numeric from .util import s...
bsd-3-clause
-451,113,102,149,773,600
25.36
68
0.657056
false
ospalh/libanki3
libanki3/sound.py
1
9284
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <anki@ichi2.net> # Copyright © 2014 Roland Sieker <ospalh@gmail.com> # # License: GNU AGPL, version 3 or later; # http://www.gnu.org/licenses/agpl.html import atexit import os import random import re import subprocess import sys import threading import time from .hook...
agpl-3.0
-1,032,139,549,439,905,700
26.383481
77
0.520737
false
BadSingleton/pyside2
tests/signals/disconnect_test.py
3
1550
import unittest from PySide2.QtCore import * from testbinding import TestObject class Foo(QObject): bar = Signal() class TestDisconnect(unittest.TestCase): def theSlot1(self): self.called1 = True def theSlot2(self): self.called2 = True def testIt(self): self.called1 = False ...
lgpl-2.1
6,261,238,240,642,787,000
26.192982
82
0.610968
false
kennedyshead/home-assistant
homeassistant/components/buienradar/camera.py
1
7518
"""Provide animated GIF loops of Buienradar imagery.""" from __future__ import annotations import asyncio from datetime import datetime, timedelta import logging import aiohttp import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.config_entries import Config...
apache-2.0
-5,864,950,116,038,350,000
32.713004
86
0.630088
false
NickDaly/GemRB-MultipleConfigs
gemrb/GUIScripts/ie_slots.py
11
1707
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2006 The GemRB Project # # 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) ...
gpl-2.0
-4,255,198,549,534,713,300
32.470588
80
0.685413
false
selboo/pyotp
test.py
1
4768
from __future__ import with_statement import datetime import os import sys import unittest sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) import pyotp class HOTPExampleValuesFromTheRFC(unittest.TestCase): def testMatchTheRFC(self): # 12345678901234567890 in Bas32 ...
mit
-2,640,270,731,817,542,700
36.451613
106
0.635696
false
eatbyte/depot_tools
third_party/boto/roboto/param.py
91
4533
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # withou...
bsd-3-clause
-1,849,416,617,918,785,800
29.836735
74
0.596735
false
murrown/cyder
vendor-local/src/django-tastypie/tastypie/utils/mime.py
27
1763
import mimeparse def determine_format(request, serializer, default_format='application/json'): """ Tries to "smartly" determine which output format is desired. First attempts to find a ``format`` override from the request and supplies that if found. If no request format was demanded, it ...
bsd-3-clause
-9,013,826,005,157,744,000
34.979592
80
0.650596
false
Lilykos/invenio
invenio/modules/workflows/tasks/simplified_data_tasks.py
21
1341
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 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; either version 2 of the # License, or (at your option) any l...
gpl-2.0
-7,761,550,720,458,616,000
33.384615
74
0.675615
false
ghbenjamin/TestingGui
TestingGui/RunDialog.py
1
2433
import wx from RunManager import RunManager import StringMap class RunDialog ( wx.Dialog ): def __init__( self, parent, tests ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 400, 300 ), style = wx.DEFAULT_DIALOG_STYLE ) self.initUI() ...
mit
6,592,207,019,348,755,000
27.290698
164
0.702014
false
russomi/slask-app
vendor.py
142
2812
# # Copyright 2014 Jon Wayne Parrott, [proppy], Michael R. Bernstein # # 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 ...
apache-2.0
-6,815,677,352,858,599,000
38.605634
85
0.713371
false
jdgwartney/meter-plugin-sdk-python
meterplugin/exec_proc.py
2
1802
# Copyright 2014 Boundary, 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
6,179,829,950,602,083,000
28.064516
75
0.609878
false
LodewijkSikkel/paparazzi
sw/ground_segment/python/dashboard/radiowatchframe.py
2
2295
import wx import sys import os import time import threading import math import pynotify import pygame.mixer sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/ext/pprzlink/lib/v1.0/python") from ivy_msg_interface import IvyMessagesInterface WIDTH = 150 HEIGHT = 40 UPDATE_INTERVAL = 250 class RadioWatchFrame(wx.Fr...
gpl-2.0
6,238,444,451,883,384,000
29.6
82
0.606972
false
yongtang/tensorflow
tensorflow/python/kernel_tests/sparse_conditional_accumulator_test.py
14
27252
# 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
-2,384,152,316,934,700,000
37.820513
80
0.603332
false
snailwalker/v2ex
html5lib/filters/inject_meta_charset.py
101
2665
import _base class Filter(_base.Filter): def __init__(self, source, encoding): _base.Filter.__init__(self, source) self.encoding = encoding def __iter__(self): state = "pre_head" meta_found = (self.encoding is None) pending = [] for token in _base.Filter.__iter...
bsd-3-clause
3,928,439,008,889,032,000
41.983871
103
0.428518
false
TeamEOS/external_chromium_org
chrome/common/extensions/docs/server2/blob_reference_store.py
146
1119
# 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. from appengine_wrappers import db from appengine_wrappers import BlobReferenceProperty BLOB_REFERENCE_BLOBSTORE = 'BlobReferenceBlobstore' class _Model...
bsd-3-clause
-2,951,807,021,534,870,000
28.447368
77
0.698838
false
DMLoy/ECommerceBasic
lib/python2.7/site-packages/pip/log.py
143
6371
"""Logging """ import sys import logging from pip import backwardcompat class Logger(object): """ Logging object for use in command-line script. Allows ranges of levels, to avoid some redundancy of displayed information. """ VERBOSE_DEBUG = logging.DEBUG - 1 DEBUG = logging.DEBUG INFO =...
mit
-3,820,830,513,121,989,000
33.069519
88
0.522681
false
hainn8x/pybombs
RPCPybombs.py
9
3556
#!/usr/bin/env python2 # # Copyright 2013 Tim O'Shea # # This file is part of PyBOMBS # # PyBOMBS 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. # # ...
gpl-3.0
4,261,523,137,200,614,400
35.285714
95
0.593926
false
Bismarrck/tensorflow
tensorflow/python/kernel_tests/record_input_test.py
6
6155
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
2,821,673,657,536,246,300
32.27027
80
0.614785
false
ftrain/django-ftrain
dotcom/models.py
1
5083
from django.db import models from django.conf import settings from datetime import datetime import time, random # Adapted from the custom XSLT Ftrain.com, written from 1998-2005. # This is not promoted as the right, or even a good, way to program a # CMS--it's a distillation of custom code in Perl, PHP, and XSLT/Java...
bsd-3-clause
-2,506,108,341,846,447,000
34.298611
88
0.616565
false
lexqt/django-pipeline
tests/tests/test_glob.py
6
3671
from __future__ import unicode_literals import os import shutil from django.core.files.base import ContentFile from django.core.files.storage import FileSystemStorage from django.test import TestCase from pipeline import glob def local_path(path): return os.path.join(os.path.dirname(__file__), path) class Gl...
mit
-643,209,136,833,199,600
35.346535
80
0.571779
false
rowinggolfer/openmolar2
src/lib_openmolar/admin/qt4/classes/known_server_widget.py
1
7038
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ## ## ...
gpl-3.0
5,030,589,574,544,050,000
31.88785
79
0.546888
false
sanjuro/RCJK
vendor/django/utils/module_loading.py
112
2190
import imp import os import sys def module_has_submodule(package, module_name): """See if 'module' is in 'package'.""" name = ".".join([package.__name__, module_name]) if name in sys.modules: return True for finder in sys.meta_path: if finder.find_module(name): return True ...
apache-2.0
-6,879,464,815,299,444,000
35.5
77
0.456164
false
theheros/kbengine
demo/res/scripts/common/KBEDebug.py
2
1307
# -*- coding: utf-8 -*- import sys def getClassName(frame): try: # 取得目前工作在实例 self = f.f_locals[ 'self' ].__class__ try: # 只有内置的class类型才有这个属性 __mro__, 比如tuple, object等 mro = self.__mro__ except AttributeError: stack = [self] mro = [] while stack: curr = stack.pop(0) mro....
lgpl-3.0
-4,084,754,120,841,676,300
18.416667
71
0.560916
false
rwth-ti/gr-ofdm
python/ofdm/qa_channel_estimator_02.py
1
1295
#!/usr/bin/env python # # Copyright 2014 Institute for Theoretical Information Technology, # RWTH Aachen University # www.ti.rwth-aachen.de # # This 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 S...
gpl-3.0
7,302,757,215,390,036,000
30.585366
75
0.690347
false
dmillington/ansible-modules-core
network/nxos/nxos_acl.py
19
26908
#!/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,523,366,382,736,275,500
32.137931
84
0.547124
false
chronicwaffle/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/SelfTest/Hash/test_SHA1.py
2
2289
# -*- coding: utf-8 -*- # # SelfTest/Hash/SHA1.py: Self-test for the SHA-1 hash function # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedicati...
mit
-2,555,270,811,722,125,000
35.919355
69
0.65924
false
jeremiedecock/snippets
python/pyserial/read.py
1
2181
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jeremie Decock (http://www.jdhp.org) # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. ...
mit
-7,146,173,273,750,173,000
37.946429
161
0.65016
false
evandromr/python_scitools
plotperiodogram.py
1
1814
#!/bin/env python import numpy as np import scipy.signal as ss import astropy.io.fits as fits import matplotlib.pyplot as plt inpt = str(raw_input("Nome do Arquivo: ")) lc = fits.open(inpt) bin = float(raw_input("bin size (or camera resolution): ")) # Convert to big-endian array is necessary to the lombscargle func...
mit
8,216,161,845,557,475,000
25.289855
95
0.645535
false