repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
vnsofthe/odoo-dev
addons/web_linkedin/web_linkedin.py
333
4485
# -*- 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
habibiefaried/ryu
ryu/contrib/tinyrpc/protocols/jsonrpc.py
41
8589
#!/usr/bin/env python # -*- coding: utf-8 -*- from .. import RPCBatchProtocol, RPCRequest, RPCResponse, RPCErrorResponse,\ InvalidRequestError, MethodNotFoundError, ServerError,\ InvalidReplyError, RPCError, RPCBatchRequest, RPCBatchResponse import json class FixedErrorMessageMixin(obje...
apache-2.0
YAJATapps/FlickLauncher
fill_screens.py
17
2574
#!/usr/bin/env python2.5 import cgi import os import shutil import sys import sqlite3 SCREENS = 5 COLUMNS = 4 ROWS = 4 CELL_SIZE = 110 DIR = "db_files" AUTO_FILE = "launcher.db" APPLICATION_COMPONENTS = [ "com.android.calculator2/com.android.calculator2.Calculator", "com.android.providers.downloads.ui/com.andro...
apache-2.0
arunsingh/selenium
py/selenium/webdriver/common/desired_capabilities.py
54
3499
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
def-/commandergenius
project/jni/python/src/Lib/sqlite3/test/factory.py
51
7928
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/factory.py: tests for the various factories in pysqlite # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liab...
lgpl-2.1
kanagasabapathi/python-for-android
python3-alpha/python3-src/Lib/lib2to3/fixes/fix_apply.py
161
1901
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for apply(). This converts apply(func, v, k) into (func)(*v, **k).""" # Local imports from .. import pytree from ..pgen2 import token from .. import fixer_base from ..fixer_util import Call, Comma, parenthesi...
apache-2.0
ashishnitinpatil/dotawp_crawler
DotaWp/spiders/dotawp.py
1
1275
# This is the scrapy spider that is run. # The parse_item method of the DotawpSpider extracts the image data # from the site's pages which are then downloaded & stored by ImagePipeline from scrapy.selector import Selector from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.contrib.spiders impo...
bsd-3-clause
resmo/ansible
lib/ansible/module_utils/network/ios/argspec/lacp/lacp.py
21
1284
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is auto generated by ...
gpl-3.0
jettisonjoe/openhtf
openhtf/output/callbacks/mfg_inspector.py
1
8230
"""Output and/or upload a TestRun or MfgEvent proto for mfg-inspector.com. """ import json import logging import threading import time import zlib import httplib2 import oauth2client.client from openhtf.output import callbacks from openhtf.output.proto import test_runs_converter from openhtf.output.proto import guz...
apache-2.0
defionscode/ansible
test/units/plugins/lookup/test_aws_ssm.py
40
6486
# # (c) 2017 Michael De La Rue # # 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...
gpl-3.0
minhphung171093/OpenERP_V7
openerp/addons/point_of_sale/wizard/pos_box_entries.py
54
6577
# -*- 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
laborautonomo/pip
pip/_vendor/cachecontrol/serialize.py
24
3151
import io from pip._vendor.requests.structures import CaseInsensitiveDict from .compat import HTTPResponse, pickle class Serializer(object): def dumps(self, request, response, body=None): response_headers = CaseInsensitiveDict(response.headers) if body is None: body = response.read...
mit
fausecteam/ctf-gameserver
examples/checker/example_checker.py
1
2527
#!/usr/bin/env python3 import logging import socket from ctf_gameserver import checkerlib class ExampleChecker(checkerlib.BaseChecker): def place_flag(self, tick): conn = connect(self.ip) flag = checkerlib.get_flag(tick) conn.sendall('SET {} {}\n'.format(tick, flag).encode('utf-8')) ...
isc
barnone/EigenD
pigui/mathutils.py
3
2709
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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
pdellaert/ansible
lib/ansible/modules/network/aci/aci_l3out.py
13
11042
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
michaelbramwell/sms-tools
lectures/03-Fourier-properties/plots-code/fft-zero-phase.py
24
1140
import matplotlib.pyplot as plt import numpy as np from scipy.fftpack import fft, fftshift import sys sys.path.append('../../../software/models/') import utilFunctions as UF (fs, x) = UF.wavread('../../../sounds/oboe-A4.wav') N = 512 M = 401 hN = N/2 hM = (M+1)/2 start = .8*fs xw = x[start-hM:start+hM-1] * np.h...
agpl-3.0
ThinkOpen-Solutions/odoo
addons/bus/bus.py
325
7324
# -*- coding: utf-8 -*- import datetime import json import logging import select import threading import time import random import simplejson import openerp from openerp.osv import osv, fields from openerp.http import request from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT _logger = logging.getLogger(__...
agpl-3.0
MinimalOS/android_kernel_moto_shamu
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
klusark/android_external_chromium_org
third_party/re2/re2/make_unicode_casefold.py
218
3591
#!/usr/bin/python # coding=utf-8 # # Copyright 2008 The RE2 Authors. All Rights Reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # See unicode_casefold.h for description of case folding tables. """Generate C++ table for Unicode case folding.""" import u...
bsd-3-clause
linked67/p2pool-leaguecoin
p2pool/util/expiring_dict.py
237
5233
from __future__ import division import time import weakref from p2pool.util import deferral class Node(object): def __init__(self, contents, prev=None, next=None): self.contents, self.prev, self.next = contents, prev, next def insert_before(self, contents): self.prev.next = self.prev = n...
gpl-3.0
zachmullen/boto
tests/integration/ec2/test_connection.py
100
9106
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2009, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without res...
mit
khkaminska/djangoproject.com
aggregator/migrations/0001_initial.py
9
2609
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
bsd-3-clause
How2Compute/SmartHome
cli/py3env/lib/python3.4/site-packages/requests/models.py
59
33067
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime import sys # Import encoding now, to avoid implicit import later. # Implicit import within threads may cause LookupError when standard library is in a ZIP,...
mit
kwyoung11/ciml
labs/lab2-KNN/HighD.py
4
1526
from math import * import random from numpy import * import matplotlib.pyplot as plt waitForEnter=False def generateUniformExample(numDim): return [random.random() for d in range(numDim)] def generateUniformDataset(numDim, numEx): return [generateUniformExample(numDim) for n in range(numEx)] def computeExam...
gpl-2.0
jounex/hue
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/xforms.py
96
1231
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library 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 2.1 of the License, or (at you...
apache-2.0
tdudz/elements
contrib/zmq/zmq_sub.py
38
1411
#!/usr/bin/env python2 # Copyright (c) 2014-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. import binascii import zmq import struct port = 28332 zmqContext = zmq.Context() zmqSubSocket = zmqCont...
mit
leiferikb/bitpop-private
chrome/common/extensions/docs/examples/apps/hello-python/oauth2/__init__.py
257
25629
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
bsd-3-clause
tanium/pytan
lib/taniumpy/object_types/action.py
1
2109
# Copyright (c) 2015 Tanium Inc # # Generated from console.wsdl version 0.0.1 # # from .base import BaseType class Action(BaseType): _soap_tag = 'action' def __init__(self): BaseType.__init__( self, simple_properties={'id': int, 'name': str, ...
mit
Ziyann/android_kernel_samsung_espresso
tools/perf/python/twatch.py
3213
1338
#! /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
dermoth/gramps
gramps/gen/lib/place.py
6
20184
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2010 Michiel D. Nauta # Copyright (C) 2011 Tim G L Lyons # Copyright (C) 2013 Doug Blank <doug.blank@gmail.com> # Copyright (C) 2017 Nick Hall # # This program is free software; you...
gpl-2.0
yfried/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_template.py
10
10722
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.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_version': '1.1...
gpl-3.0
ppanczyk/ansible
lib/ansible/modules/cloud/misc/virt_pool.py
29
21829
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Maciej Delmanowski <drybjed@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 = {'metadata_version': '1.1...
gpl-3.0
Azure/azure-sdk-for-python
sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client.py
1
14323
# 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. # --------------------------------------------------------------------...
mit
fursund/EmguCV-Unity
opencv/samples/swig_python/fitellipse.py
6
3716
#!/usr/bin/python """ This program is demonstration for ellipse fitting. Program finds contours and approximate it by ellipses. Trackbar specify threshold parametr. White lines is contours. Red lines is fitting ellipses. Original C implementation by: Denis Burenkov. Python implementation by: Roman Stanchak """ im...
gpl-3.0
morphis/home-assistant
homeassistant/components/automation/sun.py
6
1456
""" Offer sun based automation rules. For more details about this automation rule, please refer to the documentation at https://home-assistant.io/components/automation/#sun-trigger """ import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.core import callback from h...
apache-2.0
gautamMalu/rootfs_xen_arndale
usr/lib/python3.4/idlelib/IdleHistory.py
122
4052
"Implement Idle Shell history mechanism with History class" from idlelib.configHandler import idleConf class History: ''' Implement Idle Shell history mechanism. store - Store source statement (called from PyShell.resetoutput). fetch - Fetch stored statement matching prefix already entered. history_n...
gpl-2.0
arbenson/mrtsqr
dumbo/hyy-python-hadoop/build/lib/hadoop/typedbytes2/typedbytes2.py
4
10138
#!/usr/bin/env python # By Yangyang Hou, based on TypedBytes for python by Klaas Bosteels # Typed bytes types: BYTES = 0 BYTE = 1 BOOL = 2 INT = 3 LONG = 4 FLOAT = 5 DOUBLE = 6 STRING = 7 VECTOR = 8 LIST = 9 MAP = 10 # Application-specific types: PICKLE = 100 BYTESTRING = 101 # Low-level types: MARKER = 255 def cla...
bsd-2-clause
peap/django-debug-toolbar
tests/settings.py
2
1809
"""Django settings for tests.""" import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' INTERNAL_IPS = ['127.0.0.1'] LOGGING_CONFIG = None # avoids spurious output in tests # Applicatio...
bsd-3-clause
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/scipy/optimize/tests/test_tnc.py
110
11264
""" Unit tests for TNC optimization routine from tnc.py """ from numpy.testing import (assert_allclose, assert_equal, TestCase, run_module_suite) from scipy import optimize import numpy as np from math import pow class TestTnc(TestCase): """TNC non-linear optimization. These test...
agpl-3.0
guewen/OpenUpgrade
openerp/addons/base/tests/test_res_lang.py
384
2104
import unittest2 import openerp.tests.common as common class test_res_lang(common.TransactionCase): def test_00_intersperse(self): from openerp.addons.base.res.res_lang import intersperse assert intersperse("", []) == ("", 0) assert intersperse("0", []) == ("0", 0) assert intersp...
agpl-3.0
ilexius/odoo
addons/procurement_jit/__openerp__.py
24
1097
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Just In Time Scheduling', 'version': '1.0', 'category': 'Base', 'description': """ This module will automatically reserve the picking from stock when a sale order is confirmed ================...
gpl-3.0
moyogo/tachyfont
run_time/src/gae_server/third_party/closure-library/closure/bin/build/treescan.py
582
2203
#!/usr/bin/env python # # Copyright 2010 The Closure Library 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 ...
apache-2.0
flar2/ElementalX-m7-2.0
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
xuvw/viewfinder
backend/www/admin/admin.py
13
3707
# Copyright 2012 Viewfinder Inc. All Rights Reserved. """Handlers for viewfinder web application administration. AdminHandler: top-level admin handler """ __author__ = 'spencer@emailscrubbed.com (Spencer Kimball)' import httplib import logging import os import traceback from tornado import gen, web from viewfinde...
apache-2.0
PhilipDaniels/phi
google-test/test/gtest_list_tests_unittest.py
1898
6515
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
mit
sa2ajj/DistroTracker
pts/mail/tests/tests_control.py
1
90050
# -*- coding: utf-8 -*- # Copyright 2013 The Distro Tracker Developers # See the COPYRIGHT file at the top-level directory of this distribution and # at http://deb.li/DTAuthors # # This file is part of Distro Tracker. It is subject to the license terms # in the LICENSE file found in the top-level directory of this # d...
gpl-2.0
seanwestfall/django
tests/custom_columns/tests.py
207
4090
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six from .models import Article, Author class CustomColumnsTests(TestCase): def setUp(self): self.a1 = Author.objects.create(first_name="John", last_name="Smit...
bsd-3-clause
sidmitra/django_nonrel_testapp
django/core/management/commands/diffsettings.py
411
1296
from django.core.management.base import NoArgsCommand def module_to_dict(module, omittable=lambda k: k.startswith('_')): "Converts a module namespace to a Python dictionary. Used by get_settings_diff." return dict([(k, repr(v)) for k, v in module.__dict__.items() if not omittable(k)]) class Command(NoArgsComm...
bsd-3-clause
RudoCris/horizon
openstack_dashboard/dashboards/admin/instances/forms.py
40
3555
# Copyright 2013 Kylin OS, 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 agre...
apache-2.0
Azure/azure-sdk-for-python
sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_instructions_operations.py
1
12262
# 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
wberrier/meson
mesonbuild/modules/windows.py
2
3453
# Copyright 2015 The Meson development team # 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
Jgarcia-IAS/localizacion
openerp/addons-extra/odoo-pruebas/odoo-server/addons/project/wizard/project_task_delegate.py
195
6463
# -*- 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
laserson/ibis
ibis/__init__.py
2
3771
# Copyright 2014 Cloudera 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, so...
apache-2.0
pfnet/chainer
chainer/distributions/gamma.py
6
2914
import chainer from chainer.backends import cuda from chainer import distribution from chainer.functions.array import broadcast from chainer.functions.array import where from chainer.functions.math import digamma from chainer.functions.math import exponential from chainer.functions.math import lgamma from chainer.utils...
mit
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v2_0_0/script_broker.py
1
9418
from ..broker import Broker class ScriptBroker(Broker): controller = "scripts" def index(self, **kwargs): """Lists the available scripts. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most efficient. ...
apache-2.0
eino-makitalo/odoo
addons/sales_team/__init__.py
365
1081
# -*- 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
pjg101/SickRage
lib/future/backports/email/_parseaddr.py
82
17389
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ i...
gpl-3.0
oinopion/django
django/db/backends/oracle/compiler.py
407
2180
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def as_sql(self, with_limits=True, with_col_aliases=False, subquery=False): """ Creates the SQL for this query. Returns the SQL string and list of parameters. This is overridden from the original Query clas...
bsd-3-clause
ddr2108/CS4803-Android_Kenel_Projects
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
wreckJ/intellij-community
plugins/hg4idea/testData/bin/mercurial/bundlerepo.py
91
13705
# bundlerepo.py - repository class for viewing uncompressed bundles # # Copyright 2006, 2007 Benoit Boissinot <bboissin@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """Repository class for viewing uncompressed bundle...
apache-2.0
pasiegel/SickGear
lib/unidecode/x0d4.py
253
4758
data = ( 'poss', # 0x00 'pong', # 0x01 'poj', # 0x02 'poc', # 0x03 'pok', # 0x04 'pot', # 0x05 'pop', # 0x06 'poh', # 0x07 'pwa', # 0x08 'pwag', # 0x09 'pwagg', # 0x0a 'pwags', # 0x0b 'pwan', # 0x0c 'pwanj', # 0x0d 'pwanh', # 0x0e 'pwad', # 0x0f 'pwal', # 0x10 'pwalg',...
gpl-3.0
syscoin/syscoin2
test/functional/wallet_basic.py
1
27238
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet.""" from decimal import Decimal import time from test_framework.test_framework import ...
mit
kyvinh/home-assistant
homeassistant/components/image_processing/openalpr_local.py
3
5919
""" Component that will help set the openalpr local for alpr processing. For more details about this component, please refer to the documentation at https://home-assistant.io/components/image_processing.openalpr_local/ """ import asyncio import logging import io import re import voluptuous as vol from homeassistant....
apache-2.0
todaychi/hue
desktop/core/ext-py/navoptapi-0.1.0/versioneer.py
386
68611
# Version: 0.18 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy * [![Latest Version] ...
apache-2.0
tejesh95/Zubio.in
zubio/allauth/account/auth_backends.py
10
2211
from django.contrib.auth.backends import ModelBackend from django.db.models import Q from ..utils import get_user_model from .app_settings import AuthenticationMethod from . import app_settings class AuthenticationBackend(ModelBackend): def authenticate(self, **credentials): ret = None if app_s...
mit
xen0l/ansible
lib/ansible/modules/network/f5/bigip_routedomain.py
18
18324
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 F5 Networks 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', ...
gpl-3.0
SurfasJones/djcmsrc3
venv/lib/python2.7/site-packages/cms/plugin_pool.py
3
10688
# -*- coding: utf-8 -*- import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.conf.urls import url, patterns, include from django.contrib.formtools.wizard.views import normalize_name from django.db import connection from django.db.models import signals fro...
mit
cuongnv23/ansible
lib/ansible/utils/jsonrpc.py
49
3546
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
gpl-3.0
kingcc/shadowsocks
shadowsocks/crypto/salsa20_ctr.py
26
4894
#!/usr/bin/env python # Copyright (c) 2014 clowwindy # # 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, me...
mit
incaser/odoo-odoo
addons/multi_company/__openerp__.py
259
1620
# -*- 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
chrisndodge/edx-platform
common/lib/sandbox-packages/eia.py
193
4344
""" Standard resistor values. Commonly used for verifying electronic components in circuit classes are standard values, or conversely, for generating realistic component values in parameterized problems. For details, see: http://en.wikipedia.org/wiki/Electronic_color_code """ # pylint: disable=invalid-name # r is st...
agpl-3.0
gramps-project/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
ojengwa/oh-mainline
vendor/packages/Django/django/core/serializers/pyyaml.py
110
2353
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import decimal import yaml from io import StringIO from django.db import models from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer fr...
agpl-3.0
manderson23/NewsBlur
vendor/feedvalidator/validators.py
16
36588
"""$Id: validators.py 749 2007-04-02 15:45:49Z rubys $""" __author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>" __version__ = "$Revision: 749 $" __date__ = "$Date: 2007-04-02 15:45:49 +0000 (Mon, 02 Apr 2007) $" __copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim" fr...
mit
movicha/dcos
setup.py
1
2953
from setuptools import setup def get_advanced_templates(): template_base = 'aws/templates/advanced/' template_names = ['advanced-master', 'advanced-priv-agent', 'advanced-pub-agent', 'infra', 'zen'] return [template_base + name + '.json' for name in template_names] setup( name='dcos_image', ver...
apache-2.0
nickjacek/yum-cron
test/merge-history-transactions-tests.py
11
35064
import unittest import yum.history as hist _fake_count = 0 class FakeYumHistoryTransaction(hist.YumHistoryTransaction): def __init__(self, pkgs, tid=None, beg_timestamp=None, end_timestamp=None, beg_rpmdbversion=None, end_rpmdbversion=None, loginuid=0, return_code=0, pkgs_with=[]...
gpl-2.0
angelapper/odoo
addons/hr_payroll/wizard/hr_payroll_contribution_register_report.py
47
1128
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from datetime import datetime from dateutil import relativedelta from openerp.osv import fields, osv class payslip_lines_contribution_register(osv.osv_memory): _name = 'payslip.lines.contribution.regist...
agpl-3.0
jmchilton/pulsar
pulsar/client/path_mapper.py
2
4246
import os.path from .action_mapper import FileActionMapper from .action_mapper import path_type from .util import PathHelper from galaxy.util import in_directory class PathMapper(object): """ Ties together a FileActionMapper and remote job configuration returned by the Pulsar setup method to pre-determine th...
apache-2.0
rlutes/volttron-applications
nrel/agents/SunspecInverter/sunspecinverter/agent.py
2
4737
""" NREL This module controls a Sunspec Inverter. """ # !/usr/local/bin/python import sys import logging import time from datetime import datetime import xmltodict import requests from OpenSSL import crypto from helper import * from DER import DERProgramList,DERControlBase from TLS import Certificate_Mgmt from Devi...
bsd-3-clause
sneaker-rohit/PI2-ns-3
src/wave/bindings/callbacks_list.py
40
2502
callback_classes = [ ['void', 'ns3::Ptr<ns3::Packet>', 'ns3::WifiMacHeader const*', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::em...
gpl-2.0
softtyphoon/tz
tools/zl/11/query_proc.py
21
2217
 import urllib import urllib2 import cookielib import time import StringIO import gzip import sys import re import time import os import copy import zlib import random import urlparse from patent_query import patent_query class quey_proc(): def __init__(self, input_file='setting.csv', output_file=u'结果.csv'): ...
gpl-2.0
microelly2/cadquery-freecad-module
CadQuery/Libs/future/backports/urllib/request.py
78
96184
""" Ported using Python-Future from the Python 3.3 standard library. An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the...
lgpl-3.0
brkrishna/freelance
bolly_reviews/process_MZ.py
1
3684
#------------------------------------------------------------------------------- # Name: process_MZ # Purpose: # # Author: Ramakrishna # # Created: 17/04/2014 # Copyright: (c) Ramakrishna 2014 # Licence: <your licence> #------------------------------------------------------------------------------...
gpl-2.0
jawatech/emacs-24.5
js/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
2637
9586
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Make the format of a vcproj really pretty. This script normalize and sort an xml. It also fetches all the properties inside linked...
apache-2.0
Fillerix99/autokey
src/lib/gtkui/dialogs.py
47
22887
# -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # 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 pr...
gpl-3.0
indashnet/InDashNet.Open.UN2000
android/external/chromium_org/tools/perf/metrics/media.py
23
2314
# 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. import logging import os from metrics import Metric class MediaMetric(Metric): """MediaMetric class injects and calls JS responsible for recording metrics...
apache-2.0
reiaaoyama/exabgp
lib/exabgp/bgp/message/update/attribute/nexthop.py
2
1598
# encoding: utf-8 """ nexthop.py Created by Thomas Mangin on 2009-11-05. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from exabgp.protocol.family import AFI from exabgp.protocol.ip import IP from exabgp.protocol.ip import NoNextHop from exabgp.bgp.message.update.attribute.attribute import Attribute ...
bsd-3-clause
sameetb-cuelogic/edx-platform-test
common/djangoapps/student/tests/test_auto_auth.py
21
7470
from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User from django_comment_common.models import ( Role, FORUM_ROLE_ADMINISTRATOR, FORUM_ROLE_MODERATOR, FORUM_ROLE_STUDENT) from django_comment_common.utils import seed_permissions_roles from student.models i...
agpl-3.0
google/glazier
glazier/lib/bitlocker.py
1
2550
# python3 # 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...
apache-2.0
blueboxgroup/ansible
contrib/inventory/ssh_config.py
160
3979
#!/usr/bin/env python # (c) 2014, Tomas Karasek <tomas.karasek@digile.fi> # # 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 # (a...
gpl-3.0
MediaSapiens/autonormix
django/core/mail/backends/smtp.py
36
3655
"""SMTP email backend class.""" import smtplib import socket import threading from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.utils import DNS_NAME class EmailBackend(BaseEmailBackend): """ A wrapper that manages the SMTP network connection. ...
bsd-3-clause
talon-one/talon_one.py
test/test_saml_login_endpoint.py
1
2043
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
mit
chatcannon/scipy
scipy/weave/_dumb_shelve.py
100
1380
from __future__ import division, print_function, absolute_import from shelve import Shelf try: import zlib except ImportError: # Some python installations don't have zlib. pass import pickle class DbfilenameShelf(Shelf): """Shelf implementation using the "anydbm" generic dbm interface. This is ...
bsd-3-clause
ldts/zephyr
scripts/dts/extract/reg.py
1
4066
# # Copyright (c) 2018 Bobby Noelte # # SPDX-License-Identifier: Apache-2.0 # from copy import deepcopy from extract.globals import * from extract.directive import DTDirective ## # @brief Manage reg directive. # class DTReg(DTDirective): ## # @brief Extract reg directive info # # @param node_path Pat...
apache-2.0
CroissanceCommune/autonomie
autonomie/forms/tasks/invoice.py
1
22709
# -*- coding: utf-8 -*- # * Copyright (C) 2012-2013 Croissance Commune # * Authors: # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; # * Pettier Gabriel; # * TJEBBES Gaston <g.t@majerti.fr> # # This file is part of Autonomie : Progiciel de gestion de CAE. # # Autonomie is...
gpl-3.0
TheDegree0/menescraper
menescraper/menescraper/lib/python2.7/site-packages/setuptools/tests/test_packageindex.py
377
7625
"""Package Index Tests """ import sys import os import unittest import pkg_resources from setuptools.compat import urllib2, httplib, HTTPError, unicode, pathname2url import distutils.errors import setuptools.package_index from setuptools.tests.server import IndexServer class TestPackageIndex(unittest.TestCase): d...
gpl-2.0
18F/regulations-parser
tests/layer_section_by_section_tests.py
11
5436
from unittest import TestCase from regparser.layer.section_by_section import SectionBySection from regparser.tree.struct import Node class LayerSectionBySectionTest(TestCase): def test_process(self): notice1 = { "document_number": "111-22", "fr_volume": 22, "cfr_part"...
cc0-1.0
tmhorne/celtx
config/tests/unit-Expression.py
1
1718
import unittest import sys import os.path sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from Expression import Expression, Context class TestContext(unittest.TestCase): """ Unit tests for the Context class """ def setUp(self): self.c = Context() self.c['FAIL'] = 'PASS' def test_s...
mpl-2.0
pcarrier-packaging/deb-phantomjs
src/breakpad/src/tools/gyp/test/sibling/gyptest-all.py
151
1061
#!/usr/bin/env python # Copyright (c) 2009 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 TestGyp test = TestGyp.TestGyp() test.run_gyp('build/all.gyp', chdir='src') test.build('build/all.gyp', test.ALL, chdir='...
bsd-3-clause
pli3/enigma2-git
lib/python/Components/Converter/ValueToPixmap.py
25
1216
from Components.Converter.Converter import Converter from Components.Element import cached, ElementError from Tools.Directories import fileExists, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, resolveFilename from Tools.LoadPixmap import LoadPixmap class ValueToPixmap(Converter, object): LANGUAGE_CODE = 0 PATH = 1 def _...
gpl-2.0