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
tectronics/romcollectionbrowser
resources/lib/xbmc.py
10
7106
""" This is a dummy file for testing and debugging XBMC plugins from the command line. The file contains definitions for the functions found in xbmc, xbmcgui and xbmcplugin built in modules """ import os _loglevel = 1 _settings = {'external_filemanaging': 'true'} _filename = 'dummy.log' _loge...
gpl-2.0
-6,074,602,894,010,318,000
30.605505
82
0.517872
false
FlorianLudwig/odoo
addons/website_forum_doc/models/documentation.py
368
3222
# -*- coding: utf-8 -*- from openerp.osv import osv, fields class Documentation(osv.Model): _name = 'forum.documentation.toc' _description = 'Documentation ToC' _inherit = ['website.seo.metadata'] _order = "parent_left" _parent_order = "sequence, name" _parent_store = True def name_get(s...
agpl-3.0
167,103,498,429,713,060
36.465116
119
0.612973
false
chauhanhardik/populo
lms/djangoapps/courseware/tests/test_favicon.py
125
1841
from django.conf import settings from django.core.urlresolvers import clear_url_caches, resolve from django.test import TestCase from django.test.utils import override_settings from mock import patch from nose.plugins.attrib import attr import sys @attr('shard_1') class FaviconTestCase(TestCase): def setUp(se...
agpl-3.0
-3,687,067,008,351,536,000
30.20339
76
0.631722
false
giovannipro/map-the-glam
scraper/scrape/scrape_files-in-category.py
1
4999
#!/usr/bin/env python # -*- coding: utf-8 -*- # Get files in category import os # get file path import sys # reset file encoding import webbrowser # open webpages import urllib, json, io # read json from urllib import urlopen # open file import time # get unix code import csv # rea...
gpl-3.0
-4,493,517,156,566,938,600
20.333333
242
0.559896
false
alexrao/YouCompleteMe
third_party/ycmd/ycmd/completers/all/tests/identifier_completer_test.py
34
4504
#!/usr/bin/env python # # Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 you...
gpl-3.0
-3,338,476,765,638,530,600
34.464567
80
0.645426
false
yongshengwang/hue
apps/oozie/src/oozie/decorators.py
25
6936
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
920,019,354,425,582,100
31.56338
94
0.673299
false
blaggacao/OpenUpgrade
addons/sale_crm/sale_crm.py
320
1429
# -*- 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,117,507,165,543,268,000
46.633333
165
0.590623
false
maelstromio/maelstrom-py
maelstrom/cass_conn.py
2
1462
from cassandra.cluster import Cluster, NoHostAvailable from cassandra.decoder import dict_factory class CassandraConnection(object): ip = None kp = None def __init__(self, cass_ip, cass_kp): self.ip = cass_ip self.kp = cass_kp try: self.cluster = Cluster(contact_point...
mit
6,096,069,185,030,545,000
28.836735
71
0.606703
false
project-em/ns3-sentiment
stance/topic_scoring.py
1
1539
from gensim.models import KeyedVectors from nltk import pos_tag from nltk import word_tokenize import numpy as np word2vec_filepath = "./data/GoogleNews-vectors-negative300.bin" # word2vec similarity between the topic and the nouns of the candidate sentence def nouns_sim(word2vec, sentences, tagged_sentences, tagged_...
mit
-5,260,553,732,780,192,000
43
83
0.68616
false
jirikuncar/invenio
invenio/modules/records/views.py
2
12269
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your...
gpl-2.0
-8,130,578,200,571,831,000
40.033445
82
0.6342
false
telwertowski/QGIS
tests/src/python/test_qgsserver_plugins.py
13
9203
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer plugins and filters. From build dir, run: ctest -R PyQgsServerPlugins -V .. note:: 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 ve...
gpl-2.0
3,608,921,103,104,923,000
36.259109
132
0.625448
false
sumedhasingla/VTK
ThirdParty/Twisted/twisted/protocols/policies.py
35
20735
# -*- test-case-name: twisted.test.test_policies -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Resource limiting policies. @seealso: See also L{twisted.protocols.htb} for rate limiting. """ from __future__ import division, absolute_import # system imports import sys from zope.inte...
bsd-3-clause
-5,040,850,866,561,217,000
27.134328
87
0.636315
false
messense/wechat-bot
plugins/oschina.py
3
1103
#coding=utf-8 import requests from xml.etree import ElementTree from tornado.util import ObjectDict __name__ = 'oschina' def test(data, msg=None, bot=None): if ('oschina' in data or '开源中国' in data) and '最新' in data and '新闻' in data: return True return False def respond(data, msg=None, bot=None): ...
mit
6,376,500,353,982,366,000
28.378378
79
0.596136
false
dendisuhubdy/tensorflow
tensorflow/python/data/kernel_tests/shard_dataset_op_test.py
42
4218
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-8,875,390,334,397,139,000
37
80
0.693457
false
jaggu303619/asylum-v2.0
openerp/addons/base_status/__init__.py
61
1087
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
6,804,803,889,441,453,000
42.48
78
0.620975
false
rfk/regobj
setup.py
1
1664
# # This is the regobj setuptools script. # Originally developed by Ryan Kelly, 2009. # # This script is placed in the public domain. # from distutils.core import setup # Safely extract the docstring and version info from the module. # If we did a straight `import regobj` here we wouldn't be able # to build on ...
mit
-8,241,992,351,577,127,000
25
69
0.608774
false
tntC4stl3/scrapy
tests/test_downloadermiddleware_httpproxy.py
103
3439
import os import sys from twisted.trial.unittest import TestCase, SkipTest from scrapy.downloadermiddlewares.httpproxy import HttpProxyMiddleware from scrapy.exceptions import NotConfigured from scrapy.http import Response, Request from scrapy.spiders import Spider spider = Spider('foo') class TestDefaultHeadersMidd...
bsd-3-clause
139,675,568,144,965,630
36.791209
87
0.626636
false
fcurella/python-packager
pypackager/utils.py
1
1184
import collections def unflatten_dict(a_dict): resultDict = {} for key, value in a_dict.items(): parts = key.split("-") d = resultDict for part in parts[:-1]: if part not in d: d[part] = {} d = d[part] d[parts[-1]] = value return resu...
mit
-4,501,054,381,126,603,300
21.769231
59
0.52027
false
Affix/CouchPotatoServer
libs/tornado/platform/posix.py
352
1859
#!/usr/bin/env python # # Copyright 2011 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
-6,236,885,699,270,262,000
25.557143
80
0.63475
false
naototty/pyflag
src/plugins_old/MemoryForensics/Volatility-1.3_Linux_rc.1/forensics/win32/executable.py
7
12379
# Volatility # Copyright (C) 2007,2008 Volatile Systems # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # 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 o...
gpl-2.0
-2,563,227,977,626,638,000
39.854785
135
0.622587
false
leilihh/nova
nova/tests/network/test_neutronv2.py
2
107698
# Copyright 2012 OpenStack Foundation # 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 requi...
apache-2.0
7,555,221,231,238,483,000
43.799501
79
0.538534
false
bkahlert/seqan-research
raw/pmbs12/pmsb13-data-20120615/trunk/misc/seqan_instrumentation/bin/classes/simplejson/tests/test_indent.py
78
2570
from unittest import TestCase import simplejson as json import textwrap from StringIO import StringIO class TestIndent(TestCase): def test_indent(self): h = [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth', {'nifty': 87}, {'field': 'yes', 'morefield': False} ...
mit
651,819,938,553,049,700
28.895349
79
0.499222
false
smartforceplus/SmartForceplus
addons/website_partner/__openerp__.py
383
1498
# -*- 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
647,137,763,462,543,600
36.45
85
0.585447
false
unsiloai/syntaxnet-ops-hack
tensorflow/python/ops/logging_ops.py
64
14358
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,000,826,595,461,324,700
39.331461
120
0.698426
false
tedder/ansible
lib/ansible/module_utils/utm_utils.py
44
10446
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
-6,452,251,556,412,704,000
43.641026
120
0.607984
false
shahar-stratoscale/nova
nova/tests/cells/test_cells_messaging.py
1
89277
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2013 Red Hat, 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/license...
apache-2.0
-6,350,815,522,849,524,000
41.921635
83
0.552427
false
marckuz/django
tests/admin_changelist/tests.py
55
41903
from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminS...
bsd-3-clause
-599,807,907,007,786,400
45.047253
115
0.625421
false
WebSpider/headphones
lib/apscheduler/schedulers/background.py
33
1468
from __future__ import absolute_import from threading import Thread, Event from apscheduler.schedulers.base import BaseScheduler from apscheduler.schedulers.blocking import BlockingScheduler from apscheduler.util import asbool class BackgroundScheduler(BlockingScheduler): """ A scheduler that runs in the bac...
gpl-3.0
4,913,496,602,012,336,000
36.641026
107
0.582425
false
Ramalus/kivy
examples/widgets/effectwidget3_advanced.py
43
1665
''' This example demonstrates creating and usind an AdvancedEffectBase. In this case, we use it to efficiently pass the touch coordinates into the shader. ''' from kivy.base import runTouchApp from kivy.properties import ListProperty from kivy.lang import Builder from kivy.uix.effectwidget import EffectWidget, Advance...
mit
3,270,901,335,785,110,500
25.854839
79
0.655255
false
pataquets/phantomjs
src/qt/qtbase/src/3rdparty/freetype/src/tools/chktrcmp.py
381
3826
#!/usr/bin/env python # # Check trace components in FreeType 2 source. # Author: suzuki toshiya, 2009 # # This code is explicitly into the public domain. import sys import os import re SRC_FILE_LIST = [] USED_COMPONENT = {} KNOWN_COMPONENT = {} SRC_FILE_DIRS = [ "src" ] TRACE_DEF_FILES = [ "include/freetype/in...
bsd-3-clause
-5,228,168,059,712,909,000
32.561404
99
0.55724
false
meteorcloudy/tensorflow
tensorflow/contrib/mixed_precision/python/loss_scale_manager.py
12
7768
# 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
-5,640,213,478,663,735,000
37.84
80
0.685247
false
deepinsight/Deformable-ConvNets
deeplab/function/test_deeplab.py
1
3137
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2016 by Contributors # Copyright (c) 2017 Microsoft # Licensed under The Apache-2.0 License [see LICENSE for details] # Modified by Zheng Zhang # -------------------------------------------------------- impor...
apache-2.0
-6,273,812,162,975,219,000
39.217949
123
0.636595
false
zerobatu/edx-platform
lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py
188
5642
# -*- 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 field 'GeneratedCertificate.error_reason' db.add_column('certificates_generatedcertificate', 'error...
agpl-3.0
-1,758,629,312,078,725,000
71.333333
182
0.559908
false
rizar/attention-lvcsr
libs/Theano/theano/tensor/tests/test_keepdims.py
3
3963
import unittest import numpy import theano from theano import tensor, function from theano.tests.unittest_tools import attr # this tests other ops to ensure they keep the dimensions of their # inputs correctly class TestKeepDims(unittest.TestCase): def makeKeepDims_local(self, x, y, axis): if axis is N...
mit
604,733,477,545,555,500
36.742857
79
0.434015
false
squarerootfury/distrochooser
backend/distrochooser/migrations/0017_auto_20190406_1159.py
2
1484
# Generated by Django 2.1.2 on 2019-04-06 09:59 import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('distrochooser', '0016_auto_20190331_1356'), ] operations = [ migrations.Creat...
mit
3,140,782,645,100,588,000
39.222222
138
0.600404
false
dset0x/invenio-workflows
invenio_workflows/logger.py
5
3182
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2013, 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any l...
gpl-2.0
-1,776,744,268,231,804,700
31.804124
77
0.670019
false
nitely/Spirit
spirit/topic/views.py
1
3867
# -*- coding: utf-8 -*- from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponsePermanentRedirect from djconfig import config from spirit.core.utils.views import is_post, post_data from spirit.core.utils.paginator ...
mit
-6,305,039,355,794,925,000
28.976744
75
0.62736
false
rhertzog/django
django/core/management/commands/runserver.py
64
6371
from __future__ import unicode_literals import errno import os import re import socket import sys from datetime import datetime from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.core.servers.basehttp import get_internal_wsgi_application, run from django.uti...
bsd-3-clause
-4,276,398,832,716,991,500
37.612121
88
0.574321
false
gdimitris/ChessPuzzlerBackend
Virtual_Environment/lib/python2.7/site-packages/setuptools/command/install_scripts.py
505
2231
from distutils import log import distutils.command.install_scripts as orig import os from pkg_resources import Distribution, PathMetadata, ensure_directory class install_scripts(orig.install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" def initialize_options(self): ori...
mit
-5,115,137,933,950,333,000
36.183333
79
0.619901
false
arbrandes/edx-platform
lms/djangoapps/mobile_api/tests/test_mobile_platform.py
5
2631
""" Tests for Platform against Mobile App Request """ import ddt from django.test import TestCase from lms.djangoapps.mobile_api.mobile_platform import MobilePlatform @ddt.ddt class TestMobilePlatform(TestCase): """ Tests for platform against mobile app request """ @ddt.data( ("edX/org.edx...
agpl-3.0
7,238,044,049,031,996,000
53.8125
176
0.624097
false
shell909090/shadowsocks
shadowsocks/crypto/rc4_md5.py
15
1393
#!/usr/bin/env python # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
-6,587,303,546,728,628,000
26.313725
77
0.666906
false
pp-mo/iris
docs/iris/example_code/Oceanography/atlantic_profiles.py
2
3469
""" Oceanographic profiles and T-S diagrams ======================================= This example demonstrates how to plot vertical profiles of different variables in the same axes, and how to make a scatter plot of two variables. There is an oceanographic theme but the same techniques are equally applicable to atmosph...
lgpl-3.0
1,903,098,109,981,897,500
36.706522
79
0.675699
false
mne-tools/mne-tools.github.io
0.16/_downloads/plot_stats_cluster_time_frequency_repeated_measures_anova.py
7
10025
""" ==================================================================== Mass-univariate twoway repeated measures ANOVA on single trial power ==================================================================== This script shows how to conduct a mass-univariate repeated measures ANOVA. As the model to be fitted assume...
bsd-3-clause
-8,632,850,530,388,789,000
41.121849
79
0.609776
false
lizardsystem/lizard-rijnmond
lizard_rijnmond/migrations/0006_auto__chg_field_strategy_name.py
1
2731
# 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): # Changing field 'Strategy.name' db.alter_column('lizard_rijnmond_strategy', 'name', self.gf('django.db.mo...
gpl-3.0
8,822,931,379,048,354,000
49.574074
149
0.549616
false
rec/echomesh
code/python/echomesh/util/string/Split_test.py
1
1508
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.util.string.Split import split_words, pair_split from echomesh.util.TestCase import TestCase class SplitTest(TestCase): def test_split_simple(self): self.assertEqual(split_words('hello, there!'), ['hello,', 't...
mit
-9,110,523,621,258,813,000
35.780488
82
0.604111
false
Boussadia/weboob
modules/guerrillamail/browser.py
2
2689
# -*- coding: utf-8 -*- # Copyright(C) 2013 Vincent A # # This file is part of weboob. # # weboob 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 opt...
agpl-3.0
1,501,075,490,850,939,100
37.414286
131
0.642618
false
mastbaum/rat-pac
python/SCons/Tool/yacc.py
19
4762
"""SCons.Tool.yacc Tool-specific initialization for yacc. 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 The SCons Foundation # # Permi...
bsd-3-clause
-715,094,160,323,088,100
35.351145
89
0.673667
false
Webstr-framework/webstr
webstr/patternfly/modal/pages.py
1
1363
""" Page objects for patternfly/bootstrap modal window. Modal window is a window which makes itself the only active element on the page, so that one needs to close it first to access the rest of the page again. """ # Copyright 2016 Red Hat # # Licensed under the Apache License, Version 2.0 (the "License"); # you may ...
apache-2.0
-6,478,987,187,936,774,000
31.452381
79
0.708731
false
mpare002/HackTech_2017
env/Lib/site-packages/pip/_vendor/html5lib/sanitizer.py
805
16428
from __future__ import absolute_import, division, unicode_literals import re from xml.sax.saxutils import escape, unescape from .tokenizer import HTMLTokenizer from .constants import tokenTypes class HTMLSanitizerMixin(object): """ sanitization of XHTML+MathML+SVG and of inline style attributes.""" accepta...
mit
8,027,397,700,027,228,000
59.619926
146
0.48113
false
dims/ironic
ironic/tests/unit/drivers/test_pxe.py
3
14871
# Copyright 2015 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 # # Unless required by applicabl...
apache-2.0
6,540,666,287,389,655,000
43.657658
78
0.69148
false
anastasia-tarasova/indy-sdk
docs/how-tos/negotiate-proof/python/step4.py
2
1123
print_log('\n10. Prover creates Proof for Proof Request\n') cred_for_attr_1 = creds_for_proof_request['attrs']['attr1_referent'] referent = cred_for_attr_1[0]['referent'] print_log('Referent: ') pprint.pprint(referent) chosen_claims_json = json.dumps({ 'self_a...
apache-2.0
-3,332,161,356,036,036,600
45.791667
109
0.568121
false
pullao/Farspeaker
app/main/routes.py
1
1698
import flask from . import main from . import forms import os from werkzeug import secure_filename from flask import Flask, render_template, request from . import activeCampaign @main.route('/', methods=['GET', 'POST']) def index(): """"Login form to enter a room.""" form = forms.LoginForm() if form.val...
mit
3,092,284,795,367,993,000
34.395833
98
0.654299
false
ifding/ifding.github.io
stylegan2-ada/dnnlib/tflib/tfutil.py
1
10240
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and re...
mit
-1,563,122,325,470,406,700
38.076336
173
0.656281
false
havellay/ADBMS_ABY
libevent/event_rpcgen.py
159
45222
#!/usr/bin/env python # # Copyright (c) 2005 Niels Provos <provos@citi.umich.edu> # All rights reserved. # # Generates marshaling code based on libevent. import sys import re # _NAME = "event_rpcgen.py" _VERSION = "0.1" _STRUCT_RE = '[a-z][a-z_0-9]*' # Globals line_count = 0 white = re.compile(r'^\s+') cppcomment =...
gpl-2.0
7,228,248,898,105,556,000
30.913903
79
0.461081
false
loansindi/linux
tools/perf/scripts/python/export-to-postgresql.py
617
16128
# export-to-postgresql.py: export perf data to a postgresql database # Copyright (c) 2014, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # Thi...
gpl-2.0
4,198,755,018,888,655,400
35.324324
341
0.675471
false
ndawe/pyAMI
pyAMI/extern/ZSI/generate/commands.py
1
13219
############################################################################ # Joshua Boverhof<JRBoverhof@lbl.gov>, LBNL # Monte Goode <MMGoode@lbl.gov>, LBNL # See Copyright for copyright notice! ############################################################################ import exceptions, sys, optparse, os, warning...
gpl-3.0
-1,188,728,679,418,026,200
42.483553
265
0.620319
false
webgeodatavore/django
tests/gis_tests/geoapp/test_feeds.py
292
4194
from __future__ import unicode_literals from xml.dom import minidom from django.conf import settings from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_settings, skipUnlessDBFeature, ) from .models import City @modify_settings(INSTALLED_APPS={'append': 'd...
bsd-3-clause
-343,949,678,802,863,600
45.6
103
0.642346
false
matthewalbani/scipy
scipy/stats/_continuous_distns.py
7
140183
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.misc.doccer import inherit_docstring_from from scipy import optimize from scipy import integrate impor...
bsd-3-clause
598,341,859,991,698,600
25.891042
93
0.512908
false
julienbou/heroku-buildpack-serpan
vendor/distribute-0.6.36/setuptools/command/alias.py
135
2477
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in ...
mit
3,129,471,614,083,165,700
29.207317
78
0.570448
false
rakeshmi/tempest
tempest/tests/cmd/test_tempest_init.py
14
2793
# Copyright 2015 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 # # Unless required by applicabl...
apache-2.0
8,404,547,855,701,137,000
41.318182
75
0.667025
false
logituit/Recbot
IMDbPY-5.1.1/bin/search_character.py
7
1413
#!/usr/bin/env python """ search_character.py Usage: search_character "character name" Search for the given name and print the results. """ import sys # Import the IMDbPY package. try: import imdb except ImportError: print 'You bad boy! You need to install the IMDbPY package!' sys.exit(1) if len(sys....
mit
-8,265,129,598,853,831,000
25.166667
80
0.631989
false
fpiot/mbed-ats
workspace_tools/toolchains/gcc.py
2
10915
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
-4,757,811,871,748,410,000
41.470817
207
0.563628
false
jwlawson/tensorflow
tensorflow/contrib/training/python/training/device_setter_test.py
54
5692
# 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
3,185,377,457,820,766,000
42.121212
90
0.677969
false
proxysh/Safejumper-for-Desktop
buildmac/Resources/env/lib/python2.7/site-packages/twisted/test/test_ident.py
10
7012
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.protocols.ident module. """ import struct from twisted.protocols import ident from twisted.python import failure from twisted.internet import error from twisted.internet import defer from twisted.python.compat import ...
gpl-2.0
1,171,687,372,682,792,000
29.094421
78
0.57858
false
aaronsw/pytorctl
TorCtl/TorCtl.py
1
64194
#!/usr/bin/python # TorCtl.py -- Python module to interface with Tor Control interface. # Copyright 2005 Nick Mathewson # Copyright 2007-2010 Mike Perry. See LICENSE file. """ Library to control Tor processes. This library handles sending commands, parsing responses, and delivering events to and from the control port...
bsd-3-clause
-4,473,490,983,574,690,000
33.037116
154
0.61526
false
zfrenchee/pandas
pandas/tests/frame/test_nonunique_indexes.py
2
18505
# -*- coding: utf-8 -*- from __future__ import print_function import pytest import numpy as np from pandas.compat import lrange, u from pandas import DataFrame, Series, MultiIndex, date_range import pandas as pd from pandas.util.testing import assert_series_equal, assert_frame_equal import pandas.util.testing as t...
bsd-3-clause
-4,812,676,342,669,571,000
37.761006
79
0.43653
false
adviti/melange
thirdparty/google_appengine/lib/django_1_2/django/contrib/sessions/backends/db.py
81
2716
import datetime from django.conf import settings from django.contrib.sessions.models import Session from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.exceptions import SuspiciousOperation from django.db import IntegrityError, transaction, router from django.utils.encoding impor...
apache-2.0
-1,333,742,072,156,531,200
33.820513
79
0.591679
false
gmr/consulate
consulate/api/catalog.py
1
6410
""" Consul Catalog Endpoint Access """ from consulate.api import base class Catalog(base.Endpoint): """The Consul agent is the core process of Consul. The agent maintains membership information, registers services, runs checks, responds to queries and more. The agent must run on every node that is part o...
bsd-3-clause
-1,633,544,581,455,015,200
34.414365
78
0.603588
false
parksangkil/nw.js
tools/package_binaries.py
64
14511
#!/usr/bin/env python import argparse import getnwisrelease import getnwversion import gzip import os import platform import shutil import sys import tarfile import zipfile from subprocess import call steps = ['nw', 'chromedriver', 'symbol', 'headers', 'others'] ################################ # Parse command line a...
mit
-6,921,757,343,804,551,000
33.715311
105
0.525601
false
armpc/repo
subcmds/upload.py
1
10547
# # 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
1,783,933,273,954,636,800
31.155488
141
0.61809
false
quarkonics/zstack-woodpecker
zstackwoodpecker/zstackwoodpecker/ansible.py
2
2482
''' @author: YYK ''' import zstacklib.utils.shell as shell import zstacklib.utils.ssh as ssh import os.path import sys def check_and_install_ansible(): cmd = 'which ansible' try: shell.call(cmd) except: print('ansible is not installed. Will try to install ansible') cmd = 'pip inst...
apache-2.0
5,203,017,977,783,422,000
33.957746
164
0.649879
false
hasteur/hasteurbot_task_3
families/wikitravel_shared_family.py
4
1070
# -*- coding: utf-8 -*- __version__ = '$Id$' import family # The Wikitravel shared family class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'wikitravel_shared' self.langs = { 'wikitravel_shared': 'wikitravel.org', } se...
gpl-2.0
-4,825,586,269,900,782,000
22.26087
57
0.505607
false
jasonhamilton/hotwing-core
tests/test_coordinate.py
1
3883
import pytest import sys, os from decimal import Decimal myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') from hotwing_core import Coordinate class TestCoordinate(): def test_create_coordinate(self): x = 1 y = 1.4 c = Coordinate(x, y) assert ...
gpl-3.0
-2,159,357,841,565,515,500
24.379085
61
0.507082
false
elifeasley/metacademy-application
content_server/concepts.py
1
5579
import random import resources import string import work_estimates ID_LENGTH = 8 class Dependency: """A struct representing a dependency on another concept.""" def __init__(self, tag, reason, shortcut): self.tag = tag self.reason = reason assert type(shortcut) == int self.short...
gpl-3.0
-2,587,354,054,500,614,000
34.310127
124
0.596523
false
dazhaoniel/1kg-more
js1kg/message/views.py
1
2298
from django.shortcuts import render from django.utils import timezone from django.contrib.auth.decorators import login_required from django.db.models import Q from django.template import RequestContext from guardian.decorators import permission_required_or_403 from .models import MessageThread, Message from .forms impo...
apache-2.0
-40,729,602,650,162,820
34.353846
171
0.667972
false
alrusdi/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/null_fk_ordering/models.py
92
1357
""" Regression tests for proper working of ForeignKey(null=True). Tests these bugs: * #7512: including a nullable foreign key reference in Meta ordering has un xpected results """ from django.db import models # The first two models represent a very simple null FK ordering case. class Author(models.Model): n...
gpl-3.0
7,398,569,492,701,341,000
26.693878
79
0.694915
false
cneill/barbican
barbican/tests/api/controllers/test_acls.py
2
43919
# Copyright (c) 2015 Rackspace, 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 wr...
apache-2.0
3,805,588,206,709,276,000
40.708452
79
0.597076
false
RapidRatings/mongo-connector
mongo_connector/doc_managers/solr_doc_manager.py
1
8749
# Copyright 2013-2014 MongoDB, 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 writin...
apache-2.0
5,361,892,743,634,447,000
37.20524
80
0.577895
false
ekaputra07/gempa-monitor
lib/bs4/tests/test_html5lib.py
20
3910
"""Tests to ensure that the html5lib tree builder generates good trees.""" import warnings try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError, e: HTML5LIB_PRESENT = False from bs4.element import SoupStrainer from bs4.testing import ( HTML5TreeBuilderSmokeTest, ...
mit
7,234,605,472,198,142,000
34.87156
120
0.582609
false
gic888/MIEN
optimizers/arraystore.py
1
5947
#!/usr/bin/env python ## Copyright (C) 2005-2006 Graham I Cummins ## 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. ##...
gpl-2.0
2,148,524,550,057,005,300
29.497436
421
0.681016
false
tmeits/pybrain
pybrain/tools/neuralnets.py
26
13763
# Neural network data analysis tool collection. Makes heavy use of the logging module. # Can generate training curves during the run (from properly setup IPython and/or with # TkAgg backend and interactive mode - see matplotlib documentation). __author__ = "Martin Felder" __version__ = "$Id$" from pylab import ion, fi...
bsd-3-clause
5,836,558,505,911,237,000
45.972696
141
0.596527
false
xzturn/tensorflow
tensorflow/python/ops/control_flow_grad.py
49
9381
# 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
-4,692,137,691,025,234,000
37.604938
80
0.696941
false
eusi/MissionPlanerHM
Lib/site-packages/numpy/f2py/tests/test_callback.py
59
1707
from numpy.testing import * from numpy import array import math import util class TestF77Callback(util.F2PyTest): code = """ subroutine t(fun,a) integer a cf2py intent(out) a external fun call fun(a) end subroutine func(a) cf2py intent(in,out) a integer a ...
gpl-3.0
694,387,351,786,279,600
21.76
65
0.496192
false
ddki/my_study_project
language/python/frameworks/flask/venv/lib/python2.7/site-packages/setuptools/depends.py
336
5837
import sys import imp import marshal from distutils.version import StrictVersion from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from .py33compat import Bytecode __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' ] class Require: """A prerequisite to building o...
mit
-9,081,955,215,242,646,000
30.38172
78
0.604077
false
samuelmaudo/yepes
yepes/utils/unidecode/x0b6.py
253
4996
data = ( 'ddyels', # 0x00 'ddyelt', # 0x01 'ddyelp', # 0x02 'ddyelh', # 0x03 'ddyem', # 0x04 'ddyeb', # 0x05 'ddyebs', # 0x06 'ddyes', # 0x07 'ddyess', # 0x08 'ddyeng', # 0x09 'ddyej', # 0x0a 'ddyec', # 0x0b 'ddyek', # 0x0c 'ddyet', # 0x0d 'ddyep', # 0x0e 'ddyeh', # 0x0f ...
bsd-3-clause
88,345,810,736,691,070
18.364341
20
0.486189
false
arista-eosplus/ansible-modules-extras
cloud/webfaction/webfaction_app.py
75
6195
#!/usr/bin/python # # Create a Webfaction application using Ansible and the Webfaction API # # Valid application types can be found by looking here: # http://docs.webfaction.com/xmlrpc-api/apps.html#application-types # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015, with contributions...
gpl-3.0
-7,028,039,041,399,579,000
30.446701
353
0.612914
false
Chibin/gpdb
gpMgmt/bin/gppylib/testold/testDriver.py
4
7987
import sys from gppylib.gplog import * from gppylib.system.configurationInterface import * from gppylib.system import configurationImplTest, fileSystemImplTest, fileSystemInterface, osInterface, osImplTest, \ faultProberInterface, faultProberImplTest from gppylib.gparray import Segment logger = get_default_lo...
apache-2.0
-1,427,612,903,260,443,400
56.460432
187
0.43383
false
lidiamcfreitas/FenixScheduleMaker
ScheduleMaker/brython/www/src/Lib/encodings/cp875.py
37
13161
""" 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 deco...
bsd-2-clause
5,085,698,942,273,258,000
40.869707
116
0.514171
false
etuna-SBF-kog/Stadsparken
env/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py
102
5235
'''SSL with SNI-support for Python 2. This needs the following packages installed: * pyOpenSSL (tested with 0.13) * ndg-httpsclient (tested with 0.3.2) * pyasn1 (tested with 0.1.6) To activate it call :func:`~urllib3.contrib.pyopenssl.inject_into_urllib3`. This can be done in a ``sitecustomize`` module, or at any ot...
gpl-3.0
-9,089,285,101,330,471,000
30.347305
77
0.640115
false
recklessromeo/otm-core
opentreemap/importer/tasks.py
2
6486
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import json from celery import task, chord from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from treemap.models import Species from importer.mo...
agpl-3.0
7,103,373,730,241,934,000
27.447368
78
0.639069
false
tensorflow/estimator
tensorflow_estimator/python/estimator/canned/optimizers_test.py
1
3665
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,931,596,405,983,665,000
35.287129
107
0.71296
false
AuyaJackie/odoo
addons/stock_account/stock_account.py
77
19901
# -*- 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
91,207,175,889,447,380
60.015337
323
0.607109
false
hks-epod/configuration
util/jenkins/check-celery-queues.py
4
6892
import redis import click import boto3 import botocore import backoff from itertools import zip_longest max_tries = 5 class RedisWrapper(object): def __init__(self, *args, **kwargs): self.redis = redis.StrictRedis(*args, **kwargs) @backoff.on_exception(backoff.expo, (redis....
agpl-3.0
4,017,086,663,927,602,700
40.269461
83
0.534968
false
trulywireless/pjsip
pjsip-apps/build/get-footprint.py
59
12629
# $Id: get-footprint.py 1352 2007-06-08 01:41:25Z bennylp $ # # This file is used to generate PJSIP/PJMEDIA footprint report. # To use this file, just run it in pjsip-apps/build directory, to # produce footprint.txt and footprint.htm report files. # import os import sys import string import time compile_flags1 = [ ...
gpl-2.0
6,074,942,567,329,082,000
36.363905
131
0.611054
false
jelugbo/tundex
cms/djangoapps/contentstore/views/tests/test_course_index.py
6
15799
""" Unit tests for getting the list of courses and the course outline. """ import json import lxml import datetime from contentstore.tests.utils import CourseTestCase from contentstore.utils import reverse_course_url, add_instructor from contentstore.views.access import has_course_access from contentstore.views.course...
agpl-3.0
2,149,177,232,287,667,000
45.60472
130
0.666878
false
lra/boto
boto/dynamodb/layer2.py
135
33814
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without ...
mit
-7,552,811,509,845,518,000
40.952854
93
0.601171
false
riyazwalikar/pythonscripts
wp_attachenum/wp_attachenum.py
1
1546
import sys import requests from bs4 import BeautifulSoup def enumusers(url,p): r = requests.get(url + '/?attachment_id=' + str(p), allow_redirects=False) if r.status_code == 200: soup = BeautifulSoup(r.text) div=soup.find('div',{'class':'attachment'}) p ...
gpl-3.0
9,092,049,995,440,910,000
27.62963
255
0.570505
false
alaski/nova
nova/policy.py
1
8251
# Copyright (c) 2011 OpenStack Foundation # 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
3,511,702,768,120,621,000
35.188596
79
0.637983
false
tonnrueter/pymca_devel
PyMca/PCAModule.py
1
32607
#/*########################################################################## # Copyright (C) 2004-2012 European Synchrotron Radiation Facility # # This file is part of the PyMca X-ray Fluorescence Toolkit developed at # the ESRF by the Software group. # # This toolkit is free software; you can redistribute it and/or m...
gpl-2.0
1,534,757,138,738,095,000
35.885747
87
0.500598
false
CalciferZh/AMCParser
3Dviewer.py
1
7204
import pygame import numpy as np import time import transforms3d.euler as euler from amc_parser import * from OpenGL.GL import * from OpenGL.GLU import * class Viewer: def __init__(self, joints=None, motions=None): """ Display motion sequence in 3D. Parameter --------- joints: Dict returned fr...
mit
-5,953,946,003,460,421,000
28.165992
79
0.609245
false