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 |
|---|---|---|---|---|---|
alxgu/ansible | lib/ansible/modules/crypto/openssl_privatekey.py | 3 | 28149 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Yanis Guenane <yanis+ansible@guenane.org>
# 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_v... | gpl-3.0 |
inveniosoftware/invenio-oaiharvester | invenio_oaiharvester/__init__.py | 2 | 2995 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2015, 2016 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 optio... | gpl-2.0 |
salvadormrf/wagtailsettings | setup.py | 1 | 1134 | #!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setupt... | bsd-2-clause |
kingmotley/SickRage | lib/stevedore/example/setup.py | 32 | 1179 | from setuptools import setup, find_packages
setup(
name='stevedore-examples',
version='1.0',
description='Demonstration package for stevedore',
author='Doug Hellmann',
author_email='doug@doughellmann.com',
url='http://git.openstack.org/cgit/openstack/stevedore',
classifiers=['Developmen... | gpl-3.0 |
wemanuel/smry | server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/boto/boto/glacier/writer.py | 153 | 9668 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/
# Copyright (c) 2012 Robie Basak <robie@justgohome.co.uk>
# Tree hash implementation from Aaron Brady bradya@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated... | apache-2.0 |
Spicyharambe/spni.github.io | opponents/hermione/make_hermione_images.py | 3 | 14237 | import sys
#emotions:
#happy
#calm
#sad
#loss
#interested - clasping hands together?
#horny
#shocked - maybe hands in front of face, with a gap in between her fingers to see through?
#excited
#stunned - eyes closed, I think.
#angry
#clothes = shoes, socks, jumper, tie, skirt, shirt, bra, panties
#11 total stages
#ap... | mit |
chand3040/sree_odoo | openerp/addons/email_template/html2text.py | 440 | 14143 | #!/usr/bin/env python
"""html2text: Turn HTML into equivalent Markdown-structured text."""
__version__ = "2.36"
__author__ = "Aaron Swartz (me@aaronsw.com)"
__copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3."
__contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"]
# TODO:
# Support deco... | agpl-3.0 |
Zhongqilong/mykbengineer | kbe/src/lib/python/Lib/test/test_subprocess.py | 60 | 105047 | import unittest
from test import script_helper
from test import support
import subprocess
import sys
import signal
import io
import locale
import os
import errno
import tempfile
import time
import re
import selectors
import sysconfig
import warnings
import select
import shutil
import gc
import textwrap
try:
import... | lgpl-3.0 |
szibis/Diamond | src/collectors/puppetagent/puppetagent.py | 57 | 1534 | # coding=utf-8
"""
Collect stats from puppet agent's last_run_summary.yaml
#### Dependencies
* yaml
"""
try:
import yaml
except ImportError:
yaml = None
import diamond.collector
class PuppetAgentCollector(diamond.collector.Collector):
def get_default_config_help(self):
config_help = super(... | mit |
cvtsi2sd/mbed-os | tools/dev/rpc_classes.py | 68 | 5298 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... | apache-2.0 |
40223149/w16b_test | static/Brython3.1.0-20150301-090019/Lib/os.py | 635 | 35582 | r"""OS routines for Mac, NT, or Posix depending on what system we're on.
This exports:
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix', 'nt', 'os2' or 'ce'.
- os.curdir is a string representing the current directory ('.' or... | gpl-3.0 |
bijaydev/Implementation-of-Explicit-congestion-notification-ECN-in-TCP-over-wireless-network-in-ns-3 | src/dsr/bindings/modulegen__gcc_LP64.py | 30 | 995128 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 |
zemanel/ansible | v2/test/playbook/test_task_include.py | 23 | 2579 | # (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 |
jarvys/django-1.7-jdb | django/contrib/comments/templatetags/comments.py | 53 | 12090 | from django import template
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib import comments
from django.utils import six
from django.utils.deprecation import RenameMethodsBase, RemovedInDjango18Warning
fr... | bsd-3-clause |
skymanaditya1/numpy | numpy/core/fromnumeric.py | 35 | 95411 | """Module containing non-deprecated functions borrowed from Numeric.
"""
from __future__ import division, absolute_import, print_function
import types
import warnings
import numpy as np
from .. import VisibleDeprecationWarning
from . import multiarray as mu
from . import umath as um
from . import numerictypes as nt
... | bsd-3-clause |
pgmillon/ansible | test/units/modules/network/nxos/nxos_module.py | 29 | 3594 | # (c) 2016 Red Hat 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) any later version.
#
# Ansible is dis... | gpl-3.0 |
virgilio/timtec | administration/tests/test_views.py | 7 | 1181 | import pytest
@pytest.mark.django_db
def test_course_create_view(admin_client, client, user):
from django.core.urlresolvers import reverse_lazy
from core.models import Course
response = admin_client.get(reverse_lazy('administration.new_course'))
assert response.status_code == 405
name = 'Test cou... | agpl-3.0 |
jdobes/spacewalk | client/debian/packages-already-in-debian/rhn-client-tools/src/up2date_client/messageWindow.py | 21 | 4956 |
import string
import gtk
import gettext
t = gettext.translation('rhn-client-tools', fallback=True)
_ = t.ugettext
# wrap a long line...
def wrap_line(line, max_line_size = 100):
if len(line) < max_line_size:
return line
ret = []
l = ""
for w in string.split(line):
if not len(l):
... | gpl-2.0 |
AniruddhaSAtre/dd-agent | checks.d/aerospike.py | 1 | 3350 | # stdlib
import os
from inspect import getsourcefile
from os.path import abspath
# project
from checks import AgentCheck
from hashlib import md5
from aerospike.constants import ERROR_CODES
from aerospike.constants import HASH_KEY
from aerospike import interface
from aerospike import log
from aerospike import citrusle... | bsd-3-clause |
Foxfanmedium/python_training | OnlineCoursera/mail_ru/Python_1/Week_3/playground/env/Lib/site-packages/pkg_resources/_vendor/packaging/requirements.py | 454 | 4355 | # 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 string
import re
from pkg_resources.extern.pyparsing import string... | apache-2.0 |
Arafatk/sympy | sympy/ntheory/tests/test_residue.py | 11 | 6978 | from collections import defaultdict
from sympy import Symbol
from sympy.core.compatibility import range
from sympy.ntheory import n_order, is_primitive_root, is_quad_residue, \
legendre_symbol, jacobi_symbol, totient, primerange, sqrt_mod, \
primitive_root, quadratic_residues, is_nthpow_residue, nthroot_mod, \... | bsd-3-clause |
Acehaidrey/incubator-airflow | airflow/contrib/sensors/weekday_sensor.py | 2 | 1121 | #
# 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 |
jmhsi/justin_tinker | lib/python2.7/site-packages/pip/utils/logging.py | 516 | 3327 | from __future__ import absolute_import
import contextlib
import logging
import logging.handlers
import os
try:
import threading
except ImportError:
import dummy_threading as threading
from pip.compat import WINDOWS
from pip.utils import ensure_dir
try:
from pip._vendor import colorama
# Lots of differen... | apache-2.0 |
luzheqi1987/nova-annotation | nova/openstack/common/eventlet_backdoor.py | 4 | 4762 | # Copyright (c) 2012 OpenStack Foundation.
# Administrator of the National Aeronautics and Space Administration.
# 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 a... | apache-2.0 |
MIPS/external-chromium_org | tools/protoc_wrapper/protoc_wrapper.py | 78 | 3783 | #!/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.
"""
A simple wrapper for protoc.
- Adds includes in generated headers.
- Handles building with system protobuf as an option.
"""
... | bsd-3-clause |
drglove/SickRage | lib/sqlalchemy/orm/scoping.py | 79 | 6117 | # orm/scoping.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from .. import exc as sa_exc
from ..util import ScopedRegistry, ThreadLocalRegistry, wa... | gpl-3.0 |
intel-iot-devkit/upm | examples/python/ims.py | 6 | 1785 | #!/usr/bin/env python
# Author: Noel Eck <noel.eck@intel.com>
# Copyright (c) 2016 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# withou... | mit |
doug-fish/horizon | openstack_dashboard/test/api_tests/keystone_tests.py | 43 | 4914 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# 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... | apache-2.0 |
malept/gunicorn | gunicorn/debug.py | 155 | 2303 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
"""The debug module contains utilities and functions for better
debugging Gunicorn."""
import sys
import linecache
import re
import inspect
__all__ = ['spew', 'unspew']
_token_spliter = re.... | mit |
exploreodoo/datStruct | odoo/addons/website/tests/test_views.py | 29 | 8991 | # -*- coding: utf-8 -*-
import itertools
import unittest2
from lxml import etree as ET, html
from lxml.html import builder as h
from openerp.tests import common
def attrs(**kwargs):
return dict(('data-oe-%s' % key, str(value)) for key, value in kwargs.iteritems())
class TestViewSaving(common.TransactionCase):
... | gpl-2.0 |
glatard/nipype | nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py | 9 | 1501 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.mrtrix.tensors import Directions2Amplitude
def test_Directions2Amplitude_inputs():
input_map = dict(args=dict(argstr='%s',
),
display_debug=dict(argstr='-debug',
),
display_info=dict... | bsd-3-clause |
anbasile/flask_sample | flask/lib/python2.7/site-packages/werkzeug/formparser.py | 162 | 21207 | # -*- coding: utf-8 -*-
"""
werkzeug.formparser
~~~~~~~~~~~~~~~~~~~
This module implements the form parsing. It supports url-encoded forms
as well as non-nested multipart uploads.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more deta... | mit |
lliendo/Radar | radar/class_loader/__init__.py | 1 | 2634 | # -*- coding: utf-8 -*-
"""
This file is part of Radar.
Radar 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 version.
Radar is distributed ... | lgpl-3.0 |
DARKPOP/external_chromium_org | third_party/closure_linter/closure_linter/common/tokens.py | 129 | 4741 | #!/usr/bin/env python
#
# Copyright 2008 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 |
timj/scons | test/TEX/clean.py | 3 | 2833 | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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 |
pshen/ansible | lib/ansible/modules/network/iosxr/_iosxr_template.py | 47 | 5327 | #!/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 distribut... | gpl-3.0 |
wbc2010/django1.2.5 | django1.2.5/django/template/loaders/eggs.py | 65 | 1434 | # Wrapper for loading templates from eggs via pkg_resources.resource_string.
try:
from pkg_resources import resource_string
except ImportError:
resource_string = None
from django.template import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.conf import settings
class Loader(B... | bsd-3-clause |
sestrella/ansible | test/units/modules/network/check_point/test_cp_mgmt_tag.py | 19 | 3840 | # Ansible module to manage CheckPoint Firewall (c) 2019
#
# 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 dist... | gpl-3.0 |
molliewhitacre/aston | aston/qtgui/TableFile.py | 3 | 18270 | # -*- coding: utf-8 -*-
# Copyright 2011-2014 Roderick Bovee
#
# This file is part of Aston.
#
# Aston 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 |
foolonhill/rietveld | third_party/oauth2client/keyring_storage.py | 273 | 3227 | # Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 |
Jumpscale/web | pythonlib/watchdog/utils/dirsnapshot.py | 3 | 8949 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com>
# Copyright 2012 Google, Inc.
# Copyright 2014 Thomas Amland <thomas.amland@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the... | apache-2.0 |
Syrcon/servo | tests/wpt/css-tests/tools/webdriver/webdriver/searchcontext.py | 251 | 2153 | """WebDriver element location functionality."""
class SearchContext(object):
"""Abstract class that provides the core element location functionality."""
def find_element_by_css(self, selector):
"""Find the first element matching a css selector."""
return self._find_element('css selector', sele... | mpl-2.0 |
cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/scripts/addons/modules/ui_utils.py | 6 | 1405 | # -*- coding: utf-8 -*-
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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-3.0 |
luci/luci-py | appengine/isolate/proto/isolated_prpc_pb2.py | 2 | 7397 | # Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT!
# source: isolated.proto
import base64
import zlib
from google.protobuf import descriptor_pb2
# Includes description of the isolated.proto and all of its transitive
# dependencies. Includes source code info.
FILE_DESCRIPTOR_SET = descriptor_pb2.F... | apache-2.0 |
mspark93/VTK | ThirdParty/Twisted/twisted/test/test_stateful.py | 34 | 2009 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for twisted.protocols.stateful
"""
from twisted.trial.unittest import TestCase
from twisted.protocols.test import test_basic
from twisted.protocols.stateful import StatefulProtocol
from struct import pack, unpack, calcsize
clas... | bsd-3-clause |
datenbetrieb/odoo | addons/marketing_campaign/__openerp__.py | 260 | 3127 | # -*- 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 |
tsvstar/vk_downloader | vk/tests.py | 1 | 1723 | # coding=utf8
import os
import sys
import time
import unittest
import vk
from vk.utils import HandyList, make_handy, HandyDict
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
# copy to test_props.py and fill it
APP_ID = '4643961' # aka API/Client id
USER_LOGIN = 'tsvstar@gmail.com' # user email or... | mit |
dongguangming/pygal | pygal/test/test_bar.py | 6 | 1221 | # -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2015 Kozea
#
# 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... | lgpl-3.0 |
xiandaicxsj/qemu-copy | scripts/qtest.py | 34 | 1911 | # QEMU qtest library
#
# Copyright (C) 2015 Red Hat Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#
# Based on qmp.py.
#
import errno
import socket
class QEMUQtestProtocol(object):
def __ini... | gpl-2.0 |
gvb/odoo | addons/account_budget/wizard/account_budget_crossovered_report.py | 375 | 2089 | # -*- 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 |
GitAngel/django | tests/raw_query/models.py | 150 | 1034 | from django.db import models
class Author(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)
dob = models.DateField()
def __init__(self, *args, **kwargs):
super(Author, self).__init__(*args, **kwargs)
# Protect against annotations... | bsd-3-clause |
jpshort/odoo | addons/point_of_sale/wizard/pos_confirm.py | 343 | 2403 | # -*- 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 |
CredoReference/edx-platform | common/djangoapps/credo_modules/models.py | 1 | 24536 | import logging
import time
import datetime
import json
import re
import uuid
from urlparse import urlparse
from django.dispatch import receiver
from django.contrib.auth.models import User
from django.db import models, IntegrityError, OperationalError, transaction
from django.db.models import F, Value
from django.db.mod... | agpl-3.0 |
meduz/scikit-learn | examples/linear_model/plot_lasso_lars.py | 363 | 1080 | #!/usr/bin/env python
"""
=====================
Lasso path using LARS
=====================
Computes Lasso Path along the regularization parameter using the LARS
algorithm on the diabetes dataset. Each color represents a different
feature of the coefficient vector, and this is displayed as a function
of the regulariza... | bsd-3-clause |
poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/boto-2.19.0-py2.7.egg/boto/s3/cors.py | 240 | 8941 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without ... | apache-2.0 |
chhao91/QGIS | python/ext-libs/pygments/styles/perldoc.py | 364 | 2175 | # -*- coding: utf-8 -*-
"""
pygments.styles.perldoc
~~~~~~~~~~~~~~~~~~~~~~~
Style similar to the style used in the `perldoc`_ code blocks.
.. _perldoc: http://perldoc.perl.org/
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from... | gpl-2.0 |
spirrello/spirrello-pynet-work | applied_python/lib/python2.7/site-packages/setuptools/msvc9_support.py | 429 | 2187 | try:
import distutils.msvc9compiler
except ImportError:
pass
unpatched = dict()
def patch_for_specialized_compiler():
"""
Patch functions in distutils.msvc9compiler to use the standalone compiler
build for Python (Windows only). Fall back to original behavior when the
standalone compiler is no... | gpl-3.0 |
40223151/2014c2g9 | exts/w2/static/Brython2.0.0-20140209-164925/Lib/shutil.py | 720 | 39101 | """Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
from os.path import abspath
import fnmatch
import collections
import errno
import tarfile
try:
import bz2
del bz2
_... | gpl-2.0 |
RaoUmer/django | django/contrib/auth/forms.py | 4 | 13427 | from __future__ import unicode_literals
from django import forms
from django.forms.util import flatatt
from django.template import loader
from django.utils.datastructures import SortedDict
from django.utils.html import format_html, format_html_join
from django.utils.http import int_to_base36
from django.utils.safestri... | bsd-3-clause |
sauloal/PiCastPy | sqlalchemy/util/topological.py | 18 | 2656 | # util/topological.py
# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Topological sorting algorithms."""
from ..exc import CircularDependencyError
f... | mit |
sszlm/MissionPlanner | Lib/unittest/runner.py | 53 | 6698 | """Running tests"""
import sys
import time
from . import result
from .signals import registerResult
__unittest = True
class _WritelnDecorator(object):
"""Used to decorate file-like objects with a handy 'writeln' method"""
def __init__(self,stream):
self.stream = stream
def __ge... | gpl-3.0 |
actuaryzhang/spark | python/pyspark/tests/test_taskcontext.py | 2 | 9144 | #
# 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 us... | apache-2.0 |
svn2github/chromium-depot-tools | third_party/pylint/reporters/html.py | 59 | 2497 | # Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# 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... | bsd-3-clause |
huggingface/pytorch-transformers | tests/test_pipelines_translation.py | 2 | 4301 | # Copyright 2020 The HuggingFace Team. 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 applicabl... | apache-2.0 |
jaruba/chromium.src | tools/telemetry/telemetry/timeline/inspector_importer_unittest.py | 44 | 5399 | # 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 unittest
from telemetry.timeline import inspector_importer
from telemetry.timeline import model
from telemetry.timeline import trace_data
_BACKGROUND... | bsd-3-clause |
civisanalytics/ansible | lib/ansible/modules/system/solaris_zone.py | 21 | 17028 | #!/usr/bin/python
# (c) 2015, Paul Markham <pmarkham@netrefinery.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 you... | gpl-3.0 |
jrandall/python-rt | test_rt.py | 4 | 10246 | """Tests for Rt - Python interface to Request Tracker :term:`API`"""
__license__ = """ Copyright (C) 2013 CZ.NIC, z.s.p.o.
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 ... | gpl-3.0 |
liu602348184/django | tests/template_tests/syntax_tests/test_filter_syntax.py | 221 | 8844 | # coding: utf-8
from __future__ import unicode_literals
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import SomeClass, SomeOtherException, UTF8Class, setup
class FilterSyntaxTests(SimpleTestCase):
@setup({'filter-syntax01': '{{ var|upper }}'})
def test... | bsd-3-clause |
torre76/py-crypto-params | docs/conf.py | 1 | 10172 | # -*- coding: utf-8 -*-
#
# py-crypto-params documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 29 20:30:34 2015.
#
# 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 fi... | lgpl-3.0 |
jorge-marques/shoop | shoop/utils/setup.py | 8 | 1445 | # This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
class Setup(object):
def __init__(self, load_from=None):
self.commit(load_from)
... | agpl-3.0 |
PlanTool/plantool | code/Deterministic/LAMA/seq-sat-lama/lama/translate/pddl/f_expression.py | 10 | 5321 | #######################################################################
#
# Author: Gabi Roeger
# Modified by: Silvia Richter (silvia.richter@nicta.com.au)
# (C) Copyright 2008: Gabi Roeger and NICTA
#
# This file is part of LAMA.
#
# LAMA is free software; you can redistribute it and/or
# modify it under the terms of ... | gpl-2.0 |
daj0ker/BinPy | BinPy/examples/source/ic/Series_4000/IC4069.py | 5 | 1254 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=2>
# Usage of IC 4069
# <codecell>
from __future__ import print_function
from BinPy import *
# <codecell>
# Usage of IC 4069:
ic = IC_4069()
print(ic.__doc__)
# <codecell>
# The Pin configuration is:
inp = {2: 0, 3: 1, 4: 0, 5: 1, 7: 0, ... | bsd-3-clause |
zelbanna/sdcp | core/genlib.py | 1 | 3476 | """Module docstring.
Generic Library. Many are for reference, make them "inline"
"""
__author__ = "Zacharias El Banna"
################################# Generics ####################################
def debug_decorator(func_name):
def decorator(func):
def decorated(*args,**kwargs):
res = func(*args,**kwargs)
... | gpl-3.0 |
mlperf/training_results_v0.7 | Google/benchmarks/transformer/implementations/transformer-research-TF-tpu-v4-128/lingvo/base_trial.py | 3 | 4213 | # 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 |
unaizalakain/django | django/contrib/gis/db/models/sql/conversion.py | 308 | 2015 | """
This module holds simple classes to convert geospatial values from the
database.
"""
from django.contrib.gis.db.models.fields import GeoSelectFormatMixin
from django.contrib.gis.geometry.backend import Geometry
from django.contrib.gis.measure import Area, Distance
class BaseField(object):
empty_strings_allow... | bsd-3-clause |
Anonymous-X6/django | django/contrib/gis/geos/geometry.py | 216 | 23649 | """
This module contains the 'base' GEOSGeometry object -- all GEOS Geometries
inherit from this object.
"""
from __future__ import unicode_literals
import json
from ctypes import addressof, byref, c_double
from django.contrib.gis import gdal
from django.contrib.gis.geometry.regex import hex_regex, json_regex, wkt_... | bsd-3-clause |
hj91/jaikuengine | api/urls.py | 33 | 1686 | # Copyright 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 applicable law or agreed to in writing, ... | apache-2.0 |
amenonsen/ansible | lib/ansible/modules/network/avi/avi_vsvip.py | 28 | 5474 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.2
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | gpl-3.0 |
mauriceatron/iPhone-OpenGL-ES-Tutorial-Series | OpenGLES16/export_gldata.py | 5 | 2088 | #!BPY
import struct
import bpy
import Blender
def newFileName(ext):
return '.'.join(Blender.Get('filename').split('.')[:-1] + [ext])
def saveAllMeshes(filename):
for object in Blender.Object.Get():
if object.getType() == 'Mesh':
mesh = object.getData()
if (len(mesh.verts) > 0)... | gpl-3.0 |
hongliangzhao/seastar | tests/memcached/test_memcached.py | 25 | 22367 | #!/usr/bin/env python3
#
# This file is open source software, licensed to you under the terms
# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
# distributed with this work for additional information regarding copyright
# ownership. You may not use this file except in compliance with the Licen... | apache-2.0 |
ramcn/demo3 | venv/lib/python3.4/site-packages/pip/index.py | 31 | 44478 | """Routines related to PyPI, indexes"""
from __future__ import absolute_import
import logging
import cgi
import sys
import os
import re
import mimetypes
import posixpath
import warnings
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request
f... | mit |
elijah513/scrapy | scrapy/extensions/throttle.py | 142 | 3586 | import logging
from scrapy.exceptions import NotConfigured
from scrapy import signals
logger = logging.getLogger(__name__)
class AutoThrottle(object):
def __init__(self, crawler):
self.crawler = crawler
if not crawler.settings.getbool('AUTOTHROTTLE_ENABLED'):
raise NotConfigured
... | bsd-3-clause |
caasiu/xbmc-addons-chinese | service.subtitles.subhd/service.py | 1 | 11567 | # -*- coding: utf-8 -*-
import re
import os
import sys
import xbmc
import urllib
import xbmcvfs
import xbmcaddon
import xbmcgui,xbmcplugin
from bs4 import BeautifulSoup
import requests
import simplejson
__addon__ = xbmcaddon.Addon()
__author__ = __addon__.getAddonInfo('author')
__scriptid__ = __addon__.getAddo... | gpl-2.0 |
jessefeinman/FintechHackathon | venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py | 780 | 2128 | from __future__ import absolute_import
from base64 import b64encode
from ..packages.six import b
ACCEPT_ENCODING = 'gzip,deflate'
def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
basic_auth=None, proxy_basic_auth=None, disable_cache=None):
"""
Shortcuts for generatin... | bsd-2-clause |
rpm-software-management/yum | test/simpleremovetests.py | 11 | 4749 | from testbase import *
class SimpleRemoveTests(OperationsTests):
@staticmethod
def buildPkgs(pkgs, *args):
pkgs.leaf = FakePackage('foo', '2.5', '1.1', '0', 'noarch')
pkgs.leaf.addFile('/bin/foo')
pkgs.requires_leaf = FakePackage('bar', '4')
pkgs.requires_leaf.addRequires('foo... | gpl-2.0 |
highco-groupe/odoo | addons/procurement/procurement.py | 44 | 15869 | # -*- 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 |
tnemis/staging-server | baseapp/models.py | 2 | 10846 | from django.db import models
# from simple_history.models import HistoricalRecords #to store history
from django.db.models.fields import *
from django.core.mail import send_mail
from django.template.loader import get_template
from django.template import Context
from django.conf import settings
import caching.base # ca... | mit |
marcoantoniooliveira/labweb | oscar/lib/python2.7/site-packages/django/conf/global_settings.py | 89 | 22130 | # Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
#################... | bsd-3-clause |
dparks1134/Art | SVG/Examples/svg_write/examples/basic_shapes.py | 2 | 1608 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: svg examples
# Created: 07.11.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
try:
import svgwrite
except ImportError:
# if svgwrite is not 'installed' append parent dir of __file__ to sys.path
import sys, os
sys.path.ins... | gpl-3.0 |
jemandez/creaturas-magicas | Configuraciones básicas/scripts/addons/blendertools-1.0.0/makewalk/floor.py | 1 | 11011 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 distrib... | gpl-3.0 |
Oslandia/vizitown_plugin | twisted/conch/ssh/session.py | 59 | 10817 | # -*- test-case-name: twisted.conch.test.test_session -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
This module contains the implementation of SSHSession, which (by default)
allows access to a shell and a python interpreter over SSH.
Maintainer: Paul Swartz
"""
import struct
import ... | gpl-2.0 |
apruden/opal | opal-python-client/src/main/python/opal/file.py | 1 | 3231 | """
Opal file management.
"""
import sys
import pycurl
import opal.core
class OpalFile:
"""
File on Opal file system
"""
def __init__(self, path):
self.path = path
def get_meta_ws(self):
return '/files/meta' + self.path
def get_ws(self):
return '/files' + self.path
... | gpl-3.0 |
timkpaine/lantern | tests/plot/test_plot.py | 1 | 1272 | from mock import patch
import matplotlib
matplotlib.use('Agg')
class TestConfig:
def setup(self):
pass
# setup() before each test method
def teardown(self):
pass
# teardown() after each test method
@classmethod
def setup_class(cls):
pass
# setup_class... | apache-2.0 |
hroncok/horus | pkg/darwin/create-dmg/support/dmg-license.py | 47 | 6252 | #! /usr/bin/env python
"""
This script adds a license file to a DMG. Requires Xcode and a plain ascii text
license file.
Obviously only runs on a Mac.
Copyright (C) 2011-2013 Jared Hobbs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (t... | gpl-2.0 |
pigeonflight/strider-plone | docker/appengine/lib/google-api-python-client/oauth2client/django_orm.py | 25 | 3255 | # Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | mit |
CenterForOpenScience/SHARE | share/transformers/com_peerj.py | 2 | 2280 | from share.transform.chain import ChainTransformer, Parser, Delegate, RunPython, ParseDate, ParseName, Map, ctx, Try, Subjects, IRI, Concat
class Subject(Parser):
name = ctx
class ThroughSubjects(Parser):
subject = Delegate(Subject, ctx)
class Tag(Parser):
name = ctx
class ThroughTags(Parser):
t... | apache-2.0 |
neilpelow/wmap-django | venv/lib/python3.5/site-packages/pip/_vendor/html5lib/constants.py | 354 | 83387 | from __future__ import absolute_import, division, unicode_literals
import string
EOF = None
E = {
"null-character":
"Null character in input stream, replaced with U+FFFD.",
"invalid-codepoint":
"Invalid codepoint in stream.",
"incorrectly-placed-solidus":
"Solidus (/) incorrectly ... | gpl-3.0 |
PrashntS/scikit-learn | examples/decomposition/plot_faces_decomposition.py | 103 | 4394 | """
============================
Faces dataset decompositions
============================
This example applies to :ref:`olivetti_faces` different unsupervised
matrix decomposition (dimension reduction) methods from the module
:py:mod:`sklearn.decomposition` (see the documentation chapter
:ref:`decompositions`) .
"""... | bsd-3-clause |
emCOMP/twinkle | twinkle/feature_extraction/pipelines.py | 1 | 2688 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from core import FeatureExtractorRegistry
from twinkle.connectors.core import ConnectorRegistry
class FeatureExtractorPipelineFactory(object):
"""
Factory object for creating a pipeline from a file
"""
def __init__(self):
"""
"""
pass
def buildInput(self,... | mit |
wfxiang08/django178 | tests/inspectdb/tests.py | 6 | 11721 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import re
from unittest import skipUnless
from django.core.management import call_command
from django.db import connection
from django.test import TestCase, skipUnlessDBFeature
from django.utils.six import PY3, StringIO
class InspectDBTestCase(TestCa... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.