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
cryptoprojects/ultimateonlinecash
test/functional/test_framework/coverage.py
2
3383
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Utilities for doing coverage analysis on the RPC interface. Provides a way to track which RPC commands...
mit
savi-dev/quantum
quantum/plugins/ryu/db/models.py
3
1401
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Isaku Yamahata <yamahata at private email ne jp> # 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 #...
apache-2.0
betoesquivel/fil2014
build/django/tests/csrf_tests/tests.py
55
15265
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.conf import settings from django.core.context_processors import csrf from django.http import HttpRequest, HttpResponse from django.middleware.csrf import CsrfViewMiddleware, CSRF_KEY_LENGTH from django.template import RequestCon...
mit
jhawkesworth/ansible
test/units/modules/source_control/test_bitbucket_pipeline_key_pair.py
37
8552
from ansible.module_utils.source_control.bitbucket import BitbucketHelper from ansible.modules.source_control.bitbucket import bitbucket_pipeline_key_pair from units.compat import unittest from units.compat.mock import patch from units.modules.utils import AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_ar...
gpl-3.0
afrolov1/nova
nova/tests/api/openstack/compute/contrib/test_baremetal_nodes.py
22
14672
# Copyright (c) 2013 NTT DOCOMO, 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 requ...
apache-2.0
snakeleon/YouCompleteMe-x64
third_party/ycmd/third_party/jedi_deps/parso/parso/pgen2/generator.py
2
14570
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright David Halter and Contributors # Modifications are dual-licensed: MIT and PSF. """ This module defines the data structures used to represent a grammar. Specifying grammars ...
gpl-3.0
jlongstaf/f5-openstack-lbaasv2-driver
f5lbaasdriver/v2/bigip/constants_v2.py
3
1072
# coding=utf-8 u"""Constants for F5® LBaaSv2 Driver.""" # coding=utf-8 # Copyright 2016 F5 Networks 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/...
apache-2.0
3dfxmadscientist/odoo_vi
setup/win32/OpenERPServerService.py
105
3328
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
3dfxmadscientist/odoo_vi
addons/account_payment/report/payment_order.py
378
2974
# -*- 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
CompassionCH/compassion-switzerland
mass_mailing_switzerland/migrations/10.0.2.0.1/pre-migration.py
3
1543
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
agpl-3.0
iotaledger/iota.lib.py
iota/transaction/validator.py
1
9563
from typing import Generator, List, Optional, Type from iota.crypto.kerl import Kerl from iota.crypto.signing import validate_signature_fragments from iota.transaction.base import Bundle, Transaction __all__ = [ 'BundleValidator', ] # In very rare cases, the IOTA protocol may switch hash algorithms. # When this ...
mit
mdanielwork/intellij-community
python/helpers/py3only/docutils/frontend.py
44
35209
# $Id: frontend.py 7584 2013-01-01 20:00:21Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Command-line and common processing for Docutils front-end tools. Exports the following classes: * `OptionParser`: Standard Docutils command-line process...
apache-2.0
tchernomax/ansible
lib/ansible/plugins/connection/__init__.py
14
15940
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017, Peter Sprygada <psprygad@redhat.com> # (c) 2017 Ansible Project from __future__ import (absolute_import, division, print_function) __metaclass__ = type import fcntl import gettext import os import ...
gpl-3.0
rpdillon/wikid
wikid/web/test.py
118
1393
"""test utilities (part of web.py) """ import unittest import sys, os import web TestCase = unittest.TestCase TestSuite = unittest.TestSuite def load_modules(names): return [__import__(name, None, None, "x") for name in names] def module_suite(module, classnames=None): """Makes a suite from a module.""" ...
gpl-3.0
mkaluza/external_chromium_org
chrome/common/extensions/docs/server2/persistent_object_store_test.py
117
1737
#!/usr/bin/env python # Copyright 2013 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. from persistent_object_store import PersistentObjectStore import unittest class PersistentObjectStoreTest(unittest.TestCase): '''Tes...
bsd-3-clause
swapnakrishnan2k/tp-qemu
qemu/tests/usb_storage.py
5
8978
import logging import re import uuid import aexpect from autotest.client.shared import error from virttest import utils_test, utils_misc @error.context_aware def run(test, params, env): """ Test usb storage devices in the guest. 1) Create a image file by qemu-img 2) Boot up a guest add this image ...
gpl-2.0
jonnatas/codeschool
old/cs_activities/migrations/old/0011_auto_20160531_2054.py
2
2774
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-31 23:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('c...
gpl-3.0
rememerme/games-api
rememerme/games/rest/rounds/forms.py
2
8654
''' This file holds all of the forms for the cleaning and validation of the parameters being used for friend requests received. Created on Dec 20, 2013 @author: Andrew Oberlin, Jake Gregg ''' from django import forms from rememerme.games.models import Game, Round, GameMember, Nomination from remem...
apache-2.0
maxalbert/bokeh
scripts/version_update.py
42
1687
import os import re import sys def check_input(new_ver): """ Ensure that user input matches the format X.X.X """ pat = r'\d+.\d+.\d+' if not re.match(pat, new_ver): print("The new version must be in the format X.X.X (ex. '0.6.0')") return True def version_update(new_ver, file_array): ...
bsd-3-clause
TimYi/django
django/contrib/auth/tokens.py
433
2803
from datetime import date from django.conf import settings from django.utils import six from django.utils.crypto import constant_time_compare, salted_hmac from django.utils.http import base36_to_int, int_to_base36 class PasswordResetTokenGenerator(object): """ Strategy object used to generate and check token...
bsd-3-clause
netortik/yandex-tank
yandextank/plugins/Pandora/tests/test_pandora_plugin.py
2
1056
import pytest from mock import MagicMock from yandextank.plugins.Pandora import Plugin @pytest.mark.parametrize('cfg, expected', [ ( {'pools': [ { 'ammo': {'uri-headers': '[User-Agent: Wget/1.13.4 (linux-gnu)] [Host: foo.ru] [Accept-Encoding: gzip,deflate,sdch]', ...
lgpl-2.1
alobbs/ansible
v1/ansible/module_utils/gce.py
305
4179
# 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...
gpl-3.0
nilbody/h2o-3
h2o-py/tests/testdir_golden/pyunit_svd_1_golden.py
1
2402
from __future__ import print_function from builtins import zip import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def svd_1_golden(): print("Importing USArrests.csv data...") arrestsH2O = h2o.upload_file(pyunit_utils.locate("smalldata/pca_test/USArrests.csv")) print("Co...
apache-2.0
sophacles/invoke
tests/runner.py
1
8258
import sys import os from spec import eq_, skip, Spec, raises, ok_, trap from invoke.runner import Runner, run from invoke.exceptions import Failure from _utils import support, reset_cwd def _run(returns=None, **kwargs): """ Create a Runner w/ retval reflecting ``returns`` & call ``run(**kwargs)``. """...
bsd-2-clause
ArtsiomCh/tensorflow
tensorflow/contrib/receptive_field/python/util/graph_compute_order.py
25
2454
# 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
Hybrid-Cloud/conveyor
conveyor/conveyorheat/common/service_utils.py
15
2011
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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
hpe-storage/python-lefthandclient
hpelefthandclient/http.py
2
13485
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # (c) Copyright 2013-2015 Hewlett Packard Enterprise Development LP # 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 ...
apache-2.0
sergiocorato/odoomrp-wip
mrp_bom_component_change/models/mrp_bom_change.py
7
3325
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api, exceptions, _ from...
agpl-3.0
coreymcdermott/artbot
artbot_scraper/spiders/arthouse_spider.py
1
2106
# -*- coding: utf-8 -*- import re from scrapy import Spider, Request from dateutil import parser from artbot_scraper.items import EventItem from pytz import timezone class ArthouseSpider(Spider): name = 'Arthouse Gallery' allowed_domains = ['www.arthousegal...
mit
mmb90/dftintegrate
dftintegrate/fourier/readdata.py
1
5536
""" Classes:: ReadData -- A collection of functions to collect extracted VASP/QE data into a json file. """ import json from copy import deepcopy from ast import literal_eval from collections import defaultdict class ReadData(object): """ A collection of functions to collect extracted VASP/QE data ...
mit
aularon/meld
meld/ui/vcdialogs.py
4
5155
# Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org> # Copyright (C) 2010-2013 Kai Willadsen <kai.willadsen@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 ...
gpl-2.0
kongseokhwan/kulcloud-iitp-neutron
neutron/db/migration/models/frozen.py
26
72356
# Copyright (c) 2014 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...
apache-2.0
rossgoodwin/drgonzo
en/parser/nltk_lite/tag/brill.py
9
47684
# Natural Language Toolkit: Brill Tagger # # Copyright (C) 2001-2006 University of Pennsylvania # Authors: Christopher Maloof <cjmaloof@gradient.cis.upenn.edu> # Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license information, ...
mit
komarudin02/Public
node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
1558
4945
# Copyright (c) 2011 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. import re import os def XmlToString(content, encoding='utf-8', pretty=False): """ Writes the XML content to disk, touching the file only if it has changed. ...
mit
nkmk/python-snippets
notebook/pypdf2_metadata_remove.py
1
4178
import PyPDF2 src_pdf = PyPDF2.PdfFileReader('data/src/pdf/sample1.pdf') dst_pdf = PyPDF2.PdfFileWriter() dst_pdf.cloneReaderDocumentRoot(src_pdf) with open('data/temp/sample1_no_meta.pdf', 'wb') as f: dst_pdf.write(f) print(PyPDF2.PdfFileReader('data/temp/sample1_no_meta.pdf').documentInfo) # {'/Producer': 'Py...
mit
KaranToor/MA450
google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/ml/predict_utilities.py
3
3913
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
mozilla/stoneridge
python/src/Lib/lib2to3/fixes/fix_has_key.py
326
3227
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for has_key(). Calls to .has_key() methods are expressed in terms of the 'in' operator: d.has_key(k) -> k in d CAVEATS: 1) While the primary target of this fixer is dict.has_key(), the fixer will chan...
mpl-2.0
endlessm/chromium-browser
third_party/catapult/telemetry/telemetry/internal/actions/scroll_unittest.py
1
11759
# Copyright 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. from telemetry import decorators from telemetry.internal.actions import page_action from telemetry.internal.actions import scroll from telemetry.internal.act...
bsd-3-clause
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/payments_account_service/client.py
1
18740
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
feureau/Small-Scripts
Blender/Blender config/2.91/scripts/addons/bricker_v2-2-1/lib/property_groups/created_model_properties.py
1
35831
# Copyright (C) 2020 Christopher Gearhart # chris@bblanimation.com # http://bblanimation.com/ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
gpl-3.0
xclxxl414/rqalpha
rqalpha/__main__.py
1
14210
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
apache-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4.3/Lib/encodings/__init__.py
14
4817
""" Standard "encodings" Package Standard Python encoding modules are stored in this package directory. Codec modules must have names corresponding to normalized encoding names as defined in the normalize_encoding() function below, e.g. 'utf-8' must be implemented by the module 'utf_8.py'. Ea...
mit
edx-solutions/edx-platform
openedx/core/djangoapps/oauth_dispatch/tests/mixins.py
4
3663
""" OAuth Dispatch test mixins """ import jwt from django.conf import settings from jwkest.jwk import KEYS from jwkest.jws import JWS from jwt.exceptions import ExpiredSignatureError from student.models import UserProfile, anonymous_id_for_user class AccessTokenMixin(object): """ Mixin for tests dealing with O...
agpl-3.0
makinacorpus/odoo
addons/website_membership/models/product.py
338
1264
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
samedder/azure-cli
src/command_modules/azure-cli-billing/setup.py
2
1983
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
mit
NoelMacwan/SXDNickiCM11-OLD
scripts/gcc-wrapper.py
364
3936
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. 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 th...
gpl-2.0
PaulStoffregen/Arduino-1.6.0-Teensyduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/sbcharsetprober.py
2927
4793
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
lgpl-2.1
xfournet/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geometry/test_data.py
364
2994
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import gzip import os from django.contrib import gis from django.utils import simplejson # This global used to store reference geometry data. GEOMETRIES = None # Path where reference test data is located...
apache-2.0
kim135797531/opencog-python-blending
opencog_b/python/blending/util/blending_util.py
1
1884
# coding=utf-8 __author__ = 'DongMin Kim' from opencog.type_constructors import * # Choose atoms which are connected to specific atom. def get_incoming_nodes(a, target): ret = [] xget_target_link = a.xget_atoms_by_target_atom(types.Link, target) for link in xget_target_link: xget_target_link_no...
agpl-3.0
emon10005/sympy
sympy/plotting/pygletplot/plot.py
84
13256
from __future__ import print_function, division from sympy import Integer from sympy.core.compatibility import is_sequence from threading import RLock # it is sufficient to import "pyglet" here once try: from pyglet.gl import * except ImportError: raise ImportError("pyglet is required for plotting.\n " ...
bsd-3-clause
scorpionis/docklet
client/venv/lib/python3.5/site-packages/pip/vcs/__init__.py
170
12349
"""Handles all VCS (version control) support""" from __future__ import absolute_import import errno import logging import os import shutil from pip._vendor.six.moves.urllib import parse as urllib_parse from pip.exceptions import BadCommand from pip.utils import (display_path, backup_dir, call_subprocess, ...
bsd-3-clause
elysium001/zamboni
sites/s3dev/settings_base.py
1
5495
"""private_base will be populated from puppet and placed in this directory""" import logging import os import dj_database_url from mkt.settings import (CACHE_PREFIX, ES_INDEXES, KNOWN_PROXIES, LOGGING, HOSTNAME) from .. import splitstrip import private_base as private ALLOWED_HOSTS = ['.a...
bsd-3-clause
dagwieers/ansible
lib/ansible/modules/remote_management/oneview/oneview_ethernet_network_facts.py
125
4863
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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', ...
gpl-3.0
flyfei/python-for-android
python3-alpha/python3-src/Lib/test/test_pkgimport.py
57
2757
import os import sys import shutil import string import random import tempfile import unittest from imp import cache_from_source from test.support import run_unittest class TestImport(unittest.TestCase): def __init__(self, *args, **kw): self.package_name = 'PACKAGE_' while self.package_name in sy...
apache-2.0
slozier/ironpython2
Tests/modules/misc/test__sha512.py
2
2728
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. ''' This tests what CPythons test_sha.py does not hit. ''' import _sha512 import unittest from iptest import i...
apache-2.0
bbuchalter/python_koans
python2/koans/about_modules.py
1
2488
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This is very different to AboutModules in Ruby Koans # Our AboutMultipleInheritance class is a little more comparable # from runner.koan import * from another_local_module import * from local_module_with_all_defined import * class AboutModules(Koan): def test_i...
mit
DepthDeluxe/ansible
lib/ansible/plugins/action/add_host.py
27
3142
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2012, Seth Vidal <skvidal@fedoraproject.org> # # 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, ...
gpl-3.0
omnirom/android_external_chromium-org
tools/telemetry/telemetry/timeline/inspector_importer.py
33
2907
# 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. '''Imports event data obtained from the inspector's timeline.''' import telemetry.timeline.slice as tracing_slice import telemetry.timeline.thread as timelin...
bsd-3-clause
HunanTV/redis-ctl
test/http.py
1
10950
import json import redistrib.command as comm import base from models.base import db from models.proxy import Proxy from models.cluster import Cluster import models.task class HttpRequest(base.TestCase): def test_http(self): with self.app.test_client() as client: self.assertEqual({'nodes': [],...
mit
tima/ansible
lib/ansible/modules/cloud/vmware/vmware_host_ntp.py
11
7785
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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 = { 'metadata...
gpl-3.0
ptoraskar/django
tests/migrate_signals/tests.py
324
3585
from django.apps import apps from django.core import management from django.db.models import signals from django.test import TestCase, override_settings from django.utils import six APP_CONFIG = apps.get_app_config('migrate_signals') PRE_MIGRATE_ARGS = ['app_config', 'verbosity', 'interactive', 'using'] MIGRATE_DATABA...
bsd-3-clause
sv-dev1/odoo
addons/auth_oauth/res_users.py
121
5240
import logging import werkzeug.urls import urlparse import urllib2 import simplejson import openerp from openerp.addons.auth_signup.res_users import SignupError from openerp.osv import osv, fields from openerp import SUPERUSER_ID _logger = logging.getLogger(__name__) class res_users(osv.Model): _inherit = 'res....
agpl-3.0
cysnake4713/server-tools
fetchmail_attach_from_folder/model/fetchmail_server_folder.py
16
4394
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>) # All Rights Reserved # # This program is free software: you can redistribute it and/or modify #...
agpl-3.0
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_conditional_block.py
2
3123
# Copyright (c) 2018 PaddlePaddle 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 app...
apache-2.0
riga/luigi
luigi/server.py
4
13958
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
apache-2.0
genenetwork/genenetwork2
wqflask/tests/unit/wqflask/correlation/test_correlation_functions.py
3
1026
import unittest from unittest import mock from wqflask.correlation.correlation_functions import get_trait_symbol_and_tissue_values from wqflask.correlation.correlation_functions import cal_zero_order_corr_for_tiss class TestCorrelationFunctions(unittest.TestCase): @mock.patch("wqflask.correlation.correlation_fun...
agpl-3.0
Zelgadis87/Sick-Beard
lib/requests/packages/chardet2/escprober.py
52
3094
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
gpl-3.0
hkariti/ansible
test/integration/targets/vault/password-script.py
64
1024
#!/usr/bin/env python # # 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 it will b...
gpl-3.0
MrKepzie/google-test
scripts/fuse_gtest_files.py
2577
8813
#!/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...
bsd-3-clause
zhukaixy/kbengine
kbe/src/lib/python/Lib/turtledemo/forest.py
85
2950
#!/usr/bin/env python3 """ turtlegraphics-example-suite: tdemo_forest.py Displays a 'forest' of 3 breadth-first-trees similar to the one in tree. For further remarks see tree.py This example is a 'breadth-first'-rewrite of a Logo program written by Erich Neuwirth. See http://homepage.univie.ac.at/er...
lgpl-3.0
agateau/yokadi
yokadi/tests/yokadioptionparsertestcase.py
2
1160
# -*- coding: UTF-8 -*- """ Yokadi parser test cases @author: Aurélien Gâteau <mail@agateau.com> @license: GPL v3 or later """ import unittest from yokadi.core.yokadioptionparser import YokadiOptionParser from yokadi.core.yokadiexception import YokadiException class YokadiOptionParserTestCase(unittest.TestCase): ...
gpl-3.0
Maspear/odoo
addons/hr_payroll/wizard/__init__.py
442
1159
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
agpl-3.0
dermoth/gramps
docs/update_doc.py
10
3491
#! /usr/bin/env python3 # # update_po - a gramps tool to update translations # # Copyright (C) 2006-2006 Kees Bakker # Copyright (C) 2006 Brian Matherly # Copyright (C) 2008 Stephen George # Copyright (C) 2012 # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
gpl-2.0
gotchazipc/webida-server
src/ext/cordova-weinre/weinre.build/scripts/build-target-scripts.py
7
5339
#!/usr/bin/env python # --- # 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 (th...
apache-2.0
lablup/backend.ai-manager
src/ai/backend/manager/models/alembic/versions/26d0c387e764_create_vfolder_invitations_table.py
2
1284
"""create vfolder_invitations table Revision ID: 26d0c387e764 Revises: f8a71c3bffa2 Create Date: 2018-07-04 14:57:46.517587 """ from alembic import op import sqlalchemy as sa from ai.backend.manager.models.base import GUID # revision identifiers, used by Alembic. revision = '26d0c387e764' down_revision = 'f8a71c3bf...
lgpl-3.0
dagargo/phatty
phatty/editor.py
1
32769
# -*- coding: utf-8 -*- # # Copyright 2017 David García Goñi # # This file is part of Phatty. # # Phatty 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) a...
gpl-3.0
lekum/ansible
lib/ansible/galaxy/api.py
82
5143
#!/usr/bin/env python ######################################################################## # # (C) 2013, James Cammarata <jcammarata@ansible.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 ...
gpl-3.0
gunan/tensorflow
tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/exported_python_args.py
18
1478
# Copyright 2019 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
rackerlabs/qonos
qonos/openstack/common/rpc/dispatcher.py
1
5310
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 # #...
apache-2.0
Balaji2198/coala
tests/bearlib/aspects/CollectionsTest.py
10
1481
import pytest from coalib.bearlib.aspects import aspectTypeError from coalib.bearlib.aspects.collections import aspectlist from coalib.bearlib.aspects.meta import isaspect from coalib.bearlib.aspects.Metadata import Metadata class aspectlistTest: def test__init__(self): with pytest.raises(aspectTypeErro...
agpl-3.0
vincentrosso/xhtml2pdf
ez_setup.py
61
9429
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
apache-2.0
Panos-Bletsos/spark-cost-model-optimizer
python/pyspark/statcounter.py
130
5115
# # 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 us...
apache-2.0
yared-bezum/tweepy
tests/config.py
44
1093
import os import vcr from tweepy.auth import OAuthHandler from tweepy.api import API import six if six.PY3: import unittest else: import unittest2 as unittest username = os.environ.get('TWITTER_USERNAME', 'tweepytest') oauth_consumer_key = os.environ.get('CONSUMER_KEY', '') oauth_consumer_secret = os.enviro...
mit
Russell-IO/ansible
test/units/plugins/action/test_raw.py
44
3774
# (c) 2016, Saran Ahluwalia <ahlusar.ahluwalia@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
gpl-3.0
jimka2001/MuseScore
thirdparty/freetype/src/tools/docmaker/utils.py
153
3513
# # utils.py # # Auxiliary functions for the `docmaker' tool (library file). # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing to use, modify,...
gpl-2.0
AlertaDengue/InfoDenguePredict
infodenguepredict/predict.py
2
2129
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is predict script. Running it returns the prediction using the selected model To run this script uncomment the following line in the entry_points section in setup.cfg: console_scripts = predict = infodenguepredict.predict:run """ import argparse impo...
gpl-3.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.2/Lib/xml/sax/xmlreader.py
136
12580
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ import handler from _exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReader is the...
mit
ryfeus/lambda-packs
Tensorflow/source/tensorflow/python/ops/gen_linalg_ops.py
2
56706
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. Original C++ source file: linalg_ops.cc """ import collections as _collections from tensorflow.python.eager import execute as _execute from tensorflow.python.eager import context as _context from tensorflow.python.eager import cor...
mit
gangadharkadam/shfr
frappe/test_runner.py
23
7048
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import unittest, json import importlib from frappe.modules import load_doctype_module, get_module_name from frappe.utils import cstr def main(app=None, module=...
mit
Dronecode/MAVProxy
MAVProxy/modules/mavproxy_timesync.py
6
1119
#!/usr/bin/env python from __future__ import print_function """ Currently what I do is run a sync every second and keep the following: time_send time_receive As a result the delta between GCS time and drone time is: dtime = (time_send + time_receive) / 2 - drone_time; And when doing that a lot the dtime will averag...
gpl-3.0
pforai/easybuild-framework
test/framework/sandbox/easybuild/easyblocks/generic/dummyextension.py
9
1375
## # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
gpl-2.0
dafrito/trac-mirror
trac/about.py
7
3145
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2009 Edgewall Software # Copyright (C) 2004-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2004-2005 Daniel Lundin <daniel@edgewall.com> # Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described ...
bsd-3-clause
yonglehou/spiderfoot
ext/dns/rdataset.py
91
11548
# Copyright (C) 2001-2007, 2009-2011 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 "...
gpl-2.0
Mirantis/disk_perf_test_tool
wally/test_run_class.py
1
1980
from typing import List, Callable, Any, Dict, Optional, Set from concurrent.futures import ThreadPoolExecutor from cephlib.istorage import IStorage from cephlib.node import NodeInfo, IRPCNode from cephlib.ssh import ConnCreds from cephlib.storage_selectors import DevRolesConfig from .openstack_api import OSCreds, OSC...
apache-2.0
jessicalucci/NovaOrc
nova/openstack/common/plugin/callbackplugin.py
6
3401
# Copyright 2012 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 requ...
apache-2.0
XertroV/bitcoin-python3
src/bitcoinrpc/data.py
9
5184
# Copyright (c) 2010 Witchspace <witchspace81@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 limitation the rights # to use, copy, modify,...
mit
purpleidea/macaronic-net
django/contrib/flatpages/admin.py
250
1089
from django import forms from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text = _("Example: ...
agpl-3.0
MSeifert04/astropy
astropy/units/quantity_helper/function_helpers.py
3
35300
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license. See LICENSE.rst except # for parts explicitly labelled as being (largely) copies of numpy # implementations; for those, see licenses/NUMPY_LICENSE.rst. """Helpers for overriding numpy functions. We override numpy functions in `~astropy.units.Quanti...
bsd-3-clause
xflin/spark
examples/src/main/python/ml/onehot_encoder_example.py
72
1605
# # 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 us...
apache-2.0
trudikampfschaf/flask-microblog
flask/lib/python2.7/site-packages/jinja2/utils.py
598
16165
# -*- coding: utf-8 -*- """ jinja2.utils ~~~~~~~~~~~~ Utility functions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import errno from collections import deque from jinja2._compat import text_type, string_types, implements_iterator, \ all...
bsd-3-clause