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
lkhomenk/integration_tests
cfme/tests/optimize/test_bottlenecks.py
5
7933
# -*- coding: utf-8 -*- import fauxfactory import pytest from datetime import timedelta from cfme.optimize.bottlenecks import Bottlenecks from cfme.utils import conf from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.blockers import BZ from cfme.utils.timeutil import parsetime from cfme.ut...
gpl-2.0
gdreich/geonode
geonode/services/models.py
6
6197
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
gpl-3.0
neumerance/cloudloon2
.venv/lib/python2.7/site-packages/lxml/html/soupparser.py
53
4360
__doc__ = """External interface to the BeautifulSoup HTML parser. """ __all__ = ["fromstring", "parse", "convert_tree"] from lxml import etree, html from BeautifulSoup import \ BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString def fromstring(data, beautifulsoup=None, makeelement=None, **bsarg...
apache-2.0
MyAOSP/external_chromium_org
tools/json_schema_compiler/dart_generator_test.py
25
2388
#!/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 os import sys import unittest from compiler import GenerateSchema # If --rebase is passed to this test, this is set to Tru...
bsd-3-clause
NL66278/odoo
addons/account_cancel/__openerp__.py
52
1667
# -*- 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
samthor/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geos/prototypes/errcheck.py
623
3522
""" Error checking functions for GEOS ctypes prototype functions. """ import os from ctypes import c_void_p, string_at, CDLL from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.libgeos import GEOS_VERSION from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Getting the...
apache-2.0
sunlianqiang/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/html5lib/treebuilders/etree.py
915
12621
from __future__ import absolute_import, division, unicode_literals from pip._vendor.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 getETreeBu...
lgpl-3.0
dimid/ansible-modules-extras
cloud/amazon/ec2_group_facts.py
12
5047
#!/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
sodexis/odoo
addons/account_analytic_plans/wizard/analytic_plan_create_model.py
384
2829
# -*- 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
isidorn/test2
test/rdb_workloads/stress.py
1
12326
#!/usr/bin/python import sys, os, time, signal, random, string, subprocess from tempfile import NamedTemporaryFile from optparse import OptionParser sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'drivers', 'python'))) import rethinkdb as r client_script = os.path.join(os.path....
agpl-3.0
zlsun/XX-Net
code/default/python27/1.0/lib/win32/cryptography/hazmat/primitives/kdf/concatkdf.py
58
4109
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import struct from cryptography import utils from cryptography.exception...
bsd-2-clause
Jeff-Tian/mybnb
Python27/Lib/site-packages/pip/_vendor/distlib/markers.py
1261
6282
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # """Parser for the environment markers micro-language defined in PEP 345.""" import ast import os import sys import platform from .compa...
apache-2.0
RackHD-Mirror/RackHD
test/tests/api/v2_0/schema_tests.py
16
2321
from config.api2_0_config import * from modules.logger import Log from on_http_api2_0 import ApiApi as api20 from on_http_api2_0 import rest from proboscis.asserts import assert_equal from proboscis.asserts import assert_not_equal from proboscis.asserts import assert_true from proboscis.asserts import fail from probosc...
apache-2.0
sayan801/indivo_server
indivo/migrations/0016_auto__del_field_document_type.py
3
52062
# 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 'Document.type' db.delete_column('indivo_document', 'type_id') def backwards(self, ...
gpl-3.0
petesburgh/or-tools
examples/python/labeled_dice.py
34
4106
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.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://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/setuptools/command/build_ext.py
193
13049
import os import sys import itertools import imp from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler, get_config_var from distutils.errors import DistutilsError from d...
mit
KarimAllah/celery
docs/conf.py
17
3240
# -*- coding: utf-8 -*- import sys import os # eventlet/gevent should not monkey patch anything. os.environ["GEVENT_NOPATCH"] = "yes" os.environ["EVENTLET_NOPATCH"] = "yes" os.environ["CELERY_LOADER"] = "default" this = os.path.dirname(os.path.abspath(__file__)) # If your extensions are in another directory, add it...
bsd-3-clause
xtuml/pyxtuml
examples/list_bp_enums.py
2
1385
#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2017 John Törnblom # # This file is part of pyxtuml. # # pyxtuml 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 3 of the License...
lgpl-3.0
rancher/python-agent
cattle/agent/handler.py
3
3291
import re import logging from cattle import utils from cattle.lock import lock from cattle.utils import JsonObject log = logging.getLogger("agent") class BaseHandler(object): def __init__(self): pass def events(self): ret = [] for i in utils.events_from_methods(self): re...
apache-2.0
steven-cutting/icsisumm
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/inference/inference.py
9
3449
# Natural Language Toolkit: Interface to Theorem Provers # # Author: Dan Garrette <dhgarrette@gmail.com> # Ewan Klein <ewan@inf.ed.ac.uk> # # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT from nltk.sem.logic import ApplicationExpression, Operator, LogicParser import tableau im...
gpl-3.0
Intel-tensorflow/tensorflow
tensorflow/python/eager/monitoring_test.py
14
4979
# 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...
apache-2.0
Bluscream/Discord-Selfbot
cogs/debugger.py
1
17971
import pkg_resources import contextlib import sys import inspect import os import shutil import glob import math import textwrap from PythonGists import PythonGists from discord.ext import commands from io import StringIO from traceback import format_exc from cogs.utils.checks import * from contextlib imp...
gpl-3.0
albertomurillo/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory_source.py
38
11320
#!/usr/bin/python # coding: utf-8 -*- # Copyright: (c) 2018, Adrien Fleury <fleu42@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], ...
gpl-3.0
ahsquared/arc
arc-assets/themes/ut-thehill/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSUtil.py
566
9386
# Copyright (c) 2013 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. """Utility functions shared amongst the Windows generators.""" import copy import os _TARGET_TYPE_EXT = { 'executable': '.exe', 'loadable_module': '.dll', ...
gpl-2.0
wenqvip/pytuto
proj3/pagemaker.py
1
1061
__author__ = 'Spencer' from xml.sax.handler import ContentHandler from xml.sax import parse class PageMaker(ContentHandler): passthrough = False def startElement(self, name, attrs): if name == 'page': self.passthrough = True self.out = open(attrs['name'] + '.html', 'w') ...
gpl-3.0
areitz/pants
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_dependency_analyzer.py
4
13065
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from colle...
apache-2.0
CuriousLearner/kivy
examples/canvas/fbo_canvas.py
59
2544
''' FBO Canvas ========== This demonstrates a layout using an FBO (Frame Buffer Off-screen) instead of a plain canvas. You should see a black canvas with a button labelled 'FBO' in the bottom left corner. Clicking it animates the button moving right to left. ''' __all__ = ('FboFloatLayout', ) from kivy.graphics impo...
mit
pgiraud/georchestra
extractorapp/jsbuild/util/gen-go-jstools.py
24
1441
#!/usr/bin/env python """Generate go-jstools.py""" import sys import textwrap import virtualenv filename = 'go-jstools.py' after_install = """\ import os, subprocess def after_install(options, home_dir): etc = join(home_dir, 'etc') ## TODO: this should all come from distutils ## like distutils.sysconfig.g...
gpl-3.0
boompieman/iim_project
project_python2/lib/python2.7/site-packages/pattern/server/cherrypy/cherrypy/lib/gctools.py
40
7396
import gc import inspect import os import sys import time try: import objgraph except ImportError: objgraph = None import cherrypy from cherrypy import _cprequest, _cpwsgi from cherrypy.process.plugins import SimplePlugin class ReferrerTree(object): """An object which gathers all referrers of an object ...
gpl-3.0
mohitsethi/packstack
packstack/installer/exceptions.py
13
1622
# -*- coding: utf-8 -*- __all__ = ( 'PackStackError', 'InstallError', 'FlagValidationError', 'MissingRequirements', 'PluginError', 'ParamProcessingError', 'ParamValidationError', 'NetworkError', 'ScriptRuntimeError', ) class PackStackError(Exception): """Default Exception c...
apache-2.0
texcaltech/windmilltownhomes-old
django/core/mail/backends/base.py
660
1164
"""Base email backend class.""" class BaseEmailBackend(object): """ Base class for email backend implementations. Subclasses must at least overwrite send_messages(). """ def __init__(self, fail_silently=False, **kwargs): self.fail_silently = fail_silently def open(self): """Op...
bsd-3-clause
talos/jsongit
jsongit/wrappers.py
1
9151
# -*- coding: utf-8 -*- """ jsongit.wrappers These classes provide limited interfaces to pygit2 and json_diff constructs. """ import json_diff import itertools import copy class Commit(object): """A wrapper around :class:`pygit2.Commit` linking to a single key in the repo. """ def __init__(self, re...
bsd-3-clause
lindareijnhoudt/resync
resync/test/test_client_utils.py
2
2589
import unittest from resync.client_utils import count_true_args,parse_links,parse_link,parse_capabilities,parse_capability_lists from resync.client import ClientFatalError class TestClientUtils(unittest.TestCase): def test01_count_true_args(self): self.assertEqual( count_true_args(), 0 ) self.asse...
apache-2.0
junkoda/fs2
doc/conf.py
1
10050
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # fs documentation build configuration file, created by # sphinx-quickstart on Sun Jun 5 18:48:51 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 # autogen...
gpl-3.0
blackzw/openwrt_sdk_dev1
staging_dir/host/lib/python2.7/json/decoder.py
65
13785
"""Implementation of JSONDecoder """ import re import sys import struct from json import scanner try: from _json import scanstring as c_scanstring except ImportError: c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): _BYTES = '7FF800000000...
gpl-2.0
vFense/vFenseAgent-nix
agent/deps/rpm6/Python-2.7.5/lib/python2.7/bsddb/test/test_misc.py
68
4803
"""Miscellaneous bsddb module test cases """ import os, sys import unittest from test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path #---------------------------------------------------------------------- class MiscTestCase(unittest.TestCase): def setUp(self): ...
lgpl-3.0
IT-Department-Projects/OOAD-Project
Flask_App/oakcrest/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py
356
1555
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName, Attrs from genshi.core import START, END, TEXT, COMMENT, DOCTYPE def to_genshi(walker): text = [] for token in walker: type = token["type"] if type in ("Characters", "SpaceCharacters"): ...
mit
jylaxp/django
tests/template_tests/syntax_tests/test_list_index.py
521
2694
from django.test import SimpleTestCase from ..utils import setup class ListIndexTests(SimpleTestCase): @setup({'list-index01': '{{ var.1 }}'}) def test_list_index01(self): """ List-index syntax allows a template to access a certain item of a subscriptable object. """ ...
bsd-3-clause
thedep2/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/moevideo.py
15
3685
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, int_or_none, ) class MoeVideoIE(InfoExtractor): IE_DESC = 'LetitBit video ser...
gpl-3.0
romain-dartigues/ansible
lib/ansible/modules/storage/netapp/na_elementsw_volume.py
7
13498
#!/usr/bin/python # (c) 2017, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Element OS Software Volume Manager""" from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
x3ro/RIOT
tests/eepreg/tests/01-run.py
30
1057
#!/usr/bin/env python3 # Copyright (C) 2018 Acutam Automation, LLC # # 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): child.expect_exa...
lgpl-2.1
littlstar/chromium.src
third_party/closure_linter/closure_linter/common/filetestcase.py
109
3893
#!/usr/bin/env python # Copyright 2007 The Closure Linter 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 # #...
bsd-3-clause
morphis/home-assistant
homeassistant/components/notify/free_mobile.py
12
1750
""" Support for thr Free Mobile SMS platform. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.free_mobile/ """ import logging import voluptuous as vol from homeassistant.components.notify import ( PLATFORM_SCHEMA, BaseNotificationService) fro...
apache-2.0
rwth-ti/gr-ofdm
python/ofdm/qa_channel_equalizer_mimo.py
1
1301
#!/usr/bin/env python # # Copyright 2014 Institute for Theoretical Information Technology, # RWTH Aachen University # www.ti.rwth-aachen.de # # 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 S...
gpl-3.0
sunu/jasper-client
client/modules/Notifications.py
35
1743
# -*- coding: utf-8-*- import re import facebook WORDS = ["FACEBOOK", "NOTIFICATION"] def handle(text, mic, profile): """ Responds to user-input, typically speech text, with a summary of the user's Facebook notifications, including a count and details related to each individual notificat...
mit
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/theano/tensor/tests/test_opt_uncanonicalize.py
1
6708
from __future__ import absolute_import, print_function, division import unittest import numpy import theano from theano import function, config from theano import scalar from theano.gof import FunctionGraph from theano.gof.opt import out2in from theano.tensor.opt_uncanonicalize import ( local_alloc_dimshuffle, ...
agpl-3.0
Kast0rTr0y/ansible
lib/ansible/modules/messaging/rabbitmq_policy.py
25
5071
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, John Dewey <john@dewey.ws> # # 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, o...
gpl-3.0
greedymouse/openwrt
tools/b43-tools/files/b43-fwsquash.py
494
4767
#!/usr/bin/env python # # b43 firmware file squasher # Removes unnecessary firmware files # # Copyright (c) 2009 Michael Buesch <mb@bu3sch.de> # # Licensed under the GNU/GPL version 2 or (at your option) any later version. # import sys import os def usage(): print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm...
gpl-2.0
philotas/enigma2
lib/python/Components/Converter/ChannelNumbers.py
42
1835
from Components.NimManager import nimmanager class ChannelNumbers: def __init__(self): pass def getChannelNumber(self, frequency, nim): f = int(self.getMHz(frequency)) descr = self.getTunerDescription(nim) if "Europe" in descr: if "DVB-T" in descr: if 174 < f < 230: # III d = (f + 1) % 7 ...
gpl-2.0
omniscale/gbi-server
app/gbi_server/views/context.py
1
8042
# This file is part of the GBI project. # Copyright (C) 2013 Omniscale GmbH & Co. KG <http://omniscale.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://www.apache.org/licens...
apache-2.0
adrienpacifico/openfisca-france
setup.py
1
1776
#! /usr/bin/env python # -*- coding: utf-8 -*- """ -- a versatile microsimulation free software""" from setuptools import setup, find_packages setup( name = 'OpenFisca-France', version = '0.5.4.dev0', author = 'OpenFisca Team', author_email = 'contact@openfisca.fr', classifiers = [ "De...
agpl-3.0
Azure/azure-sdk-for-python
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py
1
76895
# 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 may ...
mit
laurentb/weboob
modules/dlfp/pages/board.py
2
2106
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the ...
lgpl-3.0
bala4901/odoo
addons/l10n_ch/__openerp__.py
160
2936
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA # Financial contributors: Hasa SA, Open Net SA, # Prisme Solutions Informatique SA, Quod SA # # Translation contributors: brain-te...
agpl-3.0
openstack/barbican
barbican/tests/queue/test_client.py
1
2387
# Copyright (c) 2013-2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
switchboardOp/ansible
lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py
46
24139
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
aptrishu/coala-bears
bears/general/LicenseCheckBear.py
13
1675
from coalib.bearlib.abstractions.Linter import linter from dependency_management.requirements.DistributionRequirement import ( DistributionRequirement) @linter(executable='licensecheck', output_format='regex', output_regex=r'.*: .*UNKNOWN$', result_message='No license found.') class Licens...
agpl-3.0
di0spyr0s/pants
tests/python/pants_test/tasks/test_jar_task.py
6
11198
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
apache-2.0
Intel-tensorflow/tensorflow
tensorflow/python/debug/lib/debug_utils_test.py
14
13535
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
altairpearl/scikit-learn
sklearn/linear_model/perceptron.py
39
3863
# Author: Mathieu Blondel # License: BSD 3 clause from .stochastic_gradient import BaseSGDClassifier from ..feature_selection.from_model import _LearntSelectorMixin class Perceptron(BaseSGDClassifier, _LearntSelectorMixin): """Perceptron Read more in the :ref:`User Guide <perceptron>`. Parameters -...
bsd-3-clause
pkainz/pylearn2
pylearn2/scripts/jobman/tester.py
44
3126
""" This an example script inserting a pylearn2 yaml code into a jobman database. The code below defines a yaml template string in state.yaml_template, and the values of its hyper-parameters in state.hyper_parameters, and run the code that is located in state.extract_results on this model using jobman. Actually, we a...
bsd-3-clause
shadda/AutobahnPython
autobahn/autobahn/__init__.py
7
1043
############################################################################### ## ## Copyright 2011-2013 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 ## ## ...
apache-2.0
julesy89/ttp-cpp
vendor/gmock-1.7.0/gtest/test/gtest_shuffle_test.py
3023
12549
#!/usr/bin/env python # # Copyright 2009 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of...
gpl-2.0
esse-io/zen-common
oslo-modules/oslo_context/fixture.py
3
1505
# 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 # d...
apache-2.0
ehirt/odoo
addons/mrp/report/__init__.py
378
1122
# -*- 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
dob71/x2swn
x2Profiler.py
1
38339
#!/usr/bin/env python # # This file is part of the X2SW bundle. 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. # # The software is distributed in the ...
gpl-3.0
WholeGrainGoats/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/trie/py.py
817
1763
from __future__ import absolute_import, division, unicode_literals from six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError("All keys m...
mpl-2.0
fentas/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
115
17309
# Copyright (C) 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
quickresolve/accel.ai
flask-aws/lib/python2.7/site-packages/ebcli/containers/commands.py
5
8658
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
mit
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/pexpect/__init__.py
1
83018
'''Pexpect is a Python module for spawning child applications and controlling them automatically. Pexpect can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup scripts for duplicating software package installations on different servers. It can be u...
mit
bwrsandman/OpenUpgrade
addons/stock/report/product_stock.py
376
4868
# -*- 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
mhotwagner/abackend
abackend-env/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py
3121
45978
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
joaormatos/anaconda
Anaconda/standalone/trunk/PyInstaller/lib/altgraph/__init__.py
12
4907
''' altgraph - a python graph library ================================= altgraph is a fork of `graphlib <http://pygraphlib.sourceforge.net>`_ tailored to use newer Python 2.3+ features, including additional support used by the py2app suite (modulegraph and macholib, specifically). altgraph is a python based graph (ne...
gpl-3.0
rhythmsosad/numpy
numpy/distutils/command/build_clib.py
152
12217
""" Modified version of build_clib that handles fortran source files. """ from __future__ import division, absolute_import, print_function import os from glob import glob import shutil from distutils.command.build_clib import build_clib as old_build_clib from distutils.errors import DistutilsSetupError, DistutilsError...
bsd-3-clause
joshblum/django-with-audit
django/core/management/validation.py
79
19846
import sys from django.core.management.color import color_style from django.utils.itercompat import is_iterable class ModelErrorCollection: def __init__(self, outfile=sys.stdout): self.errors = [] self.outfile = outfile self.style = color_style() def add(self, context, error): ...
bsd-3-clause
apache/avro
lang/py/avro/test/test_tether_task_runner.py
2
6739
#!/usr/bin/env python3 ## # 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
muff1nman/Vim
vim/eclim/autoload/eclim/python/rope/base/builtins.py
9
23636
"""This module trys to support builtin types and functions.""" import inspect import rope.base.evaluate from rope.base import pynames, pyobjects, arguments, utils class BuiltinModule(pyobjects.AbstractModule): def __init__(self, name, pycore=None, initial={}): super(BuiltinModule, self).__init__() ...
mit
w-martin/tact
gmock/scripts/generator/cpp/tokenize.py
679
9703
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
gpl-3.0
benjamin-jones/pupy
pupy/modules/screenshot.py
27
3951
# -*- coding: UTF8 -*- # -------------------------------------------------------------- # Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # ...
bsd-3-clause
flavour/cert
controllers/cr.py
3
13875
# -*- coding: utf-8 -*- """ Shelter Registry - Controllers """ # @ToDo Search shelters by type, services, location, available space # @ToDo Tie in assessments from RAT and requests from RMS. # @ToDo Associate persons with shelters (via presence loc == shelter loc?) module = request.controller resourcename = reque...
mit
lmmsoft/LeetCode
LeetCode-Algorithm/1123. Lowest Common Ancestor of Deepest Leaves/1123.py
1
2318
# Definition for a binary tree node. from typing import Dict, List class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def lcaDeepestLeaves1(self, root: TreeNode) -> TreeNode: self.parent: Dict[TreeNode, TreeNode] = {} ...
gpl-2.0
sdeepanshu02/microblog
flask/Lib/site-packages/coverage/data.py
40
27599
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Coverage data for coverage.py.""" import glob import itertools import json import optparse import os import os.path import random import re import socket from ...
bsd-3-clause
cmap/cmapPy
cmapPy/clue_api_client/mock_clue_api_client.py
1
1622
import logging import cmapPy.clue_api_client.setup_logger as setup_logger import cmapPy.clue_api_client.clue_api_client as clue_api_client __authors__ = "David L. Lahr" __email__ = "dlahr@broadinstitute.org" logger = logging.getLogger(setup_logger.LOGGER_NAME) class MockClueApiClient(clue_api_client.ClueApiClient)...
bsd-3-clause
maxamillion/ansible-modules-extras
database/vertica/vertica_user.py
15
14712
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
gpl-3.0
baloo/shinken
shinken/webui/plugins/flow/flow.py
1
3289
### Will be populated by the UI with it's own value app = None import time from shinken.webui.bottle import redirect from shinken.modules.webui_broker.helper import hst_srv_sort from shinken.util import safe_print try: import json except ImportError: # For old Python version, load # simple json (it can be...
agpl-3.0
alberttjahyono/posrepo
UbUjian/vendor/doctrine/orm/docs/en/conf.py
2448
6497
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
apache-2.0
brototyp/CouchPotato
library/hachoir_parser/misc/ttf.py
95
9417
""" TrueType Font parser. Documents: - "An Introduction to TrueType Fonts: A look inside the TTF format" written by "NRSI: Computers & Writing Systems" http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=IWS-Chapter08 Author: Victor Stinner Creation date: 2007-02-08 """ from hachoir_parser import...
gpl-3.0
ahmedbodi/AutobahnPython
examples/twisted/wamp1/rpc/simple/example2/server.py
17
3564
############################################################################### ## ## Copyright (C) 2011-2014 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 ## ## h...
apache-2.0
sameetb-cuelogic/edx-platform-test
common/djangoapps/enrollment/tests/fake_data_api.py
26
3120
""" A Fake Data API for testing purposes. """ import copy import datetime _DEFAULT_FAKE_MODE = { "slug": "honor", "name": "Honor Code Certificate", "min_price": 0, "suggested_prices": "", "currency": "usd", "expiration_datetime": None, "description": None } _ENROLLMENTS = [] _COURSES = [...
agpl-3.0
PrinceShaji/StreamBox
TestCodes/examplecodes/AP-Fucker.py
1
9270
#!/usr/bin/env python # -*- coding: Utf-8 -*- # # WIRELESS ACCESS POINT FUCKER # Interactive, Multifunction, Destruction Mode Included # # Thanks to BackTrack crew, especially ShamanVirtuel and ASPJ # # USAGE: Launch the script as root using "python AP-Fucker.py", follow instructions, enjoy! # Prerequisites: Have mdk3...
mit
igordejanovic/parglare
tests/func/grammar/test_grammar.py
1
10211
# -*- coding: utf-8 -*- import pytest from parglare import Parser, Grammar from parglare.grammar import ASSOC_LEFT, ASSOC_RIGHT, DEFAULT_PRIORITY from parglare.exceptions import GrammarError, ParseError def test_single_terminal(): """ Test that grammar may be just a single terminal. """ grammar = r"""...
mit
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.4/content/Lib/encodings/utf_16_be.py
860
1037
""" Python 'utf-16-be' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_16_be_encode def decode(input, errors='strict'): return codecs.utf_16_be_decode(input, errors, True) class IncrementalEncod...
gpl-3.0
DGrady/pandas
pandas/tests/computation/test_compat.py
11
1308
import pytest from distutils.version import LooseVersion import pandas as pd from pandas.core.computation.engines import _engines import pandas.core.computation.expr as expr from pandas.core.computation import _MIN_NUMEXPR_VERSION def test_compat(): # test we have compat with our version of nu from pandas....
bsd-3-clause
lunixbochs/fs-uae-gles
launcher/fs_uae_launcher/fsui/wx/choice.py
1
1037
from __future__ import division from __future__ import print_function from __future__ import absolute_import import wx from .common import update_class class Choice(wx.Choice): def __init__(self, parent, items=[]): wx.Choice.__init__(self, parent.get_container(), -1, wx.Defaul...
gpl-2.0
YuanYouYuan/FreeCAD
src/Tools/MakeAppTools.py
32
2611
import os, sys, re,string,FCFileTools verbose = 0 dcount = fcount = 0 def replaceTemplate(dirName, oldName, newName): """ modify contents from dirName and below, replace oldName by newName """ for file in os.listdir(dirName): pathName = os.path.join(dirName, file) if not os.path.isdir(pathName): ...
lgpl-2.1
synasius/django
tests/null_queries/tests.py
36
2939
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from .models import Choice, Inner, OuterA, OuterB, Poll class NullQueriesTests(TestCase): def test_none_as_null(self): """ Regression test for the use of None as a query value....
bsd-3-clause
chen0031/Dato-Core
src/unity/python_deps/psutil/examples/pmap.py
43
1983
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ A clone of 'pmap' utility on Linux, 'vmmap' on OSX and 'procstat -v' on BSD. Report memory map of a process. $ python examples/...
agpl-3.0
wuga214/Django-Wuga
env/lib/python2.7/site-packages/django/contrib/gis/db/backends/oracle/operations.py
18
10848
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
apache-2.0
lukeiwanski/tensorflow
tensorflow/contrib/cluster_resolver/python/training/gce_cluster_resolver.py
24
5151
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
tcheehow/MissionPlanner
Lib/site-packages/numpy/core/tests/test_npy_arraytypes.py
54
5864
import sys import warnings import numpy as np from numpy.testing import * warnings.filterwarnings('ignore', 'Casting complex values to real discards the imaginary part') types = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc, np.uintc, np.int_, np.uint, np.longlong, np.ulonglong, ...
gpl-3.0