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
yjxtogo/horizon
horizon/tabs/views.py
67
7029
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
arborh/tensorflow
tensorflow/python/kernel_tests/proto/decode_proto_op_test.py
26
1380
# ============================================================================= # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at #...
apache-2.0
davisein/jitsudone
djangotoolbox/djangotoolbox/utils.py
70
2758
def make_tls_property(default=None): """ Creates a class-wide instance property with a thread-specific value. """ class TLSProperty(object): def __init__(self): from threading import local self.local = local() def __get__(self, instance, cls): i...
bsd-3-clause
NolanBecker/aima-python
submissions/Sery/vacuum2.py
18
1432
import agents as ag def HW2Agent() -> object: "An agent that keeps track of what locations are clean or dirty." oldPercepts = [('None', 'Clean')] oldActions = ['NoOp'] actionScores = [{ 'Right': 0, 'Left': 0, 'Up': -1, 'Down': -1, 'NoOp': -100, }] level ...
mit
Rademade/taiga-back
taiga/userstorage/filters.py
3
1418
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
agpl-3.0
qPCR4vir/orange3
Orange/projection/base.py
5
2725
import inspect import Orange.data from Orange.misc.wrapper_meta import WrapperMeta from Orange.misc.cache import single_cache import Orange.preprocess __all__ = ["Projector", "Projection", "SklProjector"] class Projector: #: A sequence of data preprocessors to apply on data prior to projecting name = 'proje...
bsd-2-clause
gisce/OCB
addons/idea/idea.py
53
3165
# -*- 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
primiano/depot_tools
setup_color.py
2
3627
#!/usr/bin/env python # Copyright (c) 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys from third_party import colorama IS_TTY = None OUT_TYPE = 'unknown' def init(): # should_wrap instructs co...
bsd-3-clause
Nevacoin/electrum-nevacoin-server
src/test/test_utils.py
49
1107
__author__ = 'erasmospunk' import unittest from utils import hash_160_to_address, bc_address_to_hash_160 class UtilTest(unittest.TestCase): def test_hash_160_to_address(self): self.assertEqual(hash_160_to_address(None), None) self.assertEqual(hash_160_to_address('04e9fca1'.decode('hex')), None) ...
agpl-3.0
tod31/pyload
module/plugins/accounts/NowVideoSx.py
5
1591
# -*- coding: utf-8 -*- import re import time from module.plugins.internal.Account import Account class NowVideoSx(Account): __name__ = "NowVideoSx" __type__ = "account" __version__ = "0.09" __status__ = "testing" __description__ = """NowVideo.at account plugin""" __license__ = "...
gpl-3.0
bwrsandman/OpenUpgrade
openerp/addons/base/module/wizard/__init__.py
365
1250
# -*- 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
albertoferna/compmech
theory/conecyl/fsdt/fsdt_shadmehri2012_bc3/print_numerical.py
12
11654
import os import glob import numpy as np import sympy from sympy import pi, sin, cos, var, Matrix var('i1, k1, i2, j2, k2, l2', integer=True) var('x, t, xa, xb, L, r, r2, sina, cosa') var('A11, A12, A16, A22, A26, A66, A44, A45, A55') var('B11, B12, B16, B22, B26, B66') var('D11, D12, D16, D22, D26, D66') var('wx, wt...
bsd-3-clause
627656505/linux
tools/perf/python/twatch.py
219
1789
#! /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
RezaSR/android_kernel_asus_tf303cl
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
edouard-lopez/ansible-modules-core
cloud/azure/azure.py
92
24105
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
semplea/characters-meta
python/alchemy/examples/watson_developer_cloud/watson_developer_cloud_service.py
2
10402
# Copyright 2015 IBM 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 agreed t...
mit
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/example/speech_recognition/stt_bucketing_module.py
52
1313
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
nitzmahone/ansible
lib/ansible/modules/database/mongodb/mongodb_parameter.py
50
6637
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Loic Blot <loic.blot@unix-experience.fr> # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ impo...
gpl-3.0
boyuegame/kbengine
kbe/res/scripts/common/Lib/test/test_metaclass.py
132
6350
doctests = """ Basic class construction. >>> class C: ... def meth(self): print("Hello") ... >>> C.__class__ is type True >>> a = C() >>> a.__class__ is C True >>> a.meth() Hello >>> Use *args notation for the bases. >>> class A: pass >>> class B: pass >>>...
lgpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/sympy/functions/elementary/piecewise.py
4
11200
from sympy.core import Basic, S, Function, diff, Number, sympify from sympy.core.relational import Equality, Relational from sympy.logic.boolalg import Boolean from sympy.core.sets import Set class ExprCondPair(Function): """Represents an expression, condition pair.""" def __new__(cls, *args, **assumptions): ...
agpl-3.0
robbiet480/home-assistant
homeassistant/components/switcher_kis/switch.py
6
4686
"""Home Assistant Switcher Component Switch platform.""" from logging import getLogger from typing import TYPE_CHECKING, Callable, Dict from aioswitcher.api import SwitcherV2Api from aioswitcher.consts import ( COMMAND_OFF, COMMAND_ON, STATE_OFF as SWITCHER_STATE_OFF, STATE_ON as SWITCHER_STATE_ON, ...
apache-2.0
tswast/google-cloud-python
container/google/cloud/container_v1beta1/gapic/enums.py
2
10419
# -*- coding: utf-8 -*- # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
shizhai/wprobe
build_dir/host/scons-2.1.0/build/lib.linux-i686-2.7/SCons/Tool/sunc++.py
21
4758
"""SCons.Tool.sunc++ Tool-specific initialization for C++ on SunOS / Solaris. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 201...
gpl-2.0
freedomofpress/FingerprintSecureDrop
fpsd/sorter.py
2
14007
#!/usr/bin/env python3.5 # # Call scrape_directories() on any number of hidden service directories and # then call sort_onions() on a dict, the keys of which are class names and the # values boolean lambda expressions that operate on the object reference "text" # (the HTML text of a web page), returning True when the p...
agpl-3.0
rmtew/livecoding
filechanges/golden3.py
4
3785
""" The original version of this script is publically available from the web page given below. It has been modified to suit the needs of the livecoding library. Author: Tim Golden Source: http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_changes.html From recipe page: The third techni...
bsd-3-clause
lesteve/joblib
examples/compressors_comparison.py
3
9085
""" =============================== Improving I/O using compressors =============================== This example compares the compressors available in Joblib. In the example, Zlib, LZMA and LZ4 compression only are used but Joblib also supports BZ2 and GZip compression methods. For each compared compression method, th...
bsd-3-clause
ExcelsiorCore/TheSocialNetwork
node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
1284
100329
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import copy import hashlib import json import multiprocessing import os.path import re import signal import subprocess import sys import gyp imp...
mit
avsm/xen-unstable
tools/python/xen/xm/opts.py
6
17761
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
gpl-2.0
mbroadst/rethinkdb
test/rdb_workloads/stress_workloads/x_map_reduce.py
50
1436
#!/usr/bin/env python import sys, os, datetime, x_stress_util sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import utils r = utils.import_python_driver() class Workload: def __init__(self, options): self.db = options["db"] self.table = optio...
agpl-3.0
harshaneelhg/scikit-learn
doc/tutorial/machine_learning_map/parse_path.py
275
7084
#!/usr/local/bin/python """ Based on: http://wxpsvg.googlecode.com/svn/trunk/svg/pathdata.py According to that project, this file is licensed under the LGPL """ try: from pyparsing import (ParserElement, Literal, Word, CaselessLiteral, Optional, Combine, Forward, ZeroOrMore, nums, oneOf, Group, Pa...
bsd-3-clause
mdz/heroku-buildpack-python
vendor/virtualenv-1.7/setup.py
19
2155
import sys, os try: from setuptools import setup kw = {'entry_points': """[console_scripts]\nvirtualenv = virtualenv:main\n""", 'zip_safe': False} except ImportError: from distutils.core import setup if sys.platform == 'win32': print('Note: without Setuptools installed you wi...
mit
proversity-org/edx-platform
common/djangoapps/util/file.py
24
6925
""" Utility methods related to file handling. """ import os from datetime import datetime from django.core.exceptions import PermissionDenied from django.core.files.storage import DefaultStorage, get_valid_filename from django.utils.translation import ugettext as _ from django.utils.translation import ungettext from ...
agpl-3.0
ESOedX/edx-platform
common/djangoapps/third_party_auth/tests/test_settings.py
1
2993
"""Unit tests for settings.py.""" from __future__ import absolute_import import unittest from mock import patch from third_party_auth import provider, settings from third_party_auth.tests import testutil _ORIGINAL_AUTHENTICATION_BACKENDS = ['first_authentication_backend'] _ORIGINAL_INSTALLED_APPS = ['first_installe...
agpl-3.0
rdeits/meshcat-python
src/meshcat/servers/zmqserver.py
1
15334
from __future__ import absolute_import, division, print_function import atexit import base64 import os import re import sys import subprocess import multiprocessing import tornado.web import tornado.ioloop import tornado.websocket import tornado.gen import zmq import zmq.eventloop.ioloop from zmq.eventloop.zmqstream...
mit
mdreid/dinkylink
oldcode/libs/requests/packages/charade/cp949prober.py
2801
1782
######################## 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...
mit
michael-lazar/rtv
tests/conftest.py
1
8917
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import curses import logging import threading from functools import partial import pytest from vcr import VCR from six.moves.urllib.parse import urlparse, parse_qs from rtv.oauth import OAuthHelper, OAuthHandler, OAuthHTTPServer from rtv.conte...
mit
glisco/simpatica
controllers/public.py
1
5973
# -*- coding: utf-8 -*- # # simpatiCA - a simple PKI # # Copyright (C) 2011 by Michele Comitini <michele.comitini _at_ glisco.it> # Copyright (C) 2011 by Glisco s.r.l. <info _at_ glisco.it> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
gpl-3.0
fitzgibbon/distorm3-python3
disOps/x86header.py
29
5884
# # x86header.py # # Copyright (C) 2009 Gil Dabah, http://ragestorm.net/disops/ # class OperandType: """ Types of possible operands in an opcode. Refer to the diStorm's documentation or diStorm's instructions.h for more explanation about every one of them. """ (NONE, IMM8, IMM16, IMM_FULL, IMM32,...
gpl-3.0
kmonsoor/python-for-android
python-modules/twisted/twisted/words/im/tocsupport.py
55
8020
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """TOC (i.e. AIM) support for Instance Messenger.""" # System Imports import string, re from zope.interface import implements # Twisted Imports from twisted.words.protocols import toc from twisted.words.im.locals import ONLINE, OFFLIN...
apache-2.0
Hellenn/doctors_joomla
templates/doctors/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
3426
# 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. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
gpl-2.0
mrquim/repository.mrquim
script.module.youtube.dl/lib/youtube_dl/extractor/amp.py
28
4008
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, mimetype2ext, determine_ext, ExtractorError, ) class AMPIE(InfoExtractor): # parse Akamai Adaptive Media Player feed def _extract_feed_info(self, url...
gpl-2.0
hackfestca/cnb
cnb/modAvailable/CNBMMHash.py
1
1329
#!/usr/bin/python # -*- coding: utf-8 -*- ''' CNB Matrix Module - hash ''' import hashlib from cnb.cnbMatrixModule import CNBMatrixModule class CNBMMHash(CNBMatrixModule): """ """ name = 'hash' usage = 'hash TYPE PLAIN_TEXT' desc = 'Hash any plain text into a hash (md5, sha1, sha224, sha256, sh...
gpl-3.0
hansent/kivy
kivy/core/text/markup.py
6
13491
''' Text Markup =========== .. versionadded:: 1.1.0 We provide a simple text-markup for inline text styling. The syntax look the same as the `BBCode <http://en.wikipedia.org/wiki/BBCode>`_. A tag is defined as ``[tag]``, and might have a closed tag associated: ``[/tag]``. Example of a markup text:: [b]Hello [co...
mit
mlperf/inference_results_v0.7
closed/Inspur/code/rnnt/tensorrt/preprocessing/metrics.py
12
2332
# Copyright (c) 2020, NVIDIA CORPORATION. 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 ...
apache-2.0
odootr/odoo
addons/report_webkit/report_helper.py
381
3507
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
maxikov/attfocus
2dbluetooths/linreg2/test.py
8
1212
#!/usr/bin/env python import featurebuilder import pickle import mdp import math import numpy def load_data(filename): src = open(filename, "r") X, Y = eval(src.readline()) src.close() return X, Y def load_node(filename): f = open(filename, "rb") node = pickle.load(f) f.close() return node def main(): pr...
gpl-3.0
Drooids/odoo
addons/account_check_writing/report/check_print.py
320
2943
# -*- 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
dbrgn/fahrplan
setup.py
1
1566
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from fahrplan import meta f = open('requirements.txt', 'r') lines = f.readlines() requirements = [l.strip().strip('\n') for l in lines if l.strip() and not l.strip().startswith('#')] readme = open('README.rst').read() setup(name='fahrplan', ...
gpl-3.0
acshan/odoo
addons/report_intrastat/__init__.py
377
1079
# -*- 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...
agpl-3.0
grehx/spark-tk
python/sparktk/frame/ops/export_to_csv.py
12
1423
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
yildizberkay/MongoApp
libs/PIL/CurImagePlugin.py
40
2002
# # The Python Imaging Library. # $Id$ # # Windows Cursor support for PIL # # notes: # uses BmpImagePlugin.py to read the bitmap data. # # history: # 96-05-27 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # # See the README file for information on usage and redist...
apache-2.0
openhatch/oh-mainline
vendor/packages/kombu/kombu/tests/utils/test_debug.py
39
1726
from __future__ import absolute_import import logging from kombu.utils.debug import ( setup_logging, Logwrapped, ) from kombu.tests.case import Case, Mock, patch class test_setup_logging(Case): def test_adds_handlers_sets_level(self): with patch('kombu.utils.debug.get_logger') as get_logger: ...
agpl-3.0
40223101/w17test
static/Brython3.1.3-20150514-095342/Lib/copy.py
628
8905
"""Generic (shallow and deep) copying operations. Interface summary: import copy x = copy.copy(y) # make a shallow copy of y x = copy.deepcopy(y) # make a deep copy of y For module specific errors, copy.Error is raised. The difference between shallow and deep copying is only relev...
gpl-3.0
molebot/brython
www/src/Lib/decimal.py
623
230510
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # and Facundo Batista <facundo at taniquetil.com.ar> # and Raymond Hettinger <python at rcn.com> # and Aahz <aahz at pobox.com> # and Tim Peters # This module should be kept in sync with ...
bsd-3-clause
solus-project/package-management
tests/fetchtest.py
4
1154
import unittest import os import base64 import pisi.context as ctx import pisi.api from pisi.specfile import SpecFile from pisi.fetcher import Fetcher from pisi import util from pisi import uri class FetchTestCase(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.spec = SpecF...
gpl-2.0
jacobmetrick/Flexget
flexget/plugins/sites/extratorrent.py
6
3103
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import quote import logging import re import feedparser from flexget import plugin from flexget.entry import Entry from flexget.event import...
mit
ladybug-analysis-tools/ladybug-core
ladybug/datatype/volumeflowrateintensity.py
1
2380
# coding=utf-8 """Volume Flow Rate Intensity data type.""" from __future__ import division from .base import DataTypeBase class VolumeFlowRateIntensity(DataTypeBase): """Volume Flow Rate Intensity """ _units = ('m3/s-m2', 'ft3/s-ft2', 'L/s-m2', 'cfm/ft2', 'L/h-m2', 'gph/ft2') _si_units = ('m3/s-m2', ...
gpl-3.0
calebfoss/tensorflow
tensorflow/contrib/learn/python/learn/learn_runner_test.py
17
8363
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
ArtsiomCh/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/permute_impl.py
10
4640
# 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
AlphaNerd80/mocha-and-gulp
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/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...
mit
hardbyte/python-can
can/interfaces/ixxat/structures.py
1
4481
""" Ctypes wrapper module for IXXAT Virtual CAN Interface V3 on win32 systems Copyright (C) 2016 Giuseppe Corbelli <giuseppe.corbelli@weightpack.com> """ import ctypes class LUID(ctypes.Structure): _fields_ = [("LowPart", ctypes.c_uint32), ("HighPart", ctypes.c_int32)] PLUID = ctypes.POINTER(LUID) class VCI...
lgpl-3.0
vijaylbais/boto
boto/cloudfront/origin.py
153
6060
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # w...
mit
mgit-at/ansible
lib/ansible/vars/reserved.py
71
2525
# (c) 2017 Ansible By Red Hat # # 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
aitormf/JdeRobot
src/tools/emSensorviewPy/Sensor.py
5
1474
from __future__ import print_function import sys, traceback, Ice import easyiceconfig as EasyIce import jderobot import threading import copy class Sensor: def __init__(self): try: ic = EasyIce.initialize(sys.argv) proxy = ic.getPropertyWithDefault("emSensorView.emSensor.Proxy","...
gpl-3.0
ingadhoc/odoo
addons/crm_profiling/wizard/open_questionnaire.py
333
3800
# -*- 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
gilsondev/trademarket
bootstrap/bootstrap2.6.py
22
115710
#!/usr/bin/env python ## WARNING: This file is generated #!/usr/bin/env python """Create a "virtual" Python installation """ # If you change the version here, change it in setup.py # and docs/conf.py as well. __version__ = "1.9.1" # following best practices virtualenv_version = __version__ # legacy, again import ba...
mit
jhawkesworth/ansible
lib/ansible/plugins/doc_fragments/utm.py
43
1586
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Johannes Brunswicker <johannes.brunswicker@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): DOCUMENTATION = r''' options: headers: description: - A dictiona...
gpl-3.0
AnnalisaS/migration_geonode
geonode/people/urls.py
7
1192
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
gpl-3.0
Ghalko/noteTaker
lib/notetaker/utils.py
1
5963
"""Utilities for notetaker. - GeneralQuery - count_lines, """ from collections import OrderedDict from Tkinter import * from tkFileDialog import askopenfilename, askdirectory import tkSimpleDialog class GeneralQuery(object): """To replace Search and TimeSummary query gui elements. Parent needs master, com...
mit
Bridgewater/appetite
src/modules/appetite_args.py
1
9493
#!/usr/bin/python #pylint: disable=relative-import,too-many-nested-blocks """Args used for configuring Appetite This creates two methods for entering params. The command line uses the params defined in this file. If a param file is included in the command line, it will use the values in the file and overwrite any de...
apache-2.0
jmcabandara/imagefactory
imgfac/picklingtools/xmltools.py
4
3642
#!/bin/env python # Copyright (c) 2001-2009 Rincon Research Corporation, Richard T. Saunders # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retai...
apache-2.0
mijuamon/GLRobot
libs/ThreeJSV71/utils/exporters/blender/addons/io_three/exporter/api/material.py
124
7818
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(...
gpl-2.0
desion/tidy_page
setup.py
1
1295
#!/usr/bin/env python from __future__ import print_function from setuptools import setup, find_packages import sys lxml_requirement = "lxml" if sys.platform == 'darwin': import platform mac_ver = platform.mac_ver()[0] mac_ver_no = int(mac_ver.split('.')[1]) if mac_ver_no < 9: print("Using lxml<...
mit
BadWolfAlfa/MyaKernel-Note-4
ToolChain/share/gdb/python/gdb/command/explore.py
126
26824
# GDB 'explore' command. # Copyright (C) 2012-2014 Free Software Foundation, 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 License, or # (at your option) any late...
gpl-2.0
bussiere/pypyjs
website/demo/home/rfk/repos/pypy/lib-python/2.7/lib-tk/Tkdnd.py
198
11488
"""Drag-and-drop support for Tkinter. This is very preliminary. I currently only support dnd *within* one application, between different windows (or within the same window). I an trying to make this as generic as possible -- not dependent on the use of a particular widget or icon type, etc. I also hope that this wi...
mit
vivianli32/TravelConnect
flask/lib/python3.4/site-packages/flask_wtf/form.py
89
5689
# coding: utf-8 import werkzeug.datastructures from jinja2 import Markup, escape from flask import request, session, current_app from wtforms.fields import HiddenField from wtforms.widgets import HiddenInput from wtforms.validators import ValidationError from wtforms.ext.csrf.form import SecureForm from ._compat impo...
mit
AOSP-S4-KK/platform_external_chromium_org
tools/deep_memory_profiler/visualizer/template.py
43
2461
#!/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. import os import subprocess import sys import tempfile from string import Template _TEMPLATE = """<!DOCTYPE html> <meta charset="utf...
bsd-3-clause
iambibhas/django
tests/file_storage/tests.py
20
27498
# -*- coding: utf-8 -*- from __future__ import unicode_literals import errno import os import shutil import sys import tempfile import time import unittest from datetime import datetime, timedelta try: import threading except ImportError: import dummy_threading as threading from django.core.cache import cach...
bsd-3-clause
zakuro9715/lettuce
tests/integration/lib/Django-1.3/django/contrib/gis/gdal/libgdal.py
156
3390
import os, re, sys from ctypes import c_char_p, CDLL from ctypes.util import find_library from django.contrib.gis.gdal.error import OGRException # Custom library path set? try: from django.conf import settings lib_path = settings.GDAL_LIBRARY_PATH except (AttributeError, EnvironmentError, ImportError): lib...
gpl-3.0
Alwnikrotikz/client175
cherrypy/lib/xmlrpc.py
17
1421
import sys import cherrypy def process_body(): """Return (params, method) from request body.""" try: import xmlrpclib return xmlrpclib.loads(cherrypy.request.body.read()) except Exception: return ('ERROR PARAMS', ), 'ERRORMETHOD' def patched_path(path): """Return 'path', doc...
gpl-3.0
G33KS44n/mysql-5.6
xtrabackup/test/python/subunit/tests/TestUtil.py
57
2790
# Copyright (c) 2004 Canonical Limited # Author: Robert Collins <robert.collins@canonical.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 of the License, or # (at y...
gpl-2.0
dbcls/dbcls-galaxy
scripts/cleanup_datasets/update_dataset_size.py
2
1229
#!/usr/bin/env python """ Updates dataset.size column. Remember to backup your database before running. """ import sys, os, ConfigParser import galaxy.app assert sys.version_info[:2] >= ( 2, 4 ) def main(): ini_file = sys.argv.pop(1) conf_parser = ConfigParser.ConfigParser( {'here':os.getcwd()} ) conf_pa...
mit
schambers/civmarket
civmarket/lib/python2.7/site-packages/django/contrib/gis/tests/layermap/models.py
230
2285
from django.contrib.gis.db import models class State(models.Model): name = models.CharField(max_length=20) objects = models.GeoManager() class County(models.Model): name = models.CharField(max_length=25) state = models.ForeignKey(State) mpoly = models.MultiPolygonField(srid=4269) # Multipolygon in...
apache-2.0
zhiwliu/openshift-ansible
roles/openshift_health_checker/library/etcdkeysize.py
59
3691
#!/usr/bin/python """Ansible module that recursively determines if the size of a key in an etcd cluster exceeds a given limit.""" from ansible.module_utils.basic import AnsibleModule try: import etcd IMPORT_EXCEPTION_MSG = None except ImportError as err: IMPORT_EXCEPTION_MSG = str(err) from collect...
apache-2.0
witchu/lua-brotli
brotli/setup.py
67
7796
import distutils from distutils.core import setup, Extension from distutils.command.build_ext import build_ext from distutils.cmd import Command import platform import os import re CURR_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) # when compiling for Windows Python 2.7, force distutils to use ...
apache-2.0
yotchang4s/cafebabepy
src/main/python/test/test_io.py
2
149301
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
bsd-3-clause
pitcons/flask-spyne
flask_spyne.py
1
2165
""" Provides Spyne support to Flask 2014 Robert Ayrapetyan <robert.ayrapetyan@gmail.com> License: BSD """ from werkzeug.wsgi import DispatcherMiddleware from spyne.application import Application from spyne.decorator import rpc, srpc from spyne.service import ServiceBase, ServiceBaseMeta from spyne.server.wsgi impor...
bsd-2-clause
gilisagreen/Project4
lib/werkzeug/testsuite/formparser.py
97
18740
# -*- coding: utf-8 -*- """ werkzeug.testsuite.formparser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the form parsing facilities. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from os.path import join, dirn...
apache-2.0
malexandre/python-xhtml2pdf-demo
reportlab/src/reportlab/pdfbase/_fontdata_widths_courierboldoblique.py
224
3664
widths = {'A': 600, 'AE': 600, 'Aacute': 600, 'Acircumflex': 600, 'Adieresis': 600, 'Agrave': 600, 'Aring': 600, 'Atilde': 600, 'B': 600, 'C': 600, 'Ccedilla': 600, 'D': 600, 'E': 600, 'Eacute': 600, 'Ecircumflex': 600, 'Edieresis': 600, 'Egrave': 600, 'Eth': 600, 'Euro': 600, 'F': 600, 'G': 600, '...
mit
KousikaGanesh/purchaseandInventory
openerp/addons/l10n_gr/__openerp__.py
170
1883
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 P. Christeas <p_christ@hol.gr>. All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
YangChihWei/w16b_test
static/Brython3.1.3-20150514-095342/Lib/decimal.py
623
230510
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # and Facundo Batista <facundo at taniquetil.com.ar> # and Raymond Hettinger <python at rcn.com> # and Aahz <aahz at pobox.com> # and Tim Peters # This module should be kept in sync with ...
agpl-3.0
hbrunn/OCB
openerp/report/render/rml.py
457
3244
# -*- 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
way2heavy/youtube-dl-1
youtube_dl/extractor/syfy.py
159
1827
from __future__ import unicode_literals import re from .common import InfoExtractor class SyfyIE(InfoExtractor): _VALID_URL = r'https?://www\.syfy\.com/(?:videos/.+?vid:(?P<id>[0-9]+)|(?!videos)(?P<video_name>[^/]+)(?:$|[?#]))' _TESTS = [{ 'url': 'http://www.syfy.com/videos/Robot%20Combat%20League/...
unlicense
v-iam/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/load_metric_report_info.py
2
1238
# 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 ...
mit
mszewczy/odoo
doc/_extensions/html_domain.py
254
4308
# -*- coding: utf-8 -*- """ Defines a "raw HTML" domain with a ``div[classes]`` and a number of roles rendered more or less directly to HTML. .. warning:: the purpose of this domain is *not* to document HTML or components """ from docutils import nodes, utils from docutils.parsers.rst import Directive, directiv...
agpl-3.0
Zearin/git-bup
lib/bup/drecurse.py
8
4318
import stat, os from bup.helpers import * import bup.xstat as xstat try: O_LARGEFILE = os.O_LARGEFILE except AttributeError: O_LARGEFILE = 0 try: O_NOFOLLOW = os.O_NOFOLLOW except AttributeError: O_NOFOLLOW = 0 # the use of fchdir() and lstat() is for two reasons: # - help out the kernel by not maki...
lgpl-2.1
mcepl/rope
ropetest/refactor/inlinetest.py
3
30640
try: import unittest2 as unittest except ImportError: import unittest import rope.base.exceptions from rope.refactor import inline from ropetest import testutils class InlineTest(unittest.TestCase): def setUp(self): super(InlineTest, self).setUp() self.project = testutils.sample_project(...
lgpl-3.0
cypod/arsenalsuite
python/blur/build.py
6
33209
import os import sys import string import re import shutil import traceback import cPickle import ConfigParser import exceptions import psutil from defaultdict import * All_Targets = [] Targets = [] Config_Replacement_File = None Args = [] Generated_Installers = {} try: import subprocess except: import popen...
gpl-2.0
cypod/arsenalsuite
python/pythondotnet/pythonnet/src/tests/stresstest.py
10
1383
# =========================================================================== # This software is subject to the provisions of the Zope Public License, # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE D...
gpl-2.0
supermeng/console
deploys/utils.py
2
2868
# -*- coding: utf-8 import requests def send_request(method, path, body, headers): return requests.request(method, path, headers=headers, json=body, timeout=10) def get_deployd_status(apiserver): url = "%s/api/status" % apiserver return send_request("GET", url, None, None) def create_podgroup(podgrou...
mit