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
chrispiech/chant
lib/flask/json.py
348
7530
# -*- coding: utf-8 -*- """ flask.jsonimpl ~~~~~~~~~~~~~~ Implementation helpers for the JSON support in Flask. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import io import uuid from datetime import datetime from .globals import current_app, request fro...
apache-2.0
EarthmanT/moto
tests/test_s3/test_s3_lifecycle.py
18
3339
from __future__ import unicode_literals import boto from boto.exception import S3ResponseError from boto.s3.lifecycle import Lifecycle, Transition, Expiration, Rule import sure # noqa from moto import mock_s3 @mock_s3 def test_lifecycle_create(): conn = boto.s3.connect_to_region("us-west-1") bucket = conn...
apache-2.0
nicklhy/mxnet
python/mxnet/context.py
20
5866
# 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
endlessm/eos-config-printer
utils.py
1
2044
#!/usr/bin/python3 # # utils.py # # Copyright (C) 2015 Endless Mobile, Inc. # Authors: # Mario Sanchez Prada <mario@endlessm.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 versio...
gpl-2.0
ATIX-AG/ansible
lib/ansible/modules/windows/win_iis_webapppool.py
43
7037
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Henrik Wallström <henrik@wallstroms.nu> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported...
gpl-3.0
21373colido/Marlin
Marlin/scripts/createTemperatureLookupMarlin.py
135
6246
#!/usr/bin/python """Thermistor Value Lookup Table Generator Generates lookup to temperature values for use in a microcontroller in C format based on: http://en.wikipedia.org/wiki/Steinhart-Hart_equation The main use is for Arduino programs that read data from the circuit board described here: http://make.rrrf.org/t...
gpl-3.0
scenarios/tensorflow
tensorflow/contrib/framework/python/ops/ops_test.py
37
2485
# 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
p4datasystems/CarnotKE
jyhton/lib-python/2.7/distutils/tests/test_spawn.py
138
1924
"""Tests for distutils.spawn.""" import unittest import os import time from test.test_support import captured_stdout, run_unittest from distutils.spawn import _nt_quote_args from distutils.spawn import spawn, find_executable from distutils.errors import DistutilsExecError from distutils.tests import support class Spa...
apache-2.0
RackHD/RackHD
test/templates/fit_test_template.py
13
4820
''' Copyright 2017, Dell Emc Author(s): FIT test script template Test Script summary: This template contains the basic script layout for functional test scripts. It includes examples of using the fit_common methods rackhdapi() to make RackHD API calls. It also shows an example of using the unittest class method. It ...
apache-2.0
dieseldev/diesel
setup.py
1
2254
import select, sys, os assert sys.version_info >= (2, 6), \ "Diesel requires python 2.6 (or greater 2.X release)" from setuptools import setup if os.system("which palmc > /dev/null 2>&1") == 0: os.system("palmc ./diesel/protocols ./diesel/protocols") additional_requires = [] if (os.environ.get('DIESEL_LIBEV') o...
bsd-3-clause
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/coverage/execfile.py
209
5865
"""Execute files of Python code.""" import imp, marshal, os, sys from coverage.backward import exec_code_object, open_source from coverage.misc import ExceptionDuringRun, NoCode, NoSource try: # In Py 2.x, the builtins were in __builtin__ BUILTINS = sys.modules['__builtin__'] except KeyError: # In Py 3....
bsd-3-clause
weiting-chen/manila
manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_single_svm.py
2
7148
# Copyright (c) 2015 Clinton Knight. 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 requir...
apache-2.0
BoriBori/cassava
cassava/automater.py
2
7733
import os import sys from Automater.siteinfo import SiteFacade from Automater.utilities import Parser, IPWrapper from Automater.outputs import SiteDetailOutput from Automater.inputs import TargetFile import tempfile import csv from dbcache import dbcache @dbcache def robtex(indicator): automater_source = 'robtex' ...
mit
aabbox/kbengine
kbe/src/lib/python/Lib/distutils/tests/test_install.py
81
8432
"""Tests for distutils.command.install.""" import os import sys import unittest import site from test.support import captured_stdout, run_unittest from distutils import sysconfig from distutils.command.install import install from distutils.command import install as install_module from distutils.command.build_ext imp...
lgpl-3.0
tdicola/DemoManMonitor
gtest-1.7.0/xcode/Scripts/versiongenerate.py
3088
4536
#!/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...
mit
tencentyun/python-sdk
python2/tencentyun/video.py
3
15235
# -*- coding: utf-8 -*- import os.path import time import sys import hashlib import requests from tencentyun import conf from .auth import Auth class Video(object): def __init__(self, appid, secret_id, secret_key): self.VIDEO_FILE_NOT_EXISTS = -1 self.VIDEO_NETWORK_ERROR = -2 self.VIDEO_P...
mit
bealdav/OpenUpgrade
addons/decimal_precision/decimal_precision.py
40
3939
# -*- encoding: 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 G...
agpl-3.0
mnahm5/django-estore
Lib/site-packages/pip/_vendor/distlib/markers.py
1261
6282
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # """Parser for the environment markers micro-language defined in PEP 345.""" import ast import os import sys import platform from .compa...
mit
josephbisch/deb-namecoin-core
qa/rpc-tests/invalidblockrequest.py
87
4077
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, Te...
mit
mateor/pants
contrib/android/tests/python/pants_test/contrib/android/tasks/test_aapt_builder_integration.py
14
3770
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
apache-2.0
jpautom/scikit-learn
sklearn/manifold/tests/test_isomap.py
226
3941
from itertools import product import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from sklearn import datasets from sklearn import manifold from sklearn import neighbors from sklearn import pipeline from sklearn import preprocessing from sklearn.utils.testing import assert_less ...
bsd-3-clause
ng110/pyqtgraph
pyqtgraph/flowchart/library/Data.py
35
12746
# -*- coding: utf-8 -*- from ..Node import Node from ...Qt import QtGui, QtCore import numpy as np from .common import * from ...SRTTransform import SRTTransform from ...Point import Point from ...widgets.TreeWidget import TreeWidget from ...graphicsItems.LinearRegionItem import LinearRegionItem from . import function...
mit
ArcherSys/ArcherSys
Lib/site-packages/django/core/serializers/xml_serializer.py
95
15035
""" XML serializer. """ from __future__ import unicode_literals from xml.dom import pulldom from xml.sax import handler from xml.sax.expatreader import ExpatParser as _ExpatParser from django.apps import apps from django.conf import settings from django.core.serializers import base from django.db import DEFAULT_DB_A...
mit
crwilcox/PTVS
Python/Tests/TestData/VirtualEnv/env/Lib/encodings/cp932.py
61
1062
# # cp932.py: Python Unicode Codec for CP932 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('cp932') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.Mul...
apache-2.0
rahuldhote/odoo
addons/account_budget/wizard/account_budget_crossovered_summary_report.py
373
2191
# -*- 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
huntxu/fuel-web
nailgun/nailgun/test/integration/test_cluster_changes_handler.py
2
72768
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, 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 requi...
apache-2.0
stasm/app-validator
setup.py
5
1172
from setuptools import setup, find_packages setup( name='app-validator', version='1.0', description='Validates open web apps.', long_description=open('README.md').read(), author='Matt Basta', author_email='me@mattbasta.com', url='http://github.com/mattbasta/app-validator', license='BSD...
bsd-3-clause
ZachRiegel/scriptbin
pypyjs/modules/test/test_startfile.py
120
1421
# Ridiculously simple test of the os.startfile function for Windows. # # empty.vbs is an empty file (except for a comment), which does # nothing when run with cscript or wscript. # # A possible improvement would be to have empty.vbs do something that # we can detect here, to make sure that not only the os.startfile() #...
gpl-3.0
googleapis/python-compute
google/cloud/compute_v1/services/firewall_policies/client.py
1
85233
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
briandailey/alembic
alembic/ddl/base.py
2
5570
import functools from sqlalchemy.ext.compiler import compiles from sqlalchemy.schema import DDLElement, Column from sqlalchemy import Integer from sqlalchemy import types as sqltypes class AlterTable(DDLElement): """Represent an ALTER TABLE statement. Only the string name and optional schema name of the table...
mit
luotao1/Paddle
python/paddle/fluid/tests/unittests/sequence/test_sequence_topk_avg_pooling.py
2
7321
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
ldoktor/autotest
frontend/shared/rest_client.py
6
8317
import copy, getpass, logging, pprint, re, urllib, urlparse import httplib2 from django.utils import datastructures, simplejson from autotest.frontend.afe import rpc_client_lib from autotest.client.shared import utils _request_headers = {} def _get_request_headers(uri): server = urlparse.urlparse(uri)[0:2] ...
gpl-2.0
Averroes/statsmodels
statsmodels/tools/testing.py
23
1443
"""assert functions from numpy and pandas testing """ import re from distutils.version import StrictVersion import numpy as np import numpy.testing as npt import pandas import pandas.util.testing as pdt # for pandas version check def strip_rc(version): return re.sub(r"rc\d+$", "", version) def is_pandas_min_v...
bsd-3-clause
40323144/2015cdb_g7
static/Brython3.1.1-20150328-091302/Lib/_struct.py
726
13787
# # This module is a pure Python version of pypy.module.struct. # It is only imported if the vastly faster pypy.module.struct is not # compiled in. For now we keep this version for reference and # because pypy.module.struct is not ootype-backend-friendly yet. # # this module 'borrowed' from # https://bitbucket.org/p...
gpl-3.0
en0x/script.etvguide
script.etvguide/itivicids.py
1
3904
# Copyright (C) 2016 Andrzej Mleczko import sys, re, copy import xbmc import datetime import os, xbmcaddon, xbmcgui import urlparse from strings import * from serviceLib import * serviceName = 'iTiVi' url = 'http://itivi.pl/program-telewizyjny/' COOKIE_FILE = os.path.j...
lgpl-3.0
Jenselme/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/filters/lint.py
979
4306
from __future__ import absolute_import, division, unicode_literals from gettext import gettext _ = gettext from . import _base from ..constants import cdataElements, rcdataElements, voidElements from ..constants import spaceCharacters spaceCharacters = "".join(spaceCharacters) class LintError(Exception): pass ...
mpl-2.0
ymow/nowin_core
nowin_core/tests/test_audio_stream.py
2
4941
import unittest from nowin_core.memory import audio_stream class TestAudioStream(unittest.TestCase): def testWrite(self): audioStream = audio_stream.AudioStream(3, 5) data = '1234567890' audioStream.write(data) # the buffer should be 123456789xxxxxxxxxxxxxxxxxxxxx now # b...
mit
dpo/nlpy
nlpy/optimize/ls/setup.py
3
1761
#!/usr/bin/env python def configuration(parent_package='',top_path=None): import numpy from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, NotFoundError import os config = Configuration('ls', parent_package, top_path) # Get info from site.cfg ...
gpl-3.0
weleen/mxnet
example/ssd/data/demo/download_demo_images.py
29
1615
# 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
dangeles/tissue_enrichment_tool_hypergeometric_test
tea_paper_docs/src/hgf_benchmark_script.py
4
14884
# -*- coding: utf-8 -*- """ A script to benchmark TEA. @david angeles dangeles@caltech.edu """ import tissue_enrichment_analysis as tea # the library to be used import pandas as pd import os import numpy as np import seaborn as sns import matplotlib.pyplot as plt import re import matplotlib as mpl sns.set_context('...
mit
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/domain/base/attribute.py
1
3914
''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 Licens...
gpl-3.0
facebook/sparts
sparts/tasks/tui.py
5
1860
# 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 in the same directory. # from sparts.vtask import VTask ...
bsd-3-clause
ajweiss/bitcoin
qa/rpc-tests/maxblocksinflight.py
128
3998
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import logging ...
mit
felliott/osf.io
addons/forward/models.py
10
1642
# -*- coding: utf-8 -*- from osf.utils.requests import get_request_and_user_id, get_headers_from_request from addons.base.models import BaseNodeSettings from dirtyfields import DirtyFieldsMixin from django.db import models from osf.exceptions import ValidationValueError from osf.models.validators import validate_no_ht...
apache-2.0
YarivCol/mbed-os
tools/host_tests/host_test.py
73
15433
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
tmenjo/cinder-2015.1.1
cinder/scheduler/scheduler_options.py
3
3491
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
gnowgi/gnowsys-studio
gstudio/urls/feeds.py
3
2535
# Copyright (c) 2011, 2012 Free Software Foundation # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later ver...
agpl-3.0
blaquee/volatility
volatility/plugins/mac/machine_info.py
58
1863
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
dnaatwork/Thylacine
node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
1835
1748
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
gpl-3.0
MatthewWilkes/mw4068-packaging
thirdparty/google_appengine/lib/django/django/template/context.py
32
3304
from django.conf import settings from django.core.exceptions import ImproperlyConfigured _standard_context_processors = None class ContextPopException(Exception): "pop() has been called more times than push()" pass class Context(object): "A stack container for variable context" def __init__(self, dic...
apache-2.0
mheap/ansible
lib/ansible/cli/__init__.py
8
40007
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
gpl-3.0
klochner/palabra
palabralib/gui_prefs.py
1
9570
# This file is part of Palabra # # Copyright (C) 2009 - 2011 Simeon Visser # # Palabra is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
sysalexis/kbengine
kbe/src/lib/python/Lib/encodings/uu_codec.py
77
2725
"""Python 'uu_codec' Codec - UU content transfer encoding. This codec de/encodes from bytes to bytes. Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were adapted from uu.py which was written by Lance Ellinghouse and modified by Jack Jansen and Fredrik Lundh. """ import codecs import binascii from io i...
lgpl-3.0
aboutsajjad/Bridge
app_packages/youtube_dl/extractor/freespeech.py
10
1082
from __future__ import unicode_literals from .common import InfoExtractor class FreespeechIE(InfoExtractor): IE_NAME = 'freespeech.org' _VALID_URL = r'https?://(?:www\.)?freespeech\.org/stories/(?P<id>.+)' _TEST = { 'add_ie': ['Youtube'], 'url': 'http://www.freespeech.org/stories/fcc-anno...
mit
bccp/abopt
abopt/algs/lbfgs.py
1
11580
""" This module implements the schemes of L-BFGS initial matrix tested in (GL) Some numerical experiments with variable-storage quasi-Newton algorithms, 1989, Gilbert, J.C. & Lemarechal, C. Mathematical Programming (1989) 45: 407. doi:10.1007/BF01589113 https://link.springer.com/article/1...
gpl-3.0
keithhamilton/blackmaas
lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.py
169
117500
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import with_metaclass import types from . import inputstream from . import tokenizer from . import treebuilders from .treebuilders._base import Marker from . import utils from . import constants from .constants import spaceChara...
bsd-3-clause
weiawe/django
tests/model_meta/models.py
99
4711
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models class Relation(models.Model): pass class AbstractPerson(models.Model): # DATA fields data_abstract = models.CharField(max_len...
bsd-3-clause
srippa/nn_deep
tf/libs/vae.py
3
18755
"""Convolutional/Variational autoencoder, including demonstration of training such a network on MNIST, CelebNet and the film, "Sita Sings The Blues" using an image pipeline. Copyright Parag K. Mital, January 2016 """ import tensorflow as tf import numpy as np import os from libs.dataset_utils import create_input_pipel...
mit
allenlavoie/tensorflow
tensorflow/python/ops/nn_grad.py
4
34519
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
neharejanjeva/techstitution
app/logs/venv/lib/python2.7/site-packages/setuptools/command/install_scripts.py
454
2439
from distutils import log import distutils.command.install_scripts as orig import os import sys from pkg_resources import Distribution, PathMetadata, ensure_directory class install_scripts(orig.install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" def initialize_options(self): ...
cc0-1.0
rafalmiel/glmark2-wl
waflib/Tools/javaw.py
12
8859
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import sys if sys.hexversion < 0x020400f0: from sets import Set as set import os,re,tempfile,shutil from waflib.Configure import conf from waflib import TaskGen,Task,Utils,Opt...
gpl-3.0
tersmitten/ansible-modules-extras
cloud/profitbricks/profitbricks.py
112
20794
#!/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
Jorge-Rodriguez/ansible
lib/ansible/modules/network/aci/mso_schema_template_l3out.py
4
5788
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.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_ve...
gpl-3.0
tarzan0820/odoo
addons/product_visible_discount/product_visible_discount.py
165
5466
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
chp1084/raft
analyzers/ASPNetApplicationServerErrors.py
11
2330
# # Authors: # Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT 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 th...
gpl-3.0
rstutsman/RAMCloud
scripts/recoverymetrics.py
16
39520
#!/usr/bin/env python # Copyright (c) 2011 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
isc
ashbc/tgrsite
minutes/models.py
1
2554
from django.core.validators import RegexValidator from django.db import models from django.urls import reverse from django.utils.timezone import now from users import models as users # Create your models here. class Folder(models.Model): name = models.CharField(max_length=30, help_tex...
isc
makermade/arm_android-21_arm-linux-androideabi-4.8
lib/python2.7/encodings/mac_arabic.py
593
36723
""" Python Character Mapping Codec generated from 'VENDORS/APPLE/ARABIC.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
gpl-2.0
Venturi/oldcms
env/lib/python2.7/site-packages/django/http/__init__.py
98
1186
from django.http.cookie import SimpleCookie, parse_cookie from django.http.request import (HttpRequest, QueryDict, RawPostDataException, UnreadablePostError, build_request_repr) from django.http.response import ( HttpResponse, StreamingHttpResponse, FileResponse, HttpResponseRedirect, HttpResponsePermanentR...
apache-2.0
FairCoinTeam/electrum-fair
plugins/hw_wallet/hw_wallet.py
7
3343
#!/usr/bin/env python2 # -*- mode: python -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2016 The Electrum developers # # 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...
mit
zzzombat/lucid-python-django
django/core/management/commands/inspectdb.py
203
7614
import keyword from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django.db import connections, DEFAULT_DB_ALIAS class Command(NoArgsCommand): help = "Introspects the database tables in the given database and outputs a Django model module." option_list =...
bsd-3-clause
lz1988/django-web2015
django/core/management/commands/testserver.py
307
2006
from django.core.management.base import BaseCommand from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noinput', action='store_false', dest='interactive', default=True, help='Tells Django to NOT prompt the user for input of any...
bsd-2-clause
ralphtheninja/cjdns
node_build/dependencies/libuv/build/gyp/test/mac/gyptest-strip-default.py
232
2448
#!/usr/bin/env python # 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. """ Verifies that the default STRIP_STYLEs match between different generators. """ import TestGyp import re import subprocess import sys i...
gpl-3.0
miragshin/twitter
twitter/cmdline.py
10
25778
# encoding: utf-8 """ USAGE: twitter [action] [options] ACTIONS: authorize authorize the command-line tool to interact with Twitter follow follow a user friends get latest tweets from your friends (default action) help print this help text that you are currently reading leave ...
mit
molotof/infernal-twin
build/pillow/PIL/MspImagePlugin.py
26
2221
# # The Python Imaging Library. # $Id$ # # MSP file handling # # This is the format used by the Paint program in Windows 1 and 2. # # History: # 95-09-05 fl Created # 97-01-03 fl Read/write MSP images # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1995-97. # # See the README fi...
gpl-3.0
AliHaghani/ViralPoll
node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
1361
45045
# 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. r"""Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. Th...
mit
unstablesun/MissleDefence
Assets/JSON/Chords.py
1
2995
# Chords chord_dict = { '':['major','1','3','5'], 'm':['minor','1','b3','5'], 'min':['minor','1','b3','5'], '5':['power cord','1','5'], '+':['augmented','1','3','#5'], 'aug':['augmented','1','3','#5'], 'dim':['diminished','1','b3','b5'], 'sus4':['suspended 4th','1','4','5'], 'sus2':['suspended 2nd','1','2','5'], '6':...
agpl-3.0
halvertoluke/edx-platform
lms/envs/common.py
1
91414
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
agpl-3.0
donberna/django-badger
badger/utils.py
7
2772
from django.conf import settings from django.db.models import signals import badger from badger.models import Badge, Award, Progress def update_badges(badge_data, overwrite=False): """Creates or updates list of badges :arg badge_data: list of dicts. keys in the dict correspond to the Badge model cla...
bsd-3-clause
syci/OCB
addons/sale_mrp/tests/test_sale_mrp_flow.py
23
19151
# -*- coding: utf-8 -*- from openerp.tests import common from datetime import datetime class TestSaleMrpFlow(common.TransactionCase): def setUp(self): super(TestSaleMrpFlow, self).setUp() # Useful models self.SaleOrderLine = self.env['sale.order.line'] self.SaleOrder = self.env['...
agpl-3.0
psiinon/addons-server
src/olympia/devhub/tasks.py
1
27783
# -*- coding: utf-8 -*- import datetime import hashlib import json import os import subprocess import tempfile from copy import deepcopy from decimal import Decimal from functools import wraps from zipfile import BadZipfile from django.conf import settings from django.core.cache import cache from django.core.files.st...
bsd-3-clause
mujiansu/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/wsgiref/util.py
58
5605
"""Miscellaneous WSGI-related Utilities""" import posixpath __all__ = [ 'FileWrapper', 'guess_scheme', 'application_uri', 'request_uri', 'shift_path_info', 'setup_testing_defaults', ] class FileWrapper: """Wrapper to convert file-like objects to iterables""" def __init__(self, filelike, blksize=819...
apache-2.0
40123103/2015cd_40123103
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/dummy/connection.py
707
3049
# # Analogue of `multiprocessing.connection` which uses queues instead of sockets # # multiprocessing/dummy/connection.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditi...
gpl-3.0
qingpingguo/git-repo
manifest_xml.py
48
21259
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
PennPanda/litmus-rt
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed 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 failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
peterayeni/libforensics
code/lf/win/con/dtypes.py
13
1097
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics 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 3 of the License, or # (at your option) any later ver...
lgpl-3.0
jarvisxiong/learn-python3
samples/multitask/task_worker.py
19
1096
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import time, sys, queue from multiprocessing.managers import BaseManager # 创建类似的QueueManager: class QueueManager(BaseManager): pass # 由于这个QueueManager只从网络上获取Queue,所以注册时只提供名字: QueueManager.register('get_task_queue') QueueManager.register('get_result_queue') # 连接到服务器...
gpl-2.0
paweljasinski/ironpython3
Src/StdLib/Lib/test/test_wsgiref.py
15
22140
from __future__ import nested_scopes # Backward compat for 2.1 from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple...
apache-2.0
jjmiranda/edx-platform
common/test/acceptance/pages/lms/annotation_component.py
159
3645
""" Annotation Component Page. """ from bok_choy.page_object import PageObject from selenium.webdriver import ActionChains class AnnotationComponentPage(PageObject): """ View of annotation component page. """ url = None active_problem = 0 def is_browser_on_page(self): return self.q(c...
agpl-3.0
kyungmi/webida-server
src/ext/cordova-weinre/weinre.build/scripts/gen-changelog.py
7
3068
#!/usr/bin/env python #------------------------------------------------------------------------------- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Th...
apache-2.0
Stanford-Online/edx-platform
common/djangoapps/track/views/tests/base.py
21
3925
""" Base class for tests related to emitted events to one of the tracking 'views' (e.g. SegmentIO). """ import json from mock import sentinel from django.test.client import RequestFactory from django.test.utils import override_settings from track.views import segmentio from track.tests import EventTrackingTestCase ...
agpl-3.0
zzacharo/inspire-next
inspirehep/modules/literaturesuggest/bundles.py
6
1367
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
gpl-3.0
brennanmorell/Mariner
HistoricalRunner.py
1
1949
import gdax import time, calendar import datetime import signal, sys from HistoricalEngine import HistoricalEngine class HistoricalRunner(): def __init__(self): #BTC_TICKER = 'BTC-USD' ETH_TICKER = 'ETH-USD' #LTC_TICKER = 'LTC-USD' #btc_client = PublicClient(product_id=BTC_TICKER) eth_client = gdax.Public...
mit
leitao/nvme-cli
tests/nvme_test_logger.py
7
1733
# Copyright (c) 2015-2016 Western Digital Corporation or its affiliates. # # 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 versio...
gpl-2.0
ndingwall/scikit-learn
sklearn/ensemble/__init__.py
12
1655
""" The :mod:`sklearn.ensemble` module includes ensemble-based methods for classification, regression and anomaly detection. """ import typing from ._base import BaseEnsemble from ._forest import RandomForestClassifier from ._forest import RandomForestRegressor from ._forest import RandomTreesEmbedding from ._forest i...
bsd-3-clause
zhaodelong/django
tests/utils_tests/test_autoreload.py
191
7073
import os import shutil import tempfile from importlib import import_module from django import conf from django.contrib import admin from django.test import SimpleTestCase, override_settings from django.test.utils import extend_sys_path from django.utils import autoreload from django.utils._os import npath LOCALE_PAT...
bsd-3-clause
Menooker/gem5_pcm
tests/configs/o3-timing-mp.py
56
2396
# Copyright (c) 2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
rghe/ansible
lib/ansible/modules/network/cloudengine/ce_vrf_af.py
43
30343
#!/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 distribut...
gpl-3.0
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/lib2to3/refactor.py
23
28072
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Refactoring framework. Used as a main program, this can refactor any number of files and/or recursively descend down directories. Imported as a module, this provides infrastructure to write your own refactoring too...
gpl-2.0
popazerty/EG-2
lib/python/Components/ChoiceList.py
4
1673
from MenuList import MenuList from Tools.Directories import SCOPE_ACTIVE_SKIN, resolveFilename from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont from Tools.LoadPixmap import LoadPixmap from Tools.Directories import fileExists import skin def ChoiceEntryComponent(key="", text=None): if not text: tex...
gpl-2.0