repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
lociii/googleads-python-lib
tests/adspygoogle/dfa/v1_18/change_log_service_unittest.py
3
4199
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
apache-2.0
timevortexproject/timevortex
features/steps/test_globals.py
1
2400
#!/usr/bin/python3 # -*- coding: utf8 -*- # -*- Mode: Python; py-indent-offset: 4 -*- """Functionnal test toolkit""" import shutil from os.path import exists from django.conf import settings from timevortex.utils.filestorage import SETTINGS_FILE_STORAGE_FOLDER, SETTINGS_DEFAULT_FILE_STORAGE_FOLDER from weather.utils....
mit
ric2b/Vivaldi-browser
chromium/third_party/webxr_test_pages/make_ot_samples_folder.py
10
1244
#!/usr/bin/env python # Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import shutil import sys samples_pages = [ 'xr-barebones.html', 'magic-window.html', 'teleportation.html', 'gamepad....
bsd-3-clause
r-icarus/openstack_microserver
horizon/test/tests/messages.py
10
2373
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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
bunjiboys/security_monkey
security_monkey/views/distinct.py
1
6408
# Copyright 2014 Netflix, 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...
apache-2.0
jiasir/get-dns
get-dns.py
1
1999
#!/usr/bin/env python __author__ = 'Taio' import os import os.path import dns.query import dns.zone import logging from utils.noflib import Noflib run = Noflib() logger = logging.getLogger('get-dns') logging.basicConfig(filename='/var/log/get-dns/get-dns.log', level=logging.DEBUG, format='%(ascti...
mit
maxalbert/blaze
blaze/compute/tests/test_numpy_compute.py
3
16537
from __future__ import absolute_import, division, print_function import pytest import numpy as np import pandas as pd from datetime import datetime, date from blaze.compute.core import compute, compute_up from blaze.expr import symbol, by, exp, summary, Broadcast, join, concat from blaze import sin from odo import i...
bsd-3-clause
Epirex/android_external_chromium_org
third_party/closure_linter/closure_linter/common/erroroutput.py
266
1549
#!/usr/bin/env python # # Copyright 2012 The Closure Linter Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
bsd-3-clause
GdZ/scriptfile
software/googleAppEngine/lib/django_1_2/tests/regressiontests/test_client_regress/urls.py
46
1903
from django.conf.urls.defaults import * from django.views.generic.simple import redirect_to import views urlpatterns = patterns('', (r'^no_template_view/$', views.no_template_view), (r'^staff_only/$', views.staff_only_view), (r'^get_view/$', views.get_view), (r'^request_data/$', views.request_data), ...
mit
wagtail/wagtail
wagtail/core/tests/test_management_commands.py
7
17243
from datetime import timedelta from io import StringIO from unittest import mock from django.contrib.auth import get_user_model from django.core import management from django.db import models from django.test import TestCase from django.utils import timezone from wagtail.core.models import Collection, Page, PageLogEn...
bsd-3-clause
srjoglekar246/sympy
sympy/solvers/inequalities.py
2
11736
"""Tools for solving inequalities and systems of inequalities. """ from sympy.core import Symbol, Interval from sympy.core.relational import Relational, Eq, Ge, Lt from sympy.core.singleton import S from sympy.assumptions import ask, AppliedPredicate, Q from sympy.functions import re, im, Abs from sympy.logic import ...
bsd-3-clause
ccrook/Quantum-GIS
cmake/FindPyQt5.py
9
3619
# -*- coding: utf-8 -*- # # Copyright (c) 2007, Simon Edwards <simon@simonzone.com> # 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...
gpl-2.0
torresalyssa/bitcoin
qa/rpc-tests/nodehandling.py
56
3626
#!/usr/bin/env python2 # Copyright (c) 2014 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 node handling # from test_framework.test_framework import BitcoinTestFramework from test_framework.u...
mit
quanvm009/codev7
openerp/addons/project_timesheet/report/__init__.py
441
1063
# -*- 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
xwu/swift
utils/bug_reducer/bug_reducer/list_reducer.py
12
7332
from __future__ import print_function import random TESTRESULT_NOFAILURE = "NoFailure" TESTRESULT_KEEPSUFFIX = "KeepSuffix" TESTRESULT_KEEPPREFIX = "KeepPrefix" TESTRESULTS = set([TESTRESULT_NOFAILURE, TESTRESULT_KEEPSUFFIX, TESTRESULT_KEEPPREFIX]) class ListReducer(object): """Reduce lists o...
apache-2.0
dhananjay92/servo
tests/wpt/web-platform-tests/html/tools/update_html5lib_tests.py
125
5358
import sys import os import hashlib import urllib import itertools import re import json import glob import shutil try: import genshi from genshi.template import MarkupTemplate from html5lib.tests import support except ImportError: print """This script requires the Genshi templating library and html5l...
mpl-2.0
meletakis/collato
lib/python2.7/site-packages/django/core/management/commands/dbshell.py
329
1243
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import connections, DEFAULT_DB_ALIAS class Command(BaseCommand): help = ("Runs the command-line client for specified database, or the " "default database if none is provided.") option_lis...
gpl-2.0
djmax81/android_kernel_samsung_exynos5433_LL
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
shizhai/wprobe
build_dir/host/scons-2.1.0/build/lib.linux-i686-2.7/SCons/Tool/packaging/src_tarbz2.py
21
1757
"""SCons.Tool.Packaging.tarbz2 The tarbz2 SRC packager. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software")...
gpl-2.0
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/tlslite/tlslite/utils/openssl_rsakey.py
200
4670
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """OpenSSL/M2Crypto RSA implementation.""" from .cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey #copied from M2Crypto.util.py, so when we load the local copy of m2 #we can still use i...
gpl-3.0
mysociety/pombola
pombola/south_africa/data/constituencies_and_offices/source_data/convert_to_import_json.py
5
42555
# *-* coding: utf-8 # Converts constituency files received from parties to the json format # suitable for import. The intention is to minimise manual editing, # although this is unavoidable. # For ANC files the major change made is remove PLOs (Parliamentary # Liason Officers) of ministers as they are understood to be...
agpl-3.0
datakid/hh2014-epilepsy
client_src/epilepsy-project/node_modules/ember-cli/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
899
2768
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
mit
palanglois/augmentedReality
testTensorFlow/MNIST.py
1
3453
#!/usr/bin/python #Load matplotlib import matplotlib.pyplot as plt plt.style.use('ggplot') #Loading the mnist data from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('MNIST_data', one_hot=True) #Import tensor flow import tensorflow as tf sess = tf.InteractiveSession() #Allo...
gpl-3.0
EzLucky/Wares
client/agent.py
1
3066
import time import os import requests import sys import platform import socket import random import string import settings import utils from modules import runcmd from modules import persistence from modules import download from modules import upload from modules import screenshot from modules import ddos from modules...
mit
gaddman/ansible
lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py
7
25717
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
double12gzh/nova
nova/tests/unit/api/openstack/compute/contrib/test_hypervisor_status.py
36
3820
# Copyright 2014 Intel Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
apache-2.0
awatts/boto
tests/unit/vpc/test_networkacl.py
113
20957
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection class TestDescribeNetworkAcls(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return b""" <DescribeNetworkAclsResponse xmlns="http://ec2.ama...
mit
konsP/synnefo
snf-astakos-app/astakos/im/management/commands/user-list.py
10
4358
# Copyright (C) 2010-2014 GRNET S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed i...
gpl-3.0
dhylands/bioloid3
tests/test_dump_mem.py
1
4201
#!/usr/bin/env python3 # This file tests the packet parser import unittest import binascii from bioloid.dump_mem import dump_mem PREFIX = ' Prefix' class TestDumpMem(unittest.TestCase): def clear_log(self): self.log_lines = [] def log(self, str): self.log_lines.append(str) #print(str) def t...
mit
datasciencebr/serenata-toolbox
tests/unit/test_datasets_downloader.py
1
4433
import asyncio import os from concurrent.futures import TimeoutError from unittest import TestCase from unittest.mock import Mock, patch from aiohttp import ClientSession from serenata_toolbox.datasets.downloader import Downloader class TestDownloader(TestCase): @patch('serenata_toolbox.datasets.downloader.os.p...
mit
embisi-github/gjslib
python/gjslib/graphics/opengl_app.py
1
32413
#!/usr/bin/env python #a Imports from OpenGL.GLUT import * from OpenGL.GLU import * from OpenGL.GL import * from OpenGL.GL import shaders import sys import math from gjslib.math import quaternion, matrix, vectors import OpenGL.arrays.vbo as vbo import numpy #a Default shaders shader_code={} shader_code["standard_vert...
apache-2.0
EvgeneOskin/oce
test/gtest-1.7.0/scripts/fuse_gtest_files.py
2577
8813
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
lgpl-2.1
olebole/astrometry.net
net/views/admin.py
2
1403
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, QueryDict from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import Context, RequestContext, loader from django.contrib.auth.decorators import login_required from astrometry.net.models im...
bsd-3-clause
thirdkey-solutions/pycoin
pycoin/ecdsa/ecdsa.py
20
6140
""" Some portions adapted from https://github.com/warner/python-ecdsa/ Copyright (c) 2010 Brian Warner who granted its use under this license: 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 with...
mit
fbukevin/jieba
jieba/analyse/textrank.py
57
3491
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import sys from operator import itemgetter from collections import defaultdict import jieba.posseg from .tfidf import KeywordExtractor from .._compat import * class UndirectWeightedGraph: d = 0.85 def __in...
mit
shusenl/scikit-learn
sklearn/manifold/tests/test_locally_linear.py
232
4761
from itertools import product from nose.tools import assert_true import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from scipy import linalg from sklearn import neighbors, manifold from sklearn.manifold.locally_linear import barycenter_kneighbors_graph from sklearn.utils.testi...
bsd-3-clause
dataxu/ansible
lib/ansible/modules/cloud/amazon/rds.py
30
55573
#!/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': ['stableinterf...
gpl-3.0
SamaraCardoso27/eMakeup
backend/venv/lib/python2.7/site-packages/unidecode/x0d0.py
253
4706
data = ( 'kweon', # 0x00 'kweonj', # 0x01 'kweonh', # 0x02 'kweod', # 0x03 'kweol', # 0x04 'kweolg', # 0x05 'kweolm', # 0x06 'kweolb', # 0x07 'kweols', # 0x08 'kweolt', # 0x09 'kweolp', # 0x0a 'kweolh', # 0x0b 'kweom', # 0x0c 'kweob', # 0x0d 'kweobs', # 0x0e 'kweos', # 0x...
mit
spywhere/Testful
yaml/error.py
294
2533
__all__ = ['Mark', 'YAMLError', 'MarkedYAMLError'] class Mark: def __init__(self, name, index, line, column, buffer, pointer): self.name = name self.index = index self.line = line self.column = column self.buffer = buffer self.pointer = pointer def get_snippet...
mit
bhargav2408/python-for-android
python3-alpha/python3-src/Lib/lib2to3/tests/pytree_idempotency.py
56
2405
#!/usr/bin/env python3 # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Main program for testing the infrastructure.""" __author__ = "Guido van Rossum <guido@python.org>" # Support imports (need to be imported first) from . import support # Python imports import...
apache-2.0
ak2703/edx-platform
openedx/core/djangoapps/content/course_overviews/tests.py
5
15602
""" Tests for course_overviews app. """ import datetime import ddt import itertools import pytz import math import mock from django.utils import timezone from lms.djangoapps.certificates.api import get_active_web_certificate from lms.djangoapps.courseware.courses import course_image_url from xmodule.course_metadata_u...
agpl-3.0
rschnapka/odoo
addons/base_action_rule/__openerp__.py
57
1998
# -*- 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
benjaminrigaud/django
setup.py
41
3302
import os import sys from setuptools import setup, find_packages from distutils.sysconfig import get_python_lib # Warn if we are installing over top of an existing installation. This can # cause issues where files that were deleted from a more recent Django are # still present in site-packages. See #18115. overlay_wa...
bsd-3-clause
enriquesanchezb/practica_utad_2016
venv/lib/python2.7/site-packages/py/_code/assertion.py
218
3287
import sys import py BuiltinAssertionError = py.builtin.builtins.AssertionError _reprcompare = None # if set, will be called by assert reinterp for comparison ops def _format_explanation(explanation): """This formats an explanation Normally all embedded newlines are escaped, however there are three exce...
apache-2.0
wangyou/XX-Net
code/default/python27/1.0/lib/linux/cryptography/hazmat/primitives/twofactor/hotp.py
7
2206
# 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 struct import six from cryptography.exceptions import ( Inva...
bsd-2-clause
gifford-lab/bcbio-nextgen
bcbio/variation/population.py
1
12759
"""Provide infrastructure to allow exploration of variations within populations. Uses the gemini framework (https://github.com/arq5x/gemini) to build SQLite database of variations for query and evaluation. """ import collections import csv from distutils.version import LooseVersion import os import subprocess import ...
mit
117111302/PyGithub
github/InputGitAuthor.py
25
2443
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
cernops/keystone
keystone/common/sql/migrate_repo/versions/104_drop_user_name_domainid_constraint.py
4
2856
# 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 t...
apache-2.0
ksophocleous/grpc
src/python/grpcio_test/grpc_test/framework/common/__init__.py
1496
1530
# Copyright 2015, 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...
bsd-3-clause
CompassionCH/compassion-modules
sponsorship_compassion/wizards/generate_gift_wizard.py
3
6826
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.p...
agpl-3.0
incaser/odoo-odoo
addons/stock/tests/test_resupply.py
214
2457
# -*- coding: utf-8 -*- from openerp.addons.stock.tests.common import TestStockCommon from openerp.tools import mute_logger, float_round class TestResupply(TestStockCommon): def setUp(self): super(TestResupply, self).setUp() self.Warehouse = self.env['stock.warehouse'] # create 2 WH, BIG ...
agpl-3.0
2uller/LotF
App/Lib/asynchat.py
63
11716
# -*- Mode: Python; tab-width: 4 -*- # Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # P...
gpl-2.0
qcapen/mpf
mpf/system/timing.py
1
8236
"""Contains Timing and Timer classes""" # timing.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the end of this file.) # Documentation and more info at http://missionpinball.com/mpf import logging import time class Timing(object): """...
mit
jsilter/scipy
scipy/fftpack/tests/gen_fftw_ref.py
73
1533
from __future__ import division, print_function, absolute_import from subprocess import Popen, PIPE, STDOUT import numpy as np SZ = [2, 3, 4, 8, 12, 15, 16, 17, 32, 64, 128, 256, 512, 1024] def gen_data(dt): arrays = {} if dt == np.double: pg = './fftw_double' elif dt == np.float32: pg...
bsd-3-clause
kdpenner/google-python-exercises
basic/list2.py
1
2269
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
apache-2.0
lgscofield/odoo
addons/account_bank_statement_extensions/report/__init__.py
415
1128
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # i...
agpl-3.0
s40523247/2016fallcp_hw
plugin/liquid_tags/soundcloud.py
26
1582
""" Soundcloud Tag -------------- This implements a Liquid-style soundcloud tag for Pelican. It asks the official Soundcloud-API for the widget html code. Syntax ------ `{% soundcloud track_url %}` Example ------- `{% soundcloud https://soundcloud.com/luftmentsh/hakotel %}` Output ------ `<iframe w...
agpl-3.0
ibab/tensorflow
tensorflow/tools/dist_test/scripts/k8s_tensorflow.py
9
7257
#!/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 a...
apache-2.0
sahilqur/python_projects
Text/caesar_cipher.py
15
1107
""" Caesar Cipher - Enter the cipher number and the program will "encrypt" them with the Caesar cipher (a.k.a. ROT #). Type the word "exit" when you're finished. """ while True: try: cipher = int(raw_input("Enter the cipher number: ")) break except ValueError: print "I need a valid inte...
mit
zobe123/Plex-CS
lib/unidecode/x0d2.py
253
4724
data = ( 'toels', # 0x00 'toelt', # 0x01 'toelp', # 0x02 'toelh', # 0x03 'toem', # 0x04 'toeb', # 0x05 'toebs', # 0x06 'toes', # 0x07 'toess', # 0x08 'toeng', # 0x09 'toej', # 0x0a 'toec', # 0x0b 'toek', # 0x0c 'toet', # 0x0d 'toep', # 0x0e 'toeh', # 0x0f 'tyo', # 0x10...
gpl-3.0
vanpact/scipy
scipy/signal/tests/test_wavelets.py
108
5273
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import TestCase, run_module_suite, assert_equal, \ assert_array_equal, assert_array_almost_equal, assert_array_less, assert_ from scipy._lib.six import xrange from scipy.signal import wavelets class TestWavele...
bsd-3-clause
janek-warchol/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
MH2033/VIPER_KERNEL_KK_D802
scripts/build-all.py
1474
10189
#! /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
ales-erjavec/scipy
scipy/sparse/tests/test_base.py
22
151714
# # Authors: Travis Oliphant, Ed Schofield, Robert Cimrman, Nathan Bell, and others """ Test functions for sparse matrices. Each class in the "Matrix class based tests" section become subclasses of the classes in the "Generic tests" section. This is done by the functions in the "Tailored base class for generic tests" ...
bsd-3-clause
gregdek/ansible
lib/ansible/plugins/cache/pickle.py
64
1997
# (c) 2017, Brian Coca # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' cache: pickle short_descript...
gpl-3.0
pashakiz/DonCoin
share/qt/extract_strings_qt.py
2945
1844
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
mit
candrews/portage
pym/portage/tests/resolver/ResolverPlayground.py
2
28046
# Copyright 2010-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from itertools import permutations import fnmatch import sys import tempfile import portage from portage import os from portage import shutil from portage.const import (GLOBAL_CONFIG_PATH, PORTAGE_BASE_PATH, USE...
gpl-2.0
ChawalitK/odoo
addons/hw_posbox_homepage/controllers/main.py
1
8247
# -*- coding: utf-8 -*- import logging import os import time import werkzeug import subprocess from os import listdir import openerp from openerp import http from openerp.http import request from openerp.tools.translate import _ _logger = logging.getLogger(__name__) index_style = """ <style> body...
gpl-3.0
FrankBian/kuma
vendor/packages/jsonpickle/tests/thirdparty_tests.py
5
2876
# -*- coding: utf-8 -*- # # Copyright (C) 2008 John Paulett (john -at- paulett.org) # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. import unittest import jsonpickle RSS_DOC = """<?xml version="1.0" encoding="utf-8"...
mpl-2.0
campbe13/openhatch
vendor/packages/celery/celery/worker/__init__.py
18
12962
# -*- coding: utf-8 -*- """ celery.worker ~~~~~~~~~~~~~ The worker. :copyright: (c) 2009 - 2011 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import atexit import logging import socket import sys import threading import traceback from komb...
agpl-3.0
t-hey/QGIS-Original
tests/src/python/test_qgsvectorfilewriter.py
2
35947
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsVectorFileWriter. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. "...
gpl-2.0
saeki-masaki/glance
glance/tests/functional/v1/test_multiprocessing.py
10
2590
# 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
JohnGeorgiadis/invenio
invenio/utils/plotextractor/config.py
7
1089
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2010, 2011, 2015 CERN. # # Invenio 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)...
gpl-2.0
sloanyang/android_external_webkit
Tools/CodeCoverage/cov.py
27
7773
# Copyright (C) 2004, 2005, 2006 Nathaniel Smith # Copyright (C) 2006, 2007 Holger Hans Peter Freyther # # 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 copyr...
gpl-2.0
wuhengzhi/chromium-crosswalk
third_party/WebKit/LayoutTests/http/tests/websocket/simple_wsh.py
42
1741
# Copyright (C) 2009 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
lache/RacingKingLee
monitor/engine.win64/2.74/python/lib/poplib.py
74
14327
"""A POP3 client class. Based on the J. Myers POP3 draft, Jan. 96 """ # Author: David Ascher <david_ascher@brown.edu> # [heavily stealing from nntplib.py] # Updated: Piers Lauder <piers@cs.su.oz.au> [Jul '97] # String method conversion and test jig improvements by ESR, February 2001. # Added the POP3_SSL clas...
mit
alehander42/woosh-python
woosh/completer.py
1
1740
import os import os.path import woosh.parser def complete(code, env): try: woo_type, expected, tokens = woosh.parser.parse_broken(code, env) except (woosh.parser.WooError, ValueError): return [] finished = not code or code[-1] == ' ' return [globals()['complete_%s' % tab](woo_type, to...
mit
rwl/PyCIM
CIM14/CDPSM/Balanced/IEC61970/LoadModel/LoadResponseCharacteristic.py
1
8379
# Copyright (C) 2010-2011 Richard Lincoln # # 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, merge, publish...
mit
marvelous/aseba
maintainer/translations/01_new_language.py
2
5842
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Aseba - an event-based framework for distributed robot control # Copyright (C) 2007--2015: # Stephane Magnenat <stephane at magnenat dot net> # (http://stephane.magnenat.net) # and other contributors, see authors.txt for details # # Th...
lgpl-3.0
pettarin/yael
yael/opfitemref.py
3
3940
#!/usr/bin/env python # coding=utf-8 """ An OPF `<itemref>` element, that is, a child of the `<spine>`. """ from yael.element import Element __author__ = "Alberto Pettarin" __copyright__ = "Copyright 2015, Alberto Pettarin (www.albertopettarin.it)" __license__ = "MIT" __version__ = "0.0.9" __email__ = "alberto@alber...
mit
pombredanne/pythran
pythran/toolchain.py
2
12759
''' This module contains all the stuff to make your way from python code to a dynamic library, see __init__.py for exported interfaces. ''' from pythran.backend import Cxx from pythran.config import cfg, make_extension from pythran.cxxgen import PythonModule, Define, Include, Line, Statement from pythran.cxxgen import...
bsd-3-clause
ValyrianTech/BitcoinSpellbook-v0.3
transactionfactory.py
1
21726
#!/usr/bin/env python # -*- coding: utf-8 -*- import hmac import copy from helpers.py2specials import * from helpers.py3specials import * from helpers.privatekeyhelpers import privkey_to_pubkey, decode_privkey, get_privkey_format, encode_privkey from helpers.publickeyhelpers import pubkey_to_address from helpers.jaco...
gpl-3.0
josiah-wolf-oberholtzer/supriya
etc/pending_ugens/VarLag.py
2
6303
import collections from supriya.enums import CalculationRate from supriya.ugens.Filter import Filter class VarLag(Filter): """ :: >>> source = supriya.ugens.In.ar(bus=0) >>> var_lag = supriya.ugens.VarLag.ar( ... curvature=0, ... source=source, ... start=s...
mit
ridfrustum/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/forms/localflavor/pt.py
50
1063
from django.contrib.localflavor.pt.forms import PTZipCodeField, PTPhoneNumberField from utils import LocalFlavorTestCase class PTLocalFlavorTests(LocalFlavorTestCase): def test_PTZipCodeField(self): error_format = [u'Enter a zip code in the format XXXX-XXX.'] valid = { '3030-034': '30...
gpl-3.0
jeffmahoney/supybot
plugins/Quote/config.py
15
2352
### # Copyright (c) 2005, Daniel DiPaolo # 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 condition...
bsd-3-clause
musicrighter/CIS422-P2
env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py
2763
12628
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
artistic-2.0
40223149/2015springcda
static/Brython3.1.1-20150328-091302/Lib/browser/local_storage.py
617
2786
# local storage in browser import sys from javascript import JSObject class __UnProvided(): pass class LocalStorage(): storage_type = "local_storage" def __init__(self): if not sys.has_local_storage: raise EnvironmentError("LocalStorage not available") self.store = JSObject(__...
gpl-3.0
jeezybrick/django
tests/messages_tests/test_api.py
337
1453
from django.contrib import messages from django.test import RequestFactory, SimpleTestCase class DummyStorage(object): """ dummy message-store to test the api methods """ def __init__(self): self.store = [] def add(self, level, message, extra_tags=''): self.store.append(message) ...
bsd-3-clause
wakatime/sublime-wakatime
packages/wakatime/packages/ordereddict.py
254
4221
# Copyright (c) 2009 Raymond Hettinger # # 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, merge, # pu...
bsd-3-clause
gregcaporaso/scikit-bio
skbio/io/format/tests/test_gff3.py
4
13406
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
AMOboxTV/AMOBox.LegoBuild
script.skinshortcuts/resources/lib/xmlfunctions.py
1
51495
# coding=utf-8 import os, sys, datetime, unicodedata, re import xbmc, xbmcgui, xbmcvfs, xbmcaddon import xml.etree.ElementTree as xmltree from xml.sax.saxutils import escape as escapeXML import ast from traceback import print_exc from unicodeutils import try_decode if sys.version_info < (2, 7): import simplejson e...
gpl-2.0
rotofly/odoo
addons/sale_order_dates/__init__.py
441
1071
# -*- 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
vsdev1/testacular
docs/conf.py
20
7855
# -*- coding: utf-8 -*- # # testacular documentation build configuration file, created by # sphinx-quickstart on Mon Oct 8 07:33:53 2012. # # 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. # # ...
mit
akashsinghal/Speech-Memorization-App
speech/Swift/Speech-gRPC-Streaming/env/lib/python3.6/site-packages/pip/_vendor/requests/auth.py
355
8175
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import threading from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import pa...
apache-2.0
iw3hxn/LibrERP
crm_lead_correct/__init__.py
1
1436
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2013 Didotech SRL (info at didotech.com) # All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole re...
agpl-3.0
elberthcabrales/ava
rest_extensions/relations.py
2
1956
from operator import attrgetter from rest_framework.reverse import reverse from rest_framework import serializers class HyperlinkedNestedIdentityField(serializers.HyperlinkedIdentityField): def __init__(self, view_name=None, additional_reverse_kwargs={}, **kwargs): self.additional_reverse_kwargs = additio...
gpl-3.0
benfinke/ns_python
build/lib/nssrc/com/citrix/netscaler/nitro/resource/config/filter/filterprebodyinjection.py
3
4016
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
cs-au-dk/Artemis
WebKit/Source/ThirdParty/gtest/test/gtest_list_tests_unittest.py
1068
5415
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-3.0
IsCoolEntertainment/debpkg_python-boto
tests/unit/rds/test_connection.py
1
30456
#!/usr/bin/env python # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without ...
mit
ShinyROM/android_external_chromium_org
base/android/jni_generator/jni_generator.py
15
40336
#!/usr/bin/env python # 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. """Extracts native methods from a Java file and generates the JNI bindings. If you change this, please run and update the tests."""...
bsd-3-clause