repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
thundernet8/WRGameVideos-API
venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py
11
6843
# util/compat.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Handle Python version/platform incompatibilities.""" import sys try: import ...
gpl-2.0
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_images_operations.py
1
29335
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
hollabaq86/haikuna-matata
env/lib/python2.7/site-packages/flask_script/cli.py
66
2780
# -*- coding: utf-8 -*- import getpass from ._compat import string_types, ascii_lowercase, input def prompt(name, default=None): """ Grab user input from command line. :param name: prompt text :param default: default value if no input provided. """ prompt = name + (default and ' [%s]' % defa...
mit
wubr2000/googleads-python-lib
examples/dfp/v201411/activity_service/get_all_activities.py
4
1934
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
nunezro2/cassandra_cs597
pylib/cqlshlib/test/test_cqlsh_completion.py
5
11789
# 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
msiedlarek/qtwebkit
Tools/Scripts/webkitpy/common/config/ports_mock.py
121
2482
# Copyright (C) 2011 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 f...
lgpl-3.0
gigq/flasktodo
werkzeug/security.py
25
3570
# -*- coding: utf-8 -*- """ werkzeug.security ~~~~~~~~~~~~~~~~~ Security related helpers such as secure password hashing tools. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import hmac import string from random import Sys...
mit
pradyu1993/scikit-learn
sklearn/gaussian_process/gaussian_process.py
1
34415
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # License: BSD style import numpy as np from scipy import linalg, optimize, rand from ..base import BaseEstimator, RegressorMixin from ..metrics.pairwise import m...
bsd-3-clause
devendermishrajio/nova
nova/network/minidns.py
59
7113
# Copyright 2011 Andrew Bogott for the Wikimedia Foundation # # 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
danielneis/osf.io
api/base/utils.py
3
4028
# -*- coding: utf-8 -*- from modularodm import Q from modularodm.exceptions import NoResultsFound from rest_framework.exceptions import NotFound from rest_framework.reverse import reverse import furl from website import util as website_util # noqa from website import settings as website_settings from framework.auth i...
apache-2.0
roadmapper/ansible
test/units/modules/storage/netapp/test_na_ontap_unix_group.py
23
11651
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ans...
gpl-3.0
sfprime/pattern
pattern/server/cherrypy/cherrypy/_cptools.py
39
18999
"""CherryPy tools. A "tool" is any helper, adapted to CP. Tools are usually designed to be used in a variety of ways (although some may only offer one if they choose): Library calls All tools are callables that can be used wherever needed. The arguments are straightforward and should be detailed w...
bsd-3-clause
SteveHNH/ansible
lib/ansible/modules/utilities/logic/set_stats.py
58
1935
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2016 Ansible RedHat, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
anthraxx/pwndbg
pwndbg/regs.py
2
14879
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Reading register value from the inferior, and provides a standardized interface to registers like "sp" and "pc". """ import collections import ctypes import re import sys from types import ModuleType import gdb import pwndbg.arch import pwndbg.events import pwndbg.mem...
mit
simongoffin/website_version
addons/crm/report/report_businessopp.py
377
6269
# -*- 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
matiasb/django
django/core/management/commands/check.py
316
1892
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import apps from django.core import checks from django.core.checks.registry import registry from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = "Checks the entire Django project for p...
bsd-3-clause
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/core/internals.py
1
151884
import copy import itertools import re import operator from datetime import datetime, timedelta from collections import defaultdict import numpy as np from pandas.core.base import PandasObject from pandas.core.common import (_possibly_downcast_to_dtype, isnull, _NS_DTYPE, _TD_DTYPE, AB...
mit
promptworks/horizon
openstack_dashboard/dashboards/admin/hypervisors/tabs.py
59
1512
# 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 th...
apache-2.0
ravindrapanda/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/deterministic_test.py
100
11789
# 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
mitdbg/modeldb
client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetUrlForArtifact.py
1
1082
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class ModeldbGetUrlForArtifact(BaseType): def __init__(self, id=None, key=None, method=None, artifact_type=None): required = { "id": False, "key": False, "method": False, "artifact_type": False, }...
mit
Stargrazer82301/CAAPR
CAAPR/CAAPR_AstroMagic/PTS/pts/core/simulation/units.py
2
16178
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
mit
carolinux/QGIS
python/plugins/GdalTools/GdalTools.py
4
20971
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : GdalTools Description : Integrate gdal tools into qgis Date : 17/Sep/09 copyright : (C) 2009 by Lorenzo Masini (Faunalia) email : lorenxo86@...
gpl-2.0
semonte/intellij-community
plugins/hg4idea/testData/bin/mercurial/hbisect.py
92
9226
# changelog bisection for mercurial # # Copyright 2007 Matt Mackall # Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org> # # Inspired by git bisect, extension skeleton taken from mq.py. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 ...
apache-2.0
pubnub/Zopkio
test/samples/sample_input.py
4
1081
# Copyright 2014 LinkedIn Corp. # # 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....
apache-2.0
40223235/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/keyword.py
761
2049
#! /usr/bin/env python3 """Keywords (from "graminit.c") This file is automatically generated; please don't muck it up! To update the symbols in this file, 'cd' to the top directory of the python source tree after building the interpreter and run: ./python Lib/keyword.py """ __all__ = ["iskeyword", "kwlist"] k...
gpl-3.0
eefriedman/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/filters/whitespace.py
1730
1142
from __future__ import absolute_import, division, unicode_literals import re from . import _base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(_base.Filter): spacePreserveElements = frozenset...
mpl-2.0
guymakam/Kodi-Israel
plugin.video.israelive/resources/lib/livestreamer/stream/akamaihd.py
37
7880
import base64 import io import hashlib import hmac import random from .stream import Stream from .wrappers import StreamIOThreadWrapper, StreamIOIterWrapper from ..buffers import Buffer from ..compat import str, bytes, urlparse from ..exceptions import StreamError from ..utils import swfdecompress from ..packages.fl...
gpl-2.0
leelasd/OPLS-AAM_for_Gromacs
GMX_TEST/GXG/K/NAMD_GMX_DIFF.py
45
1077
import os from collections import OrderedDict import sys fil = open('energy.xvg').readlines() GMX_dat = [float(f)/4.184 for f in fil[-1].split()[1:-1]] nfil = open('LOG_NAMD').readlines() for line in nfil: if 'ENERGY: 0' in line: NAMD_DAT = [float(f) for f in line.split()[2:12]] break #pr...
mit
catapult-project/catapult-csm
third_party/gsutil/third_party/boto/boto/ec2/zone.py
152
2601
# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # 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, modi...
bsd-3-clause
dfdx2/django
django/core/files/images.py
56
2377
""" Utility functions for handling images. Requires Pillow as you might imagine. """ import struct import zlib from django.core.files import File class ImageFile(File): """ A mixin for use alongside django.core.files.base.File, which provides additional features for dealing with images. """ @pro...
bsd-3-clause
ludbb/secp256k1-py
tests/test_schnorr.py
1
1732
import pytest import secp256k1 def test_schnorr_simple(): if not secp256k1.HAS_SCHNORR: pytest.skip('secp256k1_schnorr not enabled, skipping') return inst = secp256k1.PrivateKey() raw_sig = inst.schnorr_sign(b'hello') assert inst.pubkey.schnorr_verify(b'hello', raw_sig) key2 = se...
mit
zeurocoin-dev/zeurocoin
qa/rpc-tests/prioritise_transaction.py
45
5993
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test PrioritiseTransaction code # from test_framework.test_framework import BitcoinTestFramework from tes...
mit
manran/django-allauth
allauth/socialaccount/models.py
35
11682
from __future__ import absolute_import from django.core.exceptions import PermissionDenied from django.db import models from django.contrib.auth import authenticate from django.contrib.sites.models import Site from django.utils.encoding import python_2_unicode_compatible from django.utils.crypto import get_random_stri...
mit
jmartinezchaine/OpenERP
openerp/addons/l10n_es/__openerp__.py
8
2396
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2008-2010 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Jordi Esteve <jesteve@zikzakmedia.com> # $Id$...
agpl-3.0
aliyun/oss-ftp
python27/win32/Lib/pickle.py
35
45163
"""Create portable serialized representations of Python objects. See module cPickle for a (much) faster implementation. See module copy_reg for a mechanism for registering custom picklers. See module pickletools source for extensive comments. Classes: Pickler Unpickler Functions: dump(object, file) ...
mit
xin3liang/platform_external_chromium_org_third_party_libjingle_source_talk
PRESUBMIT.py
2
5115
# libjingle # Copyright 2013 Google Inc. # # 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 retain the above copyright notice, # this list of conditions and the following dis...
bsd-3-clause
Youwotma/portia
slybot/slybot/pageactions.py
1
1528
import json import re LUA_SOURCE = """ function main(splash) assert(splash:go(splash.args.url)) assert(splash:runjs(splash.args.js_source)) assert(splash:wait_for_resume(splash.args.slybot_actions_source)) splash:set_result_content_type("text/html") return splash.html() end """ JS_SOURCE = """ fun...
bsd-3-clause
PRIMEDesigner15/PRIMEDesigner15
dependencies/Lib/encodings/palmos.py
219
13519
""" Python Character Mapping Codec for PalmOS 3.5. Written by Sjoerd Mullender (sjoerd@acm.org); based on iso8859_15.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,i...
bsd-3-clause
prospwro/odoo
addons/mrp_byproduct/mrp_byproduct.py
108
8932
# -*- 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
Erotemic/utool
utool/util_decor.py
1
35459
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from six.moves import builtins import inspect import textwrap import six import sys import functools import os from utool import util_print from utool import util_time from utool import util_iter from utool import...
apache-2.0
phlax/pootle
pootle/apps/pootle_store/migrations/0001_initial.py
5
7063
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc import translate.storage.base import pootle_store.fields import pootle.core.mixins.treeitem from django.conf import settings import django.db.models.fields.fil...
gpl-3.0
AlexRobson/scikit-learn
sklearn/cluster/setup.py
263
1449
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause import os from os.path import join import numpy from sklearn._build_utils import get_blas_info def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration cblas_libs, blas_info = ...
bsd-3-clause
jimmycallin/master-thesis
architectures/nn_discourse_parser/nets/data_reader.py
1
6857
import json import codecs class DRelation(object): """Implicit discourse relation object The object is created from the CoNLL-json formatted data. The format can be a bit clunky to get certain information. So convenient methods should be implemented here mostly to be used by the feature functions ...
mit
m0re4u/LeRoT-SCLP
lerot/tests/test_utils.py
1
4440
# This file is part of Lerot. # # Lerot 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 version. # # Lerot is distributed in the hope tha...
gpl-3.0
mclois/iteexe
twisted/python/compat.py
17
5524
# -*- test-case-name: twisted.test.test_compat -*- # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Compatability module to provide backwards compatability for useful Python features. This is mainly for use of internal Twisted code. We encourage you to use the latest version of...
gpl-2.0
edx-solutions/edx-platform
common/test/acceptance/pages/common/auto_auth.py
4
3779
""" Auto-auth page (used to automatically log in during testing). """ import json import os from six.moves import urllib from bok_choy.page_object import PageObject, unguarded # The URL used for user auth in testing HOSTNAME = os.environ.get('BOK_CHOY_HOSTNAME', 'localhost') CMS_PORT = os.environ.get('BOK_CHOY_CMS_...
agpl-3.0
rwl/openpowersystem
cdpsm/iec61970/core/voltage_level.py
1
2591
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # 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; version 2 dated June...
agpl-3.0
bnprk/django-oscar
src/oscar/apps/dashboard/catalogue/tables.py
27
2631
from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _, ungettext_lazy from django_tables2 import Column, LinkColumn, TemplateColumn, A from oscar.core.loading import get_class, get_model DashboardTable = get_class('dashboard.tables', 'DashboardTable') Product = get_mod...
bsd-3-clause
armab/st2contrib
packs/typeform/sensors/registration_sensor.py
7
5690
# Requirements: # See ../requirements.txt import eventlet import httplib import MySQLdb import MySQLdb.cursors import requests from six.moves import urllib_parse from st2reactor.sensor.base import PollingSensor BASE_URL = 'https://api.typeform.com/v0/form/' EMAIL_FIELD = "email_7723200" FIRST_NAME_FIELD = "textfield...
apache-2.0
camilonova/sentry
src/sentry/utils/runner.py
1
11831
#!/usr/bin/env python """ sentry.utils.runner ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function from logan.runner import run_app, configure_app import base64 import os impo...
bsd-3-clause
biswajitsahu/kuma
vendor/packages/translate/misc/dictutils.py
24
5941
#!/usr/bin/env python # -*- coding: utf-8 -*- """Implements a case-insensitive (on keys) dictionary and order-sensitive dictionary""" # Copyright 2002, 2003 St James Software # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU Gener...
mpl-2.0
wuhengzhi/chromium-crosswalk
tools/perf/core/trybot_command.py
3
19574
# Copyright 2015 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 argparse import os import logging import platform import re import subprocess import urllib2 import json from core import path_util from telemetry i...
bsd-3-clause
royrobsen/my_project_name
vendor/doctrine/orm/docs/en/conf.py
2448
6497
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
mit
ml-lab/neon
neon/optimizers/__init__.py
4
1067
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
apache-2.0
jetskijoe/SickGear
tests/name_parser_tests.py
1
28709
from __future__ import print_function import datetime import os.path import test_lib as test import sys import unittest sys.path.insert(1, os.path.abspath('..')) sys.path.insert(1, os.path.abspath('../lib')) from sickbeard.name_parser import parser import sickbeard sickbeard.SYS_ENCODING = 'UTF-8' DEBUG = VERBOSE ...
gpl-3.0
fbsder/openthread
tests/scripts/thread-cert/Cert_5_2_07_REEDSynchronization.py
2
4471
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 retain the above copyright # ...
bsd-3-clause
sycolon/lge_g3_kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
eckucukoglu/sober-kernel
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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. # # This program i...
gpl-2.0
ganga-devs/ganga
ganga/GangaDirac/Lib/Server/DiracCommands.py
1
18300
# Dirac commands #/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ @diracCommand def getJobGroupJobs(jg): ''' Return jobs in a group''' return dirac.selectJobs(jobGroup=jg) @diracCommand def kill(id): ''' Kill a given DIRAC Job ID within DIRAC ''' return dirac.deleteJob(id) ...
gpl-2.0
abimannans/scikit-learn
examples/tree/plot_tree_regression_multioutput.py
206
1800
""" =================================================================== Multi-output Decision Tree Regression =================================================================== An example to illustrate multi-output regression with decision tree. The :ref:`decision trees <tree>` is used to predict simultaneously the ...
bsd-3-clause
hazelnusse/sympy-old
sympy/thirdparty/pyglet/pyglet/window/carbon/quartzkey.py
5
6154
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
argriffing/scipy
scipy/sparse/csgraph/tests/test_traversal.py
92
2390
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_array_almost_equal from scipy.sparse.csgraph import breadth_first_tree, depth_first_tree,\ csgraph_to_dense, csgraph_from_dense def test_graph_breadth_first(): csgraph = np.array([[0, 1, 2, 0,...
bsd-3-clause
timthelion/FreeCAD_sf_master
src/Mod/Cam/Init.py
55
1871
# FreeCAD init script of the Cam module # (c) 2007 Juergen Riegel #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * #* * #* This f...
lgpl-2.1
peterbe/bramble
vendor-local/lib/python/werkzeug/debug/__init__.py
81
7867
# -*- coding: utf-8 -*- """ werkzeug.debug ~~~~~~~~~~~~~~ WSGI application traceback debugger. :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import mimetypes from os.path import join, dirname, basename, isfile from werkzeu...
mpl-2.0
anandbhoraskar/Diamond
src/collectors/nginx/nginx.py
8
3924
# coding=utf-8 """ Collect statistics from Nginx #### Dependencies * urllib2 #### Usage To enable the nginx status page to work with defaults, add a file to /etc/nginx/sites-enabled/ (on Ubuntu) with the following content: <pre> server { listen 127.0.0.1:8080; server_name localhost; location /...
mit
pearsonlab/nipype
nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py
12
4206
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..specialized import BRAINSConstellationDetector def test_BRAINSConstellationDetector_inputs(): input_map = dict(BackgroundFillValue=dict(argstr='--BackgroundFillValue %s', ), LLSModel=dict(argstr='--LLSModel ...
bsd-3-clause
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/django/contrib/admin/tests.py
113
7451
from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test import modify_settings from django.test.selenium import SeleniumTestCase from django.utils.deprecation import MiddlewareMixin from django.utils.translation import ugettext as _ class CSPMiddleware(MiddlewareMixin): """The adm...
mit
mkheirkhah/ns-3.23
wutils.py
47
8681
import os import os.path import re import sys import subprocess import shlex # WAF modules from waflib import Options, Utils, Logs, TaskGen, Build, Context from waflib.Errors import WafError # these are set from the main wscript file APPNAME=None VERSION=None bld=None def get_command_template(env, arguments=()): ...
gpl-2.0
rafaelvieiras/script.pseudotv.live
resources/lib/ChannelListThread.py
1
9795
# Copyright (C) 2011 Jason Anderson # # # This file is part of PseudoTV. # # PseudoTV 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
fresskarma/tinyos-1.x
contrib/GGB/tools/java/net/tinyos/sentri/prepare_app.py
2
2628
#!/usr/bin/python # $Id: prepare_app.py,v 1.1 2006/12/01 00:57:00 binetude Exp $ # "Copyright (c) 2000-2003 The Regents of the University of California. # All rights reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose, without fee, and without written ...
bsd-3-clause
ralscha/extdirectspring
addsettings.py
5
1330
#!/usr/bin/env python import sys import os import os.path import xml.dom.minidom if os.environ["TRAVIS_SECURE_ENV_VARS"] == "false": print "no secure env vars available, skipping deployment" sys.exit() homedir = os.path.expanduser("~") m2 = xml.dom.minidom.parse(homedir + '/.m2/settings.xml') settings = m2.getEl...
apache-2.0
sosreport/sos
sos/presets/redhat/__init__.py
4
2870
# Copyright (C) 2020 Red Hat, Inc., Jake Hunsaker <jhunsake@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU Gen...
gpl-2.0
40223136/w17test1
static/Brython3.1.0-20150301-090019/Lib/collections/__init__.py
625
25849
#__all__ = ['deque', 'defaultdict', 'Counter'] from _collections import deque, defaultdict #from itertools import repeat as _repeat, chain as _chain, starmap as _starmap __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict'] # For bootstrapping re...
gpl-3.0
syed/PerfKitBenchmarker
perfkitbenchmarker/static_virtual_machine.py
2
10858
# Copyright 2014 PerfKitBenchmarker 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 appli...
apache-2.0
janebeckman/gpdb
gpMgmt/bin/gppylib/commands/unix.py
9
33309
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2008. All Rights Reserved. # """ Set of Classes for executing unix commands. """ import os import platform import psutil import socket import signal import uuid from gppylib.gplog import get_default_logger from gppylib.commands.base import * logger = get_default_...
apache-2.0
prune998/ansible
test/units/modules/network/eos/test_eos_user.py
41
3952
# 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 in the hope that ...
gpl-3.0
bzero/statsmodels
examples/incomplete/ols_table.py
34
1999
"""Example: statsmodels.OLS """ from statsmodels.datasets.longley import load import statsmodels.api as sm from statsmodels.iolib.table import SimpleTable, default_txt_fmt import numpy as np data = load() data_orig = (data.endog.copy(), data.exog.copy()) #.. Note: In this example using zscored/standardized variable...
bsd-3-clause
AnoopAlias/nDeploy
scripts/update_cluster_ipmap.py
1
1898
#!/usr/bin/env python import yaml import argparse import os __author__ = "Anoop P Alias" __copyright__ = "Copyright 2014, PiServe Technologies Pvt Ltd , India" __license__ = "GPL" __email__ = "anoop.alias@piserve.com" installation_path = "/opt/nDeploy" # Absolute Installation Path cluster_config_file = installat...
gpl-3.0
letouriste001/SmartForest_2.0
python3.4Smartforest/lib/python3.4/site-packages/django/db/migrations/recorder.py
1
2868
from __future__ import unicode_literals from django.apps.registry import Apps from django.db import models from django.db.utils import DatabaseError from django.utils.encoding import python_2_unicode_compatible from django.utils.timezone import now from .exceptions import MigrationSchemaMissing class MigrationRecor...
mit
Designist/audacity
lib-src/lv2/sord/waflib/ansiterm.py
177
8189
#! /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,os try: if not(sys.stderr.isatty()and sys.stdout.isatty()): raise ValueError('not a tty') from ctypes import Structure,windll,c_short,c_ushort,c_ulong,c_int,byr...
gpl-2.0
staffanm/layeredconfig
layeredconfig/dictsource.py
1
1625
# this should possibly be a abstract class as well from . import ConfigSource class DictSource(ConfigSource): def __init__(self, **kwargs): """If your backend data is exposable as a python dict, you can subclass from this class to avoid implementing :py:meth:`has`, :py:meth:`get`, :py:meth...
bsd-3-clause
backenklee/RIOT
dist/tools/cc2538-bsl/cc2538-bsl.py
48
44987
#!/usr/bin/env python # Copyright (c) 2014, Jelmer Tiete <jelmer@tiete.be>. # 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 retain the above copyright #...
lgpl-2.1
tgbugs/hypush
test/memex/models/user_identity_test.py
1
6800
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest import sqlalchemy.exc from hyputils.memex import models from hyputils.memex._compat import PY2 class TestUserIdentity(object): def test_you_can_save_and_then_retrieve_field_values( self, db_session, matchers, user ): ...
mit
Kongsea/tensorflow
tensorflow/contrib/distributions/python/ops/shape.py
41
19747
# 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
bocaaust/FreshLife
django_project/env/lib/python2.7/site-packages/django/template/debug.py
110
3602
from django.template.base import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError from django.utils.encoding import force_text from django.utils.html import escape from django.utils.safestring import SafeData, EscapeData from django.utils.formats import localize from django.utils.timezone import templ...
apache-2.0
ecsark/storm-static
storm-core/src/dev/resources/tester_spout.py
37
1524
# -*- coding: utf-8 -*- # 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 # ...
apache-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.7.2/Lib/encodings/utf_16.py
404
3984
""" Python 'utf-16' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs, sys ### Codec APIs encode = codecs.utf_16_encode def decode(input, errors='strict'): return codecs.utf_16_decode(input, errors, True) class IncrementalEncoder(c...
mit
razvanphp/arangodb
3rdParty/V8-3.31.74.1/third_party/python_26/Lib/site-packages/win32comext/shell/demos/servers/empty_volume_cache.py
37
7597
# A sample implementation of IEmptyVolumeCache - see # http://msdn2.microsoft.com/en-us/library/aa969271.aspx for an overview. # # * Execute this script to register the handler # * Start the "disk cleanup" tool - look for "pywin32 compiled files" import sys, os, stat, time import pythoncom from win32com.shell import sh...
apache-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/dask/array/ghost.py
2
9953
from warnings import warn from . import overlap def fractional_slice(task, axes): """ >>> fractional_slice(('x', 5.1), {0: 2}) # doctest: +SKIP (getitem, ('x', 6), (slice(0, 2),)) >>> fractional_slice(('x', 3, 5.1), {0: 2, 1: 3}) # doctest: +SKIP (getitem, ('x', 3, 5), (slice(None, None, None...
gpl-3.0
devendermishrajio/nova_test_latest
nova/scheduler/utils.py
29
13035
# 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 to in...
apache-2.0
laszlocsomor/tensorflow
tensorflow/examples/learn/text_classification_character_rnn.py
8
4104
# 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 appl...
apache-2.0
gencer/python-phonenumbers
python/phonenumbers/geodata/data6.py
1
723645
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from ..util import u # Copyright (C) 2011-2017 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
apache-2.0
samervin/arctic-scavengers-randomizer
arctic_cards/leaders.py
1
3619
# Fields NAME = 'name' SET = 'set' USES_REFUGEES = 'uses-refugees' TEXT = 'text' # Set values HQ_EXP = 'hq' RECON_EXP = 'recon' # Information not strictly contained on the card COMMENT = 'comment' class Leaders: ALL_LEADERS = [ { NAME: 'The Peacemaker', SET: HQ_EXP, U...
mit
Samuel789/MediPi
MedManagementWeb/env/lib/python3.5/site-packages/Crypto/Cipher/DES.py
1
7100
# -*- coding: utf-8 -*- # # Cipher/DES.py : DES # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # n...
apache-2.0
BehavioralInsightsTeam/edx-platform
openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py
13
2058
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('api_admi...
agpl-3.0
memtoko/django
tests/template_tests/syntax_tests/test_named_endblock.py
521
2312
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class NamedEndblockTests(SimpleTestCase): @setup({'namedendblocks01': '1{% block first %}_{% block second %}' '2{% endblock second %}_{% endblock first %}3'}) def ...
bsd-3-clause
cogmission/nupic.research
projects/sdr_paper/plot_effect_of_n_bami.py
2
14728
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, 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...
agpl-3.0
jhonnyam123/hangoutsbot
hangupsbot/event.py
3
2777
import logging import hangups logger = logging.getLogger(__name__) class GenericEvent: bot = None emit_log = logging.INFO def __init__(self, bot): self.bot = bot class StatusEvent(GenericEvent): """base class for all non-ConversationEvent""" def __init__(self, bot, state_update_even...
agpl-3.0
MridulS/BinPy
BinPy/examples/source/Combinational/DEMUX.py
1
1066
# coding: utf-8 # Example for DEMUX class. # In[1]: from __future__ import print_function from BinPy.Combinational.combinational import * # In[2]: # Initializing the DEMUX class # Must be a single input demux = DEMUX(1) # Put select lines # Select Lines must be power of 2 demux.selectLines(0) # Output of d...
bsd-3-clause
IT-Department-Projects/OOAD-Project
Flask_App/oakcrest/lib/python2.7/site-packages/click/testing.py
136
11002
import os import sys import shutil import tempfile import contextlib from ._compat import iteritems, PY2 # If someone wants to vendor click, we want to ensure the # correct package is discovered. Ideally we could use a # relative import here but unfortunately Python does not # support that. clickpkg = sys.modules[_...
mit