repo_name
stringlengths
5
100
path
stringlengths
4
254
copies
stringlengths
1
5
size
stringlengths
4
7
content
stringlengths
681
1M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,298,349B
line_mean
float64
3.5
100
line_max
int64
15
1k
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
ratio
float64
1.5
8.15
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
johndpope/tensorflow
tensorflow/tensorboard/backend/application.py
24
26886
# 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
-6,497,820,005,484,346,000
35.931319
80
0.673734
false
3.919242
false
false
false
slandis/InkCutter
inkcutter/app/bin/device.py
1
3171
#!/usr/bin/env python # InkCutter, Plot HPGL directly from Inkscape. # device.py # # Copyright 2010 Jairus Martin <frmdstryr@gmail.com> # Copyright 2013 Shaun Landis <slandis@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-3.0
8,242,678,511,675,439,000
26.336207
107
0.674866
false
3.239019
false
false
false
HackerTool/vivisect
vstruct/defs/pcap.py
2
16024
import vstruct import vstruct.defs.inet as vs_inet from vstruct.primitives import * PCAP_LINKTYPE_ETHER = 1 PCAP_LINKTYPE_RAW = 101 PCAPNG_BOM = 0x1A2B3C4D OPT_ENDOFOPT = 0 OPT_COMMENT = 1 #PCAPNG_BLOCKTYPE_SECTION_HEADER options OPT_SHB_HARDWARE = 2 OPT_SHB_OS ...
apache-2.0
-2,379,434,446,897,924,000
31.503043
113
0.569958
false
3.328625
false
false
false
nemobis/BEIC
METS_fileSec_validator.py
1
1331
#!/usr/bin/python # -*- coding: utf-8 -*- """ Extractor to validate a METS file and check the existence and content of the files linked from each fileSec/fileGrp/file/FLocat tag, assumed to contain an MD5 checksum. The "md5sum" utility is required. """ # # (C) Federico Leva and Fondazione BEIC, 2018 # # Distr...
mit
3,287,267,885,847,843,000
31.463415
93
0.670173
false
3.05977
false
false
false
wizzomafizzo/flairbot
flairbot.py
1
5950
#!/usr/bin/env python3 """Reddit bot for updating user flairs via PM requests""" import sys import re import os import time import logging import logging.handlers import praw import OAuth2Util from config import cfg def setup_logging(): """Configure logging module for rotating logs and console output""" r...
mit
-8,983,526,375,439,880,000
28.455446
77
0.534118
false
4.225852
false
false
false
dllsf/odootest
addons/auth_signup/controllers/main.py
165
6011
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-4,256,783,637,298,582,000
46.330709
126
0.622359
false
4.162742
false
false
false
pkexcellent/luigi
examples/elasticsearch_index.py
57
3399
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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
-6,298,217,546,386,609,000
28.556522
105
0.639894
false
4.041617
false
false
false
therealfakemoot/collections2
collections2/dicts.py
2
2578
from collections import MutableMapping class OrderedDict(MutableMapping): '''OrderedDict is a mapping object that allows for ordered access and insertion of keys. With the exception of the key_index, insert, and reorder_keys methods behavior is identical to stock dictionary objects.''' def __init__(s...
mit
-4,717,889,050,585,243,000
30.439024
110
0.576804
false
4.212418
false
false
false
shootstar/ctest
ceilometer/agent.py
1
3976
# -*- encoding: utf-8 -*- # # Copyright © 2013 Julien Danjou # # Author: Julien Danjou <julien@danjou.info> # # 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/lice...
apache-2.0
2,645,021,736,772,453,000
36.018692
87
0.644282
false
4.209352
false
false
false
hy-2013/scrapy
scrapy/xlib/tx/_newclient.py
159
55339
# -*- test-case-name: twisted.web.test.test_newclient -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client. The way to use the functionality provided by this module is to: - Connect a L{HTTP11ClientProtocol} to an HT...
bsd-3-clause
-1,537,035,971,554,219,800
35.503298
92
0.622671
false
4.679039
false
false
false
Changaco/oh-mainline
vendor/packages/Django/django/contrib/formtools/tests/wizard/forms.py
90
7721
from __future__ import unicode_literals from django import forms, http from django.conf import settings from django.db import models from django.test import TestCase from django.template.response import TemplateResponse from django.utils.importlib import import_module from django.contrib.auth.models import User from...
agpl-3.0
4,668,045,561,474,885,000
33.779279
92
0.626344
false
3.907389
true
false
false
cmunk/protwis
build/management/commands/find_protein_templates.py
3
5163
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.db import connection from build.management.commands.base_build import Command as BaseBuild from protein.models import (Protein, ProteinConformation, ProteinSequenceType, ProteinSegment, ProteinConformati...
apache-2.0
9,122,762,605,943,273,000
43.517241
119
0.635871
false
4.277548
false
false
false
njvack/ge-mri-rtafni
scanner-console/vendor/dicom/filereader.py
4
30365
# filereader.py """Read a dicom media file""" # Copyright (c) 2008-2012 Darcy Mason # This file is part of pydicom, released under a modified MIT license. # See the file license.txt included with this distribution, also # available at http://pydicom.googlecode.com from __future__ import absolute_import # Need zli...
mit
-4,455,271,611,898,587,600
43.328467
98
0.592195
false
3.985954
false
false
false
vipulkanade/EventbriteDjango
lib/python2.7/site-packages/gunicorn/_compat.py
30
8763
import sys from gunicorn import six PY26 = (sys.version_info[:2] == (2, 6)) PY33 = (sys.version_info >= (3, 3)) def _check_if_pyc(fname): """Return True if the extension is .pyc, False if .py and None if otherwise""" from imp import find_module from os.path import realpath, dirname, basename, splite...
mit
5,232,737,172,263,703,000
31.820225
99
0.585758
false
4.08722
false
false
false
richardcs/ansible
lib/ansible/modules/network/cloudengine/ce_dldp_interface.py
7
22686
#!/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
-2,418,286,735,730,111,000
33.52968
124
0.569294
false
3.827569
true
false
false
thisispuneet/potato-blog
django/middleware/gzip.py
321
1455
import re from django.utils.text import compress_string from django.utils.cache import patch_vary_headers re_accepts_gzip = re.compile(r'\bgzip\b') class GZipMiddleware(object): """ This middleware compresses content if the browser allows gzip compression. It sets the Vary header accordingly, so that cac...
bsd-3-clause
-7,578,307,989,054,543,000
37.289474
79
0.656357
false
4.304734
false
false
false
peiyuwang/pants
src/python/pants/util/netrc.py
33
1725
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import collections i...
apache-2.0
-8,505,929,409,016,100,000
32.823529
93
0.653913
false
4.030374
false
false
false
shawngraham/music-lab-scripts
07_louisiana/louisiana.py
3
11115
# -*- coding: utf-8 -*- ## # TRACK 7 # TOO BLUE # Brian Foo (brianfoo.com) # This file builds the sequence file for use with ChucK from the data supplied ## # Library dependancies import csv import json import math import os import pprint import time # Config BPM = 100 # Beats per minute, e.g. 60, 75, 100, 120, 150 D...
mit
1,060,422,183,825,063,800
36.298658
192
0.603509
false
3.429497
false
false
false
alsrgv/tensorflow
tensorflow/python/platform/self_check.py
6
2436
# 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
225,487,111,714,470,720
41
80
0.676108
false
4.453382
false
false
false
charukiewicz/beer-manager
venv/lib/python3.4/site-packages/flask/module.py
850
1363
# -*- coding: utf-8 -*- """ flask.module ~~~~~~~~~~~~ Implements a class that represents module blueprints. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os from .blueprints import Blueprint def blueprint_is_module(bp): """Used to figure ou...
mit
-3,892,983,344,031,195,000
31.452381
76
0.634629
false
4.193846
false
false
false
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.6.173.0.59/roles/lib_openshift/library/oc_label.py
7
59170
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
1,205,464,759,380,454,100
32.772831
118
0.530201
false
4.304838
false
false
false
apache/spark
python/pyspark/sql/functions.py
14
161861
# # 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
-4,960,368,121,740,678,000
31.058031
309
0.584804
false
3.65738
false
false
false
vitorespindola/home-assistant
homeassistant/components/light/tellstick.py
4
2926
""" Support for Tellstick lights. """ import logging # pylint: disable=no-name-in-module, import-error from homeassistant.components.light import Light, ATTR_BRIGHTNESS from homeassistant.const import ATTR_FRIENDLY_NAME import tellcore.constants as tellcore_constants def setup_platform(hass, config, add_devices_callb...
mit
9,059,041,214,639,521,000
32.632184
76
0.613465
false
3.986376
false
false
false
cpd4t/CPD4T_Minecraft_Workshop
trafficlights.py
2
1305
# import modules import mcpi.minecraft as minecraft from time import sleep # connect python to minecraft mc = minecraft.Minecraft.create() # create CONSTANTS for block and light colours AIR = 0 STONE = 1 WOOL = 35 BLACK = 15 RED = 14 AMBER = 4 GREEN = 5 # clear area in middle of map and move player there mc.setBlock...
cc0-1.0
1,322,080,360,059,579,400
20.75
51
0.636015
false
2.579051
false
false
false
crossbario/crossbar-fabric-cli
docs/conf.py
1
5424
# -*- coding: utf-8 -*- ##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below appl...
mit
-4,284,822,098,671,075,000
32.689441
85
0.683075
false
4.005908
false
false
false
powlo/script.module.pydevd
lib/tests/check_pydevconsole.py
7
3892
import sys import os #Put pydevconsole in the path. sys.argv[0] = os.path.dirname(sys.argv[0]) sys.path.insert(1, os.path.join(os.path.dirname(sys.argv[0]))) print('Running tests with:', sys.executable) print('PYTHONPATH:') print('\n'.join(sorted(sys.path))) import threading import unittest import pydevconsole fro...
epl-1.0
-538,343,551,622,194,500
36.066667
122
0.507965
false
4.711864
true
false
false
umkay/zulip
zerver/logging_handlers.py
9
3074
from __future__ import absolute_import from django.conf import settings import logging import traceback import platform from django.core import mail from django.http import HttpRequest from django.utils.log import AdminEmailHandler from django.views.debug import ExceptionReporter, get_exception_reporter_filter from...
apache-2.0
-5,967,621,564,974,732,000
35.595238
96
0.562459
false
4.751159
false
false
false
vanzaj/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
Chapter3_MCMC/github_pull.py
95
2327
#github data scrapper """ variables of interest: indp. variables - language, given as a binary variable. Need 4 positions for 5 langagues - #number of days created ago, 1 position - has wiki? Boolean, 1 position - followers, 1 position - following, 1 position - constant dep. variab...
mit
2,395,613,771,689,942,500
27.036145
127
0.576708
false
3.515106
false
false
false
yahman72/robotframework
src/robot/output/loggerhelper.py
4
4060
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
apache-2.0
604,106,667,064,531,500
26.808219
78
0.598768
false
3.735051
false
false
false
Lkhagvadelger/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/performance_tests/perftest.py
115
17075
# Copyright (C) 2012 Google Inc. All rights reserved. # Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. 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 ...
bsd-3-clause
-8,570,852,912,088,339,000
38.43418
190
0.611186
false
3.865746
true
false
false
exploreodoo/datStruct
odoo/openerp/addons/test_impex/tests/test_import.py
231
30712
# -*- coding: utf-8 -*- import openerp.modules.registry import openerp from openerp.tests import common from openerp.tools.misc import mute_logger def ok(n): """ Successful import of ``n`` records :param int n: number of records which should have been imported """ return n, 0, 0, 0 def error(row, me...
gpl-2.0
7,760,320,796,659,249,000
33.396184
103
0.491206
false
3.719296
true
false
false
quiet-oceans/motuclient-setuptools
motu/utils_messages.py
1
2031
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Python motu client # # Motu, a high efficient, robust and Standard compliant Web Server for # Geographic Data Dissemination. # # http://cls-motu.sourceforge.net/ # # (C) Copyright 2009-2010, by CLS (Collecte Localisation Satellites) - # http://www.cls.fr - and Contr...
lgpl-3.0
-5,541,262,570,118,658,000
35.267857
78
0.659281
false
3.817669
false
false
false
p0psicles/SickGear
sickbeard/notifiers/plex.py
3
11492
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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,...
gpl-3.0
-5,119,957,435,221,077,000
41.72119
146
0.580056
false
4.181951
false
false
false
JeremieSamson/jasper
client/vocabcompiler.py
34
19268
# -*- coding: utf-8-*- """ Iterates over all the WORDS variables in the modules and creates a vocabulary for the respective stt_engine if needed. """ import os import tempfile import logging import hashlib import subprocess import tarfile import re import contextlib import shutil from abc import ABCMeta, abstractmetho...
mit
-3,122,387,151,979,729,000
33.223801
79
0.554027
false
4.312444
false
false
false
thuswa/subdms
subdms/repository.py
1
5729
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id$ # Last modified Wed Jul 7 20:53:01 2010 on stalker # update count: 604 # # subdms - A document management system based on subversion. # Copyright (C) 2009 Albert Thuswaldner # # This program is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
2,118,118,750,216,691,000
38.239726
76
0.595916
false
4.011905
false
false
false
gromez/Sick-Beard
lib/imdb/linguistics.py
50
9220
""" linguistics module (imdb package). This module provides functions and data to handle in a smart way languages and articles (in various languages) at the beginning of movie titles. Copyright 2009-2012 Davide Alberani <da@erlug.linux.it> 2012 Alberto Malagoli <albemala AT gmail.com> 2009 H. Turg...
gpl-3.0
-2,224,904,809,962,816,500
44.418719
532
0.627766
false
2.916798
false
false
false
brandonrobertz/namecoin-core
contrib/zmq/zmq_sub.py
9
3056
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ ZMQ example using python3's asyncio Bitcoin should be started with the command line argument...
mit
-1,572,662,996,304,262,000
35.380952
107
0.637435
false
3.595294
false
false
false
alessandrocamilli/l10n-italy
l10n_it_base_location_geonames_import/geonames_import.py
12
1409
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Agile Business Group (http://www.agilebg.com) # @author Lorenzo Battistini <lorenzo.battistini@agilebg.com> # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
5,053,863,013,718,167,000
41.69697
78
0.627395
false
3.870879
false
false
false
Evervolv/android_external_chromium_org
media/tools/layout_tests/layouttests.py
144
8952
# 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. """Layout tests module that is necessary for the layout analyzer. Layout tests are stored in an SVN repository and LayoutTestCaseManager collects these ...
bsd-3-clause
-5,619,286,742,419,377,000
35.688525
79
0.642761
false
4.087671
true
false
false
CydarLtd/ansible
lib/ansible/cli/pull.py
30
12743
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
4,841,745,649,648,492,000
43.400697
150
0.60237
false
4.076456
false
false
false
FlorianLudwig/odoo
addons/account_followup/wizard/account_followup_print.py
217
16379
# -*- 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
4,183,829,698,044,093,400
48.483384
181
0.573112
false
3.8822
false
false
false
appneta/boto
boto/ec2/blockdevicemapping.py
149
6372
# Copyright (c) 2009-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 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 wit...
mit
-153,593,812,756,178,620
37.618182
93
0.572191
false
4.200396
false
false
false
h3biomed/ansible
lib/ansible/parsing/yaml/constructor.py
28
6151
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
5,346,259,552,239,621,000
37.93038
129
0.667371
false
4.215901
false
false
false
Charence/stk-code
tools/batch.py
16
3189
from matplotlib import pyplot from os import listdir def is_numeric(x): try: float(x) except ValueError: return False return True avg_lap_time = {} avg_pos = {} avg_speed = {} avg_top = {} total_rescued = {} tests = len(listdir('../../batch'))-1 for file in listdir('...
gpl-3.0
35,945,694,768,538,510
29.961165
75
0.550329
false
3.054598
true
false
false
hbhzwj/imalse
tools/ns-allinone-3.14.1/ns-3.14.1/src/csma-layout/bindings/modulegen__gcc_LP64.py
12
456237
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-3.0
-8,632,934,393,277,049,000
65.711069
934
0.60958
false
3.737932
false
false
false
BlueBrain/deap
deap/tools/indicator.py
10
3372
# Copyright (C) 2010 Simon Wessing # TU Dortmund University # # 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 v...
lgpl-3.0
4,887,505,473,405,924,000
34.882979
84
0.685943
false
3.810169
false
false
false
dulems/hue
desktop/core/ext-py/Paste-1.7.2/paste/wsgilib.py
27
20134
# (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 """ A module of many disparate routines. """ # functions which moved to paste.request and paste.response # Deprecated around 15 Dec 2005 from paste.r...
apache-2.0
3,644,816,129,580,292,600
32.725293
95
0.576289
false
4.135141
false
false
false
hltbra/pyhistorian
specs/story.py
1
1089
''' >>> story.run() True >>> print output.getvalue() Story: Faked Story #1 In order to write specifications As a python developer I want to write them in Python language <BLANKLINE> Scenario 1: Fake scenario Given I run it ... OK When I type X ... OK Then it shows me X ... OK <BLANKLINE> Ran 1 scenario with...
mit
5,868,556,030,415,097,000
23.2
60
0.630854
false
3.666667
false
false
false
Danisan/pyafipws
wsfexv1.py
8
33017
#!/usr/bin/python # -*- coding: latin-1 -*- # 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, or (at your option) any later # version. # # This program is distributed in t...
gpl-3.0
9,018,860,600,986,043,000
41.500659
104
0.507678
false
3.160731
false
false
false
belltailjp/scikit-learn
sklearn/decomposition/base.py
313
5647
"""Principal Component Analysis Base Classes""" # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <d.engemann@fz-juelich.de> # Kyle Kastner <kastnerkyle@gmail.com> # # Licen...
bsd-3-clause
-5,669,231,022,497,587,000
33.858025
81
0.59359
false
4.033571
false
false
false
overtherain/scriptfile
software/googleAppEngine/lib/django_1_3/django/utils/daemonize.py
452
1907
import os import sys if os.name == 'posix': def become_daemon(our_home_dir='.', out_log='/dev/null', err_log='/dev/null', umask=022): "Robustly turn into a UNIX daemon, running in our_home_dir." # First fork try: if os.fork() > 0: sys.exit(0...
mit
1,644,142,384,879,278,800
31.87931
81
0.513896
false
3.51845
false
false
false
jmiseikis/HomeAutomation
node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
2214
1347
#!/usr/bin/env python import re import json # http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
mit
3,808,997,447,876,716,000
27.659574
78
0.703786
false
2.859873
false
false
false
MartynShaw/audacity
lib-src/lv2/lv2/plugins/eg-midigate.lv2/waflib/Options.py
330
5458
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,tempfile,optparse,sys,re from waflib import Logs,Utils,Context cmds='distclean configure build install clean uninstall check dist distcheck'.split() options={} comma...
gpl-2.0
8,558,848,824,587,358,000
39.42963
131
0.685233
false
2.945494
false
false
false
hahalml/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/ifl.py
61
2810
"""SCons.Tool.ifl Tool-specific initialization for the Intel Fortran compiler. 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, 2010 The...
apache-2.0
-9,216,190,532,521,528,000
38.027778
121
0.724199
false
3.54798
false
false
false
syci/OCB
addons/l10n_sg/__openerp__.py
27
1438
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>) { 'name': 'Singapore - Accounting', 'version': '1.0', 'author': 'Tech Receptives', 'website': 'http://www.techreceptives.com', 'ca...
agpl-3.0
2,928,132,745,244,388,400
37.864865
89
0.64395
false
4.005571
false
false
false
onlyjus/pyqtgraph
doc/extensions/qt_doc.py
28
4791
""" Extension for building Qt-like documentation. - Method lists preceding the actual method documentation - Inherited members documented separately - Members inherited from Qt have links to qt-project documentation - Signal documentation """ def setup(app): # probably we will be making a wrapper around au...
mit
6,174,758,800,019,132,000
31.154362
94
0.617199
false
4.091375
false
false
false
bev-a-tron/pledge_service
lib/validictory/__init__.py
14
2300
#!/usr/bin/env python from validictory.validator import (SchemaValidator, FieldValidationError, ValidationError, SchemaError) __all__ = ['validate', 'SchemaValidator', 'FieldValidationError', 'ValidationError', 'SchemaError'] __version__ = '0.9.3' def validate(data, sch...
apache-2.0
-7,516,891,790,587,058,000
40.071429
79
0.647826
false
4.078014
false
false
false
wnoc-drexel/gem5-stable
src/cpu/kvm/BaseKvmCPU.py
39
3087
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
7,443,840,767,391,245,000
39.618421
90
0.751863
false
4.252066
false
false
false
Drooids/odoo
addons/web/doc/conf.py
494
8552
# -*- coding: utf-8 -*- # # OpenERP Technical Documentation configuration file, created by # sphinx-quickstart on Fri Feb 17 16:14:06 2012. # # 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. # #...
agpl-3.0
-1,367,210,753,899,688,200
31.892308
103
0.702175
false
3.775717
true
false
false
JohnReid/seqan
util/py_lib/seqan/pyclangcheck/simple_checks.py
26
4137
#!/usr/bin/env python """Simple source code checks, e.g. trailing whitespace.""" from __future__ import with_statement import bisect import re import sys import violations RULE_TRAILING_WHITESPACE = 'whitespace.trailing' RULE_TEXT_TRAILING_WHITESPACE = 'Trailing whitespace is not allowed.' RULE_TODO_ONE_SPACE = '...
bsd-3-clause
-2,441,971,052,331,757,600
34.358974
91
0.544598
false
3.841226
false
false
false
lidavidm/sympy
sympy/polys/tests/test_densebasic.py
3
21443
"""Tests for dense recursive polynomials' basic tools. """ from sympy.polys.densebasic import ( dup_LC, dmp_LC, dup_TC, dmp_TC, dmp_ground_LC, dmp_ground_TC, dmp_true_LT, dup_degree, dmp_degree, dmp_degree_in, dmp_degree_list, dup_strip, dmp_strip, dmp_validate, dup_reverse, dup...
bsd-3-clause
-5,866,670,252,548,682,000
28.699446
81
0.449937
false
2.468117
true
false
false
appneta/boto
boto/ec2/autoscale/activity.py
152
3058
# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # # 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, mod...
mit
-8,752,645,475,448,993,000
40.890411
90
0.590582
false
4.412698
false
false
false
h3biomed/ansible
lib/ansible/modules/network/avi/avi_wafprofile.py
31
3819
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
gpl-3.0
-676,973,080,193,106,200
29.309524
92
0.59911
false
3.885046
false
false
false
vberaudi/scipy
scipy/weave/examples/swig2_example.py
100
1596
"""Simple example to show how to use weave.inline on SWIG2 wrapped objects. SWIG2 refers to SWIG versions >= 1.3. To run this example you must build the trivial SWIG2 extension called swig2_ext. To do this you need to do something like this:: $ swig -c++ -python -I. -o swig2_ext_wrap.cxx swig2_ext.i $ g++ -Wall ...
bsd-3-clause
-9,217,083,417,520,616,000
28.018182
69
0.672306
false
3.160396
false
false
false
square/pants
src/python/pants/cache/artifact.py
2
4458
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) import errno import ...
apache-2.0
-6,264,832,763,316,345,000
34.951613
101
0.658591
false
3.917399
false
false
false
amisrs/one-eighty
venv2/lib/python2.7/site-packages/sqlalchemy/sql/elements.py
15
148811
# sql/elements.py # Copyright (C) 2005-2017 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:`.ColumnE...
mit
1,248,150,173,061,195,300
32.797638
101
0.593068
false
4.427318
false
false
false
moble/sympy
sympy/plotting/pygletplot/managed_window.py
120
3178
from __future__ import print_function, division from pyglet.gl import * from pyglet.window import Window from pyglet.clock import Clock from threading import Thread, Lock gl_lock = Lock() class ManagedWindow(Window): """ A pyglet window with an event loop which executes automatically in a separate thre...
bsd-3-clause
1,215,223,031,426,437,400
28.155963
74
0.525488
false
4.639416
false
false
false
azureplus/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/models/sql/query.py
209
5406
from django.db import connections from django.db.models.query import sql from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import aggregates as gis_aggregates from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField from django.contri...
apache-2.0
5,247,311,618,120,358,000
43.677686
97
0.637995
false
4.416667
false
false
false
AISpace2/AISpace2
aispace2/jupyter/csp/csp_xml_to_python.py
1
3954
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 27 12:21:17 2019 @author: zijiazhang """ import itertools import xml.etree.ElementTree as ET from ast import literal_eval as make_tuple from string import Template def findcontain(elem, tag): for child in elem: if tag in child.tag: ...
gpl-3.0
3,163,983,078,657,377,300
31.409836
114
0.452959
false
4.349835
false
false
false
stefanlaheij/ha-buderus
buderus/__init__.py
1
5715
""" Support to communicate with a Buderus KM200 unit. """ import logging import base64 import json import binascii import urllib.request, urllib.error, urllib.parse import voluptuous as vol from io import StringIO from Crypto.Cipher import AES from homeassistant.helpers import config_validation as cv fr...
gpl-3.0
-6,367,909,157,888,069,000
34.183544
118
0.549606
false
3.893052
false
false
false
salaria/odoo
addons/calendar/calendar.py
81
86439
# -*- coding: utf-8 -*- import pytz import re import time import openerp import openerp.service.report import uuid import collections import babel.dates from werkzeug.exceptions import BadRequest from datetime import datetime, timedelta from dateutil import parser from dateutil import rrule from dateutil.relativedelta...
agpl-3.0
7,130,926,470,672,528,000
45.901248
246
0.56434
false
3.85527
false
false
false
caseyclements/bokeh
bokeh/compat/mplexporter/exporter.py
32
12403
""" Matplotlib Exporter =================== This submodule contains tools for crawling a matplotlib figure and exporting relevant pieces to a renderer. """ import warnings import io from . import utils import matplotlib from matplotlib import transforms from matplotlib.backends.backend_agg import FigureCanvasAgg clas...
bsd-3-clause
4,762,143,605,527,384,000
43.13879
79
0.527776
false
4.971142
false
false
false
nmercier/linux-cross-gcc
win32/bin/Lib/robotparser.py
2
7821
""" robotparser.py Copyright (C) 2000 Bastian Kleineidam You can choose between two licenses when using this package: 1) GNU GPLv2 2) PSF license for Python 2.2 The robots.txt Exclusion Protocol is implemented as specified in http://www.robotstxt.org/norobots-rfc.txt """ import ...
bsd-3-clause
6,720,270,426,358,403,000
31.566524
79
0.520394
false
4.379059
false
false
false
tvald/Jink
python/jink/extension.py
1
1038
import types class LazyFactory(object): def __init__(self, module_str, callable_str): self.module_str = module_str self.callable_str = callable_str self.factory = None def resolve(self): if self.factory == None: self.factory = reduce(lambda x, y: getattr(x, y), ...
mit
164,330,639,631,910,080
24.317073
60
0.570328
false
3.667845
false
false
false
ARMmbed/yotta_osx_installer
workspace/lib/python2.7/site-packages/pip/_vendor/ipaddress.py
198
79659
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
apache-2.0
519,145,322,772,369,600
32.039818
86
0.568285
false
4.177627
false
false
false
jancsarc/KIM-Online
src/accounts/views.py
1
2138
from __future__ import unicode_literals from django.core.urlresolvers import reverse_lazy from django.views import generic from django.shortcuts import redirect from django.contrib.auth import get_user_model from django.contrib import auth from django.contrib import messages from authtools import views as authviews fro...
mit
3,617,738,547,562,631,000
34.04918
75
0.721235
false
3.981378
false
false
false
ibinti/intellij-community
python/lib/Lib/site-packages/django/utils/itercompat.py
294
1169
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import itertools # Fallback for Python 2.4, Python 2.5 def product(*args, **kwds): """ Taken from http://docs...
apache-2.0
3,406,856,339,700,060,700
24.977778
78
0.635586
false
3.795455
false
false
false
fritsvanveen/QGIS
python/ext-libs/pygments/formatters/html.py
21
31759
# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import os import sys import os.path from ...
gpl-2.0
8,454,842,329,069,202,000
36.319624
86
0.537328
false
4.155849
false
false
false
sohail-aspose/Aspose_Slides_Cloud
SDKs/Aspose.Slides_Cloud_SDK_for_Python/asposeslidescloud/models/Image.py
4
1028
#!/usr/bin/env python class Image(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.""" def __init__(self): """ Attributes: swaggerTypes (dict): The key is attribute name and the value is attribute type. ...
mit
-5,682,097,692,297,491,000
32.16129
128
0.567121
false
4.283333
false
false
false
mluo613/osf.io
scripts/prereg/approve_draft_registrations.py
28
1260
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from framework.celery_tasks.handlers import celery_teardown_request from website.app import init_app from website.project.model import DraftRegistration, Sanction logger =...
apache-2.0
1,072,098,318,091,961,100
31.307692
122
0.670635
false
3.900929
false
false
false
RussellRiesJr/CoupleComeStatWithMe
ccswm/settings.py
1
3350
""" Django settings for ccswm project. Generated by 'django-admin startproject' using Django 1.10. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # ...
mit
952,352,824,490,474,600
24.18797
91
0.683284
false
3.435897
false
false
false
tillrohrmann/flink
flink-python/pyflink/ml/api/ml_environment.py
9
3953
################################################################################ # 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...
apache-2.0
6,706,501,875,009,040,000
41.967391
99
0.676195
false
4.628806
false
false
false
prismskylabs/pycounters
src/pycounters/__init__.py
1
3969
""" PyCounters is a light weight library to monitor performance in production system. It is meant to be used in scenarios where using a profile is unrealistic due to the overhead it requires. Use PyCounters to get high level and concise overview of what's going on in your production code. See #### (read the docs) for...
apache-2.0
-7,862,069,303,668,941,000
34.756757
125
0.712522
false
4.12578
false
false
false
bitifirefly/edx-platform
common/djangoapps/microsite_configuration/templatetags/microsite.py
107
2058
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration import microsite from django.templatetags.static import static register = template.Library() def page_title_b...
agpl-3.0
4,578,535,191,920,435,000
31.15625
92
0.691934
false
3.897727
false
false
false
selahssea/ggrc-core
src/ggrc_basic_permissions/migrations/versions/20130627032526_3bf5430a8c6f_add_roles_and_permis.py
7
1751
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Add roles and permissions tables Revision ID: 3bf5430a8c6f Revises: None Create Date: 2013-06-27 03:25:26.571232 """ # revision identifiers, used by Alembic. revision = '3bf5430a8c6f' down_revision = N...
apache-2.0
6,503,071,427,555,925,000
30.836364
78
0.657339
false
3.297552
false
false
false
shubhdev/edxOnBaadal
lms/djangoapps/commerce/tests/__init__.py
55
3551
# -*- coding: utf-8 -*- """ Commerce app tests package. """ import datetime import json from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from freezegun import freeze_time import httpretty import jwt import mock from ecommerce_api_client import auth from...
agpl-3.0
3,852,776,131,936,167,400
34.49
100
0.641871
false
3.670114
true
false
false
saeedghsh/SSRR13
Andreas/slam6d/3rdparty/lastools/ArcGIS_toolbox/scripts/lasheight_classify.py
2
7125
# # lasheight_classify.py # # (c) 2012, Martin Isenburg # LASSO - rapid tools to catch reality # # uses lasheight to compute the height of LiDAR points above the ground # and uses the height information to classify the points. # # The LiDAR input can be in LAS/LAZ/BIN/TXT/SHP/... format. # The LiDAR output ca...
bsd-3-clause
3,653,056,449,511,013,000
29.113537
130
0.624561
false
3.438707
false
false
false
pinireznik/antitude
agents/skynet/scripts/restart-proc.py
5
1943
#!/usr/bin/python -u import socket import time import os import sys from subprocess import call import random FILENAME_BREAK = "/tmp/break.tmp" FILENAME_OVERLOAD = "/tmp/load.tmp" IP_ADDRESS = socket.gethostbyname(socket.gethostname()) MEMORY_LIMIT = "50" FIXED_STRING = "event FIXED " +...
apache-2.0
1,522,895,349,766,216,200
36.365385
122
0.583119
false
3.611524
false
false
false
robwarm/gpaw-symm
gpaw/analyse/multipole.py
1
2669
import numpy as np from ase.units import Bohr from ase.parallel import paropen from ase.utils import prnt from gpaw.spherical_harmonics import Y from gpaw.utilities.tools import coordinates class Multipole: """Expand a function on the grid in multipole moments relative to a given center. center: Vector...
gpl-3.0
5,799,183,903,450,343,000
28.988764
72
0.517422
false
3.246959
false
false
false
coxmediagroup/googleads-python-lib
examples/dfp/v201408/report_service/run_inventory_report.py
4
2915
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-6,839,245,679,299,968,000
31.388889
78
0.663808
false
3.727621
false
false
false
Multimac/ansible-modules-extras
notification/jabber.py
60
4555
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
gpl-3.0
2,556,304,043,178,934,000
26.606061
90
0.637761
false
3.783223
false
false
false
harlowja/networkx
examples/drawing/knuth_miles.py
50
2994
#!/usr/bin/env python """ An example using networkx.Graph(). miles_graph() returns an undirected graph over the 128 US cities from the datafile miles_dat.txt. The cities each have location and population data. The edges are labeled with the distance betwen the two cities. This example is described in Section 1.1 in ...
bsd-3-clause
-3,700,146,292,216,659,500
25.972973
72
0.579826
false
3.367829
false
false
false
MacCearain/HomeDetect
radio.py
1
18735
''' radio module ''' # pylint: disable=line-too-long # pylint: disable=too-many-instance-attributes # pylint: disable=too-many-arguments # pylint: disable=trailing-whitespace import time import serial import sensor ONEBIT = 0b1 #------------------------------------------------------------------- # Let's Setup ...
mit
2,653,022,561,303,180,300
41.871854
186
0.555911
false
3.706231
false
false
false
holmes/intellij-community
python/lib/Lib/os.py
74
24851
r"""OS routines for Mac, NT, or Posix depending on what system we're on. This exports: - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc. - os.path is one of the modules posixpath, or ntpath - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos' - os.curdir is a string representing the current di...
apache-2.0
1,187,429,907,938,893,000
34.149929
83
0.605529
false
4.040813
false
false
false
ioangogo/Suntimes
suntimes.py
1
1345
#! /bin/python # -*- coding: UTF-8 -*- import urllib2, json, datetime, time import dateutil.parser global latitude global longitude api=json.loads(urllib2.urlopen("http://freegeoip.net/json/").read().decode("UTF-8")) latitude=str(api['latitude']) longitude=str(api["longitude"]) def getsunrise(lat="", lng="", formatt...
bsd-3-clause
-1,005,461,752,309,309,700
28.23913
121
0.657249
false
3.008949
false
false
false
feibaliang/blog
node_modules/pygmentize-bundled/vendor/pygments/ez_setup.py
181
9709
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
mit
7,574,363,057,419,971,000
34.177536
86
0.645896
false
3.110862
false
false
false
GustavoHennig/ansible
lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py
21
15423
#!/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
-8,924,721,179,718,513,000
33.349666
97
0.575569
false
4.183076
true
false
false
CMPUT410W15T02/CMPUT410W15-project
testenv/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/site.py
108
2362
def __boot(): import sys, imp, os, os.path PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] else: PYTHONPATH = PYTHONPATH.split(os.pathsep) pic = getattr(sys,'path_importer_cache',{}) stdpath = sys....
gpl-2.0
-2,014,626,685,309,833,700
27.804878
79
0.542337
false
4.187943
false
false
false
mammadori/asteroids
game/physicalobject.py
2
4916
# -*- coding: utf-8 *-* import pyglet from . import util, resources # update and collision helper functions def process_sprite_group(group, dt): """ calls update for the whole group and removes after who returns True """ for item in set(group): try: if item.update(dt): ...
bsd-3-clause
-5,002,630,723,919,972,000
29.345679
104
0.58991
false
4.103506
false
false
false
andreaso/ansible
lib/ansible/modules/cloud/amazon/ec2_ami.py
51
21956
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
1,892,413,080,744,189,400
33.04031
154
0.64857
false
3.96604
false
false
false