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
tersmitten/ansible
lib/ansible/plugins/inventory/openstack.py
14
13236
# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com> # Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P. # Copyright (c) 2016, Rackspace Australia # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING...
gpl-3.0
erwilan/ansible
lib/ansible/plugins/terminal/dellos9.py
71
2779
# # (c) 2016 Red Hat Inc. # # Copyright (c) 2017 Dell Inc. # # 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
znoland3/zachdemo
venvdir/lib/python3.4/site-packages/wheel/tool/__init__.py
238
13310
""" Wheel command-line utility. """ import os import hashlib import sys import json import wheel.paths from glob import iglob from .. import signatures from ..util import (urlsafe_b64decode, urlsafe_b64encode, native, binary, matches_requirement) from ..install import WheelFile def require_pkgre...
mit
SharkBa1t/cse524
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
suncycheng/intellij-community
plugins/hg4idea/testData/bin/mercurial/osutil.py
90
5363
# osutil.py - pure Python version of osutil.c # # Copyright 2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import os import stat as statmod def _mode_to_kind(mode): if statmod....
apache-2.0
Mikescher/Project-Euler_Befunge
compiled/Python2/Euler_Problem-065.py
1
3340
#!/usr/bin/env python2 # transpiled with BefunCompile v1.3.0 (c) 2017 import sys import zlib, base64 _g = ("AR+LCAAAAAAABADNUjFuwzAM/ApLKUsIJRTtDBEMolNXfyBwhg5aNXny40s3TlI0bge1BXqDcKQE8njiCN57MLjfAfwV/rG+8SETYldZS/EFNR0JGU9cFiIlTbXa8BUL" + "t1wE+2gMe0ZL+1p9H5T6eO/yvOtGlmBiC2duUhY75zBzKhZ3XzuiKYZmk56mC6dmL1tzlDRvqeVM...
mit
nicko96/Chrome-Infra
infra_libs/infra_types/infra_types.py
8
2255
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import operator def freeze(obj): """Takes a generic object ``obj``, and returns an immutable version of it. Supported types: * ...
bsd-3-clause
gkweb76/exploits
quicktftp_dos.py
1
1472
# Exploit Title: Quick Tftp Server Pro 2.3 TFTP mode Remote Overflow (DoS) # Date: 21/01/2016 # Exploit Author: Guillaume Kaddouch # Twitter: @gkweb76 # Blog: https://networkfilter.blogspot.com # GitHub: https://github.com/gkweb76/exploits # Vendor Homepage: http://www.tallsoft.com/tftpserver.htm # Software Link:...
mit
LIMXTEC/BitCore
test/functional/blockchain.py
1
5890
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 RPCs related to blockchainstate. Test the following RPCs: - gettxoutsetinfo - getdifficul...
mit
dgarciam/Sick-Beard
lib/unidecode/x090.py
251
4631
data = ( 'Tui ', # 0x00 'Song ', # 0x01 'Gua ', # 0x02 'Tao ', # 0x03 'Pang ', # 0x04 'Hou ', # 0x05 'Ni ', # 0x06 'Dun ', # 0x07 'Jiong ', # 0x08 'Xuan ', # 0x09 'Xun ', # 0x0a 'Bu ', # 0x0b 'You ', # 0x0c 'Xiao ', # 0x0d 'Qiu ', # 0x0e 'Tou ', # 0x0f 'Zhu ', # 0x10 '...
gpl-3.0
Puyb/inscriptions_roller
inscriptions/settings/docker.py
1
1360
from .default import * import os ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS').split(',') ADMINS = ( (environ.get('EMAIL_ADMIN', ''), environ.EMAIL_ADMIN), ) DEBUG = environ.get('DEBUG', '') == 'True' TEMPLATES[0]['OPTIONS']['debug'] = DEBUG if DEBUG: EMAIL_BACKEND = "django.core.mail.backends.console.Emai...
gpl-3.0
uber/pyro
pyro/infer/reparam/studentt.py
1
1327
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import pyro import pyro.distributions as dist from .reparam import Reparam class StudentTReparam(Reparam): """ Auxiliary variable reparameterizer for :class:`~pyro.distributions.StudentT` random variables. This is u...
apache-2.0
klmitch/nova
nova/tests/functional/db/test_host_mapping.py
6
8764
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
ar4s/django
django/contrib/gis/gdal/tests/test_driver.py
6
1147
import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL if HAS_GDAL: from django.contrib.gis.gdal import Driver, OGRException valid_drivers = ('ESRI Shapefile', 'MapInfo File', 'TIGER', 'S57', 'DGN', 'Memory', 'CSV', 'GML', 'KML') invalid_drivers = ('Foo ba...
bsd-3-clause
zycdragonball/tensorflow
tensorflow/contrib/learn/python/learn/estimators/model_fn.py
21
11316
# 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
lastcoin/lastcoin
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
doganaltunbay/odoo
openerp/addons/base/tests/test_ir_attachment.py
433
3536
import hashlib import os import openerp import openerp.tests.common HASH_SPLIT = 2 # FIXME: testing implementations detail is not a good idea class test_ir_attachment(openerp.tests.common.TransactionCase): def setUp(self): super(test_ir_attachment, self).setUp() registry, cr, uid = self.regi...
agpl-3.0
sam-tsai/django
django/db/models/sql/subqueries.py
210
7963
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.core.exceptions import FieldError from django.db import connections from django.db.models.query_utils import Q from django.db.models.sql.constants import ( CURSOR, GET_ITERATOR_CHUNK_SIZE, NO_RESULTS, ) from django...
bsd-3-clause
renner/spacewalk
scripts/update_symlinks.py
8
5799
#!/usr/bin/python # # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should...
gpl-2.0
teamCarel/EyeTracker
src/shared_modules/calibration_routines/calibration_plugin_base.py
2
2391
''' (*)~--------------------------------------------------------------------------- Pupil - eye tracking platform Copyright (C) 2012-2017 Pupil Labs Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0). See COPYING and COPYING.LESSER for license details. -----------------------------------...
lgpl-3.0
balister/gnuradio
gnuradio-runtime/python/gnuradio/eng_option.py
61
2090
# # Copyright 2004 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 option) # any later version. # #...
gpl-3.0
mkaluza/external_chromium_org
tools/cr/cr/actions/ninja.py
23
2458
# 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. """A module to add ninja support to cr.""" import os import cr _PHONY_SUFFIX = ': phony' _LINK_SUFFIX = ': link' class NinjaBuilder(cr.Builder): """An...
bsd-3-clause
egabancho/invenio-groups
tests/test_models.py
2
25711
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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) any later...
gpl-2.0
rs2/bokeh
bokeh/protocol/messages/tests/test_patch_doc.py
4
8320
from __future__ import absolute_import, print_function import unittest from json import loads import pytest import numpy as np from bokeh.protocol.messages.patch_doc import process_document_events import bokeh.document as document from bokeh.model import Model from bokeh.models.sources import ColumnDataSource from...
bsd-3-clause
double-y/django
tests/template_tests/syntax_tests/test_extends.py
86
15503
from django.test import SimpleTestCase from ..utils import setup inheritance_templates = { 'inheritance01': "1{% block first %}&{% endblock %}3{% block second %}_{% endblock %}", 'inheritance02': "{% extends 'inheritance01' %}" "{% block first %}2{% endblock %}{% block second %}4{% endblo...
bsd-3-clause
leppa/home-assistant
homeassistant/components/switch/light.py
3
4057
"""Light support for switch entities.""" import logging from typing import Callable, Dict, Optional, Sequence, cast import voluptuous as vol from homeassistant.components import switch from homeassistant.components.light import PLATFORM_SCHEMA, Light from homeassistant.const import ( ATTR_ENTITY_ID, CONF_ENTI...
apache-2.0
jackalchen/Wi-FiTestSuite-UCC
python/Result-Processing-myutils.py
4
59903
################################################################### # # Copyright (c) 2014 Wi-Fi Alliance # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copi...
isc
vinayan3/clpricehistory
django/db/backends/postgresql/creation.py
247
3753
from django.db.backends.creation import BaseDatabaseCreation from django.db.backends.util import truncate_name class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated PostgreSQL column # types, as strings. Column-type strings can contain format strings; they'll ...
bsd-3-clause
Fl0rianFischer/sme_odoo
addons/hw_escpos/escpos/printer.py
101
6802
#!/usr/bin/python import usb.core import usb.util import serial import socket from escpos import * from constants import * from exceptions import * from time import sleep class Usb(Escpos): """ Define USB printer """ def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01): """ ...
gpl-3.0
windyuuy/opera
chromium/src/testing/gtest/test/gtest_test_utils.py
408
10444
#!/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...
bsd-3-clause
anksp21/Community-Zenpacks
ZenPacks.AndreaConsadori.MSIAS_RadiusServer/setup.py
2
2644
################################ # These variables are overwritten by Zenoss when the ZenPack is exported # or saved. Do not modify them directly here. # NB: PACKAGES is deprecated NAME = 'ZenPacks.AndreaConsadori.MSIAS_RadiusServer' VERSION = '3.0' AUTHOR = 'Andrea Consadori' LICENSE = 'GPLv2' NAMESPACE_PACKAGES = ['...
gpl-2.0
karmix/anaconda
pyanaconda/packaging/dnfpayload.py
2
35909
# dnfpayload.py # DNF/rpm software payload management. # # Copyright (C) 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # ...
gpl-2.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/IPython/utils/_signatures.py
16
29681
"""Function signature objects for callables. Back port of Python 3.3's function signature tools from the inspect module, modified to be compatible with Python 2.7 and 3.2+. """ #----------------------------------------------------------------------------- # Python 3.3 stdlib inspect.py is public domain # # Backpor...
mit
IBMDecisionOptimization/docplex-examples
examples/cp/visu/house_building_time.py
1
4306
# -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2016 # -------------------------------------------------------------------------- """ This is a problem ...
apache-2.0
jordanemedlock/psychtruths
temboo/core/Library/FilesAnywhere/ListItems.py
5
5459
# -*- coding: utf-8 -*- ############################################################################### # # ListItems # Lists files within a specified directory in your FilesAnywhere account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Lice...
apache-2.0
nttks/jenkins-test
common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py
114
1859
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CourseMode.expiration_datetime' db.add_column('course_modes_coursemode', 'expiration_datetim...
agpl-3.0
Workday/OpenFrame
tools/telemetry/third_party/gsutilz/third_party/boto/boto/vpc/vpc.py
135
7868
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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, modi...
bsd-3-clause
Stane1983/u-boot
tools/patman/control.py
2
9562
# SPDX-License-Identifier: GPL-2.0+ # # Copyright 2020 Google LLC # """Handles the main control logic of patman This module provides various functions called by the main program to implement the features of patman. """ import os import sys from patman import checkpatch from patman import gitutil from patman import p...
gpl-2.0
jbasko/pytest-random-order
tests/test_actual_test_runs.py
1
7179
# -*- coding: utf-8 -*- import collections import re import py import pytest @pytest.fixture def tmp_tree_of_tests(testdir): """ Creates a directory structure: tmpdir/ shallow_tests/ test_a.py 2 passing, 1 failing deep_tests/ test_b.py 2...
mit
wileeam/airflow
airflow/contrib/hooks/vertica_hook.py
5
1139
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
AVOXI/b2bua
sippy/SipRSeq.py
2
1760
# Copyright (c) 2015 Sippy Software, Inc. All rights reserved. # # 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 ...
bsd-2-clause
GuessWhoSamFoo/pandas
pandas/tests/groupby/test_function.py
1
38953
from string import ascii_lowercase import numpy as np import pytest from pandas.compat import product as cart_product from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, Timestamp, compat, date_range, isna) import pandas.core.nanops as ...
bsd-3-clause
HuaweiSwitch/ansible
lib/ansible/modules/network/lenovo/cnos_save.py
59
5059
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, Inc. # # 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 # ...
gpl-3.0
DDEFISHER/servo
tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py
44
13193
import cgi import json import os import traceback import urllib import urlparse from constants import content_types from pipes import Pipeline, template from ranges import RangeParser from request import Authentication from response import MultipartContent from utils import HTTPException __all__ = ["file_handler", "p...
mpl-2.0
alonisser/Open-Knesset
persons/migrations/0001_initial.py
15
12661
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Title' db.create_table('persons_title', ( ('id', self.gf('django.db.models.fie...
bsd-3-clause
rameshvs/nipype
nipype/utils/filemanip.py
3
12109
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous file manipulation functions """ import cPickle from glob import glob import gzip import hashlib from hashlib import md5 import json import os import re import shutil import numpy as np ...
bsd-3-clause
cgstudiomap/cgstudiomap
main/eggs/Django-1.9-py2.7.egg/django/core/checks/urls.py
110
2727
from __future__ import unicode_literals from . import Tags, Warning, register @register(Tags.urls) def check_url_config(app_configs, **kwargs): from django.core.urlresolvers import get_resolver resolver = get_resolver() return check_resolver(resolver) def check_resolver(resolver): """ Recursive...
agpl-3.0
Slezhuk/ansible
lib/ansible/plugins/cache/redis.py
36
3530
# (c) 2014, Brian Coca, Josh Drake, et al # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
Dingmatt/AMSA
Plug-ins/Amsa.bundle/Contents/Libraries/Shared/chardet/utf8prober.py
290
2766
######################## 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-3.0
fhartwig/adhocracy3.mercator
src/adhocracy_core/adhocracy_core/resources/test_simple.py
2
1213
from pyramid import testing from pytest import fixture from pytest import mark def test_simple_meta(): import adhocracy_core.sheets from .simple import simple_meta from .simple import ISimple meta = simple_meta assert meta.iresource is ISimple assert meta.basic_sheets == (adhocracy_core.sheets...
agpl-3.0
lgarren/spack
var/spack/repos/builtin/packages/htop/package.py
3
1705
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
elky/django
django/contrib/gis/db/backends/postgis/operations.py
5
15946
import re from django.conf import settings from django.contrib.gis.db.backends.base.operations import ( BaseSpatialOperations, ) from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.models import GeometryField, RasterField from django.contrib.gis.gdal import GDALRaster from d...
bsd-3-clause
FusionSP/android_external_chromium_org
tools/telemetry/telemetry/results/output_formatter.py
77
1116
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class OutputFormatter(object): """A formatter for PageTestResults. An OutputFormatter takes PageTestResults, formats the results (telemetry.value.Val...
bsd-3-clause
sburnett/seattle
dist/update_software.py
2
1540
""" <Program Name> update_software.py <Started> December 1, 2008 <Author> Carter Butaud <Purpose> Populates the folder that the software updater checks with the latest version of the code. """ import sys import make_base_installers DEBUG = False def update(trunk_location, pubkey, privkey, update...
mit
chainer/chainer
chainer/functions/pooling/roi_average_align_2d.py
4
23553
# Modified work: # ----------------------------------------------------------------------------- # Copyright (c) 2018 Preferred Infrastructure, Inc. # Copyright (c) 2018 Preferred Networks, Inc. # ----------------------------------------------------------------------------- # Original work: # -------------------------...
mit
mhvk/astropy
astropy/io/misc/tests/test_hdf5.py
2
31266
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from astropy.table import Table, QTable, NdarrayMixin, Column from astropy.table.table_helpers import simple_table from astropy import units as u from astropy.coordinates import (SkyCoord, Latitude, Longitude, Angle, Ea...
bsd-3-clause
orgito/ansible
lib/ansible/utils/module_docs_fragments/netscaler.py
13
2011
class ModuleDocFragment(object): DOCUMENTATION = ''' options: nsip: description: - The ip address of the netscaler appliance where the nitro API calls will be made. - "The port can be specified with the colon (:). E.g. 192.168.1.1:555." required: True nitro_user: ...
gpl-3.0
dennybaa/st2
st2common/st2common/content/utils.py
5
10089
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
Aloomaio/googleads-python-lib
examples/ad_manager/v201811/proposal_service/get_all_proposals.py
1
1761
#!/usr/bin/env 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 requir...
apache-2.0
sodafree/backend
tests/regressiontests/defaultfilters/tests.py
25
29878
# -*- coding: utf-8 -*- from __future__ import with_statement import datetime import decimal from django.template.defaultfilters import * from django.test import TestCase from django.utils import unittest, translation class DefaultFiltersTests(TestCase): def test_floatformat(self): self.assertEqual(flo...
bsd-3-clause
durden/tablib
tablib/packages/odf/xforms.py
96
1231
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
mit
rversteegen/commandergenius
project/jni/python/src/Lib/test/test_quopri.py
58
7365
from test import test_support import unittest import sys, cStringIO, subprocess import quopri ENCSAMPLE = """\ Here's a bunch of special=20 =A1=A2=A3=A4=A5=A6=A7=A8=A9 =AA=AB=AC=AD=AE=AF=B0=B1=B2=B3 =B4=B5=B6=B7=B8=B9=BA=BB=BC=BD=BE =BF=C0=C1=C2=C3=C4=C5=C6 =C7=C8=C9=CA=CB=CC=CD=CE=CF =D0=D1=D2=D3=D4=D5=D6=D7 =D8=...
lgpl-2.1
while519/rescal.py
examples/kinships.py
9
2823
#!/usr/bin/env python import logging logging.basicConfig(level=logging.INFO) _log = logging.getLogger('Example Kinships') import numpy as np from numpy import dot, array, zeros, setdiff1d from numpy.linalg import norm from numpy.random import shuffle from scipy.io.matlab import loadmat from scipy.sparse import lil_ma...
gpl-3.0
RevolutionMC/Revolution
plugin.video.PsychoTV/resources/lib/resolvers/thefile.py
23
1167
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
gpl-2.0
Mendeley/breakpad
src/tools/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py
151
1287
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies inclusion of $HOME/.gyp/includes.gypi works properly with relocation and with regeneration. """ import os import TestGyp # Re...
bsd-3-clause
marinho/geraldo
site/newsite/site-geraldo/django/contrib/localflavor/ro/forms.py
35
6461
# -*- coding: utf-8 -*- """ Romanian specific form helpers. """ import re from django.forms import ValidationError, Field, RegexField, Select from django.forms.fields import EMPTY_VALUES from django.utils.translation import ugettext_lazy as _ class ROCIFField(RegexField): """ A Romanian fiscal identity code ...
lgpl-3.0
proversity-org/edx-platform
common/test/acceptance/tests/lms/test_programs.py
10
5800
"""Acceptance tests for LMS-hosted Programs pages""" from nose.plugins.attrib import attr from common.test.acceptance.fixtures.catalog import CatalogFixture, CatalogIntegrationMixin from common.test.acceptance.fixtures.course import CourseFixture from common.test.acceptance.fixtures.programs import ProgramsConfigMixin...
agpl-3.0
philoniare/horizon
openstack_dashboard/dashboards/admin/networks/agents/views.py
23
3020
# Copyright 2014 Kylincloud # # 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
codercarl/psd-tools
src/psd_tools/cli.py
13
1920
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function import logging import docopt import psd_tools.reader import psd_tools.decoder from psd_tools import PSDImage from psd_tools.user_api.layers import group_layers from psd_tools.debug import pprint from psd_tools.version impo...
mit
tuxillo/aarch64-dragonfly-gcc
gcc/gdbhooks.py
17
21078
# Python hooks for gdb for debugging GCC # Copyright (C) 2013-2015 Free Software Foundation, Inc. # Contributed by David Malcolm <dmalcolm@redhat.com> # This file is part of GCC. # GCC is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the F...
gpl-2.0
tmhm/scikit-learn
sklearn/metrics/tests/test_ranking.py
127
40813
from __future__ import division, print_function import numpy as np from itertools import product import warnings from scipy.sparse import csr_matrix from sklearn import datasets from sklearn import svm from sklearn import ensemble from sklearn.datasets import make_multilabel_classification from sklearn.random_projec...
bsd-3-clause
ltilve/ChromiumGStreamerBackend
third_party/cython/src/Cython/Compiler/Optimize.py
87
157730
from Cython.Compiler import TypeSlots from Cython.Compiler.ExprNodes import not_a_constant import cython cython.declare(UtilityCode=object, EncodedString=object, BytesLiteral=object, Nodes=object, ExprNodes=object, PyrexTypes=object, Builtin=object, UtilNodes=object, Naming=object) import...
bsd-3-clause
Cygn/pulseaudio-dlna
pulseaudio_dlna/holder.py
3
5029
#!/usr/bin/python # This file is part of pulseaudio-dlna. # pulseaudio-dlna 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. # pulsea...
gpl-3.0
mouhb/cjdns
node_build/dependencies/libuv/build/gyp/test/ios/gyptest-app-ios.py
61
2237
#!/usr/bin/env python # 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. """ Verifies that ios app bundles are built correctly. """ import TestGyp import subprocess import sys def CheckFileXMLPropertyList(file)...
gpl-3.0
ahnitz/pycbc
test/test_tmpltbank.py
9
25760
# Copyright (C) 2013 Ian Harry # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the ...
gpl-3.0
d2si-oss/demo-aws-lambda-buffer-api
code/buffer/functions/proxy/vendor/requests/packages/chardet/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # This library 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 # versio...
isc
ZhangXinNan/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/models/decisions_to_data_then_nn_test.py
57
4684
# 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
ccortezb/troposphere
troposphere/validators.py
20
1842
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. def boolean(x): if x in [True, 1, '1', 'true', 'True']: return "true" if x in [False, 0, '0', 'false', 'False']: return "false" raise ValueError def integer(x): try: ...
bsd-2-clause
burzillibus/RobHome
venv/lib/python2.7/site-packages/html5lib/treeadapters/genshi.py
356
1555
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName, Attrs from genshi.core import START, END, TEXT, COMMENT, DOCTYPE def to_genshi(walker): text = [] for token in walker: type = token["type"] if type in ("Characters", "SpaceCharacters"): ...
mit
sidartaoliveira/ansible
lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py
33
16010
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
jiahaoliang/group-based-policy
gbpservice/neutron/services/servicechain/plugins/ncp/node_drivers/nfp_node_driver.py
1
34832
# Copyright (c) 2016 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
newerthcom/savagerebirth
libs/python-2.72/Tools/bgen/bgen/bgenVariable.py
42
3541
"""Variables, arguments and argument transfer modes etc.""" # Values to represent argument transfer modes InMode = 1 # input-only argument OutMode = 2 # output-only argument InOutMode = 3 # input-output argument ModeMask = 3 # bits to keep for mode # Special cases for mode/flags argument # XXX This is still a...
gpl-2.0
jmontoyam/mne-python
mne/preprocessing/tests/test_ica.py
3
27879
from __future__ import print_function # Author: Denis Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # # License: BSD (3-clause) import os import os.path as op import warnings from nose.tools import assert_true, assert_raises, assert_equal, assert_false imp...
bsd-3-clause
klusark/android_external_chromium_org
third_party/tlslite/tlslite/BaseDB.py
121
3389
"""Base class for SharedKeyDB and VerifierDB.""" import anydbm import thread class BaseDB: def __init__(self, filename, type): self.type = type self.filename = filename if self.filename: self.db = None else: self.db = {} self.lock = thread.allocate_l...
bsd-3-clause
gautamMalu/rootfs_xen_arndale
usr/lib/python2.7/symtable.py
68
7437
"""Interface to the compiler's internal symbol tables""" import _symtable from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM, DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC, SCOPE_OFF, SCOPE_MASK, FREE, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT, CELL, LOCAL) import weakref __all__ = ["sym...
gpl-2.0
thomas-young-2013/wherehowsX
metadata-etl/src/main/resources/jython/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
2360
3778
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re __version__ = '3.4.0.2' class CertificateError(ValueError): pass def _dnsname_match(dn, host...
apache-2.0
Lyon1994/huhamhire-hosts
gui/qdialog_slots.py
24
11695
#!/usr/bin/env python # -*- coding: utf-8 -*- # # qdialog_slots.py : Qt slots response to signals on the main dialog. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. Yo...
gpl-3.0
koobonil/Boss2D
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/integrate/python/ops/odes.py
69
20508
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mit
2014c2g4/2015cda0623
static/Brython3.1.1-20150328-091302/Lib/markdown2.py
669
8143
import browser.html import re class URL: def __init__(self,src): elts = src.split(maxsplit=1) self.href = elts[0] self.alt = '' if len(elts)==2: alt = elts[1] if alt[0]=='"' and alt[-1]=='"':self.alt=alt[1:-1] elif alt[0]=="'" and alt[-1]=="'":sel...
gpl-3.0
ticklemepierce/osf.io
website/addons/googledrive/utils.py
8
2493
# -*- coding: utf-8 -*- """Utility functions for the Google Drive add-on. """ import os import logging from urllib import quote logger = logging.getLogger(__name__) class GoogleDriveNodeLogger(object): """Helper class for adding correctly-formatted Google Drive logs to nodes. Usage: :: from website...
apache-2.0
MultiMC/PatronScraper2
patronscraper.py
1
1625
#!/usr/bin/env python2 from lxml import html import requests from operator import methodcaller import sys import boto from boto.s3.key import Key import ssl # See: https://github.com/boto/boto/issues/2836 if hasattr(ssl, '_create_unverified_context'): ssl._create_default_https_context = ssl._create_unverified_conte...
apache-2.0
PrincetonUniversity/AdvNet-OF_Scripts
evaluation/switch/flowmod_test/pox/pox/samples/l2_polling.py
1
6809
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
apache-2.0
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/command/attachmentCommands.py
1
5021
# -*- coding: utf-8 -*- ''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 vers...
gpl-3.0
zhuyue1314/simuvex
simuvex/s_procedure.py
1
9027
#!/usr/bin/env python import inspect import itertools import logging l = logging.getLogger(name = "simuvex.s_procedure") symbolic_count = itertools.count() from .s_run import SimRun from .s_cc import DefaultCC class SimProcedure(SimRun): ADDS_EXITS = False NO_RET = False local_vars = () def __ini...
bsd-2-clause
luotao1/Paddle
python/paddle/distributed/fleet/meta_optimizers/sharding_optimizer.py
1
65621
# Copyright (c) 2020 PaddlePaddle 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 appli...
apache-2.0
koljanos/dakoljanos-anotherone
jni/libhpdf-2.3.0RC2/if/python/demo/chfont_demo.py
32
3358
### ## * << Haru Free PDF Library 2.0.0 >> -- chfont_demo.c ## * ## * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that the...
gpl-3.0
Jgarcia-IAS/localizacion
openerp/addons-extra/odoo-pruebas/odoo-server/addons/mail/controllers/main.py
383
1733
import base64 import psycopg2 import openerp from openerp import SUPERUSER_ID from openerp import http from openerp.http import request from openerp.addons.web.controllers.main import content_disposition import mimetypes class MailController(http.Controller): _cp_path = '/mail' @http.route('/mail/download_a...
agpl-3.0
phborba/dsgtoolsop
ProfileTool/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt.py
38
6134
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui' # # Created: Mon Dec 23 10:10:51 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from ...Qt import QtCore, QtGui try: _fromUtf...
gpl-2.0
r0h4n/commons
tendrl/commons/objects/node/atoms/cmd/__init__.py
2
1493
from tendrl.commons.objects import AtomExecutionFailedError from tendrl.commons.objects import BaseAtom from tendrl.commons.utils.cmd_utils import Command from tendrl.commons.utils import log_utils as logger class Cmd(BaseAtom): def run(self): cmd = self.parameters.get("Node.cmd_str") logger.log(...
lgpl-2.1
dennis-sheil/commandergenius
project/jni/python/src/Lib/test/test_warnings.py
51
27088
from contextlib import contextmanager import linecache import os import StringIO import sys import unittest from test import test_support import warning_tests import warnings as original_warnings sys.modules['_warnings'] = 0 del sys.modules['warnings'] import warnings as py_warnings del sys.modules['_warnings'] de...
lgpl-2.1