repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
Talustus/dreamkernel_ics_sghi777 | arch/ia64/scripts/unwcheck.py | 13143 | 1714 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... | gpl-2.0 |
nexlab/domotikad | domotika/boards/modules/DMRv3.py | 1 | 1727 | ###########################################################################
# Copyright (c) 2011-2014 Unixmedia S.r.l. <info@unixmedia.it>
# Copyright (c) 2011-2014 Franco (nextime) Lanza <franco@unixmedia.it>
#
# Domotika System Controller Daemon "domotikad" [http://trac.unixmedia.it]
#
# This file is part of domotik... | gpl-3.0 |
moijes12/oh-mainline | vendor/packages/django-celery/docs/_ext/literals_to_xrefs.py | 48 | 4725 | """
Runs through a reST file looking for old-style literals, and helps replace them
with new-style references.
"""
import re
import sys
import shelve
refre = re.compile(r'``([^`\s]+?)``')
ROLES = (
'attr',
'class',
"djadmin",
'data',
'exc',
'file',
'func',
'lookup',
'meth',
'm... | agpl-3.0 |
ryfeus/lambda-packs | Sklearn_scipy_numpy/source/numpy/distutils/command/__init__.py | 264 | 1098 | """distutils.command
Package containing implementation of all the standard Distutils
commands.
"""
from __future__ import division, absolute_import, print_function
def test_na_writable_attributes_deletion():
a = np.NA(2)
attr = ['payload', 'dtype']
for s in attr:
assert_raises(AttributeError, de... | mit |
obiben/pokemongo-api | pogo/POGOProtos/Enums/ItemCategory_pb2.py | 16 | 3764 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Enums/ItemCategory.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobu... | mit |
Giftingnation/GN-Oscar-Custom | oscar/apps/customer/wishlists/views.py | 5 | 10774 | # -*- coding: utf-8 -*-
from django.contrib import messages
from django.core.exceptions import (
ObjectDoesNotExist, MultipleObjectsReturned, PermissionDenied)
from django.core.urlresolvers import reverse
from django.db.models import get_model
from django.http import Http404, HttpResponseRedirect
from django.shortc... | bsd-3-clause |
xyziemba/chronology | src/chronology/cli.py | 1 | 4901 | import chronology
from chronology import config
import os
import signal
import argparse
import psutil
from subprocess import PIPE
import sys
class Client(object):
def __init__(self):
parser = argparse.ArgumentParser(
prog="chronology.py",
description="Control the Chronology daemon... | mit |
v-zhongz/azure-linux-extensions | Common/requests/packages/urllib3/contrib/pyopenssl.py | 197 | 10094 | '''SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* pyOpenSSL (tested wi... | apache-2.0 |
anupcshan/bazel | tools/android/strip_resources.py | 31 | 1825 | # Copyright 2015 The Bazel 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 applicable la... | apache-2.0 |
jleonhard/angular2-webpack-jquery-bootstrap | node_modules/node-forge/tests/policyserver.py | 171 | 3551 | #!/usr/bin/env python
"""
Flash Socket Policy Server.
- Starts Flash socket policy file server.
- Defaults to port 843.
- NOTE: Most operating systems require administrative privileges to use
ports under 1024.
$ ./policyserver.py [options]
"""
"""
Also consider Adobe's solutions:
http://www.adobe.com/devnet/fla... | mit |
apocalypsebg/odoo | addons/sale_layout/models/sale_layout.py | 180 | 5037 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
jtb0/myPiProject | bewegungssensor.py | 1 | 3437 | #!/usr/bin/env python
#coding: utf8
###############################################################################
# #
# Dieses Skript wird aufgerufen mit der Übergabe der Parameter. #
# In Diesem Fall sind die Parameter alle P... | gpl-3.0 |
KAMI911/wgslas2eovlas | lactransformer/libs/PefFile.py | 2 | 2071 | # -*- coding: UTF-8 -*-
class PefFile:
def __init__(self, filename):
self.__FileName = filename
self.__PefLines = 8
self.__FileIndex = 0
def OpenRO(self):
try:
self.__PefFileHandler = open(self.__FileName, 'r')
except IOError as ErrorText:
print... | gpl-2.0 |
UXE/local-edx | cms/urls.py | 2 | 7230 | from django.conf import settings
from django.conf.urls import patterns, include, url
# There is a course creators admin table.
from ratelimitbackend import admin
admin.autodiscover()
urlpatterns = patterns('', # nopep8
url(r'^transcripts/upload$', 'contentstore.views.upload_transcripts', name='upload_transcript... | agpl-3.0 |
kyubifire/softlayer-python | SoftLayer/fixtures/SoftLayer_Virtual_PlacementGroup.py | 3 | 1643 | getAvailableRouters = [{
"accountId": 1,
"fullyQualifiedDomainName": "bcr01.dal01.softlayer.com",
"hostname": "bcr01.dal01",
"id": 1,
"topLevelLocation": {
"id": 3,
"longName": "Dallas 1",
"name": "dal01",
}
}]
createObject = {
"accountId": 123,
"backendRouterId"... | mit |
abali96/Shapely | tests/test_emptiness.py | 6 | 1453 | from . import unittest
from shapely.geometry.base import BaseGeometry
import shapely.geometry as sgeom
from shapely.geometry.polygon import LinearRing
class EmptinessTestCase(unittest.TestCase):
def test_empty_base(self):
g = BaseGeometry()
self.assertTrue(g._is_empty)
def test_emptying_poin... | bsd-3-clause |
Nikoala/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/appletrailers.py | 19 | 5130 | from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..compat import compat_urlparse
from ..utils import (
int_or_none,
)
class AppleTrailersIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?trailers\.apple\.com/trailers/(?P<company>[^/]+)/(?P<movie>[^/]+)'... | gpl-3.0 |
bitcity/django | django/contrib/admin/templatetags/log.py | 499 | 2080 | from django import template
from django.contrib.admin.models import LogEntry
register = template.Library()
class AdminLogNode(template.Node):
def __init__(self, limit, varname, user):
self.limit, self.varname, self.user = limit, varname, user
def __repr__(self):
return "<GetAdminLog Node>"
... | bsd-3-clause |
jreichhold/chef-repo | vendor/ruby/2.0.0/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-apple-darwin13.1.0/ports/libxml2/2.8.0/libxml2-2.8.0/doc/examples/index.py | 86 | 8896 | #!/usr/bin/python -u
#
# Indexes the examples and build an XML description
#
import string
import glob
import sys
try:
import libxml2
except:
sys.exit(1)
sys.path.insert(0, "..")
from apibuild import CParser, escape
examples = []
extras = ['examples.xsl', 'index.py']
tests = []
sections = {}
symbols = {}
api_d... | apache-2.0 |
rosswhitfield/mantid | qt/python/mantidqt/widgets/sliceviewer/peaksviewer/test/test_peaksviewer_presenter.py | 3 | 5480 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.... | gpl-3.0 |
moijes12/oh-mainline | vendor/packages/Django/django/template/loaders/eggs.py | 114 | 1209 | # Wrapper for loading templates from eggs via pkg_resources.resource_string.
from __future__ import unicode_literals
try:
from pkg_resources import resource_string
except ImportError:
resource_string = None
from django.conf import settings
from django.template.base import TemplateDoesNotExist
from django.temp... | agpl-3.0 |
qenter/vlc-android | toolchains/arm/lib/python2.7/stringprep.py | 278 | 13522 | # This file is generated by mkstringprep.py. DO NOT EDIT.
"""Library that exposes various tables found in the StringPrep RFC 3454.
There are two kinds of tables: sets, for which a member test is provided,
and mappings, for which a mapping function is provided.
"""
from unicodedata import ucd_3_2_0 as unicodedata
ass... | gpl-2.0 |
cheukyin699/linux | Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# 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 i... | gpl-2.0 |
yuifan/pexus4_external_gtest | test/gtest_throw_on_failure_test.py | 2917 | 5766 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | bsd-3-clause |
geekaia/edx-platform | common/lib/xmodule/xmodule/tests/test_annotatable_module.py | 27 | 5778 | """Module annotatable tests"""
import unittest
from lxml import etree
from mock import Mock
from xblock.field_data import DictFieldData
from xblock.fields import ScopeIds
from xmodule.annotatable_module import AnnotatableModule
from opaque_keys.edx.locations import Location
from . import get_test_system
class Anno... | agpl-3.0 |
agconti/njode | env/lib/python2.7/site-packages/pygments/unistring.py | 29 | 51110 | # -*- coding: utf-8 -*-
"""
pygments.unistring
~~~~~~~~~~~~~~~~~~
Strings of all Unicode characters of a certain category.
Used for matching in Unicode-aware languages. Run to regenerate.
Inspired by chartypes_create.py from the MoinMoin project.
:copyright: Copyright 2006-2014 by the Pygment... | bsd-3-clause |
srjoglekar246/sympy | doc/ext/docscrape_sphinx.py | 2 | 7957 | import re, inspect, textwrap, pydoc
import sphinx
from docscrape import NumpyDocString, FunctionDoc, ClassDoc
class SphinxDocString(NumpyDocString):
def __init__(self, docstring, config={}):
self.use_plots = config.get('use_plots', False)
NumpyDocString.__init__(self, docstring, config=config)
... | bsd-3-clause |
tianyi33/simple_blog | django/conf/locale/sl/formats.py | 106 | 1745 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd. F Y'
TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'j. F Y. H:i'
YEAR_MONTH_... | mit |
citrix-openstack-build/python-neutronclient | neutronclient/neutron/v2_0/credential.py | 6 | 2705 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 |
ocadotechnology/boto | tests/integration/ses/test_connection.py | 113 | 1495 | from tests.unit import unittest
from boto.ses.connection import SESConnection
from boto.ses import exceptions
class SESConnectionTest(unittest.TestCase):
ses = True
def setUp(self):
self.ses = SESConnection()
def test_get_dkim_attributes(self):
response = self.ses.get_identity_dkim_attr... | mit |
yogeshraheja/yoggan_factory | images/bundle-centos-mongodb/library/mongodb_authent.py | 8 | 11801 | #!/usr/bin/python
# (c) 2012, Elliott Foster <elliott@fourkitchens.com>
# Sponsored by Four Kitchens http://fourkitchens.com.
# (c) 2014, Epic Games, Inc.
# (c) 2015, Orange, Inc. <alexis.lacroix@orange.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under... | gpl-3.0 |
vijayendrabvs/ssl-python-neutronclient | neutronclient/neutron/v2_0/securitygroup.py | 3 | 9826 | # Copyright 2012 OpenStack Foundation.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
gtaylor/ansible | v2/ansible/playbook/base.py | 2 | 12371 | # (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 |
rtucker-mozilla/mozpackager | vendor-local/lib/python/kombu/utils/__init__.py | 2 | 11214 | """
kombu.utils
===========
Internal utilities.
"""
from __future__ import absolute_import
import importlib
import random
import sys
from contextlib import contextmanager
from itertools import count, repeat
from time import sleep
from uuid import UUID, uuid4 as _uuid4, _uuid_generate_random
from .encoding import s... | bsd-3-clause |
usersource/tasks | tasks_phonegap/Tasks/cordova/plugins/io.usersource.anno/tools/copytool3/apiclient/http.py | 102 | 52847 | # 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... | mpl-2.0 |
nickw444/flask-sqlalchemy | docs/conf.py | 10 | 8400 | # -*- coding: utf-8 -*-
#
# Flask-SQLAlchemy documentation build configuration file, created by
# sphinx-quickstart on Tue Jun 1 14:31:57 2010.
#
# 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... | bsd-3-clause |
eadgarchen/tensorflow | tensorflow/python/keras/applications/vgg16/__init__.py | 75 | 1127 | # 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 |
KohlsTechnology/ansible | lib/ansible/module_utils/ipa.py | 29 | 7657 | # -*- coding: utf-8 -*-
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own lice... | gpl-3.0 |
Midrya/chromium | third_party/logilab/common/modutils.py | 64 | 23589 | # -*- coding: utf-8 -*-
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser Genera... | bsd-3-clause |
TimesysGit/advantech-linux | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
mdanielwork/intellij-community | python/helpers/coveragepy/coverage/html.py | 40 | 14724 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""HTML reporting for coverage.py."""
import datetime
import json
import os
import shutil
import coverage
from coverage import env
from coverage.backward import i... | apache-2.0 |
huyang1532/asciidoc | filters/graphviz/graphviz2png.py | 29 | 5484 | #!/usr/bin/env python
import os, sys, subprocess
from optparse import *
__AUTHOR__ = "Gouichi Iisaka <iisaka51@gmail.com>"
__VERSION__ = '1.1.4'
class EApp(Exception):
'''Application specific exception.'''
pass
class Application():
'''
NAME
graphviz2png - Converts textual graphviz notation to PNG fi... | gpl-2.0 |
vmindru/ansible-modules-core | cloud/openstack/os_router.py | 43 | 13894 | #!/usr/bin/python
#
# 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 version.
#
# This software is distributed in the hope that it ... | gpl-3.0 |
mahak/spark | python/pyspark/pandas/ml.py | 9 | 4160 | #
# 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 |
andrenam/Fogger | fogger_lib/Bridge.py | 1 | 8215 | ### BEGIN LICENSE
# Copyright (C) 2012 Owais Lone <hello@owaislone.org>
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be use... | gpl-3.0 |
rolandmansilla/microblog | flask/lib/python2.7/site-packages/werkzeug/posixemulation.py | 364 | 3519 | # -*- coding: utf-8 -*-
r"""
werkzeug.posixemulation
~~~~~~~~~~~~~~~~~~~~~~~
Provides a POSIX emulation for some features that are relevant to
web applications. The main purpose is to simplify support for
systems such as Windows NT that are not 100% POSIX compatible.
Currently this only imple... | bsd-3-clause |
lebabouin/CouchPotatoServer-develop | libs/sqlalchemy/orm/attributes.py | 18 | 51603 | # orm/attributes.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
"""Defines instrumentation for class attributes and their interaction
with instances... | gpl-3.0 |
caesar2164/edx-platform | common/lib/xmodule/xmodule/tests/test_bulk_assertions.py | 173 | 5627 | import ddt
import itertools
from xmodule.tests import BulkAssertionTest, BulkAssertionError
STATIC_PASSING_ASSERTIONS = (
('assertTrue', True),
('assertFalse', False),
('assertIs', 1, 1),
('assertEqual', 1, 1),
('assertEquals', 1, 1),
('assertIsNot', 1, 2),
('assertIsNone', None),
('as... | agpl-3.0 |
konstruktoid/ansible-upstream | lib/ansible/plugins/cliconf/ios.py | 3 | 10305 | #
# (c) 2017 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 d... | gpl-3.0 |
akrherz/iem | scripts/coop/month_precip.py | 1 | 2924 | """
Monthly precip something
"""
import datetime
import subprocess
import os
from pyiem.network import Table as NetworkTable
from pyiem.util import get_dbconn, logger
LOG = logger()
def main():
"""Go Main Go"""
nt = NetworkTable("IA_COOP")
iem_pgconn = get_dbconn("iem", user="nobody")
icursor = iem_... | mit |
Edraak/edraak-platform | openedx/core/djangoapps/profile_images/views.py | 13 | 8494 | """
This module implements the upload and remove endpoints of the profile image api.
"""
import datetime
import itertools
import logging
from contextlib import closing
from pytz import UTC
from django.utils.translation import ugettext as _
from rest_framework import permissions, status
from rest_framework.parsers impo... | agpl-3.0 |
sagangwee/sagangwee.github.io | build/pygments/build/lib.linux-i686-2.7/pygments/lexer.py | 73 | 30839 | # -*- coding: utf-8 -*-
"""
pygments.lexer
~~~~~~~~~~~~~~
Base lexer classes.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import print_function
import re
import sys
import time
import itertools
from pygments.filt... | mit |
B3AU/waveTree | sklearn/decomposition/sparse_pca.py | 10 | 8903 | """Matrix factorization with Sparse PCA"""
# Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort
# License: BSD 3 clause
import numpy as np
from ..utils import check_random_state, array2d
from ..linear_model import ridge_regression
from ..base import BaseEstimator, TransformerMixin
from .dict_learning import dic... | bsd-3-clause |
goddino/libjingle | trunk/build/android/pylib/base/base_test_runner.py | 2 | 7932 | # 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.
"""Base class for running tests on a single device."""
import contextlib
import httplib
import logging
import os
import tempfile
import time
from pylib... | bsd-3-clause |
phoenix741/spksrc | spk/sabnzbd/src/CharTranslator.py | 61 | 15564 | #!/usr/local/sabnzbd/env/bin/python -OO
#-*- coding: iso-8859-15 -*-
#
# If a file has been archieved under an ISO-8859 environment and unarchived
# under an UTF8 environment, then you will get an encoding format problem.
# The file will not be readable through SAMBA.
#
# Renaming script for SABnzbd runnning under Syno... | bsd-3-clause |
ddico/odoo | addons/account/tests/test_account_analytic.py | 5 | 2464 | # -*- coding: utf-8 -*-
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
from odoo.tests import tagged
from odoo.exceptions import UserError
@tagged('post_install', '-at_install')
class TestAccountAnalyticAccount(AccountTestInvoicingCommon):
@classmethod
def setUpClass(cls, chart_templ... | agpl-3.0 |
wizyoung/workflows.kyoyue | chardet/euctwprober.py | 289 | 1747 | ######################## 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 |
JioCloud/neutron | neutron/agent/ovsdb/native/commands.py | 13 | 13697 | # Copyright (c) 2015 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 ... | apache-2.0 |
sahiljain/catapult | third_party/google-endpoints/libpasteurize/fixes/fix_metaclass.py | 61 | 3268 | u"""
Fixer for (metaclass=X) -> __metaclass__ = X
Some semantics (see PEP 3115) may be altered in the translation."""
from lib2to3 import fixer_base
from lib2to3.fixer_util import Name, syms, Node, Leaf, Newline, find_root
from lib2to3.pygram import token
from libfuturize.fixer_util import indentation, suitify
# from ... | bsd-3-clause |
mcgachey/edx-platform | cms/djangoapps/contentstore/views/tests/test_videos.py | 83 | 15190 | #-*- coding: utf-8 -*-
"""
Unit tests for video-related REST APIs.
"""
# pylint: disable=attribute-defined-outside-init
import csv
import json
import dateutil.parser
import re
from StringIO import StringIO
from django.conf import settings
from django.test.utils import override_settings
from mock import Mock, patch
fr... | agpl-3.0 |
rickshawman/twitter | venv/lib/python2.7/site-packages/pip/utils/build.py | 899 | 1312 | from __future__ import absolute_import
import os.path
import tempfile
from pip.utils import rmtree
class BuildDirectory(object):
def __init__(self, name=None, delete=None):
# If we were not given an explicit directory, and we were not given an
# explicit delete option, then we'll default to del... | gpl-3.0 |
sysalexis/kbengine | kbe/res/scripts/common/Lib/tkinter/test/test_tkinter/test_loadtk.py | 162 | 1503 | import os
import sys
import unittest
import test.support as test_support
from tkinter import Tcl, TclError
test_support.requires('gui')
class TkLoadTest(unittest.TestCase):
@unittest.skipIf('DISPLAY' not in os.environ, 'No $DISPLAY set.')
def testLoadTk(self):
tcl = Tcl()
self.assertRaises(Tc... | lgpl-3.0 |
Trafire/purchaseorders | lib/python2.7/site-packages/Flask-0.11.1-py2.7.egg/flask/json.py | 48 | 9261 | # -*- coding: utf-8 -*-
"""
flask.jsonimpl
~~~~~~~~~~~~~~
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import io
import uuid
from datetime import date
from .globals import current_app, request
from ._... | mit |
turicas/rows | tests/tests_fields.py | 1 | 23936 | # coding: utf-8
# Copyright 2014-2020 Álvaro Justen <https://github.com/turicas/rows/>
# This program 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
# ... | lgpl-3.0 |
noba3/KoTos | addons/plugin.video.p2p-streams/resources/core/parsers/arenavision/main.py | 2 | 4389 | # -*- coding: utf-8 -*-
"""
This plugin is 3rd party and not part of p2p-streams addon
Arenavision.in
"""
import sys,os,requests
current_dir = os.path.dirname(os.path.realpath(__file__))
basename = os.path.basename(current_dir)
core_dir = current_dir.replace(basename,'').replace('parsers','')
sys.path.append(core_... | gpl-2.0 |
playm2mboy/edx-platform | lms/envs/dev.py | 3 | 11326 | """
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it'll write the database file
/edx-platform # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lot... | agpl-3.0 |
evro/CouchPotatoServer | libs/bs4/builder/_htmlparser.py | 412 | 8839 | """Use the HTMLParser library to parse HTML files that aren't too bad."""
__all__ = [
'HTMLParserTreeBuilder',
]
from HTMLParser import (
HTMLParser,
HTMLParseError,
)
import sys
import warnings
# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
# argument, which we'd like to s... | gpl-3.0 |
jayme-github/CouchPotatoServer | libs/sqlalchemy/orm/descriptor_props.py | 17 | 15476 | # orm/descriptor_props.py
# Copyright (C) 2005-2012 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
"""Descriptor properties are more "auxiliary" properties
that exist as configu... | gpl-3.0 |
ihsanudin/odoo | addons/resource/tests/test_resource.py | 243 | 32181 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-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 |
gVallverdu/pymatgen | pymatgen/analysis/gb/grain.py | 2 | 117980 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Module containing classes to generate grain boundaries.
"""
import numpy as np
from fractions import Fraction
from math import gcd, floor, cos
from functools import reduce
from pymatgen import Structure, L... | mit |
slightstone/SickRage | sickbeard/providers/rsstorrent.py | 1 | 5772 | # Author: Mr_Orange
#
# 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 later version.
#
# SickRage is dis... | gpl-3.0 |
rupran/ansible | test/integration/targets/module_utils/library/test.py | 91 | 2819 | #!/usr/bin/python
results = {}
# Test import with no from
import ansible.module_utils.foo0
results['foo0'] = ansible.module_utils.foo0.data
# Test depthful import with no from
import ansible.module_utils.bar0.foo
results['bar0'] = ansible.module_utils.bar0.foo.data
# Test import of module_utils/foo1.py
from ansible... | gpl-3.0 |
pkilambi/python-gnocchiclient | gnocchiclient/openstack/common/setup.py | 9 | 13471 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | apache-2.0 |
rsunder10/PopularityBased-SearchEngine | lib/python3.4/site-packages/django/contrib/staticfiles/management/commands/findstatic.py | 463 | 1745 | from __future__ import unicode_literals
import os
from django.contrib.staticfiles import finders
from django.core.management.base import LabelCommand
from django.utils.encoding import force_text
class Command(LabelCommand):
help = "Finds the absolute paths for the given static file(s)."
label = 'static file... | mit |
cwisecarver/osf.io | addons/s3/views.py | 3 | 4517 | import httplib
from boto import exception
from django.core.exceptions import ValidationError
from flask import request
from framework.exceptions import HTTPError
from framework.auth.decorators import must_be_logged_in
from addons.base import generic_views
from addons.s3 import utils
from addons.s3.serializer import ... | apache-2.0 |
koparasy/faultinjection-gem5 | src/dev/alpha/AlphaBackdoor.py | 2 | 1948 | # Copyright (c) 2005-2007 The Regents of The University of Michigan
# 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 ... | bsd-3-clause |
adw0rd/lettuce | tests/integration/lib/Django-1.2.5/django/conf/locale/en/formats.py | 66 | 1359 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'N j, Y'
TIME_FORMAT = 'P'
DATETIME_FORMAT = 'N j, Y, P'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'F j'
SHORT_DATE_FORMAT = 'm/d/Y'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
FIRST_DAY_OF_WEEK = 0 # Sunday
DAT... | gpl-3.0 |
kangkot/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_runpy.py | 58 | 9952 | # Test the runpy module
import unittest
import os
import os.path
import sys
import tempfile
from test.test_support import verbose, run_unittest, forget
from runpy import _run_code, _run_module_code, run_module
# Note: This module can't safely test _run_module_as_main as it
# runs its tests in the current process, whic... | apache-2.0 |
wemanuel/smry | server-auth/ls/google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/backend_services/add_backend.py | 2 | 3466 | # Copyright 2014 Google Inc. All Rights Reserved.
"""Command for adding a backend to a backend service."""
import copy
from googlecloudapis.compute.v1 import compute_v1_messages
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.compute.lib import backend_services_utils
from googlecloudsdk.compute.lib ... | apache-2.0 |
ShassAro/ShassAro | Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py | 52 | 23862 | """
SQLite3 backend for django.
Works with either the pysqlite2 module or the sqlite3 module in the
standard library.
"""
from __future__ import unicode_literals
import datetime
import decimal
import warnings
import re
from django.conf import settings
from django.db import utils
from django.db.backends import (utils... | gpl-2.0 |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/lib/django-1.3/django/contrib/admin/templatetags/admin_modify.py | 154 | 2389 | from django import template
register = template.Library()
def prepopulated_fields_js(context):
"""
Creates a list of prepopulated_fields that should render Javascript for
the prepopulated fields for both the admin form and inlines.
"""
prepopulated_fields = []
if context['add'] and 'adminform'... | lgpl-3.0 |
gcvalderrama/Palantir | worker/helper.py | 1 | 2984 |
import os
import glob
import random
import shutil
class Helper:
def clean_file_name(self, source_folder, extension='txt'):
"""
Rename files
:param source_folder:
:param extension:
:return:
"""
news = glob.glob(source_folder + "/*." + extension)
for ... | bsd-2-clause |
amiguez/youtube-dl | youtube_dl/extractor/chilloutzone.py | 169 | 3600 | from __future__ import unicode_literals
import re
import base64
import json
from .common import InfoExtractor
from ..utils import (
clean_html,
ExtractorError
)
class ChilloutzoneIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?chilloutzone\.net/video/(?P<id>[\w|-]+)\.html'
_TESTS = [{
'... | unlicense |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/django/core/management/commands/dumpdata.py | 72 | 8692 | import warnings
from collections import OrderedDict
from django.apps import apps
from django.core import serializers
from django.core.management.base import BaseCommand, CommandError
from django.core.management.utils import parse_apps_and_model_labels
from django.db import DEFAULT_DB_ALIAS, router
class ProxyModelWa... | gpl-3.0 |
hustcalm/seabios-hacking | tools/layoutrom.py | 23 | 23765 | #!/usr/bin/env python
# Script to analyze code and arrange ld sections.
#
# Copyright (C) 2008-2010 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import sys
# LD script headers/trailers
COMMONHEADER = """
/* DO NOT EDIT! This is an autogenerated file.... | gpl-3.0 |
Acidburn0zzz/servo | tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_runner_xunit.py | 32 | 9084 | """
test correct setup/teardowns at
module, class, and instance level
"""
from __future__ import absolute_import, division, print_function
import pytest
def test_module_and_function_setup(testdir):
reprec = testdir.inline_runsource(
"""
modlevel = []
def setup_module(module):
... | mpl-2.0 |
mahendra-r/edx-platform | lms/djangoapps/certificates/migrations/0023_auto__del_unique_badgeassertion_course_id_user__add_unique_badgeassert.py | 52 | 11804 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'BadgeAssertion', fields ['course_id', 'user']
... | agpl-3.0 |
bpollack/gerrit | tools/gitlog2asciidoc.py | 22 | 3306 | #!/usr/bin/python
from optparse import OptionParser
import re
import subprocess
import sys
"""
This script generates a release note from the output of git log
between the specified tags.
Options:
--issues Show output the commits with issues associated with them.
--issue-numbers Show outputs issue numbers o... | apache-2.0 |
kamilion/starcheat | starcheat/gui/quests.py | 2 | 4935 | """
Qt quests management dialog
"""
from gui.itemedit import ItemEditOptions
from gui.common import text_to_html
import qt_quests
from PyQt5.QtWidgets import QDialog
from PyQt5.QtWidgets import QMessageBox
def make_quest_info(name, data):
"""Return an HTML summary of a quest from its data."""
info = ""
... | mit |
detiber/lib_openshift | test/test_v1_cinder_volume_source.py | 2 | 1328 | # coding: utf-8
"""
OpenAPI spec version:
Generated by: https://github.com/swagger-api/swagger-codegen.git
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
... | apache-2.0 |
dagwieers/ansible | test/units/modules/network/cnos/test_cnos_command.py | 45 | 4330 | # Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | gpl-3.0 |
bendetat/survey-thing | node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/generator/ninja_test.py | 1843 | 1786 | #!/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.
""" Unit tests for the ninja.py file. """
import gyp.generator.ninja as ninja
import unittest
import StringIO
import sys
import TestCommon
... | apache-2.0 |
dsavransky/EXOSIMS | EXOSIMS/SurveyEnsemble/IPClusterEnsemble.py | 1 | 7185 | from __future__ import print_function
from ipyparallel import Client
from EXOSIMS.Prototypes.SurveyEnsemble import SurveyEnsemble
from EXOSIMS.util.get_module import get_module
import time
from IPython.core.display import clear_output
import sys
import json
import os
import numpy as np
import EXOSIMS
import EXOSIMS.M... | bsd-3-clause |
mattwthompson/mdtraj | mdtraj/testing/docstrings.py | 12 | 7568 | ##############################################################################
# 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 |
mthornhill/dj-stripe | tests/test_contrib/test_serializers.py | 12 | 2953 | """
.. module:: dj-stripe.tests.test_contrib.test_serializers
:synopsis: dj-stripe Serializer Tests.
.. moduleauthor:: Philippe Luickx (@philippeluickx)
"""
from __future__ import unicode_literals
from decimal import Decimal
from django.test import TestCase
from django.utils import timezone
from django.conf im... | bsd-3-clause |
mountain213/neo4jworkshop | REST_clients/Python_client/requests/packages/urllib3/contrib/ntlmpool.py | 1010 | 4507 | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
try:
from http.client import HTTPSConnection
except ImportError:
from httplib import HTTPSConnection
from logging import getLogger
from ntlm import ntlm
from urllib3 import HTT... | mit |
mensler/ansible | lib/ansible/modules/network/nxos/nxos_vtp_password.py | 46 | 8006 | #!/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 |
carnotweat/cpupimp | libs/suds/resolver.py | 205 | 15814 | # 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 ... | gpl-3.0 |
noelbk/openipmi | swig/python/openipmigui/gui_term.py | 3 | 9780 | # gui_term.py
#
# openipmi GUI terminal handling for SoL
#
# Author: MontaVista Software, Inc.
# Corey Minyard <minyard@mvista.com>
# source@mvista.com
#
# Copyright 2006 MontaVista Software Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU L... | gpl-2.0 |
runjmc/maraschino | lib/sqlalchemy/dialects/mssql/__init__.py | 23 | 1112 | # mssql/__init__.py
# Copyright (C) 2005-2011 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 sqlalchemy.dialects.mssql import base, pyodbc, adodbapi, \
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.