repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
bbcf/bsPlugins
tests/test_QuantifyTable.py
1
1450
from unittest2 import TestCase, skip from bbcflib.track import track from bsPlugins.QuantifyTable import QuantifyTablePlugin import os path = 'testing_files/' class Test_QuantifyTablePlugin(TestCase): def setUp(self): self.plugin = QuantifyTablePlugin() def test_quantify_table_sql(self): self...
gpl-3.0
zding5/Microblog-Flask
flask/lib/python2.7/site-packages/flask/signals.py
783
2140
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Name...
mit
esrille/ibus-replace-with-kanji
dic_tools/intersection-yomi.py
1
1034
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Copyright (c) 2017 Esrille 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 r...
apache-2.0
amandersillinois/landlab
landlab/grid/raster_gradients.py
3
67150
#! /usr/bin/env python """Calculate gradients on a raster grid. Gradient calculators for raster grids +++++++++++++++++++++++++++++++++++++ .. autosummary:: ~landlab.grid.raster_gradients.calc_grad_at_link ~landlab.grid.raster_gradients.calc_grad_across_cell_faces ~landlab.grid.raster_gradients.calc_grad...
mit
SkeltonThatcher/rancher-buildeng-catalog
integration/core/test_catalog.py
1
3164
import pytest import cattle import subprocess import sys import os import re # import yaml def _base(): return os.path.dirname(__file__) def _file(f): return os.path.join(_base(), '../../{}'.format(f)) class CatalogService(object): def __init__(self, catalog_bin): self.catalog_bin = catalog_bi...
mit
jhoos/django
tests/proxy_models/tests.py
260
16941
from __future__ import unicode_literals import datetime from django.apps import apps from django.contrib import admin from django.contrib.auth.models import User as AuthUser from django.contrib.contenttypes.models import ContentType from django.core import checks, exceptions, management from django.core.urlresolvers ...
bsd-3-clause
FatalTouch/BlogExample
handlers/signup.py
1
2233
import entities from handlers import ViewHandler from utility import validate # Handler for our signup page class SignupPage(ViewHandler): # Get request handler def get(self): # If user is already logged in, send back to home page otherwise # render the signup.html view if not self.us...
apache-2.0
crossroadchurch/paul
openlp/core/ui/themestab.py
1
11371
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
gpl-2.0
garbled1/ansible
lib/ansible/modules/cloud/ovirt/ovirt_networks_facts.py
73
3447
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
yashtrivedi96/coala-bears
docs/conf.py
34
9336
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # coala documentation build configuration file, created by # sphinx-quickstart on Wed Feb 3 16:49:01 2016. # # 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 # auto...
agpl-3.0
nistormihai/superdesk-core
apps/publish/enqueue/enqueue_killed.py
3
2619
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import...
agpl-3.0
tykayn/card-deck
node_old/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
426
120645
# 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. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
apache-2.0
isrohutamahopetechnik/MissionPlanner
Lib/encodings/koi8_u.py
93
14325
""" Python Character Mapping Codec koi8_u generated from 'python-mappings/KOI8-U.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_table) def decode(self,input...
gpl-3.0
jehoffmann/l4linux
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
mrGeen/eden
modules/s3/pyvttbl/data_restructurer.py
11
3415
from __future__ import print_function # Copyright (c) 2011, Roger Lew [see LICENSE.txt] # This software is funded in part by NIH Grant P20 RR016454. # Python 2 to 3 workarounds import sys if sys.version_info[0] == 2: _xrange = xrange elif sys.version_info[0] == 3: _xrange = range import csv ...
mit
camilonova/django
setup.py
37
3287
import os import sys from distutils.sysconfig import get_python_lib from setuptools import find_packages, setup # Warn if we are installing over top of an existing installation. This can # cause issues where files that were deleted from a more recent Django are # still present in site-packages. See #18115. overlay_wa...
bsd-3-clause
spaceof7/QGIS
python/plugins/processing/algs/qgis/ZonalStatistics.py
8
6214
# -*- coding: utf-8 -*- """ *************************************************************************** ZonalStatistics.py --------------------- Date : September 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com *******...
gpl-2.0
bmazin/ARCONS-pipeline
QEcal/QEfile.py
1
3896
''' Author: Alex Walter Date: 5-13-2013 Helper class for QECalibration.py We do the actual QE calculation here ''' from os.path import isfile import numpy as np import math class QEfile(): def __init__(self, fn=None, ang=0): if not isfile(fn): raise fileNameError(fn) self.filename=...
gpl-2.0
Amitgb14/sos
sos/plugins/insights.py
6
1569
# 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 is distributed in the hope that it will be useful, # but...
gpl-2.0
finlandhuang/stardict-3
tools/src/hanzim2dict.py
44
3116
#!/usr/bin/env python # # hanzim2dict # # Original version written by Michael Robinson (robinson@netrinsics.com) # Version 0.0.2 # Copyright 2004 # # 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...
gpl-3.0
drwyrm/Flexget
flexget/plugins/output/ftp_download.py
7
7352
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import urlparse, unquote import logging import os import ftplib from flexget import plugin from flexget.event import event log = logging.ge...
mit
hrishioa/Aviato
flask/Lib/site-packages/requests/packages/chardet/eucjpprober.py
2919
3678
######################## 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...
gpl-2.0
rubenvereecken/pokemongo-api
POGOProtos/Inventory/EggIncubator_pb2.py
9
5234
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Inventory/EggIncubator.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf i...
mit
Tehsmash/ironic
ironic/cmd/dbsync.py
7
2897
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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.a...
apache-2.0
yslzsl/linux
tools/perf/scripts/python/failed-syscalls-by-pid.py
1996
2233
# 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
ubirch/aws-tools
virtual-env/lib/python2.7/site-packages/boto/ec2/autoscale/tag.py
173
3379
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without ...
apache-2.0
emilio/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py
3
29387
import json import mock import os import pytest import sys from io import BytesIO from .. import metadata, manifestupdate from ..update import WPTUpdate from ..update.base import StepRunner, Step from mozlog import structuredlog, handlers, formatters sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardi...
mpl-2.0
bigzz/linux-stable
scripts/checkkconfigsymbols.py
88
15783
#!/usr/bin/env python2 """Find Kconfig symbols that are referenced but not defined.""" # (c) 2014-2015 Valentin Rothberg <valentinrothberg@gmail.com> # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> # # Licensed under the terms of the GNU GPL License version 2 import difflib import os import re import signal i...
gpl-2.0
jiwanlimbu/aura
keystone/auth/plugins/core.py
1
7241
# Copyright 2013 OpenStack 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 required by applicable law or agreed to in...
apache-2.0
lumig242/Hue-Integration-with-CDAP
apps/useradmin/src/useradmin/migrations/0005_auto__add_field_userprofile_last_activity.py
17
6321
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserProfile.last_activity' if db.backend_name.lower() == ...
apache-2.0
wilmerhenao/Tomotherapy-Without-Pulse
SinogramComparisons.py
1
5247
__author__ = 'wilmer' # This one corresponds to the AverageOpeningTime.pdf document (first model) try: import mkl have_mkl = True print("Running with MKL Acceleration") except ImportError: have_mkl = False print("Running with normal backends") import pickle import time import socket import numpy as...
mit
barbarubra/Don-t-know-What-i-m-doing.
python/src/Lib/ctypes/test/test_struct_fields.py
68
1507
import unittest from ctypes import * class StructFieldsTestCase(unittest.TestCase): # Structure/Union classes must get 'finalized' sooner or # later, when one of these things happen: # # 1. _fields_ is set. # 2. An instance is created. # 3. The type is used as field of another Structure/Union. ...
apache-2.0
ray-zhong/github_trend_spider
ENV/Lib/site-packages/pymongo/topology_description.py
19
18509
# Copyright 2014-2016 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
mit
kantel/processingpy
mpmathtest/mpmath/tests/test_division.py
15
5340
from mpmath.libmp import * from mpmath import mpf, mp from random import randint, choice, seed all_modes = [round_floor, round_ceiling, round_down, round_up, round_nearest] fb = from_bstr fi = from_int ff = from_float def test_div_1_3(): a = fi(1) b = fi(3) c = fi(-1) # floor rounds down, ceiling ...
mit
imsut/commons
src/python/twitter/common/log/__init__.py
2
2176
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
radhika-raghavendran/mbed-os5.1-onsemi
tools/misc/docs_gen.py
16
1751
"""An api for generating documentation from the codebase """ from os.path import dirname, join from os import sep from re import compile import subprocess def generate_documentation(dirs, output_dir): """Use doxygen to generate the documentation Positional arguments: dirs - the directories that doxygen ...
apache-2.0
kirberich/osmosis
osmosis/migrations/0006_preserve_relationships.py
2
3556
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Don't use "from appname.models imp...
mit
jnordling/cabin
onadata/apps/logger/tests/test_parsing.py
5
6995
# vim: ai ts=4 sts=4 et sw=4 fileencoding=utf-8 import os import re from xml.dom import minidom from onadata.apps.main.tests.test_base import TestBase from onadata.apps.logger.xform_instance_parser import XFormInstanceParser,\ xpath_from_xml_node from onadata.apps.logger.xform_instance_parser import get_uuid_from_...
bsd-2-clause
chenss/ChatRoom
14.5 已经能运行(虽然有很多Warning)的Django-nonrel框架/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 =...
gpl-2.0
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/bgp_community.py
5
2429
# 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
jffernandez/kivy
kivy/uix/camera.py
52
3461
''' Camera ====== The :class:`Camera` widget is used to capture and display video from a camera. Once the widget is created, the texture inside the widget will be automatically updated. Our :class:`~kivy.core.camera.CameraBase` implementation is used under the hood:: cam = Camera() By default, the first camera f...
mit
AOSPU/external_chromium_org
tools/site_compare/utils/browser_iterate.py
189
5836
# Copyright (c) 2011 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. """Utility to use a browser to visit multiple URLs. Prerequisites: 1. The command_line package from tools/site_compare 2. Either the IE BHO or Firef...
bsd-3-clause
redsolution/django-trusted-html
example/tests.py
1
2963
import unittest from django.contrib.auth.models import User from django.test import Client from django.test.testcases import TestCase from example.models import MyModel, ExternalModel class ViewsTest(unittest.TestCase): def test_views(self): client = Client() self.assertEqual(client.get('/response...
gpl-3.0
hmen89/odoo
addons/website_project/controllers/main.py
373
1513
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
medspx/QGIS
python/plugins/processing/core/parameters.py
1
10020
# -*- coding: utf-8 -*- """ *************************************************************************** Parameters.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
gpl-2.0
taohungyang/cloud-custodian
tools/c7n_index/setup.py
6
1163
# Copyright 2015-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
StuartLittlefair/astropy
examples/coordinates/rv-to-gsr.py
8
4334
# -*- coding: utf-8 -*- """ ================================================================ Convert a radial velocity to the Galactic Standard of Rest (GSR) ================================================================ Radial or line-of-sight velocities of sources are often reported in a Heliocentric or Solar-syst...
bsd-3-clause
mrklees/CYPY
cyautomation/excel-updater/win32_wrapper.py
2
10550
# -*- coding: utf-8 -*- """Excep Updater Wrapper Functions This modules is intended to build a layer of abstraction on top of the win32com api. The goal is for the user to be able to import this module into a script where they acutally implament the updating of specific workbooks. """ # Python Core packages import o...
gpl-3.0
jhjguxin/blogserver
lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/predicates.py
623
1777
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis...
mit
facebook/sparts
sparts/thrift/compiler.py
3
8167
# 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. # """Tools for dynamically compili...
bsd-3-clause
LiveZenLK/CeygateERP
addons/crm/wizard/crm_lead_to_opportunity.py
18
12831
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields, osv from openerp.tools.translate import _ import re from openerp.exceptions import UserError class crm_lead2opportunity_partner(osv.osv_memory): _name = 'crm.lead2opportunity.partner'...
gpl-3.0
yongshengwang/hue
build/env/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7-linux-x86_64.egg/Crypto/SelfTest/Protocol/test_chaffing.py
120
2972
# # Test script for Crypto.Protocol.Chaffing # # Part of the Python Cryptography Toolkit # # Written by Andrew Kuchling and others # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain...
apache-2.0
addyosmani/aura-calendar-component
node_modules/grunt/node_modules/js-yaml/support/pyyaml-src/events.py
985
2445
# Abstract classes. class Event(object): def __init__(self, start_mark=None, end_mark=None): self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): attributes = [key for key in ['anchor', 'tag', 'implicit', 'value'] if hasattr(self, key)] argu...
mit
darktears/chromium-crosswalk
third_party/closure_linter/closure_linter/statetracker_test.py
109
3384
#!/usr/bin/env python # # Copyright 2012 The Closure Linter 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 # #...
bsd-3-clause
Diti24/python-ivi
ivi/agilent/agilent8340A.py
1
1485
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2014-2016 Alex Forencich 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...
mit
TheTypoMaster/asuswrt
release/src/router/dnsmasq/contrib/dbus-test/dbus-test.py
79
1667
#!/usr/bin/python import dbus bus = dbus.SystemBus() p = bus.get_object("uk.org.thekelleys.dnsmasq", "/uk/org/thekelleys/dnsmasq") l = dbus.Interface(p, dbus_interface="uk.org.thekelleys.dnsmasq") # The new more flexible SetServersEx method array = dbus.Array() array.append(["1.2.3.5"]) array.append(["1.2.3.4#664", "...
gpl-2.0
heyavery/lopenr
venv/lib/python2.7/site-packages/wheel/test/test_install.py
455
1866
# Test wheel. # The file has the following contents: # hello.pyd # hello/hello.py # hello/__init__.py # test-1.0.data/data/hello.dat # test-1.0.data/headers/hello.dat # test-1.0.data/scripts/hello.sh # test-1.0.dist-info/WHEEL # test-1.0.dist-info/METADATA # test-1.0.dist-info/RECORD # The ...
mit
JRock007/boxxy
dist/Boxxy server.app/Contents/Resources/lib/python2.7/numpy/core/setup_common.py
36
12847
from __future__ import division, absolute_import, print_function # Code common to build tools import sys from os.path import join import warnings import copy import binascii from distutils.ccompiler import CompileError #------------------- # Versioning support #------------------- # How to change C_API_VERSION ? # ...
mit
inonit/wagtail
wagtail/wagtailsearch/backends/__init__.py
9
2764
# Backend loading # Based on the Django cache framework # https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/core/cache/__init__.py import sys from importlib import import_module from django.utils import six from django.utils.module_loading import import_string from django.core.exce...
bsd-3-clause
justinmchase/node-gyp
gyp/pylib/gyp/generator/analyzer.py
294
21436
# Copyright (c) 2014 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. """ This script is intended for use as a GYP_GENERATOR. It takes as input (by way of the generator flag config_path) the path of a json file that dictates the file...
mit
DelvarWorld/three.js
utils/exporters/maya/plug-ins/threeJsFileTranslator.py
51
23623
__author__ = 'Sean Griffin' __version__ = '1.0.0' __email__ = 'sean@thoughtbot.com' import sys import os.path import json import shutil from pymel.core import * from maya.OpenMaya import * from maya.OpenMayaMPx import * kPluginTranslatorTypeName = 'Three.js' kOptionScript = 'ThreeJsExportScript' kDefaultOptionsStri...
mit
mgeisler/satori
satori/sysinfo/posh_ohai.py
2
5515
# 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 # distrib...
apache-2.0
jtyr/ansible-modules-extras
network/f5/bigip_ssl_certificate.py
23
16161
#!/usr/bin/python # # (c) 2016, Kevin Coming (@waffie1) # # 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 l...
gpl-3.0
pilou-/ansible
test/integration/targets/vault/test-vault-client.py
139
1818
#!/usr/bin/env python # -*- coding: utf-8 -*- ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'version': '1.0'} import argparse import sys # TODO: could read these from the files I suppose... secrets = {'vault-password': 'test-vault-password', ...
gpl-3.0
kohnle-lernmodule/palama
twisted/application/service.py
14
9400
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # """Service architecture for Twisted Services are arranged in a hierarchy. At the leafs of the hierarchy, the services which actually interact with the outside world are started. Services can be named or anonymous -- usually, they will...
gpl-2.0
tedelhourani/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg.py
29
10491
#!/usr/bin/python # (c) 2016, NetApp, 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', 'status': ['preview'], ...
gpl-3.0
danilito19/django
tests/admin_inlines/admin.py
293
5354
from django import forms from django.contrib import admin from .models import ( Author, BinaryTree, CapoFamiglia, Chapter, ChildModel1, ChildModel2, Consigliere, EditablePKBook, ExtraTerrestrial, Fashionista, Holder, Holder2, Holder3, Holder4, Inner, Inner2, Inner3, Inner4Stacked, Inner4Tabular, NonAut...
bsd-3-clause
mano3m/CouchPotatoServer
libs/rtorrent/lib/xmlrpc/http.py
180
1195
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com> # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, ...
gpl-3.0
nomad-vino/SPSE-1
Module 4/4.3.py
1
1323
#!/usr/bin/python print " __ " print " |__|____ ___ __ " print " | \__ \\\\ \/ / " print " | |/ __ \\\\ / " print " /\__| (____ /\_/ " print " \______| \/ " p...
gpl-3.0
40023255/-w16b_test
static/Brython3.1.3-20150514-095342/Lib/unittest/test/support.py
770
3379
import unittest class TestEquality(object): """Used as a mixin for TestCase""" # Check for a valid __eq__ implementation def test_eq(self): for obj_1, obj_2 in self.eq_pairs: self.assertEqual(obj_1, obj_2) self.assertEqual(obj_2, obj_1) # Check for a valid __ne__ impl...
agpl-3.0
camptocamp/QGIS
python/plugins/processing/algs/ftools/ExtentFromLayer.py
1
5382
# -*- coding: utf-8 -*- """ *************************************************************************** ExtentFromLayer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
gpl-2.0
ajnelson/ceph
src/gtest/test/gtest_list_tests_unittest.py
1068
5415
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
lgpl-2.1
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/lib2to3/pgen2/conv.py
134
9642
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Convert graminit.[ch] spit out by pgen to Python code. Pgen is the Python parser generator. It is useful to quickly create a parser from a grammar file in Python's grammar notation. But I don't wa...
gpl-3.0
waseem18/oh-mainline
vendor/packages/whoosh/src/whoosh/matching.py
17
55551
# Copyright 2010 Matt Chaput. 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 notice, # this list of conditions and the...
agpl-3.0
mlperf/inference_results_v0.5
closed/FuriosaAI/code/mobilenet/furiosa-loadgen/resize-imagenet.py
1
1710
import logging import sys import time import os import cv2 import numpy as np def center_crop(img, out_height, out_width): height, width, _ = img.shape left = int((width - out_width) / 2) right = int((width + out_width) / 2) top = int((height - out_height) / 2) bottom = int((height + out_height) /...
apache-2.0
hurricanerix/swift
test/unit/common/middleware/crypto/test_encrypter.py
8
41463
# Copyright (c) 2015-2016 OpenStack 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 required by applicable law or agree...
apache-2.0
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/servicefabric/tests/latest/test_sf_managed_cluster.py
1
7862
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
PeachstoneIO/peachbox
peachbox/model/schema.py
1
2622
import pyspark.sql.types from peachbox.model.file_format import FileFormat import peachbox.model class MasterSchema(): data_unit_index = None partition_key = None partition_granularity = None output_format = FileFormat.Parquet schema = None mart ...
apache-2.0
appapantula/scikit-learn
examples/applications/plot_tomography_l1_reconstruction.py
204
5442
""" ====================================================================== Compressive sensing: tomography reconstruction with L1 prior (Lasso) ====================================================================== This example shows the reconstruction of an image from a set of parallel projections, acquired along dif...
bsd-3-clause
StackStorm/st2
st2auth/tests/unit/test_validation_utils.py
3
2505
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
apache-2.0
zombi-x/android_kernel_oppo_msm8974
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
kirca/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
sanjeevtripurari/hue
desktop/core/ext-py/Django-1.6.10/tests/utils_tests/test_dateformat.py
57
6340
from __future__ import unicode_literals from datetime import datetime, date import os import time from django.utils.dateformat import format from django.utils import dateformat, translation, unittest from django.utils.timezone import utc from django.utils.tzinfo import FixedOffset, LocalTimezone class DateFormatTes...
apache-2.0
silly-wacky-3-town-toon/SOURCE-COD
Panda3D-1.10.0/python/Lib/lib-tk/Tkconstants.py
375
1493
# Symbolic constants for Tk # Booleans NO=FALSE=OFF=0 YES=TRUE=ON=1 # -anchor and -sticky N='n' S='s' W='w' E='e' NW='nw' SW='sw' NE='ne' SE='se' NS='ns' EW='ew' NSEW='nsew' CENTER='center' # -fill NONE='none' X='x' Y='y' BOTH='both' # -side LEFT='left' TOP='top' RIGHT='right' BOTTOM='bottom' # -relief RAISED='rai...
apache-2.0
asmacdo/pulp-automation
tests/consumer_agent_tests/test_09_consumer_auth.py
2
3615
import unittest, logging, nose from tests.conf.roles import ROLES from pulp_auto import Pulp, format_response from pulp_auto.handler.profile import PROFILE from pulp_auto.consumer import (Consumer, Binding) from pulp_auto.task import (Task, TaskFailure, TaskTimeoutError) from pulp_auto.agent import Agent from pulp_auto...
gpl-2.0
detiber/lib_openshift
lib_openshift/models/v1_local_subject_access_review.py
2
13159
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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
alirizakeles/zato
code/zato-web-admin/src/zato/admin/web/templatetags/extras.py
1
1103
# -*- coding: utf-8 -*- """ Copyright (C) 2012 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals from django import template register = template.Library() # Taken from https://...
gpl-3.0
jimsize/PySolFC
pysollib/games/unionsquare.py
1
7698
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
gpl-3.0
bbuckingham/katello
cli/test/katello/tests/core/user/user_report_test.py
3
1074
import unittest import os from katello.tests.core.action_test_utils import CLIOptionTestCase, CLIActionTestCase import katello.client.core.user from katello.client.core.user import Report from katello.client.core.utils import convert_to_mime_type class UserReportTest(CLIActionTestCase): def setUp(self): ...
gpl-2.0
pombredanne/bokeh
examples/plotting/file/line_select.py
7
1295
""" Example demonstrating the picking of line objects. """ import numpy as np from bokeh.models import TapTool, CustomJS, ColumnDataSource from bokeh.plotting import output_file, show, figure # The data is setup to have very different scales in x and y, to verify # that picking happens in pixels. Different widths a...
bsd-3-clause
kornicameister/ansible-modules-extras
cloud/misc/ovirt.py
12
17729
#!/usr/bin/python # (c) 2013, Vincent Van der Kussen <vincent at vanderkussen.org> # # 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,...
gpl-3.0
cg31/glmark2
waflib/Tools/c_config.py
11
21756
#! /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,imp,sys,re,shlex,shutil from waflib import Build,Utils,Configure,Task,Options,Logs,TaskGen,Err...
gpl-3.0
tcanabarro/dynamic-dynamodb
dynamic_dynamodb/log_handler.py
9
3339
# -*- coding: utf-8 -*- """ Logging management for Dynamic DynamoDB APACHE LICENSE 2.0 Copyright 2013-2014 Sebastian Dahlgren 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
PetePriority/home-assistant
tests/components/sensor/test_mfi.py
4
6956
"""The tests for the mFi sensor platform.""" import unittest import unittest.mock as mock import requests from homeassistant.setup import setup_component import homeassistant.components.sensor as sensor import homeassistant.components.sensor.mfi as mfi from homeassistant.const import TEMP_CELSIUS from tests.common i...
apache-2.0
RaD/django-south
setup.py
60
2289
#!/usr/bin/env python # Use setuptools if we can try: from setuptools.core import setup except ImportError: from distutils.core import setup from south import __version__ setup( name='South', version=__version__, description='South: Migrations for Django', long_description='South is an intelli...
apache-2.0
ciudadanointeligente/votainteligente-portal-electoral
preguntales/views.py
1
7058
# coding=utf-8 from django.views.generic import DetailView, CreateView from elections.models import Election, Candidate from preguntales.forms import MessageForm from django.core.urlresolvers import reverse from django.views.generic.base import View from django.views.decorators.csrf import csrf_exempt from django.http ...
gpl-3.0
g-vidal/upm
examples/python/eboled.py
6
1563
#!/usr/bin/env python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 # witho...
mit
Semillas/semillas_backend
semillas_backend/users/migrations/0007_auto_20170226_1801.py
2
1142
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-26 18:01 from __future__ import unicode_literals import django.contrib.auth.validators from django.db import migrations, models import phonenumber_field.modelfields class Migration(migrations.Migration): dependencies = [ ('users', '0006_aut...
mit
afandria/mojo
mojo/public/third_party/jinja2/_compat.py
638
4042
# -*- coding: utf-8 -*- """ jinja2._compat ~~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: Copyright 2013 by the Jinja team, see AUTHORS. :license: BSD, see LICENSE for details. ""...
bsd-3-clause
sunny94/temp
sympy/polys/tests/test_orderings.py
24
4262
"""Tests of monomial orderings. """ from sympy.polys.orderings import ( monomial_key, lex, grlex, grevlex, ilex, igrlex, igrevlex, LexOrder, InverseOrder, ProductOrder, build_product_order, ) from sympy.abc import x, y, z, t from sympy.core import S from sympy.utilities.pytest import raises def test_lex_orde...
bsd-3-clause