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
ahmedbodi/AutobahnPython
examples/asyncio/websocket/echo/client_coroutines.py
13
2044
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## 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 ## ## h...
apache-2.0
7,822,061,744,094,950,000
31.444444
79
0.623288
false
ifduyue/django
django/core/checks/registry.py
13
3108
from itertools import chain from django.utils.itercompat import is_iterable class Tags: """ Built-in tags for internal checks. """ admin = 'admin' caches = 'caches' compatibility = 'compatibility' database = 'database' models = 'models' security = 'security' signals = 'signals...
bsd-3-clause
-2,035,686,896,372,967,700
30.714286
91
0.602317
false
kmike/scikit-learn
sklearn/utils/__init__.py
3
10094
""" The :mod:`sklearn.utils` module includes various utilites. """ from collections import Sequence import numpy as np from scipy.sparse import issparse import warnings from .murmurhash import murmurhash3_32 from .validation import (as_float_array, check_arrays, safe_asarray, assert_all_fini...
bsd-3-clause
2,334,709,577,611,160,600
26.883978
79
0.56806
false
houlixin/BBB-TISDK
linux-devkit/sysroots/i686-arago-linux/usr/lib/python2.7/encodings/cp1250.py
593
13942
""" Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
gpl-2.0
-6,356,832,018,515,183,000
44.413681
119
0.550351
false
dataxu/ansible
lib/ansible/modules/system/kernel_blacklist.py
125
4009
#!/usr/bin/python # encoding: utf-8 -*- # Copyright: (c) 2013, Matthias Vogelgesang <matthias.vogelgesang@gmail.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 = {'...
gpl-3.0
8,498,771,084,445,727,000
24.864516
92
0.575206
false
163gal/Time-Line
libs_arm/wx/_controls.py
2
332374
# This file was created automatically by SWIG 1.3.29. # Don't modify this file, modify the SWIG interface instead. import _controls_ import new new_instancemethod = new.instancemethod def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name...
gpl-3.0
-3,839,353,247,363,315,700
41.465057
151
0.65503
false
blackbliss/callme
flask/lib/python2.7/site-packages/werkzeug/contrib/cache.py
306
23519
# -*- coding: utf-8 -*- """ werkzeug.contrib.cache ~~~~~~~~~~~~~~~~~~~~~~ The main problem with dynamic Web sites is, well, they're dynamic. Each time a user requests a page, the webserver executes a lot of code, queries the database, renders templates until the visitor gets the page he sees. ...
mit
-7,111,811,701,270,589,000
33.637703
86
0.579106
false
pipet/pipet
pipet/sources/zendesk/tasks.py
2
1544
from contextlib import contextmanager from datetime import datetime from inspect import isclass from celery import chord, group from celery_once import QueueOnce from celery.schedules import crontab from celery.utils.log import get_task_logger from sqlalchemy.orm.attributes import flag_modified # from pipet import ce...
apache-2.0
156,606,072,465,059,940
28.692308
96
0.645725
false
tomchristie/django
django/apps/config.py
55
8047
import os from importlib import import_module from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig: """Class representing a Django application and its configuration.""" def __init__(self, app_name,...
bsd-3-clause
-8,530,773,113,433,397,000
38.640394
81
0.59227
false
prutseltje/ansible
test/units/modules/network/f5/test_bigip_gtm_datacenter.py
23
6819
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys from nose.plugins.skip import SkipTest i...
gpl-3.0
1,435,203,684,349,960,200
30.716279
91
0.628685
false
antb/TPT----My-old-mod
src/python/stdlib/ctypes/test/test_errno.py
115
2330
import unittest, os, errno from ctypes import * from ctypes.util import find_library from test import test_support try: import threading except ImportError: threading = None class Test(unittest.TestCase): def test_open(self): libc_name = find_library("c") if libc_name is None: r...
gpl-2.0
785,952,512,028,991,400
28.125
69
0.554077
false
Sarah-Alsinan/muypicky
lib/python3.6/site-packages/django/db/backends/sqlite3/creation.py
60
4965
import os import shutil import sys from django.core.exceptions import ImproperlyConfigured from django.db.backends.base.creation import BaseDatabaseCreation from django.utils.encoding import force_text from django.utils.six.moves import input class DatabaseCreation(BaseDatabaseCreation): @staticmethod def i...
mit
3,775,330,401,011,207,000
42.938053
97
0.576636
false
greenoaktree/MissionPlanner
Lib/sysconfig.py
42
25982
"""Provide access to Python's configuration information. """ import sys import os from os.path import pardir, realpath _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{base}/lib/python{py_version_short}', 'platstdlib': '{platbase}/lib/python{py_version_short}', 'purelib': '{ba...
gpl-3.0
4,023,357,260,781,965,000
35.709724
79
0.524132
false
marcoantoniooliveira/labweb
oscar/lib/python2.7/site-packages/debug_toolbar/panels/sql/forms.py
36
2784
from __future__ import absolute_import, unicode_literals import json import hashlib from django import forms from django.conf import settings from django.db import connections from django.utils.encoding import force_text from django.utils.functional import cached_property from django.core.exceptions import Validation...
bsd-3-clause
-2,574,129,591,306,319,400
29.26087
83
0.64727
false
2asoft/tdesktop
Telegram/build/release.py
4
7388
import os, sys, requests, pprint, re, json from uritemplate import URITemplate, expand from subprocess import call changelog_file = '../../changelog.txt' token_file = '../../../TelegramPrivate/github-releases-token.txt' version = '' commit = '' for arg in sys.argv: if re.match(r'\d+\.\d+', arg): version = arg ...
gpl-3.0
-4,684,818,419,198,945,000
27.859375
138
0.614781
false
UASLab/ImageAnalysis
video/hud.py
1
43557
import datetime import ephem # dnf install python3-pyephem import math import navpy import numpy as np # find our custom built opencv first import sys sys.path.insert(0, "/usr/local/opencv3/lib/python2.7/site-packages/") import cv2 sys.path.append('../scripts') from lib import transformations impo...
mit
-679,292,853,521,603,500
40.601719
115
0.489497
false
jdemel/gnuradio
gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py
3
1295
# # Copyright 2010 Free Software Foundation, Inc. # # This file was generated by gr_modtool, a tool from the GNU Radio framework # This file is a part of gr-howto # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Utilities for extracting text from generated classes. """ from __future__ import unicode_literals def ...
gpl-3.0
-4,949,053,946,127,237,000
27.152174
100
0.642471
false
dilawar/moose-full
moose-core/python/moose/neuroml2/test_hhfit.py
2
6303
# test_hhfit.py --- # # Filename: test_hhfit.py # Description: # Author: # Maintainer: # Created: Tue May 21 16:34:45 2013 (+0530) # Version: # Last-Updated: Tue May 21 16:37:28 2013 (+0530) # By: subha # Update #: 9 # URL: # Keywords: # Compatibility: # # # Commentary: # # # # # Change ...
gpl-2.0
3,486,434,100,067,372,500
39.664516
137
0.596859
false
4rado/RepositoryForProject
Lib/site-packages/scipy/linalg/decomp_schur.py
55
5250
"""Schur decomposition functions.""" import numpy from numpy import asarray_chkfinite, single # Local imports. import misc from misc import LinAlgError, _datacopied from lapack import get_lapack_funcs from decomp import eigvals __all__ = ['schur', 'rsf2csf'] _double_precision = ['i','l','d'] def schur(a, output='...
gpl-3.0
-8,418,565,791,650,039,000
30.437126
83
0.555619
false
savi-dev/keystone
keystone/common/kvs.py
4
1477
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
apache-2.0
1,685,284,111,099,958,500
27.403846
75
0.631009
false
zasdfgbnm/tensorflow
tensorflow/examples/tutorials/mnist/mnist_softmax_xla.py
37
3631
# 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
5,282,069,357,783,920,000
33.254717
80
0.657119
false
alex/fabric
fabric/network.py
8
24613
""" Classes and subroutines dealing with network connections and related topics. """ from __future__ import with_statement from functools import wraps import getpass import os import re import time import socket import sys from StringIO import StringIO from fabric.auth import get_password, set_password from fabric....
bsd-2-clause
-4,666,307,345,220,745,000
36.236006
164
0.621826
false
adrianholovaty/django
django/contrib/gis/admin/widgets.py
10
4344
from django.forms.widgets import Textarea from django.template import loader, Context from django.templatetags.static import static from django.utils import translation from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSException # Creating a template context that c...
bsd-3-clause
8,129,332,532,780,420,000
39.981132
74
0.5686
false
sankhesh/VTK
ThirdParty/Twisted/twisted/conch/ui/ansi.py
59
7222
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # """Module to parse ANSI escape sequences Maintainer: Jean-Paul Calderone """ import string # Twisted imports from twisted.python import log class ColorText: """ Represents an element of text along with the texts colors and additi...
bsd-3-clause
-1,011,474,705,869,925,900
29.091667
80
0.467599
false
samcavallieri/weblogic_project_automation
crwls.py
1
35330
# encoding:UTF-8 import sys import os import time import wlstModule as wlst import ConfigParser from java.util import Properties from java.lang import System from java.io import FileInputStream from java.io import FileOutputStream from weblogic.security.internal import SerializedSystemIni from weblogic.security.int...
gpl-3.0
-8,570,533,955,969,258,000
31.525783
111
0.60898
false
vikatory/kbengine
kbe/src/lib/python/Lib/idlelib/idle_test/test_formatparagraph.py
73
14351
# Test the functions and main class method of FormatParagraph.py import unittest from idlelib import FormatParagraph as fp from idlelib.EditorWindow import EditorWindow from tkinter import Tk, Text, TclError from test.support import requires class Is_Get_Test(unittest.TestCase): """Test the is_ and get_ functions...
lgpl-3.0
-7,986,859,299,697,650,000
37.066313
89
0.586161
false
vikatory/kbengine
kbe/src/lib/python/Lib/encodings/cp863.py
272
34252
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP863.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_map) def decode(self,input,errors='strict'): ...
lgpl-3.0
-6,916,906,441,276,573,000
48.071633
97
0.602739
false
vjmac15/Lyilis
lib/youtube_dl/extractor/baidu (VJ Washington's conflicted copy 2017-08-29).py
90
1980
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unescapeHTML class BaiduVideoIE(InfoExtractor): IE_DESC = '百度视频' _VALID_URL = r'https?://v\.baidu\.com/(?P<type>[a-z]+)/(?P<id>\d+)\.htm' _TESTS = [{ 'url': 'http://v.baidu.com...
gpl-3.0
8,918,850,448,971,882,000
33.75
111
0.58222
false
Solinea/horizon
openstack_dashboard/dashboards/admin/images/views.py
3
8396
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
3,675,810,975,928,954,000
38.051163
78
0.575989
false
luiseduardohdbackup/odoo
addons/account/wizard/account_move_line_reconcile_select.py
385
2362
# -*- 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,165,510,815,337,637,000
42.666667
119
0.59542
false
SDX2000/scons
engine/SCons/compat/__init__.py
21
8179
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # 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 # with...
mit
5,477,440,070,240,203,000
33.510549
101
0.712312
false
ruschelp/cortex-vfx
test/IECore/Shader.py
12
3204
########################################################################## # # Copyright (c) 2007-2011, Image Engine Design 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: # # * Redis...
bsd-3-clause
8,937,002,234,067,745,000
34.208791
78
0.660737
false
gangadharkadam/smrterp
erpnext/stock/doctype/warehouse/warehouse.py
3
5175
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, validate_email_add from frappe import throw, msgprint, _ from frappe.model.document import Document cl...
agpl-3.0
6,077,781,720,569,020,000
36.773723
114
0.687343
false
ajose01/rethinkdb
scripts/VirtuaBuild/builder.py
46
6345
#!/usr/bin/env python # Copyright 2010-2012 RethinkDB, all rights reserved. from vcoptparse import * import vm_build import sys from threading import Thread, Semaphore class Builder(Thread): def __init__(self, name, branch, target, semaphore): Thread.__init__(self) self.name = name self.bra...
agpl-3.0
939,719,559,956,513,200
44.647482
275
0.626162
false
c1728p9/pyOCD
pyOCD/target/target_stm32f103rc.py
4
1457
""" mbed CMSIS-DAP debugger Copyright (c) 2006-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 ...
apache-2.0
-6,004,540,841,488,146,000
32.883721
151
0.728895
false
technologiescollege/s2a_fr
s2a/Python/Lib/test/lock_tests.py
110
15126
""" Various tests for synchronization primitives. """ import sys import time from thread import start_new_thread, get_ident import threading import unittest from test import test_support as support def _wait(): # A crude wait/yield function not relying on synchronization primitives. time.sleep(0.01) class ...
gpl-3.0
1,044,183,361,976,538,100
26.703297
82
0.536229
false
krishna-pandey-git/django
tests/template_tests/filter_tests/test_timesince.py
207
5422
from __future__ import unicode_literals from datetime import datetime, timedelta from django.template.defaultfilters import timesince_filter from django.test import SimpleTestCase from django.test.utils import requires_tz_support from ..utils import setup from .timezone_utils import TimezoneTestCase class Timesinc...
bsd-3-clause
-8,209,475,703,017,608,000
41.031008
128
0.634821
false
mne-tools/mne-tools.github.io
0.20/_downloads/76822bb92a8465181ec2a7ee96ca8cf4/plot_decoding_csp_timefreq.py
1
6457
""" ============================================================================ Decoding in time-frequency space data using the Common Spatial Pattern (CSP) ============================================================================ The time-frequency decomposition is estimated by iterating over raw data that has be...
bsd-3-clause
240,441,842,313,748,830
39.10559
79
0.611275
false
pennersr/django-allauth
allauth/socialaccount/providers/orcid/provider.py
2
1564
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class Scope(object): USERINFO_PROFILE = "/authenticate" class OrcidAccount(ProviderAccount): def get_profile_url(self): return extract_from_dict(self.account.ex...
mit
6,449,739,463,738,600,000
27.436364
86
0.618926
false
binarydud/verse
verse/views.py
1
7356
import json import re import yaml import base64 import velruse import datetime from pygithub3 import Github from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config from verse.utils import set_content #from pyramid.i18n import TranslationString as _ from .models import ( DBSession, Us...
apache-2.0
-5,712,206,696,094,507,000
31.548673
111
0.584557
false
d40223223/2015cdbg6team0622
static/Brython3.1.1-20150328-091302/Lib/importlib/basehook.py
608
1396
from javascript import JSObject from browser import window import urllib.request class TempMod: def __init__(self, name): self.name=name #define my custom import hook (just to see if it get called etc). class BaseHook: def __init__(self, fullname=None, path=None): self._fullname=fullname self._p...
gpl-3.0
834,423,359,024,821,900
29.347826
70
0.537966
false
fx2003/tensorflow-study
TensorFlow实战/models/syntaxnet/dragnn/python/composite_optimizer.py
12
2604
# Copyright 2017 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 by applicable law or a...
mit
4,514,945,215,384,570,000
36.2
80
0.635177
false
dalegregory/odoo
addons/hr_timesheet_invoice/__openerp__.py
260
2403
# -*- 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
-881,569,634,572,412,800
39.728814
78
0.610487
false
stephane-martin/salt-debian-packaging
salt-2016.3.2/tests/unit/templates/jinja_test.py
1
28124
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import import os import copy import tempfile import json import datetime import pprint # Import Salt Testing libs from salttesting.unit import skipIf, TestCase from salttesting.case import ModuleCase from salttesting.helpers import ensure_in...
apache-2.0
-7,130,847,342,912,362,000
37.835635
113
0.548316
false
goksie/newfies-dialer
newfies/survey/urls.py
4
1597
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The Initia...
mpl-2.0
1,297,583,328,540,066,600
36.139535
75
0.61866
false
GyrosOfWar/servo
tests/wpt/css-tests/tools/webdriver/webdriver/exceptions.py
263
6460
"""Definition of WebDriverException classes.""" def create_webdriver_exception_strict(status_code, message): """Create the appropriate WebDriverException given the status_code.""" if status_code in _exceptions_strict: return _exceptions_strict[status_code](message) return UnknownStatusCodeException...
mpl-2.0
-6,763,187,260,070,101,000
37.915663
81
0.762539
false
mshafiq9/django
django/views/generic/detail.py
306
6922
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import ContextMixin, TemplateResponseMixin, View class SingleObjectMixin(Conte...
bsd-3-clause
-6,310,951,046,772,378,000
36.825137
108
0.582202
false
takeflight/wagtailmodelchooser
wagtailmodelchooser/__init__.py
1
2011
from .utils import kwarg_decorator, last_arg_decorator from .version import version as __version__ from .version import version_info __all__ = [ '__version__', 'version_info', 'registry', 'register_model_chooser', 'register_simple_model_chooser', 'register_filter', ] class Registry(object): def __init__(...
bsd-2-clause
-339,373,218,791,220,300
29.469697
81
0.665341
false
hsuchie4/TACTIC
src/pyasm/deprecated/flash/flash_file_naming.py
6
1678
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
7,258,592,367,855,573,000
26.966667
78
0.607867
false
dparlevliet/zelenka-report-storage
server-local/twisted/internet/unix.py
41
17920
# -*- test-case-name: twisted.test.test_unix,twisted.internet.test.test_unix,twisted.internet.test.test_posixbase -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Various asynchronous TCP/IP classes. End users shouldn't use this module directly - use the reactor APIs instead. Maintain...
lgpl-3.0
4,383,641,988,542,789,000
33.594595
117
0.599275
false
yongshengwang/hue
desktop/core/ext-py/pycrypto-2.6.1/build/lib.linux-x86_64-2.7/Crypto/PublicKey/DSA.py
123
13695
# -*- coding: utf-8 -*- # # PublicKey/DSA.py : DSA signature primitive # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public d...
apache-2.0
7,233,003,489,526,411,000
35.134565
116
0.584958
false
afandria/sky_engine
build/android/pylib/host_driven/setup.py
55
6378
# Copyright 2013 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. """Setup for instrumentation host-driven tests.""" import logging import os import sys import types from pylib.host_driven import test_case from pylib.host...
bsd-3-clause
6,065,192,468,811,680,000
30.89
79
0.711979
false
CGATOxford/CGATPipelines
CGATPipelines/pipeline_bamstats.py
1
25344
""" =========================== Pipeline bamstats =========================== :Author: Adam Cribbs :Release: $Id$ :Date: |today| :Tags: Python The intention of this pipeline is to perform QC statistics on `.bam` files that are produced following mapping of fastq files. The pipeline requires a `.bam` file as an...
mit
-7,511,280,054,306,433,000
29.42497
116
0.606021
false
FlaPer87/qpid-proton
proton-c/mllib/dom.py
41
6497
# # 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...
apache-2.0
-4,284,463,407,971,938,300
19.958065
75
0.583654
false
happyleavesaoc/home-assistant
homeassistant/components/cover/myq.py
3
2882
""" Support for MyQ-Enabled Garage Doors. For more details about this platform, please refer to the documentation https://home-assistant.io/components/cover.myq/ """ import logging import voluptuous as vol from homeassistant.components.cover import CoverDevice from homeassistant.const import ( CONF_USERNAME, CON...
apache-2.0
-2,589,647,039,719,210,500
28.111111
77
0.649202
false
destijl/grr
grr/lib/key_utils.py
2
3080
#!/usr/bin/env python """This file abstracts the loading of the private key.""" from cryptography import x509 from cryptography.hazmat.backends import openssl from cryptography.hazmat.primitives import hashes from cryptography.x509 import oid from grr.lib import rdfvalue from grr.lib.rdfvalues import crypto as rdf_c...
apache-2.0
-7,206,638,405,950,660,000
31.765957
78
0.69513
false
bbrezillon/linux-sunxi
scripts/gdb/linux/symbols.py
68
6310
# # gdb helper commands and functions for Linux kernel debugging # # load kernel and module symbols # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import os import re from linux import module...
gpl-2.0
-3,705,187,531,682,248,700
34.852273
79
0.58225
false
ataylor32/django
django/conf/locale/ml/formats.py
1007
1815
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'N j, Y' TIME_FORMAT = 'P' DATETIM...
bsd-3-clause
7,955,592,753,861,353,000
41.209302
81
0.516253
false
dharmabumstead/ansible
lib/ansible/plugins/action/command.py
117
1121
# Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible import constants as C from ansible.plugins.action import ActionBase from ansible.util...
gpl-3.0
6,676,477,658,934,152,000
36.366667
103
0.683318
false
TESScience/httm
httm/transformations/metadata.py
1
5125
# HTTM: A transformation library for RAW and Electron Flux TESS Images # Copyright (C) 2016, 2017 John Doty and Matthew Wampler-Doty of Noqsi Aerospace, Ltd. # # 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 Softwar...
gpl-3.0
368,438,116,170,356,100
41.008197
117
0.642537
false
aguedes/bluez
test/sap_client.py
86
30639
""" Copyright (C) 2010-2011 ST-Ericsson SA """ """ Author: Szymon Janc <szymon.janc@tieto.com> for ST-Ericsson. """ """ 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...
gpl-2.0
-5,468,918,267,625,201,000
31.490986
125
0.549561
false
mvidalgarcia/indico
indico/core/webpack.py
2
1598
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals import os from flask_webpackext import FlaskWebpackExt from flas...
mit
-9,097,333,290,528,816,000
36.162791
92
0.69587
false
seanwestfall/django
django/views/static.py
190
5142
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ from __future__ import unicode_literals import mimetypes import os import posixpath import re import stat from django.http import ( FileResponse, Http404, HttpRespons...
bsd-3-clause
-7,987,543,726,296,927,000
33.05298
78
0.624854
false
lhopps/grit-i18n
grit/tclib_unittest.py
36
8122
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Unit tests for grit.tclib''' import sys import os.path if __name__ == '__main__': sys.path.append(os.path.join(os.path.dirna...
bsd-2-clause
2,623,659,705,779,324,000
44.374302
81
0.650086
false
dionbosschieter/NetworkMonitor
src/Client/InfoContainer.py
1
1892
import terminal import curses import time from curses import panel class InfoContainer(object): def __init__(self, stdscreen, title, debug_console): self.debug_console = debug_console self.height = int(terminal.height/2) self.width = terminal.width - 2 self.title = title s...
mit
8,029,939,048,508,223,000
27.666667
68
0.581924
false
eriol/circuits
examples/node/nodeserver.py
3
2429
#!/usr/bin/env python """Node Server Example This example demonstrates how to create a very simple node server that supports bi-diractional messaging between server and connected clients forming a cluster of nodes. """ from __future__ import print_function from os import getpid from optparse import OptionParser ...
mit
-6,181,088,414,534,044,000
21.490741
75
0.59613
false
klickagent/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/mac.py
113
14225
# Copyright (C) 2011 Google Inc. All rights reserved. # Copyright (C) 2012, 2013 Apple 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...
bsd-3-clause
-1,683,058,798,068,343,300
45.639344
156
0.644499
false
krieger-od/nwjs_chromium.src
chrome/common/extensions/docs/server2/build_server.py
80
3340
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This script is used to copy all dependencies into the local directory. # The package of files can then be uploaded to App Engine....
bsd-3-clause
-4,363,357,893,083,128,000
36.52809
80
0.594611
false
fossoult/odoo
addons/l10n_fr/__init__.py
424
1447
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
agpl-3.0
5,042,121,340,552,376,000
41.558824
80
0.689012
false
bijanfallah/OI_CCLM
src/RMSE_MAPS_INGO.py
1
2007
# Program to show the maps of RMSE averaged over time import matplotlib.pyplot as plt from sklearn.metrics import mean_squared_error import os from netCDF4 import Dataset as NetCDFFile import numpy as np from CCLM_OUTS import Plot_CCLM # option == 1 -> shift 4 with default cclm domain and nboundlines = 3 # option == 2...
mit
6,172,872,896,229,471,000
37.596154
124
0.63727
false
steven-hadfield/dpxdt
deployment/appengine/appengine_config.py
4
2989
#!/usr/bin/env python # Copyright 2013 Brett Slatkin # # 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
6,358,295,125,254,556,000
28.89
77
0.742389
false
gangadharkadam/contributionerp
erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py
46
3173
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ def execute(filters=None): columns = get_columns() proj_details = get_project_details() pr_item_map = get_purchas...
agpl-3.0
-2,526,490,087,109,348,000
39.164557
98
0.69209
false
imsparsh/python-for-android
python3-alpha/extra_modules/gdata/books/__init__.py
124
18532
#!/usr/bin/python """ Data Models for books.service All classes can be instantiated from an xml string using their FromString class method. Notes: * Book.title displays the first dc:title because the returned XML repeats that datum as atom:title. There is an undocumented gbs:ope...
apache-2.0
7,942,596,538,569,523,000
38.179704
80
0.642402
false
jjmleiro/hue
desktop/core/ext-py/Django-1.6.10/tests/save_delete_hooks/models.py
130
1035
""" 13. Adding hooks before/after saving and deleting To execute arbitrary code around ``save()`` and ``delete()``, just subclass the methods. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Per...
apache-2.0
5,388,654,497,079,564,000
28.571429
75
0.635749
false
mcardillo55/django
tests/check_framework/test_templates.py
288
1403
from copy import deepcopy from django.core.checks.templates import E001 from django.test import SimpleTestCase from django.test.utils import override_settings class CheckTemplateSettingsAppDirsTest(SimpleTestCase): TEMPLATES_APP_DIRS_AND_LOADERS = [ { 'BACKEND': 'django.template.backends.djan...
bsd-3-clause
1,601,499,405,735,537,200
33.219512
79
0.64861
false
kasioumis/invenio
invenio/modules/documentation/views.py
1
3579
# -*- 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...
gpl-2.0
9,194,547,294,458,207,000
35.520408
78
0.657726
false
crosswalk-project/blink-crosswalk-efl
Source/devtools/scripts/concatenate_module_scripts.py
11
2413
#!/usr/bin/env python # # Copyright 2014 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. """ Concatenates module scripts based on the module.json descriptor. Optionally, minifies the result using rjsmin. """ from cStringI...
bsd-3-clause
-1,551,874,067,306,360,800
26.735632
93
0.654787
false
40323155/2016springcd_aG6
static/plugin/render_math/pelican_mathjax_markdown_extension.py
348
6929
# -*- coding: utf-8 -*- """ Pelican Mathjax Markdown Extension ================================== An extension for the Python Markdown module that enables the Pelican python blog to process mathjax. This extension gives Pelican the ability to use Mathjax as a "first class citizen" of the blog """ import markdown from...
agpl-3.0
2,092,622,600,191,289,000
42.85443
130
0.641362
false
aman-iitj/scipy
scipy/ndimage/__init__.py
46
5436
""" ========================================================= Multi-dimensional image processing (:mod:`scipy.ndimage`) ========================================================= .. currentmodule:: scipy.ndimage This package contains various functions for multi-dimensional image processing. Filters :mod:`scipy.ndima...
bsd-3-clause
-2,567,934,379,819,761,000
28.704918
74
0.702355
false
JackDandy/SickGear
lib/guessit/transfo/guess_weak_episodes_rexps.py
21
2127
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free...
gpl-3.0
7,319,974,327,149,637,000
33.306452
74
0.643159
false
hsu/chrono
src/demos/trackVehicle/validationPlots_test_M113.py
5
4229
# -*- coding: utf-8 -*- """ Created on Wed May 06 11:00:53 2015 @author: newJustin """ import ChronoTrack_pandas as CT import pylab as py if __name__ == '__main__': # logger import logging as lg lg.basicConfig(fileName = 'logFile.log', level=lg.WARN, format='%(message)s') # default fo...
bsd-3-clause
-807,935,552,402,286,800
31.290076
219
0.616458
false
mrknow/filmkodi
plugin.video.fanfilm/resources/lib/resolvers/putstream.py
2
1131
# -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2015 lambda 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 ...
apache-2.0
8,110,821,232,460,552,000
28.763158
73
0.654288
false
joewashear007/ScrappyDoo
copy.py
1
3382
import os import shutil import zipfile import fnmatch import uuid def main(): kits = findAll(".") for kit in kits: print("* ", kit, " -> ", kits[kit]) print() print() print("Starting extraction:") print("------------------------------------------") extractKits(kits) def findAll(dir...
mit
7,577,268,462,791,354,000
27.905983
102
0.527794
false
sasukeh/neutron
neutron/api/rpc/callbacks/resource_manager.py
32
4710
# 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 # d...
apache-2.0
-3,525,136,190,414,913,000
32.884892
79
0.679193
false
listamilton/supermilton.repository
script.module.youtube.dl/lib/youtube_dl/extractor/moniker.py
66
3951
# coding: utf-8 from __future__ import unicode_literals import os.path import re from .common import InfoExtractor from ..utils import ( ExtractorError, remove_start, sanitized_Request, urlencode_postdata, ) class MonikerIE(InfoExtractor): IE_DESC = 'allmyvideos.net and vidspot.net' _VALID_U...
gpl-2.0
2,729,320,049,983,951,400
33.060345
105
0.529486
false
gohin/django
django/contrib/auth/management/commands/createsuperuser.py
65
7695
""" Management utility to create superusers. """ from __future__ import unicode_literals import getpass import sys from django.contrib.auth import get_user_model from django.contrib.auth.management import get_default_username from django.core import exceptions from django.core.management.base import BaseCommand, Comm...
bsd-3-clause
6,320,757,852,442,747,000
43.738372
109
0.538532
false
wwright2/dcim3-angstrom1
sources/openembedded-core/scripts/pybootchartgui/pybootchartgui/samples.py
7
5537
# This file is part of pybootchartgui. # pybootchartgui 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. # pybootchartgui is dis...
mit
4,583,296,552,943,260,700
35.668874
160
0.601409
false
rickerc/neutron_audit
neutron/plugins/nec/ofc_manager.py
9
9461
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 NEC Corporation. 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.or...
apache-2.0
-5,019,626,671,642,997,000
45.377451
79
0.621499
false
vmobi-gogh/android_kernel_samsung_gogh
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
gpl-2.0
1,200,256,328,089,234,400
32.875
78
0.730012
false
slockit/DAO
tests/scenarios/fuel/run.py
4
1429
import random from utils import constrained_sum_sample_pos, arr_str scenario_description = ( "During the fueling period of the DAO, send enough ether from all " "accounts to create tokens and then assert that the user's balance is " "indeed correct and that the minimum fueling goal has been reached" ) d...
lgpl-3.0
-5,488,954,882,271,867,000
28.770833
75
0.621414
false
tarzan0820/odoo
openerp/tools/lru.py
237
3197
# -*- coding: utf-8 -*- # taken from http://code.activestate.com/recipes/252524-length-limited-o1-lru-cache-implementation/ import threading from func import synchronized __all__ = ['LRU'] class LRUNode(object): __slots__ = ['prev', 'next', 'me'] def __init__(self, prev, me): self.prev = prev ...
agpl-3.0
7,655,114,437,631,426,000
23.592308
99
0.510166
false
Ircam-Web/mezzanine-organization
organization/projects/migrations/0085_auto_20190619_2023.py
1
1116
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-06-19 18:23 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
agpl-3.0
4,549,997,135,370,149,400
38.857143
276
0.650538
false
PXke/invenio
invenio/testsuite/test_bibauthority.py
4
1666
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012, 2013 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 yo...
gpl-2.0
-1,313,488,848,769,739,800
39.634146
82
0.69928
false
caseyching/Impala
tests/benchmark/report_benchmark_results.py
13
43688
#!/usr/bin/env impala-python # Copyright (c) 2014 Cloudera, Inc. All rights reserved. # # This script provides help with parsing and reporting of perf results. It currently # provides three main capabilities: # 1) Printing perf results to console in 'pretty' format # 2) Comparing two perf result sets together and displ...
apache-2.0
6,282,423,292,874,212,000
38.146953
90
0.649171
false
sdague/home-assistant
homeassistant/components/dyson/sensor.py
5
6457
"""Support for Dyson Pure Cool Link Sensors.""" import logging from libpurecool.dyson_pure_cool import DysonPureCool from libpurecool.dyson_pure_cool_link import DysonPureCoolLink from homeassistant.const import PERCENTAGE, STATE_OFF, TEMP_CELSIUS, TIME_HOURS from homeassistant.helpers.entity import Entity from . im...
apache-2.0
5,239,885,266,624,850,000
30.807882
83
0.627536
false
douggeiger/gnuradio
gr-digital/python/digital/qa_digital.py
57
1084
#!/usr/bin/env python # # Copyright 2011 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) ...
gpl-3.0
-312,527,151,176,575,300
30.882353
70
0.717712
false
vegitron/django-template-preprocess
template_preprocess/test/extend_block.py
1
2106
from django.test import TestCase from django.test.utils import override_settings from template_preprocess.processor import process_template_content from template_preprocess.test import get_test_template_settings template_settings = get_test_template_settings() @override_settings(**template_settings) class TestExten...
apache-2.0
5,801,266,574,255,508,000
38
72
0.630579
false
grocsvs/grocsvs
src/grocsvs/main.py
1
5838
from __future__ import print_function import argparse import collections import json import logging import sys from grocsvs import options as svoptions from grocsvs import log from grocsvs import pipeline from grocsvs import utilities from grocsvs import stages as svstages logging.basicConfig(format='%(message)s', ...
mit
9,110,785,281,506,253,000
29.726316
139
0.70024
false
ColOfAbRiX/ansible
lib/ansible/modules/database/vertica/vertica_facts.py
28
9387
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
gpl-3.0
-8,531,791,704,919,773,000
32.052817
98
0.579844
false
suninsky/ReceiptOCR
Python/server/lib/python2.7/site-packages/markupsafe/__init__.py
144
10697
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re import string from collections import Mapping from markupsafe._compat import text_type, string_types, int_types, \ u...
mit
2,225,617,646,636,672,500
34.072131
82
0.567355
false