repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
minhphung171093/GreenERP
openerp/addons/l10n_be_invoice_bba/partner.py
47
1364
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. from openerp.osv import fields, osv import time from openerp.tools.translate import _ class res_partner(osv.osv): """ add field to indicat...
gpl-3.0
pbrazdil/phantomjs
src/qt/qtwebkit/Source/ThirdParty/gtest/test/gtest_break_on_failure_unittest.py
1050
7214
#!/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...
bsd-3-clause
teamtuga4/teamtuga4ever.repository
plugin.video.pancas/resources/lib/sources/directdl_tv.py
20
4246
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
gpl-2.0
ZhenxingWu/luigi
test/s3_test.py
42
12104
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Mortar Data # # 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
mgracer48/panda3d
direct/src/gui/OnscreenImage.py
9
5704
"""OnscreenImage module: contains the OnscreenImage class""" __all__ = ['OnscreenImage'] from panda3d.core import * from direct.showbase.DirectObject import DirectObject import types class OnscreenImage(DirectObject, NodePath): def __init__(self, image = None, pos = None, hpr = ...
bsd-3-clause
Maistho/CouchPotatoServer
couchpotato/core/media/_base/search/main.py
80
2211
from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.variable import mergeDicts, getImdb from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin log = CPLog(__name__) class Search(Plugin): def __init__(self...
gpl-3.0
Beauhurst/django
django/utils/translation/trans_real.py
17
18459
"""Translation helper functions.""" import functools import gettext as gettext_module import os import re import sys import warnings from collections import OrderedDict from threading import local from django.apps import apps from django.conf import settings from django.conf.locale import LANG_INFO from django.core.ex...
bsd-3-clause
Rhaseven7h/hellanzb
Hellanzb/NZBLeecher/NZBModel.py
4
35912
""" NZBModel - Representations of the NZB file format in memory (c) Copyright 2005 Philip Jenvey [See end of file] """ import os, re, Hellanzb try: set except NameError: from sets import Set as set from shutil import move from threading import Lock, RLock from Hellanzb.Log import * from Hellanzb.NZBQueue impo...
bsd-3-clause
mx3L/enigma2
lib/python/Screens/LanguageSelection.py
37
2948
import gettext from Screen import Screen from Components.ActionMap import ActionMap from Components.Language import language from Components.config import config from Components.Sources.List import List from Components.Label import Label from Components.Pixmap import Pixmap from Screens.InfoBar import InfoBar from Scre...
gpl-2.0
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/bsddb/test/test_dbenv.py
68
19274
import unittest import os, glob from test_all import db, test_support, get_new_environment_path, \ get_new_database_path #---------------------------------------------------------------------- class DBEnv(unittest.TestCase): def setUp(self): self.homeDir = get_new_environment_path() self....
gpl-2.0
collex100/odoo
addons/edi/models/edi.py
277
31944
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2014 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
Werkov/PyQt4
examples/network/threadedfortuneserver.py
20
5283
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
Lyleo/nupic
examples/opf/experiments/opfrunexperiment_test/simpleOPF/hotgym_no_agg/description.py
8
14990
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
israelcoin/isracoin-p2pool
p2pool/work.py
5
24245
from __future__ import division import base64 import random import re import sys import time from twisted.internet import defer from twisted.python import log import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data from bitcoin import helper, script, worker_interface from util import forest, jsonrpc,...
gpl-3.0
somenice/Pablo
web/session.py
52
10767
""" Session Management (from web.py) """ import os, time, datetime, random, base64 import os.path from copy import deepcopy try: import cPickle as pickle except ImportError: import pickle try: import hashlib sha1 = hashlib.sha1 except ImportError: import sha sha1 = sha.new import utils import ...
mit
basr/Brieuwers_Kernel
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
apache/bloodhound
trac/trac/admin/api.py
3
7003
# -*- coding: utf-8 -*- # # Copyright (C)2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consis...
apache-2.0
nkgilley/home-assistant
homeassistant/components/thinkingcleaner/sensor.py
6
3836
"""Support for ThinkingCleaner sensors.""" from datetime import timedelta import logging from pythinkingcleaner import Discovery, ThinkingCleaner import voluptuous as vol from homeassistant import util from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_HOST, UNIT_PERCENTA...
apache-2.0
nullx002/pychess
lib/pychess/widgets/pydock/ArrowButton.py
20
4242
from __future__ import absolute_import import cairo from gi.repository import Gtk from gi.repository import GObject from gi.repository import Gdk from .OverlayWindow import OverlayWindow from .__init__ import NORTH, EAST, SOUTH, WEST class ArrowButton (OverlayWindow): """ Leafs will connect to the drag-drop sig...
gpl-3.0
goliate/sarakha63-persomov
libs/rtorrent/tracker.py
173
5212
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.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, ...
gpl-3.0
benreynwar/plover
plover/machine/stentura.py
1
22596
# Copyright (c) 2011 Hesky Fisher # See LICENSE.txt for details. # Many thanks to a steno geek for help with the protocol. # TODO: Come up with a mechanism to communicate back to the engine when there # is a connection error. # TODO: Address any generic exceptions still left. """Thread-based monitoring of a stenotype...
gpl-2.0
fhaoquan/kbengine
kbe/res/scripts/common/Lib/test/test_getopt.py
173
6968
# test_getopt.py # David Goodger <dgoodger@bigfoot.com> 2000-08-19 from test.support import verbose, run_doctest, run_unittest, EnvironmentVarGuard import unittest import getopt sentinel = object() class GetoptTests(unittest.TestCase): def setUp(self): self.env = EnvironmentVarGuard() if "POSIXL...
lgpl-3.0
GuillaumeSeren/alot
tests/commands/test_envelope.py
2
14242
# encoding=utf-8 # Copyright © 2017-2018 Dylan Baker # 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...
gpl-3.0
operepo/ope
client_tools/svc/build_mgmt.py
1
1171
import os import sys import shutil project_name = "mgmt" main_file = "mgmt.py" # If you get corrupted errors, use this clean = " " # " --clean " remove_spec_file = False spec_file = project_name + ".spec" # Don't wan't old spec files right now. if remove_spec_file and os.path.exists(spec_file): os.unlink(spec_...
mit
ysekky/chainer
chainer/functions/math/sum.py
3
2814
from chainer import cuda from chainer import function from chainer.utils import type_check class Sum(function.Function): """Sum of array elements over a given axis.""" keepdims = False def __init__(self, axis=None, keepdims=False): if axis is None: self.axis = None elif isins...
mit
heplesser/nest-simulator
pynest/nest/tests/test_connect_pairwise_bernoulli.py
10
3533
# -*- coding: utf-8 -*- # # test_connect_pairwise_bernoulli.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ...
gpl-2.0
smishenk/blink-crosswalk
Tools/Scripts/webkitpy/tool/commands/prettydiff.py
186
1857
# Copyright (c) 2010 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
zentralopensource/zentral
zentral/contrib/mdm/views/mdm.py
1
12922
import logging import plistlib from django.db import transaction from django.http import HttpResponse from django.views.generic import View from zentral.contrib.inventory.models import MetaBusinessUnit from zentral.contrib.inventory.utils import commit_machine_snapshot_and_trigger_events from zentral.contrib.mdm.comman...
apache-2.0
google-research/pddm
pddm/utils/convert_to_parser_args.py
1
4673
# Copyright 2019 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 agreed to in writing, ...
apache-2.0
AlanLaughter/huehuehue
ver2/find_words.py
2
1377
#found this solution on http://stackoverflow.com/questions/8870261/how-to-split-text-without-spaces-into-list-of-words def find_words(instring, prefix = '', words = None): if not instring: return [] if words is None: words = set() with open('/usr/share/dict/words') as f: for ...
gpl-3.0
Callwoola/tornado
tornado/escape.py
120
14441
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
apache-2.0
erlang/otp
lib/asn1/test/asn1_SUITE_data/Constraints.py
92
4620
Constraints DEFINITIONS ::= BEGIN -- Single Value SingleValue ::= INTEGER (1) SingleValue2 ::= INTEGER (1..20) predefined INTEGER ::= 1 SingleValue3 ::= INTEGER (predefined | 5 | 10) Range2to19 ::= INTEGER (1<..<20) Range10to20 ::= INTEGER (10..20) ContainedSubtype ::= INTEGER (INCLUDES Range10to20) -- Some ranges for...
apache-2.0
asimshankar/tensorflow
tensorflow/compiler/tests/variable_ops_test.py
5
21654
# 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
mattseymour/django
django/template/loaders/cached.py
2
3743
""" Wrapper class that takes a list of template loaders as an argument and attempts to load templates from them in order, caching the result. """ import hashlib from django.template import TemplateDoesNotExist from django.template.backends.django import copy_exception from django.utils.encoding import force_bytes, fo...
bsd-3-clause
hashem78/G-Kernel
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
auferack08/edx-platform
common/lib/xmodule/xmodule/tests/test_conditional.py
37
12428
import json import unittest from fs.memoryfs import MemoryFS from mock import Mock, patch from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from xmodule.error_module import NonStaffErrorDescriptor from opaque_keys.edx.locations import SlashSeparatedCourseKey, Location from xmodule.modules...
agpl-3.0
EPDCenter/android_kernel_bq_dc_v1
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
abhi11/tanglu-dak
daklib/daksubprocess.py
7
2601
"""subprocess management for dak @copyright: 2013, Ansgar Burchardt <ansgar@debian.org> @license: GPL-2+ """ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or...
gpl-2.0
eliasdesousa/indico
indico/modules/events/registration/placeholders/registrations.py
2
3930
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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
Liyier/learning_log
env/Lib/site-packages/django/test/client.py
44
28212
from __future__ import unicode_literals import json import mimetypes import os import re import sys from copy import copy from importlib import import_module from io import BytesIO from django.conf import settings from django.core.handlers.base import BaseHandler from django.core.handlers.wsgi import ISO_8859_1, UTF_...
mit
Perferom/android_external_chromium_org
native_client_sdk/src/tools/tests/chrome_mock.py
107
1498
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import sys import time import urllib2 def PrintAndFlush(s): print s sys.stdout.flush() def main(args): pars...
bsd-3-clause
renzon/scripts3tarde
backend/appengine/manager.py
31
37077
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import importlib import sys import os import shutil if 'GAE_SDK' in os.environ: SDK_PATH = os.environ['GAE_SDK'] sys.path.insert(0, SDK_PATH) import dev_appserver dev_appserver.fix_sys_path() else: print "GAE_SDK en...
mit
joedursun/.emacs.d
elpa/elpy-20150226.1148/elpy/tests/support.py
1
26998
# coding: utf-8 """Support classes and functions for the elpy test code. Elpy uses a bit of a peculiar test setup to avoid redundancy. For the tests of the two backends, we provide generic test cases for generic tests and for specific callback tests. These mixins can be included in the actual test classes. We can't ...
gpl-3.0
gnmiller/craig-bot
craig-bot/lib/python3.6/site-packages/urllib3/util/wait.py
63
5403
import errno from functools import partial import select import sys try: from time import monotonic except ImportError: from time import time as monotonic __all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"] class NoWayToWaitForSocketError(Exception): pass # How should we wait on ...
mit
EeOneDown/spbu4u
telebot_login/__init__.py
1
4022
from functools import wraps from flask import g from app.constants import ( ask_to_register_answer, student_required_answer, educator_required_answer ) from app.models import User from tg_bot import bot def login_required_message(func): @wraps(func) def wrapper(message): user = User.query.filter...
apache-2.0
stuntman723/rap-analyzer
rap_analyzer/lib/python2.7/site-packages/psycopg2/extras.py
25
31956
"""Miscellaneous goodies for psycopg2 This module is a generic place used to hold little helper functions and classes until a better place in the distribution is found. """ # psycopg/extras.py - miscellaneous extra goodies for psycopg # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is f...
mit
cudeso/AIL-framework
bin/indexer_lookup.py
2
2895
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of AIL framework - Analysis Information Leak framework # # 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...
agpl-3.0
IllusionRom-deprecated/android_platform_external_chromium_org_tools_grit
grit/tool/android2grd.py
7
19811
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The 'grit android2grd' tool.""" import getopt import os.path import StringIO from xml.dom import Node import xml.dom.minidom ...
bsd-2-clause
miyouzi/ch-docker-ssr
shadowsocks/manager.py
19
9889
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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
HailStorm32/Q.bo_stacks
qbo_object_recognition/src/qbo_object_recognition/srv/_RecognizeObject.py
1
7433
"""autogenerated by genpy from qbo_object_recognition/RecognizeObjectRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class RecognizeObjectRequest(genpy.Message): _md5sum = "d41d8cd98f00b204e9800998ecf8427e" _type = "qbo_object_recognition...
lgpl-2.1
madan96/sympy
sympy/series/order.py
16
16906
from __future__ import print_function, division from sympy.core import S, sympify, Expr, Rational, Symbol, Dummy from sympy.core import Add, Mul, expand_power_base, expand_log from sympy.core.cache import cacheit from sympy.core.compatibility import default_sort_key, is_sequence from sympy.core.containers import Tuple...
bsd-3-clause
luiseduardohdbackup/odoo
addons/l10n_be_intrastat/l10n_be_intrastat.py
258
7828
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
tumbl3w33d/ansible
lib/ansible/modules/network/fortios/fortios_firewall_profile_group.py
13
14468
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
obruns/gtest
test/gtest_xml_outfiles_test.py
2526
5340
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
valentin-krasontovitsch/ansible
test/units/modules/network/f5/test_bigip_profile_http_compression.py
21
3949
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, 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 import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
cbertinato/pandas
pandas/tests/frame/test_combine_concat.py
1
34741
from datetime import datetime import numpy as np import pytest import pandas as pd from pandas import DataFrame, Index, Series, Timestamp, date_range import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal, assert_series_equal class TestDataFrameConcatCommon: def test_concat_multipl...
bsd-3-clause
nilsbore/aaf_deployment
info_terminal/approach_person_of_interest/scripts/go_to_person_server.py
4
6954
#! /usr/bin/env python import roslib import rospy import actionlib from geometry_msgs.msg import PoseStamped, PointStamped from approach_person_of_interest.msg import * from sensor_msgs.msg import JointState from std_msgs.msg import String, Float32, Bool, Int32 from strands_navigation_msgs.msg import MonitoredNavigat...
mit
luci/luci-py
appengine/auth_service/realms/config_test.py
2
11855
#!/usr/bin/env vpython # Copyright 2020 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. # pylint: disable=no-value-for-parameter import logging import os import sys import unittest import test_env test_env.set...
apache-2.0
dongguangming/python-phonenumbers
python/phonenumbers/data/region_BZ.py
10
1751
"""Auto-generated file, do not edit by hand. BZ metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_BZ = PhoneMetadata(id='BZ', country_code=501, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[2-8]\\d{6}|0\\d{10}', possible_number_p...
apache-2.0
mbjadhav/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/base/struct/JetTHnSparse.py
41
7138
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
bsd-3-clause
efortuna/AndroidSDKClone
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/email/quoprimime.py
246
10848
# Copyright (C) 2001-2006 Python Software Foundation # Author: Ben Gertzfield # Contact: email-sig@python.org """Quoted-printable content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode US ASCII-like 8-bit data called `quoted-printable'. It...
apache-2.0
40223246/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/unittest/main.py
739
10385
"""Unittest main program""" import sys import optparse import os from . import loader, runner from .signals import installHandler __unittest = True FAILFAST = " -f, --failfast Stop on first failure\n" CATCHBREAK = " -c, --catch Catch control-C and display results\n" BUFFEROUTPUT = " -b, --buffer ...
agpl-3.0
Alwnikrotikz/sulley
requests/trend.py
6
5080
from sulley import * import struct # crap ass trend xor "encryption" routine for control manager (20901) def trend_xor_encode (str): ''' Simple bidirectional XOR "encryption" routine used by this service. ''' key = 0xA8534344 ret = "" # pad to 4 byte boundary. pad = 4 - (len(...
gpl-2.0
kernevil/samba
python/samba/tests/process_limits.py
1
3057
# Tests for limiting processes forked on accept by the standard process model # # Copyright (C) Andrew Bartlett <abartlet@samba.org> 2018 # # 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...
gpl-3.0
Jay-Jay-D/LeanSTP
Algorithm.Python/G10CurrencySelectionModelFrameworkAlgorithm.py
1
3703
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
apache-2.0
alexryndin/ambari
ambari-server/src/main/resources/stacks/ADH/1.5/services/TEZ/package/scripts/service_check.py
4
3606
""" 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 use this ...
apache-2.0
mrtnrdl/.macdots
scripts/bin/platform-tools/systrace/catapult/third_party/pyserial/serial/win32.py
155
10120
from ctypes import * from ctypes.wintypes import HANDLE from ctypes.wintypes import BOOL from ctypes.wintypes import LPCWSTR _stdcall_libraries = {} _stdcall_libraries['kernel32'] = WinDLL('kernel32') from ctypes.wintypes import DWORD from ctypes.wintypes import WORD from ctypes.wintypes import BYTE INVALID_HANDLE_VAL...
unlicense
dgrat/Book
Tools/autotest/arducopter.py
39
44394
# fly ArduCopter in SITL # Flight mode switch positions are set-up in arducopter.param to be # switch 1 = Circle # switch 2 = Land # switch 3 = RTL # switch 4 = Auto # switch 5 = Loiter # switch 6 = Stabilize import util, pexpect, sys, time, math, shutil, os from common import * from pymavlink import mavut...
gpl-3.0
kevinpt/hdlparse
hdlparse/verilog_parser.py
1
7107
# -*- coding: utf-8 -*- # Copyright © 2017 Kevin Thibedeau # Distributed under the terms of the MIT license from __future__ import print_function import re, os, io, ast, pprint, collections from minilexer import MiniLexer '''Verilog documentation parser''' verilog_tokens = { 'root': [ (r'\bmodule\s+(\w+)\s*', ...
mit
malin1993ml/h-store
third_party/python/fabric/tasks.py
9
1652
from functools import wraps class Task(object): """ Abstract base class for objects wishing to be picked up as Fabric tasks. Instances of subclasses will be treated as valid tasks when present in fabfiles loaded by the :doc:`fab </usage/fab>` tool. For details on how to implement and use `~fabric...
gpl-3.0
arielalmendral/ert
python/python/ert/config/config_content.py
2
7090
# Copyright (C) 2015 Statoil ASA, Norway. # # The file 'config_content.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 ...
gpl-3.0
SteveG/tracks-queue
src/widgetActionEditor.py
1
27462
#!/usr/bin/env python """ Copyright (C) 2010 Stephen Georg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version....
gpl-2.0
sesuncedu/sdhash
sdhash-ui/jinja2/testsuite/regression.py
90
7583
# -*- coding: utf-8 -*- """ jinja2.testsuite.regression ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests corner cases and bugs. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Template, Enviro...
apache-2.0
jemucino/pybilliards
src/billiards/settings.py
2
1523
# -*- coding: utf-8 -*- import logging import os import settings_default # TODO: replace platform specific paths class Settings(object): def __init__(self): self._settings = {} #self.add_from_file(os.path.join('settings_default.py')) self._settings.update(settings_default.settings) ...
gpl-3.0
theodoregoetz/clas12-dc-wiremap
clas12_wiremap/ui/main_window.py
1
5268
from __future__ import print_function, division import sys import os import numpy as np from clas12_wiremap.ui import QtGui, uic from clas12_wiremap.ui import Sidebar, CrateTab, DBTab, TBTab, DCWireStack, SetRunDialogue from clas12_wiremap.ui.dcrb_tab import DCRB from clas12_wiremap.ui.stb_tab import STBTab from clas1...
gpl-3.0
noelbk/neutron-juniper
neutron/plugins/hyperv/rpc_callbacks.py
18
3977
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.ap...
apache-2.0
PyMySQL/mysqlclient-python
setup_windows.py
1
1765
import os import sys from distutils.msvccompiler import get_build_version def get_config(): from setup_common import get_metadata_and_options, create_release_file metadata, options = get_metadata_and_options() connector = options["connector"] extra_objects = [] # client = "mysqlclient" cli...
gpl-2.0
alexandrucoman/vbox-nova-driver
nova/tests/unit/virt/xenapi/image/test_bittorrent.py
21
5714
# Copyright 2013 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
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Fitbit/Statistics/GetActivityStats.py
5
4462
# -*- coding: utf-8 -*- ############################################################################### # # GetActivityStats # Gets user's activity statistics. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
gpl-2.0
marco-lancini/Showcase
social_auth/backends/contrib/live.py
4
2698
""" MSN Live Connect oAuth 2.0 Settings: LIVE_CLIENT_ID LIVE_CLIENT_SECRET LIVE_EXTENDED_PERMISSIONS (defaults are: wl.basic, wl.emails) References: * oAuth http://msdn.microsoft.com/en-us/library/live/hh243649.aspx * Scopes http://msdn.microsoft.com/en-us/library/live/hh243646.aspx * REST http://msdn.microsoft.co...
mit
Stanford-Online/edx-platform
openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py
9
12157
"""Tests for the backpopulate_program_credentials management command.""" import ddt import mock from django.core.management import call_command from django.test import TestCase from lms.djangoapps.certificates.models import CertificateStatuses # pylint: disable=import-error from course_modes.models import CourseMode ...
agpl-3.0
0359xiaodong/fb-adb
mk-fingerprint.py
5
2543
#!/usr/bin/env python3 # -*- python-indent-offset: 2 -*- # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in # the LICENSE file in the root directory of this source tree. An # additional grant of patent rights can be found in the PATENTS file...
bsd-3-clause
andrewleech/SickRage
lib/tvdb_api/tvdb_ui.py
92
5494
#!/usr/bin/env python2 #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:unlicense (http://unlicense.org/) """Contains included user interfaces for Tvdb show selection. A UI is a callback. A class, it's __init__ function takes two arguments: - config, which is the ...
gpl-3.0
Bulochkin/tensorflow_pack
tensorflow/contrib/makefile/downloads/protobuf/python/google/protobuf/internal/service_reflection_test.py
75
5170
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
apache-2.0
liuyang1/vimwiki_utils
dfsvw.py
1
2418
#! /usr/bin/env python # -*- coding: utf-8 -*- """dfsvw.py Create site map for vimwiki. Must run script under vimwiki directory. Example: output readable site map to stdout dfsvw.py output vimwiki-format sitemap to file dfsvw.py > map.wiki Python version: 2""" import sys import re linkRE = r...
mit
JumpLink/jade2html2jade
ThirdParty/js-beautify/python/jsbeautifier/tests/test-perf-jsbeautifier.py
7
1142
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import copy import jsbeautifier options = jsbeautifier.default_options() options.wrap_line_length = 80 data = '' data_min = '' def beautifier_test_underscore(): jsbeautifier.beautify(data, options) def beautifier_test_underscore_min(): jsbeautifier....
mit
PearsonIOKI/compose-forum
askbot/migrations/0121_auto__add_field_groupprofile_is_open__add_field_groupprofile_preapprov.py
17
29105
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'GroupProfile.is_open' db.add_column('askbot_groupprofile', 'is_open', ...
gpl-3.0
wrouesnel/ansible
test/units/modules/network/f5/test_bigip_irule.py
24
8316
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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 import os import json import sys from nose.plugins.skip import SkipTest i...
gpl-3.0
jhg/django
django/views/generic/edit.py
19
11221
import inspect import re import warnings from django.core.exceptions import ImproperlyConfigured from django.forms import models as model_forms from django.http import HttpResponseRedirect from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force...
bsd-3-clause
code-wukong/lolcomp
ws/views.py
1
14685
# ws/views.py from django.http import HttpResponse from django.http import HttpResponseRedirect import json from lolcomp.helpers import * import os import requests from ws.models import * # retrieve constants for app sitedown def cst_sitedown(request): if request.method == 'POST': post = json.loads(reque...
gpl-2.0
jungla/ICOM-fluidity-toolbox
2D/RST/plot_T_spec_res.py
1
8498
import os, sys import myfun import numpy as np import matplotlib as mpl mpl.use('ps') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy import interpolate import lagrangian_stats import scipy.fftpack ## READ archive (too many points... somehow) # args: name, dayi, dayf, days label = ...
gpl-2.0
halvertoluke/edx-platform
common/lib/xmodule/xmodule/tests/test_import.py
27
26954
# -*- coding: utf-8 -*- import datetime import ddt import unittest from fs.memoryfs import MemoryFS from lxml import etree from mock import Mock, patch from django.utils.timezone import UTC from xmodule.xml_module import is_pointer_tag from opaque_keys.edx.locations import Location from xmodule.modulestore import o...
agpl-3.0
joachimmetz/dfvfs
dfvfs/path/encoded_stream_path_spec.py
2
1389
# -*- coding: utf-8 -*- """The encoded stream path specification implementation.""" from dfvfs.lib import definitions from dfvfs.path import factory from dfvfs.path import path_spec class EncodedStreamPathSpec(path_spec.PathSpec): """Encoded stream path specification. Attributes: encoding_method (str): meth...
apache-2.0
Pablo1990/BioinfoTeam
plugins/ti.alloy/plugin.py
1729
5251
import os, sys, subprocess, hashlib import subprocess def check_output(*popenargs, **kwargs): r"""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....
apache-2.0
tectronics/amselections
pr.py
1
4584
import sys, os, math, random class party: def __init__(self, names, votess, seat=0): self.name = names self.votes = votess self.readyseats = seat if self.readyseats == None: self.readyseats = int(0) self.seats = self.readyseats if self.seats == None: self.seats = int(0...
mit
maiklos-mirrors/jfx78
modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/path.py
191
5046
# Copyright (C) 2010 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 ...
gpl-2.0
mathspace/django
tests/gis_tests/geo3d/tests.py
26
17237
from __future__ import unicode_literals import os import re from unittest import skipUnless from django.contrib.gis.db.models import Extent3D, Union from django.contrib.gis.db.models.functions import ( AsGeoJSON, AsKML, Length, Perimeter, Scale, Translate, ) from django.contrib.gis.gdal import HAS_GDAL from djang...
bsd-3-clause
philipforget/python-oauth2
example/server.py
375
7669
""" The MIT License Copyright (c) 2007 Leah Culver 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, merge, publis...
mit
trankmichael/scikit-learn
sklearn/neighbors/approximate.py
128
22351
"""Approximate nearest neighbor search""" # Author: Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk> # Joel Nothman <joel.nothman@gmail.com> import numpy as np import warnings from scipy import sparse from .base import KNeighborsMixin, RadiusNeighborsMixin from ..base import BaseEstimator from ..utils.va...
bsd-3-clause
singlebrook/AWS-ElasticBeanstalk-CLI
eb/macosx/python2.7/lib/aws/requests/packages/urllib3/exceptions.py
245
2258
# urllib3/exceptions.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ## Base Exceptions class HTTPError(Exception): "Base exception used by this module." ...
apache-2.0