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
hertzwhenip/virtual-hammond
server/tests/test_rtttl_parser.py
1
2592
import unittest from sound.rtttl_parser import RtttlParser class TestRtttlParser(unittest.TestCase): SONG = { 'rtttl': 'The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6', 'name': 'The Simpsons', 'defaults': ['d=4', 'o=5', 'b=160']...
mit
bitforks/robofab
Lib/robofab/glifLib.py
5
22648
# -*- coding: utf-8 -*- """glifLib.py -- Generic module for reading and writing the .glif format. More info about the .glif format (GLyphInterchangeFormat) can be found here: http://robofab.com/ufo/glif.html The main class in this module is GlyphSet. It manages a set of .glif files in a folder. It offers two ways t...
bsd-3-clause
udxxabp/zulip
provision.py
23
5250
import os import sys import logging import platform try: import sh except ImportError: import pbs as sh SUPPORTED_PLATFORMS = { "Ubuntu": [ "trusty", ], } APT_DEPENDENCIES = { "trusty": [ "closure-compiler", "libffi-dev", "memcached", "rabbitmq-server", ...
apache-2.0
tlsantos/icecreamratings_project
icecreamratings_project/taskapp/celery.py
1
1159
from __future__ import absolute_import import os from celery import Celery from django.apps import AppConfig from django.conf import settings if not settings.configured: # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")...
bsd-3-clause
seanwestfall/django
tests/migrations/test_autodetector.py
33
109641
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import AbstractBaseUser from django.db import connection, models from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.graph import MigrationGraph from django.db.migrations.loader import Migr...
bsd-3-clause
wubomichael/devicemanage
src/lib/ydevicemanager/hwclass.py
1
22541
#!/usr/bin/env python # -*- coding: utf-8 -*- # StartOS Device Manager(ydm). # Copyright (C) 2011 ivali, Inc. # hechao <hechao@ivali.com>, 2011. #__author__="hechao" #__date__ ="$2011-12-20 16:36:20$" import gtk import time import os import pango import re import gobject import gettext from syscall import * from glo...
gpl-2.0
pedrobaeza/l10n-spain
l10n_es_aeat_mod130/__openerp__.py
2
2865
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) All rights reserved: # 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # Pedro M. Baeza <pedro.baeza@servici...
agpl-3.0
tedder/ansible
lib/ansible/modules/network/onyx/onyx_lldp.py
118
3101
#!/usr/bin/python # Copyright: Ansible Project # 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
Kotaimen/georest
georest/geo/__init__.py
1
3208
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '5/29/14' """ georest.geo ~~~~~~~~~~~ This package provides GeoJson a-like Feature data model. Various python geo packages: - Geometry Engine: - shapely - geos - osgeo.ogr - django.contrib.gis.geos ...
bsd-2-clause
pshchelo/heat
heat/rpc/client.py
2
28301
# # 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 # # Unless required by applicable law or a...
apache-2.0
paran0ids0ul/infernal-twin
build/pip/build/lib.linux-i686-2.7/pip/_vendor/requests/packages/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...
gpl-3.0
oVirt/vdsm
tests/stompasyncclient_test.py
2
7042
# # Copyright 2015-2017 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed ...
gpl-2.0
djeo94/CouchPotatoServer
libs/guessit/hash_mpc.py
150
1884
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 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
lexus24/40223224final
static/Brython3.1.1-20150328-091302/Lib/reprlib.py
923
5110
"""Redo the builtin repr() (representation) but with limits on most sizes.""" __all__ = ["Repr", "repr", "recursive_repr"] import builtins from itertools import islice try: from _thread import get_ident except ImportError: from _dummy_thread import get_ident def recursive_repr(fillvalue='...'): 'Decorato...
gpl-3.0
GDGLima/contentbox
third_party/django/contrib/gis/db/backends/postgis/models.py
222
2057
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GeometryColumns(models.Model): """ The ...
apache-2.0
danieldresser/cortex
test/IECoreMaya/ObjectDataTest.py
12
3927
########################################################################## # # Copyright (c) 2011, 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: # # * Redistribu...
bsd-3-clause
lmprice/ansible
lib/ansible/modules/utilities/logic/debug.py
76
1962
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
patdoyle1/FastMath
lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2994
1681
######################## 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
nrc/servo
tests/wpt/web-platform-tests/referrer-policy/generic/subresource/subresource.py
122
3162
import os, sys, json, urlparse, urllib def get_template(template_basename): script_directory = os.path.dirname(os.path.abspath(__file__)) template_directory = os.path.abspath(os.path.join(script_directory, "..", ...
mpl-2.0
mapzen/TileStache
TileStache/Goodies/Providers/Cascadenik.py
13
1591
''' Cascadenik Provider. Simple wrapper for TileStache Mapnik provider that parses Cascadenik MML files directly, skipping the typical compilation to XML step. More information on Cascadenik: - https://github.com/mapnik/Cascadenik/wiki/Cascadenik Requires Cascadenik 2.x+. ''' from tempfile import gettempdir try: ...
bsd-3-clause
MattDevo/edk2
BaseTools/Source/Python/UPT/Library/DataType.py
1
34284
## @file # This file is used to define class for data type structure # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution...
bsd-2-clause
weiyuliang/rt-thread
bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py
10
4003
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='gcc' # bsp lib config BSP_LIBRARY_TYPE = None if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute...
apache-2.0
qqzwc/XX-Net
code/default/python27/1.0/lib/win32/cryptography/hazmat/primitives/asymmetric/dsa.py
28
6292
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import six from cryptography import utils @six.add_metacla...
bsd-2-clause
GuillaumeDerval/INGInious
frontend/plugins/task_file_managers/_dicttorst.py
2
3843
# -*- coding: utf-8 -*- # # Copyright (c) 2014-2015 Université Catholique de Louvain. # # This file is part of INGInious. # # INGInious is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 o...
agpl-3.0
haridsv/pip
pip/_vendor/requests/packages/urllib3/connection.py
483
9011
import datetime import sys import socket from socket import timeout as SocketTimeout import warnings from .packages import six try: # Python 3 from http.client import HTTPConnection as _HTTPConnection, HTTPException except ImportError: from httplib import HTTPConnection as _HTTPConnection, HTTPException cla...
mit
johnctitus/troposphere
troposphere/elasticache.py
1
5742
# Copyright (c) 2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. import re from . import AWSObject, AWSProperty, Tags from .validators import boolean, integer, network_port def validate_node_group_id(node_group_id): if re.match(r'\d{1,4}', node_group_id): ret...
bsd-2-clause
podemos-info/odoo
addons/stock/wizard/stock_inventory_line_split.py
9
4969
# -*- 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
jdmcbr/Shapely
tests/test_linear_referencing.py
8
3083
from . import unittest from shapely.geos import geos_version from shapely.geometry import Point, LineString, MultiLineString class LinearReferencingTestCase(unittest.TestCase): def setUp(self): self.point = Point(1, 1) self.line1 = LineString(([0, 0], [2, 0])) self.line2 = LineString(([3,...
bsd-3-clause
fly19890211/edx-platform
common/djangoapps/enrollment/errors.py
84
1396
"""All Error Types pertaining to Enrollment.""" class CourseEnrollmentError(Exception): """Generic Course Enrollment Error. Describes any error that may occur when reading or updating enrollment information for a user or a course. """ def __init__(self, msg, data=None): super(CourseEnrollmen...
agpl-3.0
saurabh6790/alert-med-lib
webnotes/model/doclist.py
34
3514
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import webnotes import webnotes.model from webnotes.model.doc import Document from webnotes import _ class DocList(list): """DocList object as a wrapper around a list""" def get(self, filters, limit=0): """pass...
mit
enitihas/SAC-Website
venv/lib/python2.7/site-packages/jinja2/_stringdefs.py
990
404291
# -*- coding: utf-8 -*- """ jinja2._stringdefs ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project, original implementation from Pygments. :co...
apache-2.0
lanbing510/GTDWeb
django/contrib/contenttypes/migrations/0001_initial.py
585
1227
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.contenttypes.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ContentType', fields=...
gpl-2.0
rgommers/numpy
numpy/core/shape_base.py
7
29001
__all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'block', 'hstack', 'stack', 'vstack'] import functools import itertools import operator import warnings from . import numeric as _nx from . import overrides from .multiarray import array, asanyarray, normalize_axis_index from . import fromnumeric as _fro...
bsd-3-clause
shawnadelic/shuup
shuup/admin/urls.py
2
2510
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import warnings import django.con...
agpl-3.0
shyamsg/SantasHelpers
chooseRegions.py
1
1551
#! /usr/bin/env python import argparse import numpy as np if __name__ == '__main__': parser = argparse.ArgumentParser(description="Choosen regions from the reference genome randomly") parser.add_argument("-i", "--inFai", dest="fai", type=str, metavar="InputFai", required=True, help='Input fai file.') par...
gpl-2.0
Vegaviet-DevTeam/kernel-stock-4.4.2-ef63slk
scripts/build-all.py
24
10334
#! /usr/bin/env python # Copyright (c) 2009-2013, 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 the above copyright # ...
gpl-2.0
zero-below/terraform
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...
mpl-2.0
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/Crypto/SelfTest/PublicKey/test_importKey.py
3
14951
# -*- coding: utf-8 -*- # # SelfTest/PublicKey/test_importKey.py: Self-test for importing RSA keys # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone i...
gpl-3.0
jonashaag/django-nonrel-nohistory
django/contrib/gis/admin/options.py
154
5376
from django.conf import settings from django.contrib.admin import ModelAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget from django.contrib.gis.gdal import OGRGeomType from django.contrib.gis.db import models class GeoModelAdmin(ModelAdmin): """ The administration options class for Geographi...
bsd-3-clause
Accelerite/cinder
cinder/tests/windows/test_windows_remotefs.py
35
6904
# Copyright 2014 Cloudbase Solutions Srl # # 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
hiaselhans/OpenGlider
tests/visual_test_profile.py
2
2135
import os import math import random import sys import unittest from openglider.airfoil.parametric import BezierProfile2D from openglider.vector import Polygon2D, PolyLine2D import openglider.plots.marks try: import openglider except ImportError: sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(s...
gpl-3.0
ammaradil/fibonacci
Lib/site-packages/psycopg2/tests/test_quote.py
7
8252
#!/usr/bin/env python # test_quote.py - unit test for strings quoting # # Copyright (C) 2007-2011 Daniele Varrazzo <daniele.varrazzo@gmail.com> # # psycopg2 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 Foundat...
mit
audiokit/csound
tests/soak/xx.py
7
1104
#!/usr/bin/python import os import sys csound = "../../csound" flags = "-d -W -m0" testFiles = [ cpumeter ] if len(sys.argv) == 2: csound = sys.argv[1] else: print "Testing git version" print "Using Csound Command: " + csound try: os.remove("Old_OutputX") except OSError: pass try: ...
lgpl-2.1
yxdong/ybk
ybk/frontend/analysis.py
1
1815
from datetime import datetime, timedelta from flask import render_template, request from flask.ext.login import login_required from .views import frontend from ybk.models import Exchange, Collection from ybk.settings import get_conf @frontend.route('/analysis/') @login_required def analysis(): nav = 'analysis'...
mit
iulian787/spack
var/spack/repos/builtin/packages/amdfftw/package.py
2
4829
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * from spack.pkg.builtin.fftw import FftwBase class Amdfftw(FftwBase): """FFTW (AMD Opti...
lgpl-2.1
eeshangarg/oh-mainline
vendor/packages/python-openid/openid/test/test_xri.py
87
3912
from unittest import TestCase from openid.yadis import xri class XriDiscoveryTestCase(TestCase): def test_isXRI(self): i = xri.identifierScheme self.failUnlessEqual(i('=john.smith'), 'XRI') self.failUnlessEqual(i('@smiths/john'), 'XRI') self.failUnlessEqual(i('smoker.myopenid.com'),...
agpl-3.0
tghack/tg17hack
crypto/badcrypt/src/monoalfencryption.py
1
1033
from string import letters, digits from random import shuffle def random_monoalpha_cipher(pool=None): """Generate a Monoalphabetic Cipher""" if pool is None: pool = letters + digits original_pool = list(pool) shuffled_pool = list(pool) shuffle(shuffled_pool) return dict(zip(original_poo...
mit
75651/kbengine_cloud
kbe/src/lib/python/Lib/unittest/test/test_runner.py
71
11704
import io import os import sys import pickle import subprocess import unittest from unittest.case import _Outcome from unittest.test.support import (LoggingResult, ResultWithNoStartTestRunStopTestRun) class TestCleanUp(unittest.TestCase): def testCleanUp(self): class ...
lgpl-3.0
funky81/android_kernel_n7000
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
lostdj/Jaklin-OpenJFX
modules/web/src/main/native/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py
4
4106
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
gpl-2.0
koomik/CouchPotatoServer
couchpotato/core/plugins/renamer.py
1
66589
import fnmatch import os import re import shutil import time import traceback from couchpotato import get_db from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEvent, fireEventAsync from couchpotato.core.helpers.encoding import toUnicode, ss, sp from couchpotato.core.helpers.variab...
gpl-3.0
bharatendra/ctools
token-hexkey.py
1
1336
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License...
apache-2.0
ayseyo/oclapi
django-nonrel/ocl/sources/feeds.py
7
2152
from django.contrib.contenttypes.models import ContentType from django.contrib.syndication.views import Feed from django.http import Http404 from django.shortcuts import get_object_or_404 from django.utils.feedgenerator import Atom1Feed from concepts.models import ConceptVersion, Concept from oclapi.feeds import FeedFi...
mpl-2.0
saurabh6790/ON-RISAPP
accounts/doctype/pos_setting/pos_setting.py
20
2334
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes import msgprint, _ from webnotes.utils import cint class DocType: def __init__(self,doc,doclist): self.doc, self.do...
agpl-3.0
tannoa2/RackHD
test/tests/api/v2_0/nodes_tests.py
1
20014
from config.api1_1_config import config as config_old #TODO remove when 2.0 worklfow API is implemented from config.api2_0_config import config from config.amqp import * from modules.logger import Log from modules.amqp import AMQPWorker from modules.worker import WorkerThread, WorkerTasks from on_http_api2_0 import A...
apache-2.0
jonhadfield/ansible
lib/ansible/module_utils/vmware.py
148
4173
# -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 yo...
gpl-3.0
Free-Software-for-Android/FasterGPS
Resources/parse_pool_ntp_org.py
3
3187
#! /usr/bin/env python import urllib2, re from HTMLParser import HTMLParser class MyHTMLParser(HTMLParser): def __init__(self, url, name): HTMLParser.__init__(self) self.name = name self.names = [] self.servers = [] self.div = False self.p_tag_count = 0 sel...
gpl-3.0
PyGithub/PyGithub
github/Path.py
2
3804
############################ Copyrights and license ############################ # # # Copyright 2018 Justin Kufro <jkufro@andrew.cmu.edu> # # Copyright 2018 Ivan Minno <iminno@andrew.cmu.edu> ...
lgpl-3.0
oxhagolli/ubhacking
UBHacking/pillpal/alphapillpal/views/accounts.py
1
4971
from django.shortcuts import render from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User, Group from django.http import HttpResponseRedirect, HttpResponseForbidden, \ Http404, HttpResponseBadRequest, HttpResponse from django.core.urlresolvers import reverse from dj...
mit
ajb/pittsburgh-purchasing-suite
purchasing/wexplorer/views.py
1
13399
# -*- coding: utf-8 -*- import re from flask import ( render_template, current_app, request, abort, flash, redirect, url_for ) from flask_login import current_user from purchasing.database import db from purchasing.utils import SimplePagination from purchasing.decorators import wrap_form, requires_roles from...
bsd-3-clause
BenClegg/piromancer-synth
synth/buttons.py
1
2343
# Licensed under GPLv3 (https://www.gnu.org/licenses/gpl.html) import time import threading import RPi.GPIO as GPIO # Button input pins P_BTN_OSC_WAVEFORM = 11 P_BTN_FILT_TYPE = 13 # PTM momentary switches should be connected to these pins and GND # Wave IDs WAVE_SUPERSAW = 1 # Roland JP-8000 emulation WAVE_SINE = 2...
gpl-3.0
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/Crypto/Random/OSRNG/__init__.py
137
1542
# # Random/OSRNG/__init__.py : Platform-independent OS RNG API # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is...
gpl-3.0
lyceel/engine
build/android/gyp/create_standalone_apk.py
126
1886
#!/usr/bin/env python # # Copyright 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. """Combines stripped libraries and incomplete APK into single standalone APK. """ import optparse import os import shutil import sy...
bsd-3-clause
bogdan-kulynych/cloudlectures
flask/debughelpers.py
69
3279
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ class DebugFilesKeyError(KeyError, AssertionError): """Raised from request.fil...
mit
AladdinSonni/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/applywatchlist.py
132
2983
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
malikabhi05/upm
examples/python/rpr220.py
6
2146
#!/usr/bin/env python # Author: Zion Orent <zorent@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 # without ...
mit
miguelfervi/SSBW-Restaurantes
restaurantes/lib/python2.7/site-packages/django/contrib/admin/options.py
26
81252
import copy import operator from collections import OrderedDict from functools import partial, reduce, update_wrapper from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from django.contrib.admin.checks import ( BaseModelAd...
gpl-3.0
tgl-dogg/BCC-2s14-PI4-SteampunkSpider
src/steampunk_spider/visualisacoes/lancamentosPorEstacao.py
1
4623
import math from math import pi, radians, sin, cos, degrees import mysql.connector from mysql.connector import errorcode size(2048, 2048) stroke(0) strokewidth(1) nofill() translate(1024, 1024) beginpath(0, 0) c = oval(-1024, -1024, 2048, 2048) endpath(draw = False) drawpath(c) months = ["Jan", "Feb", "Mar", "Apr"...
mit
vipul-sharma20/oh-mainline
vendor/packages/Django/django/contrib/formtools/tests/wizard/namedwizardtests/tests.py
90
15264
from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.http import QueryDict from django.test import TestCase from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formtools.wizard.views import (NamedUrlS...
agpl-3.0
Comunitea/OCB
addons/resource/faces/plocale.py
433
1910
############################################################################ # Copyright (C) 2005 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; you can redistribute it and/or modify # ...
agpl-3.0
jdemel/gr-misc
python/__init__.py
1
1915
# # Copyright 2008,2009 Free Software Foundation, Inc. # # This application 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 option) # any later version. # # This application is di...
gpl-3.0
Pi03k/py3specto
spectlib/plugins/watch_web_greader.py
2
10757
# -*- coding: utf-8 -*- # Specto , Unobtrusive event notifier # # watch_web_greader.py # # See the AUTHORS file for copyright ownership information # 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 Fo...
gpl-2.0
wkentaro/chainer
tests/chainer_tests/functions_tests/array_tests/test_as_strided.py
2
10239
import unittest import numpy as np import chainer from chainer import cuda from chainer import testing import chainer.functions as F from chainer.functions.array.as_strided import _stride_array def _broadcast_to(xp, x, shape): if hasattr(xp, 'broadcast_to'): return xp.broadcast_to(x, shape) else: ...
mit
supriyantomaftuh/django
tests/indexes/models.py
253
1714
from django.db import connection, models class CurrentTranslation(models.ForeignObject): """ Creates virtual relation to the translation with model cache enabled. """ # Avoid validation requires_unique_target = False def __init__(self, to, on_delete, from_fields, to_fields, **kwargs): ...
bsd-3-clause
mariosky/evo-drawings
venv/lib/python2.7/site-packages/numpy/fft/info.py
68
6882
""" Discrete Fourier Transform (:mod:`numpy.fft`) ============================================= .. currentmodule:: numpy.fft Standard FFTs ------------- .. autosummary:: :toctree: generated/ fft Discrete Fourier transform. ifft Inverse discrete Fourier transform. fft2 Discrete Fourier tr...
agpl-3.0
christianknu/eitu
eitu/views.py
1
2436
from django.http import HttpResponse, JsonResponse import logging from eitu.core import fetch_schedules, render, fetch_wifi import eitu.constants as constants import eitu.formaters as formaters from datetime import datetime import pytz import json def index(request): # Logging logging.getLogger().setLevel(l...
mit
was4444/chromium.src
third_party/WebKit/LayoutTests/http/tests/websocket/unmasked-frames_wsh.py
42
1486
from mod_pywebsocket import common from mod_pywebsocket import handshake from mod_pywebsocket import stream from mod_pywebsocket import msgutil def web_socket_do_extra_handshake(request): pass def web_socket_transfer_data(request): # pywebsocket does not mask message by default. We need to build a frame man...
bsd-3-clause
rtucker-mozilla/mozilla_inventory
vendor-local/src/django-tastypie/docs/conf.py
12
6393
# -*- coding: utf-8 -*- # # Tastypie documentation build configuration file, created by # sphinx-quickstart on Sat May 22 21:44:34 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
bsd-3-clause
kytvi2p/Sigil
3rdparty/python/Lib/test/test_exception_variations.py
182
4036
from test.support import run_unittest import unittest class ExceptionTestCase(unittest.TestCase): def test_try_except_else_finally(self): hit_except = False hit_else = False hit_finally = False try: raise Exception('nyaa!') except: hit_except = True...
gpl-3.0
xiaolonginfo/decode-Django
Django-1.5.1/tests/regressiontests/syndication/feeds.py
47
3651
from __future__ import absolute_import, unicode_literals from django.contrib.syndication import views from django.core.exceptions import ObjectDoesNotExist from django.utils import feedgenerator, tzinfo from .models import Article, Entry class ComplexFeed(views.Feed): def get_object(self, request, foo=None): ...
gpl-2.0
ehashman/oh-mainline
vendor/packages/django-extensions/django_extensions/utils/dia2django.py
44
10246
#!/usr/bin/python # -*- coding: UTF-8 -*- ##Author Igor Támara igor@tamarapatino.org ##Use this little program as you wish, if you #include it in your work, let others know you #are using it preserving this note, you have #the right to make derivative works, Use it #at your own risk. #Tested to work on(etch testing 13-...
agpl-3.0
mexeniz/django-oscar
src/oscar/apps/search/forms.py
31
5166
from collections import defaultdict from django import forms from django.forms.widgets import Input from django.conf import settings from django.utils.translation import ugettext_lazy as _ from haystack.forms import FacetedSearchForm from oscar.core.loading import get_class is_solr_supported = get_class('search.fea...
bsd-3-clause
nwiizo/workspace_2017
ansible-modules-extras/database/mssql/mssql_db.py
23
7543
#!/usr/bin/python # -*- coding: utf-8 -*- # Ansible module to manage mssql databases # (c) 2014, Vedit Firat Arig <firatarig@gmail.com> # Outline and parts are reused from Mark Theunissen's mysql_db module # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under t...
mit
erjohnso/ansible
lib/ansible/modules/network/junos/junos_lldp.py
22
6148
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
commtrack/commtrack-old-to-del
apps/xformmanager/management/commands/sync_schema.py
1
3624
""" This script downloads synchronization data from a remote server, deletes local xforms and submissions, and loads the data """ import bz2 import sys import tarfile import urllib2 import httplib import cStringIO from urlparse import urlparse from optparse import make_option from django.core.management.base import La...
bsd-3-clause
aldryn/heroku-buildpack-python
vendor/setuptools-1.1/setuptools/_backport/hashlib/_sha.py
77
9982
# -*- coding: iso-8859-1 -*- """A sample implementation of SHA-1 in pure Python. Framework adapted from Dinu Gherman's MD5 implementation by J. Hallén and L. Creighton. SHA-1 implementation based directly on the text of the NIST standard FIPS PUB 180-1. """ __date__ = '2004-11-17' __version__ = 0.91 # Mo...
mit
ActiveState/code
recipes/Python/412982_Use_PIL_make_contact_sheet_montage/recipe-412982.py
1
1718
def make_contact_sheet(fnames,(ncols,nrows),(photow,photoh), (marl,mart,marr,marb), padding): """\ Make a contact sheet from a group of filenames: fnames A list of names of the image files ncols Number of columns in the contact sheet n...
mit
GiovanniConserva/TestDeploy
venv/Lib/site-packages/pip/_vendor/html5lib/filters/whitespace.py
1730
1142
from __future__ import absolute_import, division, unicode_literals import re from . import _base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(_base.Filter): spacePreserveElements = frozenset...
bsd-3-clause
vvv1559/intellij-community
python/lib/Lib/encodings/ptcp154.py
647
8950
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,err...
apache-2.0
SCSSG/Odoo-SCS
addons/auth_openid/controllers/main.py
382
10399
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 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
staranjeet/fjord
vendor/packages/requests-2.7.0/requests/sessions.py
439
24250
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os from collections import Mapping from datetime import datetime from .auth import _basic_auth_str from .compat import cookielib, Or...
bsd-3-clause
peiyuwang/pants
tests/python/pants_test/util/test_tarutil.py
12
1839
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import tar...
apache-2.0
mgagne/nova
nova/tests/unit/api/openstack/compute/plugins/v3/test_user_data.py
7
7460
# Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp. # 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/LIC...
apache-2.0
kronicz/ecommerce-2
lib/python2.7/site-packages/PIL/McIdasImagePlugin.py
6
1755
# # The Python Imaging Library. # $Id$ # # Basic McIdas support for PIL # # History: # 1997-05-05 fl Created (8-bit images only) # 2009-03-08 fl Added 16/32-bit support. # # Thanks to Richard Jones and Craig Swank for specs and samples. # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # Se...
mit
poljeff/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
384
6603
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
Br1an6/ACS_Netplumber_Implementation
hassel-c/net_plumbing/headerspace/applications.py
6
7561
''' <Reachability and Loop detection applications -- Part of HSA Library> Copyright 2012, Stanford University. This file is licensed under GPL v2 plus a special exception, as described in included LICENSE_EXCEPTION.txt. Created on Jan 27, 2011 @author: Peyman Kazemian ''' from headerspace.hs import he...
gpl-2.0
rooi/CouchPotatoServer
libs/elixir/__init__.py
27
3687
''' Elixir package A declarative layer on top of the `SQLAlchemy library <http://www.sqlalchemy.org/>`_. It is a fairly thin wrapper, which provides the ability to create simple Python classes that map directly to relational database tables (this pattern is often referred to as the Active Record design pattern), provi...
gpl-3.0
gitterHQ/ansible
v2/ansible/parsing/yaml/composer.py
1
1212
from yaml.composer import Composer from yaml.nodes import MappingNode class AnsibleComposer(Composer): def __init__(self): self.__mapping_starts = [] super(Composer, self).__init__() def compose_node(self, parent, index): # the line number where the previous token has ended (plus empty ...
gpl-3.0
jthatch12/STi
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
ephes/scikit-learn
sklearn/decomposition/dict_learning.py
83
44062
""" Dictionary learning """ from __future__ import print_function # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause import time import sys import itertools from math import sqrt, ceil import numpy as np from scipy import linalg from numpy.lib.stride_tricks import as_strided from ..b...
bsd-3-clause