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
gonboy/sl4a
python/src/Lib/lib2to3/fixes/fix_tuple_params.py
53
5405
"""Fixer for function definitions with tuple parameters. def func(((a, b), c), d): ... -> def func(x, d): ((a, b), c) = x ... It will also support lambdas: lambda (x, y): x + y -> lambda t: t[0] + t[1] # The parens are a syntax error in Python 3 lambda (x): x + y -> lambda x: x + y """...
apache-2.0
DataSploit/datasploit
domain/domain_checkpunkspider.py
3
1584
#!/usr/bin/env python import base import requests import sys import json import warnings from termcolor import colored import time ENABLED = True class style: BOLD = '\033[1m' END = '\033[0m' warnings.filterwarnings("ignore") def checkpunkspider(reversed_domain): time.sleep(0.5) req = requests.p...
gpl-3.0
cevaris/pants
contrib/cpp/src/python/pants/contrib/cpp/targets/cpp_binary.py
14
1101
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.base.payl...
apache-2.0
xen0l/ansible
lib/ansible/modules/cloud/amazon/ec2_eip.py
33
16618
#!/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
SiPiggles/djangae
djangae/tests/test_query_transform.py
6
20184
from django.db.models.sql.datastructures import EmptyResultSet from django.db import models, connections from djangae.test import TestCase from djangae.db.backends.appengine.query import transform_query, Query, WhereNode from django.db.models.query import Q from google.appengine.api import datastore class TransformTe...
bsd-3-clause
isvaldo/Ola_Bemobenses
tests/Selenium/environment/lib/python3.4/site-packages/selenium/webdriver/phantomjs/service.py
55
3837
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
cc0-1.0
nightjean/Deep-Learning
tensorflow/python/summary/plugin_asset_test.py
152
2859
# 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
loco-odoo/localizacion_co
openerp/service/websrv_lib.py
380
7780
# -*- coding: utf-8 -*- # # Copyright P. Christeas <p_christ@hol.gr> 2008-2010 # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users who are looking ...
agpl-3.0
fzza/rdio-sock
src/rdiosock/metadata.py
1
3693
from rdiosock.exceptions import RdioApiError from rdiosock.objects.collection import RdioList class SEARCH_TYPES: """Metadata search types""" NONE = 0 ARTIST = 1 ALBUM = 2 TRACK = 4 PLAYLIST = 8 USER = 16 LABEL = 32 ALL = ( A...
gpl-3.0
mahak/ansible
test/lib/ansible_test/_data/sanity/pylint/plugins/string_format.py
68
3117
# (c) 2018, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type import sys import six import astroid from pylint.interfaces import IAstr...
gpl-3.0
raschuetz/foundations-homework
07/data-analysis/bin/activate_this.py
1076
1137
"""By using execfile(this_file, dict(__file__=this_file)) you will activate this virtualenv environment. This can be used when you must use an existing Python interpreter, not the virtualenv bin/python """ try: __file__ except NameError: raise AssertionError( "You must run this like execfile('path/to/...
mit
350dotorg/Django
django/contrib/gis/db/backends/spatialite/operations.py
282
14391
import re from decimal import Decimal from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter from django.contrib.gis.geometry.backend import G...
bsd-3-clause
vilorious/pyload
module/lib/thrift/protocol/TCompactProtocol.py
62
10926
# # 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 u...
gpl-3.0
jart/tensorflow
tensorflow/python/framework/error_interpolation.py
2
8229
# Copyright 2018 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
brucetsao/arduino-ameba
build/windows/work/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/arm-none-eabi/lib/armv7e-m/softfp/libstdc++.a-gdb.py
3
2405
# -*- python -*- # Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later versio...
lgpl-2.1
ciarams87/PyU4V
PyU4V/tests/ci_tests/test_pyu4v_ci_snapshot_policy.py
1
15453
# Copyright (c) 2020 Dell Inc. or its subsidiaries. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
mit
drufat/vispy
vispy.proxy.py
18
1563
# -*- coding: utf-8 -*- # Copyright (c) 2013, Almar Klein # (new) BSD License. """ This module provides an easy way to enable importing a package event if it's not on sys.path. The main use case is to import a package from its developmment repository without having to install it. This module is sort of like a symlin...
bsd-3-clause
ArcherSys/ArcherSys
Lib/site-packages/pkginfo/commandline.py
3
6604
"""Print the metadata for one or more Python package distributions. Usage: %prog [options] path+ Each 'path' entry can be one of the following: o a source distribution: in this case, 'path' should point to an existing archive file (.tar.gz, .tar.bz2, or .zip) as generated by 'setup.py sdist'. o a binary distrib...
mit
akash1808/nova_test_latest
nova/tests/unit/api/openstack/compute/contrib/test_baremetal_nodes.py
34
9194
# Copyright (c) 2013 NTT DOCOMO, 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 requ...
apache-2.0
postvakje/sympy
sympy/diffgeom/tests/test_class_structure.py
126
1124
from sympy.diffgeom import Manifold, Patch, CoordSystem, Point from sympy import symbols, Function m = Manifold('m', 2) p = Patch('p', m) cs = CoordSystem('cs', p, ['a', 'b']) cs_noname = CoordSystem('cs', p) x, y = symbols('x y') f = Function('f') s1, s2 = cs.coord_functions() v1, v2 = cs.base_vectors() f1, f2 = cs.b...
bsd-3-clause
mdehollander/bioconda-recipes
recipes/biopet-vcfstats/1.0/biopet-vcfstats.py
44
3367
#!/usr/bin/env python # # Wrapper script for starting the biopet-vcfstats JAR package # # This script is written for use with the Conda package manager and is copied # from the peptide-shaker wrapper. Only the parameters are changed. # (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shaker/pep...
mit
martinbuc/missionplanner
Lib/string.py
55
21398
"""A collection of string operations (most are no longer used). Warning: most of the code you see here isn't normally used nowadays. Beginning with Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop...
gpl-3.0
thnee/ansible
lib/ansible/modules/network/skydive/skydive_edge.py
38
4950
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2019, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
nhomar/odoo
addons/account/wizard/account_open_closed_fiscalyear.py
104
2341
# -*- 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
toshywoshy/ansible
lib/ansible/modules/cloud/openstack/os_recordset.py
21
7442
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise # 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', 'stat...
gpl-3.0
pamfilos/invenio
modules/websession/lib/password_migration_kit.py
28
6510
# -*- coding: utf-8 -*- ## ## Every db-related function of module webmessage ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2010, 2011 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 Softwar...
gpl-2.0
fidomason/kbengine
kbe/res/scripts/common/Lib/test/test_macpath.py
101
4932
import macpath from test import support, test_genericpath import unittest class MacPathTestCase(unittest.TestCase): def test_abspath(self): self.assertEqual(macpath.abspath("xx:yy"), "xx:yy") def test_isabs(self): isabs = macpath.isabs self.assertTrue(isabs("xx:yy")) self.ass...
lgpl-3.0
cjh1/StarCluster
starcluster/node.py
9
44355
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 3 of the License, or (at your option) any # later ...
gpl-3.0
oostende/dvbapp2-gui-egami
lib/python/Components/PackageInfo.py
52
12835
import xml.sax from Tools.Directories import crawlDirectory, resolveFilename, SCOPE_CONFIG, SCOPE_SKIN, copyfile, copytree from Components.NimManager import nimmanager from Components.Ipkg import IpkgComponent from Components.config import config, configfile from boxbranding import getBoxType from enigma import eConsol...
gpl-2.0
dsanders11/easypost-python
examples/carrier_account.py
2
1195
import easypost easypost.api_key = 'PRODUCTION API KEY' original_num_cas = len(easypost.CarrierAccount.all()) created_ca = easypost.CarrierAccount.create( type="UpsAccount", description="A test Ups Account", reference="PythonClientUpsTestAccount", credentials={ "account_number": "A1A1A1", ...
mit
bottompawn/kbengine
kbe/src/lib/python/Lib/email/mime/text.py
83
1367
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing text/* type MIME documents.""" __all__ = ['MIMEText'] from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): """Class for generating text/* type MI...
lgpl-3.0
Tehsmash/nova
nova/volume/encryptors/luks.py
28
5164
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
MebiusHKU/flask-web
flask/lib/python2.7/site-packages/wtforms/ext/django/fields.py
175
4580
""" Useful form fields for use with the Django ORM. """ from __future__ import unicode_literals import datetime import operator try: from django.conf import settings from django.utils import timezone has_timezone = True except ImportError: has_timezone = False from wtforms import fields, widgets from...
bsd-3-clause
fards/ainol_elfii_common
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
GauravSahu/odoo
addons/analytic/__openerp__.py
302
1891
# -*- 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
jeremiedecock/snippets
python/itertools/combinations.py
1
1588
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.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 witho...
mit
Frederikssund/QGIS-impact-analysis
ImpactAnalysis2/test/test_init.py
121
1860
# coding=utf-8 """Tests QGIS plugin init.""" __author__ = 'Tim Sutton <tim@linfiniti.com>' __revision__ = '$Format:%H$' __date__ = '17/10/2010' __license__ = "GPL" __copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' __copyright__ += 'Disaster Reduction' import os import unittest import logging import ...
gpl-3.0
microcom/odoo
openerp/report/render/html2html/html2html.py
49
3282
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.report.render.rml2pdf import utils import copy import base64 import cStringIO import re from reportlab.lib.utils import ImageReader _regex = re.compile('\[\[(.+?)\]\]') utils._regex = re.compile('\[\[\s*(.+...
agpl-3.0
slightlymadphoenix/activityPointsApp
activitypoints/lib/python3.5/site-packages/django/db/models/fields/related.py
45
71660
from __future__ import unicode_literals import inspect import warnings from functools import partial from django import forms from django.apps import apps from django.core import checks, exceptions from django.db import connection, router from django.db.backends import utils from django.db.models import Q from django...
mit
noxora/flask-base
flask/lib/python3.4/site-packages/pip/_vendor/html5lib/_inputstream.py
328
32532
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type, binary_type from pip._vendor.six.moves import http_client, urllib import codecs import re from pip._vendor import webencodings from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .con...
mit
KohlsTechnology/ansible
lib/ansible/modules/system/lvg.py
8
9852
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Alexander Bulimov <lazywolf0@gmail.com> # Based on lvol module by Jeroen Hoekx <jeroen.hoekx@dsquare.be> # 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...
gpl-3.0
Hiestaa/3D-Lsystem
lsystem/Tree7.py
1
1145
from lsystem.LSystem import LSystem import math class Tree7(LSystem): """Fractale en forme d'arbre v7""" def defineParams(self): self.LSName = "Tree7" self.LSAngle = math.pi / 4 self.LSSegment = 100 self.LSSteps = 9 self.LSStartingString = "T(x)" self.LSStochastic = False self.LSStochRange = 0.2 de...
mit
aquamatt/Peloton
src/peloton/exceptions.py
1
1915
# $Id: exceptions.py 117 2008-04-09 16:55:41Z mp $ # # Copyright (c) 2007-2008 ReThought Limited and Peloton Contributors # All Rights Reserved # See LICENSE for details """ All Peloton exceptions """ class PelotonError(Exception): """ Base for all Peloton exceptions; can be used on its own if no other exception i...
bsd-3-clause
dennybaa/st2
st2client/tests/unit/test_trace_commands.py
8
8907
# 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
interactiveinstitute/elvis
server/tornado/test/wsgi_test.py
40
3148
from __future__ import absolute_import, division, print_function, with_statement from wsgiref.validate import validator from tornado.escape import json_decode from tornado.test.httpserver_test import TypeCheckHandler from tornado.testing import AsyncHTTPTestCase from tornado.util import u from tornado.web import Reque...
gpl-3.0
kimjaejoong/nova
nova/api/openstack/compute/plugins/v3/tenant_networks.py
18
8013
# Copyright 2013 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
vnsofthe/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
382
3763
########################################################################## # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gener...
agpl-3.0
woodscn/scipy
scipy/sparse/linalg/tests/test_interface.py
38
12724
"""Test functions for the sparse.linalg.interface module """ from __future__ import division, print_function, absolute_import from functools import partial from itertools import product import operator import nose from numpy.testing import TestCase, assert_, assert_equal, \ assert_raises import numpy as np ...
bsd-3-clause
kevinwchang/Minecraft-Overviewer
contrib/contributors.py
8
4263
#!/usr/bin/python2 """Update the contributor list Alias handling is done by git with .mailmap New contributors are merged in the short-term list. Moving them to a "higher" list should be a manual process. """ import fileinput from subprocess import Popen, PIPE def format_contributor(contributor): return " * {0} ...
gpl-3.0
pieterlexis/pdns
regression-tests.recursor-dnssec/test_EDNS.py
4
1483
import dns import os import socket import struct import threading import time from recursortests import RecursorTest from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor ednsBufferReactorRunning = False class EDNSTest(RecursorTest): """ These tests are designed to check...
gpl-2.0
louiskun/flaskGIT
venv/lib/python2.7/site-packages/jinja2/utils.py
323
16560
# -*- coding: utf-8 -*- """ jinja2.utils ~~~~~~~~~~~~ Utility functions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import errno from collections import deque from threading import Lock from jinja2._compat import text_type, string_types, impl...
mit
wasade/qiime
scripts/compare_distance_matrices.py
1
11439
#!/usr/bin/env python from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2012, The QIIME project" __credits__ = ["Jai Ram Rideout", "Michael Dwan", "Logan Knecht", "Damien Coy", "Levi McCracken", "Greg Caporaso"] __license__ = "GPL" __version__ = "1.8.0-dev" __mainta...
gpl-2.0
sagiss/sardana
src/sardana/taurus/qt/qtgui/extra_hkl/hklscan.py
1
15114
#!/usr/bin/env python ############################################################################## ## ## This file is part of Sardana ## ## http://www.sardana-controls.org/ ## ## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## ## Sardana is free software: you can redistribute it and/or modify ## it und...
lgpl-3.0
mlba-team/open-lighting
tools/rdm/DMXSender.py
3
2219
#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it wi...
lgpl-2.1
Godiyos/python-for-android
python-build/python-libs/gdata/build/lib/gdata/client.py
133
35227
#!/usr/bin/env python # # Copyright (C) 2008, 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
sertac/django
django/core/mail/backends/smtp.py
477
5239
"""SMTP email backend class.""" import smtplib import ssl import threading from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.message import sanitize_address from django.core.mail.utils import DNS_NAME class EmailBackend(BaseEmailBackend): """ A...
bsd-3-clause
numenta/htmresearch
htmresearch/support/lateral_pooler/utils.py
4
5174
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2017, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
ThinkOpen-Solutions/odoo
addons/l10n_be_hr_payroll_account/__init__.py
430
1046
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
skybird6672/micropython
tools/insert-usb-ids.py
32
1311
# Reads the USB VID and PID from the file specifed by sys.arg[1] and then # inserts those values into the template file specified by sys.argv[2], # printing the result to stdout from __future__ import print_function import sys import re import string def parse_usb_ids(filename): rv = dict() if filename == 'u...
mit
creativcoder/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/testdata/handlers/sub/wrong_transfer_sig_wsh.py
499
1854
# 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 of conditions and the f...
mpl-2.0
qqzwc/XX-Net
code/default/python27/1.0/lib/encodings/cp856.py
593
12679
""" Python Character Mapping Codec cp856 generated from 'MAPPINGS/VENDORS/MISC/CP856.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='...
bsd-2-clause
drawks/ansible
test/units/modules/network/f5/test_bigip_firewall_port_list.py
38
4716
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
ByteInternet/libcloud
libcloud/test/compute/test_dimensiondata_v2_4.py
1
163733
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/pydoc.py
10
95607
#!/usr/bin/env python # -*- coding: latin-1 -*- """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide online help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydo...
gpl-3.0
josephxsxn/alchemists_notepad
Tests.py
1
6304
#List all ENUMS from Object.Ingredient import Ingredient for i in Ingredient: print(i) from Object.PotionColor import PotionColor for r in PotionColor: print(r) from Object.PotionSign import PotionSign for r in PotionSign: print(r) #//TODO #NEED TO ADD ALCHEMICAL ENUMS HERE #Make a Potion and Fetch its values fr...
apache-2.0
JustinSelig/CeRI-NLP-Comment-Evaluation
xlrd-0.9.3/tests/test_open_workbook.py
9
1294
from unittest import TestCase import os from xlrd import open_workbook from .base import from_this_dir class TestOpen(TestCase): # test different uses of open_workbook def test_names_demo(self): # For now, we just check this doesn't raise an error. open_workbook( from_this_dir(o...
mit
therandomcode/WikiWriter
lib/requests/packages/urllib3/exceptions.py
196
5440
from __future__ import absolute_import # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(se...
apache-2.0
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/fpformat.py
322
4699
"""General floating point formatting functions. Functions: fix(x, digits_behind) sci(x, digits_behind) Each takes a number or a string and a number of digits as arguments. Parameters: x: number to be formatted; or a string resembling a number digits_behind: number of digits behind the decimal point """ f...
gpl-2.0
silvesterlee/linux
scripts/gdb/linux/symbols.py
588
6302
# # gdb helper commands and functions for Linux kernel debugging # # load kernel and module symbols # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import os import re from linux import module...
gpl-2.0
GoogleChromeLabs/wasm-av1
third_party/aom/tools/lint-hunks.py
20
5088
#!/usr/bin/python ## ## Copyright (c) 2016, Alliance for Open Media. All rights reserved ## ## This source code is subject to the terms of the BSD 2 Clause License and ## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License ## was not distributed with this source code in the LICENSE file, you can...
apache-2.0
Ditmar/plugin.video.pelisalacarta
lib/gdata/tlslite/integration/TLSSocketServerMixIn.py
320
2203
"""TLS Lite + SocketServer.""" from gdata.tlslite.TLSConnection import TLSConnection class TLSSocketServerMixIn: """ This class can be mixed in with any L{SocketServer.TCPServer} to add TLS support. To use this class, define a new class that inherits from it and some L{SocketServer.TCPServer} (wi...
gpl-3.0
mapycz/mapnik
scons/scons-local-3.0.1/SCons/Options/BoolOption.py
5
1993
# # Copyright (c) 2001 - 2017 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"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge...
lgpl-2.1
kata198/VirtualEnvOnDemand
VirtualEnvOnDemand/utils.py
1
4791
# Copyright (c) 2015, 2016 Timothy Savannah under terms of LGPLv3. You should have received a copy of this with this distribution as "LICENSE" ''' utils - Some general-purpose utility functions ''' import re __all__ = ('cmp_version', ) # Yes, cmp is DA BOMB. What a huge mistake removing it from the language!! tr...
lgpl-3.0
teltek/edx-platform
common/djangoapps/util/models.py
16
1962
"""Models for the util app. """ import cStringIO import gzip import logging from config_models.models import ConfigurationModel from django.db import models from django.utils.text import compress_string from opaque_keys.edx.django.models import CreatorMixin logger = logging.getLogger(__name__) # pylint: disable=inv...
agpl-3.0
peeyush-tm/shinken
test/test_notification_master.py
18
3470
#!/usr/bin/env python # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Sebastien Coavoux, s.coavoux@free.fr # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gene...
agpl-3.0
nanolearning/edx-platform
common/test/acceptance/fixtures/discussion.py
11
2559
""" Tools for creating discussion content fixture data. """ from datetime import datetime import json import factory import requests from . import COMMENTS_STUB_URL class ContentFactory(factory.Factory): FACTORY_FOR = dict id = None user_id = "dummy-user-id" username = "dummy-username" course_i...
agpl-3.0
domain51/d51.django.apps.logger
d51/django/apps/logger/tests/views.py
1
1154
import datetime from django.test import TestCase from django.test.client import Client from ..models import Hit from .utils import build_hit_url, random_url class TestOfHitView(TestCase): def test_logs_hit(self): url = random_url() c = Client() response = c.get(build_hit_url(url)) ...
gpl-3.0
gnmiller/craig-bot
craig-bot/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py
63
4459
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ from __future__ import absolute_import from logging import getLogger from ntlm import ntlm from .. import HTTPSConnectionPool from ..packages.six.moves.http_client import HTTPSConnecti...
mit
jungle90/Openstack-Swift-I-O-throttler
build/lib.linux-x86_64-2.7/swift/account/utils.py
17
4423
# Copyright (c) 2010-2013 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 agree...
apache-2.0
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools
third_party/boto/gs/cors.py
88
7731
# Copyright 2012 Google Inc. # # 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, dis- # trib...
bsd-3-clause
epssy/hue
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py
116
8612
# -*- coding: utf-8 -*- # # SelfTest/Random/Fortuna/test_FortunaAccumulator.py: Self-test for the FortunaAccumulator module # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public dom...
apache-2.0
chafique-delli/OpenUpgrade
addons/account_analytic_analysis/__init__.py
425
1107
# -*- 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...
agpl-3.0
publicloudapp/csrutil
linux-4.3/tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
mit
ocampocj/cloud-custodian
tools/c7n_azure/tests/test_filters_marked-for-op.py
3
1952
# Copyright 2019 Microsoft Corporation # # 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 wri...
apache-2.0
dls-controls/scanpointgenerator
tests/test_core/test_get_points_performance.py
1
5693
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..")) import unittest import time from test_util import ScanPointGeneratorTest from scanpointgenerator import CompoundGenerator from scanpointgenerator import LineGenerator, StaticPointGenerator, LissajousGenerator, SpiralGenerator from scan...
apache-2.0
fumen/gae-fumen
lib/jinja2/defaults.py
130
1323
# -*- coding: utf-8 -*- """ jinja2.defaults ~~~~~~~~~~~~~~~ Jinja default filters and tags. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2._compat import range_type from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner # defaults for ...
bsd-3-clause
sambyers/o365_fmc
.venv/lib/python3.6/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py
1778
5232
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
roam/machete
machete/endpoints.py
1
25618
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, print_function, division, absolute_import) import sys import hashlib from contextlib import contextmanager from django.views.decorators.csrf import csrf_exempt from django.db import transaction, models from django.views.generic ...
bsd-2-clause
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/application_gateway_path_rule_py3.py
1
3100
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
deKupini/erp
addons/crm_partner_assign/crm_lead.py
7
3002
# -*- 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
VitalPet/c2c-rd-addons
stock_get_name_qty/sale.py
4
2994
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
agpl-3.0
krintoxi/NoobSec-Toolkit
NoobSecToolkit - MAC OSX/tools/inject/plugins/generic/entries.py
5
22629
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.agent import agent from lib.core.bigarray import BigArray from lib.core.common import Backend from lib.core.common import clearConsoleLine from lib.co...
gpl-2.0
krintoxi/NoobSec-Toolkit
NoobSecToolkit /tools/inject/plugins/dbms/sybase/enumeration.py
10
9703
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.common import filterPairValues from lib.core.common import isTechniqueAvailable from lib.core.common import randomStr from li...
gpl-2.0
zchking/odoo
addons/account_budget/__init__.py
444
1097
# -*- 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
RamonGuiuGou/l10n-spain
l10n_es_aeat_mod115/models/mod115.py
2
5135
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Sof...
agpl-3.0
jpalladino84/roguelike-game
data/python_templates/outfits.py
2
1520
from characters.outfit import Outfit from data.python_templates import items from data.python_templates import material def build_starter_warrior(): return Outfit( "starter_warrior", items_worn=[ items.helmet, items.breastplate, items.bracer, items.b...
mit
dnlove/ns3
src/lte/bindings/callbacks_list.py
21
1224
callback_classes = [ ['void', 'ns3::Ptr<ns3::Packet>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDev...
gpl-2.0
mread/buck
third-party/py/twitter-commons/src/python/twitter/common/python/util.py
23
5289
from __future__ import absolute_import import contextlib import errno from hashlib import sha1 import os import shutil import uuid from pkg_resources import find_distributions from .common import safe_open, safe_rmtree from .finders import register_finders class DistributionHelper(object): @staticmethod def wa...
apache-2.0
unicri/edx-platform
lms/djangoapps/instructor_task/api_helper.py
102
15417
""" Helper lib for instructor_tasks API. Includes methods to check args for rescoring task, encoding student input, and task submission logic, including handling the Celery backend. """ import hashlib import json import logging from django.utils.translation import ugettext as _ from celery.result import AsyncResult ...
agpl-3.0
StefanRijnhart/odoo
addons/project/wizard/project_task_delegate.py
195
6463
# -*- 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