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 |
|---|---|---|---|---|---|
gchp/django | 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... | bsd-3-clause |
PhilHarnish/forge | bin/process_clues.py | 1 | 1840 | """Process http://www.otsys.com/clue/ DB for use with python."""
import collections
import os
import sqlite3
import sys
# Add parent directory to path.
sys.path.append(os.path.join(
os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
'src'))
from data import crossword
from data import data
from puzz... | mit |
40223108/w18 | static/Brython3.1.1-20150328-091302/Lib/unittest/test/_test_warnings.py | 858 | 2304 | # helper module for test_runner.Test_TextTestRunner.test_warnings
"""
This module has a number of tests that raise different kinds of warnings.
When the tests are run, the warnings are caught and their messages are printed
to stdout. This module also accepts an arg that is then passed to
unittest.main to affect the b... | gpl-3.0 |
40223142/cda11 | static/Brython3.1.1-20150328-091302/Lib/multiprocessing/dummy/connection.py | 707 | 3049 | #
# Analogue of `multiprocessing.connection` which uses queues instead of sockets
#
# multiprocessing/dummy/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 conditi... | gpl-3.0 |
Sumith1896/sympy | sympy/utilities/runtests.py | 4 | 78928 | """
This is our testing framework.
Goals:
* it should be compatible with py.test and operate very similarly
(or identically)
* doesn't require any external dependencies
* preferably all the functionality should be in this file only
* no magic, just import the test file and execute the test functions, that's it
* po... | bsd-3-clause |
40223137/2015abc | static/Brython3.1.0-20150301-090019/Lib/xml/etree/ElementPath.py | 785 | 9477 | #
# ElementTree
# $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $
#
# limited xpath support for element trees
#
# history:
# 2003-05-23 fl created
# 2003-05-28 fl added support for // etc
# 2003-08-27 fl fixed parsing of periods in element names
# 2007-09-10 fl new selection engine
# 2007-09-12 fl fix... | gpl-3.0 |
felipecorrea/python-pocket | examples/save_to_pocket.py | 1 | 1208 | #!/usr/bin/env python
'''Add an Item to Pocket'''
__author__ = 'Felipe Borges'
import sys
sys.path.append("..")
import getopt
import pocket
USAGE = '''Usage: save_to_pocket [options] url
This script adds an Item to Pocket.
Options:
-h --help: print this help
--consumer_key : the Pocket API consumer ... | apache-2.0 |
eneldoserrata/marcos_openerp | addons/report_aeroo/barcode/barcode.py | 19 | 2368 | ##############################################################################
#
# Copyright (c) 2008-2011 Alistek Ltd (http://www.alistek.com) All Rights Reserved.
# General contacts <info@alistek.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take th... | agpl-3.0 |
lnfamous/Kernel_CyanogenMod11_Pico | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
DanteOnline/free-art | venv/lib/python3.4/site-packages/django/db/backends/oracle/creation.py | 160 | 17256 | import sys
import time
from django.conf import settings
from django.db.backends.base.creation import BaseDatabaseCreation
from django.db.utils import DatabaseError
from django.utils.functional import cached_property
from django.utils.six.moves import input
TEST_DATABASE_PREFIX = 'test_'
PASSWORD = 'Im_a_lumberjack'
... | gpl-3.0 |
DavidLi2010/ramcloud | bindings/python/stresstest_bank.py | 19 | 8020 | #!/usr/bin/env python
# Copyright (c) 2009-2010 Stanford University
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS"... | isc |
fengbaicanhe/intellij-community | python/helpers/profiler/thrift/TSerialization.py | 36 | 1401 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 |
Tesora-Release/tesora-trove | trove/guestagent/module/drivers/new_relic_license_driver.py | 1 | 3407 | # Copyright 2016 Tesora, 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 |
RomanHargrave/namebench | libnamebench/provider_extensions.py | 174 | 1713 | # Copyright 2009 Google 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 applicable law or ... | apache-2.0 |
DrMattChristian/btrbk | contrib/crypt/kdf_pbkdf2.py | 2 | 1919 | #!/usr/bin/env python3
#
# kdf_pbkdf2.py - (kdf_backend for btrbk)
#
# Copyright (c) 2017 Axel Burri
#
# 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 y... | gpl-3.0 |
lindycoder/netman | netman/adapters/switches/util.py | 3 | 3299 | # Copyright 2015 Internap.
#
# 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, so... | apache-2.0 |
jiachenning/odoo | addons/portal/mail_mail.py | 320 | 2625 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 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 |
zhangqifan/findSomething | FindSomething/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/actions/gyptest-all.py | 243 | 3677 | #!/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.
"""
Verifies simple actions when using an explicit build target of 'all'.
"""
import glob
import os
import TestGyp
test = TestGyp.TestGyp(... | mit |
openstack-ja/horizon | openstack_dashboard/openstack/common/notifier/log_notifier.py | 19 | 1297 | # 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.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 |
puckipedia/youtube-dl | youtube_dl/extractor/brightcove.py | 89 | 15403 | # encoding: utf-8
from __future__ import unicode_literals
import re
import json
import xml.etree.ElementTree
from .common import InfoExtractor
from ..compat import (
compat_parse_qs,
compat_str,
compat_urllib_parse,
compat_urllib_parse_urlparse,
compat_urllib_request,
compat_urlparse,
comp... | unlicense |
vvv1559/intellij-community | python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_set_literal.py | 326 | 1699 | """
Optional fixer to transform set() calls to set literals.
"""
# Author: Benjamin Peterson
from lib2to3 import fixer_base, pytree
from lib2to3.fixer_util import token, syms
class FixSetLiteral(fixer_base.BaseFix):
BM_compatible = True
explicit = True
PATTERN = """power< 'set' trailer< '('
... | apache-2.0 |
AlexRobson/nilmtk | nilmtk/datastore/key.py | 6 | 1916 | from __future__ import print_function, division
# do not edit! added by PythonBreakpoints
from pdb import set_trace as _breakpoint
class Key(object):
"""A location of data or metadata within NILMTK.
Attributes
----------
building : int
meter : int
utility : str
"""
... | apache-2.0 |
credativ/gofer | src/gofer/agent/config.py | 1 | 4642 | #
# Copyright (c) 2011 Red Hat, Inc.
#
# This software is licensed to you under the GNU Lesser General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (LGPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# includin... | lgpl-2.1 |
damdam-s/project-service | service_desk/project.py | 23 | 3700 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2013 Daniel Reis
#
# 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... | agpl-3.0 |
maciek263/django2 | myvenv/Lib/site-packages/django/contrib/gis/forms/widgets.py | 422 | 3659 | from __future__ import unicode_literals
import logging
from django.conf import settings
from django.contrib.gis import gdal
from django.contrib.gis.geos import GEOSException, GEOSGeometry
from django.forms.widgets import Widget
from django.template import loader
from django.utils import six, translation
logger = log... | mit |
harshilasu/LinkurApp | y/google-cloud-sdk/platform/gsutil/third_party/boto/tests/integration/s3/test_cert_verification.py | 126 | 1532 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software withou... | gpl-3.0 |
VanirAOSP/external_chromium-trace | trace-viewer/third_party/pywebsocket/src/example/bench_wsh.py | 495 | 2322 | # Copyright 2011, 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 |
tensorflow/probability | tensorflow_probability/python/internal/hypothesis_testlib_test.py | 1 | 1816 | # Copyright 2018 The TensorFlow Probability 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 o... | apache-2.0 |
JohnGeorgiadis/invenio | invenio/legacy/bibsched/bibtasklet.py | 17 | 5098 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License,... | gpl-2.0 |
Fizzadar/pyinfra | pyinfra_cli/inventory.py | 1 | 5989 | from os import listdir, path
from types import GeneratorType
import six
from pyinfra import logger, pseudo_inventory
from pyinfra.api.inventory import Inventory
from pyinfra_cli.util import exec_file
# Hosts in an inventory can be just the hostname or a tuple (hostname, data)
ALLOWED_HOST_TYPES = tuple(
six.stri... | mit |
XTAv2/Enigma2 | lib/python/Components/TuneTest.py | 27 | 10721 | from enigma import eDVBFrontendParametersSatellite, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eDVBFrontendParameters, eDVBResourceManager, eTimer
class Tuner:
def __init__(self, frontend, ignore_rotor=False):
self.frontend = frontend
self.ignore_rotor = ignore_rotor
# transponder = (freque... | gpl-2.0 |
taiwanlennon/flask-master | flask/sessions.py | 6 | 14527 | # -*- coding: utf-8 -*-
"""
flask.sessions
~~~~~~~~~~~~~~
Implements cookie based sessions based on itsdangerous.
:copyright: (c) 2012 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import uuid
import hashlib
from base64 import b64encode, b64decode
from datetime import dateti... | bsd-3-clause |
IsCoolEntertainment/debpkg_python-boto | boto/cloudsearch/sourceattribute.py | 37 | 3157 | # Copyright (c) 202 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without ... | mit |
amisrs/one-eighty | angular_flask/lib/python2.7/site-packages/requests/packages/charade/langcyrillicmodel.py | 184 | 18054 | ######################## 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 Ri... | mit |
joostvdg/jenkins-job-builder | tests/cmd/test_cmd.py | 1 | 1383 | import os
import testtools
from jenkins_jobs.cli import entry
from tests.base import LoggingFixture
from tests.base import mock
class CmdTestsBase(LoggingFixture, testtools.TestCase):
fixtures_path = os.path.join(os.path.dirname(__file__), 'fixtures')
def setUp(self):
super(CmdTestsBase, self).setU... | apache-2.0 |
Javier-Acosta/meran | dev-plugins/node64/lib/node/wafadmin/Tools/cc.py | 4 | 4728 | #!/usr/bin/env python
# Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog,
# Circulation and User's Management. It's written in Perl, and uses Apache2
# Web-Server, MySQL database and Sphinx 2 indexing.
# Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP
#
# This file is part ... | gpl-3.0 |
jtimberman/omnibus | source/otp_src_R14B02/lib/asn1/test/asn1_SUITE_data/Enum.py | 97 | 1047 | Enum DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- EXPORTS P1, P2;
-- F.2.3.1
-- Use an enumerated type to model the values of a variable
-- with three or more states.
-- Assign values starting with zero if their only
-- constraint is distinctness.
-- EXAMPLE
DayOfTheWeek ::= ENUMERATED {sunday(0), monday(1), tuesday(2),
... | apache-2.0 |
upliftaero/MissionPlanner | Lib/site-packages/numpy/ma/tests/test_core.py | 53 | 133084 | # pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102
"""Tests suite for MaskedArray & subclassing.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
"""
__author__ = "Pierre GF Gerard-Marchant"
import types
import warnings
import numpy as np
import numpy.core.fromnumeric as fromnumeric
fr... | gpl-3.0 |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Twisted-15.2.1/twisted/conch/test/test_knownhosts.py | 8 | 45570 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.conch.client.knownhosts}.
"""
import os
from binascii import Error as BinasciiError, b2a_base64, a2b_base64
from twisted.python.reflect import requireModule
if requireModule('Crypto') and requireModule('pyasn1'):
fro... | mit |
openstack/magnum | magnum/tests/unit/api/controllers/v1/test_federation.py | 2 | 18016 | # 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 |
Llamatech/sis-fibo | model/queue_client/publisher.py | 1 | 13238 | # -*- coding: utf-8 -*-
import time
import pika
import json
import logging
import hashlib
class ExamplePublisher(object):
"""This is an example publisher that will handle unexpected interactions
with RabbitMQ such as channel and connection closures.
If RabbitMQ closes the connection, it will reopen it. ... | gpl-2.0 |
adaxi/couchpotato | libs/subliminal/api.py | 106 | 5646 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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... | gpl-3.0 |
dashmoment/facerecognition | py/apps/videofacerec/helper/video.py | 3 | 4718 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import cv2
from time import clock
from numpy import pi, sin, cos
import common
class VideoSynthBase(object):
def __init__(self, size=None, noise=0.0, bg = None, **params):
self.bg = None
self.frame_size = (640, 480)
... | bsd-3-clause |
EntityFXCode/arsenalsuite | python/blur/examples/path_lister.py | 11 | 2216 | #!/usr/bin/python
from PyQt4.QtCore import *
from PyQt4.QtSql import *
from PyQt4.QtGui import *
from blur.Stone import *
from blur.Classes import *
from blur.Classesui import *
import blur.email, blur.jabber
import sys, time, re, os
from math import ceil
import traceback
try:
import popen2
except: pass
app = QAppl... | gpl-2.0 |
chubbymaggie/datasketch | examples/lshforest_example.py | 3 | 1141 | from datasketch import MinHashLSHForest, MinHash
data1 = ['minhash', 'is', 'a', 'probabilistic', 'data', 'structure', 'for',
'estimating', 'the', 'similarity', 'between', 'datasets']
data2 = ['minhash', 'is', 'a', 'probability', 'data', 'structure', 'for',
'estimating', 'the', 'similarity', 'between', ... | mit |
umaro/UmaroKernel | 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 |
gauravmm/Remote-Temperature-Monitor | utilities/colormap/colormaps.py | 28 | 50518 | # New matplotlib colormaps by Nathaniel J. Smith, Stefan van der Walt,
# and (in the case of viridis) Eric Firing.
#
# This file and the colormaps in it are released under the CC0 license /
# public domain dedication. We would appreciate credit if you use or
# redistribute these colormaps, but do not impose any legal r... | mit |
grow/grow | grow/translators/base.py | 1 | 15038 | """Base translators for translating Grow content."""
import copy
import json
import logging
import os
import threading
import progressbar
import texttable
import yaml
from protorpc import message_types
from protorpc import messages
from protorpc import protojson
from grow.common import progressbar_non
from grow.common... | mit |
spottradingllc/zoom | test/entities/test_application_state.py | 1 | 1899 | from unittest import TestCase
from zoom.www.entities.application_state import ApplicationState
class TestApplicationState(TestCase):
def setUp(self):
self.state = ApplicationState(application_name="1",
configuration_path="2",
appl... | gpl-2.0 |
xliux/chess | third_party/gtest-1.7.0/test/gtest_shuffle_test.py | 3023 | 12549 | #!/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 of... | apache-2.0 |
Andrew-McNab-UK/DIRAC | RequestManagementSystem/Service/ReqManagerHandler.py | 2 | 12793 | #####################################################################
# File: ReqManagerHandler.py
########################################################################
"""
:mod: ReqManagerHandler
.. module: ReqManagerHandler
:synopsis: Implementation of the RequestDB service in the DISET framework
"""
__RCSID__... | gpl-3.0 |
felixma/nova | nova/tests/unit/virt/hyperv/test_vhdutils.py | 32 | 11536 | # Copyright 2013 Cloudbase Solutions Srl
#
# 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 |
mihailignatenko/erp | addons/mail/tests/test_mail_gateway.py | 62 | 43064 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY 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 |
DxCx/nzbToMedia | libs/unidecode/x097.py | 252 | 4643 | data = (
'Xu ', # 0x00
'Ji ', # 0x01
'Mu ', # 0x02
'Chen ', # 0x03
'Xiao ', # 0x04
'Zha ', # 0x05
'Ting ', # 0x06
'Zhen ', # 0x07
'Pei ', # 0x08
'Mei ', # 0x09
'Ling ', # 0x0a
'Qi ', # 0x0b
'Chou ', # 0x0c
'Huo ', # 0x0d
'Sha ', # 0x0e
'Fei ', # 0x0f
'Weng ', # 0x10
'Z... | gpl-3.0 |
eonpatapon/neutron | neutron/db/db_base_plugin_common.py | 2 | 11824 | # Copyright (c) 2015 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... | apache-2.0 |
cubicova17/annet | venv/lib/python2.7/site-packages/south/management/commands/convert_to_south.py | 24 | 3676 | """
Quick conversion command module.
"""
from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from django.conf import settings
from django.db import models
from django.core import management
from django.core.exceptions import... | mit |
sdague/home-assistant | homeassistant/helpers/template.py | 2 | 43562 | """Template helper methods for rendering strings with Home Assistant data."""
from ast import literal_eval
import asyncio
import base64
import collections.abc
from datetime import datetime, timedelta
from functools import partial, wraps
import json
import logging
import math
from operator import attrgetter
import rando... | apache-2.0 |
vathpela/anaconda | tests/glade/check_mnemonics.py | 8 | 2031 | #
# Copyright (C) 2015 Red Hat, Inc.
#
# 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 2.1 of the License, or
# (at your option) any later version.
#
# This program is dis... | gpl-2.0 |
altaf-ali/luigi | setup.py | 15 | 2810 | # Copyright (c) 2012 Spotify AB
#
# 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, s... | apache-2.0 |
lino-framework/xl | lino_xl/lib/humanlinks/choicelists.py | 1 | 4263 | # -*- coding: UTF-8 -*-
# Copyright 2014-2015 Rumma & Ko Ltd
#
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""
Choicelists for `lino_xl.lib.humanlinks`.
"""
from __future__ import unicode_literals
from __future__ import print_function
from django.utils.translation import gettext_l... | bsd-2-clause |
disqus/pgshovel | tests/pgshovel/replication/streams/kafka.py | 1 | 4446 | from __future__ import absolute_import
import pytest
from itertools import islice
from kafka import (
KafkaClient,
SimpleProducer,
)
from tests.pgshovel.fixtures import (
cluster,
create_temporary_database,
)
from tests.pgshovel.streams.fixtures import (
DEFAULT_PUBLISHER,
begin,
transacti... | apache-2.0 |
neilpelow/wmap-django | venv/lib/python3.5/site-packages/django/contrib/flatpages/forms.py | 108 | 2162 | from django import forms
from django.conf import settings
from django.contrib.flatpages.models import FlatPage
from django.utils.translation import ugettext, ugettext_lazy as _
class FlatpageForm(forms.ModelForm):
url = forms.RegexField(
label=_("URL"),
max_length=100,
regex=r'^[-\w/\.~]+$... | gpl-3.0 |
Inspq/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_cancel.py | 33 | 3250 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
#
# 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 optio... | gpl-3.0 |
jmacmahon/invenio | modules/bibindex/lib/bibindex_engine_stemmer_unit_tests.py | 3 | 4306 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# Li... | gpl-2.0 |
kingmotley/SickRage | lib/backports/ssl_match_hostname/__init__.py | 134 | 3650 | """The match_hostname() function from Python 3.3.3, essential when using SSL."""
import re
__version__ = '3.4.0.2'
class CertificateError(ValueError):
pass
def _dnsname_match(dn, hostname, max_wildcards=1):
"""Matching according to RFC 6125, section 6.4.3
http://tools.ietf.org/html/rfc6125#section-6.4... | gpl-3.0 |
mancoast/CPythonPyc_test | fail/300_test_urllib2net.py | 2 | 9015 | #!/usr/bin/env python
import unittest
from test import support
from test.test_urllib2 import sanepathname2url
import os
import socket
import sys
import urllib.error
import urllib.request
def _retry_thrice(func, exc, *args, **kwargs):
for i in range(3):
try:
return func(*args, **kwargs)
... | gpl-3.0 |
kalahbrown/HueBigSQL | desktop/core/ext-py/Django-1.6.10/tests/requests/tests.py | 47 | 31824 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import time
import warnings
from datetime import datetime, timedelta
from io import BytesIO
from django.db import connection, connections, DEFAULT_DB_ALIAS
from django.core import signals
from django.core.exceptions import SuspiciousOperation
from djan... | apache-2.0 |
jjas0nn/solvem | tensorflow/lib/python2.7/site-packages/tensorflow/python/training/slot_creator.py | 14 | 4942 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | mit |
luofei98/qgis | python/plugins/processing/algs/saga/RasterCalculator.py | 1 | 3148 | # -*- coding: utf-8 -*-
"""
***************************************************************************
RasterCalculator.py
---------------------
Date : May 2014
Copyright : (C) 2014 by Victor Olaya
Email : volayaf at gmail dot com
*************************... | gpl-2.0 |
luofei98/qgis | python/ext-libs/jinja2/_compat.py | 638 | 4042 | # -*- coding: utf-8 -*-
"""
jinja2._compat
~~~~~~~~~~~~~~
Some py2/py3 compatibility support based on a stripped down
version of six so we don't have to depend on a specific version
of it.
:copyright: Copyright 2013 by the Jinja team, see AUTHORS.
:license: BSD, see LICENSE for details.
""... | gpl-2.0 |
bbaltz505/iotkit-libpy | iotkitclient/__init__.py | 1 | 2339 | # Copyright (c) 2015, Intel Corporation
#
# 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 following di... | bsd-3-clause |
Tudorvr/metagoofil | hachoir_metadata/filter.py | 85 | 1664 | from hachoir_metadata.timezone import UTC
from datetime import date, datetime
# Year in 1850..2030
MIN_YEAR = 1850
MAX_YEAR = 2030
class Filter:
def __init__(self, valid_types, min=None, max=None):
self.types = valid_types
self.min = min
self.max = max
def __call__(self, value):
... | gpl-2.0 |
Xiangua/symphony | vendor/doctrine/orm/docs/en/conf.py | 2448 | 6497 | # -*- coding: utf-8 -*-
#
# Doctrine 2 ORM documentation build configuration file, created by
# sphinx-quickstart on Fri Dec 3 18:10:24 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.
... | mit |
landscapeio/astroid | exceptions.py | 87 | 1814 | # 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 astroid.
#
# astroid 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
#... | gpl-2.0 |
rukku/inasafe | realtime/sftp_client.py | 5 | 4885 | """
InaSAFE Disaster risk assessment tool developed by AusAid and World Bank
- **Ftp Client for Retrieving ftp data.**
Contact : ole.moller.nielsen@gmail.com
.. 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
th... | gpl-3.0 |
Alexander-M-Waldman/local_currency_site | lib/python2.7/site-packages/guardian/testapp/tests/test_custompkmodel.py | 1 | 1179 | from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from guardian.compat import get_user_model
from guardian.shortcuts import assign_perm, remove_perm
class CustomPKModelTest(TestCase):
"""
Tests agains custom model with primary ... | gpl-3.0 |
glogiotatidis/mozillians-new | vendor-local/lib/python/dateutil/zoneinfo/__init__.py | 265 | 2575 | """
Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard python 2.3+
datetime module.
"""
from dateutil.tz import tzfile
from tarfile import TarFile
import os
__author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "PSF License"
__all__ = ["setca... | bsd-3-clause |
Pavel-Durov/pynetwork | pynetwork/wkhtmltoimage.py | 1 | 2154 | """ Python wrapper for wkhtmltopdf library, for rendering images from html files.
[ doc: https://wkhtmltopdf.org/docs.html ]
* Currently supporting only Linux distributions!
This script designed to be run on devices without display.
Uses xvfb (X virtual framebuffer) for that functionality.
... | mit |
wilvk/ansible | lib/ansible/modules/cloud/amazon/elb_application_lb.py | 27 | 41834 | #!/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 distributed... | gpl-3.0 |
ncdesouza/bookworm | env/lib/python2.7/site-packages/wtforms/widgets/html5.py | 153 | 2214 | """
Widgets for various HTML5 input types.
"""
from .core import Input
__all__ = (
'ColorInput', 'DateInput', 'DateTimeInput', 'DateTimeLocalInput',
'EmailInput', 'MonthInput', 'NumberInput', 'RangeInput', 'SearchInput',
'TelInput', 'TimeInput', 'URLInput', 'WeekInput',
)
class SearchInput(Input):
"... | gpl-3.0 |
sem-geologist/Qstitch | ui/Ui_finalize.py | 1 | 5411 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'finalize.ui'
#
# Created: Fri Apr 10 01:36:55 2015
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attri... | gpl-2.0 |
M3nin0/supreme-broccoli | Web/Flask/site_/lib/python3.5/site-packages/werkzeug/contrib/jsrouting.py | 513 | 8564 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.jsrouting
~~~~~~~~~~~~~~~~~~~~~~~~~~
Addon module that allows to create a JavaScript function from a map
that generates rules.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
... | apache-2.0 |
kidaa/aurora | build-support/jenkins/review_feedback.py | 5 | 8383 | #!/usr/bin/env python2.7
#
# 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 |
iMilind/grpc | src/python/src/grpc/_adapter/_links_test.py | 7 | 10736 | # 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 |
andresriancho/trunserver | trunserv/management/commands/trunserver.py | 2 | 3573 | from django.core.management.base import BaseCommand, CommandError
from django.contrib.staticfiles.handlers import StaticFilesHandler
from django.core.servers.basehttp import get_internal_wsgi_application
#from django.utils import autoreload
from trunserv import autoreload
from twisted.application import internet, serv... | mit |
openstack/cinder | cinder/tests/unit/volume/drivers/netapp/dataontap/performance/test_perf_cmode.py | 2 | 19560 | # Copyright (c) 2016 Clinton Knight
# 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 requir... | apache-2.0 |
Nepherhotep/django | tests/null_fk_ordering/models.py | 210 | 1605 | """
Regression tests for proper working of ForeignKey(null=True). Tests these bugs:
* #7512: including a nullable foreign key reference in Meta ordering has un
xpected results
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
... | bsd-3-clause |
nfletton/django-oscar | tests/unit/shipping/method_tests.py | 44 | 2514 | from decimal import Decimal as D
from django.test import TestCase
import mock
from oscar.apps.shipping import methods
from oscar.apps.basket.models import Basket
class TestFreeShipppingForEmptyBasket(TestCase):
def setUp(self):
self.method = methods.Free()
self.basket = Basket()
self.ch... | bsd-3-clause |
kayhayen/Nuitka | tests/benchmarks/constructs/OperationIntegerAdd.py | 1 | 1297 | # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python test originally created or extracted from other peoples work. The
# parts from me are licensed as below. It is at least Free Software where
# it's copied from other people. In these cases, that will normally be
# indicated.
#
# L... | apache-2.0 |
Saint-Joe/weewx | bin/weewx/drivers/ws1.py | 4 | 9124 | #!/usr/bin/env python
#
# Copyright 2014 Matthew Wall
# See the file LICENSE.txt for your rights.
"""Driver for ADS WS1 weather stations.
Thanks to Steve (sesykes71) for the testing that made this driver possible.
Thanks to Jay Nugent (WB8TKL) and KRK6 for weather-2.kr6k-V2.1
http://server1.nuge.com/~weather/
"""
... | gpl-3.0 |
codeworldprodigy/lab4 | lib/jinja2/jinja2/testsuite/__init__.py | 404 | 4641 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite
~~~~~~~~~~~~~~~~
All the unittests of Jinja2. These tests can be executed by
either running run-tests.py using multiple Python versions at
the same time.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
i... | apache-2.0 |
masschallenge/impact-api | web/impact/impact/urls.py | 1 | 5272 | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.apps import apps
from django.conf import settings
from django.conf.urls import (
include,
url,
)
from django.conf.urls.static import static
from django.contrib import admin
from django.views.decorators.csrf import csrf_exempt
from django.views.... | mit |
Edraak/edx-platform | common/lib/capa/capa/safe_exec/safe_exec.py | 179 | 4876 | """Capa's specialized use of codejail.safe_exec."""
from codejail.safe_exec import safe_exec as codejail_safe_exec
from codejail.safe_exec import not_safe_exec as codejail_not_safe_exec
from codejail.safe_exec import json_safe, SafeExecException
from . import lazymod
from dogapi import dog_stats_api
import hashlib
#... | agpl-3.0 |
sean-/ansible | lib/ansible/playbook/attribute.py | 39 | 1130 | # (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 |
developmentseed/slingshotSMS | pygsm/gsmcodecs/gsm0338.py | 65 | 19653 | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
""" Python Character Mapping Codec based on gsm0338 generated from './GSM0338.TXT' with gencodec.py.
With extra sauce to deal with the 'multibyte' extensions!
"""#"
import codecs
import re
### Codec APIs
#
# Shared funcs
#
def _encode(input,errors='strict'):
... | bsd-3-clause |
StefanRijnhart/server-tools | module_parent_dependencies/__init__.py | 3 | 1061 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Module - Parent Dependencies module for Odoo
# Copyright (C) 2014 GRAP (http://www.grap.coop)
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
#
# This program is free software: you can re... | agpl-3.0 |
2013Commons/hue | desktop/core/ext-py/Django-1.4.5/django/contrib/databrowse/datastructures.py | 86 | 9237 | """
These classes are light wrappers around Django's database API that provide
convenience functionality and permalink functions for the databrowse app.
"""
from django.db import models
from django.utils import formats
from django.utils.text import capfirst
from django.utils.encoding import smart_unicode, smart_str, i... | apache-2.0 |
hryang/flatbuffers | python/flatbuffers/table.py | 65 | 4153 | # Copyright 2014 Google 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 applicable law or a... | apache-2.0 |
dgarros/ansible | test/units/modules/network/eos/test_eos_config.py | 19 | 4969 | # (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | gpl-3.0 |
nathanial/lettuce | tests/integration/lib/Django-1.3/django/core/management/commands/startproject.py | 322 | 1680 | from django.core.management.base import copy_helper, CommandError, LabelCommand
from django.utils.importlib import import_module
import os
import re
from random import choice
class Command(LabelCommand):
help = "Creates a Django project directory structure for the given project name in the current directory."
... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.