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
grantsewell/nzbToMedia
libs/unidecode/x082.py
252
4649
data = ( 'Yao ', # 0x00 'Yu ', # 0x01 'Chong ', # 0x02 'Xi ', # 0x03 'Xi ', # 0x04 'Jiu ', # 0x05 'Yu ', # 0x06 'Yu ', # 0x07 'Xing ', # 0x08 'Ju ', # 0x09 'Jiu ', # 0x0a 'Xin ', # 0x0b 'She ', # 0x0c 'She ', # 0x0d 'Yadoru ', # 0x0e 'Jiu ', # 0x0f 'Shi ', # 0x10 'Tan ...
gpl-3.0
-1,827,297,418,165,924,900
17.01938
20
0.390191
false
s0enke/boto
boto/exception.py
117
17106
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # 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 without res...
mit
-6,589,614,208,402,237,000
28.853403
87
0.614404
false
j4s0nh4ck/you-get
src/you_get/extractors/ehow.py
20
1099
#!/usr/bin/env python __all__ = ['ehow_download'] from ..common import * def ehow_download(url, output_dir = '.', merge = True, info_only = False): assert re.search(r'http://www.ehow.com/video_', url), "URL you entered is not supported" html = get_html(url) contentid = r1(r'<meta name="contentid" scheme="DMINS...
mit
-7,793,249,044,918,545,000
27.947368
93
0.680619
false
Yelp/paasta
setup.py
1
5208
#!/usr/bin/env python # Copyright 2015-2016 Yelp 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 ...
apache-2.0
-3,272,263,591,176,207,400
45.5
107
0.682796
false
ahmed-mahran/hue
desktop/core/ext-py/Pygments-1.3.1/pygments/formatters/terminal.py
75
4012
# -*- coding: utf-8 -*- """ pygments.formatters.terminal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for terminal output with ANSI sequences. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pyg...
apache-2.0
-2,827,566,433,296,070,000
35.807339
79
0.54337
false
nrsimha/wagtail
wagtail/wagtailimages/rich_text.py
9
1466
from wagtail.wagtailimages.models import get_image_model from wagtail.wagtailimages.formats import get_image_format class ImageEmbedHandler(object): """ ImageEmbedHandler will be invoked whenever we encounter an element in HTML content with an attribute of data-embedtype="image". The resulting element in ...
bsd-3-clause
345,756,464,383,440,830
33.904762
86
0.615962
false
WhireCrow/openwrt-mt7620
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/fpformat.py
322
4699
"""General floating point formatting functions. Functions: fix(x, digits_behind) sci(x, digits_behind) Each takes a number or a string and a number of digits as arguments. Parameters: x: number to be formatted; or a string resembling a number digits_behind: number of digits behind the decimal point """ f...
gpl-2.0
3,394,050,482,289,884,700
31.406897
76
0.57608
false
gautamMalu/rootfs_xen_arndale
usr/lib/python3/dist-packages/dbus/mainloop/glib.py
10
1773
# Copyright (C) 2004 Anders Carlsson # Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/> # Copyright (C) 2005-2006 Collabora Ltd. <http://www.collabora.co.uk/> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Softw...
gpl-2.0
4,866,839,379,932,341,000
42.243902
74
0.748449
false
traveloka/ansible
lib/ansible/modules/cloud/rackspace/rax_keypair.py
50
5128
#!/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 distributed...
gpl-3.0
-8,319,619,266,170,348,000
27.488889
75
0.614275
false
PetePriority/home-assistant
homeassistant/components/xiaomi_aqara/binary_sensor.py
3
17451
"""Support for Xiaomi aqara binary sensors.""" import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.components.xiaomi_aqara import (PY_XIAOMI_GATEWAY, XiaomiDevice) from homeassistant.core import callback from homeass...
apache-2.0
-1,792,327,147,663,880,000
34.325911
78
0.528738
false
Lyleo/nupic
nupic/datafiles/extra/firstOrder/raw/makeDataset.py
17
3488
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
gpl-3.0
4,705,039,321,854,961,000
32.538462
89
0.629874
false
kxliugang/edx-platform
common/lib/capa/capa/tests/test_hint_functionality.py
41
34139
# -*- coding: utf-8 -*- """ Tests of extended hints """ import unittest from ddt import ddt, data, unpack # With the use of ddt, some of the data expected_string cases below are naturally long stretches # of text text without whitespace. I think it's best to leave such lines intact # in the test code. Therefore: # ...
agpl-3.0
4,464,286,818,915,529,000
62.090573
439
0.614936
false
Esri/executive-dashboard
ExecutiveReportingScript/arcrest/webmap/renderer.py
6
5241
from __future__ import absolute_import from __future__ import print_function from .._abstract.abstract import BaseRenderer import json ######################################################################## class SimpleRenderer(BaseRenderer): """ A simple renderer is a renderer that uses one symbol only. The type...
apache-2.0
-1,773,925,026,866,336,800
34.174497
75
0.487693
false
jhaux/tensorflow
tensorflow/python/client/client_lib.py
111
1698
# 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,982,769,063,421,749,000
29.321429
80
0.759717
false
itai12312/workspaces
hellodjango/venv/lib/python2.7/site-packages/django/utils/http.py
35
8435
from __future__ import unicode_literals import calendar import datetime import re import sys try: from urllib import parse as urllib_parse except ImportError: # Python 2 import urllib as urllib_parse import urlparse urllib_parse.urlparse = urlparse.urlparse from email.utils import formatdate fro...
gpl-2.0
8,264,150,456,334,422,000
33.855372
84
0.637937
false
zjutjsj1004/third
boost/tools/build/src/util/set.py
1
1486
# (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and # distribute this software is granted provided this copyright notice appears in # all copies. This software is provided "as is" without express or implied # warranty, and with no claim as to its suitability for any purpose. from b2...
mit
253,651,022,869,154,020
27.72
92
0.617093
false
krattai/noo-ebs
docs/zeroMQ-guide2/examples/Python/kvmsg.py
1
4388
""" ===================================================================== kvmsg - key-value message class for example applications Author: Min RK <benjaminrk@gmail.com> """ import struct # for packing integers import sys from uuid import uuid4 import zmq # zmq.jsonapi ensures bytes, instead of unicode: import zmq.u...
bsd-2-clause
7,135,120,706,968,045,000
28.456376
89
0.569508
false
bkrukowski/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/find_files.py
181
3872
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
5,641,598,151,147,127,000
45.095238
147
0.746643
false
ToonTownInfiniteRepo/ToontownInfinite
Panda3D-1.9.0/python/Tools/Scripts/pathfix.py
66
4329
#! /usr/bin/env python # Change the #! line occurring in Python scripts. The new interpreter # pathname must be given with a -i option. # # Command line arguments are files or directories to be processed. # Directories are searched recursively for files whose name looks # like a python module. # Symbolic links are al...
mit
-8,844,020,723,375,267,000
28.053691
70
0.595288
false
MaxPoint/bayes_logistic
bayes_logistic/bayes_logistic.py
2
19650
# Copyright (c) 2015 MaxPoint Interactive, 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: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditi...
bsd-3-clause
4,326,502,064,166,138,400
35.187845
122
0.627583
false
Cinntax/home-assistant
homeassistant/components/stream/hls.py
1
3398
"""Provide functionality to stream HLS.""" from aiohttp import web from homeassistant.core import callback from homeassistant.util.dt import utcnow from .const import FORMAT_CONTENT_TYPE from .core import StreamView, StreamOutput, PROVIDERS @callback def async_setup_hls(hass): """Set up api endpoints.""" ha...
apache-2.0
3,944,976,066,007,308,300
26.852459
85
0.59123
false
hcsturix74/django
tests/gis_tests/geos_tests/test_io.py
282
3918
from __future__ import unicode_literals import binascii import unittest from unittest import skipUnless from django.contrib.gis.geos import ( HAS_GEOS, GEOSGeometry, WKBReader, WKBWriter, WKTReader, WKTWriter, ) from django.utils.six import memoryview @skipUnless(HAS_GEOS, "Geos is required.") class GEOSIOTest(...
bsd-3-clause
8,529,692,043,066,229,000
34.297297
90
0.633231
false
rjschwei/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/models/win_rm_listener.py
1
1321
# 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 ...
mit
-569,361,415,192,360,770
37.852941
79
0.622256
false
mferenca/HMS-ecommerce
ecommerce/extensions/dashboard/orders/views.py
1
3461
from django.contrib import messages from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from oscar.apps.dashboard.orders.views import ( OrderListView as CoreOrderListView, OrderDetailView as CoreOrderDetailView ) from osc...
agpl-3.0
-1,514,523,753,496,620,500
42.2625
118
0.663103
false
rosswhitfield/mantid
Framework/PythonInterface/mantid/plots/resampling_image/samplingimage.py
3
10843
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2020 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
gpl-3.0
8,601,503,731,573,481,000
38.572993
117
0.545052
false
mrquim/repository.mrquim
script.module.schism.common/lib/requests/packages/urllib3/contrib/appengine.py
224
10865
""" This module provides a pool manager that uses Google App Engine's `URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_. Example usage:: from urllib3 import PoolManager from urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox if is_appengine_sandbox(): ...
gpl-2.0
3,361,181,563,194,577,000
35.706081
96
0.628072
false
vuchau/ansible
lib/ansible/inventory/vars_plugins/noop.py
317
1632
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2014, Serge van Ginderachter <serge@vanginderachter.be> # # 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 Foundat...
gpl-3.0
-1,120,924,675,314,709,100
31.64
79
0.683824
false
nhenezi/kuma
vendor/packages/pyparsing/examples/sparser.py
16
13196
#!/usr/bin/env python """ NAME: sparser.py SYNOPSIS: sparser.py [options] filename DESCRIPTION: The sparser.py script is a Specified PARSER. It is unique (as far as I can tell) because it doesn't care about the delimiter(s). The user specifies what is expected, and the order, for ...
mpl-2.0
-1,991,065,526,212,388,000
34.153425
80
0.514323
false
dbfr3qs/moto
tests/test_ec2/test_spot_instances.py
11
9152
from __future__ import unicode_literals from nose.tools import assert_raises import datetime import boto import boto3 from boto.exception import EC2ResponseError from botocore.exceptions import ClientError import pytz import sure # noqa from moto import mock_ec2, mock_ec2_deprecated from moto.backends import get_mod...
apache-2.0
-1,760,716,982,439,585,300
33.149254
147
0.64292
false
LLNL/spack
var/spack/repos/builtin/packages/py-csvkit/package.py
5
1739
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyCsvkit(PythonPackage): """A library of utilities for working with CSV, the king of tabul...
lgpl-2.1
-2,445,207,249,556,002,000
53.34375
95
0.608971
false
yiakwy/numpy
tools/swig/test/testSuperTensor.py
100
16492
#! /usr/bin/env python from __future__ import division # System imports from distutils.util import get_platform from math import sqrt import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = Type...
bsd-3-clause
5,269,493,086,502,433,000
41.505155
118
0.565365
false
cala/portaltbc
dep/libmpq/bindings/python/mpq.py
501
10430
"""wrapper for libmpq""" # 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 distributed in the hope th...
gpl-2.0
-2,264,022,977,074,431,500
31.391304
79
0.56232
false
lampwins/netbox
netbox/ipam/api/views.py
1
11245
from django.conf import settings from django.db.models import Count from django.shortcuts import get_object_or_404 from rest_framework import status from rest_framework.decorators import action from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response from extras.api.views imp...
apache-2.0
-5,679,642,878,907,050,000
35.274194
118
0.596443
false
kit-cel/wt
nt2/modulation_pulsformung/Spektren_digitale_Modulation.py
1
2940
# -*- coding: utf-8 -*- """ Created on Wed Aug 13 10:31:13 2014 NTII Demo - Quellencodierung - Auswirkungen auf Spektrum des Sendesignals Systemmodell: Quelle --> QPSK --> Pulsformung @author: Michael Schwall """ from __future__ import division import numpy as np import matplotlib.pylab as plt import scipy.signal a...
gpl-2.0
-8,960,033,279,247,890,000
25.486486
116
0.52585
false
314ish/StudbookToolkit
GTT/SPARKS.py
1
1270
from dbfread import DBF class SPARKSReader: """These objects can be used to read SPARKS formatted files. SPARKS uses the dBase format for data storage For more information on SPARKS see http://www2.isis.org/support/SPARKS/Pages/home.aspx For more information on dBase see https://en.wikipedia.org...
mit
5,157,971,634,103,487,000
25.458333
79
0.608661
false
pombredanne/1trillioneuros
libs/relevance/__init__.py
3
1449
#!/usr/bin/env python # Encoding: utf-8 # ----------------------------------------------------------------------------- # Project : OKF - Spending Stories # ----------------------------------------------------------------------------- # Author : Edouard Richard <edou4rd@gmail.com> # ---...
gpl-3.0
-4,150,838,082,147,942,400
44.28125
79
0.509317
false
pauloricardomg/cassandra-dtest
fqltool_test.py
6
6364
import pytest import logging import os import subprocess import tempfile from dtest import Tester from shutil import rmtree since = pytest.mark.since logger = logging.getLogger(__name__) @since('4.0') class TestFQLTool(Tester): """ Makes sure fqltool replay and fqltool compare work @jira_ticket CASSANDR...
apache-2.0
-3,819,239,366,997,937,000
39.025157
95
0.588938
false
rooi/CouchPotatoServer
libs/pyutil/test/out_of_shape/test_strutil.py
106
1713
#!/usr/bin/env python # Copyright (c) 2004-2009 Zooko "Zooko" Wilcox-O'Hearn # This file is part of pyutil; see README.rst for licensing terms. import unittest from pyutil.assertutil import _assert from pyutil import strutil class Teststrutil(unittest.TestCase): def test_short_input(self): self.failUnl...
gpl-3.0
380,719,847,886,831,940
56.1
150
0.638062
false
sirex/Misago
misago/core/tests/test_migrationutils.py
8
1103
from django.apps import apps from django.test import TestCase from misago.core import migrationutils from misago.core.models import CacheVersion class CacheBusterUtilsTests(TestCase): def test_cachebuster_register_cache(self): """ cachebuster_register_cache registers cache on migration successful...
gpl-2.0
4,655,710,105,555,687,000
34.580645
76
0.710789
false
luuvish/libvio
script/test/model/__init__.py
1
6065
# -*- coding: utf-8 -*- ''' ================================================================================ This confidential and proprietary software may be used only as authorized by a licensing agreement from Thumb o'Cat Inc. In the event of publication, the following notice is applicable: Copyright (C...
mit
-1,093,440,940,457,488,400
28.158654
95
0.535697
false
yavalvas/yav_com
build/matplotlib/doc/mpl_examples/pylab_examples/toggle_images.py
12
1277
#!/usr/bin/env python """ toggle between two images by pressing "t" The basic idea is to load two images (they can be different shapes) and plot them to the same axes with hold "on". Then, toggle the visible property of them using keypress event handling If you want two images with different shapes to be plotted wit...
mit
-2,291,458,851,836,220,000
28.022727
76
0.722005
false
marratj/ansible
lib/ansible/plugins/terminal/dellos6.py
18
2789
# 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distri...
gpl-3.0
-1,420,981,539,664,300,000
36.689189
126
0.628899
false
2014c2g12/c2g12
c2wp/wsgi/static/Brython2.1.0-20140419-113919/Lib/re.py
54
11411
# # Copyright (c) 2014 Olemis Lang. All rights reserved. # # Choose either Javascript (faster) or Python engine based on regex complexity # with a noticeable preference for the former. # r"""Support for regular expressions (RE). This module provides regular expression matching operations similar to those found in Pe...
gpl-2.0
-6,828,986,926,551,470,000
43.74902
79
0.656472
false
LingxiaoShawn/Shawn-fusion2017
lib/werkzeug/contrib/fixers.py
464
9949
# -*- coding: utf-8 -*- """ werkzeug.contrib.fixers ~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module includes various helpers that fix bugs in web servers. They may be necessary for some versions of a buggy web server but not others. We try to stay updated with the status of the bug...
apache-2.0
533,639,904,456,775,500
39.77459
82
0.625792
false
nvoron23/socialite
jython/Lib/test/test_closuregen.py
24
1235
"""Jython bug with cell variables and yield""" from __future__ import generators def single_closure_single_value(): value = 0 a_closure = lambda : value yield a_closure() yield a_closure() def single_closure_multiple_values(): value = 0 a_closure = lambda : value yield a_closure() valu...
apache-2.0
-597,127,672,516,855,300
23.215686
64
0.587854
false
variablehair/Eggplantato
cogs/productivity.py
1
14184
import discord from discord.ext import commands import sqlite3 from cogs.utils import errors from ast import literal_eval import re import datetime import aiohttp from urllib.parse import parse_qs from lxml import etree # Google functions are copied from RoboDanny, accessed on April 6, 2017. https://github....
mit
1,983,462,240,837,057,800
31.695962
140
0.616822
false
bob-white/UnityIronPythonConsole
Assets/IronPythonConsole/Plugins/Lib/zipfile.py
81
54020
""" Read and write ZIP files. """ import struct, os, time, sys, shutil import binascii, cStringIO, stat import io import re try: import zlib # We may need its compression method crc32 = zlib.crc32 except ImportError: zlib = None crc32 = binascii.crc32 __all__ = ["BadZipfile", "error", "ZIP_STORED", "Z...
mpl-2.0
-4,242,678,457,800,287,000
36.592206
103
0.555091
false
gioman/QGIS
python/plugins/processing/algs/saga/SagaAlgorithmProvider.py
2
5490
# -*- coding: utf-8 -*- """ *************************************************************************** SagaAlgorithmProvider.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************...
gpl-2.0
-1,666,347,930,441,016,800
39.970149
129
0.543169
false
sidhujag/devcoin093
share/qt/extract_strings_qt.py
321
1873
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' for...
mit
-1,139,222,108,549,046,300
23.012821
80
0.578217
false
asimshankar/tensorflow
tensorflow/contrib/cluster_resolver/cluster_resolver_initialization_test.py
14
2135
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
-513,559,722,014,824,640
39.283019
84
0.709602
false
rlefevre1/hpp-rbprm-corba
script/scenarios/demos/siggraph_asia/plan_execute.py
10
2981
from hpp.corbaserver.rbprm.rbprmbuilder import Builder from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.gepetto import Viewer import time from hpp.corbaserver.rbprm.tools.cwc_trajectory_helper import step, clean,stats, saveAllData, play_traj from hpp.gepetto import PathPlayer def act(i, numOptim = 0...
lgpl-3.0
-7,302,330,887,147,135,000
27.122642
178
0.70312
false
fermuch/PokemonGo-Bot
pokemongo_bot/metrics.py
10
4952
import time from datetime import timedelta class Metrics(object): def __init__(self, bot): self.bot = bot self.start_time = time.time() self.dust = {'start': None, 'latest': None} self.xp = {'start': None, 'latest': None} self.distance = {'start': None, 'latest': None} ...
gpl-3.0
-5,262,382,501,267,341,000
42.823009
116
0.555533
false
Liyier/learning_log
env/Lib/site-packages/django/conf/locale/pt_BR/formats.py
504
1434
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = '...
mit
9,131,077,456,077,068,000
38.805556
90
0.558269
false
chongtianfeiyu/kbengine
kbe/res/scripts/common/Lib/test/test_getpass.py
97
6437
import getpass import os import unittest from io import BytesIO, StringIO, TextIOWrapper from unittest import mock from test import support try: import termios except ImportError: termios = None try: import pwd except ImportError: pwd = None @mock.patch('os.environ') class GetpassGetuserTest(unittest....
lgpl-3.0
6,492,889,030,699,983,000
38.453988
79
0.602861
false
denik/vwoptimize
vwoptimizelib/third_party/networkx/algorithms/bipartite/basic.py
32
6070
# -*- coding: utf-8 -*- """ ========================== Bipartite Graph Algorithms ========================== """ # Copyright (C) 2013-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx...
mit
3,557,615,093,211,105,300
22.897638
78
0.536573
false
Matty-Downing2169/opencamlib
scripts/voronoi/voronoi_8_scale-test.py
7
6627
import ocl import camvtk import time import vtk import datetime import math import random import numpy as np import gc def drawVertex(myscreen, p, vertexColor, rad=1): myscreen.addActor( camvtk.Sphere( center=(p.x,p.y,p.z), radius=rad, color=vertexColor ) ) def drawEdge(myscreen, e, edgeColor=camvtk.yellow): ...
gpl-3.0
-4,450,914,438,304,293,400
29.399083
104
0.575223
false
paulhayes/fofix
src/Svg.py
2
6963
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire X # # Copyright (C) 2006 Sami Kyöstilä ...
gpl-2.0
-1,157,506,122,447,340,300
32.800971
104
0.561396
false
badlogicmanpreet/nupic
examples/opf/experiments/anomaly/spatial/2field_many_novelAtEnd/description.py
30
15834
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
2,957,362,483,745,656,000
36.880383
92
0.623721
false
KaranToor/MA450
google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/tests/unit/vpc/test_routetable.py
48
20511
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, RouteTable class TestDescribeRouteTables(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return b""" <DescribeRouteTablesResponse xmlns="ht...
apache-2.0
-1,286,190,253,022,579,500
44.988789
99
0.570036
false
esc/pybuilder
src/unittest/python/plugins/python/sonarqube_plugin_tests.py
1
3670
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
apache-2.0
4,561,225,584,113,375,700
40.704545
110
0.678474
false
hydroshare/hydroshare
hs_core/views/serializers.py
1
15076
import json from collections import namedtuple from django.core.urlresolvers import reverse from django.contrib.auth.models import Group, User from rest_framework import serializers from hs_core.hydroshare import utils from hs_core import hydroshare from .utils import validate_json, validate_user, validate_group from ...
bsd-3-clause
6,463,104,856,968,565,000
49.760943
106
0.591603
false
jhawkesworth/ansible
lib/ansible/modules/network/netvisor/pn_role.py
35
6334
#!/usr/bin/python # Copyright: (c) 2018, Pluribus Networks # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['...
gpl-3.0
-16,602,217,102,090,656
25.613445
92
0.593937
false
surfnzdotcom/cvsnt-fork
libxml/python/tests/compareNodes.py
87
1507
#!/usr/bin/python -u import sys import libxml2 # Memory debug specific libxml2.debugMemory(1) # # Testing XML Node comparison and Node hash-value # doc = libxml2.parseDoc("""<root><foo/></root>""") root = doc.getRootElement() # Create two different objects which point to foo foonode1 = root.children foonode2 = root....
gpl-2.0
-765,601,378,357,059,500
29.14
82
0.704048
false
SivilTaram/edx-platform
common/djangoapps/third_party_auth/models.py
7
19981
# -*- coding: utf-8 -*- """ Models used to implement SAML SSO support in third_party_auth (inlcuding Shibboleth support) """ from config_models.models import ConfigurationModel, cache from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django.utils impor...
agpl-3.0
-6,730,590,762,113,479,000
42.817982
120
0.639858
false
ericmjl/bokeh
sphinx/source/docs/user_guide/examples/interaction_callbacks_for_range_update.py
1
1632
import numpy as np from bokeh.layouts import row from bokeh.models import ColumnDataSource, CustomJS, Rect from bokeh.plotting import figure, output_file, show output_file('range_update_callback.html') N = 4000 x = np.random.random(size=N) * 100 y = np.random.random(size=N) * 100 radii = np.random.random(size=N) * ...
bsd-3-clause
269,026,434,572,336,500
31
83
0.639706
false
xujun10110/golismero
thirdparty_libs/django/utils/html.py
78
11180
"""HTML utilities suitable for global use.""" from __future__ import unicode_literals import re import string try: from urllib.parse import quote, unquote, urlsplit, urlunsplit except ImportError: # Python 2 from urllib import quote, unquote from urlparse import urlsplit, urlunsplit from django.utils...
gpl-2.0
7,069,716,072,698,103,000
39.952381
147
0.591592
false
chaluemwut/fbserver
venv/lib/python2.7/site-packages/jinja2/testsuite/ext.py
402
18086
# -*- coding: utf-8 -*- """ jinja2.testsuite.ext ~~~~~~~~~~~~~~~~~~~~ Tests for the extensions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment, DictLoader...
apache-2.0
-6,856,594,468,536,722,000
38.396514
97
0.544655
false
matthewelse/british-informatics-olympiad
2011/q3-upsidedown.py
1
1050
# A solution to the British Informatics Olympiad 2011 Question 3 # Scores 24/24 from __future__ import print_function try: input = raw_input except: pass def number_with_n_digits(n): return 9**(n//2) def nth_with_n_digits(number_of_digits, n): if number_of_digits == 0: return "" if number_of_digits % 2 == 1: ...
mit
-6,917,340,826,105,736,000
22.333333
101
0.651429
false
myjang0507/slte
tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
gpl-2.0
-593,690,749,052,352,500
38.116402
117
0.565805
false
remik/django-page-cms
pages/testproj/test_settings.py
1
5420
# -*- coding: utf-8 -*- # Django test settings for cms project. import os PROJECT_DIR = os.path.dirname(__file__) TEST_PROJ = 'pages.testproj' DEBUG = True USE_TZ = True ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) CACHE_BACKEND = 'locmem:///' MANAGERS = ADMINS DATABASES = { 'default': { ...
bsd-3-clause
-677,724,726,457,283,800
27.082902
88
0.690406
false
HaebinShin/tensorflow
tensorflow/python/kernel_tests/clip_ops_test.py
6
9754
# 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,580,761,221,660,276,700
32.750865
80
0.550441
false
glensc/owncloud-client
admin/win/nsi/l10n/bin/build_locale_nsi.py
12
6085
############################################################################## # # PROJECT: ownCloud v1.0 # LICENSE: See LICENSE in the top level directory # ############################################################################## import collections import os import polib from optparse import OptionPars...
gpl-2.0
4,218,139,049,276,264,400
32.434066
113
0.559901
false
atiqueahmedziad/addons-server
src/olympia/accounts/urls.py
3
1619
from django.conf.urls import include, url from rest_framework.routers import SimpleRouter from rest_framework_nested.routers import NestedSimpleRouter from olympia.bandwagon.views import CollectionAddonViewSet, CollectionViewSet from . import views accounts = SimpleRouter() accounts.register(r'account', views.Acco...
bsd-3-clause
-7,936,732,885,928,994,000
37.547619
77
0.689314
false
ol-loginov/intellij-community
python/lib/Lib/site-packages/django/contrib/syndication/feeds.py
245
1367
from django.contrib.syndication import views from django.core.exceptions import ObjectDoesNotExist import warnings # This is part of the deprecated API from django.contrib.syndication.views import FeedDoesNotExist, add_domain class Feed(views.Feed): """Provided for backwards compatibility.""" def __init__(sel...
apache-2.0
961,640,140,581,728,900
34.973684
101
0.635699
false
DailyActie/Surrogate-Model
01-codes/tensorflow-master/tensorflow/python/framework/dtypes_test.py
1
10625
# Copyright 2015 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...
mit
-6,265,317,340,081,946,000
46.86036
80
0.617412
false
eunchong/build
scripts/slave/recipe_modules/cipd/example.py
1
3427
# Copyright 2015 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. DEPS = [ 'file', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/step', 'cipd', ] def RunSteps(api): ...
bsd-3-clause
7,805,765,115,964,086,000
32.930693
77
0.635249
false
nathanielvarona/airflow
tests/providers/google/ads/transfers/test_ads_to_gcs.py
3
2455
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
3,004,015,969,946,300,000
36.769231
87
0.674134
false
dpac-vlsi/SynchroTrace
src/arch/x86/isa/insts/simd128/integer/data_transfer/__init__.py
91
2388
# Copyright (c) 2007 The Hewlett-Packard Development Company # 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 implemen...
bsd-3-clause
6,213,386,654,715,811,000
49.808511
72
0.778894
false
goldmedal/spark
examples/src/main/python/ml/one_vs_rest_example.py
52
2236
# # 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
-9,018,965,458,473,737,000
32.878788
74
0.723614
false
GenericStudent/home-assistant
homeassistant/components/nws/config_flow.py
10
2946
"""Config flow for National Weather Service (NWS) integration.""" import logging import aiohttp from pynws import SimpleNWS import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE from homeassistant.helpers import ...
apache-2.0
-7,285,548,878,446,906,000
33.658824
85
0.63408
false
mhrivnak/pulp
server/test/unit/server/db/model/test_criteria.py
1
8977
""" Test the pulp.server.db.model.criteria module. """ import unittest from pulp.server import exceptions from pulp.server.db.model import criteria FIELDS = set(('sort', 'skip', 'limit', 'filters', 'fields')) class TestAsDict(unittest.TestCase): def test_empty(self): c = criteria.Criteria() re...
gpl-2.0
-3,886,031,113,554,155,500
31.762774
99
0.648101
false
jyejare/robottelo
tests/foreman/cli/test_puppet.py
1
4056
"""End to end test for Puppet funcionality :Requirement: Puppet :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: Puppet :TestType: Functional :CaseImportance: High :Upstream: No """ import pytest from robottelo.config import settings from robottelo.decorators import run_in_one_thread from robot...
gpl-3.0
-1,292,803,075,519,433,700
33.372881
79
0.66716
false
jolevq/odoopub
addons/l10n_br/__openerp__.py
430
3125
# -*- encoding: utf-8 -*- ############################################################################### # # Copyright (C) 2009 Renato Lima - Akretion # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by th...
agpl-3.0
-7,678,701,675,671,245,000
39.584416
79
0.65248
false
kallewoof/bitcoin
test/lint/lint-files.py
13
8367
#!/usr/bin/env python3 # Copyright (c) 2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ This checks that all files in the repository have correct filenames and permissions """ import os import ...
mit
874,851,253,220,299,300
40.216749
282
0.61145
false
groschovskiy/lerigos_music
Server/API/lib/pkg_resources/_vendor/packaging/_compat.py
901
1253
# Copyright 2014 Donald Stufft # # 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, so...
apache-2.0
-4,214,548,331,290,717,000
30.325
78
0.702314
false
mcking49/apache-flask
Python/Lib/ctypes/test/test_parameters.py
31
6432
import unittest, sys from ctypes.test import need_symbol class SimpleTypesTestCase(unittest.TestCase): def setUp(self): import ctypes try: from _ctypes import set_conversion_mode except ImportError: pass else: self.prev_conv_mode = set_conversion...
mit
8,008,755,104,228,328,000
34.535912
88
0.595771
false
olasitarska/django
tests/unmanaged_models/tests.py
49
2183
from __future__ import unicode_literals from django.db import connection from django.test import TestCase from .models import A01, A02, B01, B02, C01, C02, Unmanaged2, Managed1 class SimpleTests(TestCase): def test_simple(self): """ The main test here is that the all the models can be created w...
bsd-3-clause
8,315,767,131,304,421,000
34.786885
97
0.628951
false
ressu/SickGear
lib/hachoir_parser/container/swf.py
90
15001
""" SWF (Macromedia/Adobe Flash) file parser. Documentation: - Alexis' SWF Reference: http://www.m2osw.com/swf_alexref.html - http://www.half-serious.com/swf/format/ - http://www.anotherbigidea.com/javaswf/ - http://www.gnu.org/software/gnash/ Author: Victor Stinner Creation date: 29 october 2006 """ from li...
gpl-3.0
-675,575,776,458,684,400
36.5025
91
0.580161
false
portableant/open-context-py
opencontext_py/apps/ldata/linkannotations/models.py
1
3000
import hashlib from django.db import models from opencontext_py.apps.ldata.linkentities.models import LinkEntityGeneration # This class stores linked data annotations made on the data contributed to open context class LinkAnnotation(models.Model): # predicates indicating that a subject has an object that is a bro...
gpl-3.0
-5,660,116,949,967,335,000
43.776119
106
0.627333
false
futursolo/FurtherLand
foundation/__init__.py
1
4159
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2015 Futur Solo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
apache-2.0
2,604,364,657,375,265,000
33.371901
79
0.622265
false
ryuunosukeyoshi/PartnerPoi-Bot
lib/youtube_dl/extractor/facebook.py
17
17957
# coding: utf-8 from __future__ import unicode_literals import re import socket from .common import InfoExtractor from ..compat import ( compat_etree_fromstring, compat_http_client, compat_urllib_error, compat_urllib_parse_unquote, compat_urllib_parse_unquote_plus, ) from ..utils import ( clea...
gpl-3.0
8,484,587,579,731,366,000
39.622172
163
0.511445
false
sauloal/cnidaria
scripts/venv/lib/python2.7/encodings/cp864.py
593
33919
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP864.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
mit
252,991,295,260,298,530
48.157971
97
0.607064
false
ESS-LLP/erpnext-medical
erpnext/hotels/doctype/hotel_room_reservation/hotel_room_reservation.py
7
3513
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, json from frappe.model.document import Document from frappe import _ from frappe.utils import date_diff, add_days, flt c...
gpl-3.0
7,554,156,334,298,976,000
31.229358
99
0.684031
false
panaviatornado/hfhom
corrterm/dehn_homology/grid.py
2
7708
# Caltech SURF 2013 # FILE: grid.py # 07.17.13 ''' do stuff with grid diagrams to prepare for CFK^\infty ''' # winding matrix done by rows (consistent with gridlink) # TODO bottom row first??? # TODO only knots no links... from fractions import Fraction import itertools # list(itertools.permutations([1,2,3])) # TOD...
gpl-2.0
-6,500,285,984,916,305,000
34.525346
97
0.546445
false
wangxuan007/flasky
venv/lib/python2.7/site-packages/mako/lookup.py
22
12847
# mako/lookup.py # Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import os import stat import posixpath import re from mako import exceptions, util from mako.templa...
gpl-3.0
-5,850,916,895,609,952,000
34.00545
78
0.577178
false
thomashaw/SecGen
modules/utilities/unix/labtainers/files/Labtainers-master/scripts/gns3/showNet.py
2
1582
#!/usr/bin/env python import sys import os import argparse import json from netaddr import IPNetwork labtainer_dir = os.getenv('LABTAINER_DIR') if labtainer_dir is None: print('Must define LABTAINER_DIR environment variable') exit(1) sys.path.append(os.path.join(labtainer_dir, 'scripts', 'labtainer-student','bi...
gpl-3.0
2,438,728,820,490,160,000
31.958333
105
0.709229
false
zardav/FaceDetection
FaceDetection/temp.py
1
3849
import numpy as np from scipy import ndimage, misc from matplotlib import pyplot as plt import glob from MyViola import MyViolaClassifier from Svm import Svm import funcs def find_face(img, shape, mv): res_i = (0, 0) res_j = (0, 0) res_scl = 1 max_ = 0 scales = np.arange(.2, .35, .025) m, n = ...
gpl-3.0
-5,453,217,242,674,596,000
27.094891
113
0.50013
false
krunal3103/servo
tests/wpt/harness/wptrunner/manifestinclude.py
118
5056
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. """Manifest structure used to store paths that should be included in a test run. The manifest is represented by a tree ...
mpl-2.0
4,475,041,681,250,929,000
34.111111
100
0.582476
false
lapsed/whatbot
requestfinder.py
1
2742
# Request finder import time from mediamonkey import MediaMonkey from what import WhatCD from whatdao import WhatDAO from whatconfig import WhatConfigParser from whatparser import Parser class RequestFinder(): def dump_page(self, filename, page): f = open(filename, 'w') f.write(page) f.close() def find_req...
unlicense
-1,743,930,517,610,258,200
30.883721
101
0.683078
false
jriguera/Diamond
src/collectors/portstat/tests/test_portstat.py
33
2035
from test import CollectorTestCase from test import get_collector_config from mock import call, Mock, patch from unittest import TestCase from diamond.collector import Collector from portstat import get_port_stats, PortStatCollector class PortStatCollectorTestCase(CollectorTestCase): TEST_CONFIG = { '...
mit
8,952,879,685,993,526,000
26.876712
71
0.590172
false