repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
Ttl/scikit-rf
skrf/io/general.py
3
22567
''' .. module:: skrf.io.general ======================================== general (:mod:`skrf.io.general`) ======================================== General io functions for reading and writing skrf objects .. autosummary:: :toctree: generated/ read read_all read_all_networks write write_all ...
bsd-3-clause
wakatime/wakatime
wakatime/packages/py26/pygments/lexers/objective.py
25
22764
# -*- coding: utf-8 -*- """ pygments.lexers.objective ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Objective-C family languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygrou...
bsd-3-clause
owlabs/incubator-airflow
airflow/www_rbac/app.py
1
12500
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
gochist/horizon
openstack_dashboard/dashboards/project/loadbalancers/tests.py
5
34457
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 ...
apache-2.0
btovar/cctools
work_queue/src/bindings/python2/work_queue_detailed_example_1.py
2
2997
#!/usr/bin/env python # Copyright (c) 2010- The University of Notre Dame. # This software is distributed under the GNU General Public License. # See the file COPYING for details. """ Python-WorkQueue test """ from work_queue import Task, WorkQueue, set_debug_flag from work_queue import WORK_QUEUE_SCHEDULE_FCFS, WORK...
gpl-2.0
whitepyro/debian_server_setup
lib/unidecode/x1d7.py
248
3645
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
gpl-3.0
marty331/jakesclock
flask/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py
1049
1508
import distutils.command.bdist_rpm as orig class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs...
gpl-2.0
vvtam/virtualenv
virtualenv.py
1
100200
#!/usr/bin/env python """Create a "virtual" Python installation""" import base64 import sys import os import codecs import optparse import re import shutil import logging import zlib import errno import glob import distutils.sysconfig import struct import subprocess from distutils.util import strtobool __version__ = ...
mit
farhan0581/scrapy
scrapy/downloadermiddlewares/robotstxt.py
41
2943
""" This is a middleware to respect robots.txt policies. To activate it you must enable this middleware and enable the ROBOTSTXT_OBEY setting. """ import logging from six.moves.urllib import robotparser from scrapy.exceptions import NotConfigured, IgnoreRequest from scrapy.http import Request from scrapy.utils.http...
bsd-3-clause
GaetanCambier/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/tagesschau.py
44
4945
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import parse_filesize class TagesschauIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tagesschau\.de/multimedia/(?:sendung/ts|video/video)(?P<id>-?[0-9]+)\.html' _TESTS = [{ ...
gpl-3.0
snehasi/servo
tests/wpt/harness/wptrunner/browsers/servodriver.py
66
5593
# 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/. import os import subprocess import tempfile from mozprocess import ProcessHandler from .base import Browser, require_a...
mpl-2.0
KorobovMS/Anki-Android
tools/manage-crowdin.py
20
5581
#!/usr/bin/python # Copyright (c) 2010 norbert.nagold@gmail.com # # 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. # # T...
gpl-3.0
Ziemin/telepathy-gabble
tests/twisted/presence/invisible_helper.py
4
7024
from gabbletest import ( XmppXmlStream, elem, elem_iq, send_error_reply, acknowledge_iq ) import ns from twisted.words.xish import xpath from time import time class ManualPrivacyListStream(XmppXmlStream): """Unlike the base class, which automatically responds to privacy list requests in the negative, this ...
lgpl-2.1
zhangpf/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
11
85765
## @file # This file is used to parse meta files # # Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the licen...
gpl-2.0
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.4/django/template/loaders/filesystem.py
90
1941
""" 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...
mit
gunan/tensorflow
tensorflow/python/framework/graph_util_test.py
1
21542
# 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
brownplt/k3
dj-plt-belay/pltbelay/models.py
1
1096
import belaylibs.models as bcap from django.db import models class BelayAccount(bcap.Grantable): station_url = models.CharField(max_length=200) class PendingLogin(bcap.Grantable): # Key is for this server to trust the openID provider's request key = models.CharField(max_length=36) # ClientKey is a secret pro...
apache-2.0
a113n/bcbio-nextgen
bcbio/rnaseq/sailfish.py
4
8177
import os from collections import namedtuple import pandas as pd from bcbio import utils import bcbio.pipeline.datadict as dd import bcbio.rnaseq.gtf as gtf from bcbio.distributed.transaction import file_transaction from bcbio.provenance import do from bcbio.utils import (file_exists, safe_makedir, is_gzipped, ...
mit
DeppSRL/open_bilanci
bilanci_project/bilanci/management/commands/couch2pg.py
1
27680
from collections import OrderedDict import logging from optparse import make_option from pprint import pprint from os import listdir from os.path import isfile, join from django.conf import settings from django.core.management import BaseCommand, call_command from django.db import connection from django.db.transaction ...
mit
davidblaisonneau-orange/foreman
foreman/subItemPuppetClasses.py
2
1535
#!/usr/bin/python3 # -*- coding: utf-8 -*- # 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
daleloogn/all-in-one
evaluation.py
2
2290
import argparse import numpy as np from sklearn.metrics import precision_score, recall_score, f1_score _ALL_ = ["random", "decision_trees", "linear_svm", "gaussian_naive_bayes"] def precision_recall_f1score(GT, Y_pred): precisions, recalls, f1scores = [], [], [] for i in range(GT.shape[0]): precisions.append(prec...
gpl-2.0
markYoungH/chromium.src
third_party/tlslite/tlslite/checker.py
118
2756
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """Class for post-handshake certificate checking.""" from .x509 import X509 from .x509certchain import X509CertChain from .errors import * class Checker(object): """This class is passed to a handshake function to ch...
bsd-3-clause
jmesteve/saas3
openerp/addons/project_issue_sheet/__openerp__.py
120
1851
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/encodings/cp775.py
1
5863
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: cp775.py """ Python Character Mapping Codec cp775 generated from 'VENDORS/MICSFT/PC/CP775.TXT' with gencodec.py. """ import codecs class Codec(code...
unlicense
kawamon/hue
desktop/core/ext-py/odfpy-1.4.1/odf/opendocument.py
3
38884
# -*- coding: utf-8 -*- # Copyright (C) 2006-2010 Søren Roug, European Environment Agency # # 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 Software Foundation; either # version 2.1 of the License, or (at you...
apache-2.0
audreyr/cookiecutter
tests/test_specify_output_dir.py
1
2352
"""Tests for cookiecutter's output directory customization feature.""" import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { 'cookiecutter': { 'email': 'raphael@hackebrot.de', ...
bsd-3-clause
wojenny/THash
p2pool/bitcoin/networks/mooncoin.py
3
1171
import os import platform from twisted.internet import defer from .. import data, helper from p2pool.util import pack P2P_PREFIX = 'f9f7c0e8'.decode('hex') P2P_PORT = 44664 ADDRESS_VERSION = 3 RPC_PORT = 44663 RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue( 'tomooncoinaddress' in (...
gpl-3.0
gsnedders/presto-testo
wpt/websockets/autobahn/oberstet-Autobahn-643d2ee/lib/python/autobahn/case/case5_10.py
14
1492
############################################################################### ## ## Copyright 2011 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 ## ## ht...
bsd-3-clause
lishunli/protobuf-socket-rpc
python/src/protobuf/socketrpc/examples/time/run_server.py
9
2679
#!/usr/bin/python # Copyright (c) 2009 Las Cumbres Observatory (www.lcogt.net) # Copyright (c) 2010 Jan Dittberner # # 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, inclu...
mit
adaur/SickRage
sickbeard/providers/elitetorrent.py
2
6641
# coding=utf-8 # Author: CristianBB # # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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
zhaodelong/django
tests/template_tests/syntax_tests/test_ssi.py
199
4226
from __future__ import unicode_literals import os from django.template import Context, Engine from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango110Warning from ..utils import ROOT, setup @ignore_warnings(category=RemovedInDjango110Warning) class SsiTagTests...
bsd-3-clause
arahuja/scikit-learn
examples/calibration/plot_calibration_multiclass.py
272
6972
""" ================================================== Probability Calibration for 3-class classification ================================================== This example illustrates how sigmoid calibration changes predicted probabilities for a 3-class classification problem. Illustrated is the standard 2-simplex, wher...
bsd-3-clause
vshtanko/scikit-learn
examples/hetero_feature_union.py
288
6236
""" ============================================= Feature Union with Heterogeneous Data Sources ============================================= Datasets can often contain components of that require different feature extraction and processing pipelines. This scenario might occur when: 1. Your dataset consists of hetero...
bsd-3-clause
tempbottle/kbengine
kbe/src/lib/python/Lib/test/_test_multiprocessing.py
67
120261
# # Unit tests for the multiprocessing package # import unittest import queue as pyqueue import time import io import itertools import sys import os import gc import errno import signal import array import socket import random import logging import struct import operator import test.support import test.script_helper ...
lgpl-3.0
boooka/GeoPowerOff
venv/lib/python2.7/site-packages/test/grab_get_request.py
1
1292
# coding: utf-8 from unittest import TestCase import os from grab import Grab, GrabMisuseError from .util import (GRAB_TRANSPORT, TMP_DIR, ignore_transport, only_transport) from .tornado_util import SERVER from grab.extension import register_extensions class GrabSimpleTestCase(TestCase): def s...
apache-2.0
GheRivero/ansible
lib/ansible/modules/cloud/amazon/cloudfront_facts.py
37
31969
#!/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
vityagi/azure-linux-extensions
VMEncryption/main/oscrypto/rhel_72_lvm/encryptstates/EncryptBlockDeviceState.py
3
4199
#!/usr/bin/env python # # VM Backup extension # # Copyright 2015 Microsoft Corporation # # 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 # # U...
apache-2.0
gnmiller/craig-bot
craig-bot/lib/python3.6/site-packages/pyasn1_modules/rfc1905.py
11
4837
# # This file is part of pyasn1-modules software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # # SNMPv2c PDU syntax # # ASN.1 source from: # http://www.ietf.org/rfc/rfc1905.txt # from pyasn1.type import constraint from pyasn1.type import namedtype fr...
mit
beetbox/audioread
audioread/rawread.py
1
4378
# This file is part of audioread. # Copyright 2011, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, co...
mit
dhermes/google-cloud-python
logging/tests/unit/test_metric.py
4
9433
# Copyright 2016 Google 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 required by applicable law or agreed to in writing, s...
apache-2.0
jianglu/mojo
mojo/devtools/common/android_gdb/signatures.py
8
1102
# Copyright 2015 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 itertools def get_signature(file_object, elffile_module): """Computes a unique signature of a library file. We only hash the .text section of t...
bsd-3-clause
rowinggolfer/openmolar2
src/tests/class_tests/testTreatmentItem.py
1
3699
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ## ## ...
gpl-3.0
andrewgodwin/django-channels
channels/generic/http.py
1
3131
from channels.consumer import AsyncConsumer from ..exceptions import StopConsumer class AsyncHttpConsumer(AsyncConsumer): """ Async HTTP consumer. Provides basic primitives for building asynchronous HTTP endpoints. """ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs...
bsd-3-clause
damilare/opencore
opencore/views/like.py
4
2138
# Copyright (C) 2008-2009 Open Society Institute # Thomas Moroz: tmoroz.org # 2010-2011 Large Blue # Fergus Doyle: fergus.doyle@largeblue.com # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License Version ...
gpl-2.0
CoryXie/BarrelfishOS
tools/arm_gem5/Caches.py
9
2342
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
mit
WarrenWeckesser/scikits-image
skimage/filters/thresholding.py
17
13792
__all__ = ['threshold_adaptive', 'threshold_otsu', 'threshold_yen', 'threshold_isodata', 'threshold_li', ] import numpy as np from scipy import ndimage as ndi from ..exposure import histogram from .._shared.utils import assert_nD def threshold_adaptive(image, block_size, m...
bsd-3-clause
calvingit21/h2o-2
py/testdir_hosts/start_cloud.py
9
2357
# this lets me be lazy..starts the cloud up like I want from my json, and gives me a browser # copies the jars for me, etc. Just hangs at the end for 10 minutes while I play with the browser import unittest import time,sys sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_...
apache-2.0
thrasher-/litecoin
test/functional/feature_reindex.py
9
1430
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running bitcoind with -reindex and -reindex-chainstate options. - Start a single node and generat...
mit
Lenovo-K3/android_kernel_lenovo_msm8916
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
mkraemer67/pylearn2
pylearn2/datasets/retina.py
41
13675
""" Retina-inspired preprocessing as described in Salakhutdinov, R. and Hinton, G. Deep Boltzmann machines. In *AISTATS* 2009. """ import numpy from theano.compat.six.moves import xrange from pylearn2.datasets.dense_design_matrix import DefaultViewConverter from pylearn2.space import Conv2DSpace def foveate_c...
bsd-3-clause
rahul-c1/scikit-learn
sklearn/random_projection.py
7
21661
# -*- coding: utf8 """Random Projection transformers Random Projections are a simple and computationally efficient way to reduce the dimensionality of the data by trading a controlled amount of accuracy (as additional variance) for faster processing times and smaller model sizes. The dimensions and distribution of Ra...
bsd-3-clause
CartoDB/cartoframes
cartoframes/viz/constants.py
1
2813
CARTO_VL_VERSION = 'v1.4' CARTO_VL_DEV = '/dist/carto-vl.js' CARTO_VL_URL = 'https://libs.cartocdn.com/carto-vl/{}/carto-vl.min.js'.format(CARTO_VL_VERSION) AIRSHIP_VERSION = 'v2.3' AIRSHIP_COMPONENTS_DEV = '/packages/components/dist/airship.js' AIRSHIP_BRIDGE_DEV = '/packages/bridge/dist/asbridge.js' AIRSHIP_MODULE_D...
bsd-3-clause
pombredanne/pyjs
examples/timesheet/libtimesheet/view/components/DatePicker.py
6
1483
# vim: set ts=4 sw=4 expandtab: from libtimesheet.ApplicationConstants import Notification from pyjamas.ui.HorizontalPanel import HorizontalPanel from pyjamas.ui.Button import Button from pyjamas.ui.TextBox import TextBox import time class DatePicker(HorizontalPanel): time = None dateBox = None def _...
apache-2.0
taktik/account-financial-reporting
account_financial_report_webkit_xls/report/general_ledger_xls.py
25
15883
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under...
agpl-3.0
chatcannon/scipy
scipy/_lib/_threadsafety.py
71
1530
from __future__ import division, print_function, absolute_import import threading import scipy._lib.decorator __all__ = ['ReentrancyError', 'ReentrancyLock', 'non_reentrant'] class ReentrancyError(RuntimeError): pass class ReentrancyLock(object): """ Threading lock that raises an exception for reent...
bsd-3-clause
Pajinek/spacewalk
backend/test/runtests-oracle.py
8
2796
#!/usr/bin/python # # Copyright (c) 2008--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You shoul...
gpl-2.0
mr-karan/coala-bears
tests/php/PHPLintBearTest.py
9
1153
import os from queue import Queue from shutil import which from unittest.case import skipIf from bears.php.PHPLintBear import PHPLintBear from tests.LocalBearTestHelper import LocalBearTestHelper from coalib.settings.Section import Section @skipIf(which('php') is None, 'PHP is not installed') class PHPLintBearTest(L...
agpl-3.0
ricardogsilva/QGIS
python/plugins/processing/algs/grass7/ext/r_li_mps_ascii.py
45
1436
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_mps_ascii.py ----------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ************************...
gpl-2.0
sbt9uc/osf.io
scripts/log_analytics.py
40
3817
from __future__ import print_function, absolute_import import time import sys import argparse from faker import Faker import itertools from random import choice from modularodm import Q from framework.auth import Auth from website.app import init_app from website import models, security from tests.factories import N...
apache-2.0
dushu1203/chromium.src
ppapi/generators/idl_release.py
104
9847
#!/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. """ IDLRelease for PPAPI This file defines the behavior of the AST namespace which allows for resolving a symbol as one or more AS...
bsd-3-clause
BT-jmichaud/stock-logistics-workflow
picking_dispatch/wizard/__init__.py
25
1068
# -*- coding: utf-8 -*- ############################################################################## # # Author: Joel Grand-Guillaume # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
novopl/fabutils
test/unit/fabutils/lint/test_is_pylint_compliant.py
1
1958
# -*- coding: utf-8 -*- from __future__ import absolute_import from mock import patch, Mock from pytest import raises, mark from fabutils.lint import is_pylint_compliant @patch('fabutils.lint.print', Mock()) @patch('fabutils.lint.infomsg', Mock()) def test_raises_ValueError_if_passed_iterable_is_actually_a_string(): ...
mit
digidudeofdw/enigma2
lib/python/Components/Converter/ClockToText.py
5
2706
from Converter import Converter from time import localtime, strftime from Components.Element import cached class ClockToText(Converter, object): DEFAULT = 0 WITH_SECONDS = 1 IN_MINUTES = 2 DATE = 3 FORMAT = 4 AS_LENGTH = 5 TIMESTAMP = 6 FULL = 7 SHORT_DATE = 8 LONG_DATE = 9 VFD = 10 # add: date, date as ...
gpl-2.0
chauhanhardik/populo
cms/djangoapps/contentstore/migrations/0002_auto__del_field_videouploadconfig_status_whitelist.py
108
4442
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'VideoUploadConfig.status_whitelist' db.delete_column('contentstore_videouploadconfig', 'st...
agpl-3.0
RAtechntukan/CouchPotatoServer
libs/suds/bindings/document.py
204
5792
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will ...
gpl-3.0
gechr/ansible-modules-extras
cloud/amazon/ec2_vpc_nacl_facts.py
41
6485
#!/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
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/SunlightLabs/CapitolWords/FullTextSearch.py
5
6528
# -*- coding: utf-8 -*- ############################################################################### # # FullTextSearch # Returns a list of Congressional Record documents in which the given phrase appears. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Versi...
apache-2.0
joopert/home-assistant
homeassistant/components/arest/sensor.py
3
6826
"""Support for an exposed aREST RESTful API of a device.""" import logging from datetime import timedelta import requests import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_UNIT_OF_MEASUREMENT, CONF_VALUE_TEMPLATE, CONF_RESOURCE, ...
apache-2.0
hexxter/home-assistant
homeassistant/components/climate/knx.py
4
3199
""" Support for KNX thermostats. For more details about this platform, please refer to the documentation https://home-assistant.io/components/climate.knx/ """ import logging import voluptuous as vol from homeassistant.components.climate import (ClimateDevice, PLATFORM_SCHEMA) from homeassistant.components.knx import...
mit
2015fallproject/2015fallcase2
static/Brython3.2.2-20150927-180218/Lib/configparser.py
9
51296
"""Configuration file parser. A configuration file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. Intrinsic defaults can be specified by passing them into the ConfigParser constructor as a dictionary. class: ...
agpl-3.0
fw1121/bcbio-nextgen
bcbio/variation/gatkjoint.py
4
3310
"""Perform joint genotyping using GATK HaplotypeCaller with gVCF inputs Handles merging of large batch sizes using CombineGVCFs and joint variant calling with GenotypeGVCFs. """ import toolz as tz from bcbio import broad, utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import dat...
mit
LChristakis/chalice-hunter
lib/python3.4/site-packages/gunicorn/argparse_compat.py
490
87791
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
mit
brainwater/keras
tests/auto/test_loss_weighting.py
39
6595
from __future__ import absolute_import from __future__ import print_function import numpy as np np.random.seed(1336) # for reproducibility from keras.datasets import mnist from keras.models import Sequential, Graph from keras.layers.core import Dense, Activation from keras.utils import np_utils import unittest nb_c...
mit
ghber/My-Django-Nonrel
django/contrib/gis/gdal/prototypes/generation.py
321
3766
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.prototypes.errcheck import \ check_arg_errcode, check_errcode, check_geom, check_geom_offset, \ check_pointer, check_srs, check_str...
bsd-3-clause
mihailignatenko/erp
addons/l10n_et/__openerp__.py
387
1968
#-*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2012 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero G...
agpl-3.0
nop33/indico-plugins
payment_paypal/tests/util_test.py
1
1388
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
Tesora-Release/tesora-horizon
openstack_dashboard/usage/__init__.py
84
1118
# 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 License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
s20121035/rk3288_android5.1_repo
external/antlr/antlr-3.4/runtime/Python/unittests/testdottreegen.py
17
1761
# -*- coding: utf-8 -*- import os import unittest from StringIO import StringIO import textwrap import stringtemplate3 from antlr3.dottreegen import toDOT from antlr3.treewizard import TreeWizard from antlr3.tree import CommonTreeAdaptor class TestToDOT(unittest.TestCase): """Test case for the toDOT function."...
gpl-3.0
ivannaranjo/google-api-dotnet-client
ClientGenerator/src/googleapis/codegen/gwt_generator.py
6
6488
#!/usr/bin/python2.7 # Copyright 2011 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 requi...
apache-2.0
Akylas/CouchPotatoServer
libs/guessit/date.py
5
4005
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 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
vmayoral/ubuntu-vivid
tools/perf/scripts/python/sctop.py
1996
2102
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/miscmodels/tmodel.py
32
7132
"""Linear Model with Student-t distributed errors Because the t distribution has fatter tails than the normal distribution, it can be used to model observations with heavier tails and observations that have some outliers. For the latter case, the t-distribution provides more robust estimators for mean or mean paramete...
apache-2.0
durai145/xbmc
lib/libUPnP/Neptune/Extras/Scripts/CodeScanner.py
264
4286
#! /usr/bin/python import os import os.path import re import sys ErrorPattern = re.compile('([A-Z]{3}_ERROR_[A-Z_0-9]+)\s+=?\s*\(?([A-Z_0-9-][A-Z_0-9-+ ]+[A-Z_0-9])') LoggerPattern = re.compile('NPT_SET_LOCAL_LOGGER\s*\([ "]*(\S+)[ "]*\)') NakedErrorPattern = re.compile('return.*[ \(]..._FAILURE') FilePatternH = re.c...
gpl-2.0
khaeusler/website
website_menu_multilang/__openerp__.py
7
1634
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 by UAB Versada (Ltd.) <http://www.versada.lt> # and contributors. See AUTHORS for more details. # # All Rights Reserved. # # This program is free software: you can redistribut...
agpl-3.0
xzh86/scikit-learn
examples/ensemble/plot_bias_variance.py
357
7324
""" ============================================================ Single estimator versus bagging: bias-variance decomposition ============================================================ This example illustrates and compares the bias-variance decomposition of the expected mean squared error of a single estimator again...
bsd-3-clause
theclanks/ajenti
plugins/openvpn/backend.py
12
2465
# coding=utf-8 """OpenVPN plugin backend""" from ajenti.com import Plugin from ajenti.utils.error import ConfigurationError import manager class OpenVPNBackend(Plugin): """ OpenVPN plugin and widget backend @ivar _m: manager instance """ icon = "/dl/openvpn/icon.png" text = "OpenVPN" def _...
lgpl-3.0
fbossy/SickRage
lib/hachoir_core/field/new_seekable_field_set.py
70
3047
from hachoir_core.field import BasicFieldSet, GenericFieldSet, ParserError, createRawField from hachoir_core.error import HACHOIR_ERRORS # getgaps(int, int, [listof (int, int)]) -> generator of (int, int) # Gets all the gaps not covered by a block in `blocks` from `start` for `length` units. def getgaps(start, length,...
gpl-3.0
pozetroninc/micropython
tests/basics/frozenset_binop.py
41
1227
try: frozenset except NameError: print("SKIP") raise SystemExit sets = [ frozenset(), frozenset({1}), frozenset({1, 2}), frozenset({1, 2, 3}), frozenset({2, 3}), frozenset({2, 3, 5}), frozenset({5}), frozenset({7}) ] for s in sets: for t in sets: print(sorted(s), '|', sorted(t), '=', so...
mit
jasonxmueller/gcc-python-plugin
tests/examples/spelling-checker/script.py
4
2198
# -*- coding: utf-8 -*- # Copyright 2011 David Malcolm <dmalcolm@redhat.com> # Copyright 2011 Red Hat, Inc. # # This 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, o...
gpl-3.0
mapr/hue
desktop/core/ext-py/thrift-0.9.1/src/transport/TTransport.py
105
8385
# # 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
thodoris/djangoPharma
djangoPharma/env/Lib/site-packages/pip/_vendor/colorama/winterm.py
578
6290
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL ...
apache-2.0
lbianch/nfl_elo
tests/test_inv_erf.py
1
2693
import unittest import logging import pickle import inv_erf from elo import probability_points as prob logging.basicConfig(level=logging.INFO) class TestInvErf(unittest.TestCase): def setUp(self): with open('random_state.pickle', 'rb') as f: state = pickle.load(f) inv_erf.random.sets...
mit
google-research/google-research
learn_to_infer/run_ring.py
1
10211
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
apache-2.0
renegelinas/mi-instrument
mi/dataset/driver/nutnr_j/cspp/nutnr_j_cspp_telemetered_driver.py
7
2154
""" @package mi.dataset.driver.nutnr_j.cspp @file mi-dataset/mi/dataset/driver/nutnr_j/cspp/nutnr_j_cspp_telemetered_driver.py @author Joe Padula @brief Telemetered driver for the nutnr_j_cspp instrument Release notes: Initial Release """ from mi.dataset.dataset_driver import SimpleDatasetDriver from mi.dataset.dat...
bsd-2-clause
ycaihua/kbengine
kbe/res/scripts/common/Lib/test/test_pickle.py
72
4522
import pickle import io import collections from test import support from test.pickletester import AbstractPickleTests from test.pickletester import AbstractPickleModuleTests from test.pickletester import AbstractPersistentPicklerTests from test.pickletester import AbstractPicklerUnpicklerObjectTests from test.picklet...
lgpl-3.0
andreadean5/python-hpOneView
tests/unit/resources/facilities/test_racks.py
2
5594
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP # # 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 limi...
mit
kelseyoo14/Wander
venv_2_7/lib/python2.7/site-packages/numpy/lib/twodim_base.py
83
26903
""" Basic functions for manipulating 2d arrays """ from __future__ import division, absolute_import, print_function from numpy.core.numeric import ( asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal, ) from numpy.core import...
artistic-2.0
gdgellatly/OCB1
addons/fetchmail/fetchmail.py
8
15324
# -*- 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
mavit/ansible
test/units/modules/network/ovs/test_openvswitch_port.py
57
8518
# # (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) any later version. # # Ansible is d...
gpl-3.0
mycodeday/crm-platform
hr_attendance/hr_attendance.py
250
9090
# -*- 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...
gpl-3.0