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
blueboxgroup/cinder
cinder/scheduler/driver.py
4
4199
# Copyright (c) 2010 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
apache-2.0
nmayorov/scipy
scipy/sparse/linalg/tests/test_norm.py
9
5361
"""Test functions for the sparse.linalg.norm module """ import numpy as np from numpy.linalg import norm as npnorm from numpy.testing import assert_allclose from pytest import raises as assert_raises import scipy.sparse from scipy.sparse.linalg import norm as spnorm class TestNorm(object): def setup_method(self...
bsd-3-clause
verloop/rasa_nlu
rasa_nlu/server.py
1
4816
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import argparse import logging import os from functools import wraps from flask import Flask from flask import current_app from flask import jsonify from flask import req...
apache-2.0
tinloaf/home-assistant
homeassistant/components/sensor/deconz.py
1
8961
""" Support for deCONZ sensor. For more details about this component, please refer to the documentation at https://home-assistant.io/components/sensor.deconz/ """ from homeassistant.components.deconz.const import ( ATTR_DARK, ATTR_ON, CONF_ALLOW_CLIP_SENSOR, DECONZ_REACHABLE, DOMAIN as DECONZ_DOMAIN) from home...
apache-2.0
sudosurootdev/external_chromium_org
tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor.py
39
9433
# Copyright 2014 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 contextlib import csv import logging import operator import os import platform import re import shutil import tempfile import zipfile from telemetry ...
bsd-3-clause
qlands/onadata
onadata/apps/api/viewsets/note_viewset.py
10
2530
from django.utils.translation import ugettext as _ from guardian.shortcuts import assign_perm from rest_framework import exceptions from rest_framework import status from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from onadata.apps.api import permissions from onadata.libs...
bsd-2-clause
yb-kim/gemV
configs/example/memtest.py
9
8083
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
nishad-jobsglobal/odoo-marriot
addons/account_payment/account_payment.py
212
19161
# -*- 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
chalasr/Flask-P2P
venv/lib/python2.7/site-packages/jinja2/parser.py
637
35186
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.lexer impo...
mit
ptonner/GPy
GPy/util/linalg_gpu.py
15
3038
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) # # The utility functions for GPU computation # import numpy as np from ..util import gpu_init try: from pycuda.reduction import ReductionKernel from pycuda.elementwise import ElementwiseKernel ...
bsd-3-clause
ajs124/esp-idf
tools/esp_app_trace/pylibelf/iterators/__init__.py
14
5322
import sys import os from .. import * from ..constants import * from ..types import * from ..util import * from ctypes import * def sections(elf, **kwargs): i = None ndx = 0 # we skip the first null section if 'info' in kwargs: if (isinstance(kwargs['info'], Elf_Scn)): info = elf_ndxscn(kwargs['info'])...
apache-2.0
Chilledheart/chromium
tools/telemetry/third_party/gsutilz/gslib/command_runner.py
12
15982
# -*- coding: utf-8 -*- # Copyright 2011 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 require...
bsd-3-clause
phisiart/tvm
topi/python/topi/util.py
1
2941
"""Common topi utilities""" from __future__ import absolute_import as _abs import tvm def get_const_int(expr): """Verifies expr is integer and get the constant value. Parameters ---------- expr : tvm.Expr or int The input expression. Returns ------- out_value : int The out...
apache-2.0
lukeiwanski/tensorflow
tensorflow/contrib/kfac/examples/tests/mnist_test.py
41
2500
# 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
GaretJax/csat
csat/collectors/pygit/collector.py
1
15128
import os import datetime import git import tempfile import shutil import re from csat.paths import PathWalker from csat.graphml.builder import GraphMLDocument, Attribute from . import parser class ModuleNotFound(KeyError): pass class ModuleAlreadyTracked(KeyError): pass def timestamp_to_iso(timestamp): ...
mit
jaxxstorm/fullerite
src/diamond/collectors/userscripts/test/testuserscripts.py
30
2095
#!/usr/bin/python # coding=utf-8 ################################################################################ import os import sys from test import CollectorTestCase from test import get_collector_config from test import unittest from test import run_only from mock import patch from diamond.collector import Coll...
apache-2.0
cmgrote/tapiriik
tapiriik/services/api.py
3
3663
class ServiceExceptionScope: Account = "account" Service = "service" # Unlike Account and Service-level blocking exceptions, these are implemented via ActivityRecord.FailureCounts # Eventually, all errors might be stored in ActivityRecords Activity = "activity" class ServiceException(Exception): ...
apache-2.0
toshywoshy/ansible
test/units/modules/network/fortios/test_fortios_authentication_setting.py
21
8084
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
HighwindONE/android_kernel_motorola_msm8226
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
gripped2/xbmc
addons/service.xbmc.versioncheck/lib/shellhandlerapt.py
152
4258
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
gpl-2.0
jrper/fluidity
tests/diffusion-dg/stretch.py
5
1429
#!/usr/bin/env python from numpy import * import getopt, sys, os # Global variables filename = None xscale = None yscale = None def get_options(): global filename, xscale, yscale try: opts, args = getopt.getopt(sys.argv[1:], "f:x:y:", ["filename", "xscale", "ysc...
lgpl-2.1
dcsquared13/Diamond
src/collectors/memcached/memcached.py
22
5210
# coding=utf-8 """ Collect memcached stats #### Dependencies * subprocess #### Example Configuration MemcachedCollector.conf ``` enabled = True hosts = localhost:11211, app-1@localhost:11212, app-2@localhost:11213, etc ``` TO use a unix socket, set a host string like this ``` hosts = /path/to/bla...
mit
BackupTheBerlios/cuon-svn
cuon_client/cuon/Skeleton/skeleton.py
2
12773
# -*- coding: utf-8 -*- ##Copyright (C) [2005] [Jürgen Hamel, D-32584 Löhne] ##This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as ##published by the Free Software Foundation; either version 3 of the License, or (at your option) any later versi...
gpl-3.0
conklinbd/MovementAnalysis
TemplateInstall/PortalDeploy/arcrest/manageags/_uploads.py
2
4279
from .._abstract.abstract import BaseAGSServer import os ######################################################################## class Uploads(BaseAGSServer): """ This resource is a collection of all the items that have been uploaded to the server. See: http://resources.arcgis.com/en/help/arcgis-rest-a...
apache-2.0
mpf82/w2ui
server/python/django_w2ui/django_w2ui/views.py
9
7416
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import re from operator import or_ , and_ from django.core.paginator import Paginator from django.core.serializers.json import DjangoJSONEncoder from django.db import models from django.db.models import Q from django.http import HttpResponse,...
mit
ImageEngine/gaffer
python/GafferSceneUI/CollectPrimitiveVariablesUI.py
8
3501
########################################################################## # # Copyright (c) 2018, Image Engine Design 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: # # * Redistrib...
bsd-3-clause
lyndsysimon/osf.io
website/addons/googledrive/views/auth.py
12
4608
import httplib as http from datetime import datetime from flask import request from framework.flask import redirect # VOL-aware redirect from framework.sessions import session from framework.exceptions import HTTPError from framework.auth.decorators import must_be_logged_in from website import models from website.u...
apache-2.0
mozilla/addons-server
src/olympia/reviewers/tests/test_utils.py
2
98875
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from unittest import mock from unittest.mock import Mock, patch from django.conf import settings from django.core import mail from django.core.files.storage import default_storage as storage from django.test.utils import override_settings from django.url...
bsd-3-clause
santiavenda2/griffith
lib/plugins/imp/PersonalVideoDatabase.py
4
8307
# -*- coding: utf-8 -*- __revision__ = '$Id$' # Copyright (c) 2009 # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # ...
gpl-2.0
rschnapka/hr
__unported__/hr_resume/__init__.py
28
1047
# -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
taiyuanfang/gyp
test/analyzer/gyptest-analyzer.py
8
10850
#!/usr/bin/env python # 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. """Tests for analyzer """ import json import TestGyp found = 'Found dependency' found_all = 'Found dependency (all)' not_found = 'No depend...
bsd-3-clause
a4tech/dvbapp2-gui
lib/python/Components/Network.py
10
23686
import re import os from socket import * from Components.Console import Console from Components.PluginComponent import plugins from Plugins.Plugin import PluginDescriptor class Network: def __init__(self): self.ifaces = {} self.configuredNetworkAdapters = [] self.NetworkState = 0 self.DnsState = 0 self.name...
gpl-2.0
jerel/readthedocs.org
fabfile-development.py
33
1956
from fabric.api import cd, env, prefix, run, sudo, task # Fill out USER and HOSTS configuration before running env.user = '' env.hosts = [''] env.code_dir = '/home/%s/rtd/checkouts/readthedocs.org' % (env.user) env.virtualenv = '/home/%s/rtd' % (env.user) def install_prerequisites(): """Install prerequisites.""...
mit
nadley/Sick-Beard
lib/guessit/transfo/guess_movie_title_from_position.py
48
6590
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
foohooboo/graphql-cookiecutter
config/settings/production.py
1
7200
""" Production Configurations - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis for cache """ from boto.s3.connection import OrdinaryCallingFormat from .base import * # noqa # SECRET CONFIGURATION # -------------------------------------------------------------...
mit
EiNSTeiN-/idapython
pywraps/py_ua.py
1
21392
#<pycode(py_ua)> # ----------------------------------------------------------------------- class op_t(py_clinked_object_t): """Class representing operands""" def __init__(self, lnk = None): py_clinked_object_t.__init__(self, lnk) def _create_clink(self): return _idaapi.op_t_create() d...
bsd-3-clause
grundprinzip/rekind-
Resources/pyPdf/filters.py
34
9867
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2006, Mathieu Fenniak # 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 abov...
mit
MangoMangoDevelopment/neptune
lib/ros_comm-1.12.0/test/test_rospy/test/unit/test_gensrv_py.py
1
3000
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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...
bsd-3-clause
KAMI911/loec
examples/Sharpen/binaries-windows-python26/GimpGradientFile.py
3
3348
# # Python Imaging Library # $Id: GimpGradientFile.py 2134 2004-10-06 08:55:20Z fredrik $ # # stuff to read (and render) GIMP gradient files # # History: # 97-08-23 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usag...
gpl-3.0
Nrikolo/X8_AutoPilot
fsm/scripts/Utility.py
1
10399
#!/usr/bin/env python# # A set of utility functions for converting msgs to numpy arrays, computing distance metrics import rospy import ros import numpy import math from geometry_msgs.msg import Pose, Point, Quaternion, PoseStamped class switch(object): """ python switch statement adapted from : http://code...
gpl-2.0
Micronaet/micronaet-mx8
stock_assigned_quantity/__init__.py
1
1035
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
agpl-3.0
cyb0/volatility
vol.py
44
6142
#!/usr/bin/env python # -*- mode: python; -*- # # 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;...
gpl-2.0
mhbu50/erpnext
erpnext/patches/v11_0/inter_state_field_for_gst.py
3
3206
from __future__ import unicode_literals import frappe from erpnext.regional.india.setup import make_custom_fields def execute(): company = frappe.get_all('Company', filters = {'country': 'India'}) if not company: return frappe.reload_doc("Payroll", "doctype", "Employee Tax Exemption Declaration") frappe.reload_...
gpl-3.0
mcdeoliveira/beaglebone
pyctrl/flask/server.py
3
17472
from flask import Flask, request, render_template, jsonify, make_response, redirect, flash, url_for from functools import wraps import re import pyctrl from pyctrl.block import Logger import warnings import importlib import traceback, sys, io from pyctrl.flask import JSONEncoder, JSONDecoder encoder = JSONEncoder(so...
apache-2.0
car3oon/saleor
saleor/discount/migrations/0003_auto_20160207_0534.py
15
2317
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-02-07 11:34 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('discount', '0002_voucher'), ] operations = [ migrations.Alte...
bsd-3-clause
bkaradzic/SwiftShader
third_party/subzero/pydir/szbuild_spec2k.py
3
2991
#!/usr/bin/env python2 import argparse import os import sys import szbuild from utils import FindBaseNaCl, shellcmd def main(): """Build native gcc-style executables for one or all Spec2K components. Afterwards, the executables can be run from the native_client/tests/spec2k/ directory as: './run_al...
apache-2.0
baoboa/pyqt5
examples/designer/plugins/widgets/counterlabel.py
3
5180
#!/usr/bin/env python """ counterlabel.py A PyQt custom widget example for Qt Designer. Copyright (C) 2006 David Boddie <david@boddie.org.uk> Copyright (C) 2005-2006 Trolltech ASA. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public ...
gpl-3.0
HewlettPackard/oneview-ansible
test/test_oneview_ethernet_network.py
1
15111
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2020) Hewlett Packard Enterprise Development LP # # 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/licen...
apache-2.0
AndroidOpenDevelopment/android_external_chromium_org
native_client_sdk/src/doc/conf.py
103
6018
# Copyright (c) 2014 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. # -*- coding: utf-8 -*- # # Native Client documentation build configuration file, created by # sphinx-quickstart on Thu Aug 15 11:31:06 2013. # # This fi...
bsd-3-clause
nozuono/calibre-webserver
src/calibre/gui2/preferences/keyboard.py
9
1418
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from PyQt4.Qt ...
gpl-3.0
le9i0nx/ansible
contrib/inventory/vmware.py
92
18476
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' VMware Inventory Script ======================= Retrieve information about virtual machines from a vCenter server or standalone ESX host. When `group_by=false` (in the INI file), host systems are also returned in addition to VMs. This script will attempt to read conf...
gpl-3.0
Weil0ng/gem5
ext/ply/test/testyacc.py
93
14230
# testyacc.py import unittest try: import StringIO except ImportError: import io as StringIO import sys import os sys.path.insert(0,"..") sys.tracebacklimit = 0 import ply.yacc def check_expected(result,expected): resultlines = [] for line in result.splitlines(): if line.startswith("WARNING...
bsd-3-clause
chris-statzer/knuckle-python
tests/test_gamepad.py
1
1522
import logging import knuckle import ui logging.basicConfig(level=logging.INFO) UP = 24 DOWN = 25 LEFT = 27 RIGHT = 26 A = ord('A') B = ord('B') class GamepadWindow(ui.Widget): def __init__(self, ui): super(GamepadWindow, self).__init__(ui, 10, 10, 40, 20) self.dirty = True self.butto...
mit
simartin/cppcheck
addons/naming.py
3
3490
#!/usr/bin/env python3 # # cppcheck addon for naming conventions # # Example usage (variable name must start with lowercase, function name must start with uppercase): # $ cppcheck --dump path-to-src/ # $ python addons/naming.py --var='[a-z].*' --function='[A-Z].*' path-to-src/*.dump # import cppcheckdata import sys im...
gpl-3.0
chromium/chromium
third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/update/update.py
17
6446
import os import sys from .metadata import MetadataUpdateRunner from .sync import SyncFromUpstreamRunner from .tree import GitTree, HgTree, NoVCSTree from .base import Step, StepRunner, exit_clean, exit_unclean from .state import SavedState, UnsavedState def setup_paths(sync_path): sys.path.insert(0, os.path.abs...
bsd-3-clause
paulu/deepfeatinterp
facemodel_worker.py
1
4456
#!/usr/bin/env python2 from __future__ import division from __future__ import with_statement from __future__ import print_function import execnet if __name__=='__channelexec__': import os.path import subprocess if not os.path.exists('models/facemodel/model.t7'): url='https://www.dropbox.com/s/18s63zomyfacj...
gpl-3.0
capriele/crazyflie-clients-python-move
build/lib.linux-i686-2.7/cfclient/ui/tab.py
22
3193
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
gpl-2.0
noba3/KoTos
addons/plugin.video.iptvxtra-de-more/resources/lib/requests/packages/urllib3/response.py
328
10347
# urllib3/response.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import logging import zlib import io from ._collections import HTTPHeaderDict from .exceptio...
gpl-2.0
ksrajkumar/openerp-6.1
openerp/addons/crm/wizard/mail_compose_message.py
7
2961
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
EvanK/ansible
lib/ansible/modules/cloud/openstack/os_quota.py
23
15745
#!/usr/bin/python # Copyright (c) 2016 Pason System Corporation # 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...
gpl-3.0
yiducn/airvis
src/main/webapp/js/OpenLayers-2.13.1/tests/selenium/remotecontrol/test_ol.py
254
2873
from selenium import selenium import time import sys from ConfigParser import ConfigParser MAX_TEST_LENGTH = 300 if len(sys.argv) > 2: filename = sys.argv[2] else: filename = "config.cfg" c = ConfigParser() c.read(filename) targets = {} server = c.get('config', 'server') url= c.get('config', 'url') if c.h...
agpl-3.0
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/example/image-classification/train_imagenet_dali.py
1
2782
# 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
leeseuljeong/leeseulstack_neutron
neutron/tests/unit/nec/test_portbindings.py
12
15823
# Copyright 2013 NEC Corporation # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
apache-2.0
BackupGGCode/python-for-android
python-build/python-libs/xmpppy/doc/examples/xsend.py
87
1497
#!/usr/bin/python # $Id: xsend.py,v 1.8 2006/10/06 12:30:42 normanr Exp $ import sys,os,xmpp,time if len(sys.argv) < 2: print "Syntax: xsend JID text" sys.exit(0) tojid=sys.argv[1] text=' '.join(sys.argv[2:]) jidparams={} if os.access(os.environ['HOME']+'/.xsend',os.R_OK): for ln in open(os.environ['HOME...
apache-2.0
tingcar/PSEP
src/internalmail/models.py
1
1878
from django.db import models from django.contrib.auth.models import User # Create your models here. class InternalMail(models.Model): user = models.ForeignKey(User) Ticketid = models.CharField(max_length=50, null=True, blank=True) From = models.CharField(max_length=50, null=True, blank=True) FromEma...
apache-2.0
coberger/DIRAC
Core/Utilities/Subprocess.py
5
20847
# $HeadURL$ """ DIRAC Wrapper to execute python and system commands with a wrapper, that might set a timeout. 3 FUNCTIONS are provided: - shellCall( iTimeOut, cmdSeq, callbackFunction = None, env = None ): it uses subprocess.Popen class with "shell = True". If cmdSeq is a string, it specifies the...
gpl-3.0
hbrunn/OCB
addons/hr_holidays/tests/common.py
389
4347
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
brittanystoroz/kitsune
kitsune/wiki/events.py
3
13229
import difflib import logging from django.conf import settings from django.contrib.sites.models import Site from django.core.urlresolvers import reverse as django_reverse from django.utils.translation import ugettext as _, ugettext_lazy as _lazy from bleach import clean from tidings.events import InstanceEvent, Event...
bsd-3-clause
luxick/mtg-collector
mtg-collector/mtgsdk/querybuilder.py
1
2831
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of mtgsdk. # https://github.com/MagicTheGathering/mtg-sdk-python # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2016, Andrew Backes <backes.andrew@gmail.com> from mtgsdk.restclient import RestClient f...
gpl-3.0
maestro-hybrid-cloud/horizon
openstack_dashboard/test/integration_tests/regions/forms.py
10
12501
# 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 # d...
apache-2.0
tomscript/babbage
backend/main.py
1
3720
"""Babbage - Framework for decoding data. 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 req...
apache-2.0
qgis/QGIS-Django
qgis-app/settings_local_vagrant.py
1
6701
import os SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) DEBUG = True THUMBNAIL_DEBUG = DEBUG # sorl.thumbnail verbose debug ALLOWED_HOSTS = ['*'] # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be a...
gpl-2.0
lonetwin/opencore
opencore/views/tests/test_login.py
4
18599
# Copyright (C) 2008-2009 Open Society Institute # Thomas Moroz: tmoroz.org # 2010-2011 Large Blue # Fergus Doyle: fergus.doyle@largeblue.com # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License Version ...
gpl-2.0
techtonik/buildozer
docs/source/conf.py
9
7963
# -*- coding: utf-8 -*- # # Buildozer documentation build configuration file, created by # sphinx-quickstart on Sun Apr 20 16:56:31 2014. # # 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. # # A...
mit
anbangleo/NlsdeWeb
Python-3.6.0/Lib/test/test_keyword.py
98
5840
import keyword import unittest from test import support import filecmp import os import sys import subprocess import shutil import textwrap KEYWORD_FILE = support.findfile('keyword.py') GRAMMAR_FILE = os.path.join(os.path.split(__file__)[0], '..', '..', '...
mit
VeNoMouS/Sick-Beard
lib/requests/packages/chardet/sbcsgroupprober.py
2936
3291
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
OpenMOOC/moocng
moocng/courses/templatetags/usercourses.py
1
1137
# -*- coding: utf-8 -*- # Copyright 2012-2013 UNED # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
chloerh/avocado-vt
virttest/step_editor.py
4
50745
#!/usr/bin/python """ Step file creator/editor. :copyright: Red Hat Inc 2009 :author: mgoldish@redhat.com (Michael Goldish) """ import os import glob import shutil import sys import logging import pygtk import gtk from virttest import ppm_utils pygtk.require('2.0') # General utilities def corner_and_size_clippe...
gpl-2.0
joelgrus/data-science-from-scratch
first-edition/code/multiple_regression.py
60
8590
from __future__ import division from collections import Counter from functools import partial from linear_algebra import dot, vector_add from statistics import median, standard_deviation from probability import normal_cdf from gradient_descent import minimize_stochastic from simple_linear_regression import total_sum_of...
mit
factorlibre/OCB
addons/mail/tests/test_mail_features.py
172
59265
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
Belxjander/Kirito
Python-3.5.0-Amiga/Lib/test/test_funcattrs.py
10
13001
import types import unittest def global_function(): def inner_function(): class LocalClass: pass global inner_global_function def inner_global_function(): def inner_function2(): pass return inner_function2 return LocalClass re...
gpl-3.0
thanhacun/odoo
addons/l10n_us/__init__.py
893
1045
# -*- 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
waveaccounting/vero-python
docs/conf.py
2
7941
# -*- coding: utf-8 -*- # # vero documentation build configuration file, created by # sphinx-quickstart on Tue Jul 8 11:48:42 2015. # # 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. # # All co...
bsd-3-clause
osvalr/odoo
addons/payment_transfer/models/payment_acquirer.py
203
3767
# -*- coding: utf-'8' "-*-" from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.osv import osv from openerp.tools.float_utils import float_compare from openerp.tools.translate import _ import logging import pprint _logger = logging.getLogger(__name__) class TransferPaymentAcquir...
agpl-3.0
kilon/sverchok
nodes/generator/plane.py
1
5388
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
gpl-3.0
bgr/mingus
unittest/test_instrument.py
12
1957
#!/usr/bin/python # -*- coding: utf-8 -*- import sys sys.path += ['../'] from mingus.containers.instrument import Instrument, Piano, Guitar from mingus.containers.note_container import NoteContainer import unittest class test_Instrument(unittest.TestCase): def setUp(self): self.i = Instrument() s...
gpl-3.0
wemanuel/smry
server-auth/ls/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/core/workspaces.py
4
14876
# Copyright 2013 Google Inc. All Rights Reserved. """Manage gcloud workspaces. A gcloud workspace is a directory that contains a .gcloud folder. This module does manipulations of the gcloud workspace, including creation and component importing. """ import errno import os import os.path import re import subprocess im...
apache-2.0
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/twisted/internet/threads.py
20
1442
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Extended thread dispatching support. For basic support see reactor threading API docs. API Stability: stable Maintainer: U{Itamar Shtull-Trauring<mailto:twisted@itamarst.org>} """ # twisted imports from twisted.python import log,...
bsd-3-clause
nekulin/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/finddiv.py
102
2518
#! /usr/bin/env python """finddiv - a grep-like tool that looks for division operators. Usage: finddiv [-l] file_or_directory ... For directory arguments, all files in the directory whose name ends in .py are processed, and subdirectories are processed recursively. This actually tokenizes the files to avoid false h...
apache-2.0
evanma92/routeh
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
153
9905
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
bsd-3-clause
jdesgats/mongrel2
examples/python/mongrel2/tnetstrings.py
64
2966
# Note this implementation is more strict than necessary to demonstrate # minimum restrictions on types allowed in dictionaries. def dump(data): if type(data) is long or type(data) is int: out = str(data) return '%d:%s#' % (len(out), out) elif type(data) is float: out = '%f' % data ...
bsd-3-clause
trezorg/django
tests/regressiontests/string_lookup/models.py
92
1199
# -*- coding: utf-8 -*- from django.db import models class Foo(models.Model): name = models.CharField(max_length=50) friend = models.CharField(max_length=50, blank=True) def __unicode__(self): return "Foo %s" % self.name class Bar(models.Model): name = models.CharField(max_length=50) norm...
bsd-3-clause
josibarns/paparazzi
sw/tools/dfu/stm32_mem.py
1
6679
#!/usr/bin/env python # # stm32_mem.py: STM32 memory access using USB DFU class # Copyright (C) 2011 Black Sphere Technologies # Written by Gareth McMullin <gareth@blacksphere.co.nz> # Modified by Felix Ruess <felix.ruess@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under th...
gpl-2.0
maxdeliso/elevatorSim
Lib/test/test_osx_env.py
6
1321
""" Test suite for OS X interpreter environment variables. """ from test.support import EnvironmentVarGuard, run_unittest import subprocess import sys import sysconfig import unittest class OSXEnvironmentVariableTestCase(unittest.TestCase): def _check_sys(self, ev, cond, sv, val = sys.executable + 'dummy'): ...
bsd-2-clause
vipins/ccccms
env/Lib/site-packages/easy_thumbnails/migrations/0011_auto__add_field_source_storage_hash__add_field_thumbnail_storage_hash.py
20
2716
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Source.storage_hash' db.add_column('easy_thumbnails_source', 'storage_hash', self.gf('djan...
bsd-3-clause
nvoron23/scikit-learn
sklearn/feature_extraction/image.py
263
17600
""" The :mod:`sklearn.feature_extraction.image` submodule gathers utilities to extract features from images. """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Olivier Grisel # Vlad Niculae # License: BSD 3 clause fro...
bsd-3-clause
rosmo/ansible
lib/ansible/modules/packaging/os/urpmi.py
43
6462
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Philippe Makowski # Written by Philippe Makowski <philippem@mageia.org> # Based on apt module written by Matthew Williams <matthew@flowroute.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future...
gpl-3.0
QuLogic/iris
lib/iris/tests/integration/test_regrid_equivalence.py
5
9580
# (C) British Crown Copyright 2016 - 2017, Met Office # # This file is part of Iris. # # Iris 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 l...
gpl-3.0
ChinaQuants/PTVS
Python/Product/Django/Templates/Projects/DjangoWebRole/settings.py
36
5582
""" Django settings for $safeprojectname$ project. """ DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': 'django.db.ba...
apache-2.0
TomasTomecek/docker-scripts
docker_scripts/cli.py
1
3534
# -*- coding: utf-8 -*- import argparse import logging import sys from docker_scripts import squash, layers from docker_scripts.version import version class MyParser(argparse.ArgumentParser): def error(self, message): self.print_help() sys.stderr.write('\nError: %s\n' % message) sys.exi...
mit