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
ar7z1/ansible
lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py
13
35970
#!/usr/bin/python # Copyright (c) 2016 Thomas Stringer, <tomstr@microsoft.com> # 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
8,870,424,362,551,058,000
36.236025
151
0.555936
false
vrenaville/hr
__unported__/hr_policy_presence/hr_policy_presence.py
27
3008
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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, eit...
agpl-3.0
-7,406,391,522,134,814,000
31.344086
78
0.590426
false
fatherlinux/atomic-reactor
atomic_reactor/plugins/pre_check_and_set_rebuild.py
1
3466
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals import json import os from osbs.api import OSBS from osbs.conf import Configuration from atomic_rea...
bsd-3-clause
-680,945,692,435,978,200
31.392523
93
0.622908
false
jessehagberg/python-playground
ex3.py
1
1289
# This line prints out a string about counting chickens. print "I will now count my chickens:" # This line prints the string "Hens" concatenated with the value derived from dividing 30 by 6 and then adding 5. (which is 30) print "Hens", 25.0 + 30 / 6 # Prints Roosters although I do not understand how the result i...
cc0-1.0
5,221,938,835,396,401,000
32.891892
127
0.680372
false
adamtiger/tensorflow
tensorflow/python/keras/_impl/keras/engine/topology.py
6
54348
# 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
6,797,584,167,695,338,000
34.405863
132
0.61787
false
Peddle/hue
desktop/core/ext-py/Paste-2.0.1/paste/debug/wdg_validate.py
50
4268
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Middleware that tests the validity of all generated HTML using the `WDG HTML Validator <http://www.htmlhelp.com/tools/validator/>`_ """ from cStri...
apache-2.0
-6,676,824,475,706,558,000
35.169492
84
0.578725
false
yordan-desta/QgisIns
python/plugins/GdalTools/tools/doDEM.py
1
8075
# -*- coding: utf-8 -*- """ *************************************************************************** doDEM.py --------------------- Date : March 2011 Copyright : (C) 2011 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com *********************...
gpl-2.0
-8,888,280,582,745,234,000
42.88587
172
0.645201
false
codilime/cloudify-plugins-common
cloudify/tests/test_task_subgraph.py
3
7425
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
apache-2.0
8,905,460,130,617,722,000
34.189573
79
0.624242
false
pdufour/sqlalchemy
examples/dogpile_caching/local_session_caching.py
30
3372
"""local_session_caching.py Grok everything so far ? This example creates a new dogpile.cache backend that will persist data in a dictionary which is local to the current session. remove() the session and the cache is gone. Create a new Dogpile cache backend that will store cached data local to the current Sessio...
mit
4,783,946,353,251,753,000
31.423077
74
0.677936
false
gsobczyk/hamster
waflib/Tools/intltool.py
56
6784
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2018 (ita) """ Support for translation tools such as msgfmt and intltool Usage:: def configure(conf): conf.load('gnu_dirs intltool') def build(bld): # process the .po files into .gmo files, and install them in LOCALEDIR bld(features='intltool_po', ...
gpl-3.0
-4,420,084,393,047,291,400
28.367965
112
0.678656
false
bioconda/recipes
recipes/biopet-extractadaptersfastqc/biopet-extractadaptersfastqc.py
61
3393
#!/usr/bin/env python # # Wrapper script for starting the biopet-extractadaptersfastqc JAR package # # This script is written for use with the Conda package manager and is copied # from the peptide-shaker wrapper. Only the parameters are changed. # (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/pepti...
mit
-4,875,965,202,450,219,000
30.71028
101
0.64692
false
happy56/kivy
kivy/adapters/simplelistadapter.py
3
2135
''' SimpleListAdapter ================= .. versionadded:: 1.5 .. warning:: This code is still experimental, and its API is subject to change in a future version. :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is for basic lists, such as for showing a text-only display of strings, that have no u...
lgpl-3.0
8,478,906,433,553,651,000
28.652778
79
0.653864
false
nieklinnenbank/bouwer
test/test_util/test_Singleton.py
1
4375
# # Copyright (C) 2012 Niek Linnenbank # # 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...
gpl-3.0
9,157,137,935,183,622,000
37.377193
88
0.642286
false
cbenhagen/buildozer
docs/source/conf.py
9
7963
# -*- coding: utf-8 -*- # # Buildozer documentation build configuration file, created by # sphinx-quickstart on Sun Apr 20 16:56:31 2014. # # 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. # # A...
mit
8,329,494,584,782,534,000
31.108871
80
0.705262
false
cclauss/heroku-buildpack-python
vendor/pip-pop/pip/_vendor/packaging/_structures.py
906
1809
# 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...
mit
3,390,301,031,583,122,000
22.192308
74
0.623549
false
loco-odoo/localizacion_co
openerp/addons/account/report/account_treasury_report.py
385
3872
# -*- 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,355,265,043,919,859,700
46.219512
151
0.603048
false
Julius2342/pyvlx
pyvlx/api/frames/frame_discover_nodes.py
1
1711
"""Module for discover nodes requests.""" from pyvlx.const import Command, NodeType from .frame import FrameBase class FrameDiscoverNodesRequest(FrameBase): """Frame for discover nodes request.""" PAYLOAD_LEN = 1 def __init__(self, node_type=NodeType.NO_TYPE): """Init Frame.""" super()....
lgpl-3.0
-4,485,951,726,215,496,700
25.734375
81
0.584454
false
andrecunha/coh-metrix-dementia
coh/scripts/process_fapesp.py
1
2828
# -*- coding: utf-8 -*- # Coh-Metrix-Dementia - Automatic text analysis and classification for dementia. # Copyright (C) 2014 Andre Luiz Verucci da Cunha # # 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 F...
gpl-3.0
-4,085,866,334,305,313,000
31.505747
80
0.65983
false
rven/odoo
addons/mrp/models/stock_scrap.py
5
1540
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockScrap(models.Model): _inherit = 'stock.scrap' production_id = fields.Many2one( 'mrp.production', 'Manufacturing Order', states={'done': [('readon...
agpl-3.0
9,198,571,601,886,292,000
41.777778
200
0.642857
false
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/test/test_decorators.py
194
9849
import unittest from test import test_support def funcattrs(**kwds): def decorate(func): func.__dict__.update(kwds) return func return decorate class MiscDecorators (object): @staticmethod def author(name): def decorate(func): func.__dict__['author'] = name ...
gpl-3.0
1,403,262,970,365,498,600
30.873786
98
0.531932
false
Vogeltak/pauselan
lib/python3.4/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py
32
38566
# oracle/cx_oracle.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: oracle+cx_oracle :name: cx-Oracle :dbapi: cx_oracle ...
gpl-2.0
-4,974,355,177,081,676,000
38.11359
78
0.624618
false
pedrobaeza/odoo
addons/website_event_sale/controllers/main.py
54
2827
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
-6,023,928,356,888,789,000
41.833333
150
0.598868
false
jswope00/GAI
common/djangoapps/student/management/commands/assigngroups.py
68
3033
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from student.models import UserTestGroup import random import sys import datetime import json from pytz import UTC def group_from_value(groups, v): ''' Given group: (('a',0.3),('b',0.4),('c',0.3)) And random value ...
agpl-3.0
-902,936,585,922,262,400
30.926316
118
0.546653
false
PepperPD/edx-pepper-platform
common/djangoapps/track/views.py
10
5519
import json import logging import pytz import datetime import dateutil.parser from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import redirect from django.conf import settings from mitxmako.shortcuts import render_to_response from django_future.csrf ...
agpl-3.0
-2,872,625,716,692,119,600
31.274854
123
0.630187
false
leiferikb/bitpop-private
chrome/test/functional/memory.py
79
5230
#!/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. import os import sys import time import pyauto_functional # Must be imported before pyauto import pyauto import test_utils clas...
bsd-3-clause
5,570,461,608,791,037,000
38.029851
80
0.704971
false
GunnerJnr/_CodeInstitute
Stream-3/Full-Stack-Development/17.Create-A-Django-Based-Forum/6.Enable-Or-Disable-Site-Functionality/we_are_social/threads/models.py
11
1346
# -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils import timezone from tinymce.models import HTMLField # Create your models here. class Subject(models.Model): """ name: description: is a new field that comes packaged with django-tinymce. It enables...
mit
-4,209,784,682,381,893,600
28.26087
78
0.695394
false
jnewland/home-assistant
homeassistant/auth/permissions/util.py
5
3442
"""Helpers to deal with permissions.""" from functools import wraps from typing import Callable, Dict, List, Optional, Union, cast # noqa: F401 from .const import SUBCAT_ALL from .models import PermissionLookup from .types import CategoryType, SubCategoryDict, ValueType LookupFunc = Callable[[PermissionLookup, SubC...
apache-2.0
-6,938,518,420,316,049,000
29.732143
76
0.623765
false
invisiblek/python-for-android
python3-alpha/python3-src/Lib/test/pystone.py
122
7381
#! /usr/bin/env python3 """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness ...
apache-2.0
-8,769,602,547,533,972,000
26.337037
75
0.600461
false
chargrizzle/appengine-mapreduce
python/src/mapreduce/context.py
45
14669
#!/usr/bin/env python # # Copyright 2010 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 o...
apache-2.0
-1,202,390,582,296,076,000
29.43361
80
0.666712
false
apyrgio/synnefo
snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagomapper.py
6
3867
# Copyright (C) 2010-2014 GRNET S.A. # # 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 i...
gpl-3.0
7,734,441,134,097,589,000
33.221239
79
0.579519
false
etzhou/edx-platform
lms/djangoapps/courseware/tests/test_footer.py
57
2188
""" Tests related to the basic footer-switching based off SITE_NAME to ensure edx.org uses an edx footer but other instances use an Open edX footer. """ from nose.plugins.attrib import attr from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from openedx....
agpl-3.0
3,453,800,928,227,261,000
30.710145
90
0.617459
false
rlugojr/django
tests/auth_tests/test_checks.py
44
7996
from django.contrib.auth.checks import ( check_models_permissions, check_user_model, ) from django.contrib.auth.models import AbstractBaseUser from django.core import checks from django.db import models from django.test import ( SimpleTestCase, override_settings, override_system_checks, ) from django.test.utils...
bsd-3-clause
2,876,146,251,216,321,000
38.584158
103
0.575663
false
muff1nman/Vim
vim/eclim/autoload/eclim/python/rope/refactor/patchedast.py
29
24694
import collections import re import warnings from rope.base import ast, codeanalyze, exceptions def get_patched_ast(source, sorted_children=False): """Adds ``region`` and ``sorted_children`` fields to nodes Adds ``sorted_children`` field only if `sorted_children` is True. """ return patch_ast(ast.p...
mit
-7,501,671,960,894,847,000
32.734973
82
0.536244
false
ruslanloman/nova
nova/api/openstack/compute/contrib/evacuate.py
61
4643
# Copyright 2013 OpenStack Foundation # # 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
769,952,748,931,608,300
37.691667
79
0.637734
false
cernops/ceilometer
ceilometer/storage/hbase/utils.py
9
18195
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
apache-2.0
-3,443,815,954,681,258,000
35.757576
79
0.605881
false
qupai/git-repo
subcmds/sync.py
4
28299
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
5,297,243,524,818,912,000
33.095181
93
0.609845
false
facebookexperimental/eden
eden/hg-server/edenscm/hgext/hgevents/__init__.py
2
5889
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. """publishes state-enter and state-leave events to Watchman Extension that is responsible for publishing state-enter and state-leave events to Watchman...
gpl-2.0
-1,112,089,750,199,253,400
29.045918
88
0.597894
false
andyzsf/edx
common/djangoapps/student/migrations/0023_add_test_center_registration.py
183
19003
# -*- coding: 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): # Adding model 'TestCenterRegistration' db.create_table('student_testcenterregistration', ( ('id...
agpl-3.0
5,967,462,612,435,471,000
77.850622
182
0.574541
false
simongoffin/my_odoo_tutorial
addons/hr_evaluation/report/hr_evaluation_report.py
44
4676
# -*- 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
-320,914,851,830,656,960
43.961538
107
0.515184
false
calancha/DIRAC
Core/Utilities/test/TracedTests.py
10
2744
######################################################################## # $HeadURL $ # File: TracedTests.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2012/08/08 15:21:32 ######################################################################## """ :mod: TracedTests ======================= .. module: ...
gpl-3.0
1,898,685,948,532,859,000
27.884211
82
0.580904
false
joshmoore/openmicroscopy
components/tools/OmeroPy/test/integration/emanScripts.py
4
24635
#!/usr/bin/env python """ Integration test for testing various EMAN2 scripts functionality. Not all of the scripts are covered. E.g ctf.py, openInChimera.py, eman2omero.py, either because they are too tricky to test or because they cover very similar functionality to other scripts tested below. dir...
gpl-2.0
4,175,714,215,541,513,700
41.183219
141
0.629267
false
alshedivat/tensorflow
tensorflow/tools/common/test_module1.py
61
1045
# 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 applica...
apache-2.0
-8,316,411,233,879,552,000
32.709677
80
0.688995
false
Muterra/py_golix
golix/cipher.py
2
43384
''' LICENSING ------------------------------------------------- golix: A python library for Golix protocol object manipulation. Copyright (C) 2016 Muterra, Inc. Contributors ------------ Nick Badger badg@muterra.io | badg@nickbadger.com | nickbadger.com This library is free software; ...
unlicense
4,653,441,660,301,665,000
32.397998
79
0.572262
false
ngkogkos/volatility-plugins
facebook_extractor.py
1
18867
""" @author: Nick Gk (@ngkogkos) @license: The MIT License (MIT) @contact: ngkogkos@protonmail.com """ # Volatility's stuff import volatility.commands as commands import volatility.scan as scan import volatility.utils as utils import volatility.addrspace as addrspace import volatility.obj as obj from v...
mit
6,459,048,637,636,026,000
37.981405
126
0.525468
false
thaim/ansible
lib/ansible/plugins/doc_fragments/fortios.py
44
1878
# -*- coding: utf-8 -*- # Copyright: (c) 2017, Benjamin Jolivot <bjolivot@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment DOCUMENTATION = r''' options: file_mode: descriptio...
mit
3,648,329,035,578,487,000
29.786885
130
0.676784
false
HiroIshikawa/21playground
flask-sample/hello/venv/lib/python3.5/site-packages/requests/utils.py
36
20716
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct import wa...
mit
-8,686,343,553,772,075,000
28.764368
118
0.60504
false
donutmonger/youtube-dl
youtube_dl/extractor/tmz.py
126
2370
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class TMZIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tmz\.com/videos/(?P<id>[^/]+)/?' _TEST = { 'url': 'http://www.tmz.com/videos/0_okj015ty/', 'md5': '791204e3bf790b1426cb2db0706184c0', ...
unlicense
8,450,873,140,186,089,000
38.5
158
0.567089
false
havard024/prego
venv/lib/python2.7/site-packages/whoosh/qparser/taggers.py
96
3624
# Copyright 2011 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...
mit
-257,476,968,307,050,140
37.967742
79
0.690949
false
cpennington/edx-platform
lms/djangoapps/verify_student/ssencrypt.py
5
8534
""" NOTE: Anytime a `key` is passed into a function here, we assume it's a raw byte string. It should *not* be a string representation of a hex value. In other words, passing the `str` value of `"32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae"` is bad. You want to pass in the result of calling .decode...
agpl-3.0
-9,002,250,546,567,932,000
35.470085
113
0.675768
false
ChanduERP/odoo
addons/account_asset/account_asset_invoice.py
141
3088
# -*- encoding: 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 G...
agpl-3.0
-8,376,370,481,706,694,000
43.753623
112
0.583549
false
smartfile/django-1.4
tests/modeltests/select_related/tests.py
26
6535
from __future__ import with_statement, absolute_import from django.test import TestCase from .models import Domain, Kingdom, Phylum, Klass, Order, Family, Genus, Species class SelectRelatedTests(TestCase): def create_tree(self, stringtree): """ Helper to create a complete tree. """ ...
bsd-3-clause
-4,948,612,629,764,129,000
39.339506
115
0.603979
false
gmartinvela/RoMIE
robot_control/views.py
1
10330
import sys import time import os import subprocess import webbrowser import threading import traceback from django.http import HttpResponse from django.shortcuts import render from robot_control.models import Category, Question, Response from django.core.mail import send_mail import json MAX_TIME = 180 # seconds POR...
mit
8,279,738,797,407,754,000
35.631206
157
0.615973
false
liuycsd/bypy
bypy/requester.py
1
3844
#!/usr/bin/env python # encoding: utf-8 # PYTHON_ARGCOMPLETE_OK # from __future__ imports must occur at the beginning of the file from __future__ import unicode_literals from __future__ import print_function from __future__ import division import sys import logging import json from functools import partial import r...
mit
-8,235,682,933,852,579,000
26.262411
108
0.717222
false
sdgdsffdsfff/simpleMon
nbNet/nbNet.py
4
7022
#!/usr/bin/python #-*- coding:utf-8 -*- import socket, select, logging, errno import os, sys, json def cmdRunner(input): import commands cmd_ret = commands.getstatusoutput(input) return json.dumps({'ret':cmd_ret[0], 'out':cmd_ret[1]}, separators=(',', ':')) class _State: def __init__(self): ...
apache-2.0
-1,395,681,563,973,023,200
32.28866
93
0.502632
false
eadgarchen/tensorflow
tensorflow/contrib/learn/python/learn/estimators/estimator_test_utils.py
81
2065
# 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,598,094,787,194,836,500
38.711538
80
0.714286
false
niceguydave/cmsplugin-filer
cmsplugin_filer_file/migrations/0001_initial.py
17
11958
from south.db import db from django.db import models from cmsplugin_filer_file.models import * class Migration: depends_on = ( ("filer", "0008_polymorphic__del_field_file__file_type_plugin_name"), ) def forwards(self, orm): # Adding model 'FilerFile' db.create_table(...
bsd-3-clause
-9,142,101,450,015,312,000
78.72
189
0.552266
false
DarkFenX/Pyfa
gui/fitCommands/gui/fitSystemSecurity.py
2
1237
import wx from service.fit import Fit import eos.db import gui.mainFrame from gui import globalEvents as GE from gui.fitCommands.helpers import InternalCommandHistory from gui.fitCommands.calc.fitSystemSecurity import CalcChangeFitSystemSecurityCommand class GuiChangeFitSystemSecurityCommand(wx.Command): def __...
gpl-3.0
7,244,813,104,851,156,000
33.361111
96
0.692805
false
LihanHA/opencademy-project
opencademy/model/openacademy_session.py
1
4454
# -*- coding: utf-8 -*- from datetime import timedelta from openerp import api, exceptions, fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date(default=fields.Date.today) duration = fields.Float(digits=(6, 2), help=...
apache-2.0
6,893,109,974,236,220,000
37.068376
91
0.552762
false
LS80/script.module.livestreamer
lib/livestreamer/plugins/beattv.py
34
10334
import re from collections import namedtuple from io import BytesIO try: from Crypto.Cipher import AES CAN_DECRYPT = True except ImportError: CAN_DECRYPT = False from livestreamer.compat import range from livestreamer.exceptions import StreamError from livestreamer.packages.flashmedia.tag import ( AAC...
bsd-2-clause
-8,333,562,598,399,676,000
30.993808
80
0.513257
false
mSenyor/sl4a
python/src/Lib/lib2to3/fixes/fix_print.py
53
2957
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for print. Change: 'print' into 'print()' 'print ...' into 'print(...)' 'print ... ,' into 'print(..., end=" ")' 'print >>x, ...' into 'print(..., file=x)' No changes are appl...
apache-2.0
-9,065,634,751,516,686,000
31.855556
78
0.522151
false
denniszollo/libsbp
python/sbp/observation.py
2
5567
#!/usr/bin/env python # Copyright (C) 2015 Swift Navigation Inc. # Contact: Fergus Noble <fergus@swiftnav.com> # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITH...
lgpl-3.0
935,235,869,153,885,800
22.794872
81
0.630501
false
robovm/robovm-studio
python/lib/Lib/email/test/test_email.py
84
118877
# Copyright (C) 2001-2007 Python Software Foundation # Contact: email-sig@python.org # email package unit tests import os import sys import time import base64 import difflib import unittest import warnings from cStringIO import StringIO import email from email.Charset import Charset from email.Header import Header, ...
apache-2.0
-584,233,532,601,540,100
34.914502
460
0.606383
false
nelmiux/CarnotKE
jyhton/lib-python/2.7/xml/etree/ElementPath.py
273
9475
# # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # 2007-09-10 fl new selection engine # 2007-09-12 fl fix...
apache-2.0
5,261,183,781,088,817,000
30.270627
79
0.55124
false
Lekanich/intellij-community
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_raise.py
327
2934
"""Fixer for 'raise E, V, T' raise -> raise raise E -> raise E raise E, V -> raise E(V) raise E, V, T -> raise E(V).with_traceback(T) raise E, None, T -> raise E.with_traceback(T) raise (((E, E'), E''), E'''), V -> raise E(V) raise "foo", V, T -> warns about string exceptions CAVEATS:...
apache-2.0
2,761,171,487,292,454,000
31.6
80
0.5409
false
coderbone/SickRage
lib/sqlalchemy/sql/elements.py
75
117708
# sql/elements.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Core SQL expression elements, including :class:`.ClauseElement`, :class:`.ColumnEle...
gpl-3.0
985,854,566,332,714,000
33.108374
95
0.591583
false
icoxfog417/music_hack_day_onpasha
scripts/create_photo_to_mood_data.py
1
2393
import os from datetime import datetime from api.bluemix_vision_recognition import VisionRecognizer from api.echonest import Echonest def read_file(path): lines = [] with open(path, "r", encoding="utf-8") as f: lines = f.readlines() lines = [ln.strip(os.linesep) for ln in lines] return li...
mit
7,160,636,083,313,858,000
26.825581
101
0.536565
false
scue/vim-ycm_win7
third_party/pythonfutures/setup.py
65
1249
#!/usr/bin/env python import sys extras = {} try: from setuptools import setup extras['zip_safe'] = False if sys.version_info < (2, 6): extras['install_requires'] = ['multiprocessing'] except ImportError: from distutils.core import setup setup(name='futures', version='2.1.4', descr...
gpl-3.0
-6,041,618,852,216,506,000
36.848485
79
0.586069
false
Noilednad/BonjourBrowser
mDNSShared/src/main/jni/mDNSPosix/parselog.py
10
10080
#!/usr/bin/python # Emacs settings: -*- tab-width: 4 -*- # # Copyright (c) 2002-2003 Apple Computer, 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://...
apache-2.0
3,828,264,196,944,051,000
39.809717
146
0.633333
false
teamfx/openjfx-9-dev-rt
modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/common/net/regressionwindow.py
165
2381
# Copyright (C) 2010 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 ...
gpl-2.0
-7,778,778,702,729,459,000
44.788462
110
0.738765
false
phassoa/openelisglobal-core
liquibase/OE4.2/testCatalogCI_LNSP/scripts/createLocalCode.py
25
1703
#!/usr/bin/env python # -*- coding: utf-8 -*- def trim( name, length): if len( name ) <= length: return name else: last_space = name.find(" ") if last_space == -1: return name[:35] else: return trim( name[:last_space], length) def translate(...
mpl-2.0
-277,406,562,653,564,670
25.031746
122
0.610687
false
martinling/imusim
imusim/trajectories/sampled.py
2
5624
""" Classes representing sampled trajectories. Sampled trajectories do not support evaluation of derivative values such as velocities or accelerations. To evaulate these properties a splined trajectory should be constructed. See L{splined} """ # Copyright (C) 2009-2011 University of Edinburgh # # This file is part of ...
gpl-3.0
-127,244,881,592,103,980
31.697674
92
0.668385
false
sajeeshcs/nested_quota_final
nova/objects/pci_device_pool.py
4
3410
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # 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/LICEN...
apache-2.0
2,686,553,089,199,280,000
34.154639
79
0.635191
false
KaranToor/MA450
google-cloud-sdk/platform/gsutil/third_party/boto/tests/__init__.py
454
1103
# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
apache-2.0
4,233,306,265,306,252,000
54.15
74
0.771532
false
studio666/gnuradio
gr-atsc/python/atsc/__init__.py
57
1161
# # Copyright 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 option) # any later version. # #...
gpl-3.0
-5,756,616,995,450,025,000
33.147059
77
0.732989
false
yb-kim/gemV
ext/ply/test/testyacc.py
93
14230
# testyacc.py import unittest try: import StringIO except ImportError: import io as StringIO import sys import os sys.path.insert(0,"..") sys.tracebacklimit = 0 import ply.yacc def check_expected(result,expected): resultlines = [] for line in result.splitlines(): if line.startswith("WARNING...
bsd-3-clause
-6,314,516,114,131,999,000
42.919753
132
0.483907
false
vybstat/scikit-learn
sklearn/covariance/empirical_covariance_.py
101
9133
""" Maximum likelihood covariance estimator. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause # avoid division truncation from __future__ import division import warnin...
bsd-3-clause
-8,887,547,006,246,189,000
30.8223
79
0.611738
false
aswinpj/Pygments
pygments/lexers/go.py
47
3701
# -*- coding: utf-8 -*- """ pygments.lexers.go ~~~~~~~~~~~~~~~~~~ Lexers for the Google Go language. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, words from pygments.token...
bsd-2-clause
-2,166,703,204,542,441,700
35.643564
77
0.41043
false
Demolisty24/AlexaFood-Backend
venv/Lib/site-packages/jinja2/tests.py
336
4131
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from collections import Mapping from jinja2.runtime import Undefined from jinja2._compat impor...
mit
-7,923,109,922,659,945,000
22.878613
79
0.600581
false
amcgee/pymomo
test/test_utilities/test_settings_dir.py
2
1243
from pymomo.utilities import build from nose.tools import * import unittest import os.path import os import platform from pymomo.exceptions import * from pymomo.utilities.paths import MomoPaths class TestSettingsDirectory: def setUp(self): self.paths = MomoPaths() self.confdir = os.path.join(os.path.expanduser('~...
lgpl-3.0
-6,397,161,041,763,518,000
30.1
96
0.721641
false
makhtardiouf/makhtardiouf.github.io
angularcode/node_modules/node-gyp/gyp/pylib/gyp/input.py
713
115880
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
mit
8,293,769,351,273,783,000
39.041465
80
0.654677
false
IsCoolEntertainment/debpkg_python-boto
boto/sdb/db/manager/__init__.py
173
4210
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
mit
-7,826,809,429,681,001,000
48.529412
81
0.656057
false
yu239/Paddle
paddle/scripts/cluster_train/conf.py
20
1113
# Copyright (c) 2016 PaddlePaddle 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 applic...
apache-2.0
-2,799,164,372,014,707,000
29.081081
74
0.743037
false
guthemberg/yanoama
yanoama/pilot/system/server.py
1
5045
#!/home/upmc_aren/python_env/bin/python import SocketServer from threading import Thread import subprocess """ run few command on remote node in yanoama commands are coded two comma-separated integers only codes list: 0,0: update main sources 0,1: bootstrap 0,2: shutdown (kill pilot and amend) 0,3: start amen d...
bsd-3-clause
-507,616,005,848,767,740
34.787234
110
0.54668
false
drawquest/drawquest-web
website/drawquest/apps/bounces/migrations/0002_auto__add_complaint.py
1
1899
# 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): # Adding model 'Complaint' db.create_table('bounces_complaint', ( ('id', self.gf('django.db.mo...
bsd-3-clause
1,656,043,937,656,027,100
39.404255
111
0.559242
false
chinesebear/rtt-net
rtt-2.1/tools/menuconfig.py
6
1266
import os # make rtconfig.h from .config def mk_rtconfig(filename): try: config = file(filename) except: print 'open .config failed' return rtconfig = file('rtconfig.h', 'w') rtconfig.write('#ifndef RT_CONFIG_H__\n') rtconfig.write('#define RT_CONFIG_H__\n\n') empty_l...
mit
-1,870,048,694,911,240,400
23.823529
80
0.460506
false
myarjunar/QGIS
python/plugins/processing/algs/gdal/ui/RasterOptionsWidget.py
2
2746
# -*- coding: utf-8 -*- """ *************************************************************************** RasterOptionsWidget.py --------------------- Date : December 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com ****...
gpl-2.0
6,475,239,732,441,683,000
37.138889
89
0.532411
false
un33k/CouchPotatoServer
libs/tornado/concurrent.py
65
16799
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
gpl-3.0
1,708,642,628,773,938,200
35.519565
80
0.635038
false
jgao54/airflow
tests/contrib/hooks/test_emr_hook.py
3
2877
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
-8,964,108,048,432,123,000
35.417722
84
0.6618
false
PriceChild/ansible
lib/ansible/modules/cloud/misc/proxmox_kvm.py
6
47830
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Abdoul Bah (@helldorado) <bahabdoul at gmail.com> """ Ansible module to manage Qemu(KVM) instance in Proxmox VE cluster. This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr...
gpl-3.0
5,748,817,913,824,327,000
37.555287
173
0.589512
false
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/scons-2.1.0/SCons/Tool/mslib.py
21
2227
"""SCons.Tool.mslib Tool-specific initialization for lib (MicroSoft library archiver). 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, ...
gpl-2.0
-6,042,112,690,616,791,000
33.796875
101
0.732824
false
avlasov-mos-de/mos-tempest-runner
setup.py
608
1045
#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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 # # Unle...
apache-2.0
-5,796,865,135,103,321,000
33.833333
69
0.748325
false
fnouama/intellij-community
python/testData/inspections/PyMissingConstructorInspection/py3k.py
83
1072
class A(object): def __init__(self): pass class AA(A): def __init__(self): A.__init__(self) print("Constructor AA was called") class B(A): def <warning descr="Call to __init__ of super class is missed">__init__</warning>(self): print("Constructor B was called") class C(B): def __init__(self):...
apache-2.0
-6,836,779,689,437,815,000
21.829787
90
0.599813
false
EdLogan18/logan-repository
plugin.video.MediaPlay-TV/pkcs7.py
111
1943
import binascii import StringIO class PKCS7Encoder(object): ''' RFC 2315: PKCS#7 page 21 Some content-encryption algorithms assume the input length is a multiple of k octets, where k > 1, and let the application define a method for handling inputs whose lengths are not a multiple of k octets. F...
gpl-2.0
-8,250,314,485,210,071,000
33.714286
80
0.586207
false
priyaganti/rockstor-core
src/rockstor/smart_manager/replication/listener_broker.py
2
15022
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
gpl-3.0
-8,138,817,528,684,021,000
45.079755
109
0.496605
false
cfchou/choreography
choreography/launcher.py
1
2392
import sys import asyncio import os import types import functools from collections import namedtuple from collections.abc import Iterator import abc from typing import List, Union, NamedTuple import uuid import yaml import logging log = logging.getLogger(__name__) Fire = NamedTuple('Fire', [('rate', int), ('duratio...
bsd-3-clause
-2,223,003,446,272,774,700
26.494253
80
0.607023
false
kalyanjvn1/selenium
py/selenium/webdriver/remote/errorhandler.py
14
9131
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
6,060,952,931,115,738,000
45.350254
90
0.591611
false
bpsinc-native/src_third_party_scons-2.0.1
engine/SCons/Tool/dvi.py
61
2388
"""SCons.Tool.dvi Common DVI Builder definition for various other Tool modules that use it. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated document...
mit
5,778,298,330,106,382,000
36.3125
95
0.662898
false
Vimjas/covimerage
tests/test_coveragepy.py
1
8791
import sys import attr import coverage import pytest from covimerage._compat import StringIO def test_filereporter(): from covimerage.coveragepy import FileReporter f = FileReporter('/doesnotexist') assert repr(f) == "<CovimerageFileReporter '/doesnotexist'>" with pytest.raises(coverage.misc.NoSou...
mit
8,001,872,514,075,833,000
35.326446
262
0.666477
false
CloverHealth/airflow
airflow/operators/redshift_to_s3_operator.py
8
5885
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
6,408,786,129,354,267,000
41.338129
87
0.549873
false
sw25sw25/Docker
pip/_vendor/distlib/locators.py
203
48796
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2014 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import gzip from io import BytesIO import json import logging import os import posixpath import re try: import threading except Impo...
mit
-7,789,882,388,270,767,000
38.57502
95
0.524961
false