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
jereze/scikit-learn
sklearn/preprocessing/data.py
68
57385
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Eric Martin <eric@ericmart.in> # License: BSD 3 clause from itertools import chain, combina...
bsd-3-clause
-8,716,250,005,458,972,000
34.843223
79
0.596567
false
TNT-Samuel/Coding-Projects
DNS Server/Source/Lib/site-packages/pygments/console.py
27
1809
# -*- coding: utf-8 -*- """ pygments.console ~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ esc = "\x1b[" codes = {} codes[""] = "" codes["reset"] = esc + "39;49;00m" codes["bold"] = ...
gpl-3.0
6,352,068,305,438,203,000
23.445946
70
0.545605
false
aruppen/xwot.py
xwot/device/lightbulb.py
1
4704
#!/usr/bin/env python # -*- coding: utf-8 -*- # # xwot.py - Python tools for the extended Web of Things # Copyright (C) 2015 Alexander Rüedlinger # # 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 Foundatio...
gpl-3.0
4,317,574,846,848,423,400
25.268156
122
0.624628
false
pquerna/cloud-init-debian-pkg-dead
cloudinit/config/cc_disk_setup.py
6
25274
# vi: ts=4 expandtab # # Copyright (C) 2009-2010 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Ben Howard <ben.howard@canonical.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
7,936,762,838,936,123,000
30.992405
79
0.586057
false
DESHRAJ/fjord
vendor/packages/translate-toolkit/translate/tools/test_pretranslate.py
3
14236
#!/usr/bin/env python # -*- coding: utf-8 -*- import warnings from pytest import mark from translate.tools import pretranslate from translate.convert import test_convert from translate.misc import wStringIO from translate.storage import po from translate.storage import xliff class TestPretranslate: xliff_skele...
bsd-3-clause
-4,920,748,769,575,958,000
44.047468
161
0.63372
false
lombritz/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py
384
1193
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
5,717,657,398,113,399,000
41.607143
81
0.65549
false
40423136/2016fallcadp_hw
plugin/liquid_tags/audio.py
277
2161
""" Audio Tag --------- This implements a Liquid-style audio tag for Pelican, based on the pelican video plugin [1]_ Syntax ------ {% audio url/to/audio [url/to/audio] [/url/to/audio] %} Example ------- {% audio http://example.tld/foo.mp3 http://example.tld/foo.ogg %} Output ------ <audio controls><source src="http:...
agpl-3.0
1,151,745,764,497,600,400
27.813333
189
0.56224
false
caisq/tensorflow
tensorflow/contrib/gan/python/features/python/random_tensor_pool.py
55
1552
# 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
-4,912,173,702,625,223,000
43.342857
83
0.730026
false
sukwon0709/equip
equip/rewriter/simple.py
1
11974
# -*- coding: utf-8 -*- """ equip.rewriter.simple ~~~~~~~~~~~~~~~~~~~~~ A simplified interface (yet the main one) to handle the injection of instrumentation code. :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ import os import copy from ..utils.lo...
apache-2.0
698,868,447,245,636,400
35.95679
99
0.638801
false
ioos/compliance-checker
compliance_checker/tests/test_feature_detection.py
2
31793
#!/usr/bin/env python # -*- coding: utf-8 -*- """ compliance_checker/tests/test_feature_detection.py """ from unittest import TestCase from netCDF4 import Dataset from compliance_checker import cfutil as util from compliance_checker.tests import resources from compliance_checker.tests.helpers import MockRaggedArrayR...
apache-2.0
-6,603,368,347,699,152,000
34.091611
112
0.550278
false
wilebeast/FireFox-OS
B2G/external/wpa_supplicant_8/wpa_supplicant/examples/wpas-dbus-new-wps.py
114
2221
#!/usr/bin/python import dbus import sys, os import time import gobject from dbus.mainloop.glib import DBusGMainLoop WPAS_DBUS_SERVICE = "fi.w1.wpa_supplicant1" WPAS_DBUS_INTERFACE = "fi.w1.wpa_supplicant1" WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1" WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface" ...
apache-2.0
-883,712,869,169,879,800
26.7625
66
0.723998
false
jtyr/ansible-modules-extras
messaging/rabbitmq_queue.py
29
9468
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@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...
gpl-3.0
-6,747,696,595,846,376,000
35
174
0.578792
false
hujiajie/chromium-crosswalk
tools/telemetry/telemetry/internal/backends/android_command_line_backend_unittest.py
13
3617
# 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. import logging import unittest from telemetry import decorators from telemetry.internal.backends import android_command_line_backend from telemetry.testing ...
bsd-3-clause
-2,089,787,591,728,052,000
34.116505
80
0.672104
false
Cinntax/home-assistant
homeassistant/components/lcn/scene.py
7
2167
"""Support for LCN scenes.""" import pypck from homeassistant.components.scene import Scene from homeassistant.const import CONF_ADDRESS from . import LcnDevice from .const import ( CONF_CONNECTIONS, CONF_OUTPUTS, CONF_REGISTER, CONF_SCENE, CONF_TRANSITION, DATA_LCN, OUTPUT_PORTS, ) from ....
apache-2.0
-4,493,372,589,906,779,000
28.283784
88
0.630826
false
Ultimaker/Uranium
plugins/FileHandlers/STLWriter/STLWriter.py
1
5501
# Copyright (c) 2016 Ultimaker B.V. # Copyright (c) 2013 David Braam # Uranium is released under the terms of the LGPLv3 or higher. import struct import time from UM.Logger import Logger from UM.Mesh.MeshWriter import MeshWriter from UM.i18n import i18nCatalog catalog = i18nCatalog("uranium") class STLWriter(MeshWr...
lgpl-3.0
-7,929,089,762,363,005,000
44.098361
120
0.525177
false
dati91/servo
tests/wpt/web-platform-tests/xhr/resources/access-control-basic-preflight-cache.py
46
1709
def main(request, response): def fail(message): response.content = "FAIL " + request.method + ": " + str(message) response.status = 400 def getState(token): server_state = request.server.stash.take(token) if not server_state: return "Uninitialized" return ser...
mpl-2.0
-8,702,085,592,530,500,000
35.361702
86
0.5945
false
magnushiie/geopy
geopy/format.py
24
3013
""" Formatting... """ from geopy import units from geopy.compat import py3k if py3k: unichr = chr # pylint: disable=W0622 # Unicode characters for symbols that appear in coordinate strings. DEGREE = unichr(176) PRIME = unichr(8242) DOUBLE_PRIME = unichr(8243) ASCII_DEGREE = '' ASCII_PRIME = "'" ASCII_DOUBLE_PRIM...
mit
4,052,557,929,298,188,300
22.912698
74
0.617989
false
tkaitchuck/nupic
external/darwin64/lib/python2.6/site-packages/numpy/core/tests/test_errstate.py
23
1783
# The following exec statement (or something like it) is needed to # prevent SyntaxError on Python < 2.5. Even though this is a test, # SyntaxErrors are not acceptable; on Debian systems, they block # byte-compilation during install and thus cause the package to fail # to install. import sys if sys.version_info[:2] >=...
gpl-3.0
-5,993,280,319,917,633,000
30.280702
68
0.556927
false
boone/ansible-modules-core
cloud/rackspace/rax_scaling_policy.py
157
9070
#!/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
9,101,954,445,078,879,000
31.04947
79
0.589636
false
uni-peter-zheng/tp-libvirt
libvirt/tests/src/virsh_cmd/host/virsh_capabilities.py
7
5687
import logging import re from autotest.client.shared import utils, error from autotest.client import os_dep from virttest import libvirt_vm, virsh, utils_libvirtd, utils_misc from virttest.libvirt_xml import capability_xml def run(test, params, env): """ Test the command virsh capabilities (1) Call virsh...
gpl-2.0
-5,878,921,287,191,791,000
42.083333
81
0.554598
false
CasparLi/calibre
src/calibre/ebooks/pdf/render/engine.py
10
14304
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
gpl-3.0
-7,610,861,351,182,947,000
36.941645
96
0.57851
false
nmiroshnichenko/scripts
diskinfo/diskinfo.py
1
4642
#!/usr/bin/env python import sys _LINUX_PARTITIONS_FILE_NAME = '/proc/partitions' _LINUX_PARTITION_SIZE_MULTIPLIER = 1024 _LINUX_DISK_TYPE_NUMBERS = (3, 8) class DiskInfo(object): def get_disk_full_list(self): raise NotImplementedError("Should be called in subclasses") class DiskInfoLinux(DiskInfo): ...
mit
-8,487,443,974,152,042,000
32.157143
100
0.582508
false
nathanielvarona/airflow
tests/test_utils/perf/perf_kit/sqlalchemy.py
8
8062
# 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 u...
apache-2.0
9,090,611,227,884,521,000
32.732218
110
0.629496
false
ShownX/incubator-mxnet
example/rcnn/rcnn/processing/nms.py
41
2329
# 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 u...
apache-2.0
-6,590,217,744,179,866,000
27.753086
89
0.625161
false
nuxeh/keystone
keystone/trust/routers.py
28
2500
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-3,644,005,041,020,115,500
36.313433
78
0.6324
false
pzajda/eloquence
scons-local-2.5.0/SCons/Platform/win32.py
3
14950
"""SCons.Platform.win32 Platform-specific initialization for Win32 systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby...
mit
-1,893,968,727,766,853,400
35.198547
109
0.597324
false
chapellu/pekee2.0
Python/test_joystick2.py
1
2391
import pygame import sys import time import serial ser = serial.Serial('/dev/ttyACM0',115200) pygame.init() pygame.joystick.init() print (pygame.joystick.get_count()) _joystick = pygame.joystick.Joystick(0) _joystick.init() print (_joystick.get_init()) print (_joystick.get_id()) print (_joystick.get_name()) print (...
mit
4,542,471,297,770,310,700
28.8875
67
0.549979
false
mat12/mytest
lib/python/Components/NimManager.py
1
79035
from time import localtime, mktime from datetime import datetime import xml.etree.cElementTree from os import path from enigma import eDVBSatelliteEquipmentControl as secClass, \ eDVBSatelliteLNBParameters as lnbParam, \ eDVBSatelliteDiseqcParameters as diseqcParam, \ eDVBSatelliteSwitchParameters as switchParam, \...
gpl-2.0
-572,358,455,112,383,550
39.655864
352
0.684798
false
codingisacopingstrategy/aa.core
aacore/settings.py
1
1923
# This file is part of Active Archives. # Copyright 2006-2011 the Active Archives contributors (see AUTHORS) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # Li...
agpl-3.0
-1,930,031,849,796,650,800
44.785714
127
0.74571
false
shepdl/stream-daemon
twitter_local/stream.py
1
3651
try: import urllib.request as urllib_request import urllib.error as urllib_error import io except ImportError: import urllib2 as urllib_request import urllib2 as urllib_error import simplejson as json from ssl import SSLError import socket from .api import TwitterCall, wrap_response import sys cl...
mit
6,063,538,529,739,189,000
34.794118
87
0.6086
false
mccarrmb/moztrap
scripts/update/update.py
3
1527
""" Deployment for moztrap Requires commander (https://github.com/oremj/commander) which is installed on the systems that need it. """ import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from commander.deploy import task, hostgroups import commander_settings as settings @task def upda...
bsd-2-clause
-664,890,487,265,350,000
23.238095
88
0.681074
false
supamii/QttpServer
lib/gmock/scripts/generator/cpp/tokenize.py
679
9703
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
mit
-7,603,571,542,110,601,000
32.808362
79
0.495311
false
Kast0rTr0y/ansible
lib/ansible/modules/cloud/misc/ovirt.py
17
17885
#!/usr/bin/python # (c) 2013, Vincent Van der Kussen <vincent at vanderkussen.org> # # 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,...
gpl-3.0
-5,253,022,133,488,718,000
32.937381
268
0.612972
false
MattCrystal/shiny-octo-happiness
scripts/gcc-wrapper.py
1276
3382
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. 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 th...
gpl-2.0
5,666,666,240,075,491,000
34.229167
97
0.668539
false
zero-rp/miniblink49
v8_7_5/tools/testrunner/local/statusfile.py
5
11573
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
apache-2.0
4,204,661,375,995,003,000
33.443452
80
0.650912
false
florian-dacosta/OpenUpgrade
addons/l10n_fr_hr_payroll/report/__init__.py
424
1091
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
agpl-3.0
-6,726,227,241,592,279,000
40.961538
80
0.615949
false
devendermishrajio/nova
nova/api/openstack/compute/legacy_v2/contrib/extended_ips.py
79
3098
# Copyright 2013 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
6,312,549,496,354,266,000
38.717949
79
0.632021
false
KaiSzuttor/espresso
testsuite/python/rotational_inertia.py
2
6230
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
gpl-3.0
7,217,527,633,960,234,000
39.193548
81
0.561477
false
zirou30/MITMf
core/sslstrip/DnsCache.py
5
1699
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This...
gpl-3.0
1,187,270,855,137,955,800
27.316667
81
0.725721
false
seecr/meresco-html
meresco/html/login/basichtmlloginform.py
1
17676
## begin license ## # # "Meresco Html" is a template engine based on generators, and a sequel to Slowfoot. # It is also known as "DynamicHtml" or "Seecr Html". # # Copyright (C) 2012 Meertens Instituut (KNAW) http://meertens.knaw.nl # Copyright (C) 2012-2018, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl # Copyr...
gpl-2.0
4,736,577,999,649,226,000
44.091837
175
0.609584
false
vrieni/orange
Orange/OrangeCanvas/gui/toolgrid.py
6
14520
""" A widget containing a grid of clickable actions/buttons. """ from collections import namedtuple, deque from PyQt4.QtGui import ( QFrame, QAction, QToolButton, QGridLayout, QFontMetrics, QSizePolicy, QStyleOptionToolButton, QStylePainter, QStyle ) from PyQt4.QtCore import Qt, QObject, QSize, QVariant, QEv...
gpl-3.0
2,217,599,110,034,603,800
29.376569
79
0.556956
false
flok99/constatus
examples/lcdproc-overlay.py
1
1079
#! /usr/bin/python3 # this code uses the 'lcdproc-python3' library: # https://github.com/jinglemansweep/lcdproc # for more details about lcdproc, see: # http://lcdproc.org/ from lcdproc.server import Server import time import urllib.request def main(): # 'localhost' must be replaced by the network address on wh...
agpl-3.0
-6,633,762,631,587,860,000
27.394737
85
0.667285
false
ivmech/iviny-scope
lib/xlsxwriter/test/table/test_table07.py
1
2031
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...table import Table from ...worksheet import Wor...
gpl-3.0
4,153,449,970,051,362,300
31.758065
167
0.551452
false
kcompher/topik
topik/intermediaries/raw_data.py
1
9075
""" This file is concerned with providing a simple interface for data stored in Elasticsearch. The class(es) defined here are fed into the preprocessing step. """ import logging import time from abc import ABCMeta, abstractmethod from six import with_metaclass from elasticsearch import Elasticsearch, helpers def _...
bsd-3-clause
1,154,407,252,155,769,300
42.421053
115
0.572562
false
romain-dartigues/ansible
lib/ansible/modules/cloud/vmware/vsphere_copy.py
35
6503
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_ve...
gpl-3.0
591,458,113,666,732,400
31.515
155
0.633554
false
jtyr/ansible-modules-extras
windows/win_environment.py
90
2870
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
gpl-3.0
-9,009,353,416,383,813,000
32.372093
115
0.710801
false
40123210/-2015cd_40123210
static/Brython3.1.1-20150328-091302/Lib/errno.py
624
4096
""" This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value, e.g., on most systems, errno.ENOENT equals the integer 2. The dictionary errno.errorcode maps numeric codes to symbol names, e.g., errno.errorcode[2] could be the string 'ENOENT'. Symbols that ar...
gpl-3.0
-8,667,274,900,113,290,000
22.676301
78
0.709229
false
lbdreyer/iris
lib/iris/tests/runner/_runner.py
2
5308
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Provides testing capabilities for installed copies of Iris. """ # Because this file is imported by setup.py, there may be...
lgpl-3.0
5,360,826,476,672,065,000
31.564417
79
0.549359
false
yvess/cmsplugin-filer
cmsplugin_filer_file/migrations/0001_initial.py
13
1221
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import filer.fields.file class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347'), ('filer', '0001_initial'), ] ope...
bsd-3-clause
-2,011,703,993,929,395,700
38.387097
200
0.605242
false
AlanD88/website
web2py/gluon/contrib/login_methods/oneall_account.py
8
4595
#!/usr/bin/env python # coding: utf8 """ Oneall Authentication for web2py Developed by Nathan Freeze (Copyright © 2013) Email <nathan@freezable.com> This file contains code to allow using onall.com authentication services with web2py """ import os import base64 from gluon import * from gluon.storage i...
mit
8,773,400,201,012,808,000
41.934579
103
0.585329
false
gangadharkadam/saloon_erp_install
erpnext/selling/report/customer_credit_balance/customer_credit_balance.py
96
1688
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from erpnext.selling.doctype.customer.customer import get_customer_outstanding,...
agpl-3.0
-6,820,646,756,613,552,000
30.259259
96
0.708531
false
mezz64/home-assistant
homeassistant/components/tellduslive/binary_sensor.py
14
1068
"""Support for binary sensors using Tellstick Net.""" from homeassistant.components import binary_sensor, tellduslive from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.helpers.dispatcher import async_dispatcher_connect from .entry import TelldusLiveEntity async def async_setup_...
apache-2.0
8,650,834,080,875,974,000
32.375
69
0.714419
false
publicRoman/spark
examples/src/main/python/ml/logistic_regression_summary_example.py
71
2442
# # 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
-5,827,339,761,341,732,000
34.911765
92
0.730958
false
bdero/edx-platform
common/djangoapps/student/migrations/0002_text_to_varchar_and_indexes.py
188
9581
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'UserProfile.name' db.alter_column('auth_userprofile', 'name', self.gf('django.db.models.fields....
agpl-3.0
-2,019,794,324,044,532,000
66.471831
182
0.578854
false
friebsch/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
Chapter2_MorePyMC/separation_plot.py
86
1494
# separation plot # Author: Cameron Davidson-Pilon,2013 # see http://mdwardlab.com/sites/default/files/GreenhillWardSacks.pdf import matplotlib.pyplot as plt import numpy as np def separation_plot( p, y, **kwargs ): """ This function creates a separation plot for logistic and probit classification. Se...
mit
3,354,848,887,991,838,000
26.163636
84
0.548862
false
kaltsimon/youtube-dl
youtube_dl/extractor/cbsnews.py
96
3204
# encoding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor class CBSNewsIE(InfoExtractor): IE_DESC = 'CBS News' _VALID_URL = r'http://(?:www\.)?cbsnews\.com/(?:[^/]+/)+(?P<id>[\da-z_-]+)' _TESTS = [ { 'url': 'http://www.cbsnews....
unlicense
-4,473,809,882,856,195,600
35.827586
160
0.494382
false
Micronaet/micronaet-migration
__UNPORTED__/log_and_mail/__init__.py
1
1076
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
-4,687,576,701,648,465,000
43.833333
78
0.608736
false
quietcoolwu/python-playground
pipeg/gravitate/Board.py
4
10467
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any ...
mit
9,150,149,905,156,909,000
31.883648
74
0.515922
false
johannfaouzi/pyts
pyts/metrics/tests/test_boss.py
1
1130
"""Testing for BOSS metric.""" # Author: Johann Faouzi <johann.faouzi@gmail.com> # License: BSD-3-Clause import numpy as np import pytest import re from math import sqrt from pyts.metrics import boss x = np.arange(1, 6) y = np.arange(1, 6)[::-1] z = [0, 0, 0, 10, 0] @pytest.mark.parametrize( 'x, y, err_msg', ...
bsd-3-clause
1,450,211,842,367,647,000
25.904762
75
0.577876
false
Nikoala/CouchPotatoServer
libs/guessit/slogging.py
94
3388
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Smewt - A smart collection manager # Copyright (c) 2011 Nicolas Wack <wackou@gmail.com> # # Smewt 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 versio...
gpl-3.0
2,610,876,338,542,086,000
37.067416
101
0.577332
false
mikewiebe-ansible/ansible
lib/ansible/modules/cloud/google/gcp_compute_reservation_info.py
13
10575
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
6,478,356,719,612,284,000
32.894231
133
0.58487
false
mikewiebe-ansible/ansible
test/units/modules/network/netvisor/test_pn_vrouter_pim_config.py
23
2463
# Copyright: (c) 2018, Pluribus Networks # 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 units.compat.mock import patch from ansible.modules.network.netvisor import pn_vrouter_pim_...
gpl-3.0
-5,268,861,543,392,243,000
43.781818
109
0.653268
false
shrkey/ardupilot
Tools/LogAnalyzer/tests/TestDualGyroDrift.py
273
5396
from LogAnalyzer import Test,TestResult import DataflashLog # import scipy # import pylab #### TEMP!!! only for dev # from scipy import signal class TestDualGyroDrift(Test): '''test for gyro drift between dual IMU data''' def __init__(self): Test.__init__(self) self.name = "Gyro Drift" self.enable = Fals...
gpl-3.0
4,474,231,960,514,473,500
44.344538
193
0.686805
false
siddhartharay007/buck
third-party/py/twitter-commons/src/python/twitter/common/python/translator.py
18
6084
from __future__ import absolute_import from abc import abstractmethod import os import shutil from .common import chmod_plus_w, safe_rmtree, safe_mkdir, safe_mkdtemp from .compatibility import AbstractClass from .installer import WheelInstaller from .interpreter import PythonInterpreter from .package import ( Egg...
apache-2.0
-1,293,689,036,037,734,000
32.61326
97
0.659599
false
foreni-packages/golismero
thirdparty_libs/django/core/serializers/pyyaml.py
110
2353
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import decimal import yaml from io import StringIO from django.db import models from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer fr...
gpl-2.0
-3,207,120,520,895,233,000
34.119403
88
0.694433
false
eteq/ginga
ginga/gtkw/ImageViewCanvasGtk.py
4
1290
# # ImageViewCanvasGtk.py -- A FITS image widget with canvas drawing in Gtk # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga.gtkw import ImageViewGtk from gin...
bsd-3-clause
7,138,814,110,296,551,000
33.864865
73
0.612403
false
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pygments/lexers/_tsql_builtins.py
31
15484
# -*- coding: utf-8 -*- """ pygments.lexers._tsql_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These are manually translated lists from https://msdn.microsoft.com. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # See https://msdn.microsof...
gpl-3.0
6,833,957,967,043,161,000
14.422311
76
0.47139
false
stevenbrichards/boto
boto/cognito/__init__.py
473
1123
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
mit
68,578,901,372,306,024
52.47619
77
0.770258
false
oy-vey/algorithms-and-data-structures
6-GenomeAssemblyProgrammingChallenge/Week3/optimal_kmer_size.py
1
2363
# python3 class Edge: def __init__(self, u, v, value): self.u = u self.v = v self.value = value class Graph: def __init__(self): self.edges = [] self.incoming_edges = [] self.graph = dict () #[[] for _ in range(n)] self.incoming_graph = dict() def...
mit
-6,686,848,352,147,527,000
23.122449
68
0.561151
false
GiladE/birde
venv/lib/python2.7/site-packages/psycopg2/tests/test_cancel.py
62
3705
#!/usr/bin/env python # -*- coding: utf-8 -*- # test_cancel.py - unit test for query cancellation # # Copyright (C) 2010-2011 Jan Urbański <wulczer@wulczer.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free...
mit
491,531,503,256,006,460
32.369369
74
0.634449
false
romankagan/DDBWorkbench
python/lib/Lib/site-packages/django/template/loaders/filesystem.py
229
2358
""" Wrapper for loading templates from the filesystem. """ from django.conf import settings from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils._os import safe_join class Loader(BaseLoader): is_usable = True def get_template_sources(self, temp...
apache-2.0
7,047,290,332,778,797,000
37.655738
140
0.630619
false
Justin-Yuan/Image2Music-Generator
library/jython2.5.3/Lib/test/test_os_jy.py
5
1551
"""Misc os module tests Made for Jython. """ import os import unittest from test import test_support class OSTestCase(unittest.TestCase): def setUp(self): open(test_support.TESTFN, 'w').close() def tearDown(self): if os.path.exists(test_support.TESTFN): os.remove(test_support.TES...
gpl-2.0
-874,241,020,285,828,500
25.741379
71
0.589942
false
webOS-ports/qtwebkit
Tools/Scripts/webkitpy/common/system/executive_mock.py
117
7106
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
gpl-2.0
4,018,812,982,827,541,000
36.010417
104
0.609203
false
RaoUmer/django
django/contrib/localflavor/si/si_postalcodes.py
110
13147
# *-* coding: utf-8 *-* from __future__ import unicode_literals SI_POSTALCODES = [ (1000, 'Ljubljana'), (1215, 'Medvode'), (1216, 'Smlednik'), (1217, 'Vodice'), (1218, 'Komenda'), (1219, 'Laze v Tuhinju'), (1221, 'Motnik'), (1222, 'Trojane'), (1223, 'Blagovica'), (1225, 'Lukovic...
bsd-3-clause
-4,111,504,154,962,944,500
26.97234
67
0.537765
false
victorbriz/rethinkdb
external/v8_3.30.33.16/tools/run-tests.py
33
22539
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # noti...
agpl-3.0
-2,116,769,042,752,186
36.880672
80
0.613204
false
ahmadiga/min_edx
common/djangoapps/enrollment/views.py
14
28709
""" The Enrollment API Views should be simple, lean HTTP endpoints for API access. This should consist primarily of authentication, request validation, and serialization. """ import logging from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from opaque_keys impo...
agpl-3.0
5,582,908,258,552,373,000
42.697108
120
0.602947
false
jmcarp/osf.io
scripts/staff_public_regs.py
25
1355
# -*- coding: utf-8 -*- """Get public registrations for staff members. python -m scripts.staff_public_regs """ from collections import defaultdict import logging from modularodm import Q from website.models import Node, User from website.app import init_app logger = logging.getLogger('staff_public_regs') STAFF...
apache-2.0
7,287,444,329,684,283,000
27.229167
97
0.597786
false
MarceloCorpucci/lettucetutorial
specs/glue/register_fields_steps.py
1
2016
__author__ = 'corpu' from lettuce import step, world import webtest class RegisterFieldSteps(): #Background steps @step(u'Dado que la aplicacion ACL esta en "([^"]*)"') def dado_que_la_aplicacion_acl_esta_en_group1(step, url): world.webApp = webtest.TestApp(url) @step(u'Cuando accedo a la mi...
gpl-2.0
771,311,736,563,944,200
48.195122
156
0.667163
false
jgoclawski/django
tests/generic_inline_admin/tests.py
154
22749
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from django.contrib.contenttypes.admin import GenericTabularInline from django.contrib.contenttypes.forms import...
bsd-3-clause
8,687,456,767,391,364,000
45.712526
530
0.6486
false
kyledewey/z3
scripts/mk_win_dist.py
1
8708
############################################ # Copyright (c) 2012 Microsoft Corporation # # Scripts for automatically generating # Window distribution zip files. # # Author: Leonardo de Moura (leonardo) ############################################ import os import glob import re import getopt import sys import shutil...
mit
-2,921,153,309,072,303,600
30.436823
124
0.550413
false
liucode/tempest-master
tempest/services/object_storage/container_client.py
9
6222
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-904,130,707,056,104,600
35.816568
79
0.598843
false
wildchildyn/autism-website
yanni_env/lib/python3.6/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py
2763
12628
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
1,258,221,678,260,830,200
55.124444
70
0.549176
false
louyihua/edx-platform
lms/djangoapps/certificates/tests/test_signals.py
29
1324
""" Unit tests for enabling self-generated certificates by default for self-paced courses. """ from certificates import api as certs_api from certificates.models import CertificateGenerationConfiguration from certificates.signals import _listen_for_course_publish from openedx.core.djangoapps.self_paced.models import Se...
agpl-3.0
1,896,101,612,970,942,500
41.709677
83
0.759819
false
adelina-t/nova
nova/api/openstack/compute/contrib/hosts.py
48
14023
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
2,141,364,429,776,899,000
41.237952
79
0.559581
false
orbnauticus/Pique
pique/rawtty.py
1
5205
#!/usr/bin/python # # Copyright (c) 2010, Ryan Marquardt # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # 1. Redistributions of source code must retain the above copyright notice, # this l...
bsd-3-clause
440,016,784,700,069,760
28.573864
76
0.655331
false
dmlc/tvm
python/tvm/contrib/rocm.py
3
5347
# 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 u...
apache-2.0
-2,652,193,324,622,047,000
30.452941
100
0.62334
false
Eddy0402/rt-thread
bsp/mb9bf506r/rtconfig.py
41
3310
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='iar' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = '...
gpl-2.0
-7,187,407,059,665,664,000
26.355372
136
0.558912
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython-2.2.0-py2.7.egg/IPython/parallel/tests/test_mongodb.py
12
1563
"""Tests for mongodb backend Authors: * Min RK """ #------------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this softwar...
apache-2.0
-5,459,744,469,710,275,000
26.910714
80
0.541907
false
bob3000/thumbor_aws
vows/result_storage_vows.py
3
3453
#se!/usr/bin/python # -*- coding: utf-8 -*- from pyvows import Vows, expect from thumbor.context import Context from tc_aws import Config from fixtures.storage_fixture import IMAGE_BYTES, get_server from boto.s3.connection import S3Connection from moto import mock_s3 from tc_aws.result_storages.s3_storage import St...
mit
4,733,106,727,057,738,000
31.271028
107
0.615696
false
auntieNeo/asterisk-testsuite
lib/python/asterisk/channel_test_condition.py
1
8676
#!/usr/bin/env python """Test condition for channels Copyright (C) 2011-2012, Digium, Inc. Matt Jordan <mjordan@digium.com> This program is free software, distributed under the terms of the GNU General Public License Version 2. """ from twisted.internet import defer from test_conditions import TestCondition import l...
gpl-2.0
6,422,128,831,627,382,000
35.15
89
0.602582
false
terbolous/SickRage
lib/hachoir_parser/audio/flac.py
95
5626
""" FLAC (audio) parser Documentation: * http://flac.sourceforge.net/format.html Author: Esteban Loiseau <baal AT tuxfamily.org> Creation date: 2008-04-09 """ from hachoir_parser import Parser from hachoir_core.field import FieldSet, String, Bit, Bits, UInt16, UInt24, RawBytes, Enum, NullBytes from hachoir_core.st...
gpl-3.0
-1,582,438,814,903,649,500
34.834395
116
0.602026
false
toshywoshy/ansible
lib/ansible/modules/network/fortios/fortios_wireless_controller_ble_profile.py
7
13328
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
-6,563,749,026,531,248,000
31.271186
123
0.548394
false
home-assistant/home-assistant
homeassistant/components/guardian/switch.py
2
7888
"""Switches for the Elexa Guardian integration.""" from __future__ import annotations from aioguardian import Client from aioguardian.errors import GuardianError import voluptuous as vol from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.co...
apache-2.0
848,871,815,524,247,400
33.147186
88
0.592672
false
nitzmahone/ansible-modules-extras
network/haproxy.py
26
13390
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Ravi Bhure <ravibhure@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 Lice...
gpl-3.0
-8,091,297,574,006,713,000
37.148148
169
0.654593
false
robmcl4/Coinex
arbitrage.py
1
16316
""" arbitrage.py Check for arbitrage opportunities. USAGE: python arbitrage.py [--all] --all Display all arbitrage opportunities, not just profitable ones """ from models import * from decimal import * import utils import sys # the coinex transaction fee TRANSAC_FEE = 0.002 # the minimum amount of to_currency r...
apache-2.0
-8,020,515,266,900,259,000
30.867188
79
0.550625
false
KingsCross/Quadrotor
Tools/autotest/dump_logs.py
229
1762
#!/usr/bin/env python # dump flash logs from SITL # Andrew Tridgell, April 2013 import pexpect, os, sys, shutil, atexit import optparse, fnmatch, time, glob, traceback, signal sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'pysim')) import util ############## main program ############# ...
gpl-3.0
597,518,460,353,266,800
29.37931
101
0.61975
false
seaotterman/tensorflow
tensorflow/contrib/linalg/python/ops/linear_operator_addition.py
30
15248
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-4,139,310,233,372,339,000
34.37819
80
0.658709
false
vicnet/weboob
modules/meslieuxparis/module.py
1
1444
# -*- coding: utf-8 -*- # Copyright(C) 2018 Vincent A # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
lgpl-3.0
4,421,024,983,590,817,300
31.088889
77
0.723684
false
PLyczkowski/Sticky-Keymap
2.74/python/lib/encodings/mac_centeuro.py
257
14102
""" Python Character Mapping Codec mac_centeuro generated from 'MAPPINGS/VENDORS/APPLE/CENTEURO.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,inp...
gpl-2.0
2,331,040,439,172,502,500
44.934853
118
0.553255
false
lcostantino/healing-os
healing/openstack/common/log.py
1
26305
# Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
apache-2.0
5,974,308,001,666,819,000
35.534722
79
0.588785
false