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
cemrecan/a2billing-spyne
a2billing_spyne/main.py
2
2538
# encoding: utf8 # # This file is part of the a2billing-spyne project. # Copyright (c), Arskom Ltd. (arskom.com.tr), # Cemrecan Ünal <unalcmre@gmail.com>. # Burak Arslan <burak.arslan@arskom.com.tr>. # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
bsd-3-clause
5,981,095,394,154,214,000
36.308824
80
0.734332
false
saurabh6790/omnitech-lib
webnotes/utils/nestedset.py
10
7568
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Tree (Hierarchical) Nested Set Model (nsm) # # To use the nested set model, # use the following pattern # 1. name your parent field as "parent_item_group" if not have a property nsm_parent_field as your field nam...
mit
4,414,446,700,787,263,500
34.2
143
0.643103
false
alfayez/gnuradio
gr-utils/src/python/modtool/parser_cc_block.py
9
10113
# # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
gpl-3.0
7,838,489,100,535,980,000
43.946667
126
0.437556
false
xapple/seqsearch
seqsearch/search/hmmer.py
1
4177
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Written by Lucas Sinclair. MIT Licensed. Contact at www.sinclair.bio """ # Built-in modules # import warnings, multiprocessing # Internal modules # from seqsearch.databases.pfam import pfam from seqsearch.databases.tigrfam import tigrfam # First party modules # ...
mit
-4,540,044,765,341,390,000
36.630631
99
0.534115
false
c17r/TagTrain
scripts/utils.py
2
1576
import os import re import sys from importlib import import_module _ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) _SRC = os.path.join(_ROOT, 'src') def make_readme(name, repo): readme = os.path.join(_ROOT, 'README.rst') with open(readme, 'w') as f: f.write('''.. start-badges .....
mit
5,689,573,281,355,903,000
22.522388
94
0.578046
false
163gal/Time-Line
libs/wx/tools/helpviewer.py
5
2507
#---------------------------------------------------------------------- # Name: wx.tools.helpviewer # Purpose: HTML Help viewer # # Author: Robin Dunn # # Created: 11-Dec-2002 # RCS-ID: $Id: helpviewer.py 45966 2007-05-11 18:54:09Z RD $ # Copyright: (c) 2002 by Total Control Software # Licenc...
gpl-3.0
1,577,971,815,337,801,700
26.549451
78
0.588353
false
reinout/django
django/contrib/gis/management/commands/ogrinspect.py
20
5848
import argparse from django.contrib.gis import gdal from django.core.management.base import BaseCommand, CommandError from django.utils.inspect import get_func_args class LayerOptionAction(argparse.Action): """ Custom argparse action for the `ogrinspect` `layer_key` keyword option which may be an integer...
bsd-3-clause
9,150,530,282,185,798,000
42.969925
112
0.582763
false
amahabal/PySeqsee
farg/core/categorization/binding.py
1
1186
# Copyright (C) 2011, 2012 Abhijit Mahabal # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later version. # # This program is distribu...
gpl-3.0
2,296,654,989,369,674,000
41.357143
85
0.730185
false
ralphwort/chef-repo
build/python-neutronclient/neutronclient/tests/unit/test_cli20_extensions.py
2
1955
# Copyright 2013 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.org/licenses/LICENSE-2.0 # # Unless required ...
apache-2.0
-5,203,050,540,671,098,000
40.595745
78
0.66445
false
xsteadfastx/pelican-plugins
liquid_tags/diag.py
25
4100
""" Blockdiag Tag --------- This tag implements a liquid style tag for blockdiag [1]. You can use different diagram types like blockdiag, seqdiag, packetdiag etc. [1] [1] http://blockdiag.com/en/blockdiag/ Syntax ------ {% blockdiag { <diagramm type> { <CODE> } } %} Examples -------...
agpl-3.0
-5,766,266,376,528,250,000
22.163842
138
0.532927
false
Yannig/ansible
lib/ansible/modules/network/nxos/nxos_snmp_traps.py
8
7300
#!/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
6,581,111,262,623,944,000
29.543933
87
0.571507
false
TakefiveInteractive/TedkOS
gui/cArrFile.py
1
1145
#!/usr/bin/python2.7 import sys import struct ''' magic ("\x01carray\x01file\x01") numOfObjs (uint32_t) For each obj: length (uint32_t) (length = 0 <=> padding) obj 0x55 0xaa ''' magic = "\x01carray\x01file\x01" # elements in List will be converted to bytearray. def makeCArray(inputList): ans = bytearray...
gpl-2.0
-5,790,802,003,291,314,000
19.836364
83
0.624454
false
luckielordie/conan
conans/test/remove_subsetting_test.py
2
5370
import unittest from conans.test.utils.tools import TestClient from conans.util.files import mkdir import os class RemoveSubsettingTest(unittest.TestCase): def remove_options_test(self): # https://github.com/conan-io/conan/issues/2327 # https://github.com/conan-io/conan/issues/2781 client...
mit
7,556,191,679,822,019,000
35.530612
109
0.618063
false
zeroc0d3/docker-lab
ruby/rootfs/usr/lib/python2.7/dist-packages/powerline/lib/shell.py
16
4164
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import os from subprocess import Popen, PIPE from functools import partial from powerline.lib.encoding import get_preferred_input_encoding, get_preferred_output_encoding if sys.platform.sta...
mit
3,810,917,127,208,223,000
30.278195
94
0.703125
false
jluttine/bayespy
bayespy/inference/vmp/nodes/gp.py
4
23431
################################################################################ # Copyright (C) 2011-2012 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ import itertools import numpy as np import scipy as sp import sci...
mit
-8,059,095,777,191,274,000
27.401212
95
0.466092
false
travislbrundage/geonode
geonode/people/autocomplete_light_registry.py
11
1333
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
3,028,582,444,827,986,400
35.027027
73
0.662416
false
smurfix/httplib2
python2/httplib2test_appengine.py
7
2188
"""Tests for httplib2 on Google App Engine.""" import mock import os import sys import unittest APP_ENGINE_PATH='/usr/local/google_appengine' sys.path.insert(0, APP_ENGINE_PATH) import dev_appserver dev_appserver.fix_sys_path() from google.appengine.ext import testbed # Ensure that we are not loading the httplib2...
mit
-5,151,024,276,451,210,000
26.696203
80
0.713894
false
chenziliang/google
Splunk_TA_google/bin/splunktalib/modinput.py
1
4669
import sys import subprocess import traceback from splunktalib.common import log import splunktalib.splunk_platform as sp logger = log.Logs().get_logger("util") def _parse_modinput_configs(root, outer_block, inner_block): """ When user splunkd spawns modinput script to do config check or run <?xml ver...
mit
-5,073,781,968,028,439,000
30.126667
77
0.620904
false
ssut/PushBank
adapters/hana.py
1
2918
# -*- coding: utf-8 -*- import json import urllib import urllib2 from bs4 import BeautifulSoup from datetime import datetime, timedelta en_name = 'hana' name = u'하나은행' def query(account, password, resident): """ 하나은행 계좌 잔액 빠른조회. 빠른조회 서비스에 등록이 되어있어야 사용 가능. 빠른조회 서비스: https://open.hanabank.com/flex/quick...
mit
6,866,556,140,860,453,000
28.711111
76
0.504862
false
horance-liu/tensorflow
tensorflow/python/debug/lib/debug_gradients.py
25
15201
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,737,249,932,943,252,000
35.453237
80
0.676469
false
mutability/mlat-client
mlat/client/options.py
1
6636
#!/usr/bin/env python3 # -*- mode: python; indent-tabs-mode: nil -*- # Part of mlat-client - an ADS-B multilateration client. # Copyright 2015, Oliver Jowett <oliver@mutability.co.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
gpl-3.0
2,082,988,202,807,016,700
33.030769
113
0.604581
false
tcmoore3/mbuild
mbuild/packing.py
1
14323
from __future__ import division import sys import os import tempfile import warnings from distutils.spawn import find_executable from subprocess import Popen, PIPE import numpy as np from mbuild.compound import Compound from mbuild.exceptions import MBuildError from mbuild.box import Box from mbuild import clone __...
mit
-2,805,964,307,335,604,000
36.396867
108
0.611324
false
bravo-zhang/spark
examples/src/main/python/sql/streaming/structured_network_wordcount.py
51
2539
# # 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
7,066,528,901,242,410,000
31.974026
94
0.686885
false
ConnorDillon/bhyve
bhyve/config.py
1
2053
import os import copy from .utils import flatmap from .serializable import Serializable from .vm import VM class Config(Serializable): def __init__(self, vms): self.vms = vms self.file = '' def add(self, vm): self.vms[vm.name] = vm return self def remove(self, vm_name): ...
gpl-3.0
-4,245,439,619,576,110,600
22.883721
98
0.514856
false
greasypizza/grpc
src/python/grpcio/grpc/framework/foundation/logging_pool.py
6
3194
# Copyright 2015, 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...
bsd-3-clause
5,036,194,065,998,722,000
36.576471
81
0.700689
false
Antificial/antificial
antificial/framework/world.py
1
13417
#! /usr/bin/env python from multiprocessing import Array import util from random import randint from enum import Enum from framework import PheromoneType class Field: def __init__(self, x, y, is_nest, ant_count, home_pheromone_level, food_pheromone_level, player_food_levels): self.x = x self.y = y...
mit
-591,269,150,169,951,500
36.066298
113
0.548036
false
strk/mapnik
tests/cpp_tests/build.py
2
1430
import os import glob from copy import copy Import ('env') test_env = env.Clone() test_env['LIBS'] = copy(env['LIBMAPNIK_LIBS']) test_env.AppendUnique(LIBS='mapnik') test_env.AppendUnique(LIBS='sqlite3') test_env.AppendUnique(CXXFLAGS='-g') for cpp_test in glob.glob('*_test.cpp'): name = cpp_test.replace('.cpp'...
lgpl-2.1
-877,316,198,166,355,200
37.648649
105
0.625175
false
AnhellO/DAS_Sistemas
Ago-Dic-2020/rodriguez-martinez-jesus-angel/primer-parcial/builder.py
1
1125
# Abstract Building class Pizza: def __init__(self, inches): self.ingredients = ["salsa de tomate", "queso"] self.inches = inches def __str__(self): message = f'Mi pizza es de {self.inches}" con los siguientes ingredientes: ' + ', '.join(self.ingredients) # Replace the last comma with "y" last_c...
mit
5,899,140,755,982,430,000
31.114286
110
0.650045
false
BehavioralInsightsTeam/edx-platform
common/djangoapps/third_party_auth/decorators.py
14
1358
""" Decorators that can be used to interact with third_party_auth. """ from functools import wraps from django.conf import settings from django.shortcuts import redirect from django.utils.decorators import available_attrs from six.moves.urllib.parse import urlencode, urlparse from third_party_auth.models import LTIPr...
agpl-3.0
-6,572,996,483,951,134,000
38.941176
112
0.682622
false
ramjothikumar/Diamond
src/collectors/diskspace/test/testdiskspace.py
18
4782
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from test import run_only from mock import Mock from mock import patch from diamond.collector import Collector ...
mit
4,512,097,441,752,021,500
30.88
78
0.549561
false
Orav/kbengine
kbe/src/lib/python/Lib/xml/sax/expatreader.py
14
15076
""" SAX driver for the pyexpat C module. This driver works with pyexpat.__version__ == '2.22'. """ version = "0.20" from xml.sax._exceptions import * from xml.sax.handler import feature_validation, feature_namespaces from xml.sax.handler import feature_namespace_prefixes from xml.sax.handler import feature...
lgpl-3.0
-5,827,036,098,280,784,000
34.153477
79
0.584903
false
tvaddonsco/tva-release-repo
leia/plugin.video.premiumizerx/resources/lib/modules/playcount.py
4
14082
import json from resources.lib.modules import control from resources.lib.api import trakt from resources.lib.modules.metalibrary import playcountMeta from resources.lib.modules import metalibrary from resources.lib.modules.log_utils import log def clearPlaycount(): clear = metalibrary.clearPlaycount() ...
gpl-3.0
4,708,284,172,765,423,000
37.335196
149
0.56732
false
Edraak/edraak-platform
lms/djangoapps/shoppingcart/management/tests/test_retire_order.py
13
2868
"""Tests for the retire_order command""" from tempfile import NamedTemporaryFile from django.core.management import call_command from course_modes.models import CourseMode from shoppingcart.models import CertificateItem, Order from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_util...
agpl-3.0
-483,587,724,983,874,000
31.965517
79
0.620293
false
ganeshgore/myremolab
server/src/voodoo/gen/coordinator/Access.py
2
2950
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # list...
bsd-2-clause
581,917,420,640,148,000
34.963415
109
0.67277
false
AugustC/project-epidemio
src/dataset.py
1
2112
# -*- coding: latin-1 -*- import pandas as pd import numpy as np first_year = 2000 last_year = 2013 def read_raw_input(filename): # Receive the raw input from filename.csv and return the panda time series dataset = pd.read_csv(filename, sep=';', encoding='latin-1') labels = dataset.keys() city_label ...
mit
-2,772,738,059,270,581,000
34.2
85
0.624053
false
ehsan/airmozilla
airmozilla/staticpages/views.py
10
2987
# Adapted from django.contrib.flatpages.middleware from django.conf import settings from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404, render from django.template import loader, RequestContext, Template from django.utils.safestring import mark_s...
bsd-3-clause
-160,157,908,733,099,840
31.467391
76
0.646803
false
iw3hxn/LibrERP
core_extended/models/company.py
1
1654
# -*- encoding: utf-8 -*- ############################################################################## # # Author: Didotech SRL # Copyright 2014 Didotech SRL # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
6,659,984,753,844,151,000
37.465116
134
0.602781
false
Shao-Feng/testkit-lite
testkitlite/engines/pyunit.py
4
5751
#!/usr/bin/python # # Copyright (C) 2012 Intel Corporation # # 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 pr...
gpl-2.0
2,795,866,676,022,362,600
31.308989
88
0.586854
false
dan-cristian/haiot
apps/esp8266_vent_motor/common.py
1
2605
# https://github.com/micropython/micropython/issues/2352 import esp from flashbdev import bdev import machine import ujson import mqtt ADC_MODE_VCC = 255 ADC_MODE_ADC = 0 rtc = machine.RTC() class rtc_storage: mqtts = 0 mqttp = 0 closed = 1 angle = 0 def set_adc_mode(mode): sector_size = bdev....
gpl-2.0
8,380,810,964,129,800,000
30.385542
88
0.588868
false
hackers-terabit/portage
pym/portage/package/ebuild/_config/VirtualsManager.py
16
6654
# Copyright 2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ( 'VirtualsManager', ) from copy import deepcopy from portage import os from portage.dep import Atom from portage.exception import InvalidAtom from portage.localization import _ from portage.util import g...
gpl-2.0
1,610,628,014,105,041,000
27.55794
94
0.685152
false
cbingos/cpro
cpro/settings.py
1
10357
# -*- coding: utf-8 -*- import os import sys DEBUG = True TEMPLATE_DEBUG = DEBUG #PREPEND_WWW = True#301 redirect to wwww APPEND_SLASH = True#url add end "/" ADMINS = ( ('cbin', 'yu.cbin@gmail.com'), ) ADMIN_EXPORTERS = ( # 'djadmin_export.exporters.xlsx.XLSXExporter', ) MANAGERS = ADMINS dbpath = os.path.dir...
mit
8,115,872,049,929,756,000
35.003571
111
0.627716
false
tzolov/hortonworks-gallery.github.io
tsv_import.py
2
1157
#!/usr/bin/python import sys import csv import json tsvProjectFile = open(sys.argv[1], 'r') projectFile = open('src/projects/repos.json', 'w') fieldnames = ("projectTitle","projectDescription","featured","category","subcategory", "url", "repoAccount", "repoName", "buttonText", "included", "contributors") reader = csv...
apache-2.0
6,400,279,880,035,483,000
49.347826
369
0.576491
false
pluralsight/guides-cms
docs/conf.py
2
8657
# -*- coding: utf-8 -*- # # Hacker-guides CMS documentation build configuration file, created by # sphinx-quickstart on Thu Nov 19 08:51:06 2015. # # 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 f...
agpl-3.0
-5,459,976,400,695,646,000
30.028674
79
0.701398
false
mircealungu/Zeeguu-Core
tools/learner_level.py
1
1584
#!/usr/bin/env python """ Script that lists recent users To be called from a cron job. """ from sortedcontainers import SortedList from zeeguu_core.model import User, Bookmark from wordstats import Word user = User.find_by_id(1890) language = 'nl' months_dict = dict() for bookmark in Bookmark.query.filter...
mit
-389,770,890,047,582,600
21.956522
64
0.63447
false
jefffohl/nupic
tests/swarming/nupic/swarming/experiments/smart_speculation_temporal/permutations.py
38
5492
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
5,411,109,736,788,141,000
36.875862
167
0.68445
false
swiftstack/swift3-stackforge
swift3/test/unit/test_s3_token_middleware.py
2
34117
# 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,715,393,012,582,015,500
38.080183
79
0.560219
false
guillermooo-forks/dart-sublime-bundle
lib/analyzer/pipe_server.py
3
1941
# Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details. # All rights reserved. Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file.) '''Wraps a process to make it act as a pipe server. Takes care of supressing console windows under Windows ...
bsd-3-clause
-4,318,954,298,407,976,400
31.333333
87
0.587629
false
lavish205/olympia
src/olympia/legacy_discovery/modules.py
1
9316
# -*- coding: utf-8 -*- from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ import jinja2 from olympia.addons.models import Addon from olympia.bandwagon.models import ( Collection, MonthlyPick as MonthlyPickModel) from olympia.legacy_api.views import addon_f...
bsd-3-clause
-3,985,784,769,514,446,000
31.228374
79
0.617994
false
TiniKhang/cfvg-discordbot
Hyper_Calculator.py
2
2773
import math from fractions import * def smallernum(a,b): '''Return the smaller of two values''' if a < b: return a else: return b def Odds(a,b,d): '''Returns probability Parent: HGC() Called when: sample size is 1 Why: Prevents factorials from being made, as it is unnecessary. Of course, ...
mit
-16,031,917,814,267,832
27.010101
91
0.559683
false
Ruide/angr-dev
angr-doc/examples/secuinside2016mbrainfuzz/solve.py
1
5451
# This example is for secuinsides mbrainfuzz challenge (2016) # The challenge gave you binaries which you automatically had # to exploit - since the service is not online anymore, 4 example # binaries, obtained during the ctf, are included in this example # The script is based on the writeup at # https://tasteless.eu/p...
bsd-2-clause
3,890,985,157,817,336,300
35.831081
302
0.659695
false
janus-ets/django-auth-ldap3
django_auth_ldap/config.py
2
22852
# Copyright (c) 2009, Peter Sagerson # 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 ...
bsd-2-clause
4,442,355,700,673,920,000
35.388535
117
0.616051
false
wrouesnel/ansible
lib/ansible/module_utils/facts/compat.py
23
4115
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
-4,557,754,301,573,688,000
46.298851
94
0.681896
false
miniconfig/home-assistant
homeassistant/components/config/hassbian.py
9
2472
"""Component to interact with Hassbian tools.""" import asyncio import json import os from homeassistant.components.http import HomeAssistantView _TEST_OUTPUT = """ { "suites":{ "libcec":{ "state":"Uninstalled", "description":"Installs the libcec package for controlling CEC device...
mit
2,375,142,109,037,028,000
26.164835
122
0.62945
false
pnasrat/yum
yum/Errors.py
1
4097
#!/usr/bin/python -tt # 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 is distributed in the hope that i...
gpl-2.0
8,602,026,957,233,051,000
24.767296
79
0.675372
false
postlund/home-assistant
homeassistant/helpers/discovery.py
2
5724
"""Helper methods to help with platform discovery. There are two different types of discoveries that can be fired/listened for. - listen/discover is for services. These are targeted at a component. - listen_platform/discover_platform is for platforms. These are used by components to allow discovery of their platf...
apache-2.0
8,365,989,192,857,045,000
32.086705
88
0.698812
false
nicproulx/mne-python
mne/tests/test_epochs.py
2
91453
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import os.path as op from copy import deepcopy from nose.tools import (assert_true, assert_equal, assert_raises, assert_not_equal) from numpy....
bsd-3-clause
8,410,499,245,579,183,000
42.322122
79
0.604802
false
MOA-2011/enigma2.pli4.0
lib/python/Components/Converter/ServiceName2.py
1
23033
# -*- coding: utf-8 -*- # # Extended ServiceName Converter for Enigma2 Dreamboxes (ServiceName2.py) # Coded by vlamo (c) 2011 # # Version: 0.4 (03.06.2011 18:40) # Version: 0.5 (08.09.2012) add Alternative numbering mode support - Dmitry73 & 2boom # Version: 0.6 (19.10.2012) add stream mapping # Version: 0.7 (19.09.201...
gpl-2.0
-7,542,504,310,261,494,000
34.158779
184
0.62747
false
mozilla-iam/cis
python-modules/cis_publisher/cis_publisher/ldap.py
1
2591
import cis_profile import cis_publisher import boto3 import botocore import logging import lzma import json from traceback import format_exc logger = logging.getLogger(__name__) class LDAPPublisher: def __init__(self): self.secret_manager = cis_publisher.secret.Manager() def publish(self, user_ids=N...
mpl-2.0
6,481,470,480,269,489,000
36.014286
116
0.612891
false
KohlsTechnology/ansible
lib/ansible/utils/module_docs_fragments/ovirt_facts.py
7
3242
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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) ...
gpl-3.0
1,827,179,313,049,713,400
49.65625
145
0.676743
false
sadanandb/pmt
src/tactic/ui/cgapp/loader_wdg.py
6
6041
########################################################### # # 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
-4,508,145,218,076,429,300
32.748603
148
0.584506
false
tumbl3w33d/ansible
test/units/utils/amazon_placebo_fixtures.py
13
6932
from __future__ import absolute_import, division, print_function __metaclass__ = type import errno import os import time import mock import pytest boto3 = pytest.importorskip("boto3") botocore = pytest.importorskip("botocore") placebo = pytest.importorskip("placebo") """ Using Placebo to test modules using boto3: T...
gpl-3.0
-5,258,268,011,027,281,000
31.544601
102
0.613964
false
hjjeon0608/mbed_for_W7500P
workspace_tools/build_api.py
30
22655
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
apache-2.0
8,446,815,926,178,976,000
40.190909
160
0.675127
false
iannesbitt/iannesbitt.org
main/migrations/0001_initial.py
1
1118
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-24 03:20 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depen...
mpl-2.0
-5,663,240,715,749,562,000
33.9375
120
0.620751
false
sspreitzer/tahoe-lafs
src/allmydata/introducer/client.py
6
16218
import time from zope.interface import implements from twisted.application import service from foolscap.api import Referenceable, eventually, RemoteInterface from allmydata.interfaces import InsufficientVersionError from allmydata.introducer.interfaces import IIntroducerClient, \ RIIntroducerSubscriberClient_v1, ...
gpl-2.0
4,940,367,147,178,672,000
43.925208
95
0.591072
false
DShokes/ArcREST
src/arcrest/packages/ntlm3/U32.py
6
3652
# This file is part of 'NTLM Authorization Proxy Server' http://sourceforge.net/projects/ntlmaps/ # Copyright 2001 Dmitry A. Rozmanov <dima@xenon.spb.ru> # # This library 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 Soft...
apache-2.0
2,199,663,836,172,812,800
22.410256
121
0.517251
false
pyfisch/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py
4
5262
import os import platform import socket from abc import ABCMeta, abstractmethod from copy import deepcopy from ..wptcommandline import require_arg # noqa: F401 here = os.path.split(__file__)[0] def inherit(super_module, child_globals, product_name): super_wptrunner = super_module.__wptrunner__ child_global...
mpl-2.0
-1,312,770,853,328,141,800
28.071823
101
0.629038
false
nakagami/reportlab
src/reportlab/graphics/samples/runall.py
1
1969
# runs all the GUIedit charts in this directory - # makes a PDF sample for eaxh existing chart type import sys import glob import inspect import types def moduleClasses(mod): def P(obj, m=mod.__name__, CT=types.ClassType): return (type(obj)==CT and obj.__module__==m) try: return inspect.getmemb...
bsd-3-clause
-3,195,991,860,190,270,500
32.948276
96
0.503809
false
ogrisel/numpy
numpy/numarray/functions.py
13
15986
from __future__ import division, absolute_import, print_function # missing Numarray defined names (in from numarray import *) __all__ = ['asarray', 'ones', 'zeros', 'array', 'where'] __all__ += ['vdot', 'dot', 'matrixmultiply', 'ravel', 'indices', 'arange', 'concatenate', 'all', 'allclose', 'alltrue', 'an...
bsd-3-clause
7,563,496,858,626,876,000
30.972
92
0.609658
false
craiga/openfootydata
models/models.py
1
5396
from datetime import datetime from django.db import models from django.core import validators import pytz import timezonefinder from colorful.fields import RGBColorField class League(models.Model): id = models.CharField(max_length=200, primary_key=True, validators=[ validators.MinLengthValidator(1), ...
gpl-2.0
652,259,131,672,871,200
34.973333
79
0.568199
false
AmrnotAmr/zato
code/zato-server/src/zato/server/base/parallel.py
5
40693
# -*- coding: utf-8 -*- """ Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import logging, os, time, signal from datetime import datetime from http...
gpl-3.0
10,401,790,228,357,972
41.168912
130
0.621483
false
jkonecny12/anaconda
pyanaconda/core/users.py
2
17675
# # users.py: Code for creating user accounts and setting the root password # # Copyright (C) 2006, 2007, 2008 Red Hat, Inc. All rights reserved. # # 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 Foundati...
gpl-2.0
4,420,711,798,531,218,000
32.412098
112
0.628006
false
jasimpson/gnuradio-jasimpson
gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py
10
2640
#!/usr/bin/env python # # Copyright 2009 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
-436,305,110,298,403,840
36.714286
148
0.624621
false
tachang/uwsgi
tests/iobound_async_unix.py
13
1085
import socket import select import errno import struct def send_request(env, client): client.setblocking(1) data = "hello world\r\n" # send uwsgi-echo header client.send(struct.pack('<BHB', 101, len(data), 0)) # send body client.send(data) while 1: yield env['x-wsgiorg.fdevent.readable'](client.fileno()...
gpl-2.0
-8,210,998,493,778,553,000
20.27451
81
0.661751
false
jaredly/pyjamas
examples/showcase/src/demos_widgets/image.py
13
1339
""" The ``ui.Image`` class is used to display an image. The ``Image`` class can display any image that is specified by a URL. This can be an image stored somewhere on the internet, or alternatively you can store an image in the "public" directory within your application's source folder, and then access it using a rel...
apache-2.0
7,667,374,826,102,297,000
36.194444
79
0.725168
false
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/aptdaemon/loop.py
3
1103
#!/usr/bin/env python # -*- coding: utf-8 -*- """Main loop for aptdaemon.""" # Copyright (C) 2008-2009 Sebastian Heinlein <devel@glatzor.de> # # 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; eit...
gpl-3.0
5,058,937,457,367,417,000
32.424242
73
0.729828
false
BeyondTheClouds/nova
nova/db/sqlalchemy/api.py
2
247898
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # 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...
apache-2.0
-8,825,773,516,021,315,000
35.131468
79
0.613147
false
wavesoft/creditpiggy
creditpiggy-server/creditpiggy/core/leaderboard.py
1
6519
################################################################ # CreditPiggy - Volunteering Computing Credit Bank Project # Copyright (C) 2015 Ioannis Charalampidis # # 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 Fr...
gpl-2.0
5,628,117,936,112,530,000
26.858974
128
0.663752
false
UCL-CS35/incdb-poc
venv/share/doc/dipy/examples/kfold_xval.py
17
5617
""" ============================================ K-fold cross-validation for model comparison ============================================ Different models of diffusion MRI can be compared based on their accuracy in fitting the diffusion signal. Here, we demonstrate this by comparing two models: the diffusion tensor ...
bsd-2-clause
-1,150,741,619,367,538,800
30.914773
89
0.713904
false
eneldoserrata/marcos_openerp
addons/report_geraldo/lib/geraldo/site/newsite/django_1_0/tests/regressiontests/admin_scripts/tests.py
9
44012
""" A series of tests to establish that the command-line managment tools work as advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE and default settings.py files. """ import os import unittest import shutil import sys from django import conf, bin, get_version from django.conf import set...
agpl-3.0
365,962,058,021,763,840
47.258772
221
0.655821
false
cctaylor/googleads-python-lib
examples/dfp/v201408/contact_service/update_contacts.py
4
2527
#!/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
-2,064,936,080,641,870,000
30.987342
77
0.696082
false
carloscanova/python-odml
odml/base.py
2
16824
#-*- coding: utf-8 """ collects common base functionality """ import doc import posixpath import terminology import mapping from tools.doc_inherit import * class _baseobj(object): pass class baseobject(_baseobj): _format = None @property def document(self): """returns the Document object in w...
bsd-3-clause
-5,420,977,738,541,653,000
32.041257
136
0.553574
false
mtracy/News-Aggregation
src/readRSS.py
1
1837
import psycopg2 import sys import json import sys import feedparser import time import graphParser username = sys.argv[1] pword = sys.argv[2] url = sys.argv[3] publisher = sys.argv[4] subject = sys.argv[5] refresh = float(sys.argv[6]) def checkDB(title): cur.execute("SELECT * FROM stories WHERE title = %s;", (tit...
mit
-6,796,271,105,562,539,000
26.833333
240
0.592814
false
JamesLinEngineer/RKMC
addons/plugin.video.phstreams/resources/lib/sources/ororo_mv_tv.py
2
4547
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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 opti...
gpl-2.0
5,996,479,877,914,455,000
29.797203
134
0.531779
false
Endika/odoomrp-wip
product_packaging_through_attributes/models/product.py
25
1192
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class ProductAtt...
agpl-3.0
-6,261,274,071,126,351,000
33.057143
78
0.594799
false
amenonsen/ansible
lib/ansible/modules/network/nxos/_nxos_l2_interface.py
3
19166
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
1,847,182,583,090,040,300
32.1019
117
0.600751
false
HUGG/NGWM2016-modelling-course
Lessons/05-Finite-differences/scripts/solutions/analytical_solutions.py
2
1039
import numpy as np import matplotlib.pyplot as plt import math def analytical_tr(T0, T1, kappa, t, z): z = np.array(z) # to make sure it's an array T = np.zeros(z.size) for iz in range(z.size): T[iz] = math.erfc(z[iz] / (2.0 * (kappa * t)**0.5)) * (T0 - T1) + T1 return T def analytical_ss_qT(z, k, A,...
mit
392,589,402,827,973,440
24.975
72
0.607315
false
matteli/histemul
server/src/histemul_server.py
1
4545
#!/usr/bin/python3 ''' Copyright (c) 2012-2015, Matthieu Nué 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 con...
bsd-2-clause
-5,707,369,261,130,986,000
35.645161
129
0.616197
false
gregbdunn/aws-ec2rescue-linux
lib/botocore/docs/client.py
5
4673
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
apache-2.0
5,520,618,138,621,459,000
40.353982
77
0.662529
false
Reiuiji/Network-Security-Programs
HW code/HW2 Cryptography: Classic Ciphers/CaesarCipher.py
1
1732
#Dan N # HW 2: Caesar Cipher Utility #Dependent: argparse import os import sys import argparse #input Parser parser = argparse.ArgumentParser(description='HW 2 Caesar Cipher') parser.add_argument("-i", "--input", dest='INPUT', help="Input File") parser.add_argument("-o", "--output", dest='OUTPUT', help="Output File") ...
mit
-7,607,492,792,445,671,000
22.093333
100
0.667436
false
pescobar/easybuild-easyblocks
easybuild/easyblocks/j/java.py
1
2662
## # Copyright 2012-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
5,134,567,485,933,697,000
36.492958
104
0.697596
false
frodo4fingers/swico
dominant_colour.py
1
1649
# import Image import sys def average_colour(image): colour_tuple = [None, None, None] for channel in range(3): # Get data for one channel at a time pixels = image.getdata(band=channel) values = [] for pixel in pixels: values.append(pixel) colour_tuple[...
mit
7,902,813,109,505,295,000
19.358025
62
0.622802
false
gem/oq-engine
openquake/hazardlib/tests/gsim/si_midorikawa_1999_test.py
1
4478
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-2021 GEM Foundation # # OpenQuake 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...
agpl-3.0
553,797,299,080,955,140
31.215827
81
0.700313
false
markbrough/exchangerates
exchangerates/__init__.py
1
3564
from bisect import bisect_left import csv import datetime import pkg_resources from six import next from . import get_rates class UnknownCurrencyException(Exception): pass def make_date_from_iso(iso_str): year = int(iso_str[:4]) month = int(iso_str[5:7]) day = int(iso_str[8:10]) return datetim...
mit
-6,793,993,681,324,983,000
30.821429
76
0.561167
false
fboender/jerrybuild
jerrybuild/bottle.py
8
150580
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
gpl-3.0
-3,736,979,175,166,978,000
38.931053
103
0.578377
false
douggeiger/gnuradio
gr-audio/examples/python/dial_tone_daemon.py
58
2196
#!/usr/bin/env python # # Copyright 2004,2005,2007,2008,2012 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...
gpl-3.0
-6,660,296,773,033,275,000
34.419355
83
0.65847
false
mungerd/plastex
plasTeX/ConfigManager/__init__.py
7
60231
#!/usr/bin/env python """ ConfigManager ConfigManager is a combination command-line option parser and configuration file. It essentially combines ConfigParser, getopt, and a lot of additional logic to parse the command-line the way you expect it to be parsed. The ConfigManager class should be backwards compatible w...
mit
-2,288,027,374,097,825,300
32.894766
116
0.556989
false
mrquim/repository.mrquim
repo/plugin.video.netflix/resources/lib/KodiHelper.py
4
56995
# pylint: skip-file # -*- coding: utf-8 -*- # Module: KodiHelper # Created on: 13.01.2017 import re import json import base64 import hashlib from os import remove from uuid import uuid4 from urllib import urlencode import AddonSignals import xbmc import xbmcgui import xbmcplugin import inputstreamhelper from resources...
gpl-2.0
-867,985,303,682,476,900
38.27705
965
0.535646
false
SecurityCompass/libcloud
libcloud/compute/drivers/hostvirtual.py
18
13880
# 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 use ...
apache-2.0
-3,985,527,973,936,344,600
29.91314
79
0.5433
false
nomadpenguins/opeNPSnake
lib/fileParser.py
1
4326
import os front_extra = ' data_type="4">' #Needed for parsing xml values, the front tags end back_extra = '</' #Needed for parsing xml values, the back tags front #Gets the xml values from the logs #Expects the line of text from the log, the starting <' '> tag and ending </' '> tag def get_xml_value(lin...
apache-2.0
8,217,820,993,465,716,000
44.072917
85
0.495377
false
yvaucher/account-financial-tools
__unported__/account_credit_control/scenarios/features/steps/account_credit_control.py
3
6507
import time from behave import given, when from support import model @given(u'I configure the following accounts on the credit control policy with oid: "{policy_oid}"') def impl(ctx, policy_oid): policy = model('credit.control.policy').get(policy_oid) assert policy, 'No policy % found' % policy_oid acc_obj...
agpl-3.0
-6,258,230,944,134,524,000
43.875862
182
0.549255
false