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
hermantai/sorno-py-scripts
sorno/mathlib.py
1
2471
"""A library for math related things Copyright 2015 Heung Ming Tai 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
-2,402,409,308,476,059,000
27.402299
79
0.617159
false
iwm911/plaso
plaso/parsers/utmpx.py
1
6216
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
apache-2.0
8,046,042,707,812,847,000
29.470588
80
0.660071
false
steeve/plugin.video.pulsar
resources/site-packages/bjsonrpc/request.py
9
6728
""" bjson/request.py Asynchronous Bidirectional JSON-RPC protocol implementation over TCP/IP Copyright (c) 2010 David Martinez Marti All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditio...
bsd-3-clause
-6,765,377,454,528,165,000
34.597884
86
0.608502
false
david-ragazzi/nupic
nupic/research/TP_shim.py
6
3224
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, 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...
gpl-3.0
-4,474,777,136,522,623,500
34.822222
82
0.637097
false
jordanemedlock/psychtruths
temboo/Library/SendGrid/NewsletterAPI/Recipients/GetAttachedRecipientLists.py
5
4071
# -*- coding: utf-8 -*- ############################################################################### # # GetAttachedRecipientLists # Retrieve Recipient Lists attached to a specified newsletter. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the ...
apache-2.0
7,040,928,816,485,411,000
40.540816
179
0.694915
false
kontais/EFI-MIPS
ToolKit/cmds/python/Lib/regex_syntax.py
17
1893
"""Constants for selecting regexp syntaxes for the obsolete regex module. This module is only for backward compatibility. "regex" has now been replaced by the new regular expression module, "re". These bits are passed to regex.set_syntax() to choose among alternative regexp syntaxes. """ # 1 means plain parentheses...
bsd-3-clause
-174,986,317,348,054,080
34.716981
73
0.703645
false
andrewthetechie/slack_rtmbot
slack_rtmbot.py
1
12598
#!/usr/bin/env python import sys sys.dont_write_bytecode = True import glob import yaml import os import sys import time import logging import re from threading import Thread from logging.handlers import RotatingFileHandler from slackclient import SlackClient def dbg(debug_string): """ Used to write debuggi...
gpl-3.0
4,989,589,825,745,127,000
32.956873
108
0.531354
false
cailloumajor/home-web
backend/core/auth/backends.py
1
1129
# -*- coding: utf-8 -*- # pylint: skip-file from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.hashers import check_password class SettingsBackend: """ Authenticates against the settings ADMIN_LOGIN and ADMIN_PASSWORD Use the login name and a hash of ...
gpl-3.0
5,804,025,456,009,240,000
31.257143
69
0.618246
false
zaragoza-sedeelectronica/hackathon-co.sa
bower_components/lumx/changelog.py
48
3091
#! /usr/bin/env python from subprocess import Popen, PIPE import re def getTags(): Popen('git fetch --tags'.split(), stdout=PIPE).communicate() (stdout, _) = Popen('git tag'.split(), stdout=PIPE).communicate() return sorted(stdout.split(), key=lambda s: [int(x) for x in s.replace('v', '').split('.')]) ...
apache-2.0
-7,786,225,083,972,410,000
28.160377
106
0.531867
false
aristanetworks/arista-ovs-quantum
quantum/plugins/nicira/nicira_nvp_plugin/NvpApiClient.py
4
7453
# Copyright 2012 Nicira, 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 a...
apache-2.0
-5,229,935,601,841,114,000
34.660287
79
0.645914
false
gribozavr/swift
utils/swift_build_support/swift_build_support/host_specific_configuration.py
1
12379
# swift_build_support/host_configuration_support.py -------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
apache-2.0
-7,912,246,868,906,289,000
46.068441
79
0.578803
false
openhatch/oh-mainline
vendor/packages/docutils/test/test_parsers/test_rst/test_tables.py
16
37488
#! /usr/bin/env python # $Id: test_tables.py 7313 2012-01-11 20:28:57Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for states.py. """ import os from __init__ import DocutilsTestSupport def suite(): s = DocutilsTestSupport.ParserTe...
agpl-3.0
3,214,507,580,240,908,300
28.776013
93
0.311886
false
palmerjh/iEBE
EBE-Node/superMC/translate.py
8
3447
#! /usr/bin/env python # This script translates a list of arguments into one value specified by a rule file. Usage: # translate ruleFilename key1 key2 ... # It prints out the value corresponds to [key1, key2, ...] from a dictionary read from ruleFilename. # To see how the dictionary is generated, see readRules function...
gpl-3.0
5,394,030,001,868,859,000
34.536082
334
0.668988
false
amenonsen/ansible
lib/ansible/modules/storage/netapp/na_ontap_igroup_initiator.py
21
6258
#!/usr/bin/python ''' This is an Ansible module for ONTAP, to manage initiators in an Igroup (c) 2019, NetApp, 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 ...
gpl-3.0
-1,394,123,362,881,007,400
33.196721
117
0.605944
false
efiop/dvc
dvc/repo/reproduce.py
1
8232
import logging import typing from functools import partial from dvc.exceptions import DvcException, ReproductionError from dvc.repo.scm_context import scm_context from . import locked if typing.TYPE_CHECKING: from . import Repo logger = logging.getLogger(__name__) def _reproduce_stage(stage, **kwargs): de...
apache-2.0
2,688,902,925,146,140,000
30.661538
79
0.557094
false
Marketing1by1/petl
petl/test/io/test_csv.py
3
7619
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division from tempfile import NamedTemporaryFile import gzip import os import logging from petl.compat import PY2 from petl.test.helpers import ieq, eq_ from petl.io.csv import fromcsv, fromtsv, tocsv, appendcsv, totsv, appendtsv logg...
mit
-6,578,390,922,451,342,000
23.501608
76
0.446384
false
dogless/airavata
airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/samples/createExperiment.py
6
2463
#!/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 # "L...
apache-2.0
2,160,463,855,447,133,200
32.283784
123
0.760049
false
andfoy/margffoy-tuay-server
env/lib/python2.7/site-packages/reportlab-3.2.0-py2.7-linux-x86_64.egg/reportlab/graphics/charts/spider.py
34
16057
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/spider.py # spider chart, also known as radar chart __version__=''' $Id$ ''' __doc__="""Spider Chart Normal use shows variation o...
gpl-2.0
7,203,825,704,348,503,000
38.355392
150
0.57464
false
kartikshah1/Test
venv/lib/python2.7/site-packages/setuptools/command/install_scripts.py
111
2031
import distutils.command.install_scripts as orig from pkg_resources import Distribution, PathMetadata, ensure_directory import os from distutils import log class install_scripts(orig.install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" def initialize_options(self): orig....
mit
-6,497,713,646,227,108,000
38.057692
79
0.632201
false
angr/angr
angr/flirt/build_sig.py
1
10360
# pylint:disable=consider-using-with from typing import List, Dict import json import subprocess import argparse import tempfile import os import itertools from collections import defaultdict import angr UNIQUE_STRING_COUNT = 20 # strings longer than MAX_UNIQUE_STRING_LEN will be truncated MAX_UNIQUE_STRING_LEN = 70...
bsd-2-clause
4,011,237,977,573,441,000
31.681388
119
0.551351
false
CydarLtd/ansible
test/runner/lib/cover.py
26
7465
"""Code coverage utilities.""" from __future__ import absolute_import, print_function import os import re from lib.target import ( walk_module_targets, walk_compile_targets, ) from lib.util import ( display, ApplicationError, EnvironmentConfig, run_command, common_environment, ) from li...
gpl-3.0
-5,508,514,888,069,618,000
28.389764
123
0.591293
false
EdwardBeckett/fail2ban
fail2ban/client/jailsreader.py
18
3062
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
5,963,948,043,318,385,000
27.091743
81
0.6855
false
thinkopensolutions/geraldo
site/newsite/django_1_0/tests/regressiontests/mail/tests.py
10
1404
# coding: utf-8 r""" # Tests for the django.core.mail. >>> from django.core.mail import EmailMessage >>> from django.utils.translation import ugettext_lazy # Test normal ascii character case: >>> email = EmailMessage('Subject', 'Content', 'from@example.com', ['to@example.com']) >>> message = email.message() >>> mess...
lgpl-3.0
-8,823,524,838,124,119,000
28.25
117
0.69302
false
tudorbarascu/QGIS
python/pyplugin_installer/__init__.py
45
1403
# -*- coding: utf-8 -*- """ *************************************************************************** __init__.py --------------------- Date : May 2013 Copyright : (C) 2013 by Borys Jurgiel Email : info at borysjurgiel dot pl This module is based on ...
gpl-2.0
-2,400,248,435,529,018,400
35.921053
77
0.445474
false
tudorbarascu/QGIS
python/plugins/processing/algs/qgis/Relief.py
15
6936
# -*- coding: utf-8 -*- """ *************************************************************************** Relief.py --------------------- Date : December 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com *****************...
gpl-2.0
-2,099,561,983,249,656,300
41.814815
117
0.512687
false
drewp/tahoe-lafs
src/allmydata/util/abbreviate.py
1
2005
import re HOUR = 3600 DAY = 24*3600 WEEK = 7*DAY MONTH = 30*DAY YEAR = 365*DAY def abbreviate_time(s): def _plural(count, unit): count = int(count) if count == 1: return "%d %s" % (count, unit) return "%d %ss" % (count, unit) if s is None: return "unknown" if s...
gpl-2.0
-7,455,435,370,564,310,000
25.038961
66
0.468828
false
afandria/sky_engine
third_party/ply/yacc.py
465
128492
# ----------------------------------------------------------------------------- # ply: yacc.py # # Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
bsd-3-clause
5,688,214,284,204,307,000
38.222222
176
0.464472
false
09zwcbupt/undergrad_thesis
ext/poxdesk/qx/tool/pylib/graph/algorithms/heuristics/Euclidean.py
4
3477
# Copyright (c) 2008-2009 Pedro Matiello <pmatiello@gmail.com> # # 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,...
gpl-3.0
-7,340,203,254,417,700,000
34.489796
134
0.59304
false
MichaelTong/cassandra-rapid
doc/source/_util/cql.py
64
6877
# -*- coding: utf-8 -*- """ CQL pygments lexer ~~~~~~~~~~~~~~~~~~ Lexer for the Cassandra Query Language (CQL). This is heavily inspired from the pygments SQL lexer (and the Postgres one in particular) but adapted to CQL keywords and specificities. TODO: This has been hacked quickly, but once...
apache-2.0
-9,124,501,696,933,517,000
24.756554
120
0.522612
false
code4futuredotorg/reeborg_tw
src/libraries/brython_old/Lib/unittest/test/testmock/testcallable.py
739
4234
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ import unittest from unittest.test.testmock.support import is_instance, X, SomeClass from unittest.mock import ( Mock, MagicMock, NonCallableMagicMock, NonCallableM...
agpl-3.0
6,419,948,093,175,247,000
27.802721
74
0.590458
false
zerlgi/zcswebapp
zcswebapp-1.0/lib/scudcloud.py
1
14669
#!/usr/bin/env python3 import sys, os from cookiejar import PersistentCookieJar from leftpane import LeftPane from notifier import Notifier from resources import Resources from systray import Systray from wrapper import Wrapper from os.path import expanduser from PyQt4 import QtCore, QtGui, QtWebKit from PyQt4.Qt impor...
mit
-6,082,477,828,872,237,000
42.271386
153
0.601404
false
onceuponatimeforever/oh-mainline
mysite/search/migrations/0020_remove_project_icon_field.py
17
3867
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # 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 version 3 of the License, or # (at your option) any later v...
agpl-3.0
-4,285,620,888,069,940,000
54.242857
145
0.592449
false
Jgarcia-IAS/ReporsitorioVacioOdoo
openerp/addons/base_setup/res_config.py
261
5089
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-8,962,227,130,952,623,000
50.938776
283
0.614463
false
GaussDing/django
tests/template_tests/filter_tests/test_autoescape.py
513
1342
from django.test import SimpleTestCase from ..utils import SafeClass, UnsafeClass, setup class AutoescapeStringfilterTests(SimpleTestCase): """ Filters decorated with stringfilter still respect is_safe. """ @setup({'autoescape-stringfilter01': '{{ unsafe|capfirst }}'}) def test_autoescape_string...
bsd-3-clause
5,072,677,828,539,771,000
45.275862
105
0.683308
false
vipul-sharma20/oh-mainline
vendor/packages/kombu/kombu/transport/redis.py
15
33278
""" kombu.transport.redis ===================== Redis transport. """ from __future__ import absolute_import import numbers import socket from bisect import bisect from collections import namedtuple from contextlib import contextmanager from time import time from amqp import promise from anyjson import loads, dumps...
agpl-3.0
7,035,478,193,859,772,000
33.77325
79
0.562714
false
ABaldwinHunter/django-clone
tests/forms_tests/tests/test_media.py
76
23851
# -*- coding: utf-8 -*- from django.forms import CharField, Form, Media, MultiWidget, TextInput from django.template import Context, Template from django.test import SimpleTestCase, override_settings from django.utils.encoding import force_text @override_settings( STATIC_URL='http://media.example.com/static/', ) ...
bsd-3-clause
2,379,364,266,218,648,000
44.691571
120
0.552094
false
EricMuller/mywebmarks-backend
requirements/twisted/Twisted-17.1.0/src/twisted/trial/_dist/test/test_workertrial.py
12
5153
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.trial._dist.workertrial}. """ import errno import sys import os from twisted.protocols.amp import AMP from twisted.python.compat import _PY3, NativeStringIO as StringIO from twisted.test.proto_helpers import StringTranspo...
mit
-2,294,088,270,421,492,000
26.704301
83
0.590142
false
samtx/whatsmyrankine
venv/lib/python2.7/site-packages/flask/views.py
782
5642
# -*- coding: utf-8 -*- """ flask.views ~~~~~~~~~~~ This module provides class-based views inspired by the ones in Django. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from .globals import request from ._compat import with_metaclass http_method_funcs =...
mit
1,829,622,443,447,455,200
36.865772
78
0.61698
false
alxgu/ansible
lib/ansible/plugins/lookup/credstash.py
43
4385
# (c) 2015, Ensighten <infra@ensighten.com> # (c) 2017 Ansible Project # 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 DOCUMENTATION = """ lookup: credstash version_added: "2.0" ...
gpl-3.0
7,706,076,775,639,221,000
35.848739
124
0.639453
false
jgcaaprom/android_external_chromium_org
third_party/closure_linter/closure_linter/errors.py
99
4184
#!/usr/bin/env python # Copyright 2007 The Closure Linter 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 # #...
bsd-3-clause
-8,520,601,316,505,334,000
27.462585
74
0.756453
false
teltek/edx-platform
common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py
14
2234
# -*- coding: utf-8 -*- """ Custom migration script to add slug field to all ProviderConfig models. """ from __future__ import unicode_literals from django.db import migrations, models from django.utils.text import slugify def fill_slug_field(apps, schema_editor): """ Fill in the slug field for each Provider...
agpl-3.0
-2,491,701,506,592,241,700
39.618182
227
0.675022
false
Beauhurst/django
django/db/models/options.py
6
34598
import copy import warnings from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured from django.db import connections from django.db.mo...
bsd-3-clause
1,516,432,898,110,203,000
40.286396
115
0.596769
false
melonproject/oyente
oyente/batch_run.py
3
1356
import json import glob from tqdm import tqdm import os import sys import urllib2 contract_dir = 'contract_data' cfiles = glob.glob(contract_dir+'/contract1.json') cjson = {} print "Loading contracts..." for cfile in tqdm(cfiles): cjson.update(json.loads(open(cfile).read())) results = {} missed = [] print "Runn...
gpl-3.0
7,615,481,742,327,639,000
24.111111
176
0.678466
false
xukunfeng/ardupilot
mk/PX4/Tools/genmsg/src/genmsg/deps.py
216
3993
# Software License Agreement (BSD License) # # Copyright (c) 2011, 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 ...
gpl-3.0
-5,715,704,955,319,090,000
41.478723
99
0.736789
false
jeasoft/odoo
addons/account_followup/__openerp__.py
261
2938
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-3,327,289,274,687,465,500
41.57971
114
0.566031
false
xiandiancloud/ji
lms/djangoapps/bulk_email/models.py
24
9630
""" Models for bulk email WE'RE USING MIGRATIONS! If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py lms schemamigration bulk_email --auto description_of_your_change 3. Add...
agpl-3.0
-5,084,161,098,711,893,000
37.063241
120
0.672586
false
yipenggao/moose
python/chigger/misc/AxisSource.py
6
1994
#pylint: disable=missing-docstring ################################################################# # DO NOT MODIFY THIS HEADER # # MOOSE - Multiphysics Object Oriented Simulation Environment # # # # (c) 2010...
lgpl-2.1
5,896,478,575,260,118,000
35.925926
96
0.467402
false
gfyoung/pandas
pandas/tests/indexes/common.py
2
28221
import gc from typing import Type import numpy as np import pytest from pandas._libs import iNaT from pandas.errors import InvalidIndexError from pandas.core.dtypes.common import is_datetime64tz_dtype from pandas.core.dtypes.dtypes import CategoricalDtype import pandas as pd from pandas import ( CategoricalInde...
bsd-3-clause
2,308,540,821,060,143,000
33.415854
87
0.564402
false
hyqneuron/pylearn2-maxsom
pylearn2/scripts/papers/maxout/mytests/mytest4.py
1
8009
from pylearn2.models.mlp import MLP from pylearn2.models.maxout import Maxout from pylearn2.training_algorithms.sgd import SGD import logging import warnings import sys import numpy as np from theano.compat import six from theano import config from theano import function from theano.gof.op import get_debug_values impo...
bsd-3-clause
4,847,830,221,371,459,000
41.152632
105
0.618304
false
Xperia-Nicki/android_platform_sony_nicki
external/webkit/Tools/Scripts/webkitpy/common/system/ospath_unittest.py
15
2518
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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 conditions and...
apache-2.0
9,164,030,147,796,861,000
39.612903
79
0.70969
false
troya2/pjsip
doc/pjsip-book/conf.py
61
8065
# -*- coding: utf-8 -*- # # The PJSIP Book documentation build configuration file, created by # sphinx-quickstart on Sat Nov 30 06:36:26 2013. # # 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-2.0
6,872,362,424,761,038,000
30.503906
89
0.702418
false
ojake/django
django/contrib/gis/db/backends/postgis/models.py
396
2158
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class PostGISGeometryColumns(models.Model): ...
bsd-3-clause
6,024,108,787,767,507,000
28.561644
79
0.646432
false
msvbhat/distaf
distaf/util.py
1
4872
# This file is part of DiSTAF # Copyright (C) 2015-2016 Red Hat, Inc. <http://www.redhat.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 Software Foundation; either version 2 of the License, or # any l...
gpl-2.0
-6,207,542,107,935,917,000
35.631579
79
0.543514
false
pombredanne/psd-tools
tests/test_pixels.py
8
5675
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import pytest from psd_tools import PSDImage, Layer, Group from .utils import full_name PIXEL_COLORS = ( # filename probe point pixel value ('1layer.psd', (5, 5), (0x27, 0xBA, 0x0F)), (...
mit
8,326,158,287,670,446,000
40.423358
118
0.569163
false
jazkarta/edx-platform-for-isc
common/djangoapps/track/tests/test_util.py
239
1203
from datetime import datetime import json from pytz import UTC from django.test import TestCase from track.utils import DateTimeJSONEncoder class TestDateTimeJSONEncoder(TestCase): def test_datetime_encoding(self): a_naive_datetime = datetime(2012, 05, 01, 07, 27, 10, 20000) a_tz_datetime = dat...
agpl-3.0
7,489,561,403,423,701,000
31.513514
77
0.601829
false
Red-M/CloudBot-legacy
plugins/tell.py
2
3615
""" tell.py: written by sklnd in July 2009 2010.01.25 - modified by Scaevolus""" import time import re from util import hook, timesince db_ready = [] def db_init(db, conn): """Check that our db has the tell table, create it if not.""" global db_ready if not conn.name in db_ready: db.exec...
gpl-3.0
-8,847,720,744,274,657,000
28.876033
107
0.554357
false
swenson/sagewiki
unidecode/unidecode/x025.py
252
3871
data = ( '-', # 0x00 '-', # 0x01 '|', # 0x02 '|', # 0x03 '-', # 0x04 '-', # 0x05 '|', # 0x06 '|', # 0x07 '-', # 0x08 '-', # 0x09 '|', # 0x0a '|', # 0x0b '+', # 0x0c '+', # 0x0d '+', # 0x0e '+', # 0x0f '+', # 0x10 '+', # 0x11 '+', # 0x12 '+', # 0x13 '+', # 0...
gpl-2.0
4,723,810,819,600,030,000
14.062257
16
0.266081
false
jakub-d/kubernetes
hack/lookup_pull.py
246
1299
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
apache-2.0
1,747,868,749,868,640,800
31.475
74
0.700539
false
snowballstem/snowball
python/stemwords.py
1
3437
import sys import codecs import snowballstemmer def usage(): print('''usage: %s [-l <language>] [-i <input file>] [-o <output file>] [-c <character encoding>] [-p[2]] [-h] The input file consists of a list of words to be stemmed, one per line. Words should be in lower case, but (for English) A-Z letters are mappe...
bsd-3-clause
8,974,131,121,116,061,000
33.029703
114
0.484725
false
markYoungH/chromium.src
media/tools/constrained_network_server/traffic_control.py
186
12569
# 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. """Traffic control library for constraining the network configuration on a port. The traffic controller sets up a constrained network configuration on a...
bsd-3-clause
-7,661,146,222,376,202,000
34.50565
80
0.662185
false
marcelocure/django
tests/gis_tests/utils.py
327
1377
from unittest import skip from django.conf import settings from django.db import DEFAULT_DB_ALIAS def no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: @skip("This test is skipped on...
bsd-3-clause
-8,935,055,788,941,275,000
32.585366
105
0.726943
false
chromium/chromium
components/policy/tools/generate_policy_source.py
1
66390
#!/usr/bin/env python3 # 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. '''python3 %(prog)s [options] Pass at least: --chrome-version-file <path to src/chrome/VERSION> or --all-chrome-versions --target-...
bsd-3-clause
6,799,088,792,365,111,000
37.666278
80
0.645022
false
aferr/TimingCompartments
configs/topologies/BaseTopology.py
15
2949
# Copyright (c) 2012 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of conditions...
bsd-3-clause
1,094,965,278,747,200,800
43.681818
77
0.726348
false
helloworldajou/webserver
demos/classifier_webcam.py
4
7059
#!/usr/bin/env python2 # # Example to run classifier on webcam stream. # Brandon Amos & Vijayenthiran # 2016/06/21 # # Copyright 2015-2016 Carnegie Mellon University # # 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 ...
apache-2.0
5,748,460,909,555,260,000
31.985981
137
0.618785
false
ibinti/intellij-community
python/helpers/pycharm/__jb.for_twisted/twisted/plugins/teamcity_plugin.py
11
1180
import sys from teamcity.unittestpy import TeamcityTestResult from twisted.trial.reporter import Reporter from twisted.python.failure import Failure from twisted.plugins.twisted_trial import _Reporter class FailureWrapper(Failure): def __getitem__(self, key): return self.value[key] class TeamcityReport...
apache-2.0
2,395,397,164,970,123,000
30.891892
81
0.574576
false
Lujeni/ansible
lib/ansible/modules/network/nxos/nxos_vrf.py
5
17884
#!/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
6,767,702,643,672,515,000
32.743396
103
0.566372
false
sonaht/ansible
lib/ansible/modules/cloud/amazon/ec2_metric_alarm.py
57
11596
#!/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
7,852,049,397,230,085,000
34.461774
156
0.601673
false
murraymeehan/marsyas
scripts/Python/batch.py
7
1475
import os from glob import glob inputDirectory = "../../../../Databases/taslp/"; outputDirectory = "../../../output3 "; testCommand = " "; #testCommand = " -q 1 "; beginCommand = "../../bin/release/peakClustering "; beginCommand = "..\\..\\bin\\release\\peakClustering.exe "; endCommand = " -P -f -S 0 ...
gpl-2.0
-3,598,926,552,755,465,700
28.102041
81
0.472542
false
sathiamour/foursquared
util/oget.py
262
3416
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
apache-2.0
-4,553,869,164,026,361,000
29.774775
78
0.695843
false
dmarteau/QGIS
python/plugins/db_manager/db_plugins/gpkg/sql_dictionary.py
71
1200
# -*- coding: utf-8 -*- """ *************************************************************************** sql_dictionary.py --------------------- Date : April 2012 Copyright : (C) 2012 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com ************...
gpl-2.0
1,423,807,678,453,540,000
41.857143
75
0.431667
false
smourph/PGo-TrainerTools
pgoapi/protos/POGOProtos/Networking/Responses/GetIncensePokemonResponse_pb2.py
12
6521
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Responses/GetIncensePokemonResponse.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _messag...
gpl-3.0
8,084,210,095,682,330,000
44.601399
794
0.750038
false
renegelinas/mi-instrument
mi/idk/platform/test/test_metadata.py
11
2605
#!/usr/bin/env python """ @package mi.idk.platform.test.test_metadata @file mi.idk/platform/test/test_metadata.py @author Bill French @brief test metadata object """ __author__ = 'Bill French' __license__ = 'Apache 2.0' from os.path import basename, dirname from os import makedirs from os.path import exists import s...
bsd-2-clause
9,126,583,008,312,784,000
27.626374
140
0.646449
false
pgoeser/gnuradio
gr-howto-write-a-block/apps/howto_square.py
36
2164
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Howto Square # Generated: Thu Nov 12 11:26:07 2009 ################################################## import howto from gnuradio import eng_notation from gnuradio import gr from gnuradio.eng_option import eng...
gpl-3.0
3,557,765,258,694,196,000
27.103896
77
0.546673
false
EricMuller/mynotes-backend
requirements/twisted/Twisted-17.1.0/src/twisted/test/test_paths.py
13
74412
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases covering L{twisted.python.filepath}. """ from __future__ import division, absolute_import import os, time, pickle, errno, stat from pprint import pformat from twisted.python.compat import _PY3, unicode from twisted.python.win32 i...
mit
5,482,609,063,870,650,000
34.133144
90
0.600051
false
blockstack/packaging
imported/future/src/libpasteurize/fixes/fix_add_all_future_builtins.py
60
1270
""" For the ``future`` package. Adds this import line:: from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, list, map, next, object, oct, open, pow, range, round, str, super, zip) to a module, irrespective of whether each definition is used....
gpl-3.0
-7,345,221,367,281,167,000
32.421053
76
0.584252
false
manpen/thrill
frontends/swig_python/python_test.py
4
4291
#!/usr/bin/env python ########################################################################## # frontends/swig_python/python_test.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <tb@panthema.net> # # All rights reserved. Published under the BSD-2 license in the LICENSE ...
bsd-2-clause
-3,734,699,750,667,732,500
27.417219
77
0.528548
false
lkeijser/func
test/unittest/test_func_arg.py
8
4973
## ## Copyright 2007, Red Hat, Inc ## see AUTHORS ## ## This software may be freely redistributed under the terms of the GNU ## general public license. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave...
gpl-2.0
-5,862,978,857,972,503,000
31.933775
181
0.448421
false
mujiansu/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/command/bdist_dumb.py
53
4901
"""distutils.command.bdist_dumb Implements the Distutils 'bdist_dumb' command (create a "dumb" built distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: bdist_dumb.py 61000 2008-02-23 17:40:11Z christian...
apache-2.0
-3,497,645,944,928,719,400
35.303704
81
0.537033
false
shujaatak/UAV_MissionPlanner
Lib/site-packages/numpy/lib/tests/test__datasource.py
54
10225
import os import sys from tempfile import mkdtemp, mkstemp, NamedTemporaryFile from shutil import rmtree from urlparse import urlparse from urllib2 import URLError import urllib2 from numpy.testing import * from numpy.compat import asbytes import numpy.lib._datasource as datasource def urlopen_stub(url, data=None):...
gpl-2.0
7,366,578,464,571,990,000
30.079027
78
0.633252
false
omarocegueda/dipy
dipy/segment/tissue.py
6
6207
import numpy as np from dipy.sims.voxel import add_noise from dipy.segment.mrf import (ConstantObservationModel, IteratedConditionalModes) class TissueClassifierHMRF(object): r""" This class contains the methods for tissue classification using the Markov Random Fields modelin...
bsd-3-clause
1,052,245,938,812,822,500
35.727811
79
0.507653
false
davidharrigan/django
tests/csrf_tests/tests.py
78
23643
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.conf import settings from django.http import HttpRequest, HttpResponse from django.middleware.csrf import ( CSRF_KEY_LENGTH, CsrfViewMiddleware, get_token, ) from django.template import RequestContext, Template from django....
bsd-3-clause
2,972,456,851,825,409,500
39.346416
107
0.607833
false
wizyoung/workflows.kyoyue
PIL/ImageWin.py
9
7167
# # The Python Imaging Library. # $Id$ # # a Windows DIB display interface # # History: # 1996-05-20 fl Created # 1996-09-20 fl Fixed subregion exposure # 1997-09-21 fl Added draw primitive (for tzPrint) # 2003-05-21 fl Added experimental Window/ImageWindow classes # 2003-09-05 fl Added fromstring/tostring me...
mit
-5,730,389,802,643,529,000
30.572687
79
0.580578
false
detiber/openshift-ansible-contrib
reference-architecture/aws-ansible/add-cns-storage.py
1
13272
#!/usr/bin/env python # vim: sw=2 ts=2 import click import os import sys @click.command() ### Cluster options @click.option('--console-port', default='443', type=click.IntRange(1,65535), help='OpenShift web console port', show_default=True) @click.option('--deployment-type', default='openshift-enterpri...
apache-2.0
129,010,092,267,740,850
38.855856
161
0.588532
false
lmazuel/azure-sdk-for-python
azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py
2
2621
# 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
-387,128,429,407,252,160
31.7625
77
0.727966
false
mileswwatkins/pupa
pupa/scrape/schemas/bill.py
2
4736
""" Schema for bill objects. """ from .common import sources, extras, fuzzy_date_blank, fuzzy_date from opencivicdata import common versions_or_documents = { "items": { "properties": { "note": {"type": "string"}, "date": fuzzy_date_blank, "links": { ...
bsd-3-clause
-4,360,110,510,837,721,600
33.823529
95
0.330448
false
EmmanuelJohnson/ssquiz
flask/lib/python2.7/site-packages/whoosh/query/__init__.py
96
1843
# Copyright 2012 Matt Chaput. 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 conditions and the...
bsd-3-clause
6,773,817,968,131,685,000
50.194444
78
0.781877
false
robhudson/django
tests/template_tests/filter_tests/test_escapejs.py
324
2055
from __future__ import unicode_literals from django.template.defaultfilters import escapejs_filter from django.test import SimpleTestCase from ..utils import setup class EscapejsTests(SimpleTestCase): @setup({'escapejs01': '{{ a|escapejs }}'}) def test_escapejs01(self): output = self.engine.render_...
bsd-3-clause
2,259,466,267,092,058,600
37.773585
117
0.601946
false
0111001101111010/open-health-inspection-api
venv/lib/python2.7/site-packages/pip/commands/install.py
342
12694
import os import sys import tempfile import shutil from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.log import logger from pip.locations import (src_prefix, virtualenv_no_global, distutils_scheme, build_prefix) from pip.basecommand import Command from pip.in...
gpl-2.0
4,031,533,123,472,115,700
39.426752
246
0.565385
false
glwu/python-for-android
python3-alpha/python3-src/Lib/test/test_posixpath.py
49
21964
import unittest from test import support, test_genericpath import posixpath import os import sys from posixpath import realpath, abspath, dirname, basename try: import posix except ImportError: posix = None # An absolute path to a temporary filename for testing. We can't rely on TESTFN # being an absolute pa...
apache-2.0
-7,113,016,781,189,107,000
41.238462
100
0.558414
false
tysonclugg/django
django/contrib/gis/gdal/srs.py
72
11540
""" The Spatial Reference class, represents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY...
bsd-3-clause
1,420,262,175,175,315,700
33.447761
97
0.603553
false
arjclark/cylc
lib/jinja2/__init__.py
71
2614
# -*- coding: utf-8 -*- """ jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: {% ...
gpl-3.0
-4,608,557,508,708,200,000
30.493976
77
0.692425
false
JudoWill/ResearchNotebooks
DownloadMicroData.py
1
1738
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import os, os.path import concurrent.futures import csv import urllib.request import shutil import gzip os.chdir('/home/will/AutoMicroAnal/') # <codecell> with open('MicroarraySamples.tsv') as handle: microdata = list(csv.DictReader(handle, delimi...
mit
2,532,407,197,985,833,000
21.571429
89
0.598389
false
collex100/odoo
addons/account_check_writing/account.py
379
2032
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
8,210,801,479,088,206,000
41.333333
231
0.613189
false
iemejia/incubator-beam
sdks/python/apache_beam/runners/portability/flink_uber_jar_job_server.py
1
8979
# # 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
7,720,481,441,974,997,000
34.916
79
0.650741
false
roxyboy/scikit-learn
sklearn/mixture/tests/test_dpgmm.py
261
4490
import unittest import sys import numpy as np from sklearn.mixture import DPGMM, VBGMM from sklearn.mixture.dpgmm import log_normalize from sklearn.datasets import make_blobs from sklearn.utils.testing import assert_array_less, assert_equal from sklearn.mixture.tests.test_gmm import GMMTester from sklearn.externals.s...
bsd-3-clause
-6,615,838,260,987,691,000
27.598726
75
0.636526
false
coderfi/ansible-modules-extras
packaging/macports.py
61
6679
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jimmy Tang <jcftang@gmail.com> # Based on okpg (Patrick Pelletier <pp.pelletier@gmail.com>), pacman # (Afterburn) and pkgin (Shaun Zinck) modules # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public ...
gpl-3.0
-5,207,258,688,369,111,000
29.778802
146
0.630034
false
ShawnPengxy/Flask-madeBlog
site-packages/httpie/output.py
5
16098
"""Output streaming, processing and formatting. """ import json import xml.dom.minidom from functools import partial from itertools import chain import pygments from pygments import token, lexer from pygments.styles import get_style_by_name, STYLE_MAP from pygments.lexers import get_lexer_for_mimetype, get_lexer_by_n...
mit
6,310,733,805,136,003,000
29.604563
79
0.567338
false
EttusResearch/gnuradio
gr-channels/python/channels/qa_channel_model.py
47
1900
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your optio...
gpl-3.0
-632,478,174,958,866,300
31.20339
70
0.654211
false
wwright2/dcim3-angstrom1
sources/openembedded-core/meta/lib/oeqa/utils/commands.py
2
4475
# Copyright (c) 2013-2014 Intel Corporation # # Released under the MIT license (see COPYING.MIT) # DESCRIPTION # This module is mainly used by scripts/oe-selftest and modules under meta/oeqa/selftest # It provides a class and methods for running commands on the host in a convienent way for tests. import os import s...
mit
8,610,164,888,131,532,000
28.058442
128
0.610503
false
technic-tec/onedrive-d-old
onedrive_d/od_onedrive_api.py
2
23966
#!/usr/bin/python3 """ OneDrive REST API for onedrive_d. Refer to http://msdn.microsoft.com/en-us/library/dn659752.aspx Notes: * The API object can be called by any arbitrary thread in the program. * Call get_instance() will realize a API singleton object. * When there is network issue at an API call, the calling...
lgpl-3.0
-6,850,790,834,364,889,000
33.286123
167
0.690812
false