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
h0nIg/ansible-modules-extras
cloud/google/gce_img.py
23
5760
#!/usr/bin/python # Copyright 2015 Google Inc. All Rights Reserved. # # 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 o...
gpl-3.0
7,208,064,137,263,877,000
26.169811
83
0.683333
false
dd00/commandergenius
project/jni/python/src/Lib/test/test_richcmp.py
55
11262
# Tests for rich comparisons import unittest from test import test_support import operator class Number: def __init__(self, x): self.x = x def __lt__(self, other): return self.x < other def __le__(self, other): return self.x <= other def __eq__(self, other): return...
lgpl-2.1
-6,808,104,336,942,220,000
32.517857
83
0.539869
false
madj4ck/ansible
lib/ansible/new_inventory/host.py
236
1551
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
2,247,443,092,952,365,800
29.411765
70
0.643456
false
google-research/lasertagger
run_lasertagger_test.py
3
1196
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # 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
9,144,926,343,302,260,000
28.9
74
0.728261
false
msdx321/android_kernel_samsung_heroXqltechn
lazy-prebuilt/aarch64-linux-android-4.9/share/gdb/python/gdb/command/explore.py
126
26824
# GDB 'explore' command. # Copyright (C) 2012-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any late...
gpl-2.0
1,975,984,108,683,332,000
34.294737
79
0.540262
false
broferek/ansible
test/units/modules/network/fortios/test_fortios_system_sdn_connector.py
21
19557
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
-3,041,521,662,658,648,000
38.993865
142
0.537301
false
ztp-at/RKSV
librksv/test/verification_proxy.py
1
2681
########################################################################### # Copyright 2017 ZT Prentner IT GmbH (www.ztp.at) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either ver...
agpl-3.0
4,877,088,742,678,757,000
32.5125
80
0.568445
false
zmwangx/you-get
src/you_get/extractors/qq_egame.py
2
1652
import re import json from ..common import get_content from ..extractors import VideoExtractor from ..util import log from ..util.strings import unescape_html __all__ = ['qq_egame_download'] class QQEgame(VideoExtractor): stream_types = [ {'id': 'original', 'video_profile': '0', 'container': 'flv'}, ...
mit
-184,731,142,138,083,970
39.292683
106
0.573245
false
joefutrelle/domdb
utils.py
1
1859
def rpad(s,l,pad_string=' '): return s + (pad_string * (l - len(s))) def asciitable(dicts,disp_cols=None,none_msg=None,border=True): """produce an ASCII formatted columnar table from the dicts""" dicts = list(dicts) if not dicts: if none_msg is not None: yield none_msg retur...
mit
-3,412,372,783,714,532,000
34.075472
85
0.568047
false
drnextgis/QGIS
python/plugins/processing/algs/grass7/Grass7Utils.py
1
16129
# -*- coding: utf-8 -*- """ *************************************************************************** GrassUtils.py --------------------- Date : February 2015 Copyright : (C) 2014-2015 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
-5,789,570,239,604,929,000
39.627204
132
0.561473
false
leki75/ansible
lib/ansible/modules/cloud/rackspace/rax_cbs_attachments.py
14
6902
#!/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
-1,151,460,400,165,906,600
29.139738
104
0.597073
false
philotas/enigma2
lib/python/Components/Converter/ServicePosition.py
13
21710
from Converter import Converter from Poll import Poll from enigma import iPlayableService from Components.Element import cached, ElementError from Components.config import config class ServicePosition(Poll, Converter, object): TYPE_LENGTH = 0 TYPE_POSITION = 1 TYPE_REMAINING = 2 TYPE_GAUGE = 3 TYPE_SUMMARY = 4 T...
gpl-2.0
-949,953,025,196,225,400
41.319688
175
0.580516
false
DARKPOP/external_chromium_org
chrome/tools/webforms_extractor.py
185
10187
#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts registration forms from the corresponding HTML files. Used for extracting forms within HTML files. This script is use...
bsd-3-clause
4,252,375,787,807,320,600
39.106299
80
0.60695
false
pyGrowler/Growler
tests/utils.py
2
1128
# # tests/utils # """ Useful functions for all tests """ import asyncio import pytest from growler.aio.http_protocol import GrowlerHTTPProtocol import growler def random_port(): from random import randint return randint(1024, 2**16) @asyncio.coroutine def setup_test_server(unused_tcp_port, event_loop): ...
apache-2.0
2,447,465,477,460,241,000
22.5
85
0.692376
false
nirzari18/Query-Analysis-Application-on-Google-App-Engine
lib/simplejson/decoder.py
132
14721
"""Implementation of JSONDecoder """ from __future__ import absolute_import import re import sys import struct from .compat import fromhex, b, u, text_type, binary_type, PY3, unichr from .scanner import make_scanner, JSONDecodeError def _import_c_scanstring(): try: from ._speedups import scanstring ...
apache-2.0
-8,044,468,768,657,414,000
35.8025
79
0.532233
false
classcat/cctf
cctf/layers/normalization.py
1
5969
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import tensorflow as tf from tensorflow.python.training import moving_averages # masao import cctf #import tflearn from .. import utils from .. import variables as vs def batch_normalization(incoming, beta=0.0, gamma=1.0, epsil...
agpl-3.0
2,546,837,239,059,809,300
38.269737
86
0.582342
false
shin-/compose
compose/cli/verbose_proxy.py
22
1770
from __future__ import absolute_import from __future__ import unicode_literals import functools import logging import pprint from itertools import chain import six def format_call(args, kwargs): args = (repr(a) for a in args) kwargs = ("{0!s}={1!r}".format(*item) for item in six.iteritems(kwargs)) retur...
apache-2.0
-8,928,886,728,567,784,000
28.5
80
0.575706
false
simonwydooghe/ansible
test/units/modules/storage/netapp/test_na_ontap_snapshot.py
38
8659
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit tests ONTAP Ansible module: na_ontap_nvme_snapshot''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch fro...
gpl-3.0
5,452,039,387,822,053,000
37.314159
107
0.608153
false
ajtowns/bitcoin
test/util/bitcoin-util-test.py
59
6594
#!/usr/bin/env python3 # Copyright 2014 BitPay Inc. # Copyright 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test framework for bitcoin utils. Runs automatically during `make check`. Ca...
mit
-8,068,480,639,048,420,000
36.68
125
0.623294
false
TemoaProject/temoa
temoa_model/get_comm_tech.py
1
9277
import sqlite3 import os import sys import getopt import re from collections import OrderedDict def get_tperiods(inp_f): file_ty = re.search(r"(\w+)\.(\w+)\b", inp_f) # Extract the input filename and extension if not file_ty : raise "The file type %s is not recognized." % inp_f elif file_ty.group(2) not in (...
gpl-2.0
7,540,277,114,393,624,000
27.457055
119
0.638137
false
wonjunetai/pulse
features/main.py
1
11431
import json import time from features.features_helpers import create_paths_for_cell_line from features.uniprot_transmem import get_transmembrane_region_features from features.uniprot_ptm import get_postranscriptional_modification_features from features.uniprot_elm_read import get_uniprot_elm_features from features.gene...
mit
5,733,470,211,454,113,000
56.442211
121
0.644038
false
glaubitz/fs-uae-debian
arcade/OpenGL/GL/VERSION/GL_1_2_images.py
9
1587
"""Version 1.2 Image-handling functions Almost all of the 1.2 enhancements are image-handling-related, so this is, most of the 1.2 wrapper code... Note that the functions that manually wrap certain operations are guarded by if simple.functionName checks, so that you can use if functionName to see if the function is a...
gpl-2.0
938,005,508,820,903,800
27.854545
66
0.669187
false
jaimahajan1997/sympy
sympy/printing/jscode.py
17
10902
""" Javascript code printer The JavascriptCodePrinter converts single sympy expressions into single Javascript expressions, using the functions defined in the Javascript Math object where possible. """ from __future__ import print_function, division from sympy.core import S from sympy.codegen.ast import Assignment ...
bsd-3-clause
-8,977,775,939,714,953,000
34.396104
87
0.57494
false
divio/django
tests/template_tests/syntax_tests/test_extends.py
86
15503
from django.test import SimpleTestCase from ..utils import setup inheritance_templates = { 'inheritance01': "1{% block first %}&{% endblock %}3{% block second %}_{% endblock %}", 'inheritance02': "{% extends 'inheritance01' %}" "{% block first %}2{% endblock %}{% block second %}4{% endblo...
bsd-3-clause
2,086,931,300,173,956,000
38.14899
121
0.607495
false
mattias-ohlsson/anaconda
tests/pyanaconda_test/vnc_test.py
2
4102
#!/usr/bin/python import mock import os class VncTest(mock.TestCase): def setUp(self): self.setupModules(["_isys", "block", "logging", "ConfigParser"]) self.fs = mock.DiskIO() import pyanaconda pyanaconda.anaconda_log = mock.Mock() self.OK = 22 import pyanaconda...
gpl-2.0
-2,935,803,873,079,089,000
35.625
84
0.631156
false
SNeuhausen/training_management
models/education_plan/education_plan.py
1
7704
# -*- coding: utf-8 -*- # /############################################################################# # # Stephan Neuhausen. # Copyright (C) 20014-TODAY Stephan Neuhausen iad.de. # # /############################################################################# from datetime import date from openerp import m...
gpl-3.0
-1,053,912,573,318,107,900
35.15493
100
0.623166
false
jezdez/kuma
vendor/packages/translate/convert/po2wordfast.py
25
4112
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2005-2007 Zuza Software Foundation # # This file is part of translate. # # translate 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...
mpl-2.0
-9,140,157,742,357,399,000
37.429907
123
0.687257
false
dongjoon-hyun/spark
python/pyspark/ml/__init__.py
25
1530
# # 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
-898,271,769,885,563,500
45.363636
91
0.751634
false
waidyanatha/sambro-eden
private/templates/EUROSHA/config.py
2
19304
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current from gluon.storage import Storage from s3.s3forms import S3SQLCustomForm, S3SQLInlineComponent, S3SQLInlineCompone...
mit
-822,010,378,834,629,800
33.781982
147
0.53476
false
TaintTrap/platform_external_chromium
net/tools/testserver/xmppserver.py
67
16907
#!/usr/bin/python2.4 # Copyright (c) 2010 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. """A bare-bones and non-compliant XMPP server. Just enough of the protocol is implemented to get it to work with Chrome's sync noti...
bsd-3-clause
-2,555,677,848,919,703,000
31.265267
77
0.66919
false
iandees/all-the-places
locations/spiders/lifetime.py
1
1351
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class LifetimeFitnessSpider(scrapy.Spider): name = "lifetimefitness" allowed_domains = ['lifetime.life'] start_urls = ( 'https://www.lifetime.life/view-all-locations.html', ) def parse(self, res...
mit
-7,733,758,944,532,887,000
31.97561
123
0.57809
false
GuillaumeGomez/servo
tests/wpt/web-platform-tests/webdriver/support/asserts.py
23
2715
# WebDriver specification ID: dfn-error-response-data errors = { "element click intercepted": 400, "element not selectable": 400, "element not interactable": 400, "insecure certificate": 400, "invalid argument": 400, "invalid cookie domain": 400, "invalid coordinates": 400, "invalid elem...
mpl-2.0
6,435,868,599,776,638,000
34.25974
79
0.676243
false
eduNEXT/edx-platform
openedx/core/djangoapps/schedules/migrations/0001_initial.py
3
1385
import django.utils.timezone import model_utils.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('student', '0001_squashed_0031_auto_20200317_1122'), ] operations = [ migrations.CreateModel( name='Schedule', ...
agpl-3.0
-699,718,904,904,229,000
46.758621
157
0.628881
false
TheWardoctor/Wardoctors-repo
script.module.exodus/lib/resources/lib/sources/en/watchfree.py
5
8377
# -*- coding: utf-8 -*- ''' Exodus Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This progra...
apache-2.0
2,834,163,736,857,230,000
42.180412
364
0.52489
false
dudepare/django
tests/m2m_regress/tests.py
273
4695
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six from .models import ( Entry, Line, Post, RegressionModelSplit, SelfRefer, SelfReferChild, SelfReferChildSibling, Tag, TagCollection, Worksheet, ) class M2MRegre...
bsd-3-clause
2,107,127,109,326,109,700
36.862903
97
0.63344
false
jordanemedlock/psychtruths
temboo/Library/Google/Plus/Domains/Media/Insert.py
5
6021
# -*- coding: utf-8 -*- ############################################################################### # # Insert # Adds a new media item to an album. # # 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 use this file exce...
apache-2.0
7,014,719,070,635,491,000
44.270677
255
0.670487
false
kris-singh/pgmpy
pgmpy/base/DirectedGraph.py
3
9379
#!/usr/bin/env python3 import itertools import networkx as nx from pgmpy.base import UndirectedGraph class DirectedGraph(nx.DiGraph): """ Base class for all Directed Graphical Models. Each node in the graph can represent either a random variable, `Factor`, or a cluster of random variables. Edges i...
mit
5,979,829,303,730,616,000
28.586751
87
0.518925
false
MinFu/youtube-dl
youtube_dl/extractor/hypem.py
128
2101
from __future__ import unicode_literals import json import time from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, ) class HypemIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?hypem\.com/track/(?P<id>[^/]+)/...
unlicense
-6,413,875,766,102,206,000
30.358209
95
0.55069
false
hyz1011088/StarCluster
utils/s3mount.py
21
1151
#!/usr/bin/env python import os import sys from starcluster.config import StarClusterConfig print 'Simple wrapper script for s3fs (http://s3fs.googlecode.com/)' cfg = StarClusterConfig().load() ec2 = cfg.get_easy_ec2() buckets = ec2.s3.get_buckets() counter = 0 for bucket in buckets: print "[%d] %s" % (counter,b...
gpl-3.0
4,432,722,771,027,389,400
30.108108
116
0.582971
false
MechanisM/musicdb
contrib/django/core/serializers/base.py
2
5366
""" Module for abstract serializer/unserializer base classes. """ from StringIO import StringIO from django.db import models from django.utils.encoding import smart_unicode class SerializerDoesNotExist(KeyError): """The requested serializer was not found.""" pass class SerializationError(Exception): """...
agpl-3.0
-8,773,941,918,880,716,000
30.751479
102
0.603988
false
RevelSystems/django
django/conf/locale/hu/formats.py
504
1117
# -*- 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 = 'Y. F j.' TIME_FORMAT = 'G.i' DATE...
bsd-3-clause
3,054,225,110,225,006,000
31.823529
77
0.604839
false
emrecamasuvi/appengineTmp
lib/flask/helpers.py
776
33793
# -*- coding: utf-8 -*- """ flask.helpers ~~~~~~~~~~~~~ Implements various helpers. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys import pkgutil import posixpath import mimetypes from time import time from zlib import adler32 from th...
apache-2.0
-4,993,282,996,052,697,000
38.803298
81
0.630338
false
kjschiroo/WikiChatter
test/test_indentblock.py
1
5369
import unittest import wikichatter.indentblock as indentblock import wikichatter.mwparsermod as mwpm EMPTY = "\n" LEVEL0 = "Level 0\n" LEVEL1 = ":Level 1\n" LEVEL2 = "::Level 2\n" LEVEL3 = ":::Level 3\n" LEVEL4 = "::::Level 4\n" LIST1 = "*Level 1\n" LIST2 = "**Level 2\n" LIST3 = "***Level 3\n" LIST4 = "****Level 4\n...
mit
-9,210,680,813,746,144,000
25.579208
60
0.548147
false
sauloal/pycluster
pypy-1.9_64/lib-python/2.7/distutils/tests/test_check.py
14
3546
"""Tests for distutils.command.check.""" import unittest from test.test_support import run_unittest from distutils.command.check import check, HAS_DOCUTILS from distutils.tests import support from distutils.errors import DistutilsSetupError class CheckTestCase(support.LoggingSilencer, support.Temp...
mit
8,594,126,361,010,424,000
34.818182
78
0.576706
false
aferr/TimingCompartments
src/mem/slicc/symbols/State.py
60
1754
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
3,108,453,019,531,228,700
50.588235
72
0.777081
false
htzy/bigfour
lms/djangoapps/courseware/management/commands/export_course.py
62
3095
""" A Django command that exports a course to a tar.gz file. If <filename> is '-', it pipes the file to stdout """ import os import re import shutil import tarfile from tempfile import mktemp, mkdtemp from textwrap import dedent from path import path from django.core.management.base import BaseCommand, CommandErro...
agpl-3.0
1,497,692,776,937,601,300
29.048544
90
0.657512
false
stephanekirsch/e-colle
accueil/views.py
1
8473
#-*- coding: utf-8 -*- from django.http import HttpResponseForbidden, Http404, HttpResponse from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth import logout from django.contrib.auth.decorators import login_required from accueil.models import Classe, Matiere, Colleur, Message, Dest...
agpl-3.0
-153,182,821,385,879,520
44.831522
172
0.746205
false
erdincay/pyload
module/plugins/hoster/EuroshareEu.py
6
2197
# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" __version__ = "0.30" __status__ = "testing" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|...
gpl-3.0
-4,623,037,890,310,080,000
34.387097
116
0.574294
false
sysalexis/kbengine
kbe/res/scripts/common/Lib/test/test_importlib/source/test_source_encoding.py
81
5396
from .. import util from . import util as source_util machinery = util.import_importlib('importlib.machinery') import codecs import importlib.util import re import sys import types # Because sys.path gets essentially blanked, need to have unicodedata already # imported for the parser to use. import unicodedata import...
lgpl-3.0
5,622,177,556,574,542,000
31.70303
83
0.641772
false
Datera/cinder
cinder/tests/unit/volume/drivers/dell_emc/sc/test_fc.py
3
48496
# Copyright (c) 2014 Dell 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 a...
apache-2.0
113,141,114,097,677,780
48.384929
79
0.464698
false
nayomal/bloom
bloom/generators/__init__.py
5
2000
# Software License Agreement (BSD License) # # Copyright (c) 2013, Willow Garage, 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...
bsd-3-clause
-3,984,928,813,110,039,000
42.478261
70
0.7715
false
MikkelSchubert/paleomix
paleomix/nodes/fastqc.py
1
1586
#!/usr/bin/env python3 """ FastQC - A quality control analysis tool for high throughput sequencing data https://github.com/s-andrews/FastQC """ import os import re from paleomix.common.command import AtomicCmd, InputFile, OutputFile from paleomix.common.versions import Requirement from paleomix.node import CommandNod...
mit
-1,665,407,592,755,111,400
29.5
83
0.545397
false
lbartoletti/QGIS
python/plugins/processing/algs/grass7/ext/r_statistics.py
36
2298
# -*- coding: utf-8 -*- """ *************************************************************************** r_statistics.py --------------- Date : September 2017 Copyright : (C) 2017 by Médéric Ribreux Email : medspx at medspx dot fr ***************************...
gpl-2.0
5,256,959,600,569,611,000
41.444444
87
0.561082
false
kevint2u/audio-collector
server/node_modules/binaryjs/node_modules/binarypack/node_modules/buffercursor/node_modules/verror/node_modules/extsprintf/deps/javascriptlint/javascriptlint/util.py
28
4517
# vim: ts=4 sw=4 expandtab import cgi import os.path import re import unittest _identifier = re.compile('^[A-Za-z_$][A-Za-z0-9_$]*$') _contenttypes = ( 'text/javascript', 'text/ecmascript', 'application/javascript', 'application/ecmascript', 'application/x-javascript', ) class JSVersion: def ...
mit
-5,480,281,473,856,276,000
32.708955
103
0.566748
false
yfdyh000/kuma
kuma/core/managers.py
2
6153
"""Extras for django-taggit Includes: - Handle tag namespaces (eg. tech:javascript, profile:interest:homebrewing) TODO: - Permissions for tag namespaces (eg. system:* is superuser-only) - Machine tag assists """ from datetime import date, timedelta from django.db import models from django.db.models.fields import BLA...
mpl-2.0
7,750,946,828,839,546,000
33.960227
78
0.624736
false
erilyth/sugar
src/jarabe/testrunner.py
13
1674
# Copyright (C) 2013, Daniel Narvaez # # 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 i...
gpl-2.0
3,178,866,983,334,097,000
34.617021
78
0.649343
false
psychopy/versions
psychopy/experiment/components/envelopegrating/__init__.py
1
15422
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from __future__ import absolute_import, print_function from builtins import super # provi...
gpl-3.0
-4,578,092,333,961,507,300
49.398693
194
0.567371
false
alown/chromium
crserverlib/server_dispatch_header.py
4
1079
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys sys.path.append( "../glapi_parser" ) import apiutil apiutil.CopyrightC() print """ /* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED BY server_dispatch_header.p...
bsd-3-clause
4,388,132,822,241,963,500
25.317073
131
0.742354
false
UnionEvoRobo/evofab
src/ann_runner.py
1
2802
from printer import Printer from camera import Camera from grid import Grid from vector import Vector from gridworld import GridWorld from ann import Network class AnnRunner(object): """Wraps up the gross reality of running a ``print'' using the printer simulation (controlled by a neural network)""" camera_si...
gpl-2.0
-4,218,987,848,206,655,500
50.888889
424
0.669165
false
globaltoken/globaltoken
test/functional/mempool_limit.py
1
3174
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mempool limiting together/eviction with the wallet.""" from test_framework.test_framework import ...
mit
6,556,133,842,987,770,000
48.59375
131
0.65564
false
enthought/traitsgui
examples/file_node_tree.py
1
2630
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
bsd-3-clause
-4,378,289,933,988,114,400
29.581395
79
0.523194
false
vinchoi/fishplay
flask/lib/python2.7/site-packages/setuptools/ssl_support.py
100
8119
import os import socket import atexit import re from setuptools.extern.six.moves import urllib, http_client, map import pkg_resources from pkg_resources import ResolutionError, ExtractionError try: import ssl except ImportError: ssl = None __all__ = [ 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_avail...
gpl-3.0
-6,532,622,208,705,187,000
32.411523
82
0.595024
false
with-git/tensorflow
tensorflow/contrib/keras/api/keras/activations/__init__.py
11
1882
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
1,427,858,077,124,444,200
44.902439
80
0.782147
false
pdellaert/ansible
lib/ansible/modules/cloud/hcloud/hcloud_server_type_info.py
21
5682
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de> # 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 = { "met...
gpl-3.0
-4,546,811,383,487,072,000
29.385027
145
0.580605
false
thulasi-ram/django-feature-toggle
docs/conf.py
1
5358
# -*- coding: utf-8 -*- # # Feature Toggle documentation build configuration file, created by # sphinx-quickstart on Thu Sep 7 17:35:12 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
gpl-3.0
6,447,481,646,597,982,000
29.617143
81
0.673946
false
marvinpinto/charlesbot-rundeck
charlesbot_rundeck/http.py
1
1032
import asyncio import aiohttp import logging log = logging.getLogger(__name__) @asyncio.coroutine def http_post_request(url, headers): # pragma: no cover response = yield from aiohttp.post(url, headers=headers) if not response.status == 200: text = yield from response.text() log.error("URL: %...
mit
3,398,819,411,319,134,000
31.25
74
0.641473
false
68foxboris/enigma2-openpli-vuplus
lib/python/Screens/Menu.py
6
13944
from Screen import Screen from Screens.MessageBox import MessageBox from Screens.ParentalControlSetup import ProtectedScreen from Components.Sources.List import List from Components.ActionMap import NumberActionMap, ActionMap from Components.Sources.StaticText import StaticText from Components.config import configfile ...
gpl-2.0
8,475,415,589,029,347,000
30.125
141
0.684022
false
elingg/tensorflow
tensorflow/contrib/tensor_forest/client/__init__.py
164
1043
# 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,657,751,034,958,576,000
44.347826
80
0.718121
false
azunite/chrome_build
tests/gclient_utils_test.py
44
7351
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import StringIO import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from testing...
bsd-3-clause
1,080,130,835,526,816,100
34.341346
80
0.621956
false
anryko/ansible
lib/ansible/modules/cloud/azure/azure_rm_mariadbfirewallrule.py
40
9856
#!/usr/bin/python # # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com> # Copyright (c) 2019 Matti Ranta, (@techknowlogick) # # 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 AN...
gpl-3.0
-4,423,914,319,902,104,000
34.581227
152
0.567573
false
jramos/p2pool
SOAPpy/GSIServer.py
289
5238
from __future__ import nested_scopes """ GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov> ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (G...
gpl-3.0
8,312,064,694,743,674,000
35.629371
80
0.613402
false
atmark-techno/atmark-dist
user/python/Lib/knee.py
4
3522
"""An Python re-implementation of hierarchical module import. This code is intended to be read, not executed. However, it does work -- all you need to do to enable it is "import knee". (The name is a pun on the klunkier predecessor of this module, "ni".) """ import sys, imp, __builtin__, string # Replacement for...
gpl-2.0
-7,560,908,602,098,218,000
26.952381
73
0.549972
false
google/telluride_decoding
test/scaled_lda_test.py
1
6747
# Copyright 2020 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
-3,103,978,920,472,958,500
34.698413
80
0.615977
false
mrbandrews/bitcoin
qa/rpc-tests/receivedby.py
8
7385
#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listreceivedbyaddress API from test_framework import BitcoinTestFramework from bitcoinrpc.authp...
mit
8,158,783,455,221,258,000
43.487952
139
0.616655
false
ATIX-AG/ansible
lib/ansible/modules/network/interface/net_interface.py
58
3658
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # 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', ...
gpl-3.0
3,942,301,023,897,405,000
25.316547
135
0.663477
false
palmerjh/iEBE
PlayGround/job-2/iSS/for_paraview/lib152/DataSetAttr.py
9
1758
#!/usr/bin/env python """ Copyright 2001 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the LGPL. See http://www.fsf.org NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Revision: 1.1 $ $Date:...
gpl-3.0
-4,663,415,652,427,356,000
30.963636
75
0.564278
false
PierreBizouard/pizco-utils
pizcoutils/helpers/BuildExeStartup.py
1
2974
#------------------------------------------------------------------------------ # BuildExeStartup.py # Initialization script for cx_Freeze which manipulates the path so that the # directory in which the executable is found is searched for extensions but # no other directory is searched. It also sets the attribute...
bsd-3-clause
2,568,392,606,868,377,000
33.404762
97
0.616342
false
pajlada/pajbot
pajbot/apiwrappers/base.py
1
3753
import logging from urllib.parse import quote, urlparse, urlunparse import datetime from requests import Session from pajbot import constants from pajbot.apiwrappers.response_cache import APIResponseCache log = logging.getLogger(__name__) class BaseAPI: def __init__(self, base_url, redis=None): self.b...
mit
-5,506,639,588,589,977,000
36.53
112
0.656009
false
pcabido/socorro
alembic/versions/235c80dc2e12_fixes_bug_1047079_remove_processors_.py
13
2071
"""Fixes bug 1047079 - remove processors, jobs tables Revision ID: 235c80dc2e12 Revises: 556e11f2d00f Create Date: 2014-12-30 13:29:15.108296 """ # revision identifiers, used by Alembic. revision = '235c80dc2e12' down_revision = '556e11f2d00f' from alembic import op from socorro.lib import citexttype, jsontype, bui...
mpl-2.0
4,087,245,662,636,866,600
30.861538
108
0.662482
false
GaetanCambier/CouchPotatoServer
libs/requests/api.py
361
4344
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. Retur...
gpl-3.0
-4,565,407,815,520,076,300
35.2
136
0.668278
false
ASCIT/donut
donut/modules/feedback/helpers.py
2
9848
from donut import email_utils from donut.modules.feedback import email_templates import flask import pymysql.cursors from donut.modules.feedback.groups import groupInt, groupName import donut.modules.groups.helpers as groups import donut.modules.newsgroups.helpers as newsgroups def send_update_email(group, email, com...
mit
-4,923,602,064,571,854,000
33.194444
89
0.648355
false
marc-sensenich/ansible
test/units/plugins/httpapi/test_ftd.py
22
14894
# Copyright (c) 2018 Cisco and/or its affiliates. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
gpl-3.0
-8,765,652,224,979,166,000
45.984227
117
0.639721
false
mferenca/HMS-ecommerce
ecommerce/extensions/api/v2/tests/views/test_products.py
1
7818
from __future__ import unicode_literals import datetime import json import pytz from django.core.urlresolvers import reverse from django.test import RequestFactory from oscar.core.loading import get_model from ecommerce.coupons.tests.mixins import CouponMixin from ecommerce.courses.models import Course from ecommerc...
agpl-3.0
1,074,553,738,677,681,000
43.931034
104
0.664876
false
wenottingham/ansible
lib/ansible/plugins/cache/memory.py
275
1466
# (c) 2014, Brian Coca, Josh Drake, et al # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
8,537,509,876,561,711,000
27.192308
70
0.666439
false
Maximilian-Reuter/SickRage
lib/hachoir_core/i18n.py
86
6241
# -*- coding: UTF-8 -*- """ Functions to manage internationalisation (i18n): - initLocale(): setup locales and install Unicode compatible stdout and stderr ; - getTerminalCharset(): guess terminal charset ; - gettext(text) translate a string to current language. The function always returns Unicode string. You can a...
gpl-3.0
5,393,930,058,155,709,000
28.023364
127
0.647561
false
bestvibes/neo4j-social-network
env/lib/python2.7/encodings/cp875.py
593
13110
""" Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.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_table) def decode(self,input...
mit
-6,321,853,707,885,503,000
41.703583
116
0.535698
false
imsplitbit/nova
nova/exception.py
1
42268
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # 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 compli...
apache-2.0
1,885,499,902,190,757,600
27.559459
79
0.672045
false
qedi-r/home-assistant
homeassistant/components/knx/light.py
3
12148
"""Support for KNX/IP lights.""" from enum import Enum import voluptuous as vol from xknx.devices import Light as XknxLight from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_WHITE_VALUE, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, ...
apache-2.0
2,638,273,227,097,628,000
37.081505
88
0.645291
false
swgillespie/coreclr
src/scripts/genXplatEventing.py
8
31274
# ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. ## See the LICENSE file in the project root for more information. # # #USAGE: #Add Events: modify <root>src/vm/ClrEtwAll.man #Look at the Code in <root>/src/inc/genXplatLttng.py fo...
mit
-3,069,274,019,837,486,000
37.514778
285
0.59615
false
firebitsbr/pwn_plug_sources
src/metagoofil/pdfminer/pdffont.py
32
26471
#!/usr/bin/env python2 import sys import struct try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from cmapdb import CMapDB, CMapParser, FileUnicodeMap, CMap from encodingdb import EncodingDB, name2unicode from psparser import PSStackParser from psparser import PSSyntaxError,...
gpl-3.0
7,434,869,200,181,841,000
36.707977
98
0.540478
false
liorvh/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py
124
2754
# Copyright (C) 2010 Apple Inc. All rights reserved. # 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 ...
bsd-3-clause
366,529,192,794,524,000
41.369231
95
0.737473
false
ArtemTeleshev/raspberrypi-linux
tools/perf/scripts/python/sctop.py
1996
2102
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
651,098,864,098,121,100
25.275
75
0.657945
false
Conjuror/fxos-certsuite
mcts/web-platform-tests/tests/tools/pywebsocket/src/mod_pywebsocket/handshake/hybi.py
139
17070
# Copyright 2012, 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
1,322,489,892,581,806,000
38.241379
79
0.615993
false
openstack/nova
nova/virt/storage_users.py
9
3738
# Copyright 2012 Michael Still and Canonical 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 appl...
apache-2.0
7,174,028,137,702,570,000
35.647059
79
0.651953
false
google-code/android-scripting
python/src/Demo/pysvr/pysvr.py
51
3430
#! /usr/bin/env python """A multi-threaded telnet-like server that gives a Python prompt. This is really a prototype for the same thing in C. Usage: pysvr.py [port] For security reasons, it only accepts requests from the current host. This can still be insecure, but restricts violations from people who can log in o...
apache-2.0
-2,561,494,151,521,315,000
26.66129
75
0.53207
false
aparrish/cashclones
generate.py
1
10326
import rdflib from rdflib import URIRef from rdflib.namespace import RDFS from jinja2 import Template import random import urllib import json import time import re from altuniverse import alternate_universe def get_random_class(g): return random.choice(list(g.subjects(RDFS.subClassOf, None))) def get_label_str...
mit
5,967,689,754,401,846,000
37.674157
90
0.582994
false
PerilousApricot/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/wix.py
61
3563
"""SCons.Tool.wix Tool-specific initialization for wix, the Windows Installer XML Tool. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, ...
apache-2.0
-4,882,959,222,670,390,000
34.989899
98
0.649453
false
lizardsystem/lizard-wbconfiguration
lizard_wbconfiguration/migrations/0003_auto__del_field_dbfconfiguration_filepath__add_field_dbfconfiguration_.py
1
35057
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'DBFConfiguration.filepath' db.delete_column('lizard_wbconfiguration_dbfconfiguration', '...
gpl-3.0
-7,715,278,348,081,904,000
95.31044
240
0.568816
false
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/boto/gs/cors.py
153
7717
# Copyright 2012 Google 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 # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
mit
8,215,219,603,163,938,000
44.662722
80
0.602047
false
kapilrastogi/Impala
tests/comparison/discrepancy_searcher.py
2
33095
#!/usr/bin/env impala-python # Copyright (c) 2014 Cloudera, 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 # # Unles...
apache-2.0
8,082,747,563,557,498,000
40.524467
91
0.650008
false