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
haxwithaxe/supybot
src/utils/str.py
5
14491
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2008-2009, James McCoy # 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 ...
bsd-3-clause
wrigri/libcloud
libcloud/common/openstack.py
14
17421
# 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 use ...
apache-2.0
lgarren/spack
var/spack/repos/builtin/packages/vdt/package.py
3
1735
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
simleo/openmicroscopy
components/tools/OmeroPy/test/integration/gatewaytest/test_annotation.py
2
15621
#!/usr/bin/env python # -*- coding: utf-8 -*- """ gateway tests - Annotation Wrapper Copyright 2009-2015 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt pytest fixtures used as defined in conftest.py: - gatewaywrapper - author_testimg_generated "...
gpl-2.0
calvinsettachatgul/athena
athena_env/lib/python3.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.py
2040
8935
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_iden...
mit
GeoffEvans/aol_model
aol_model/tests/test_ray.py
1
2020
from aol_model.ray import Ray from numpy import allclose, array import pytest from aol_model.vector_utils import normalise position = [0,0,2] wavevector_unit = [1,0,0] wavelength = 10 energy = 1 def test_setting_non_unit_vector(): with pytest.raises(ValueError): Ray(position, [1,0,0.1], wavelength, energy...
gpl-3.0
byterom/android_external_chromium_org
tools/perf/benchmarks/robohornet_pro.py
27
1798
# Copyright 2012 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. """Runs Microsoft's RoboHornet Pro benchmark.""" import os from metrics import power from telemetry import benchmark from telemetry.page import page_set fr...
bsd-3-clause
LadZone/LadZone.github.io
blog/Adafruit_PWM_Servo_Driver.py
33
3163
#!/usr/bin/python import time import math from Adafruit_I2C import Adafruit_I2C # ============================================================================ # Adafruit PCA9685 16-Channel PWM Servo Driver # ============================================================================ class PWM : # Registers/etc. ...
agpl-3.0
lujji/JXD-7800b-KK-kernel
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
thiriel/maps
venv/lib/python2.7/site-packages/django/contrib/gis/tests/relatedapp/tests.py
198
14731
from __future__ import absolute_import from datetime import date from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint from django.contrib.gis.db.models import Collect, Count, Extent, F, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.tests.utils import mysql, orac...
bsd-3-clause
LaboratoireMecaniqueLille/crappy
crappy/blocks/generator.py
1
5313
# coding: utf-8 from time import time, sleep from .block import Block from . import generator_path from .._global import CrappyStop class Generator(Block): """This block is used to generate a signal. It can be used to drive a machine. This block can take inputs, and each path can use these inputs to take dec...
gpl-2.0
shaufi/odoo
addons/point_of_sale/report/account_statement.py
380
2031
# -*- 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
NaturalGIS/naturalgis_qgis
python/plugins/db_manager/table_viewer.py
67
3659
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
LibraryHippo/LibraryHippo
Tests/test_wpl.py
1
45343
#!/usr/bin/env python import pytest import py.test import datetime from BeautifulSoup import BeautifulSoup import wpl import kpl from data import Hold from data import LoginError from fakes import MyCard from fakes import MyOpener def test__parse_holds__numeric_position__reads_position(): response = BeautifulS...
mit
effa/flocs
practice/models/practice_session.py
2
2200
from django.db import models from practice.models import TaskInstanceModel from practice.models import StudentModel from datetime import datetime class PracticeSession(models.Model): """ Representation of a practice session. The session keeps counter of tasks in the session. """ # time for pract...
gpl-2.0
xperroni/DevAI2014MOOC
agent03.py
1
6019
#!/usr/bin/env python r''' Implementation of the agent algorithm in tables 33-1 and 33-2 of the IDEAL MOOC lessons, with modifications required in the programming assignment. For details see http://liris.cnrs.fr/ideal/mooc/lesson.php?n=033 ''' from collections import namedtuple from itertools import cycle # Defaul...
gpl-3.0
lukeiwanski/tensorflow
tensorflow/contrib/factorization/python/kernel_tests/clustering_ops_test.py
38
7459
# 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 applic...
apache-2.0
40223151/2015cd0505
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_functiontestcase.py
791
5478
import unittest from .support import LoggingResult class Test_FunctionTestCase(unittest.TestCase): # "Return the number of tests represented by the this test object. For # TestCase instances, this will always be 1" def test_countTestCases(self): test = unittest.FunctionTestCase(lambda: None) ...
agpl-3.0
sadanandb/pmt
3rd_party/CherryPy/cherrypy/test/test_json.py
7
2560
from cherrypy.test import test, helper test.prefer_parent_path() import cherrypy from cherrypy.lib.jsontools import json if json is None: print "skipped (simplejson not found) " else: def setup_server(): class Root(object): def plain(self): return 'hello' plain....
epl-1.0
ghber/My-Django-Nonrel
django/contrib/gis/gdal/tests/test_driver.py
330
1207
import os, os.path, unittest from django.contrib.gis.gdal import Driver, OGRException valid_drivers = ('ESRI Shapefile', 'MapInfo File', 'TIGER', 'S57', 'DGN', 'Memory', 'CSV', 'GML', 'KML') invalid_drivers = ('Foo baz', 'clucka', 'ESRI Shp') aliases = {'eSrI' : 'ESRI Shapefile', 'TigER/l...
bsd-3-clause
ajinabraham/Mobile-Security-Framework-MobSF
StaticAnalyzer/tools/enjarify/enjarify/jvm/optimization/registers.py
30
8923
# Copyright 2015 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 by applicable law or a...
gpl-3.0
programadorjc/django
tests/postgres_tests/models.py
231
3562
from django.db import connection, models from .fields import ( ArrayField, BigIntegerRangeField, DateRangeField, DateTimeRangeField, FloatRangeField, HStoreField, IntegerRangeField, JSONField, ) class PostgreSQLModel(models.Model): class Meta: abstract = True required_db_vendor = 'postgre...
bsd-3-clause
pavelchristof/gomoku-ai
tensorflow/python/framework/proto_test.py
178
1704
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
wakatime/komodo-wakatime
components/wakatime/packages/chardet/mbcssm.py
289
25481
######################## 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...
bsd-3-clause
cmsdaq/hltd
lib/wstools-0.4.8/wstools/XMLname.py
2
2575
import re from six import text_type """Translate strings to and from SOAP 1.2 XML name encoding Implements rules for mapping application defined name to XML names specified by the w3 SOAP working group for SOAP version 1.2 in Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft 17, December 2001, <htt...
lgpl-3.0
xuleiboy1234/autoTitle
tensorflow/tensorflow/contrib/keras/python/keras/losses_test.py
27
3551
# 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...
mit
q40223241/2015cdb_g3_40223241
cadb_g3_0420-master/static/Brython3.1.1-20150328-091302/Lib/http/cookies.py
735
20810
#!/usr/bin/env python3 # #### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in...
gpl-3.0
artnez/faceoff
scripts/run-server.py
1
1416
#! /usr/bin/env python """ Runs Faceoff as a standalone web server. Do not use this is in production. Copyright: (c) 2012-2014 Artem Nezvigin <artem@artnez.com> License: MIT, see LICENSE for details """ from sys import path from os import environ from os.path import dirname, join path.append(join(dirname(__file__),...
mit
MicroTrustRepos/microkernel
src/l4/pkg/python/contrib/Mac/Modules/fm/fmsupport.py
39
2467
# This script generates a Python interface for an Apple Macintosh Manager. # It uses the "bgen" package to generate C code. # The function specifications are generated by scanning the mamager's header file, # using the "scantools" package (customized for this particular manager). import string # Declarations that cha...
gpl-2.0
Denisolt/Tensorflow_Chat_Bot
local/lib/python2.7/site-packages/wheel/test/test_basic.py
92
6509
""" Basic wheel tests. """ import os import pkg_resources import json import sys from pkg_resources import resource_filename import wheel.util import wheel.tool from wheel import egg2wheel from wheel.install import WheelFile from zipfile import ZipFile from shutil import rmtree test_distributions = ("complex-dist"...
gpl-3.0
alistairlow/tensorflow
tensorflow/python/keras/losses/__init__.py
75
2203
# 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
aforalee/rally
tests/unit/test_log.py
13
7028
# Copyright 2014: Mirantis 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
varunagrawal/azure-services
varunagrawal/VarunWeb/env/Lib/site-packages/_markerlib/markers.py
1769
3979
# -*- coding: utf-8 -*- """Interpret PEP 345 environment markers. EXPR [in|==|!=|not in] EXPR [or|and] ... where EXPR belongs to any of those: python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) python_full_version = sys.version.split()[0] os.name = os.name sys.platform = sys.platfo...
gpl-2.0
hzlf/openbroadcast
website/apps/alibrary/migrations/0070_auto__add_field_playlistitemplaylist_fade_cross.py
1
44115
# -*- coding: 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 'PlaylistItemPlaylist.fade_cross' db.add_column('alibrary_playlistitemplaylist', 'fade_cross'...
gpl-3.0
Godiyos/python-for-android
python3-alpha/python3-src/Lib/test/test_colorsys.py
98
2834
import unittest, test.support import colorsys def frange(start, stop, step): while start <= stop: yield start start += step class ColorsysTest(unittest.TestCase): def assertTripleEqual(self, tr1, tr2): self.assertEqual(len(tr1), 3) self.assertEqual(len(tr2), 3) self.as...
apache-2.0
blacklin/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/html5lib/constants.py
963
87346
from __future__ import absolute_import, division, unicode_literals import string import gettext _ = gettext.gettext EOF = None E = { "null-character": _("Null character in input stream, replaced with U+FFFD."), "invalid-codepoint": _("Invalid codepoint in stream."), "incorrectly-placed-so...
lgpl-3.0
tumbl3w33d/ansible
lib/ansible/playbook/role/__init__.py
22
21613
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
mitchellrj/touchdown
docs/conf.py
1
6509
# -*- coding: utf-8 -*- # # touchdown documentation build configuration file, created by # sphinx-quickstart on Tue Jun 28 13:27:09 2011. # # 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...
apache-2.0
amousset/ansible
lib/ansible/executor/task_result.py
130
2534
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
pombreda/django-hotclub
libs/external_libs/gdata.py-1.0.13/tests/gdata_tests/spreadsheet/service_test.py
5
7826
#!/usr/bin/python # # Copyright (C) 2007 Google 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 ...
mit
KevinPike/pycache
pycache/factory.py
1
1570
from pycache.client import BaseClient, CacheClient from twisted.internet.protocol import ClientFactory class BaseFactory(ClientFactory): def __init__(self, command, rest, version, headers, data, response): self.response = response self.command = command self.rest = rest self.header...
mit
jalexvig/tensorflow
tensorflow/python/kernel_tests/distributions/exponential_test.py
11
6220
# 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
aismail/proxysql-0.2
test/proxysql_ping_thread.py
6
2953
from email.mime.text import MIMEText import smtplib from threading import Thread import time import MySQLdb class ProxySQL_Ping_Thread(Thread): """ProxySQL_Ping_Thread's purpose is to do a continuous health check of the ProxySQL daemon when tests are running against it. When it has crashed or it's simply not respo...
gpl-3.0
scorphus/django
django/db/__init__.py
376
2322
from django.core import signals from django.db.utils import ( DEFAULT_DB_ALIAS, DJANGO_VERSION_PICKLE_KEY, ConnectionHandler, ConnectionRouter, DatabaseError, DataError, Error, IntegrityError, InterfaceError, InternalError, NotSupportedError, OperationalError, ProgrammingError, ) __all__ = [ 'backe...
bsd-3-clause
40223240/2015cdb_g3_40223240
static/Brython3.1.1-20150328-091302/Lib/test/support.py
603
68067
"""Supporting definitions for the Python regression tests.""" if __name__ != 'test.support': raise ImportError('support must be imported from the test package') import contextlib import errno import functools import gc import socket import sys import os import platform import shutil import warnings import unittes...
gpl-3.0
VincentCATILLON/navitia
source/jormungandr/jormungandr/interfaces/v1/make_links.py
6
12361
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
AdotDdot/sproxy
sproxy.py
1
17349
#!/usr/bin/env python # # sproxy.py # Copyright (C) 2014 by A.D. <adotddot1123@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the hope ...
gpl-3.0
Jonnymcc/ansible
lib/ansible/module_utils/rax.py
14
12055
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by # Ansible still belong to the author of the module, and may assign their own # license to the complete wo...
gpl-3.0
JonasFranzDEV/gitea
vendor/github.com/ugorji/go/codec/test.py
1516
4019
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). # Ensure msgpack-python and cbor are installed first, using: # sudo apt-get install python-dev # sudo apt-g...
mit
MrNuggles/HeyBoet-Telegram-Bot
temboo/Library/WolframAlpha/Query.py
5
12491
# -*- coding: utf-8 -*- ############################################################################### # # Query # Allows your application to submit free-form queries similar to the queries one might enter at the Wolfram|Alpha website. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed und...
gpl-3.0
noba3/KoTos
addons/Navi-X/init/default.py
7
2491
############################################################################# # # Navi-X Playlist browser # ############################################################################# import xbmc, xbmcgui, xbmcaddon import re, os, time, datetime, traceback import urllib2 import zipfile import shutil ###############...
gpl-2.0
pyladieshre/pyladies
profiles/migrations/0002_auto_20170301_1823.py
1
1075
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-03-01 16:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('profiles', '0001_initial'), ] operations = [ migrations.RemoveField( ...
mit
spzala/heat-translator
translator/hot/translate_outputs.py
1
1734
# # 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 the ...
apache-2.0
shakybones/omaha
enterprise/build_group_policy_template.py
63
2024
#!/usr/bin/python2.4 # # Copyright 2009 Google 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 o...
apache-2.0
Lilywei123/tempest
tempest/api/compute/admin/test_flavors_access.py
3
4324
# 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
ujjvala-addsol/addsol_hr
openerp/addons/crm/report/crm_opportunity_report.py
309
4879
# -*- 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
jumpstarter-io/nova
nova/api/openstack/compute/plugins/v3/certificates.py
15
3057
# Copyright (c) 2012 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 ...
apache-2.0
byterom/android_external_skia
platform_tools/android/gyp_gen/generate_user_config.py
67
3795
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Function for generating the SkUserConfig file, customized for Android.""" import os import shutil AUTOGEN_WARNING = ( """ ///////////////////////////////////////...
bsd-3-clause
ethertricity/bluesky
bluesky/traffic/route.py
1
40143
""" Route implementation for the BlueSky FMS.""" from os import path from numpy import * import bluesky as bs from bluesky.tools import geo from bluesky.tools.aero import ft, kts, g0, nm, mach2cas from bluesky.tools.misc import degto180 from bluesky.tools.position import txt2pos from bluesky import stack from ...
gpl-3.0
upndwn4par/android_kernel_lge_hammerhead
scripts/gcc-wrapper.py
1276
3382
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. 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 th...
gpl-2.0
flh/odoo
addons/note/tests/__init__.py
159
1105
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-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
mdaif/olympia
apps/reviews/tasks.py
11
3537
import logging from django.db.models import Count, Avg, F import caching.base as caching from addons.models import Addon from amo.celery import task from .models import Review, GroupedRating log = logging.getLogger('z.task') @task(rate_limit='50/m') def update_denorm(*pairs, **kw): """ Takes a bunch of (a...
bsd-3-clause
SUSE/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/virtual_network.py
2
3725
# 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
m-sanders/wagtail
wagtail/wagtailcore/blocks/field_block.py
1
15150
from __future__ import absolute_import, unicode_literals import datetime import six from django import forms from django.db.models.fields import BLANK_CHOICE_DASH from django.template.loader import render_to_string from django.utils.encoding import force_text from django.utils.dateparse import parse_date, parse_time,...
bsd-3-clause
kalov/ShapePFCN
caffe-ours/python/caffe/io.py
1
12728
import numpy as np import skimage.io from scipy.ndimage import zoom from skimage.transform import resize try: # Python3 will most likely not be able to load protobuf from caffe.proto import caffe_pb2 except: import sys if sys.version_info >= (3, 0): print("Failed to include caffe_pb2, things mi...
gpl-3.0
Dawny33/luigi
examples/spark_als.py
55
4373
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
apache-2.0
gautamMalu/XenInBox
pyanaconda/ui/gui/spokes/advstorage/dasd.py
9
4925
# DASD configuration dialog # # Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed...
gpl-2.0
Gabotero/GNURadioNext
gr-uhd/examples/python/usrp_nbfm_ptt.py
58
17843
#!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
gpl-3.0
mgagne/nova
nova/tests/unit/scheduler/test_scheduler.py
4
6317
# 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 compliance with the License. You may obtain # a ...
apache-2.0
killabytenow/chirribackup
chirribackup/chunk.py
1
17877
#!/usr/bin/env python # -*- coding: UTF-8 -*- ############################################################################### # chirribackup/chunk.py # # Represents a chunk (in disk and database) # # ----------------------------------------------------------------------------- # Chirri Backup - Cheap and ugly backup ...
gpl-3.0
sudosurootdev/external_chromium_org
tools/json_to_struct/struct_generator.py
129
1501
# Copyright (c) 2012 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. def _GenerateArrayField(field_info): """Generate a string defining an array field in a C structure. """ contents = field_info['contents'] content...
bsd-3-clause
DomenicD/dom_ml_playground
python/src/learning_algorithms/backpropagation.py
1
3948
from python.src.neural_networks.neural_network_utils import NeuralNetworkUtils from python.src.neurons.neurons import NeuronType import math import random # http://home.agh.edu.pl/~vlsi/AI/backp_t_en/backprop.html # http://www.cse.unsw.edu.au/~cs9417ml/MLP2/ class TrainingResult(object): def __init__(self, epo...
mit
mattt416/ansible-lxc-rpc
scripts/elsa_repo.py
4
26976
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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...
apache-2.0
orgito/ansible
test/runner/lib/sanity/pslint.py
35
5231
"""Sanity test using PSScriptAnalyzer.""" from __future__ import absolute_import, print_function import collections import json import os import re from lib.sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, SanitySuccess, SanitySkipped, ) from lib.util import ( SubprocessErro...
gpl-3.0
nhippenmeyer/django
django/contrib/gis/db/backends/postgis/const.py
528
1484
""" PostGIS to GDAL conversion constant definitions """ # Lookup to convert pixel type values from GDAL to PostGIS GDAL_TO_POSTGIS = [None, 4, 6, 5, 8, 7, 10, 11, None, None, None, None] # Lookup to convert pixel type values from PostGIS to GDAL POSTGIS_TO_GDAL = [1, 1, 1, 3, 1, 3, 2, 5, 4, None, 6, 7, None, None] # ...
bsd-3-clause
ColOfAbRiX/ansible
lib/ansible/modules/identity/ipa/ipa_sudocmd.py
28
6618
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
gpl-3.0
sserrot/champion_relationships
venv/Lib/site-packages/tornado/escape.py
4
13174
# # Copyright 2009 Facebook # # 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, s...
mit
smaffulli/libcloud
libcloud/common/brightbox.py
55
3413
# 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 use ...
apache-2.0
gregcaporaso/qiime
tests/test_add_alpha_to_mapping_file.py
15
14308
#!/usr/bin/env python # File created on 02 Nov 2012 from __future__ import division __author__ = "Yoshiki Vazquez-Baeza" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Yoshiki Vazquez-Baeza"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Yoshiki Vazquez-Baeza" __email__ = "yoshik...
gpl-2.0
qiuzhong/crosswalk-test-suite
apptools/apptools-android-tests/apptools/multiple_icons.py
3
6492
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
TEAM-Gummy/platform_external_chromium_org
tools/run-bisect-perf-regression.py
26
14140
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run Performance Test Bisect Tool This script is used by a trybot to run the src/tools/bisect-perf-regression.py script with the...
bsd-3-clause
HenryTheHamster/cloud-init
cloudinit/config/cc_disk_setup.py
5
27517
# vi: ts=4 expandtab # # Copyright (C) 2009-2010 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Ben Howard <ben.howard@canonical.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
zestrada/nova-cs498cc
nova/consoleauth/rpcapi.py
5
2856
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Red Hat, 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 # ...
apache-2.0
ojengwa/talk
venv/lib/python2.7/site-packages/django/contrib/staticfiles/finders.py
106
9852
from collections import OrderedDict import os from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import default_storage, Storage, FileSystemStorage from django.utils.functional import empty, LazyObject from django.utils.m...
mit
adailtonjn68/pwm-control
pwm_control.py
1
4004
#!/usr/bin/python3 ''' This program was created by Adailton Braga Júnior in July/2015. Its main purpose is to allow the user to control the Arduino's PWM ports. ''' from tkinter import * import serial from time import sleep class Serialport(object): '''This class takes care of the arduino connection using the ser...
gpl-2.0
hdinsight/hue
desktop/core/ext-py/pytz-2015.2/pytz/lazy.py
514
5263
from threading import RLock try: from UserDict import DictMixin except ImportError: from collections import Mapping as DictMixin # With lazy loading, we might end up with multiple threads triggering # it at the same time. We need a lock. _fill_lock = RLock() class LazyDict(DictMixin): """Dictionary popu...
apache-2.0
doug-willowit/Pentaho-reports-for-OpenERP
openerp_addon/pentaho_reports/core.py
1
8394
# Todo: # multiple prpt files for one action - allows for alternate formats. import io import os import logging import subprocess import xmlrpclib import base64 import netsvc import pooler import report from osv import osv, fields from tools.translate import _ from datetime import datetime from .java_oe import ...
gpl-2.0
k3nnyfr/s2a_fr-nsis
s2a/Python/Lib/decimal.py
19
220995
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # and Facundo Batista <facundo at taniquetil.com.ar> # and Raymond Hettinger <python at rcn.com> # and Aahz <aahz at pobox.com> # and Tim Peters # This module is currently Py2.3 compatibl...
gpl-3.0
abudnik/elliptics
bindings/python/src/log.py
6
3314
# ============================================================================= # 2013+ Copyright (c) Kirill Smorodinnikov <shaitkir@gmail.com> # All rights reserved. # # 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 Fre...
lgpl-3.0
jiangzhuo/kbengine
kbe/res/scripts/common/Lib/idlelib/ScrolledList.py
76
4159
from tkinter import * class ScrolledList: default = "(None)" def __init__(self, master, **options): # Create top frame, with scrollbar and listbox self.master = master self.frame = frame = Frame(master) self.frame.pack(fill="both", expand=1) self.vbar = vbar = Scrollba...
lgpl-3.0
a-x-/httpie
tests/test_auth.py
7
2318
"""HTTP authentication-related tests.""" import requests import pytest from utils import http, add_auth, HTTP_OK, TestEnvironment import httpie.input import httpie.cli class TestAuth: def test_basic_auth(self, httpbin): r = http('--auth=user:password', 'GET', httpbin.url + '/basic-auth/u...
bsd-3-clause
scorphus/django
tests/extra_regress/models.py
281
1401
from __future__ import unicode_literals import copy import datetime from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class RevisionableModel(models.Model): base = models.ForeignKey('self', models.S...
bsd-3-clause
cloudbase/cloudbase-init-ci
argus/action_manager/base.py
3
5043
# Copyright 2015 Cloudbase Solutions Srl # 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 r...
apache-2.0
wilmarcardonac/fisher-mcmc
class_montanari-lensing/external_Pk/generate_Pk_example_w_tensors.py
3
1753
#!/usr/bin/python import sys from math import exp # README: # # This is an example python script for the external_Pk mode of Class. # It generates the primordial spectrum of LambdaCDM. # It can be edited and used directly, though keeping a copy of it is recommended. # # Two (maybe three) things need to be edited: # # ...
gpl-2.0
emilroz/openmicroscopy
components/tools/OmeroPy/test/integration/test_model42.py
5
2560
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Integration test focused on the model changes in 4.2 Copyright 2010-2013 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import test.integration.library as lib from omero.rtypes import * class TestMo...
gpl-2.0
romankagan/DDBWorkbench
python/helpers/docutils/parsers/rst/languages/ru.py
57
5207
# $Id: ru.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Roman Suzi <rnd@onego.ru> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each...
apache-2.0
zeeman/cyder
lib/log.py
2
2154
"""Taken from funfactory (funfactory/log.py) on a380a54""" import logging from django.conf import settings from django.http import HttpRequest import commonware class AreciboHandler(logging.Handler): """An exception log handler that sends tracebacks to Arecibo.""" def emit(self, record): from djang...
bsd-3-clause
michaelgugino/web_keyer
werkzeug/testsuite/compat.py
102
1117
# -*- coding: utf-8 -*- """ werkzeug.testsuite.compat ~~~~~~~~~~~~~~~~~~~~~~~~~ Ensure that old stuff does not break on update. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import warnings from werkzeug.testsuite import WerkzeugTestCase ...
gpl-3.0
Hawaii-Smart-Energy-Project/Maui-Smart-Grid
src/static-data-insert/insertSCADAWeatherData.py
1
3206
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Script for inserting Kihei SCADA temperature and humidity data. Usage: With the current working directory set to the path containing the data files, python insertSCADAWeatherData.py """ __author__ = 'Daniel Zhang (張道博)' __copyright__ = 'Copyright (c) 2013, Uni...
bsd-3-clause
matthaywardwebdesign/rethinkdb
test/rql_test/connections/http_support/werkzeug/testsuite/contrib/sessions.py
146
2325
# -*- coding: utf-8 -*- """ werkzeug.testsuite.sessions ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Added tests for the sessions. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import unittest import shutil from tempfile import mkdtemp, gettempdir from werkzeug...
agpl-3.0