repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
leppa/home-assistant
homeassistant/components/push/camera.py
3
5616
"""Camera platform that receives images through HTTP POST.""" import asyncio from collections import deque from datetime import timedelta import logging import aiohttp import async_timeout import voluptuous as vol from homeassistant.components.camera import ( PLATFORM_SCHEMA, STATE_IDLE, STATE_RECORDING, ...
apache-2.0
hmgaudecker/econ-project-templates
docs/bld/example/r/r_example/.mywaflib/waflib/extras/parallel_debug.py
16
11991
#! /usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2007-2010 (ita) """ Debugging helper for parallel compilation, outputs a file named pdebug.svg in the source directory:: def options(opt): opt.load('parallel_debug') def build(bld): ... """ import re, sys, threading, time, traceback try: from Queue impor...
bsd-3-clause
qedi-r/home-assistant
homeassistant/components/brunt/cover.py
1
5303
"""Support for Brunt Blind Engine covers.""" import logging from brunt import BruntAPI import voluptuous as vol from homeassistant.components.cover import ( ATTR_POSITION, PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_SET_POSITION, CoverDevice, ) from homeassistant.const import ATTR_A...
apache-2.0
adamchainz/ansible
lib/ansible/modules/monitoring/boundary_meter.py
66
8559
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to add boundary meters. (c) 2013, curtis <curtis@serverascode.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 Foundati...
gpl-3.0
AutorestCI/azure-sdk-for-python
azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py
2
1166
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
alu042/edx-platform
common/test/acceptance/pages/studio/component_editor.py
73
5069
from bok_choy.page_object import PageObject from selenium.webdriver.common.keys import Keys from ..common.utils import click_css from selenium.webdriver.support.ui import Select class BaseComponentEditorView(PageObject): """ A base :class:`.PageObject` for the component and visibility editors. This class...
agpl-3.0
Nick-Hall/gramps
gramps/gui/editors/edittaglist.py
4
4647
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Nick Hall # # 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)...
gpl-2.0
rlowrance/re-local-linear
ege_date.py
1
33937
'''create files contains estimated generalization errors for model sys.argv: year month day The sale_date of the models. Uses data up to the day before the sale date Files created: year-month-day-MODEL-SCOPE-T[-MODELPARAMS].foldResult where: MODEL is one of the models {ols, lasso, ridge, rf, xt} SCOPE...
mit
ericholscher/django
django/core/checks/compatibility/django_1_6_0.py
30
2329
from __future__ import unicode_literals from django.db import models def check_test_runner(): """ Checks if the user has *not* overridden the ``TEST_RUNNER`` setting & warns them about the default behavior changes. If the user has overridden that setting, we presume they know what they're doing &...
bsd-3-clause
sklnet/opendroid-enigma2
lib/python/Components/Renderer/valioSystem.py
13
1658
# -*- coding: utf-8 -*- # # System Data Renderer for Dreambox/Enigma-2 # Version: 1.0 # Coded by Vali (c)2010-2011 # ####################################################################### from Components.VariableText import VariableText from Components.Sensors import sensors from Tools.HardwareInfo import Ha...
gpl-2.0
LuisAlejandro/tribus
tribus/common/charms/repository.py
2
4659
import json import logging import os import tempfile import urllib import urlparse import yaml from tribus.common.charms.provider import get_charm_from_path from tribus.common.charms.url import CharmURL, CharmCollection from tribus.common.errors import FileNotFound from tribus.common.utils import list_dirs from tribus...
gpl-3.0
AshivDhondea/SORADSIM
scenarios/main_057_iss_14.py
1
9993
# -*- coding: utf-8 -*- """ Created on Sun Oct 01 14:15:39 2017 @author: Ashiv Dhondea """ import AstroFunctions as AstFn import TimeHandlingFunctions as THF import math import numpy as np # Importing what's needed for nice plots. import matplotlib.pyplot as plt from matplotlib import rc rc('font', ...
mit
Befera/portfolio
node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
1407
47697
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module helps emulate Visual Studio 2008 behavior on top of other build systems, primarily ninja. """ import os import re import subprocess import sys fr...
mit
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/smtpd.py
174
18543
#! /usr/bin/env python """An RFC 2821 smtp proxy. Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]] Options: --nosetuid -n This program generally tries to setuid `nobody', unless this flag is set. The setuid call will fail if this program is not run as root (in ...
gpl-2.0
eusi/MissionPlanerHM
Lib/lib2to3/fixes/fix_urllib.py
325
8385
"""Fix changes imports of urllib which are now incompatible. This is rather similar to fix_imports, but because of the more complex nature of the fixing for urllib, it has its own fixer. """ # Author: Nick Edds # Local imports from lib2to3.fixes.fix_imports import alternates, FixImports from lib2to3 import fixer...
gpl-3.0
vedujoshi/os_tempest
tempest/api/object_storage/test_account_services_negative.py
4
1981
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Joe H. Rahme <joe.hakim.rahme@enovance.com> # # 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://...
apache-2.0
yangw1234/BigDL
pyspark/test/bigdl/test_simple_integration.py
2
28580
# # Copyright 2016 The BigDL 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 applicable law or agreed to in ...
apache-2.0
jallohm/django
tests/sites_tests/tests.py
251
10760
from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.contrib.sites import models from django.contrib.sites.management import create_default_site from django.contrib.sites.middleware import CurrentSiteMiddleware from django.contrib.sites.models import Site, c...
bsd-3-clause
djudd/avro
lang/py3/avro/schema.py
14
34817
#!/usr/bin/env python3 # -*- mode: python -*- # -*- 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...
apache-2.0
Workday/OpenFrame
tools/telemetry/third_party/gsutilz/third_party/protorpc/demos/appstats/protorpc_appstats/__init__.py
20
4951
#!/usr/bin/env python # # Copyright 2010 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 # # Unless required by applicable law o...
bsd-3-clause
slz/delidded-kernel-n900j-note3
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
debian-live/live-magic
tests/test_all.py
1
1304
#!/usr/bin/env python # -*- coding: utf-8 -*- # # live-magic - GUI frontend to create Debian LiveCDs, etc. # Copyright (C) 2007-2010 Chris Lamb <lamby@debian.org> # # 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 # t...
gpl-3.0
VitalPet/c2c-rd-addons
stock_invoice_service/__openerp__.py
4
1615
# -*- 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
benzmuircroft/REWIRE.io
test/functional/p2p_zpos_fakestake_accepted.py
1
4397
#!/usr/bin/env python3 # Copyright (c) 2019 The PIVX Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Performs the same check as in Test_02 verifying that zPoS forked blocks that stake a zerocoin which is spent ...
mit
tku137/JPKay
docs/source/conf.py
1
10191
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # JPKay documentation build configuration file, created by # sphinx-quickstart on Sun Apr 10 21:16:13 2016. # # 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 # auto...
mit
opengeogroep/inasafe
safe/engine/impact_functions_for_testing/categorised_hazard_building_impact.py
3
6853
from safe.impact_functions.core import (FunctionProvider, get_hazard_layer, get_exposure_layer, get_question) from safe.common.utilities import (ugettext as tr, form...
gpl-3.0
BT-fgarbely/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
384
12340
######################################################################### # # 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
sprockets/sprockets.mixins.avro
setup.py
1
2094
#!/usr/bin/env python import codecs import setuptools import sprockets.mixins.avro def read_requirements_file(req_name): requirements = [] try: with codecs.open(req_name, encoding='utf-8') as req_file: for req_line in req_file: if '#' in req_line: req...
bsd-3-clause
BaconPancakes/valor
lib/bs4/tests/test_tree.py
10
78030
# -*- coding: utf-8 -*- """Tests for Beautiful Soup's tree traversal methods. The tree traversal methods are the main advantage of using Beautiful Soup over just using a parser. Different parsers will build different Beautiful Soup trees given the same markup, but all Beautiful Soup trees can be traversed with the me...
gpl-3.0
OpenBfS/dokpool-plone
Plone/src/docpool.example/docpool/example/local/example.py
1
1443
# -*- coding: utf-8 -*- from docpool.base.content.documentpool import APPLICATIONS_KEY from docpool.example.config import EXAMPLE_APP from Products.CMFCore.utils import getToolByName from zope.annotation.interfaces import IAnnotations def dpAdded(self): """ @param self: @return: """ annotations =...
gpl-3.0
jessicalucci/NovaOrc
nova/tests/api/openstack/compute/test_consoles.py
14
11541
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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 ...
apache-2.0
yb-kim/gemV
src/arch/x86/isa/insts/simd128/floating_point/logical/orp.py
91
3181
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
ofgulban/scikit-image
doc/examples/segmentation/plot_label.py
7
1493
""" =================== Label image regions =================== This example shows how to segment an image with image labelling. The following steps are applied: 1. Thresholding with automatic Otsu method 2. Close small holes with binary closing 3. Remove artifacts touching image border 4. Measure image regions to fi...
bsd-3-clause
smart-developerr/my-first-blog
Lib/site-packages/setuptools/extension.py
299
1729
import re import functools import distutils.core import distutils.errors import distutils.extension from setuptools.extern.six.moves import map from .monkey import get_unpatched def _have_cython(): """ Return True if Cython can be imported. """ cython_impl = 'Cython.Distutils.build_ext' try: ...
gpl-3.0
Celthi/youtube-dl-GUI
youtube_dl/extractor/rutube.py
42
5766
# encoding: utf-8 from __future__ import unicode_literals import re import itertools from .common import InfoExtractor from ..compat import ( compat_str, ) from ..utils import ( ExtractorError, unified_strdate, ) class RutubeIE(InfoExtractor): IE_NAME = 'rutube' IE_DESC = 'Rutube videos' _VA...
mit
kg-bot/SupyBot
plugins/Trivial/test.py
1
1739
### # Copyright (c) 2007, Benjamin N. Rubin # 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 condit...
gpl-3.0
jesseditson/rethinkdb
external/v8_3.30.33.16/testing/gmock/scripts/gmock_doctor.py
163
23590
#!/usr/bin/env python # # Copyright 2008, 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...
agpl-3.0
lmprice/ansible
lib/ansible/modules/cloud/cloudstack/cs_instancegroup.py
37
5335
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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
isajhon/tuconsejocomunal
usuarios_venezuela/modelos/usuarios_venezuela.py
4
3179
# -*- 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
hayderimran7/zulip
bots/summarize_stream.py
115
2559
# This is hacky code to analyze data on our support stream. The main # reusable bits are get_recent_messages and get_words. import zulip import re import collections def get_recent_messages(client, narrow, count=100): narrow = [word.split(':') for word in narrow.split()] req = { 'narrow': narrow, ...
apache-2.0
tashaband/RYU295
ryu/tests/unit/lib/test_stringify.py
23
2008
#!/usr/bin/env python # # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp> # # 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...
apache-2.0
kivio/PerfKitBenchmarker
perfkitbenchmarker/benchmarks/ping_benchmark.py
2
2517
# Copyright 2014 PerfKitBenchmarker 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 appli...
apache-2.0
imruahmed/microblog
flask/lib/python2.7/site-packages/pbr/tests/test_util.py
22
2386
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. (HP) # # 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 ...
bsd-3-clause
bitshares/bitshares
snapshots/build_sharedrop.py
10
12110
# BTS merger allocation draft 3 # ags-pts-nov-5.json # 662e2bd091a401108fd9736dd556a2c8744111e1 - # vote-aug-21-noFMV.json # c9a08d1a6a1921b1caf2c793cc77f62a2056db1f - # fmv-key.json # b5b55c27b50f6c7fe9737e16b0c438dcd0da7ec4 - # dns-dev-fund.json # 0847a39bd69e1cc7dc073317184bb789bf8d89f2 - # dns-collaps...
unlicense
jindongh/kombu
kombu/pools.py
38
3812
""" kombu.pools =========== Public resource pools. """ from __future__ import absolute_import import os from itertools import chain from .connection import Resource from .five import range, values from .messaging import Producer from .utils import EqualityDict from .utils.functional import lazy __all__ = ['Produc...
bsd-3-clause
robhudson/django
django/contrib/auth/password_validation.py
229
7041
from __future__ import unicode_literals import gzip import os import re from difflib import SequenceMatcher from django.conf import settings from django.core.exceptions import ImproperlyConfigured, ValidationError from django.utils import lru_cache from django.utils._os import upath from django.utils.encoding import ...
bsd-3-clause
marratj/ansible
test/units/playbook/test_playbook.py
119
2239
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
kose-y/pylearn2
pylearn2/utils/mnist_ubyte.py
44
3963
""" Low-level utilities for reading in raw MNIST files. """ __author__ = "David Warde-Farley" __copyright__ = "Copyright 2012, Universite de Montreal" __credits__ = ["David Warde-Farley"] __license__ = "3-clause BSD" __email__ = "wardefar@iro" __maintainer__ = "David Warde-Farley" import struct import numpy from the...
bsd-3-clause
Phonebooth/depot_tools
third_party/boto/cacerts/__init__.py
260
1097
# Copyright 2010 Google Inc. # 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 to use, copy, modify, merg...
bsd-3-clause
bealdav/OpenUpgrade
addons/l10n_at/account_wizard.py
379
1234
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus.at # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
agpl-3.0
rhndg/openedx
common/djangoapps/config_models/models.py
75
7291
""" Django Model baseclass for database-backed configuration. """ from django.db import connection, models from django.contrib.auth.models import User from django.core.cache import get_cache, InvalidCacheBackendError from django.utils.translation import ugettext_lazy as _ try: cache = get_cache('configuration') #...
agpl-3.0
KevinMidboe/statusHandler
flask/lib/python3.4/encodings/cp852.py
272
35002
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP852.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
mit
sliz1/servo
tests/wpt/css-tests/tools/webdriver/webdriver/command.py
258
3985
"""Dispatches requests to remote WebDriver endpoint.""" import exceptions import httplib import json import urlparse import webelement class CommandExecutor(object): """Dispatches requests to remote WebDriver endpoint.""" _HEADERS = { "User-Agent": "Python WebDriver Local End", "Content-Type...
mpl-2.0
cognoma/task-service
api/queue.py
1
1935
from django.db import connection from api.models import TaskDef, Task get_task_sql = """ WITH nextTasks as ( SELECT id, status, started_at FROM tasks JOIN task_defs ON tasks.task_def_name = task_defs.name WHERE task_def_name = ANY(%s) AND run_at <= NOW() AND (status = 'queued'...
bsd-3-clause
mrunge/openstack_horizon
openstack_horizon/dashboards/project/data_processing/jobs/tabs.py
1
1174
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
ifduyue/sentry
src/sentry/south_migrations/0029_auto__del_field_projectmember_is_superuser__del_field_projectmember_pe.py
5
17645
# 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): # Deleting field 'ProjectMember.is_superuser' db.delete_column('sentry_projectmember', 'is_superuser') # ...
bsd-3-clause
Santinell/ansible-modules-core
cloud/rackspace/rax_dns_record.py
136
10840
#!/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
SatoshiNXSimudrone/sl4a-damon-clone
python/src/Lib/encodings/cp775.py
593
34732
""" Python Character Mapping Codec cp775 generated from 'VENDORS/MICSFT/PC/CP775.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict...
apache-2.0
wecontinue/book-collection
lib/wunderlist.py
2
6498
#!/usr/bin/env python from lib.base import BaseHandler from lib.auth import NologinHandler import tornado.locale import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import json from datetime import datetime from tornado.options import define, options import pymongo class GetWun...
mit
jtrain/django-guardian
guardian/models.py
45
3521
from __future__ import unicode_literals from django.db import models from django.core.exceptions import ValidationError from django.contrib.auth.models import Group from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic impo...
bsd-2-clause
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/boto/cloudformation/template.py
164
1686
from boto.resultset import ResultSet from boto.cloudformation.stack import Capability class Template(object): def __init__(self, connection=None): self.connection = connection self.description = None self.template_parameters = None self.capabilities_reason = None self.capabi...
mit
andfoy/margffoy-tuay-server
env/lib/python2.7/site-packages/setuptools/tests/test_sandbox.py
342
2170
"""develop tests """ import sys import os import shutil import unittest import tempfile import types import pkg_resources import setuptools.sandbox from setuptools.sandbox import DirectorySandbox, SandboxViolation def has_win32com(): """ Run this to determine if the local machine has win32com, and if it d...
gpl-2.0
ggiscan/OnlineClerk
core/Interactor/squashcity/tests/test_db.py
4
2377
''' Created on Nov 19, 2015 @author: george ''' import unittest from core.model import User import core.dbman as dbman from squashcity.model import SquashCityRequest import sys from datetime import datetime class TestDBModel(unittest.TestCase): def setUp(self): self.session = dbman.new_session('memory') ...
gpl-2.0
yongshengwang/hue
desktop/core/ext-py/boto-2.38.0/boto/datapipeline/exceptions.py
235
1471
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
apache-2.0
VISTAS-IVES/pyvistas
source/vistas/ui/controls/main_status_bar.py
1
1162
import wx from vistas.core.task import Task class MainStatusBar(wx.StatusBar): """ Main task status bar for currently running Tasks. """ def __init__(self, parent, id): super().__init__(parent, id) self.SetFieldsCount(2, [70, -1]) self.SetStatusText("Idle", 1) self.gauge = No...
bsd-3-clause
Chairshot215/starship_kernel_moto_shamu
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
groschovskiy/lerigos_music
Server/API/lib/gcloud/bigquery/query.py
1
11587
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
frewsxcv/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/treebuilders/etree.py
721
12609
from __future__ import absolute_import, division, unicode_literals from six import text_type import re from . import _base from .. import ihatexml from .. import constants from ..constants import namespaces from ..utils import moduleFactoryFactory tag_regexp = re.compile("{([^}]*)}(.*)") def getETreeBuilder(Elemen...
mpl-2.0
robhowley/treetl
setup.py
1
1425
import os import json from os import sep as os_sep from setuptools import setup, find_packages # canonical python package is structured as # package_dir_name/ # -- setup.py # -- package_dir_name/ # get top package_dir_name and know it will contain the same __pack_dir = os.path.split(os.path.dirname(o...
mit
Triv90/Nova
nova/openstack/common/rpc/impl_zmq.py
3
26578
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
apache-2.0
wanghq/goots
doc/ots-python-sdk-2.0.7/ots2/test/sdk_param_unittest.py
6
10511
#!/bin/python # -*- coding: utf8 -*- import logging import unittest import exceptions from ots2.client import * from ots2.metadata import * from ots2.error import * from ots2.test.mock_connection import MockConnection ENDPOINT = 'http://10.97.204.97:8800' ACCESSID = 'accessid' ACCESSKEY = 'accesskey' INSTANCENAME = ...
mit
canhhs91/greenpointtrees
src/oscar/apps/search/app.py
25
1040
from django.conf.urls import url from haystack.views import search_view_factory from oscar.apps.search import facets from oscar.core.application import Application from oscar.core.loading import get_class class SearchApplication(Application): name = 'search' search_view = get_class('search.views', 'FacetedSe...
mit
YoeriDijkstra/iFlow
packages/numerical2DV/salinity_prognostic/sclosureFunction.py
1
1641
""" sclosureFunction Date: 11-Jan-16 Authors: Y.M. Dijkstra """ import numpy as np import nifty as ny def sclosureFunction((Q, AK), F, Fopen, Fclosed, data): jmax = data.v('grid', 'maxIndex', 'x') nRHS = F.shape[-1] A = np.zeros((jmax+1, jmax+1)) ##### LEFT-HAND SIDE ##### x = ny.dimensionalAxis...
lgpl-3.0
40223119/w17test
static/Brython3.1.1-20150328-091302/Lib/importlib/abc.py
743
14595
"""Abstract base classes related to import.""" from . import _bootstrap from . import machinery try: import _frozen_importlib except ImportError as exc: if exc.name != '_frozen_importlib': raise _frozen_importlib = None import abc import imp import marshal import sys import tokenize import warnings ...
gpl-3.0
Theer108/invenio
invenio/ext/assets/extensions.py
7
9749
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your...
gpl-2.0
jumping/Diamond
src/collectors/bind/bind.py
28
5681
# coding=utf-8 """ Collects stats from bind 9.5's statistics server #### Dependencies * [bind 9.5](http://www.isc.org/software/bind/new-features/9.5) configured with libxml2 and statistics-channels """ import diamond.collector import sys import urllib2 if sys.version_info >= (2, 5): import xml.etree.cEle...
mit
phlax/pootle
pootle/apps/pootle_format/abstracts.py
5
1182
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django.db import models from pootle.i1...
gpl-3.0
dudepare/django
tests/custom_managers/tests.py
178
23098
from __future__ import unicode_literals from django.db import models from django.test import TestCase from django.utils import six from .models import ( Book, Car, CustomManager, CustomQuerySet, DeconstructibleCustomManager, FunPerson, OneToOneRestrictedModel, Person, PersonFromAbstract, PersonManager, Pu...
bsd-3-clause
bwasti/caffe2
caffe2/experiments/python/convnet_benchmarks.py
2
19876
## @package convnet_benchmarks # Module caffe2.experiments.python.convnet_benchmarks from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals """ Benchmark for common convnets. (NOTE: Numbers below prior with missing parameter=...
apache-2.0
FireBladeNooT/Medusa_1_6
lib/unidecode/x065.py
252
4638
data = ( 'Pan ', # 0x00 'Yang ', # 0x01 'Lei ', # 0x02 'Sa ', # 0x03 'Shu ', # 0x04 'Zan ', # 0x05 'Nian ', # 0x06 'Xian ', # 0x07 'Jun ', # 0x08 'Huo ', # 0x09 'Li ', # 0x0a 'La ', # 0x0b 'Han ', # 0x0c 'Ying ', # 0x0d 'Lu ', # 0x0e 'Long ', # 0x0f 'Qian ', # 0x10 'Qi...
gpl-3.0
helldorado/ansible
test/units/modules/network/nxos/test_nxos_feature.py
68
3017
# (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 dis...
gpl-3.0
alekstorm/backports.ssl
backports/ssl/monkey.py
3
1918
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import sys # borrowed largely from gevent 1.0 __all__ = ['patch'] if sys.version_info[0] >= 3: string_types = str, else: import __builtin__ string_types = __builtin__.basestring # maps module name -> ...
mit
s0hvaperuna/Not-a-bot
char_rnn/model.py
1
5892
import numpy as np import tensorflow as tf from tensorflow.contrib import legacy_seq2seq from tensorflow.contrib import rnn # Cloned from https://github.com/sherjilozair/char-rnn-tensorflow # Used to sample trained models without having to call sample.py every time # which is extremely slow. Instead we load the data ...
mit
prat0318/bravado-core
tests/conftest.py
3
2118
import base64 import os import simplejson as json import pytest import bravado_core.formatter from bravado_core.spec import Spec @pytest.fixture def empty_swagger_spec(): return Spec(spec_dict={}) @pytest.fixture def minimal_swagger_dict(): """Return minimal dict that respresents a swagger spec - useful a...
bsd-3-clause
morrisonwudi/zipline
zipline/errors.py
13
11028
# # Copyright 2013 Quantopian, 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 in wr...
apache-2.0
solos/pylons
pylons/util.py
1
8988
"""Paste Template and Pylons utility functions PylonsTemplate is a Paste Template sub-class that configures the source directory and default plug-ins for a new Pylons project. The minimal template a more minimal template with less additional directories and layout. The functions used in this module are to assist Pylo...
bsd-3-clause
kaarolch/ansible
lib/ansible/modules/network/illumos/ipadm_prop.py
48
7495
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@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 L...
gpl-3.0
cpaulik/pyscaffold
src/pyscaffold/api/helpers.py
1
10567
# -*- coding: utf-8 -*- """ Useful functions for manipulating the action list and project structure. """ from __future__ import absolute_import from copy import deepcopy from ..contrib.six import string_types from ..exceptions import ActionNotFound from ..log import logger from ..structure import FileOp, define_struc...
mit
boddulavineela/mase
python101/code/widget_demo.py
14
3669
"""Solution to an exercise from Think Python: An Introduction to Software Design Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html This program requires Gui.py, which is part of Swampy; you can download it from thinkpython.com/swampy. This program demonstrates how to use the Gui ...
unlicense
slaughterjames/static
modules/readelf.py
1
1610
#python imports import sys import os import subprocess #third-party imports #No third-party imports #programmer generated imports from logger import logger from fileio import fileio ''' ***BEGIN DESCRIPTION*** Uses readelf to pull the header information from an ELF file ***END DESCRIPTION*** ''' def POE(logdir, targ...
gpl-2.0
Mellthas/quodlibet
quodlibet/tests/test_qltk_tracker.py
2
3475
# 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. import os import shutil from tests import TestCase, mkdtemp from gi.r...
gpl-2.0
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/email/__init__.py
56
1766
# Copyright (C) 2001-2007 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """A package for parsing, handling, and generating email messages.""" __all__ = [ 'base64mime', 'charset', 'encoders', 'errors', 'feedparser', 'generator', 'header', 'iterators',...
gpl-3.0
NixaSoftware/CVis
venv/bin/tools/regression/xsl_reports/test/test.py
30
1121
import sys sys.path.append( '..' ) import os import boost_wide_report import common import utils import shutil import time tag = "CVS-HEAD" if os.path.exists( "results/incoming/CVS-HEAD/processed/merged" ): shutil.rmtree( "results/incoming/CVS-HEAD/processed/merged" ) boost_wide_report.ftp_task = lambda ftp_...
apache-2.0
harshilasu/GraphicMelon
y/google-cloud-sdk/lib/googlecloudsdk/core/util/resource_registration.py
5
2073
# Copyright 2013 Google Inc. All Rights Reserved. """One-line documentation for resource_registration module. A detailed description of resource_registration. """ from googlecloudsdk.core import resources def RegisterReleasedAPIs(): """Register all official versions of released Cloud APIs. """ # pylint:disa...
gpl-3.0
openstack/murano
murano/tests/unit/cmd/test_manage.py
1
9360
# Copyright (c) 2016 AT&T Corp # 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...
apache-2.0
stachenov/PyLeetCode
tests/test_trapping_rain_2.py
1
75081
import pytest from problems.trapping_rain_2 import Solution @pytest.mark.parametrize("heightMap, expected", [ ([], 0), ([[2, 2, 2], [2, 1, 2], [2, 2, 2] ], 1), ([ [1, 4, 3, 1, 3, 2], [3, 2, 1, 3, 2, 4], [2, 3, 3, 2, 3, 1] ], 4), ([ [5, 5, 5, 5, 5],...
unlicense
hkchenhongyi/django
tests/template_tests/filter_tests/test_make_list.py
345
1611
from django.template.defaultfilters import make_list from django.test import SimpleTestCase from django.test.utils import str_prefix from django.utils.safestring import mark_safe from ..utils import setup class MakeListTests(SimpleTestCase): """ The make_list filter can destroy existing escaping, so the resu...
bsd-3-clause
David-Amaro/bank-payment
account_banking_mandate/models/payment_line.py
10
3509
# -*- encoding: utf-8 -*- ############################################################################## # # Mandate module for openERP # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # @author: Cyril Sester <csester@compassion.ch>, # Alexis de Lattre <alexis.delattre@akretion.c...
agpl-3.0
deanhiller/databus
webapp/play1.3.x/framework/pym/play/utils.py
1
10462
import sys import os, os.path import re import random import fileinput import getopt import shutil import zipfile def playVersion(play_env): play_version_file = os.path.join(play_env["basedir"], 'framework', 'src', 'play', 'version') return open(play_version_file).readline().strip() def replaceAll(file, searc...
mpl-2.0
lgp171188/fjord
fjord/feedback/migrations/0002_make_products.py
7
2510
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def make_products(apps, schema_editor): # Create the current set of products Product = apps.get_model('feedback', 'Product') Product.objects.create( enabled=True, notes=u'', d...
bsd-3-clause