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 |
|---|---|---|---|---|---|
grehx/spark-tk | python/sparktk/frame/ops/timeseries_slice.py | 14 | 3826 | # vim: set encoding=utf-8
# Copyright (c) 2016 Intel 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 require... | apache-2.0 |
uroy9ch/portfolio | node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py | 1869 | 1247 | # Copyright 2014 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.
"""A clone of the default copy.deepcopy that doesn't handle cyclic
structures or complex types except for dicts and lists. This is
because gyp copies so large structur... | mit |
ywcui1990/htmresearch | projects/union_pooling/experiments/capacity/capacity_experiment.py | 8 | 9800 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | agpl-3.0 |
blackbliss/callme | flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/euctwprober.py | 2994 | 1676 | ######################## 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... | mit |
CognitiveScale/ansible-modules-extras | cloud/cloudstack/cs_staticnat.py | 16 | 9951 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# 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 Lice... | gpl-3.0 |
chouseknecht/ansible | lib/ansible/modules/storage/netapp/netapp_e_facts.py | 19 | 27049 | #!/usr/bin/python
# (c) 2016, NetApp, 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',
'status': ['preview'],
... | gpl-3.0 |
fichter/grpc | src/python/grpcio/grpc/framework/base/__init__.py | 1496 | 1530 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause |
mindw/dill | tests/test_file.py | 2 | 13097 | #!/usr/bin/env python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 2008-2015 California Institute of Technology.
# License: 3-clause BSD. The full license text is available at:
# - http://trac.mystic.cacr.caltech.edu/project/pathos/browser/dill/LICENSE
import dill
import random
impo... | bsd-3-clause |
gmarek/test-infra | jenkins/attach_agent.py | 2 | 2628 | #!/usr/bin/env python
# Copyright 2016 The Kubernetes Authors.
#
# 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 |
WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/execnet/deprecated.py | 4 | 1560 | """
some deprecated calls
(c) 2008-2009, Holger Krekel and others
"""
import execnet
def PopenGateway(python=None):
""" instantiate a gateway to a subprocess
started with the given 'python' executable.
"""
APIWARN("1.0.0b4", "use makegateway('popen')")
spec = execnet.XSpec("popen")
spec.p... | bsd-3-clause |
dciabrin/blog-dump | plugins/assets/test_assets.py | 21 | 3831 | # -*- coding: utf-8 -*-
# from __future__ import unicode_literals
import hashlib
import locale
import os
from codecs import open
from tempfile import mkdtemp
from shutil import rmtree
import unittest
import subprocess
from pelican import Pelican
from pelican.settings import read_settings
from pelican.tests.support im... | gpl-3.0 |
iburinoc/spass-server | server.py | 1 | 3155 | #!/usr/bin/python3
import logging
import subprocess
import sys
from flask import Flask, request
from flask_limiter import Limiter
app = Flask(__name__)
SPASS=sys.argv[1] if len(sys.argv) > 1 else 'spass'
DBFILE=sys.argv[2] if len(sys.argv) > 2 else ''
COMMAND = [SPASS, '-s'] + (['-d', DBFILE] if DBFILE else [])
d... | mit |
tieto/pidgin | libpurple/plugins/startup.py | 1 | 2005 | #!/usr/bin/env python
#
# Makes sure only one purple instance is running
#
# Purple is the legal property of its developers, whose names are too numerous
# to list here. Please refer to the COPYRIGHT file distributed with this
# source distribution.
#
# This program is free software; you can redistribute it and/or mod... | gpl-2.0 |
jrgp/iris-api-opensource | src/iris/sphinx_extension.py | 2 | 3217 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function
from docutils import nodes
from docutils.statemachine import ViewList
from sphinx.util import force_decode
from sphinx.util.compat import Directive
from sphinx.util.nodes import nested_parse_with_titles
from sphinx.util.docstrings imp... | bsd-2-clause |
sunlianqiang/kbengine | kbe/src/lib/python/Lib/encodings/idna.py | 215 | 9170 | # This module implements the RFCs 3490 (IDNA) and 3491 (Nameprep)
import stringprep, re, codecs
from unicodedata import ucd_3_2_0 as unicodedata
# IDNA section 3.1
dots = re.compile("[\u002E\u3002\uFF0E\uFF61]")
# IDNA section 5
ace_prefix = b"xn--"
sace_prefix = "xn--"
# This assumes query strings, so AllowUnassig... | lgpl-3.0 |
tonk/ansible | test/lib/ansible_test/_internal/coverage/combine.py | 18 | 7768 | """Combine code coverage files."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
from ..target import (
walk_compile_targets,
walk_powershell_targets,
)
from ..io import (
read_text_file,
)
from ..util import (
display,
)
from ..util_common import... | gpl-3.0 |
stur86/herdgame | node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py | 2736 | 6387 | # 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.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
#-------------------------------------------------------------------... | gpl-3.0 |
borysiasty/QGIS | python/plugins/processing/gui/RenderingStyleFilePanel.py | 45 | 2217 | # -*- coding: utf-8 -*-
"""
***************************************************************************
RenderingStyleFilePanel.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************... | gpl-2.0 |
tamirda/N7100_PhoeniX_Kernel | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
cs-shadow/phabricator-tools | py/aon/aoncmd_taskquery.py | 4 | 8598 | """display and filter the list of maniphest tasks.
you can use the 'task id' output from this command as input to the
'arcyon task-update' command.
usage examples:
list all tasks:
$ arcyon task-query
output formats:
--format-ids
3
2
1
--format-short
8 / Open / High / ... | apache-2.0 |
mahak/neutron | neutron/tests/unit/objects/test_address_group.py | 2 | 3592 | # 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 |
qPCR4vir/orange3 | Orange/canvas/help/provider.py | 3 | 7053 | """
"""
import os
import logging
import io
from urllib.parse import urljoin
from html import parser
from xml.etree.ElementTree import TreeBuilder, Element
from PyQt4.QtCore import QObject, QUrl
from PyQt4.QtNetwork import (
QNetworkAccessManager, QNetworkDiskCache, QNetworkRequest, QNetworkReply
)
from .inte... | bsd-2-clause |
zzzombat/lucid-python-django | tests/regressiontests/model_regress/models.py | 121 | 1683 | # coding: utf-8
from django.db import models
CHOICES = (
(1, 'first'),
(2, 'second'),
)
class Article(models.Model):
headline = models.CharField(max_length=100, default='Default headline')
pub_date = models.DateTimeField()
status = models.IntegerField(blank=True, null=True, choices=CHOICES)
m... | bsd-3-clause |
rsmenon/pygments-mathematica | tests/test_lexer.py | 1 | 13325 | # -*- coding: utf-8 -*-
# Copyright (c) 2016 rsmenon
# Licensed under the MIT License (https://opensource.org/licenses/MIT)
from nose.tools import assert_equal
from pygments.token import Token
import mathematica.builtins as mma
from mathematica.lexer import MathematicaLexer, MToken
class TestMathematicaLexer:
d... | mit |
hoosteeno/mozillians | vendor-local/lib/python/tablib/packages/odf/chart.py | 96 | 2634 | # -*- 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... | bsd-3-clause |
mantidproject/mantid | scripts/SANS/sans/algorithm_detail/beamcentrefinder_plotting.py | 3 | 1330 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
impo... | gpl-3.0 |
HerlanAssis/Django-AulaOsvandoSantana | lib/python2.7/site-packages/django/core/servers/basehttp.py | 36 | 7408 | """
HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21).
Based on wsgiref.simple_server which is part of the standard library since 2.5.
This is a simple server for use in testing or debugging Django apps. It hasn't
been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE!
"""
from __f... | mit |
abalkin/numpy | numpy/lib/tests/test_arraypad.py | 17 | 54283 | """Tests for the array padding functions.
"""
import pytest
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose, assert_equal
from numpy.lib.arraypad import _as_pairs
_numeric_dtypes = (
np.sctypes["uint"]
+ np.sctypes["int"]
+ np.sctypes["float"]
+ np.sctypes["complex"]... | bsd-3-clause |
radicalbit/ambari | ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py | 5 | 44058 | # -*- coding: utf-8 -*-
"""
ambari_jinja2.environment
~~~~~~~~~~~~~~~~~~
Provides a class that holds runtime and parsing time options.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from ambari_jinja2 import nodes
from ambari_jinja2.de... | apache-2.0 |
shashidharatd/kubernetes | examples/cluster-dns/images/backend/server.py | 504 | 1293 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# 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 |
PeterWangIntel/chromium-crosswalk | third_party/closure_linter/closure_linter/errorrules_test.py | 126 | 3658 | #!/usr/bin/env python
# Copyright 2013 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 |
chenghlee/chimerascan | chimerascan/deprecated/old_gene_to_genome.py | 12 | 15078 | '''
Created on Oct 25, 2010
@author: mkiyer
chimerascan: chimeric transcript discovery using RNA-seq
Copyright (C) 2011 Matthew Iyer
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 |
qedsoftware/commcare-hq | corehq/ex-submodules/toggle/tests.py | 1 | 4576 | import uuid
from couchdbkit import ResourceConflict
from couchdbkit.exceptions import ResourceNotFound
from django.test import TestCase
from toggle.shortcuts import update_toggle_cache, namespaced_item, clear_toggle_cache
from .models import generate_toggle_id, Toggle
from .shortcuts import toggle_enabled, set_toggle... | bsd-3-clause |
hlzz/dotfiles | graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/test/test_sip.py | 2 | 35340 | # -*- test-case-name: twisted.test.test_sip -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""Session Initialization Protocol tests."""
from twisted.trial import unittest, util
from twisted.protocols import sip
from twisted.internet import defer, reactor, utils
from twisted.pyt... | bsd-3-clause |
jonjahren/unity | tools/unity-introspection-visualiser.py | 3 | 3677 | #!/usr/bin/env python
#
# Script to generate a nice PNG file of the currently running unity introspection tree.
from argparse import ArgumentParser
from os import remove
from os.path import splitext
import dbus
try:
from autopilot.emulators.unity import get_state_by_path
except ImportError, e:
print "Error: c... | gpl-3.0 |
kawamon/hue | desktop/core/ext-py/jaeger-client-4.0.0/tests/test_prometheus.py | 2 | 2129 | # Copyright (c) 2018, The Jaeger Authors
#
# 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 w... | apache-2.0 |
KohlsTechnology/ansible | contrib/inventory/libvirt_lxc.py | 196 | 1357 | #!/usr/bin/env python
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# 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 o... | gpl-3.0 |
avorio/rdflib | test/test_issue154.py | 8 | 1985 | import sys
import platform
import warnings
from unittest import TestCase
from rdflib.graph import ConjunctiveGraph, URIRef
from nose.exc import SkipTest
# Workaround for otherwise-dropped HTML entities
import re
from htmlentitydefs import name2codepoint
def htmlentitydecode(s):
return re.sub('&(%s);' % '|'.join(... | bsd-3-clause |
mou4e/zirconium | chrome/browser/metrics/variations/generate_resources_map_unittest.py | 57 | 3127 | #!/usr/bin/python
# 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.
"""Unittests for generate_resources_map.py"""
import unittest
import generate_resources_map
class GenerateResourcesMapUnittest(unittest... | bsd-3-clause |
Dhivyap/ansible | contrib/inventory/zabbix.py | 37 | 7132 | #!/usr/bin/env python
# (c) 2013, Greg Buehler
# (c) 2018, Filippo Ferrazini
#
# 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 |
ancafarcas/superdesk-core | apps/content_types/content_types.py | 1 | 15237 |
import re
import bson
import superdesk
import superdesk.schema as schema
from copy import deepcopy
from superdesk.errors import SuperdeskApiError
from apps.auth import get_user_id
from superdesk import get_resource_service
CONTENT_TYPE_PRIVILEGE = 'content_type'
class DefaultSchema(schema.Schema):
"""Default ... | agpl-3.0 |
steveb/heat-cfnclient | heat_cfnclient/openstack/common/exception.py | 1 | 3462 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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.apac... | apache-2.0 |
batra-mlp-lab/DIGITS | digits/utils/test_image.py | 11 | 6550 | # Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
import tempfile
import StringIO
from nose.tools import assert_raises
import mock
import PIL.Image
import numpy as np
import os
import platform
from . import image as _, errors
class TestLoadImage():
def test_bad_path(self):
for path i... | bsd-3-clause |
sunjiawe/Stino | stino/pyarduino/base/language_file.py | 15 | 1493 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
# 1. Copyright
# 2. Lisence
# 3. Author
"""
Documents
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from . import abs_file
class LanguageFile(abs_file.File):
... | mit |
ganeshgore/myremolab | server/src/weblab/experiment/devices/serial_port.py | 3 | 1298 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individuals,
# list... | bsd-2-clause |
maartenq/ansible | lib/ansible/modules/cloud/google/gcp_compute_target_pool.py | 12 | 18374 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 |
berkmancenter/mediacloud | apps/crawler-fetcher/src/python/crawler_fetcher/new_story.py | 1 | 2247 | import datetime
from typing import Optional
from mediawords.db import DatabaseHandler
from mediawords.dbi.stories.stories import add_story
from mediawords.util.perl import decode_object_from_bytes_if_needed
from mediawords.util.sql import get_sql_date_from_epoch
from mediawords.util.url import get_url_host
def _crea... | agpl-3.0 |
ozburo/youtube-dl | devscripts/check-porn.py | 11 | 1923 | #!/usr/bin/env python
from __future__ import unicode_literals
"""
This script employs a VERY basic heuristic ('porn' in webpage.lower()) to check
if we are not 'age_limit' tagging some porn site
A second approach implemented relies on a list of porn domains, to activate it
pass the list filename as the only argument
... | unlicense |
StephenWeber/ansible | lib/ansible/modules/cloud/univention/udm_share.py | 21 | 23617 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# Copyright (c) 2016, Adfinis SyGroup AG
# Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch>
#
# 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 Fr... | gpl-3.0 |
brokenjacobs/ansible | lib/ansible/modules/network/cloudengine/ce_netconf.py | 46 | 5922 | #!/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 |
SvenDowideit/docker-tutorial | docker_tutorial/migrations/0004_auto__del_field_tutorialuser_http_accept_encoding__add_field_tutorialu.py | 5 | 4605 | # -*- 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):
# Deleting field 'TutorialUser.http_accept_encoding'
db.delete_column(u'docker_tutorial_tutorialuser', 'http... | apache-2.0 |
ctiller/grpc | src/python/grpcio_tests/tests/fork/client.py | 13 | 2302 | # Copyright 2018 gRPC authors.
#
# 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 |
evernote/zing | tests/core/utils/stats.py | 1 | 1788 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
import pytest
from hashlib import md5
from... | gpl-3.0 |
firmlyjin/brython | www/tests/unittests/test/test_importlib/import_/test___package__.py | 34 | 4367 | """PEP 366 ("Main module explicit relative imports") specifies the
semantics for the __package__ attribute on modules. This attribute is
used, when available, to detect which package a module belongs to (instead
of using the typical __path__/__name__ test).
"""
import unittest
from .. import util
from . import util as... | bsd-3-clause |
mcltn/ansible-modules-extras | notification/hall.py | 142 | 3619 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Billy Kimble <basslines@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 Li... | gpl-3.0 |
tudyzhb/yichui | django/contrib/messages/tests/cookie.py | 77 | 5504 | from django.contrib.messages import constants
from django.contrib.messages.tests.base import BaseTest
from django.contrib.messages.storage.cookie import (CookieStorage,
MessageEncoder, MessageDecoder)
from django.contrib.messages.storage.base import Message
from django.test.utils import override_settings
from djang... | bsd-3-clause |
marqh/iris | lib/iris/coord_systems.py | 2 | 33109 | # (C) British Crown Copyright 2010 - 2018, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | lgpl-3.0 |
thwarted/swup | src/download.py | 1 | 7973 | #!/usr/bin/env python
# $Id: download.py,v 1.20 2001/06/28 11:26:42 olafb Exp $
# Copyright 2001 Trustix As - <http://www.trustix.com>
#
# 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; eith... | gpl-2.0 |
dbentley/pants | src/python/pants/subsystem/subsystem_client_mixin.py | 6 | 2694 | # 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 collections imp... | apache-2.0 |
semonte/intellij-community | python/helpers/py3only/docutils/languages/ru.py | 52 | 2087 | # -*- coding: utf-8 -*-
# $Id: ru.py 7125 2011-09-16 18:36:18Z milde $
# Author: Roman Suzi <rnd@onego.ru>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be... | apache-2.0 |
guschmue/tensorflow | tensorflow/tools/test/system_info_lib.py | 101 | 4760 | # 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 |
mrunge/horizon | openstack_dashboard/dashboards/admin/routers/views.py | 11 | 2705 | # Copyright 2012, Nachi Ueno, NTT MCL, 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 applic... | apache-2.0 |
Vagab0nd/SiCKRAGE | lib3/sqlalchemy/pool/dbapi_proxy.py | 4 | 4320 | # sqlalchemy/pool/dbapi_proxy.py
# Copyright (C) 2005-2020 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
"""DBAPI proxy utility.
Provides transparent connection pooling on ... | gpl-3.0 |
alown/mypaint | gui/accelmap.py | 3 | 20328 | # This file is part of MyPaint.
# Copyright (C) 2014 by Andrew Chadwick <a.t.chadwick@gmail.com>
#
# 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 ... | gpl-2.0 |
ElementsProject/elements | test/functional/rpc_misc.py | 7 | 3555 | #!/usr/bin/env python3
# Copyright (c) 2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC misc output."""
import xml.etree.ElementTree as ET
from test_framework.test_framework import Bitco... | mit |
kupiakos/pybcd | analyze/devicesdesign.py | 1 | 8203 |
import os, sys, struct
sys.path.append('../test')
import bcd, functools, itertools
from objects import knownguids
store = bcd.BCD('BCDTest')
guids = [
'{150e57bb-8333-11e3-a0d2-000c2994873a}',
'{33238d8c-8333-11e3-a0d2-000c2994873a}',
'{c66dfa6e-8332-11e3-a0d2-000c2994873a}',
'{d99dfa6e-8442-22f3-b2... | mit |
xyguo/scikit-learn | sklearn/ensemble/weight_boosting.py | 28 | 40740 | """Weight Boosting
This module contains weight boosting estimators for both classification and
regression.
The module structure is the following:
- The ``BaseWeightBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regression and classification
only differ from each ot... | bsd-3-clause |
LeMeteore/python_koans | python3/koans/about_control_statements.py | 31 | 1925 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutControlStatements(Koan):
def test_if_then_else_statements(self):
if True:
result = 'true value'
else:
result = 'false value'
self.assertEqual(__, result)
def test_if_then_statem... | mit |
it-projects-llc/pos-addons | wechat/controllers/wechat_controllers.py | 1 | 1293 | # Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
# License MIT (https://opensource.org/licenses/MIT).
import logging
from lxml import etree
from odoo import http
from odoo.http import request
_logger = logging.ge... | mit |
rowemoore/odoo | addons/payment_authorize/models/authorize.py | 201 | 6963 | # -*- coding: utf-'8' "-*-"
import hashlib
import hmac
import logging
import time
import urlparse
from openerp import api, fields, models
from openerp.addons.payment.models.payment_acquirer import ValidationError
from openerp.addons.payment_authorize.controllers.main import AuthorizeController
from openerp.tools.floa... | agpl-3.0 |
tokyo-jesus/university | src/python/koans/python3/koans/about_scope.py | 107 | 3445 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
from . import jims
from . import joes
counter = 0 # Global
class AboutScope(Koan):
#
# NOTE:
# Look in jims.py and joes.py to see definitions of Dog used
# for this set of tests
#
def test_dog_is_not_available_in_th... | unlicense |
belokop-an/agenda-tools | code/htdocs/xmlGateway.py | 1 | 1065 | from MaKaC.webinterface.rh import xmlGateway
def index( req, **params ):
return xmlGateway.RHLoginStatus( req ).process( params )
def loginStatus(req, **params):
return xmlGateway.RHLoginStatus( req ).process( params )
def signIn(req, **params):
return xmlGateway.RHSignIn( req ).process( params )
def si... | gpl-2.0 |
martynovp/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py | 42 | 100624 | """
Test split modulestore w/o using any django stuff.
"""
from mock import patch
import datetime
from importlib import import_module
from path import path
import random
import re
import unittest
import uuid
from contracts import contract
from nose.plugins.attrib import attr
from django.core.cache import get_cache... | agpl-3.0 |
michigraber/scikit-learn | sklearn/linear_model/tests/test_coordinate_descent.py | 44 | 22866 | # Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# License: BSD 3 clause
from sys import version_info
import numpy as np
from scipy import interpolate, sparse
from copy import deepcopy
from sklearn.datasets import load_boston
from sklearn.utils.testing ... | bsd-3-clause |
gph82/mdtraj | mdtraj/__init__.py | 6 | 2628 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | lgpl-2.1 |
amishb/youtube-dl | youtube_dl/extractor/radiobremen.py | 128 | 2471 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import parse_duration
class RadioBremenIE(InfoExtractor):
_VALID_URL = r'http?://(?:www\.)?radiobremen\.de/mediathek/(?:index\.html)?\?id=(?P<id>[0-9]+)'
IE_NAME = 'radiobremen'
_TE... | unlicense |
vbshah1992/microblog | flask/lib/python2.7/site-packages/flask_wtf/form.py | 14 | 4504 | import werkzeug.datastructures
from jinja2 import Markup
from flask import request, session, current_app
from wtforms.fields import HiddenField
from wtforms.ext.csrf.session import SessionSecureForm
class _Auto():
'''Placeholder for unspecified variables that should be set to defaults.
Used when None is a v... | bsd-3-clause |
mmauroy/SickRage | lib/hachoir_parser/archive/mozilla_ar.py | 74 | 2405 | """MAR (Mozilla ARchive) parser
Author: Robert Xiao
Creation date: July 10, 2007
"""
from hachoir_core.endian import BIG_ENDIAN
from hachoir_core.field import (RootSeekableFieldSet, FieldSet,
String, CString, UInt32, RawBytes)
from hachoir_core.text_handler import displayHandler, filesizeHandler
from hachoir_cor... | gpl-3.0 |
Techlightenment/suds | suds/sax/__init__.py | 200 | 3253 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) 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.
#
# This program is distributed in the hope that it will ... | lgpl-3.0 |
IRI-Research/django | django/middleware/clickjacking.py | 185 | 1994 | """
Clickjacking Protection Middleware.
This module provides a middleware that implements protection against a
malicious site loading resources from your site in a hidden frame.
"""
from django.conf import settings
class XFrameOptionsMiddleware(object):
"""
Middleware that sets the X-Frame-Options HTTP head... | bsd-3-clause |
stelfrich/openmicroscopy | components/tools/OmeroPy/src/omero_ext/functional.py | 16 | 11787 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# From: http://code.djangoproject.com/browser/django/trunk/django/utils/functional.py
# License for code in this file that was taken from Python 2.5.
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
# --------------------------------------------
#
# 1. This LICENSE AGREEMENT... | gpl-2.0 |
ozzeD/omaha | installers/tagged_installer.py | 65 | 3236 | #!/usr/bin/python2.4
# Copyright 2009-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 la... | apache-2.0 |
TimeTravelersHackMe/togetherjs | togetherjs/tests/doctestjs/.resources/retemplate.py | 21 | 3199 | #!/usr/bin/env python
import re
section_re = re.compile(r'''
(?P<front1><!--\s*)
(?P<name>[A-Z_]+)
(?P<front2>\s*-->)
(?P<value>[^\000]*)
(?P<back1><!--\s*)
/(?P=name)
(?P<back2>\s*-->)
''', re.VERBOSE | re.MULTILINE)
value_sub_re = re.compile(r'(?P<front><[^>]*")(?:__)(?P<name>[A-Z_]+)(?:__)(?P<back>"[^>]*>)')... | mpl-2.0 |
grwilson/azure-quickstart-templates | bosh-cf-crossregion/scripts/setup_env.py | 121 | 9192 | #!/usr/bin/env python
import json
import netaddr
import os
import random
import re
import requests
import sys
from azure.storage.blob import AppendBlobService
from azure.storage.table import TableService
import azure.mgmt.network
from azure.common.credentials import ServicePrincipalCredentials
from azure.mgmt.network ... | mit |
simongoffin/my_odoo_tutorial | addons/website_certification/controllers/main.py | 373 | 2149 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
AtaraxiaEta/linux | tools/perf/tests/attr.py | 1266 | 9424 | #! /usr/bin/python
import os
import sys
import glob
import optparse
import tempfile
import logging
import shutil
import ConfigParser
class Fail(Exception):
def __init__(self, test, msg):
self.msg = msg
self.test = test
def getMsg(self):
return '\'%s\' - %s' % (self.test.path, self.msg)... | gpl-2.0 |
coders4help/volunteer_planner | scheduler/migrations/0008_blueprint_needcreator.py | 17 | 1714 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('scheduler', '0007_auto_20150819_0138'),
]
operations = [
migrations.CreateModel(
name='BluePrint',
f... | agpl-3.0 |
Akylas/CouchPotatoServer | libs/flask/views.py | 5 | 5629 | # -*- coding: utf-8 -*-
"""
flask.views
~~~~~~~~~~~
This module provides class-based views inspired by the ones in Django.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from .globals import request
http_method_funcs = frozenset(['get', 'post', 'head', '... | gpl-3.0 |
fernandojunior/searching-techniques | python/lib/python3.4/site-packages/wheel/bdist_wheel.py | 219 | 17006 | """
Create a wheel (.whl) distribution.
A wheel is a built archive format.
"""
import csv
import hashlib
import os
import subprocess
import warnings
import shutil
import json
import wheel
try:
import sysconfig
except ImportError: # pragma nocover
# Python < 2.7
import distutils.sysconfig as sysconfig
i... | mit |
hrjn/scikit-learn | examples/ensemble/plot_voting_probas.py | 316 | 2824 | """
===========================================================
Plot class probabilities calculated by the VotingClassifier
===========================================================
Plot the class probabilities of the first sample in a toy dataset
predicted by three different classifiers and averaged by the
`VotingC... | bsd-3-clause |
atopuzov/nitro-python | nssrc/com/citrix/netscaler/nitro/resource/config/lb/__init__.py | 4 | 1369 | __all__ = ['lbgroup', 'lbgroup_binding', 'lbgroup_lbvserver_binding', 'lbmetrictable', 'lbmetrictable_binding', 'lbmetrictable_metric_binding', 'lbmonbindings', 'lbmonbindings_binding', 'lbmonbindings_service_binding', 'lbmonbindings_servicegroup_binding', 'lbmonitor', 'lbmonitor_binding', 'lbmonitor_metric_binding', '... | apache-2.0 |
Nicop06/ansible | lib/ansible/modules/utilities/helper/_accelerate.py | 29 | 2723 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, James Cammarata <jcammarata@ansible.com>
# 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... | gpl-3.0 |
aikramer2/spaCy | spacy/lang/pt/lex_attrs.py | 2 | 1854 | # coding: utf8
from __future__ import unicode_literals
from ...attrs import LIKE_NUM
_num_words = ['zero', 'um', 'dois', 'três', 'tres', 'quatro', 'cinco', 'seis', 'sete', 'oito', 'nove', 'dez',
'onze', 'doze', 'dúzia', 'dúzias', 'duzia', 'duzias', 'treze', 'catorze', 'quinze', 'dezasseis',
... | mit |
vmora/QGIS | tests/src/python/test_provider_oracle.py | 11 | 14641 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for the Oracle provider.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"... | gpl-2.0 |
edx/edx-platform | openedx/core/lib/api/tests/test_fields.py | 4 | 1425 | """ Tests for custom DRF fields. """
import ddt
from django.test import TestCase
from openedx.core.lib.api.fields import AbsoluteURLField
class MockRequest:
""" Mock request object. """
ROOT = 'http://example.com'
def build_absolute_uri(self, value):
""" Mocks `Request.build_absolute_uri`. """
... | agpl-3.0 |
pdellaert/ansible | lib/ansible/modules/database/influxdb/influxdb_user.py | 6 | 8172 | #!/usr/bin/python
# (c) 2017, Vitaliy Zhhuta <zhhuta () gmail.com>
# insipred by Kamil Szczygiel <kamil.szczygiel () intel.com> influxdb_database module
# 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
__meta... | gpl-3.0 |
hubert667/AIR | build/kombu/kombu/tests/transport/virtual/test_exchange.py | 6 | 4826 | from __future__ import absolute_import
from kombu import Connection
from kombu.transport.virtual import exchange
from kombu.tests.case import Case, Mock
from kombu.tests.mocks import Transport
class ExchangeCase(Case):
type = None
def setUp(self):
if self.type:
self.e = self.type(Connec... | gpl-3.0 |
mattilyra/LSH | lsh/minhash.py | 2 | 2701 | # -*- coding: utf-8 -*-
try:
from functools import lru_cache
except ImportError:
from functools32 import lru_cache
import numpy as np
from .cMinhash import minhash_32, minhash_64
class MinHasher(object):
def __init__(self, seeds, char_ngram=8, random_state=None, hashbytes=8):
"""The MinHasher cr... | mit |
emonty/ansible | lib/ansible/plugins/lookup/csvfile.py | 80 | 5837 | # (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com>
# (c) 2017 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
DOCUMENTATION = """
lookup: csvfile
author: Jan-Piet Me... | gpl-3.0 |
CodeNameGhost/shiva | thirdparty/scapy/layers/tls/cert.py | 1 | 37553 | ## This file is part of Scapy
## Copyright (C) 2008 Arnaud Ebalard <arnaud.ebalard@eads.net>
## <arno@natisbad.org>
## 2015, 2016, 2017 Maxence Tury <maxence.tury@ssi.gouv.fr>
## This program is published under a GPLv2 license
"""
High-level methods for PKI objects (X.509 certific... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.