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 |
|---|---|---|---|---|---|
zahodi/ansible | lib/ansible/modules/cloud/openstack/os_project_facts.py | 4 | 4919 | #!/usr/bin/python
# Copyright (c) 2016 Hewlett-Packard Enterprise Corporation
#
# This module 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 ve... | gpl-3.0 |
petemounce/ansible | lib/ansible/cli/doc.py | 4 | 16894 | # (c) 2014, James Tanner <tanner.jc@gmail.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed i... | gpl-3.0 |
goFrendiAsgard/kokoropy | kokoropy/packages/sqlalchemy/dialects/postgresql/base.py | 22 | 88365 | # postgresql/base.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
"""
.. dialect:: postgresql
:name: PostgreSQL
Sequences/SERIAL
------------... | mit |
billiob/papyon | tests/test_file_transfer.py | 3 | 3904 | # -*- coding: utf-8 -*-
#
# papyon - a python client library for Msn
#
# Copyright (C) 2010 Collabora Ltd.
#
# 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
#... | gpl-2.0 |
nikolas/lettuce | tests/integration/lib/Django-1.3/django/contrib/localflavor/it/forms.py | 273 | 3027 | """
IT-specific Form helpers
"""
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode
from django.contrib.localflavor.it.... | gpl-3.0 |
branden/dcos | pkgpanda/cli.py | 5 | 8154 | """Panda package management
Usage:
pkgpanda activate <id>... [options]
pkgpanda swap <package-id> [options]
pkgpanda active [options]
pkgpanda fetch --repository-url=<url> <id>... [options]
pkgpanda add <package-tarball> [options]
pkgpanda list [options]
pkgpanda remove <id>... [options]
pkgpanda setup... | apache-2.0 |
leeon/annotated-django | django/db/backends/creation.py | 6 | 20276 | import hashlib
import sys
import time
from django.conf import settings
from django.db.utils import load_backend
from django.utils.encoding import force_bytes
from django.utils.functional import cached_property
from django.utils.six.moves import input
from .utils import truncate_name
# The prefix to put on the defaul... | bsd-3-clause |
BrateloSlava/SaveEnergy-2 | tools/perf/util/setup.py | 4998 | 1330 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
gonzolino/heat | heat/objects/fields.py | 11 | 1156 | # Copyright 2014 Intel Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | apache-2.0 |
skulldreamz/bullhead_kernel | tools/perf/scripts/python/net_dropmonitor.py | 2669 | 1738 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... | gpl-2.0 |
TathagataChakraborti/resource-conflicts | PLANROB-2015/seq-sat-lama/Python-2.5.2/Lib/test/test_peepholer.py | 17 | 6727 | import dis
import sys
from cStringIO import StringIO
import unittest
def disassemble(func):
f = StringIO()
tmp = sys.stdout
sys.stdout = f
dis.dis(func)
sys.stdout = tmp
result = f.getvalue()
f.close()
return result
def dis_single(line):
return disassemble(compile(line, '', 'single... | mit |
benoitsteiner/tensorflow-xsmm | tensorflow/contrib/opt/python/training/addsign.py | 55 | 6067 | # Copyright 2017 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 |
citrix-openstack-build/python-troveclient | troveclient/auth.py | 3 | 8823 | # Copyright 2012 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 l... | apache-2.0 |
TribeMedia/sky_engine | build/android/gn/zip.py | 86 | 1280 | #!/usr/bin/env 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.
"""Archives a set of files.
"""
import ast
import optparse
import os
import sys
import zipfile
sys.path.append(os.path.join(os.path... | bsd-3-clause |
cardmaster/makeclub | controlers/activity.py | 1 | 10024 | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub 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 versi... | agpl-3.0 |
soedinglab/PEnG-motif | lib/gtest-1.8.0/googletest/scripts/upload.py | 2511 | 51024 | #!/usr/bin/env python
#
# Copyright 2007 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 o... | gpl-3.0 |
hotsyk/declaration-widgets | setup.py | 1 | 1627 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', ... | bsd-3-clause |
JingheZ/shogun | examples/undocumented/python_modular/classifier_svmlight_linear_term_modular.py | 17 | 2004 | #!/usr/bin/env python
import numpy
traindna=['CGCACGTACGTAGCTCGAT',
'CGACGTAGTCGTAGTCGTA',
'CGACGGGGGGGGGGTCGTA',
'CGACCTAGTCGTAGTCGTA',
'CGACCACAGTTATATAGTA',
'CGACGTAGTCGTAGTCGTA',
'CGACGTAGTTTTTTTCGTA',
'CGACGTAGTCGTAGCCCCA',
'CAAAAAAAAAAAAAAAATA',
... | gpl-3.0 |
psoetens/pcl-svn | cmake/merge_cmake_install.py | 9 | 1093 | #!/usr/bin/env python
# file: merge_cmake_install.py
import sys, math
import fnmatch
import os
import shutil
if len(sys.argv) != 2:
# stop the program and print an error message
sys.exit("Must provide a cmake binary folder")
base_folder = sys.argv[1]
string_to_remove_debug = "IF(\"${CMAKE_INSTALL... | bsd-3-clause |
mrquim/mrquimrepo | repo/script.module.trakt/lib/trakt/interfaces/__init__.py | 4 | 1977 | from __future__ import absolute_import, division, print_function
from trakt.interfaces import auth
from trakt.interfaces import calendars
from trakt.interfaces import movies
from trakt.interfaces import oauth
from trakt.interfaces import scrobble
from trakt.interfaces import search
from trakt.interfaces import shows
f... | gpl-2.0 |
j-griffith/cinder | cinder/tests/unit/group/test_groups_manager_replication.py | 4 | 5560 | # Copyright (C) 2017 Dell Inc. or its subsidiaries.
# 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
#
# ... | apache-2.0 |
mancoast/CPythonPyc_test | cpython/278_test_future4.py | 136 | 1516 | from __future__ import unicode_literals
import unittest
from test import test_support
class TestFuture(unittest.TestCase):
def assertType(self, obj, typ):
self.assertTrue(type(obj) is typ,
"type(%r) is %r, not %r" % (obj, type(obj), typ))
def test_unicode_strings(self):
self.asser... | gpl-3.0 |
Matt-Deacalion/django | tests/conditional_processing/tests.py | 322 | 9157 | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from django.test import SimpleTestCase, override_settings
FULL_RESPONSE = 'Test conditional get response'
LAST_MODIFIED = datetime(2007, 10, 21, 23, 21, 47)
LAST_MODIFIED_STR = 'Sun, 21 Oct 2007 23:21:47 GMT'
LAST_MODIFIED_N... | bsd-3-clause |
ducthien1490/youtube-dl | youtube_dl/extractor/googleplus.py | 129 | 2568 | # coding: utf-8
from __future__ import unicode_literals
import re
import codecs
from .common import InfoExtractor
from ..utils import unified_strdate
class GooglePlusIE(InfoExtractor):
IE_DESC = 'Google Plus'
_VALID_URL = r'https://plus\.google\.com/(?:[^/]+/)*?posts/(?P<id>\w+)'
IE_NAME = 'plus.google'... | unlicense |
LinuxChristian/home-assistant | homeassistant/components/velux.py | 10 | 1826 | """
Connects to VELUX KLF 200 interface.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/velux/
"""
import logging
import asyncio
import voluptuous as vol
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
... | apache-2.0 |
moutai/scikit-learn | sklearn/datasets/tests/test_mldata.py | 384 | 5221 | """Test functionality of mldata fetching utilities."""
import os
import shutil
import tempfile
import scipy as sp
from sklearn import datasets
from sklearn.datasets import mldata_filename, fetch_mldata
from sklearn.utils.testing import assert_in
from sklearn.utils.testing import assert_not_in
from sklearn.utils.test... | bsd-3-clause |
82d28a/laikaboss | laika.py | 4 | 16971 | #!/usr/bin/env python
# Copyright 2015 Lockheed Martin 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... | apache-2.0 |
toshywoshy/ansible | lib/ansible/utils/encrypt.py | 60 | 7561 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@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
import crypt
import multiprocessing
import random
im... | gpl-3.0 |
mujiansu/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/Demos/objdoc.py | 17 | 1543 | # This is a sample file, and shows the basic framework for using an "Object" based
# document, rather than a "filename" based document.
# This is referenced by the Pythonwin .html documentation.
# In the example below, the OpenObject() method is used instead of OpenDocumentFile,
# and all the core MFC document open fu... | apache-2.0 |
boostedtc/arm_boosted-arm-linux-androideabi-4.8 | share/gdb/python/gdb/frames.py | 126 | 8031 | # Frame-filter commands.
# Copyright (C) 2013-2014 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 late... | gpl-2.0 |
antoniov/tools | zerobug/setup.py | 2 | 1743 | from setuptools import setup
setup(name='zerobug',
version='1.0.1.1',
description='Zeroincombenze continuous testing framework'
' and tools for python and bash programs',
long_description="""
This library can run unit test of target package software.
Supported languages are *python*... | agpl-3.0 |
bhargav2408/python-for-android | python3-alpha/python3-src/Lib/multiprocessing/connection.py | 46 | 14017 | #
# A higher level module for using sockets (or Windows named pipes)
#
# multiprocessing/connection.py
#
# Copyright (c) 2006-2008, R Oudkerk
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# ... | apache-2.0 |
pedrogazquez/appBares | rango/forms.py | 1 | 3240 | from django import forms
from django.contrib.auth.models import User
from rango.models import Tapa, Bar, UserProfile
class BarForm(forms.ModelForm):
name = forms.CharField(max_length=128, help_text="Por favor introduzca el nombre del bar")
views = forms.IntegerField(widget=forms.HiddenInput(), initial=0)... | gpl-3.0 |
EntPack/SilentDune-Client | silentdune_client/modules/automation/auto_discovery/updates.py | 1 | 25425 | #
# Authors: Ma He <mahe.itsec@gmail.com>
# Robert Abram <robert.abram@entpack.com>
# Copyright (C) 2015-2017 EntPack
# see file 'LICENSE' for use and warranty information
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publish... | lgpl-3.0 |
ar7z1/ansible | lib/ansible/modules/network/ios/ios_static_route.py | 58 | 8881 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# 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 |
sunqb/oa_qian | flask/Lib/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py | 1729 | 2302 | from __future__ import absolute_import, division, unicode_literals
from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
COMMENT, IGNORABLE_WHITESPACE, CHARACTERS
from . import _base
from ..constants import voidElements
class TreeWalker(_base.TreeWalker):
def __iter__(self):
ignore_until = None... | apache-2.0 |
google-research/disentanglement_lib | disentanglement_lib/data/ground_truth/cars3d.py | 1 | 4067 | # coding=utf-8
# Copyright 2018 The DisentanglementLib 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
#
# Un... | apache-2.0 |
google/latexify_py | tests/node_visitor_base_test.py | 1 | 2191 | # Copyright 2020 Google LLC
#
# 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 |
fjxhkj/PTVS | Python/Tests/TestData/WFastCgi/DjangoAppUrlRewrite/DjangoApplication/wsgi.py | 56 | 1185 | """
WSGI config for DjangoApplication7 project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WS... | apache-2.0 |
JudoWill/ResearchNotebooks | GA-PhredProcessing.py | 1 | 1153 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
import os, os.path
import shutil
import glob
import sys
from subprocess import check_call, check_output
os.chdir('/home/will/Dropbox/PhredDirectory/')
staden_path = '/home/will/staden-2.0.0b9.x86_64/bin/'
sys.path.append('/home/will/PySeqUtils/')
# <co... | mit |
stackforge/monasca-api | monasca_api/healthcheck/keystone_protocol.py | 2 | 2125 | # Copyright 2017 FUJITSU 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 writ... | apache-2.0 |
rlanyi/mitro | mitro-core/tools/txnsim.py | 25 | 1305 | #!/usr/bin/env python
import sys
import random
import heapq
DISTRIBUTION = [
341,
444,
551,
656,
765,
906,
1130,
1588,
3313,
84399
]
EVENTS_PER_MS = 5754. / 431997259
# do a simulation
MAX_TIME = 60 * 60 * 24 * 1000
if __name__ == '__main__':
scale_factor = int(sys.argv[1])
exp_lambda = (EVENTS_PER_MS * sc... | gpl-3.0 |
teddywing/django-shorturls | src/shorturls/tests/test_views.py | 4 | 2387 | from django.conf import settings
from django.test import TestCase
from shorturls.baseconv import base62
class RedirectViewTestCase(TestCase):
urls = 'shorturls.urls'
fixtures = ['shorturls-test-data.json']
def setUp(self):
self.old_shorten = getattr(settings, 'SHORTEN_MODELS', None)
se... | bsd-3-clause |
isrohutamahopetechnik/MissionPlanner | Lib/site-packages/scipy/ndimage/tests/test_ndimage.py | 53 | 203784 | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | gpl-3.0 |
intel-hpdd/intel-manager-for-lustre | chroma_core/services/job_scheduler/job_scheduler_client.py | 1 | 10557 | # Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
"""
The service `job_scheduler` handles both RPCs (JobSchedulerRpc) and a queue (NotificationQueue).
The RPCs are used for explicit requests to modify the system or run ... | mit |
diox/zamboni | mkt/tvplace/tests/test_views.py | 5 | 4750 | import json
from django.core.urlresolvers import reverse
from nose.tools import eq_, ok_
import mkt
from mkt.api.tests import BaseAPI
from mkt.api.tests.test_oauth import RestOAuth
from mkt.site.fixtures import fixture
from mkt.site.tests import ESTestCase, app_factory
from mkt.tvplace.serializers import (TVAppSeria... | bsd-3-clause |
sfam/home-assistant | homeassistant/components/media_player/cast.py | 3 | 8953 | """
homeassistant.components.media_player.chromecast
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides functionality to interact with Cast devices on the network.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.cast/
"""
# pylint: dis... | mit |
axinging/chromium-crosswalk | build/android/asan_symbolize.py | 19 | 3445 | #!/usr/bin/env python
#
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import optparse
import os
import re
import sys
from pylib import constants
from pylib.constants import host_path... | bsd-3-clause |
andrewleech/SickRage | sickbeard/notifiers/synologynotifier.py | 3 | 2926 | # coding=utf-8
# Author: Nyaran <nyayukko@gmail.com>
#
# This file is part of SickRage.
#
# SickRage 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 ... | gpl-3.0 |
RouxRC/weboob | modules/lacentrale/test.py | 7 | 1102 | # -*- coding: utf-8 -*-
# Copyright(C) 2014 Vicnet
#
# This file is part of weboob.
#
# weboob 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 Software Foundation, either version 3 of the License, or
# (at your option) any... | agpl-3.0 |
yusofm/scrapy | scrapy/http/request/form.py | 23 | 6564 | """
This module implements the FormRequest class which is a more convenient class
(than Request) to generate Requests based on form data.
See documentation in docs/topics/request-response.rst
"""
from six.moves.urllib.parse import urljoin, urlencode
import lxml.html
from parsel.selector import create_root_node
import... | bsd-3-clause |
cloudbase/neutron | neutron/agent/common/ovs_lib.py | 2 | 26628 | # Copyright 2011 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 |
Tejeshwarabm/Westwood | src/tap-bridge/bindings/modulegen__gcc_ILP32.py | 19 | 283308 | 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 |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.0/Lib/plat-irix5/TERMIOS.py | 4 | 10049 | # Generated by h2py from /usr/include/sys/termios.h
# Included from sys/ttydev.h
B0 = 0
B50 = 0000001
B75 = 0000002
B110 = 0000003
B134 = 0000004
B150 = 0000005
B200 = 0000006
B300 = 0000007
B600 = 0000010
B1200 = 0000011
B1800 = 0000012
B2400 = 0000013
B4800 = 0000014
B9600 = 0000015
B19200 = 0000016
EXTA = 0000016
B... | mit |
smalyshev/pywikibot-core | tests/tests_tests.py | 4 | 1398 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the tests package."""
#
# (C) Pywikibot team, 2014
#
# Distributed under the terms of the MIT license.
from __future__ import absolute_import, unicode_literals
__version__ = '$Id$'
import pywikibot
from tests.aspects import unittest, TestCase
from tests.utils i... | mit |
mogoweb/webkit_for_android5.1 | v8/test/test262/testcfg.py | 2 | 5147 | # Copyright 2011 the V8 project authors. 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 conditi... | apache-2.0 |
Lawrence-Liu/scikit-learn | sklearn/cluster/setup.py | 263 | 1449 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# License: BSD 3 clause
import os
from os.path import join
import numpy
from sklearn._build_utils import get_blas_info
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
cblas_libs, blas_info = ... | bsd-3-clause |
askeing/servo | tests/wpt/web-platform-tests/service-workers/service-worker/navigation-preload/resources/redirect-scope.py | 46 | 1342 | def main(request, response):
if "base" in request.GET:
return [("Content-Type", "text/html")], "OK"
type = request.GET.first("type")
if type == "normal":
response.status = 302
response.headers.append("Location", "redirect-redirected.html")
response.headers.append("Custom-Hea... | mpl-2.0 |
ltilve/chromium | tools/telemetry/telemetry/core/browser_options_unittest.py | 20 | 4731 | # Copyright 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.
import optparse
import os
import unittest
from telemetry.core import browser_options
class BrowserOptionsTest(unittest.TestCase):
def testDefaults(self):... | bsd-3-clause |
frodrigo/osmose-backend | analysers/analyser_osmosis_highway_vs_building.py | 4 | 16195 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Etienne Chové <chove@crans.org> 2010 ##
## Frédéric Rodrigo <****@free.fr> ... | gpl-3.0 |
ryoqun/mitmproxy | libmproxy/console/help.py | 4 | 3649 | from __future__ import absolute_import
import urwid
from . import common, signals
from .. import filt, version
footer = [
("heading", 'mitmproxy v%s ' % version.VERSION),
('heading_key', "q"), ":back ",
]
class HelpView(urwid.ListBox):
def __init__(self, help_context):
self.help_context = help_... | mit |
mF2C/COMPSs | utils/storage/redisPSCO/COMPSs-Redis-bundle/python/storage/storage_object.py | 2 | 2629 | #!/usr/bin/python
#
# Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 |
fsmMLK/inkscapeMadeEasy | examples/iME_Draw_lineStyle_and_markers.py | 1 | 4006 | #!/usr/bin/python
import inkex
import inkscapeMadeEasy_Base as inkBase
import inkscapeMadeEasy_Draw as inkDraw
import math
class myExtension(inkBase.inkscapeMadeEasy):
def __init__(self):
inkex.Effect.__init__(self)
self.OptionParser.add_option("--myColorPicker", action="store", type="string", de... | gpl-3.0 |
sysbot/CouchPotatoServer | libs/enzyme/mpeg.py | 180 | 30553 | # -*- coding: utf-8 -*-
# enzyme - Video metadata parser
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
# Copyright 2003-2006 Thomas Schueppel <stain@acm.org>
# Copyright 2003-2006 Dirk Meyer <dischi@freevo.org>
#
# This file is part of enzyme.
#
# enzyme is free software; you can redistribute it and/or mod... | gpl-3.0 |
wetek-enigma/enigma2 | lib/python/Screens/ButtonSetup.py | 1 | 29746 | from GlobalActions import globalActionMap
from Components.ActionMap import ActionMap, HelpableActionMap
from Components.Button import Button
from Components.ChoiceList import ChoiceList, ChoiceEntryComponent
from Components.SystemInfo import SystemInfo
from Components.config import config, ConfigSubsection, ConfigText,... | gpl-2.0 |
andyzsf/django | django/utils/formats.py | 29 | 8485 | from __future__ import absolute_import # Avoid importing `importlib` from this package.
import decimal
import datetime
from importlib import import_module
import unicodedata
from django.conf import settings
from django.utils import dateformat, numberformat, datetime_safe
from django.utils.encoding import force_str
f... | bsd-3-clause |
llonchj/sentry | tests/sentry/web/frontend/tests.py | 2 | 7035 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from exam import fixture
from sentry.constants import MEMBER_USER
from sentry.models import User
from sentry.testutils import TestCase
class EnvStatusTest(TestCase):
@fixture
def path(self):
... | bsd-3-clause |
amghost/myblog | node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/formatters/html.py | 94 | 31067 | # -*- coding: utf-8 -*-
"""
pygments.formatters.html
~~~~~~~~~~~~~~~~~~~~~~~~
Formatter for HTML output.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import sys
import os.path
import io
from pygments.formatter import For... | mit |
bdang2012/taiga-back | taiga/projects/attachments/permissions.py | 9 | 4133 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# 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 F... | agpl-3.0 |
bottompawn/kbengine | kbe/res/scripts/common/Lib/unittest/test/test_break.py | 81 | 9812 | import gc
import io
import os
import sys
import signal
import weakref
import unittest
@unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
@unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
@unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
"if threa... | lgpl-3.0 |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/feed_attribute_reference_error.py | 1 | 1293 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | apache-2.0 |
NielsZeilemaker/incubator-airflow | airflow/operators/oracle_operator.py | 46 | 1893 | # -*- coding: utf-8 -*-
#
# 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
... | apache-2.0 |
PaulWay/insights-core | insights/parsers/tests/test_lvdisplay.py | 3 | 2739 | from insights.tests import context_wrap
from insights.parsers.lvdisplay import LvDisplay
LV_DISPLAY = """
Adding lvsapp01ap01:0 as an user of lvsapp01ap01_mlog
--- Volume group ---
VG Name vgp01app
Format lvm2
Metadata Areas 4
Metadata Sequence No 56
VG Access ... | apache-2.0 |
theimaginaire/dayone | node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py | 1825 | 17014 | # 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.
"""GYP backend that generates Eclipse CDT settings files.
This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
files that can be importe... | mit |
examachine/pisi | pisi/exml/xmlfilepiks.py | 1 | 2519 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Plea... | gpl-3.0 |
aperigault/ansible | test/units/modules/network/netscaler/test_netscaler_cs_policy.py | 68 | 12560 |
# Copyright (c) 2017 Citrix Systems
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... | gpl-3.0 |
aperigault/ansible | lib/ansible/modules/network/eos/eos_vrf.py | 36 | 10760 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# 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 |
poljeff/odoo | openerp/tools/cache.py | 226 | 6865 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
gurneyalex/hr | __unported__/hr_policy_absence/__openerp__.py | 2 | 1551 | # -*- coding:utf-8 -*-
#
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# 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 Software Foundation, eit... | agpl-3.0 |
Proggie02/TestRepo | django/forms/util.py | 7 | 3658 | from __future__ import unicode_literals
from django.conf import settings
from django.utils.html import format_html, format_html_join
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.safestring import mark_safe
from django.utils import timezone
from django.utils.translation im... | bsd-3-clause |
dbs/schemaorg | lib/rdflib/plugins/sparql/evalutils.py | 23 | 2644 | import collections
from rdflib.term import Variable, Literal, BNode, URIRef
from rdflib.plugins.sparql.operators import EBV
from rdflib.plugins.sparql.parserutils import Expr, CompValue
from rdflib.plugins.sparql.sparql import SPARQLError, NotBoundError
def _diff(a, b, expr):
res = set()
for x in a:
... | apache-2.0 |
csm0042/rpihome_v3 | rpihome_v3/schedule_service/service_main.py | 1 | 6835 | #!/usr/bin/python3
""" service_main.py:
"""
# Import Required Libraries (Standard, Third Party, Local) ********************
import asyncio
import datetime
import logging
if __name__ == "__main__":
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)... | gpl-3.0 |
radiac/bleach | docs/conf.py | 13 | 7775 | # -*- coding: utf-8 -*-
#
# Bleach documentation build configuration file, created by
# sphinx-quickstart on Fri May 11 21:11:39 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | bsd-3-clause |
kevin-coder/tensorflow-fork | tensorflow/python/data/experimental/kernel_tests/make_batched_features_dataset_test.py | 12 | 9466 | # Copyright 2017 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 |
srager13/ns3_qoi_symptotics | src/point-to-point/bindings/modulegen__gcc_ILP32.py | 24 | 361770 | 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 |
cubing/tnoodle | git-tools/requests/packages/chardet/langhungarianmodel.py | 2763 | 12536 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 |
xinxian0458/dcos | pkgpanda/test_fetch.py | 10 | 1484 | from pkgpanda.util import expect_fs, resources_test_dir, run
fetch_output = """\rFetching: mesos--0.22.0\rFetched: mesos--0.22.0\n"""
def test_fetch(tmpdir):
# NOTE: tmpdir is explicitly empty because we want to be sure a fetch.
# succeeds when there isn't anything yet.
# Start a simpleHTTPServer to serv... | apache-2.0 |
faust64/ansible | lib/ansible/plugins/action/copy.py | 18 | 15234 | # (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 |
Ledoux/ShareYourSystem | Pythonlogy/ShareYourSystem/Standards/Classors/Switcher/Drafts/__init__ copy.py | 1 | 8024 | #<ImportSpecificModules>
import operator
,Doer,Representer
from ShareYourSystem.Functers import Functer,Triggerer,Hooker
BaseModuleStr="ShareYourSystem.Functers.Functer"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer")
#</ImportSpecificModules>
#<DefineLocals>
SYS.setSubModule(globals())
SwitchingBef... | mit |
axbaretto/beam | sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/test/functional/line_too_long.py | 6 | 1119 | # pylint: disable=invalid-encoded-data
# +1: [line-too-long]
#####################################################################################################
# +1: [line-too-long]
""" that one is too long tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo loooooong"""
# The next line is exactly 80... | apache-2.0 |
boberfly/gaffer | doc/source/WorkingWithScenes/AnatomyOfACamera/screengrab.py | 4 | 2280 | # BuildTarget: images/interfaceCameraParameters.png
import IECore
import time
import imath
import Gaffer
import GafferUI
import GafferScene
import GafferSceneUI
import GafferOSL
import GafferAppleseed
# Interface: the object and set sections of a camera in the Scene Inspector
script["Camera"] = GafferScene.Camera()... | bsd-3-clause |
numerigraphe/odoo | openerp/addons/base/module/module.py | 2 | 37507 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
ficlatte/main | django-bbcode-master/bbcode/util.py | 3 | 3388 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# django-bbcode: util.py
##
import re
import bbcode.settings
def to_html(text,
tags_alternative_definition={},
escape_html=True,
method='disable',
*tags):
"""
Convert a string with BBCode markup into its correspo... | agpl-3.0 |
beatle/node-gyp | gyp/tools/pretty_vcproj.py | 2637 | 9586 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Make the format of a vcproj really pretty.
This script normalize and sort an xml. It also fetches all the properties
inside linked... | mit |
Averroes/simplejson | simplejson/tests/test_scanstring.py | 134 | 4060 | import sys
from unittest import TestCase
import simplejson as json
import simplejson.decoder
class TestScanString(TestCase):
def test_py_scanstring(self):
self._test_scanstring(simplejson.decoder.py_scanstring)
def test_c_scanstring(self):
if not simplejson.decoder.c_scanstring:
r... | mit |
bokeh-cookbook/bokeh-cookbook | plugins/ipynb/markup.py | 1 | 5935 | from __future__ import absolute_import, print_function, division
import os
import json
try:
# Py3k
from html.parser import HTMLParser
except ImportError:
# Py2.7
from HTMLParser import HTMLParser
from pelican import signals
from pelican.readers import MarkdownReader, HTMLReader, BaseReader
from .ipy... | agpl-3.0 |
quoclieu/codebrew17-starving | env/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py | 1729 | 2302 | from __future__ import absolute_import, division, unicode_literals
from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
COMMENT, IGNORABLE_WHITESPACE, CHARACTERS
from . import _base
from ..constants import voidElements
class TreeWalker(_base.TreeWalker):
def __iter__(self):
ignore_until = None... | mit |
WhireCrow/openwrt-mt7620 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/distutils/emxccompiler.py | 250 | 11931 | """distutils.emxccompiler
Provides the EMXCCompiler class, a subclass of UnixCCompiler that
handles the EMX port of the GNU C compiler to OS/2.
"""
# issues:
#
# * OS/2 insists that DLLs can have names no longer than 8 characters
# We put export_symbols in a def-file, as though the DLL can have
# an arbitrary len... | gpl-2.0 |
copperhead/copperhead | copperhead/compiler/__init__.py | 5 | 1312 | #
# Copyright 2012 NVIDIA 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 ... | apache-2.0 |
chiamingyen/pygroup | wsgi/static/Brython2.1.4-20140810-083054/Lib/logging/config.py | 739 | 35619 | # Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.