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
sonnyhu/numpy
numpy/linalg/lapack_lite/clapack_scrub.py
76
7701
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import sys, os from io import StringIO import re from Plex import * from Plex.Traditional import re as Re class MyScanner(Scanner): def __init__(self, info, name='<default>'): Scanner.__init__(self, self.lexicon, info,...
bsd-3-clause
OpenPymeMx/OCB
addons/l10n_nl/__init__.py
424
1413
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # con...
agpl-3.0
maxamillion/ansible-modules-core
cloud/openstack/os_floating_ip.py
12
9832
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Author: Davide Guerri <davide.guerri@hp.com> # # This module 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 ...
gpl-3.0
dgzurita/odoo
addons/account/project/wizard/account_analytic_chart.py
362
2100
# -*- 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
RealTimeWeb/wikisite
MoinMoin/support/xappy/fieldactions.py
4
17193
#!/usr/bin/env python # # Copyright (C) 2007 Lemur Consulting Ltd # # 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. # # ...
apache-2.0
samdoran/ansible
lib/ansible/module_utils/json_utils.py
62
3352
# 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
smalls257/VRvisu
Library/External.LCA_RESTRICTED/Languages/CPython/27/Lib/subprocess.py
32
54425
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://ww...
gpl-3.0
kfwang/Glance-OVA-OVF
glance/image_cache/client.py
10
4184
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/psycopg2/tests/test_connection.py
8
57273
#!/usr/bin/env python # test_connection.py - unit test for connection attributes # # Copyright (C) 2008-2011 James Henstridge <james@jamesh.id.au> # # 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 Foun...
mit
xtiankisutsa/MARA_Framework
tools/androguard/elsim/tests/test_similarity.py
12
16026
#!/usr/bin/env python # This file is part of Elsim. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim 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 ve...
lgpl-3.0
berkmancenter/mediacloud
apps/webapp-api/tests/python/auth/register/test_send_user_activation_token.py
1
1387
from mediawords.db import connect_to_db from webapp.auth.register import add_user, send_user_activation_token from webapp.auth.user import NewUser from webapp.test.dummy_emails import TestDoNotSendEmails class SendUserActivationTokenTestCase(TestDoNotSendEmails): def test_send_user_activation_token(self): ...
agpl-3.0
nycz/urd
matrix.py
1
2130
def default_item(): return ('', (0,0)) class Matrix(): def __init__(self): self.data = [[default_item()]] def __str__(self): return '\n'.join(repr(row) for row in self.data) # return '\n'.join('\t|\t'.join(repr(x) for x in row) for row in self.data) def __contains__(self, key...
mit
curtisstpierre/django
tests/flatpages_tests/test_middleware.py
290
8134
from django.conf import settings from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase, modify_settings, override_settings from .settings import FLATPAGES_TEMPLATES class TestDataMixin(object): ...
bsd-3-clause
nikste/tensorflow
tensorflow/contrib/testing/python/framework/fake_summary_writer.py
43
5024
# 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
HenryHu/pybbs
Board.py
1
46243
#!/usr/bin/env python # vim: set fileencoding=utf-8 : from Util import Util import Config import struct import json import base64 import BCache import User import BRead import BoardManager import UserManager import PostEntry from Error import * from Log import Log from cstruct import CStruct import fcntl import time im...
bsd-2-clause
collective/eden
static/scripts/tools/jsmin.py
513
7471
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-01-08 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted, free of ch...
mit
zsjohny/jumpserver
apps/settings/forms/ldap.py
1
1449
# coding: utf-8 # from django import forms from django.utils.translation import ugettext_lazy as _ from common.fields import FormDictField, FormEncryptCharField from .base import BaseForm __all__ = ['LDAPSettingForm'] class LDAPSettingForm(BaseForm): AUTH_LDAP_SERVER_URI = forms.CharField( label=_("L...
gpl-2.0
midnightmagic/bitcoin
test/functional/rpc_decodescript.py
45
16652
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test decoding scripts via decodescript RPC command.""" from test_framework.messages import CTransactio...
mit
radjkarl/imgProcessor
imgProcessor/measure/SNR/SNR_IEC.py
1
1187
# coding=utf-8 from __future__ import division import numpy as np def SNR_IEC(i1, i2, ibg=0, allow_color_images=False): ''' Calculate the averaged signal-to-noise ratio SNR50 as defined by IEC NP 60904-13 needs 2 reference EL images and one background image ''' # ensure images a...
gpl-3.0
PIVX-Project/PIVX
test/functional/test_framework/bignum.py
6
1911
#!/usr/bin/env python3 # # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Big number routines. This file is copied from python-bitcoinlib. """ import struct # generic big endian MPI format def bn_bytes(v, have_ext=False): ...
mit
kingmotley/SickRage
sickbeard/name_parser/parser.py
1
24227
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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...
gpl-3.0
c0710204/edx-platform
common/djangoapps/util/tests/test_submit_feedback.py
40
16550
"""Tests for the Zendesk""" from django.contrib.auth.models import AnonymousUser from django.http import Http404 from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings from student.tests.factories import UserFactory from util import views from zen...
agpl-3.0
hallovveen31/smooth
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
nikitabiradar/student_registration
janastu/lib/python2.7/encodings/cp875.py
593
13110
""" Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
mit
y-higuchi/odenos
src/test/python/org/o3project/odenos/core/component/network/packet/test_ofp_in_packet.py
6
5404
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
apache-2.0
madmax983/h2o-3
py2/testdir_single_jvm/test_parse_many_cases.py
20
9104
import unittest, re, sys, random sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_cmd, h2o_import as h2i, h2o_args from h2o_test import verboseprint DO_RF = False DO_SUMMARY = False DO_INTERMEDIATE_RESULTS = False class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_...
apache-2.0
dya2/python-for-android
python-modules/twisted/twisted/protocols/memcache.py
60
23339
# -*- test-case-name: twisted.test.test_memcache -*- # Copyright (c) 2007-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Memcache client protocol. Memcached is a caching server, storing data in the form of pairs key/value, and memcache is the protocol to talk with it. To connect to a server, create ...
apache-2.0
barseghyanartur/django-extensions
django_extensions/management/commands/passwd.py
27
1306
import getpass from django.core.management.base import BaseCommand, CommandError from django_extensions.compat import get_user_model from django_extensions.management.utils import signalcommand class Command(BaseCommand): help = "Clone of the UNIX program ``passwd'', for django.contrib.auth." requires_syst...
mit
mikemow/youtube-dl
youtube_dl/extractor/wdr.py
110
10166
# -*- coding: utf-8 -*- from __future__ import unicode_literals import itertools import re from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urlparse, ) from ..utils import ( determine_ext, unified_strdate, ) class WDRIE(InfoExtractor): _PLAYER_REGEX = '-(?:video|a...
unlicense
makson96/Recultis
games/doom3/game.py
2
2138
#!/usr/bin/env python3 #-*- coding: utf-8 -*- ##This software is available to you under the terms of the GPL-3, see "/usr/share/common-licenses/GPL-3". ##Copyright: ##- Tomasz Makarewicz (makson96@gmail.com) import os, shutil from subprocess import check_output recultis_dir = os.getenv("HOME") + "/.recultis/" self_d...
gpl-3.0
Daniel-CA/odoomrp-wip-public
stock_picking_package_info/models/stock_quant.py
16
4961
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class StockQua...
agpl-3.0
MangoMangoDevelopment/neptune
lib/ros_comm-1.12.0/tools/rosconsole/scripts/generate_speed_test.py
1
5464
#!/usr/bin/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 mus...
bsd-3-clause
12019/python-gsmmodem
gsmmodem/exceptions.py
13
4484
""" Module defines exceptions used by gsmmodem """ class GsmModemException(Exception): """ Base exception raised for error conditions when interacting with the GSM modem """ class TimeoutException(GsmModemException): """ Raised when a write command times out """ def __init__(self, data=None): ...
lgpl-3.0
jasperges/blenderseed
__init__.py
1
2505
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2014-2017 The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this s...
mit
steingabelgaard/odoo-infrastructure
infrastructure_contract/database.py
1
2074
#-*- coding: utf-8 -*- from openerp import models, fields, api, _ from openerp.exceptions import Warning from urlparse import urlparse class database(models.Model): _inherit = "infrastructure.database" contract_id = fields.Many2one( 'account.analytic.account', string='Contract', doma...
agpl-3.0
carthagecollege/django-djforms
djforms/polisci/model_united_nations/forms.py
2
4544
# -*- coding: utf-8 -*- from django import forms from djforms.polisci.model_united_nations.models import Attender from djforms.polisci.model_united_nations.models import Country from djforms.core.models import STATE_CHOICES, PAYMENT_CHOICES from djforms.processors.models import Order from djtools.fields.local...
unlicense
psb-seclab/MAdKiller
pywebsocket-0.7.9/src/example/close_wsh.py
495
2835
# Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
gpl-2.0
Charlotte-Morgan/inasafe
safe/gui/tools/wizard/step_fc60_agglayer_from_browser.py
6
3715
# coding=utf-8 """InaSAFE Wizard Step Aggregation Layer Browser.""" # noinspection PyPackageRequirements from qgis.PyQt.QtGui import QPixmap from safe import messaging as m from safe.gui.tools.wizard.utilities import layers_intersect from safe.gui.tools.wizard.wizard_step import get_wizard_step_ui_class from safe.gui...
gpl-3.0
bhilburn/gnuradio
gr-qtgui/examples/pyqt_example_c.py
38
6375
#!/usr/bin/env python # # Copyright 2011,2012 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 optio...
gpl-3.0
kingvuplus/enigma2
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
2
23685
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.Console import Console from Components.ActionMap import ActionMap, NumberActionMap from Components.Pixmap import Pixmap from Tools.LoadPixmap import LoadPixmap from Components.Label import Label from Components.Sources.StaticText i...
gpl-2.0
zakki/openhsp
hsp3ll/llvm/utils/lit/lit/main.py
2
18194
#!/usr/bin/env python """ lit - LLVM Integrated Tester. See lit.pod for more information. """ from __future__ import absolute_import import math, os, platform, random, re, sys, time import lit.ProgressBar import lit.LitConfig import lit.Test import lit.run import lit.util import lit.discovery class TestingProgress...
bsd-3-clause
bmedx/modulestore
xmodule/contentstore/content.py
17
19479
import re import uuid from xmodule.assetstore.assetmgr import AssetManager STATIC_CONTENT_VERSION = 1 XASSET_LOCATION_TAG = 'c4x' XASSET_SRCREF_PREFIX = 'xasset:' XASSET_THUMBNAIL_TAIL_NAME = '.jpg' STREAM_DATA_CHUNK_SIZE = 1024 VERSIONED_ASSETS_PREFIX = '/assets/courseware' VERSIONED_ASSETS_PATTERN = r'/assets/cours...
apache-2.0
Ell/goonauth
goonauth/settings.py
1
5913
import os PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = [ ("Your Name", "your_email@example.com"), ] MANAGERS = ADMINS DATABASES = { "default": { "ENGINE": "d...
mit
75651/kbengine_cloud
kbe/src/lib/python/Lib/logging/config.py
83
35727
# Copyright 2001-2014 by Vinay Sajip. 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 all copies and that # both that copyright notice and this permissio...
lgpl-3.0
SaranyaKarthikeyan/boto
tests/integration/iam/test_cert_verification.py
126
1542
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software withou...
mit
mkraemer67/pylearn2
pylearn2/linear/tests/test_matrixmul.py
49
3201
from pylearn2.linear.matrixmul import MatrixMul, make_local_rfs from pylearn2.datasets.dense_design_matrix import DefaultViewConverter from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix import theano from theano import tensor import numpy as np def test_matrixmul(): """ Tests matrix multiplic...
bsd-3-clause
andybalaam/cell
tests/library_tests.py
1
6619
from io import StringIO from tests.util.asserts import assert_that, assert_fails, equals from tests.util.test import test from pycell.env import Env from pycell.eval_ import eval_list from pycell.lexer import lex from pycell.parser import parse import pycell.library # --- Utils def evald(inp, stdout=None): e...
mit
kunesj/conkyKeep
conkyKeep/build_conkyrc.py
1
1624
#!/usr/bin/env python3 # encoding: utf-8 from .configmanager import CONFIG_MANAGER CONKYRC_TOP = """ -- This file gets automatically generated by build_conkyrc.py conky.config = { """ CONKYRC_BOTTOM = """ total_run_times = 0, alignment = 'top_right', background = true, own_window = true, own_windo...
gpl-3.0
timothydmorton/bokeh
bokeh/deprecate.py
43
18856
# This deprecation library was adapted from Twisted. Full copyright # statement retained at the bottom of this file """ Deprecation framework for Twisted. To mark a method or function as being deprecated do this:: from twisted.python.versions import Version from twisted.python.deprecate import deprecated ...
bsd-3-clause
Insolita/creepy
creepy/ui/FilterLocationsPointDialog.py
7
6011
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\filterLocationsPointDialog.ui' # # Created: Fri Jan 31 15:33:25 2014 # by: PyQt4 UI code generator 4.9.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fr...
gpl-3.0
jardasgit/libvirt
tests/cputestdata/cpu-cpuid.py
3
6216
#!/usr/bin/env python3 import os import sys import json import xmltodict def checkCPUIDFeature(cpuData, feature): eax_in = feature["eax_in"] ecx_in = feature["ecx_in"] eax = feature["eax"] ebx = feature["ebx"] ecx = feature["ecx"] edx = feature["edx"] if "cpuid" not in cpuData: r...
lgpl-2.1
aESeguridad/GERE
venv/local/lib/python2.7/encodings/iso8859_9.py
593
13412
""" Python Character Mapping Codec iso8859_9 generated from 'MAPPINGS/ISO8859/8859-9.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
gpl-3.0
luismmontielg/pyplotter
setup.py
1
1841
#-*- coding: utf-8 -*- from pyplotter import __version__ import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup try: import subprocess def convert(source, from_format, to_format): p = subprocess.Popen(['pandoc', '--from=' + from_format, '--...
mit
jcrist/pydy
examples/Kane1985/Chapter6/Ex11.12_11.13.py
8
2718
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercises 11.12, 11.13 from Kane 1985.""" from __future__ import division from sympy import pi, solve, symbols, trigsimp from sympy.physics.mechanics import ReferenceFrame, RigidBody, Point from sympy.physics.mechanics import dot, dynamicsymbols, inertia, msprint from u...
bsd-3-clause
jomo/youtube-dl
youtube_dl/extractor/nrk.py
6
10646
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, parse_duration, unified_strdate, ) class NRKIE(InfoExtractor): _VALID_URL = r'(?:nrk:|http://(?:www\.)?nrk\.no/video/PS\*)(?P<id>\d+)' _...
unlicense
0x46616c6b/ansible
lib/ansible/modules/network/snmp_facts.py
11
13233
#!/usr/bin/python # This file is part of Networklore's snmp library for Ansible # # The module 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 ...
gpl-3.0
OpenMined/PySyft
packages/syft/src/syft/proto/lib/tenseal/vector_pb2.py
1
4088
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/lib/tenseal/vector.proto """Generated protocol buffer code.""" # third party from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as ...
apache-2.0
wrigri/compute-image-packages
packages/python-google-compute-engine/google_compute_engine/metadata_scripts/script_manager.py
6
4004
#!/usr/bin/python # Copyright 2016 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 appli...
apache-2.0
FATruden/boto
tests/integration/gs/util.py
9
3215
# Copyright (c) 2012, Google, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify...
mit
Thraxis/pymedusa
lib/unidecode/x0c6.py
253
4490
data = ( 'yeoss', # 0x00 'yeong', # 0x01 'yeoj', # 0x02 'yeoc', # 0x03 'yeok', # 0x04 'yeot', # 0x05 'yeop', # 0x06 'yeoh', # 0x07 'ye', # 0x08 'yeg', # 0x09 'yegg', # 0x0a 'yegs', # 0x0b 'yen', # 0x0c 'yenj', # 0x0d 'yenh', # 0x0e 'yed', # 0x0f 'yel', # 0x10 'yelg', ...
gpl-3.0
h-hirokawa/swampdragon
setup.py
1
1269
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="SwampDragon", version="0.3.8.2", author="Jonas Hagstedt", author_email="hagstedt@gmail.com", description=("SwampDragon is a powerful platform ...
bsd-3-clause
apple/swift
benchmark/scripts/perf_test_driver/perf_test_driver.py
12
5953
#!/usr/bin/env python # ===--- perf_test_driver.py ---------------------------------------------===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See ...
apache-2.0
t-artistik/browserscope
categories/richtext2/handlers.py
16
4007
#!/usr/bin/python2.5 # # Copyright 2010 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 or ...
apache-2.0
nju520/django
django/conf/locale/pt/formats.py
504
1717
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = '...
bsd-3-clause
pquerna/cloud-init-debian-pkg-dead
cloudinit/config/cc_seed_random.py
6
3161
# vi: ts=4 expandtab # # Copyright (C) 2013 Yahoo! Inc. # Copyright (C) 2014 Canonical, Ltd # # Author: Joshua Harlow <harlowja@yahoo-inc.com> # Author: Dustin Kirkland <kirkland@ubuntu.com> # Author: Scott Moser <scott.moser@canonical.com> # # This program is free software: you can redistribute it an...
gpl-3.0
vmora/QGIS
python/plugins/processing/algs/grass7/ext/v_net_path.py
12
1468
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_path.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr ************************...
gpl-2.0
vasyarv/edx-platform
common/djangoapps/performance/views/__init__.py
100
1765
import datetime import json import logging from django.http import HttpResponse from track.utils import DateTimeJSONEncoder perflog = logging.getLogger("perflog") def _get_request_header(request, header_name, default=''): """Helper method to get header values from a request's META dict, if present.""" if ...
agpl-3.0
victorlin/ez2pay
ez2pay/models/user.py
1
6784
from __future__ import unicode_literals import os import hmac import hashlib from . import tables from .base import BaseTableModel class AuthError(RuntimeError): """Authentication error """ class BadPassword(AuthError): """Raised when user tries to authenticate with wrong password """ c...
mit
edxnercel/edx-platform
lms/djangoapps/courseware/grades.py
14
23832
# Compute grades using real division, with no integer truncation from __future__ import division from collections import defaultdict import json import random import logging from contextlib import contextmanager from django.conf import settings from django.db import transaction from django.test.client import RequestFa...
agpl-3.0
Tatsh/youtube-dl
youtube_dl/extractor/webofstories.py
21
5550
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, orderedSet, ) class WebOfStoriesIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?webofstories\.com/play/(?:[^/]+/)?(?P<id>[0-9]+)' _VIDEO_DOMAIN = 'http://eu-mob...
unlicense
StegSchreck/RatS
tests/unit/trakt/test_trakt_ratings_inserter.py
1
10089
import os from unittest import TestCase from unittest.mock import patch from RatS.trakt.trakt_ratings_inserter import TraktRatingsInserter TESTDATA_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'assets')) class TraktRatingsInserterTest(TestCase): def setUp(self): i...
agpl-3.0
hectorip/PolymerBoilerplate
bp_includes/external/requests/packages/urllib3/exceptions.py
374
3274
# urllib3/exceptions.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 ## Base Exceptions class HTTPError(Exception): "Base exception used by this module." ...
gpl-2.0
quentinlautischer/291MiniProject2
lib/python3.5/site-packages/bsddb3/tests/test_replication.py
1
21526
""" Copyright (c) 2008-2015, Jesus Cea Avion <jcea@jcea.es> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of...
apache-2.0
calebfoss/tensorflow
tensorflow/contrib/training/python/training/device_setter.py
38
3951
# 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
jamesthechamp/zamboni
mkt/search/filters.py
5
12097
from django.conf import settings from django.utils import translation from elasticsearch_dsl import F, query from elasticsearch_dsl.filter import Bool from rest_framework.filters import BaseFilterBackend import mkt from mkt.api.base import form_errors, get_region_from_request from mkt.constants.applications import ge...
bsd-3-clause
eerorika/ansible
test/units/module_utils/basic/test_exit_json.py
22
7348
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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 # (a...
gpl-3.0
nhenezi/kuma
vendor/packages/sqlparse/tests/test_format.py
6
10794
# -*- coding: utf-8 -*- from tests.utils import TestCaseBase import sqlparse class TestFormat(TestCaseBase): def test_keywordcase(self): sql = 'select * from bar; -- select foo\n' res = sqlparse.format(sql, keyword_case='upper') self.ndiffAssertEqual(res, 'SELECT * FROM bar; -- select f...
mpl-2.0
SummerLW/Perf-Insight-Report
dashboard/dashboard/task_runner.py
1
3164
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A tool to run long running tasks. This allows a task to run in Task Queue which gives about 10 minutes execution time. Usage: In https://chromeperf.app...
bsd-3-clause
SurfasJones/djcmsrc3
venv/lib/python2.7/site-packages/pip/_vendor/colorama/ansi.py
171
1089
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. ''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' def code_to_chars(code): return CSI + str(code) + 'm' class AnsiCodes(object):...
mit
ktritz/vispy
examples/basics/visuals/line_draw.py
18
6723
# -*- coding: utf-8 -*- # vispy: testskip (KNOWNFAIL) # Copyright (c) 2015, Felix Schill. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Simple demonstration of mouse drawing and editing of a line plot. This demo extends the Line visual from scene adding mouse events that allow modificat...
bsd-3-clause
pombredanne/erpnext
erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
12
1929
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import flt from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry cl...
agpl-3.0
thockin/contrib
flannel-server/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py
1138
3876
#!/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...
apache-2.0
linz/QGIS-AIMS-Plugin
AIMSDataManager/Feature.py
2
8047
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # Copyright 2015 Crown copyright (c) # Land Information New Zealand and the New Zealand Government. # All rights reserved # # This program is released under the terms of the 3 clause BSD license....
bsd-3-clause
carvsdriver/msm8660-common_marla
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
houzhenggang/openwrt-981213
scripts/dl_cleanup.py
223
6094
#!/usr/bin/env python3 """ # OpenWrt download directory cleanup utility. # Delete all but the very last version of the program tarballs. # # Copyright (C) 2010-2015 Michael Buesch <m@bues.ch> # Copyright (C) 2013-2015 OpenWrt.org """ from __future__ import print_function import sys import os import re import getopt ...
gpl-2.0
xwolf12/django
tests/flatpages_tests/test_forms.py
165
4569
from __future__ import unicode_literals from django.conf import settings from django.contrib.flatpages.forms import FlatpageForm from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase, modify_settings, override_settings from django.utils impor...
bsd-3-clause
dimkal/mne-python
mne/forward/_lead_dots.py
7
19514
# Authors: Eric Larson <larsoner@uw.edu> # Mainak Jas <mainak.jas@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # # License: BSD (3-clause) import os from os import path as op import numpy as np from numpy.polynomial import legendre from ..parallel import parallel_func from ..u...
bsd-3-clause
magic0704/neutron
neutron/tests/tempest/services/identity/v3/json/token_client.py
23
6596
# Copyright 2015 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
clidoc/clidoc
lib/gtest-1.7.0/test/gtest_test_utils.py
1100
10812
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
mit
Nicop06/ansible
lib/ansible/modules/windows/win_power_plan.py
42
1656
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- modul...
gpl-3.0
doganov/edx-platform
common/djangoapps/auth_exchange/views.py
116
3743
# pylint: disable=abstract-method """ Views to support exchange of authentication credentials. The following are currently implemented: 1. AccessTokenExchangeView: 3rd party (social-auth) OAuth 2.0 access token -> 1st party (open-edx) OAuth 2.0 access token 2. LoginWithAccessTokenView: 1st party (...
agpl-3.0
1900/scrapy
scrapy/contrib/memdebug.py
7
1346
""" MemoryDebugger extension See documentation in docs/topics/extensions.rst """ import gc from scrapy import signals from scrapy.exceptions import NotConfigured from scrapy.utils.trackref import live_refs class MemoryDebugger(object): def __init__(self, stats): try: import libxml2 ...
bsd-3-clause
mrquim/mrquimrepo
repo/script.module.schism.common/lib/bs4/builder/_htmlparser.py
41
9205
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __all__ = [ 'HTMLParserTreeBuilder', ] from HTMLParser import HTMLParser try: from HTMLParser import HTMLParseError except Impor...
gpl-2.0
kenwang815/KodiPlugins
script.module.youtube.dl/lib/youtube_dl/extractor/condenast.py
11
6255
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlencode, compat_urllib_parse_urlparse, compat_urlparse, ) from ..utils import ( orderedSet, remove_end, ) class CondeNastIE(InfoExtractor): """ ...
gpl-2.0
DBuildService/dbs-server
dbs/task_api.py
1
4794
from threading import Thread from celery import Celery from . import tasks from .celery import app __all__ = ('TaskApi', ) def watch_task(task, callback, kwargs=None): """ watch task until it ends and then execute callback: callback(response, **kwargs) where response is a result of task :...
bsd-3-clause
Kongsea/tensorflow
tensorflow/examples/learn/hdf5_classification.py
75
2899
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
apache-2.0
suyashphadtare/vestasi-erp-new-final
erpnext/setup/doctype/company/fixtures/india/__init__.py
36
4647
# 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 frappe from frappe import _ def install(company): docs = [ {'doctype': 'Deduction Type', 'name': 'Professional Tax', 'description': 'Prof...
agpl-3.0
anistark/demo
drsftask/drsftask/settings.py
1
2083
""" Django settings for drsftask project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
mit
open-dynaMIX/experms
src/experms/configfile/check_ownerandgroup.py
1
2097
# -*- coding: utf-8 -*- import sys import pwd import grp def check_ownerandgroup(parser, section, oorg, debug): if oorg == 'owner': switch = "User" else: switch = "Group" if not parser.has_option(section, oorg): if debug: print >> sys.stderr, ("[debug] '%s' in section...
gpl-3.0
indashnet/InDashNet.Open.UN2000
android/external/llvm/utils/wciia.py
16
2943
#!/usr/bin/env python """ wciia - Whose Code Is It Anyway Determines code owner of the file/folder relative to the llvm source root. Code owner is determined from the content of the CODE_OWNERS.TXT by parsing the D: field usage: utils/wciia.py path limitations: - must be run from llvm source root - very simplist...
apache-2.0