repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
KwadroNaut/bitmask_client
src/leap/bitmask/util/request_helpers.py
8
1724
# -*- coding: utf-8 -*- # request_helpers.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
gpl-3.0
bollu/polymage
sandbox/apps/python/img_proc/interpolate/init.py
2
2104
import sys import os.path from PIL import Image import numpy as np from arg_parser import parse_args from printer import print_header, print_usage, print_line def init_images(app_data): print("[init.py] : initializing images...") app_args = app_data['app_args'] # input image: img_path = app_args.im...
apache-2.0
Orav/kbengine
kbe/res/scripts/common/Lib/test/test_codecs.py
2
114384
import codecs import contextlib import io import locale import sys import unittest import warnings import encodings from test import support if sys.platform == 'win32': VISTA_OR_LATER = (sys.getwindowsversion().major >= 6) else: VISTA_OR_LATER = False try: import ctypes except ImportErr...
lgpl-3.0
joariasl/odoo
addons/l10n_lu/__openerp__.py
197
2804
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011 Thamini S.à.R.L (<http://www.thamini.com>) # Copyright (C) 2011 ADN Consultants S.à...
agpl-3.0
hustodemon/spacewalk
client/rhel/yum-rhn-plugin/actions/packages.py
3
22114
# # Copyright (c) 1999--2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
MadeiraCloud/salt
sources/salt/states/locale.py
1
1224
# -*- coding: utf-8 -*- ''' Management of languages/locales ==============================+ The locale can be managed for the system: .. code-block:: yaml en_US.UTF-8: locale.system ''' def __virtual__(): ''' Only load if the locale module is available in __salt__ ''' return 'locale' if '...
apache-2.0
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/Demos/SystemParametersInfo.py
17
7141
import win32gui, win32con, win32api, time, os, glob ## some of these tests will fail for systems prior to XP for pname in( ## Set actions all take an unsigned int in pvParam "SPI_GETMOUSESPEED", "SPI_GETACTIVEWNDTRKTIMEOUT", "SPI_GETCARETWIDTH", "SPI_GETFOREGROUNDFLASHCOUNT", "SPI_GETFOREGROUNDLOCKTIMEOUT"...
apache-2.0
balajiiyer-ufl-projects/OpenStackVaccine
test/registrar_test.py
1
1074
from controller.registrar import Registrar import json class TestRegistrar: def __init__(self, conf, auth_info): self.registrar = Registrar(conf, auth_info) def test_client(self): assert self.registrar.client != None assert self.registrar.client != None print self.registrar.cl...
gpl-2.0
blockc/fabric
test/feature/environment.py
12
3049
# Copyright IBM Corp. 2017 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 ag...
apache-2.0
caisq/tensorflow
tensorflow/python/estimator/canned/dnn_test.py
25
16780
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
slohse/ansible
test/units/modules/network/slxos/test_slxos_linkagg.py
23
4950
# # (c) 2018 Extreme Networks 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. # # Ans...
gpl-3.0
stefanfoulis/django-cms
cms/utils/admin.py
11
4796
# -*- coding: utf-8 -*- import json from django.contrib.auth import get_permission_codename from django.contrib.sites.models import Site from django.http import HttpResponse from django.shortcuts import render_to_response from django.template.context import RequestContext from django.utils.encoding import smart_str f...
bsd-3-clause
zotherstupidguy/ahmia
tools/gather_backlinks_data.py
6
3202
"""Gather backlinking information.""" # -*- coding: utf-8 -*- import codecs # UTF-8 support for the text files import datetime # Timestamp to each JSON file import json # JSON library import os # Reading directories import random # For random sleep time import subprocess # To call command line import time # For ...
bsd-3-clause
samzhang111/scikit-learn
examples/calibration/plot_calibration_curve.py
225
5903
""" ============================== Probability Calibration curves ============================== When performing classification one often wants to predict not only the class label, but also the associated probability. This probability gives some kind of confidence on the prediction. This example demonstrates how to di...
bsd-3-clause
stshine/servo
tests/wpt/harness/wptrunner/update/tree.py
142
11075
# 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 re import subprocess from .. import vcs from ..vcs import bind_to_repo, git, hg def get_unique_name(...
mpl-2.0
kobolabs/calibre
src/calibre/devices/android/driver.py
2
15233
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os import cStringIO from calibre.devices.usbms.driver import USBMS HTC_BCDS = [0x100, 0x0222, 0x0224, 0x0226, 0x227, 0x228, 0x229, 0x0231, 0x9999] class ANDROID(...
gpl-3.0
Carmezim/tensorflow
tensorflow/python/util/future_api_test.py
173
1177
# 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
k3nnyfr/s2a_fr-nsis
s2a/Python/Lib/pydoc_data/topics.py
9
410448
# Autogenerated by Sphinx on Sat Oct 26 13:44:16 2013 topics = {'assert': '\nThe ``assert`` statement\n************************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form, ``assert expression``, ...
gpl-3.0
axinging/sky_engine
sky/tools/webkitpy/performance_tests/perftestsrunner_unittest.py
10
38445
# 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
mwieczor/ACO
extern/googletest/googlemock/scripts/generator/cpp/utils.py
1158
1153
#!/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...
mit
tigwyk/eve-wspace
evewspace/Alerts/method_base.py
15
3041
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option...
gpl-3.0
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/trace.py
1
30152
#! /usr/bin/python2.7 # portions copyright 2001, Autonomous Zones Industries, Inc., all rights... # err... reserved and offered to the public under the terms of the # Python 2.2 license. # Author: Zooko O'Whielacronx # http://zooko.com/ # mailto:zooko@zooko.com # # Copyright 2000, Mojam Media, Inc., all rights reserv...
gpl-3.0
msduketown/xbmc
lib/gtest/test/gtest_help_test.py
2968
5856
#!/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...
gpl-2.0
LICEF/edx-platform
lms/djangoapps/instructor/views/instructor_dashboard.py
3
15487
""" Instructor Dashboard Views """ import logging from django.utils.translation import ugettext as _ from django_future.csrf import ensure_csrf_cookie from django.views.decorators.cache import cache_control from edxmako.shortcuts import render_to_response from django.contrib.auth.models import User from django.core.u...
agpl-3.0
kdwink/intellij-community
python/testData/MockSdk2.7/python_stubs/__builtin__.py
40
174842
# encoding: utf-8 # module __builtin__ # from (built-in) # by generator 1.136 from __future__ import print_function """ Built-in functions, exceptions, and other objects. Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices. """ # imports from exceptions import (ArithmeticError, AssertionError, A...
apache-2.0
Fkawala/gcloud-python
language/google/cloud/language/entity.py
3
3438
# Copyright 2016 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 or agreed to in writing, ...
apache-2.0
Mirantis/vmware-dvs
networking_vsphere/tests/unit/neutronclient/test_cli20.py
2
4766
# 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 ...
apache-2.0
twbarber/pygooglevoice
googlevoice/voice.py
1
11310
from conf import config from util import * import settings import base64 qpat = re.compile(r'\?') if settings.DEBUG: import logging logging.basicConfig() log = logging.getLogger('PyGoogleVoice') log.setLevel(logging.DEBUG) else: log = None class Voice(object): """ Main voice instance for...
bsd-3-clause
zenodo/zenodo
zenodo/modules/sitemap/ext.py
2
2576
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2018 CERN. # # Zenodo 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 v...
gpl-2.0
Intel-tensorflow/tensorflow
tensorflow/python/kernel_tests/argmax_op_test.py
6
5583
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
ppiotr/Invenio
modules/bibmatch/lib/bibmatch_regression_tests.py
7
28171
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011 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 opt...
gpl-2.0
jtakayama/makahiki-draft
install/run_initialize_instance.py
1
7542
import os import sys import subprocess import shlex import sys import StringIO import datetime sys.path.append(os.path.dirname(os.path.realpath(__file__)) + os.sep + os.pardir + os.sep + "makahiki" + os.sep) from apps.utils import script_utils def termination_string(): """ Gets the current system time and app...
mit
ATIX-AG/ansible
lib/ansible/modules/cloud/amazon/aws_application_scaling_policy.py
19
21118
#!/usr/bin/python # Copyright: Ansible Project # 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', 'status': ['preview'], ...
gpl-3.0
analvikingur/pytorch_RVAE
selfModules/highway.py
3
1752
import torch.nn as nn import torch.nn.functional as F class Highway(nn.Module): def __init__(self, size, num_layers, f): super(Highway, self).__init__() self.num_layers = num_layers self.nonlinear = [nn.Linear(size, size) for _ in range(num_layers)] for i, module in enumerate(se...
mit
gerddie/nipype
nipype/interfaces/base.py
2
66834
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Package contains interfaces for using existing functionality in other packages Exaples FSL, matlab/SPM , afni Requires Packages to be installed """ from ConfigParser import NoOptionError from copy i...
bsd-3-clause
1013553207/django
django/db/backends/mysql/client.py
520
1518
import subprocess from django.db.backends.base.client import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'mysql' @classmethod def settings_to_cmd_args(cls, settings_dict): args = [cls.executable_name] db = settings_dict['OPTIONS'].get('db', settings_dic...
bsd-3-clause
Syrcon/servo
tests/wpt/web-platform-tests/tools/html5lib/utils/spider.py
436
4157
#!/usr/bin/env python """Spider to try and find bugs in the parser. Requires httplib2 and elementtree usage: import spider s = spider.Spider() s.spider("http://www.google.com", maxURLs=100) """ import urllib.request, urllib.error, urllib.parse import urllib.robotparser import md5 import httplib2 import html5lib fro...
mpl-2.0
muupan/chainer
tests/chainer_tests/optimizers_tests/test_optimizers_by_linear_model.py
5
4120
import unittest import numpy as np import six import chainer from chainer import cuda import chainer.functions as F import chainer.links as L from chainer import optimizers from chainer import testing from chainer.testing import attr from chainer.testing import condition class LinearModel(object): UNIT_NUM = 1...
mit
vegetalte-dev/android_kernel_bq_vegetalte
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
Ichag/odoo
addons/email_template/email_template.py
196
30189
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
agpl-3.0
calixtinn/LFA_01
main.py
1
4552
""" ************************************************************************************************* * Trabalho 01 - Linguagens Formais e Autômatos Finitos * * * * @teacher: Walace R...
gpl-3.0
Acidburn0zzz/tornado
tornado/websocket.py
57
40694
"""Implementation of the WebSocket protocol. `WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional communication between the browser and server. WebSockets are supported in the current versions of all major browsers, although older versions that do not support WebSockets are still in use (refer ...
apache-2.0
gymnasium/edx-platform
lms/djangoapps/django_comment_client/management/commands/assign_role.py
18
1356
from __future__ import print_function from django.contrib.auth.models import User from django.core.management.base import BaseCommand from django_comment_common.models import Role class Command(BaseCommand): help = 'Assign a discussion forum role to a user.' def add_arguments(self, parser): parser.a...
agpl-3.0
phatograph/vim-snippets
pythonx/vimsnippets.py
62
2937
"""Helper methods used in UltiSnips snippets.""" import string, vim def complete(tab, opts): """ get options that start with tab :param tab: query string :param opts: list that needs to be completed :return: a string that start with tab """ msg = "({0})" if tab: opts = [m[len...
mit
xuru/pyvisdk
pyvisdk/do/host_das_ok_event.py
1
1156
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def HostDasOkEvent(vim, *args, **kwargs): '''This event records when HA on a host returns...
mit
nielsbuwen/ilastik
examples/example_python_client.py
4
1631
import numpy import vigra import ilastik_main from ilastik.workflows.pixelClassification import PixelClassificationWorkflow args = ilastik_main.parser.parse_args([]) args.headless = True args.project = '/Users/bergs/MyProject.ilp' shell = ilastik_main.main( args ) assert isinstance(shell.workflow, PixelClassificatio...
gpl-3.0
ConnorGBrewster/servo
tests/wpt/web-platform-tests/tools/third_party/funcsigs/tests/test_inspect.py
40
37844
# Copyright 2001-2013 Python Software Foundation; All Rights Reserved from __future__ import absolute_import, division, print_function import collections import sys try: import unittest2 as unittest except ImportError: import unittest import funcsigs as inspect class TestSignatureObject(unittest.TestCase): ...
mpl-2.0
modulexcite/PTVS
Python/Tests/TestData/VirtualEnv/env/Lib/encodings/unicode_internal.py
103
1241
""" Python 'unicode-internal' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to meth...
apache-2.0
tesidroni/mp
Lib/lib2to3/fixer_util.py
99
14578
"""Utility functions, node construction macros, etc.""" # Author: Collin Winter from itertools import islice # Local imports from .pgen2 import token from .pytree import Leaf, Node from .pygram import python_symbols as syms from . import patcomp ########################################################### ### Common...
gpl-3.0
MyRookie/SentimentAnalyse
venv/lib/python2.7/site-packages/numpy/distutils/fcompiler/intel.py
15
6644
# http://developer.intel.com/software/products/compilers/flin/ from __future__ import division, absolute_import, print_function import sys from numpy.distutils.ccompiler import simple_version_match from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file compilers = ['IntelFCompiler', 'IntelVisualFCompile...
mit
codeforamerica/skillcamp
ENV/lib/python2.7/site-packages/flask/signals.py
783
2140
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Name...
mit
ryrzy/LG-D802-G2-_Android_KK_D802_v20b
tools/perf/util/setup.py
4998
1330
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
aleju/imgaug
checks/check_heatmaps.py
2
5622
from __future__ import print_function, division import numpy as np import imgaug as ia from imgaug import augmenters as iaa def main(): quokka = ia.data.quokka(size=0.5) h, w = quokka.shape[0:2] heatmap = np.zeros((h, w), dtype=np.float32) heatmap[70:120, 90:150] = 0.1 heatmap[30:70, 50:65] = 0....
mit
savoirfairelinux/odoo
addons/hr_contract/base_action_rule.py
389
2646
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013 OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
Zord13appdesa/python-for-android
python-modules/zope/zope/interface/ro.py
50
2171
############################################################################## # # Copyright (c) 2003 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
apache-2.0
justathoughtor2/atomicApe
cygwin/lib/python2.7/site-packages/pygments/filter.py
23
2080
# -*- coding: utf-8 -*- """ pygments.filter ~~~~~~~~~~~~~~~ Module that implements the default filter. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ def apply_filters(stream, filters, lexer=None): """ Use this method to app...
gpl-3.0
isaacyeaton/pyadisi
pyadisi/pyqtgraph/multiprocess/processes.py
10
20717
import subprocess, atexit, os, sys, time, random, socket, signal import multiprocessing.connection try: import cPickle as pickle except ImportError: import pickle from .remoteproxy import RemoteEventHandler, ClosedError, NoResultError, LocalObjectProxy, ObjectProxy from ..Qt import USE_PYSIDE from ..util impor...
bsd-3-clause
janebeckman/gpdb
gpMgmt/bin/gppylib/test/unit/test_unit_gp.py
11
3511
import os import sys import tempfile from StringIO import StringIO from commands.base import CommandResult from commands.gp import GpReadConfig from gparray import GpDB, GpArray, Segment import shutil from mock import * from gp_unittest import * from gphostcache import GpHost class GpConfig(GpTestCase): def set...
apache-2.0
arnaud-morvan/QGIS
python/plugins/processing/script/AddScriptFromFileAction.py
10
2666
# -*- coding: utf-8 -*- """ *************************************************************************** EditScriptAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
gpl-2.0
jcberquist/SublimeText-Lucee
src/inline_documentation.py
1
2952
import sublime, sublime_plugin, webbrowser from os.path import dirname, realpath from . import utils from collections import namedtuple Documentation = namedtuple('Documentation', 'doc_html_variables on_navigate priority') FILE_PATH = dirname(realpath(__file__)).replace("\\", "/") DOC_TEMPLATE = "" PAGINATION_TEMPLAT...
mit
wuxianghou/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py
379
79448
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
bsd-3-clause
hut8labs/diffscuss
diffscuss/generate.py
2
3704
import subprocess import sys import time def _check_output(*popenargs, **kwargs): """ Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Python 2.6.2 ...
mit
shakamunyi/nova
nova/openstack/common/middleware/request_id.py
7
1024
# 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
ya7lelkom/googleads-python-lib
examples/dfp/v201502/inventory_service/archive_ad_units.py
3
2721
#!/usr/bin/python # # 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 b...
apache-2.0
BibMartin/python-nvd3
nvd3/__init__.py
1
1025
#!/usr/bin/python # -*- coding: utf-8 -*- """ Python-nvd3 is a Python wrapper for NVD3 graph library. NVD3 is an attempt to build re-usable charts and chart components for d3.js without taking away the power that d3.js gives you. Project location : https://github.com/areski/python-nvd3 """ __version__ = '0.13.10' __...
mit
helldorado/ansible
lib/ansible/modules/storage/netapp/na_ontap_flexcache.py
38
19372
#!/usr/bin/python # (c) 2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
gurneyalex/odoo
addons/l10n_cl/models/res_partner.py
5
2420
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import stdnum from odoo import _, api, fields, models from odoo.exceptions import UserError, ValidationError class ResPartner(models.Model): _name = 'res.partner' _inherit = 'res.partner' _sii_taxpayer_type...
agpl-3.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/django-1.3/django/contrib/auth/tests/__init__.py
231
1092
from django.contrib.auth.tests.auth_backends import (BackendTest, RowlevelBackendTest, AnonymousUserBackendTest, NoAnonymousUserBackendTest, NoBackendsTest, InActiveUserBackendTest, NoInActiveUserBackendTest) from django.contrib.auth.tests.basic import BasicTestCase from django.contrib.auth.tests.decorators imp...
lgpl-3.0
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/pytz/reference.py
839
3649
''' Reference tzinfo implementations from the Python docs. Used for testing against as they are only correct for the years 1987 to 2006. Do not use these for real code. ''' from datetime import tzinfo, timedelta, datetime from pytz import utc, UTC, HOUR, ZERO # A class building tzinfo objects for fixed-offset time zo...
gpl-3.0
zerc/django
tests/i18n/patterns/tests.py
256
14326
from __future__ import unicode_literals import os from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import clear_url_caches, reverse, translate_url from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django.template impor...
bsd-3-clause
vsajip/django
django/contrib/messages/storage/base.py
9
6174
from __future__ import unicode_literals from django.conf import settings from django.utils.encoding import force_unicode, StrAndUnicode from django.contrib.messages import constants, utils LEVEL_TAGS = utils.get_level_tags() class Message(StrAndUnicode): """ Represents an actual message that can be stored ...
bsd-3-clause
devoid/nova
nova/virt/hyperv/utilsfactory.py
13
3118
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
apache-2.0
gunchleoc/django
tests/model_meta/results.py
48
31036
from .models import ( AbstractPerson, BasePerson, Person, ProxyPerson, Relating, Relation, ) TEST_RESULTS = { 'get_all_field_names': { Person: [ 'baseperson_ptr', 'baseperson_ptr_id', 'content_type_abstract', 'content_type_abstract_id', 'conte...
bsd-3-clause
rockneurotiko/django
tests/schema/tests.py
83
71412
import datetime import itertools import unittest from copy import copy from django.db import ( DatabaseError, IntegrityError, OperationalError, connection, ) from django.db.models import Model from django.db.models.deletion import CASCADE from django.db.models.fields import ( AutoField, BigIntegerField, Binary...
bsd-3-clause
jbenden/ansible
lib/ansible/utils/module_docs_fragments/avi.py
74
1719
# # Created on December 12, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Avi Version: 16.3.4 # # # 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...
gpl-3.0
NeostreamTechnology/Microservices
venv/lib/python2.7/site-packages/urllib3/packages/six.py
2715
30098
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
mit
pivotal-jbarrett/geode-native
tools/gnmsg/server_message_decoder.py
1
9484
#!/usr/local/bin/python3 # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the L...
apache-2.0
chouseknecht/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg_sync.py
52
10130
#!/usr/bin/python # (c) 2016, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
devoid/nova
nova/virt/baremetal/tilera_pdu.py
3
5866
# coding=utf-8 # Copyright (c) 2011-2013 University of Southern California / ISI # 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...
apache-2.0
evensonbryan/yocto-autobuilder
lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/unit/test_clients_sendchange.py
4
10020
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
konsP/synnefo
snf-astakos-app/astakos/im/settings.py
3
11780
# Copyright (C) 2010-2014 GRNET S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed i...
gpl-3.0
rayleyva/nsq
pynsq/nsq/sync.py
15
1386
import socket import struct import nsq class SyncConn(object): def __init__(self, timeout=1.0): self.buffer = '' self.timeout = timeout def connect(self, host, port): assert isinstance(host, (str, unicode)) assert isinstance(port, int) self.s = socket.socket(socke...
mit
Azure/azure-sdk-for-python
sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py
1
8182
# 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
Slezhuk/ansible
lib/ansible/modules/cloud/openstack/os_group.py
27
5380
#!/usr/bin/python # Copyright (c) 2016 IBM # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This software is distrib...
gpl-3.0
aldian/tensorflow
tensorflow/examples/image_retraining/retrain_test.py
14
5298
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
westernx/vee
vee/environmentrepo.py
1
6434
from subprocess import CalledProcessError import os import re from vee import log from vee.cli import style_note, style_warning, style_error, style from vee.environment import Environment from vee.exceptions import CliMixin from vee.git import GitRepo from vee.packageset import PackageSet from vee.requirements import ...
bsd-3-clause
andrewboie/discogstool
mutagen/build/lib/mutagen/monkeysaudio.py
15
2839
# A Monkey's Audio (APE) reader/tagger # # Copyright 2006 Lukas Lalinsky <lalinsky@gmail.com> # # 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. # # $Id: monkeysaudio.py 3976 2007-01-13...
gpl-2.0
dgladkov/django
tests/template_tests/test_parser.py
42
4143
""" Testing some internals of the template processing. These are *not* examples to be copied in user code. """ from __future__ import unicode_literals from unittest import TestCase from django.template import Library, TemplateSyntaxError from django.template.base import ( TOKEN_BLOCK, FilterExpression, Parser, To...
bsd-3-clause
MrSurly/micropython
tests/pyb/i2c_error.py
14
1210
# test I2C errors, with polling (disabled irqs) and DMA import pyb from pyb import I2C if not hasattr(pyb, "Accel"): print("SKIP") raise SystemExit # init accelerometer pyb.Accel() # get I2C bus i2c = I2C(1, I2C.MASTER, dma=True) # test polling mem_read pyb.disable_irq() i2c.mem_read(1, 76, 0x0A) # should...
mit
unreal666/outwiker
plugins/diagrammer/diagrammer/libs/blockdiag/imagedraw/utils/ellipse.py
3
1857
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # 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...
gpl-3.0
sergiocorato/odoomrp-wip
purchase_order_last_prices/__openerp__.py
27
1324
# -*- encoding: utf-8 -*- ############################################################################## # # This program 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 th...
agpl-3.0
jasonseminara/OpenSourceFinal
myvenv/lib/python3.5/site-packages/django/template/loaders/eggs.py
302
2378
# Wrapper for loading templates from eggs via pkg_resources.resource_string. from __future__ import unicode_literals import warnings from django.apps import apps from django.template import Origin, TemplateDoesNotExist from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from .b...
mit
zack3241/incubator-airflow
tests/contrib/operators/test_jenkins_operator.py
2
6232
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
etkirsch/pyna-colada
pyna/core/Manager.py
1
1512
import hashlib, json, os from pyna.base.Settings import Settings from pyna.core.Packager import Packager from pyna.core.NodeList import NodeList from pyna.ui.PynaDisplay import PynaDisplay class Manager(Settings): ''' Manages all things related to other nodes and configuration settings ''' def __init__(self, alia...
gpl-2.0
cooniur/ansible-modules-core
network/cumulus/cl_interface_policy.py
19
5117
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.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...
gpl-3.0
kparal/anaconda
pyanaconda/localization.py
1
23995
# Localization classes and functions # # Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program i...
gpl-2.0
skyportsystems/vitess
py/vtdb/vtgatev3.py
5
10457
# Copyright 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. from itertools import izip import logging import re from net import bsonrpc from net import gorpc from vtdb import cursorv3 from vtdb import dbexceptions from vtdb im...
bsd-3-clause
allenxwang/kafka
system_test/utils/metrics.py
28
13903
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
tequa/ammisoft
ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/lib2to3/fixes/fix_intern.py
12
1866
# Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from .. import pytree from .. import fixer_base from ..fixer_util import Name, Attr, touch_import class FixIntern(fixer_base.BaseFix): BM_compatible = True or...
bsd-3-clause
ashemedai/ansible
lib/ansible/modules/cloud/ovirt/ovirt_affinity_labels_facts.py
26
5349
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0