repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
gsauthof/imapdl
refs/heads/master
ci/gen-coverage.py
1
#!/usr/bin/env python3 # 2017, Georg Sauthoff <mail@gms.tf>, GPLv3 import argparse import logging import os import subprocess import shutil import sys sys.path.insert(0, os.path.dirname(__file__)) import filterbr log = logging.getLogger(__name__) ex_path = [ '/usr/include/*', 'unittest/*', 'lib*/*', '*@exe/*', 'ex...
laperry1/android_external_chromium_org
refs/heads/cm-12.1
tools/win/link_limiter/build_link_limiter.py
169
#!/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. import glob import os import shutil import subprocess import sys import tempfile BUILD_DIR = 'build' def run_with_vsvars(cmd, tm...
jkshaver/virtualenv-1.8.2
refs/heads/master
env/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/command/install_lib.py
454
from distutils.command.install_lib import install_lib as _install_lib import os class install_lib(_install_lib): """Don't add compiled flags to filenames of non-Python files""" def _bytecode_filenames (self, py_filenames): bytecode_files = [] for py_file in py_filenames: if not py_...
edgarcosta92/ns3
refs/heads/master
src/netanim/bindings/callbacks_list.py
664
callback_classes = [ ['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ]
poppogbr/genropy
refs/heads/master
packages/showcase/lib/importer.py
1
#!/usr/bin/env python # encoding: utf-8 """ importer.py Created by Saverio Porcari on 2008-07-28. Copyright (c) 2008 __MyCompanyName__. All rights reserved. """ from gnr.core.gnrbag import Bag, BagResolver, BagCbResolver, DirectoryResolver from gnr.app.gnrapp import GnrApp def importPeople(db, dataBag): tblObj =...
mohammed-alfatih/servo
refs/heads/master
tests/wpt/harness/wptrunner/vcs.py
156
# 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 subprocess from functools import partial from mozlog import get_default_logger logger = None def vcs(bin_name)...
ldirer/scikit-learn
refs/heads/master
sklearn/decomposition/tests/test_truncated_svd.py
66
"""Test truncated SVD transformer.""" import numpy as np import scipy.sparse as sp from sklearn.decomposition import TruncatedSVD from sklearn.utils import check_random_state from sklearn.utils.testing import (assert_array_almost_equal, assert_equal, assert_raises, assert_greater, ...
alshedivat/tensorflow
refs/heads/master
tensorflow/contrib/quantization/python/__init__.py
179
# 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...
lightningkay/NoahGameFrame
refs/heads/master
Dependencies/googletest-release-1.8.0/googlemock/scripts/gmock_doctor.py
346
#!/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...
ooici/marine-integrations
refs/heads/master
mi/dataset/driver/issmcnsm/flort/driver.py
1
""" @package mi.dataset.driver.issmcnsm.flort.driver @file marine-integrations/mi/dataset/driver/issmcnsm/flort/driver.py @author Emily Hahn @brief Driver for the issmcnsm_flort Release notes: Initial release """ __author__ = 'Emily Hahn' __license__ = 'Apache 2.0' import string from mi.core.log import get_logger ;...
jordiclariana/ansible
refs/heads/devel
lib/ansible/modules/clustering/znode.py
13
#!/usr/bin/python # Copyright 2015 WP Engine, Inc. All rights reserved. # # 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 yo...
zaxliu/scipy
refs/heads/master
scipy/misc/tests/test_pilutil.py
46
from __future__ import division, print_function, absolute_import import os.path import tempfile import shutil import numpy as np import warnings from numpy.testing import (assert_, assert_equal, dec, decorate_methods, TestCase, run_module_suite, assert_allclose) from scipy import misc try...
AlanZatarain/cortex-vfx
refs/heads/master
test/IECore/TriangleAlgoTest.py
12
########################################################################## # # Copyright (c) 2008, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
google-code/android-scripting
refs/heads/master
python/xmpppy/doc/examples/bot.py
87
#!/usr/bin/python # -*- coding: koi8-r -*- # $Id: bot.py,v 1.2 2006/10/06 12:30:42 normanr Exp $ import sys import xmpp commands={} i18n={'ru':{},'en':{}} ########################### user handlers start ################################## i18n['en']['HELP']="This is example jabber bot.\nAvailable commands: %s" def help...
chamakov/namebench
refs/heads/master
nb_third_party/dns/rrset.py
215
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
zdary/intellij-community
refs/heads/master
python/testData/resolve/ModuleTypeAttributes/b.py
9
__name__ = "abc"
Unode/simpletap
refs/heads/master
setup.py
1
#!/usr/bin/env python import setuptools exec(compile(open("simpletap/version.py").read(), "simpletap/version.py", "exec")) long_description = open("README.rst").read() setuptools.setup( name='simpletap', packages=setuptools.find_packages(), version=__version__, description='Unittest runner producing ...
hoskerism/reefx
refs/heads/master
testing/workerthread_test.py
1
#!/user/bin/python import abc from workerthread import WorkerThread import Queue from workerbase_test import WorkerBaseTestClass, AbstractTestWorkerBase class WorkerThreadTestClass(WorkerBaseTestClass, WorkerThread): def __init__(self, inqueue, outqueue): self.addtestaction("WorkerThreadTestClass.__init...
bliti/django-nonrel-1.5
refs/heads/nonrel-1.5
tests/regressiontests/delete_regress/models.py
108
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = models.ForeignKey(ContentType) content_objec...
jn0/fb2utils
refs/heads/master
unidecode/x61.py
252
data = ( 'Qiao ', # 0x00 'Chou ', # 0x01 'Bei ', # 0x02 'Xuan ', # 0x03 'Wei ', # 0x04 'Ge ', # 0x05 'Qian ', # 0x06 'Wei ', # 0x07 'Yu ', # 0x08 'Yu ', # 0x09 'Bi ', # 0x0a 'Xuan ', # 0x0b 'Huan ', # 0x0c 'Min ', # 0x0d 'Bi ', # 0x0e 'Yi ', # 0x0f 'Mian ', # 0x10 'Yon...
duramato/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/_base/providers/torrent/thepiratebay.py
2
import re import traceback from bs4 import BeautifulSoup from couchpotato.core.event import addEvent from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.media._base.providers.torrent.base import Tor...
pshen/ansible
refs/heads/devel
lib/ansible/modules/cloud/univention/udm_user.py
69
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # # 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 Fr...
NoxWings/GoogleCodeJam
refs/heads/master
src/round1A_2016/the_last_word.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- #=============================================================================== from __future__ import unicode_literals #=============================================================================== def read_input(strip=True): return raw_input().strip() if strip el...
Rypac/sublime-format
refs/heads/main
format.py
1
import sublime import sublime_plugin from .plugin import FormatterRegistry def queue_command(callback, timeout=100): sublime.set_timeout(callback, timeout) def log_error(output, error): print('Format:', output, error) registry = FormatterRegistry() def plugin_loaded(): registry.populate() def plu...
moylop260/odoo-dev
refs/heads/master
addons/gamification/__openerp__.py
62
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
psobot/wub-machine
refs/heads/master
remixers/electrohouse.py
1
""" dubstep.py <ex: dubstepize.py, wubmachine.py, wubwub.py, etc...> Turns a song into a dubstep remix. ElectroHouse inherits from the Remixer class. Dependencies: FastModify Remixer lame (command line binary) shntool (command line binary) soundstretch (command line binary) by Peter Sobot <hi@pete...
glovebx/odoo
refs/heads/8.0
addons/payment_ogone/tests/test_ogone.py
430
# -*- coding: utf-8 -*- from lxml import objectify import time import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_ogone.controllers.main import OgoneController from openerp.tools i...
poojavade/Genomics_Docker
refs/heads/master
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/examples/ex_pairwise.py
3
# -*- coding: utf-8 -*- """ Created on Sun Mar 24 10:26:39 2013 Author: Josef Perktold """ from statsmodels.compatnp.py3k import BytesIO, asbytes import numpy as np from numpy.testing import assert_almost_equal, assert_equal ss = '''\ 43.9 1 1 39.0 1 2 46.7 1 3 43.8 1 4 44.2 1 5 47.7 1 ...
gwhitehawk/RSS
refs/heads/master
rss/core.py
1
from operator import attrgetter from treq import get import feedparser from rss import __version__ USER_AGENT = "RSS, Simply Syndicated %s" % (__version__,) def parse(feed): return feedparser.parse(feed) def fetch(feed_url): feed = get(feed_url, headers={"User-Agent" : [USER_AGENT]}) return feed.add...
aviciimaxwell/odoo
refs/heads/8.0
addons/account/account_bank.py
258
# -*- 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...
SrNetoChan/QGIS
refs/heads/master
scripts/qgis_fixes/fix_operator.py
77
from lib2to3.fixes.fix_operator import FixOperator
thundernet8/WRGameVideos-API
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/sanitizer.py
283
from __future__ import absolute_import, division, unicode_literals import re from xml.sax.saxutils import escape, unescape from six.moves import urllib_parse as urlparse from .tokenizer import HTMLTokenizer from .constants import tokenTypes content_type_rgx = re.compile(r''' ^ ...
diplomacy/research
refs/heads/master
diplomacy_research/models/policy/order_based/dataset/tests/test_no_press_value_all_builder.py
1
# ============================================================================== # Copyright 2019 - Philip Paquette # # NOTICE: 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 rest...
ties/flask-daapserver
refs/heads/master
daapserver/daap_data.py
2
__all__ = [ "dmap_data_types", "dmap_names", "dmap_reverse_data_types", "dmap_code_types"] dmap_code_types = { "abal": ("daap.browsealbumlisting", 12), "abar": ("daap.browseartistlisting", 12), "abcp": ("daap.browsecomposerlisting", 12), "abgn": ("daap.browsegenrelisting", 12), "abpl": ("da...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.4.3/Lib/encodings/charmap.py
12
""" Generic Python Character Mapping Codec. Use this codec directly rather than through the automatic conversion mechanisms supplied by unicode() and .encode(). Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs class...
simonwydooghe/ansible
refs/heads/devel
lib/ansible/modules/cloud/misc/ovirt.py
49
#!/usr/bin/python # Copyright: (c) 2013, Vincent Van der Kussen <vincent at vanderkussen.org> # 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...
brandondrew/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Platform/posix.py
61
"""SCons.Platform.posix Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2...
tanglei528/nova
refs/heads/master
nova/virt/xenapi/host.py
2
# Copyright (c) 2012 Citrix Systems, Inc. # Copyright 2010 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...
jacobian/channels-example
refs/heads/master
chat/tests/test_consumers.py
9
import json import pytest from asgiref.inmemory import ChannelLayer as InMemoryChannelLayer from channels import Group from channels.handler import AsgiRequest from channels.message import Message from django.contrib.sessions.backends.file import SessionStore as FileSessionStore from chat.consumers import ws_connect,...
Charlotte-Morgan/inasafe
refs/heads/develop
safe_extras/pydispatch/errors.py
10
"""Error types for dispatcher mechanism """ class DispatcherError(Exception): """Base class for all Dispatcher errors""" class DispatcherKeyError(KeyError, DispatcherError): """Error raised when unknown (sender,signal) set specified""" class DispatcherTypeError(TypeError, DispatcherError): """Error raised ...
roopali8/keystone
refs/heads/master
keystone/tests/unit/test_v3_catalog.py
1
# Copyright 2013 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 ...
bijandhakal/pattern
refs/heads/master
pattern/web/cache/__init__.py
21
#### PATTERN | CACHE ############################################################################### # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern try: import hashlib; md5=hashlib...
berkeley-stat159/project-delta
refs/heads/master
code/utils/plot_tool.py
1
""" This script contains tools that will be used to plot findings from statistical analyses. Future Python scripts can take advantage of these utilities by including the command sys.path.append("code/utils") from plot_tool import * """ from __future__ import division, print_function, absolute_import import matp...
makerplane/pyEfis
refs/heads/master
pyefis/gui.py
2
# Copyright (c) 2016 Phil Birkelbach # # 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 distrib...
archf/ansible
refs/heads/devel
lib/ansible/module_utils/facts/hardware/dragonfly.py
232
# 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 in the hope that ...
samthor/intellij-community
refs/heads/master
python/testData/completion/isInstanceTuple.py
83
class Foo: def test(self): pass class Foo2: def test(self): pass def x(p): if isinstance(p, (Foo, Foo2)): p.te<caret>
ahmadRagheb/goldenHR
refs/heads/master
erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
54
from __future__ import unicode_literals import frappe def execute(): if "purchase_receipt" not in frappe.db.get_table_columns("Landed Cost Purchase Receipt"): return frappe.reload_doctype("Landed Cost Purchase Receipt") frappe.db.sql(""" update `tabLanded Cost Purchase Receipt` set receipt_document_type ...
abhishekgahlot/inbox
refs/heads/master
tests/imap/conftest.py
2
""" Fixtures don't go here; see util/base.py and friends. """ # fixtures that are available by default from tests.util.base import config, db, log, absolute_path def pytest_generate_tests(metafunc): if 'db' in metafunc.fixturenames: dumpfile = absolute_path(config()['BASE_DUMP']) savedb = False ...
fangeugene/trajopt
refs/heads/master
src/sensorsim/test_sensorsim.py
8
import openravepy, sensorsimpy, trajoptpy env = openravepy.Environment() env.StopSimulation() env.Load("robots/pr2-beta-static.zae") viewer = trajoptpy.GetViewer(env) viewer.Idle() sensor = sensorsimpy.CreateFakeKinect(env) sensor.SetPose([0,0,2], [0,0,1,0]) sensor.SetIntrinsics(525) sensor.Update() d = sensor.GetDepth...
vic3t3chn0/kernel_ubuntu_togari
refs/heads/vic3t3chn0_ubuntu_patch
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
mSenyor/sl4a
refs/heads/master
python/src/Tools/bgen/bgen/bgenGeneratorGroup.py
50
from bgenOutput import * class GeneratorGroup: def __init__(self, prefix): self.prefix = prefix self.generators = [] def add(self, g, dupcheck=0): if dupcheck: if g in self.generators: print 'DUP', g.name return g.setprefix(self.pref...
smartmob-project/smartmob-agent
refs/heads/master
tests/test_middleware.py
1
# -*- coding: utf-8 -*- import asyncio import aiohttp import aiohttp.web import logging import pytest import testfixtures from aiohttp import web from smartmob_agent import ( access_log_middleware, echo_request_id, inject_request_id, ) from unittest import mock class HTTPServer: """Run an aiohttp a...
qstokkink/py-ipv8
refs/heads/master
ipv8/test/attestation/wallet/bonehexact/test_attestation.py
1
from binascii import unhexlify import asynctest from .....attestation.wallet.bonehexact.attestation import (attest, binary_relativity, binary_relativity_certainty, binary_relativity_match, create_challenge, ...
Laurawly/tvm-1
refs/heads/master
tests/python/relay/test_pass_simplify_inference.py
4
# 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...
boberfly/gaffer
refs/heads/master
python/GafferCortexUITest/CompoundParameterValueWidgetTest.py
11
########################################################################## # # Copyright (c) 2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
citrix-openstack/build-python-troveclient
refs/heads/ctx-nova-network-smoke-latest
troveclient/client.py
2
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
zenefits/sentry
refs/heads/master
tests/sentry/rules/conditions/test_event_attribute.py
6
from __future__ import absolute_import from sentry.testutils.cases import RuleTestCase from sentry.rules.conditions.event_attribute import ( EventAttributeCondition, MatchType ) class EventAttributeConditionTest(RuleTestCase): rule_cls = EventAttributeCondition def get_event(self): event = self....
mkolar/pyblish-kredenc
refs/heads/master
pyblish_kredenc/plugins/archive/select_all.py
2
import pyblish.api @pyblish.api.log class SelectAll(pyblish.api.Selector): """ """ hosts = ['maya', 'modo'] version = (0, 1, 0) def process_context(self, context): """ """ instance = context.create_instance(name='all') instance.set_data('family', value='a...
AMechler/AliPhysics
refs/heads/master
PWGJE/EMCALJetTasks/Tracks/analysis/base/FileHandler.py
41
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
tarzasai/Flexget
refs/heads/develop
flexget/plugins/input/tail.py
3
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import io import os import re import logging from sqlalchemy import Column, Integer, Unicode from flexget import options, plugin from flexget.db_schema import versioned_base f...
ivanalejandro0/eip-fsm-test
refs/heads/master
eip/tests.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import random from pprint import pprint from .machine import EIPMachine from .manager import EIPManager def debug(): """ This shows us some details about the internals of the xworkflows object. """ em = EIPMachine() print dir(em) print prin...
shsfre09/valijson
refs/heads/master
thirdparty/gtest-1.7.0/test/gtest_list_tests_unittest.py
1898
#!/usr/bin/env python # # Copyright 2006, 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...
scottferg/web-console
refs/heads/master
django/contrib/gis/gdal/geomtype.py
12
from django.contrib.gis.gdal.error import OGRException #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', 1 : 'Point', ...
agaffney/ansible
refs/heads/devel
test/integration/targets/plugin_loader/override/filter_plugins/core.py
147
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type def do_flag(myval): return 'flagged' class FilterModule(object): ''' Ansible core jinja2 filters ''' def filters(self): return { # jinja2 overrides 'fla...
aristanetworks/arista-ovs-nova
refs/heads/master
nova/tests/api/openstack/compute/test_servers.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack LLC. # 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 copy o...
RafaelCosman/pybrain
refs/heads/master
pybrain/rl/environments/shipsteer/viewer.py
25
from __future__ import print_function __author__ = 'Frank Sehnke, sehnke@in.tum.de' #@PydevCodeAnalysisIgnore ######################################################################### # OpenGL viewer for the FlexCube Environment # # The FlexCube Environment is a Mass-Spring-System composed of 8 mass points. # These r...
prefetchnta/questlab
refs/heads/master
bin/x64bin/python/37/Lib/xml/parsers/__init__.py
88
"""Python interfaces to XML parsers. This package contains one module: expat -- Python wrapper for James Clark's Expat parser, with namespace support. """
yongtang/tensorflow
refs/heads/master
tensorflow/python/estimator/model_fn.py
40
# Copyright 2018 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...
perezg/infoxchange
refs/heads/master
BASE/lib/python2.7/site-packages/setuptools/__init__.py
5
"""Extensions to the 'distutils' for large or complex distributions""" from setuptools.extension import Extension, Library from setuptools.dist import Distribution, Feature, _get_unpatched import distutils.core, setuptools.command from setuptools.depends import Require from distutils.core import Command as _Command fro...
AnderEnder/ansible-modules-extras
refs/heads/devel
system/filesystem.py
35
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Alexander Bulimov <lazywolf0@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 t...
leighpauls/k2cro4
refs/heads/master
remoting/tools/verify_resources.py
14
#!/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. """Verifies that GRD resource files define all the strings used by a given set of source files. For file formats where it is not po...
Nick-Hall/gramps
refs/heads/master
gramps/gui/plug/quick/_quickreports.py
5
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 B. Malengier # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2011 Tim G L Lyons # # 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...
lbeltrame/letsencrypt
refs/heads/master
letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/__init__.py
47
"""Let's Encrypt compatibility test Apache configurators"""
SergiosKar/Deep-Learning-models
refs/heads/master
Q-table.py
1
import numpy as np import tensorflow as tf import gym lr = 0.8 g = 0.9 episodes = 2000 env = gym.make('FrozenLake-v0') #initalize Q tabe with zeros Q = np.zeros([env.observation_space.n,env.action_space.n]) rList = [] for i in range(episodes): s = env.reset() reward = 0 goal_flag ...
semonte/intellij-community
refs/heads/master
python/testData/inspections/PyUnboundLocalVariableInspection/ControlFlowInTryExceptFinally.py
83
def foo1(): a = 1 try: for i in range(10): pass except Exception: pass finally: b = a #pass def foo2(): a = 1 try: for i in range(10): pass except Exception: c = a #pass finally: b = a #pass
Triv90/Heat
refs/heads/stable/grizzly
heat/common/custom_backend_auth.py
6
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012, Red Hat, 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 r...
Microsoft/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/win32com/client/CLSIDToClass.py
29
"""Manages a dictionary of CLSID strings to Python classes. Primary use of this module is to allow modules generated by makepy.py to share classes. @makepy@ automatically generates code which interacts with this module. You should never need to reference this module directly. This module only provides support for m...
majorika/crawlers
refs/heads/master
election_commission/main.py
3
#!/usr/bin/python2.7 # -*- encoding=utf-8 -*- from argparse import ArgumentParser, RawTextHelpFormatter import codecs import gevent from gevent import monkey import json from types import UnicodeType from crawlers import Crawler from crawlers.local.static import get_election_type_name from utils import check_dir def...
endlessm/chromium-browser
refs/heads/master
third_party/catapult/tracing/tracing_build/__init__.py
8
# 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. # import tracing_project tracing_project.UpdateSysPathIfNeeded()
matthiaskramm/corepy
refs/heads/master
corepy/arch/x86_64/isa/x86_64_isa.py
1
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
liberalcoin/liberalcoin
refs/heads/master
share/qt/extract_strings_qt.py
2945
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
crazy-canux/xplugin_nagios
refs/heads/master
plugin/plugins/db2/src/check_db2_database_log.py
1
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Copyright (C) Canux CHENG <canuxcheng@gmail.com> # # 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 li...
yanatan16/pycodejam
refs/heads/master
setup.py
1
from setuptools import setup, find_packages import sys setup( name = "pycodejam", version = "1.2.0", packages = find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), package_dir = { '': 'src' }, test_suite = 'codejam.tests', # metadata for upload to PyPI author = "Jon...
sertac/django
refs/heads/master
tests/custom_migration_operations/operations.py
518
from django.db.migrations.operations.base import Operation class TestOperation(Operation): def __init__(self): pass def deconstruct(self): return ( self.__class__.__name__, [], {} ) @property def reversible(self): return True d...
TileHalo/servo
refs/heads/master
tests/wpt/harness/wptrunner/manifestupdate.py
38
# 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 urlparse from collections import namedtuple, defaultdict from wptmanifest.node import (DataNode, Condi...
sylarcp/anita
refs/heads/master
venv/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/base.py
21
# oracle/base.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: oracle :name: Oracle Oracle version 8 through current (11g ...
lazytech-org/RIOT
refs/heads/master
tests/od/tests/02-run.py
25
#!/usr/bin/env python3 # Copyright (C) 2017 Hamburg University of Applied Sciences # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import sys from testrunner import run def testfunc(child): ...
hgl888/chromium-crosswalk
refs/heads/master
build/android/pylib/device/device_list.py
114
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A module to keep track of devices across builds.""" import os LAST_DEVICES_FILENAME = '.last_devices' LAST_MISSING_DEVICES_FILENAME = '.last_missing' ...
dantebarba/docker-media-server
refs/heads/master
plex/Sub-Zero.bundle/Contents/Libraries/Shared/ftfy/__init__.py
2
# -*- coding: utf-8 -*- """ ftfy: fixes text for you This is a module for making text less broken. See the `fix_text` function for more information. """ from __future__ import unicode_literals import unicodedata import ftfy.bad_codecs from ftfy import fixes from ftfy.formatting import display_ljust from ftfy.compatib...
Versent/ansible
refs/heads/devel
lib/ansible/module_utils/ec2.py
67
# 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...
tlakshman26/cinder-bug-fix-volume-conversion-full
refs/heads/master
cinder/tests/unit/volume/drivers/netapp/dataontap/client/test_client_base.py
9
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2015 Tom Barron. 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.a...
anaran/kuma
refs/heads/master
vendor/packages/translate/storage/test_directory.py
25
#!/usr/bin/env python """Tests for the directory module""" import os from translate.storage import directory class TestDirectory(object): """a test class to run tests on a test Pootle Server""" def setup_method(self, method): """sets up a test directory""" print("setup_method called on", s...
agentr13/python-phonenumbers
refs/heads/dev
python/phonenumbers/shortdata/region_DK.py
8
"""Auto-generated file, do not edit by hand. DK metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_DK = PhoneMetadata(id='DK', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2}', possible_number_pattern='\\d{...
wxgeo/geophar
refs/heads/master
wxgeometrie/sympy/parsing/tests/test_latex.py
2
import os import glob import tempfile import shutil import difflib from sympy.parsing.latex._build_latex_antlr import ( build_parser, check_antlr_version, dir_latex_antlr ) from sympy.utilities.pytest import raises, skip, XFAIL from sympy.external import import_module from sympy import ( Symbol, Mul,...
Tranzystorek/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/doc/en/example/multipython.py
171
""" module containing a parametrized tests testing cross-python serialization via the pickle module. """ import py import pytest import _pytest._code pythonlist = ['python2.6', 'python2.7', 'python3.3'] @pytest.fixture(params=pythonlist) def python1(request, tmpdir): picklefile = tmpdir.join("data.pickle") ret...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/static/creature/shared_yavin4_skreeg.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/creature/shared_yavin4_skreeg.iff" result.attribute_template_id = -1 r...
fabian4/ceilometer
refs/heads/master
ceilometer/storage/impl_db2.py
7
# Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 eNovance # Copyright 2013 IBM Corp # # 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...
bravominski/PennApps2015-HeartMates
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/__init__.py
196
""" HTML parsing library based on the WHATWG "HTML5" specification. The parser is designed to be compatible with existing HTML found in the wild and implements well-defined error recovery that is largely compatible with modern desktop web browsers. Example usage: import html5lib f = open("my_document.html") tree = ht...
Danisan/odoo-1
refs/heads/8.0
addons/l10n_hn/__init__.py
411
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009-2010 Salvatore J. Trimarchi <salvatore@trimarchi.co.cc> # (http://salvatoreweb.co.cc) # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
jitendra29/servo
refs/heads/master
tests/wpt/web-platform-tests/workers/baseurl/beta/worker.py
241
def main(request, response): return (302, "Moved"), [("Location", "../gamma/worker.js")], "postMessage('executed redirecting script');"