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 |
|---|---|---|---|---|---|
Brocade-OpenSource/OpenStack-DNRM-Nova | nova/compute/api.py | 1 | 152761 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012-2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache Lic... | apache-2.0 |
JacerOmri/PokemonGo-Bot-Desktop | pywin/Lib/py_compile.py | 30 | 5936 | """Routine to "compile" a .py file to a .pyc (or .pyo) file.
This module has intimate knowledge of the format of .pyc files.
"""
import __builtin__
import imp
import marshal
import os
import sys
import traceback
MAGIC = imp.get_magic()
__all__ = ["compile", "main", "PyCompileError"]
class PyCompileError(Exception... | mit |
kuba/letsencrypt | letsencrypt/log.py | 23 | 2217 | """Logging utilities."""
import logging
import dialog
from letsencrypt.display import util as display_util
class DialogHandler(logging.Handler): # pylint: disable=too-few-public-methods
"""Logging handler using dialog info box.
:ivar int height: Height of the info box (without padding).
:ivar int widt... | apache-2.0 |
jjhelmus/scipy | scipy/linalg/setup.py | 52 | 5888 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
import os
from os.path import join
def configuration(parent_package='', top_path=None):
from distutils.sysconfig import get_python_inc
from numpy.distutils.system_info import get_info, NotFoundError, numpy_info
from nu... | bsd-3-clause |
cbeloni/pychronesapp | backend/venv/lib/python2.7/site-packages/pip/commands/install.py | 342 | 12694 | import os
import sys
import tempfile
import shutil
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.log import logger
from pip.locations import (src_prefix, virtualenv_no_global, distutils_scheme,
build_prefix)
from pip.basecommand import Command
from pip.in... | mit |
ProjectSWGCore/NGECore2 | scripts/mobiles/talus/sleemo_punk.py | 2 | 1520 | import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate... | lgpl-3.0 |
Sjors/bitcoin | test/functional/p2p_permissions.py | 21 | 7210 | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test p2p permission message.
Test that permissions are correctly calculated and applied
"""
from test... | mit |
jorsea/odoo-addons | warning_box/warning_box.py | 8 | 2109 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, fields, api, _
WARNIN... | agpl-3.0 |
ArcherSys/ArcherSys | Lib/lib2to3/tests/pytree_idempotency.py | 1 | 7469 | <<<<<<< HEAD
<<<<<<< HEAD
#!/usr/bin/env python3
# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Main program for testing the infrastructure."""
from __future__ import print_function
__author__ = "Guido van Rossum <guido@python.org>"
# Support imports (need to ... | mit |
deepmind/rlax | rlax/_src/policy_gradients.py | 1 | 10472 | # Copyright 2019 DeepMind Technologies Limited. 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 |
openstack/vitrage | vitrage/api/controllers/v1/alarm.py | 1 | 2404 | # Copyright 2016 - Nokia 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 law or agreed to in ... | apache-2.0 |
takeshineshiro/swift | test/unit/common/test_utils.py | 2 | 206318 | # Copyright (c) 2010-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 law or agree... | apache-2.0 |
ROMFactory/android_external_chromium_org | testing/xvfb.py | 43 | 3774 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Runs the test with xvfb on linux. Runs the test normally on other platforms.
For simplicity in gyp targets, this script just ru... | bsd-3-clause |
xueliu/OpenWRT-for-MINI2440 | scripts/flashing/jungo-image.py | 758 | 7069 | #!/usr/bin/env python
#
# Copyright 2008, 2009 (C) Jose Vasconcellos <jvasco@verizon.net>
#
# A script that can communicate with jungo-based routers
# (such as MI424-WR, USR8200 and WRV54G) to backup the installed
# firmware and replace the boot loader.
#
# Tested with Python 2.5 on Linux and Windows
#
"""Usage: %s [op... | gpl-2.0 |
aperigault/ansible | lib/ansible/modules/network/fortimanager/fmgr_device_group.py | 39 | 11026 | #!/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 |
zylon-internet/librenms | poller-wrapper.py | 10 | 6845 | #! /usr/bin/env python
"""
poller-wrapper A small tool which wraps around the poller and tries to
guide the polling process with a more modern approach with a
Queue and workers
Author: Job Snijders <job.snijders@atrato.com>
Date: Jan 2013
Usage: This program... | gpl-3.0 |
shahankhatch/aurora | src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py | 8 | 1538 | #
# 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
# distributed under ... | apache-2.0 |
simongoffin/website_version | addons/sale_mrp/__openerp__.py | 61 | 1935 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
2014cdbg17/2015cd_midterm2 | static/Brython3.1.0-20150301-090019/Lib/token.py | 743 | 3034 | """Token constants (from "token.h")."""
__all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF']
# This file is automatically generated; please don't muck it up!
#
# To update the symbols in this file, 'cd' to the top directory of
# the python source tree after building the interpreter and run:
#
# ./pyth... | gpl-3.0 |
muraliselva10/designate | designate/backend/agent.py | 5 | 6451 | # Copyright 2014 Rackspace Inc.
#
# Author: Tim Simmons <tim.simmons@rackspace.com>
#
# 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
#
# Unl... | apache-2.0 |
neerajvashistha/pa-dude | lib/python2.7/site-packages/sphinx/theming.py | 1 | 8278 | # -*- coding: utf-8 -*-
"""
sphinx.theming
~~~~~~~~~~~~~~
Theming support for HTML builders.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import shutil
import zipfile
import tempfile
from os import path
from six import str... | mit |
omni5cience/django-inlineformfield | .tox/py27/lib/python2.7/site-packages/django/conf/locale/en/formats.py | 394 | 1815 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'N j, Y'
TIME_FORMAT = 'P'
DATETIM... | mit |
darkryder/django | tests/utils_tests/test_inspect.py | 28 | 1155 | import unittest
from django.utils import inspect
class Person(object):
def no_arguments(self):
return None
def one_argument(self, something):
return something
def just_args(self, *args):
return args
def all_kinds(self, name, address='home', age=25, *args, **kwargs):
... | bsd-3-clause |
nishad89/newfies-dialer | newfies/apirest/calendar_setting_serializers.py | 4 | 4820 | # -*- coding: utf-8 -*-
#
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2014 Star2Bil... | mpl-2.0 |
SylvainA/os-event-catcher | openstack/common/rpc/common.py | 1 | 18537 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the ... | apache-2.0 |
guyskk/shadowsocks | shadowsocks/tcprelay.py | 922 | 28870 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# 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 b... | apache-2.0 |
arunchaganty/obviousli | third-party/stanza/stanza/util/resource.py | 3 | 1271 | __author__ = 'victor'
import os
import stanza
import requests
import logging
def get_from_url(url):
"""
:param url: url to download from
:return: return the content at the url
"""
return requests.get(url).content
def get_data_or_download(dir_name, file_name, url='', size='unknown'):
"""Retur... | apache-2.0 |
shtouff/django | tests/admin_views/tests.py | 8 | 298057 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import os
import re
import unittest
from django.contrib.admin import ModelAdmin
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
from django.contrib.admin.models import ADDITION, DELETION, LogEntry
from django.contrib.admin.o... | bsd-3-clause |
temasek/android_external_chromium_org_third_party_WebKit | Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py | 30 | 7905 | # Copyright (C) 2012 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 ... | bsd-3-clause |
rwl/PyCIM | CIM14/CDPSM/Balanced/IEC61970/Wires/EnergySource.py | 1 | 2528 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit |
davidharrigan/django | tests/model_inheritance_regress/tests.py | 150 | 18806 | """
Regression tests for Model inheritance behavior.
"""
from __future__ import unicode_literals
import datetime
from operator import attrgetter
from unittest import expectedFailure
from django import forms
from django.test import TestCase
from .models import (
ArticleWithAuthor, BachelorParty, BirthdayParty, Bu... | bsd-3-clause |
komatits/specfem3d | EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/block_mesh-anisotropic.py | 52 | 2195 | #!/usr/bin/env python
import cubit
import boundary_definition
import cubit2specfem3d
import os
import sys
# two volumes separating 134000x134000x60000 block horizontally
cubit.cmd('reset')
cubit.cmd('brick x 67000 y 134000 z 60000')
cubit.cmd('volume 1 move x 33500 y 67000 z -30000')
cubit.cmd('brick x 67000 y 13400... | gpl-2.0 |
trilan/lemon | lemon/forms.py | 1 | 2292 | from django import forms
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.forms.formsets import formset_factory
from django.forms.models import BaseInlineFormSet
from django.forms.models import ModelFormMetaclass, _get_foreign_key
from django.utils.trans... | bsd-3-clause |
yongshengwang/hue | build/env/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/connection.py | 49 | 50958 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# Copyright (c) 2010 Google
# Copyright (c) 2008 rPath, Inc.
# Copyright (c) 2009 The Echo Nest Corporation
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# Copyright (c) 2011, Nexenta Systems Inc.
# All... | apache-2.0 |
ctismer/pyfilesystem | fs/tests/test_rpcfs.py | 14 | 2644 |
import unittest
import sys
import os, os.path
import socket
import threading
import time
from fs.tests import FSTestCases, ThreadingTestCases
from fs.tempfs import TempFS
from fs.osfs import OSFS
from fs.memoryfs import MemoryFS
from fs.path import *
from fs.errors import *
from fs import rpcfs
from fs.expose.xmlrpc... | bsd-3-clause |
gmsanchez/nmpc_comparison | cstr_startup_colloc.py | 1 | 9778 | # Linear and nonlinear control of startup of a CSTR.
import mpctools as mpc
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import gridspec
import time
# Define some parameters and then the CSTR model.
Nx = 3
Nu = 2
Nd = 1
# Ny = Nx
Delta = .25
# eps = 1e-6 # Use this as a small number.
T0 = 350
c0... | gpl-3.0 |
jeremycline/pulp | server/test/unit/plugins/util/test_nectar_config.py | 7 | 2570 | import unittest
from nectar.config import DownloaderConfig
from pulp.common.plugins import importer_constants as constants
from pulp.plugins.util import nectar_config
class ConfigTranslationTests(unittest.TestCase):
def test_importer_config_to_nectar_config_complete(self):
# Setup
importer_conf... | gpl-2.0 |
xguse/bokeh | versioneer.py | 55 | 25745 | #! /usr/bin/python
"""versioneer.py
(like a rocketeer, but for versions)
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Version: 0.7+
This file helps distutils-based projects manage their version number by just
creating version-control tags.
For developers who work from a V... | bsd-3-clause |
dalmoz/sonoff-evil | arduino/espupload.py | 5 | 2683 | #!/usr/bin/python
#
# espupload by Theo Arends - 20170103
#
# Uploads binary file to OTA server
#
# Execute: espupload -i <Host_IP_address> -p <Host_port> -f <sketch.bin>
#
# Needs pycurl
# - pip install pycurl
import sys
import os
import optparse
import logging
import pycurl
HOST_ADDR = "domus1"
HOST_PORT = 80
HOS... | gpl-3.0 |
tghw/gotr-bowl | libs/paramiko/channel.py | 7 | 46791 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 (a... | bsd-3-clause |
eHealthAfrica/rapidpro | temba/temba_celery.py | 4 | 1227 | from __future__ import absolute_import, unicode_literals
import celery
import os
import raven
import sys
from django.conf import settings
from raven.contrib.celery import register_signal, register_logger_signal
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_... | agpl-3.0 |
CreativeMachinesLab/aracna | RobotPi/RobotQuadratot.py | 2 | 18657 | import os
from datetime import datetime
from time import sleep
from types import FunctionType
from copy import copy
from numpy import array
import dynamixel
from Motion import lInterp, scaleTime
'''
Much inspiration taken from http://code.google.com/p/pydynamixel/
'''
'''Min and max values for the ... | gpl-3.0 |
psi-rking/psi4 | psi4/driver/qcdb/vecutil.py | 7 | 11359 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 |
daavery/audacity | lib-src/lv2/sratom/waflib/Tools/ruby.py | 316 | 3925 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os
from waflib import Task,Options,Utils
from waflib.TaskGen import before_method,feature,after_method,Task,extension
from waflib.Configure import conf
@feature('rubyex... | gpl-2.0 |
ArthurGarnier/SickRage | lib/sqlalchemy/testing/entities.py | 77 | 2960 | # testing/entities.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
import sqlalchemy as sa
from sqlalchemy import exc as sa_exc
_repr_stack = set()
... | gpl-3.0 |
fzalkow/scikit-learn | examples/exercises/plot_cv_diabetes.py | 231 | 2527 | """
===============================================
Cross-validation on diabetes Dataset Exercise
===============================================
A tutorial exercise which uses cross-validation with linear models.
This exercise is used in the :ref:`cv_estimators_tut` part of the
:ref:`model_selection_tut` section of ... | bsd-3-clause |
HyperBaton/ansible | lib/ansible/modules/network/fortios/fortios_report_theme.py | 7 | 18166 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, 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 Lic... | gpl-3.0 |
alistairlow/tensorflow | tensorflow/python/util/future_api_test.py | 173 | 1177 | # 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 |
bmazin/ARCONS-pipeline | photonlist/test/testExpTimeWeight.py | 1 | 1192 | '''
Author: Julian van Eyken Date: Jul 9 2013
Test code for per-pixel effective exposure time weighting.
'''
import os.path
import photonlist.photlist as pl
import photonlist.RADecImage as rdi
from util.FileName import FileName
def getSimpleImage(fileName=FileName(run='PAL2012',date='20121211',tstamp='20121212... | gpl-2.0 |
dmonroy/chilero.pg | chilero/pg/test.py | 1 | 2550 | import asyncio
import json
import random
import string
import sys
from aiohttp import request
from chilero.web.test import WebTestCase
from .application import Application
TEST_DB_SUFFIX = 'test_{}{}{}'.format(
sys.version_info.major,
sys.version_info.minor,
sys.version_info.micro,
)
cl... | mit |
jc6036/LordsAndLadies | file_filler.py | 1 | 2432 | # Using this to simply fill up a text file with placeholder names
def fill_names(filename, num_of_names, variation, gender = "none"):
if gender == "male":
if variation == "first":
with open("./%s" % str(filename), "w") as opened_file:
for i in range(1, num_of_names + 1):
... | gpl-2.0 |
nschaetti/EchoTorch | echotorch/transforms/text/Character.py | 1 | 3378 | # -*- coding: utf-8 -*-
#
# Imports
import torch
from .Transformer import Transformer
# Transform text to character vectors
class Character(Transformer):
"""
Transform text to character vectors
"""
# Constructor
def __init__(self, uppercase=False, gram_to_ix=None, start_ix=0, fixed_length=-1):
... | gpl-3.0 |
mhils/mitmproxy | mitmproxy/flowfilter.py | 1 | 14034 | """
The following operators are understood:
~q Request
~s Response
Headers:
Patterns are matched against "name: value" strings. Field names are
all-lowercase.
~a Asset content-type in response. Asset content types are:
... | mit |
Bulochkin/tensorflow_pack | tensorflow/python/kernel_tests/dense_update_ops_no_tsan_test.py | 77 | 4949 | # 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... | apache-2.0 |
rwgdrummer/maskgen | hp_tool/hp/ErrorWindow.py | 1 | 2192 | from Tkinter import *
from tkSimpleDialog import Dialog
import json
import csv
import tkFileDialog
class ErrorWindow(Dialog):
"""
Provided a list of error messages, shows them in a simple pop-up window.
"""
def __init__(self, master, errors):
self.errors = errors
self.cancelPressed = Tr... | bsd-3-clause |
corvorepack/REPOULTRA | plugin.video.movie.ultra.7k/unwise.py | 2 | 22578 | # -*- coding: utf-8 -*-
#--------------------------------------------------------
# Movie Ultra 7K
# (http://forum.rojadirecta.es/
# (http://xbmcspain.com/foro
# Version 0.0.1 (26.10.2014)
#--------------------------------------------------------
# License: GPL (http://www.gnu.org/licenses/gpl-3.0.html)
#-------------... | gpl-2.0 |
cyphactor/lifecyclemanager | testenv/trac-0.10.4/trac/util/autoreload.py | 1 | 2888 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consists o... | gpl-3.0 |
bartsidee/bartsidee-boxee | sources/archive/gamejournaal/libs/web/elementsoup/elementtree/HTMLTreeBuilder.py | 21 | 7826 | #
# ElementTree
# $Id: HTMLTreeBuilder.py 3265 2007-09-06 20:42:00Z fredrik $
#
# a simple tree builder, for HTML input
#
# history:
# 2002-04-06 fl created
# 2002-04-07 fl ignore IMG and HR end tags
# 2002-04-07 fl added support for 1.5.2 and later
# 2003-04-13 fl added HTMLTreeBuilder alias
# 2004-12-02 fl ... | gpl-3.0 |
martinwicke/tensorflow | tensorflow/python/training/rmsprop.py | 30 | 6746 | # 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... | apache-2.0 |
devananda/ironic | ironic/tests/unit/drivers/modules/irmc/test_power.py | 1 | 8573 | # Copyright 2015 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 |
rversteegen/commandergenius | project/jni/python/src/Lib/ctypes/test/test_arrays.py | 51 | 4378 | import unittest
from ctypes import *
formats = "bBhHiIlLqQfd"
formats = c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, \
c_long, c_ulonglong, c_float, c_double, c_longdouble
class ArrayTestCase(unittest.TestCase):
def test_simple(self):
# create classes holding simple numeric types, and che... | lgpl-2.1 |
sdeepanshu02/microblog | flask/Lib/site-packages/sqlalchemy/dialects/postgresql/pypostgresql.py | 55 | 2655 | # postgresql/pypostgresql.py
# Copyright (C) 2005-2016 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+pypostgresql
:name: py-postgresql
:db... | bsd-3-clause |
KBNLresearch/iromlab | iromlab/testsru.py | 1 | 1831 | #! /usr/bin/env python
import io
import xml.etree.ElementTree as ETree
from .kbapi import sru
def main():
"""
Script for testing SRU interface outside Iromlab
(not used by main Iromlab application)
"""
catid = "184556155"
# Lookup catalog identifier
#sruSearchString = '"PPN=' + str(catid)... | apache-2.0 |
hakatashi/youtube-dl | youtube_dl/extractor/teamtreehouse.py | 16 | 5504 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
clean_html,
determine_ext,
ExtractorError,
float_or_none,
get_element_by_class,
get_element_by_id,
parse_duration,
remove_end,
urlencode_postdata,
urljoin,
... | unlicense |
dneg/cortex | python/IECoreGL/State.py | 12 | 2325 | ##########################################################################
#
# Copyright (c) 2012, Image Engine Design 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:
#
# * Redistribu... | bsd-3-clause |
openstack/solum-dashboard | solumdashboard/applications/tabs.py | 2 | 2639 | # Copyright (c) 2014 Rackspace Hosting.
#
# 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... | apache-2.0 |
wumpus/internetarchive | internetarchive/iacli/ia_list.py | 2 | 2340 | """List files in a given item.
usage:
ia list [-v] [--glob=<pattern>] [--location] [--source=<source>]
[--columns <column1,column2> | --all] <identifier>
ia metadata --help
options:
-h, --help
-v, --verbose Print column headers. [default: False]
-a, --all ... | agpl-3.0 |
fredsmith/will | will/mixins/storage.py | 11 | 2184 | import importlib
import logging
import dill as pickle
import functools
from will import settings
class StorageMixin(object):
def bootstrap_storage(self):
if not hasattr(self, "storage"):
if hasattr(self, "bot") and hasattr(self.bot, "storage"):
self.storage = self.bot.storage
... | mit |
Trass3r/PatienceMeld | meld/filters.py | 6 | 3177 | # Copyright (C) 2011-2013 Kai Willadsen <kai.willadsen@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or (at
# your option) any later version.
#
# ... | gpl-2.0 |
jemmyw/ansible | lib/ansible/module_utils/redhat.py | 324 | 10219 | # 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 license
# to the complete wo... | gpl-3.0 |
madsmpedersen/MMPE | datastructures/dual_key_dict.py | 1 | 3481 | '''
Created on 08/11/2013
@author: mmpe
'''
class DualKeyDict(object):
def __init__(self, unique_key_att, additional_key_att):
self._unique_key_att = unique_key_att
self._additional_key_att = additional_key_att
self._dict = {}
self._unique_keys = set()
def __getitem__(self, ke... | apache-2.0 |
JetBrains/intellij-community | plugins/hg4idea/testData/bin/hgext/convert/subversion.py | 90 | 50159 | # Subversion 1.4/1.5 Python API backend
#
# Copyright(C) 2007 Daniel Holth et al
import os, re, sys, tempfile, urllib, urllib2, xml.dom.minidom
import cPickle as pickle
from mercurial import strutil, scmutil, util, encoding
from mercurial.i18n import _
propertycache = util.propertycache
# Subversion stuff. Works be... | apache-2.0 |
zjuchenyuan/BioWeb | Lib/Bio/codonalign/codonalphabet.py | 1 | 2100 | # Copyright 2013 by Zheng Ruan (zruan1991@gmail.com).
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Code for Codon Alphabet.
CodonAlphabet class is inherited from Alphabet... | mit |
saeedghsh/SSRR13 | Andreas/slam6d/3rdparty/lastools/ArcGIS_toolbox/scripts/lasground.py | 2 | 6337 | #
# lasground.py
#
# (c) 2012, Martin Isenburg
# LASSO - rapid tools to catch reality
#
# uses lasground.exe to extracts the bare-earth by classifying LIDAR
# points into ground (class = 2) and non-ground points (class = 1).
#
# The LiDAR input can be in LAS/LAZ/BIN/TXT/SHP/... format.
# The LiDAR output can ... | bsd-3-clause |
CUCWD/edx-platform | openedx/features/coursetalk/migrations/0001_initial.py | 56 | 1292 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operati... | agpl-3.0 |
alan-wu/neon | src/opencmiss/neon/ui/zincwidgets/glyphchooserwidget.py | 3 | 4042 | '''
Copyright 2015 University of Auckland
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 agre... | apache-2.0 |
yatinkumbhare/openstack-nova | nova/scheduler/filters/exact_ram_filter.py | 56 | 1501 | # Copyright (c) 2014 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 |
mgracik/alda | alda/test/test_alda.py | 1 | 4673 | # Copyright (C) 2012 Red Hat, 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in... | gpl-2.0 |
pombredanne/scrapy | setup.py | 83 | 1605 | from os.path import dirname, join
from setuptools import setup, find_packages
with open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f:
version = f.read().decode('ascii').strip()
setup(
name='Scrapy',
version=version,
url='http://scrapy.org',
description='A high-level Web Crawling and Web... | bsd-3-clause |
flyballlabs/threatdetectionservice | api/venv/lib/python2.7/site-packages/pip/_vendor/retrying.py | 934 | 9972 | ## Copyright 2013-2014 Ray Holder
##
## 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 ... | apache-2.0 |
StackStorm/st2 | contrib/core/tests/test_action_sendmail.py | 3 | 10438 | # -*- coding: utf-8 -*-
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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... | apache-2.0 |
vrenaville/OCB | addons/l10n_fr/wizard/fr_report_bilan.py | 374 | 2337 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
#... | agpl-3.0 |
jhanley634/testing-tools | problem/pixel/volcanic_voxels.py | 1 | 6745 | #! /usr/bin/env python
# Copyright 2020 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, me... | mit |
tombstone/models | research/learning_unsupervised_learning/architectures/more_local_weight_update.py | 4 | 28714 | # Copyright 2018 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 |
sunpeak/MITMf | core/poisoners/ARP.py | 5 | 11012 | # Copyright (c) 2014-2016 Marcello Salvati
#
# 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.
#
# This program is distrib... | gpl-3.0 |
valiantljk/graph-partition | tests/test_convert_scipy.py | 31 | 9362 | from nose import SkipTest
from nose.tools import assert_raises, assert_true, assert_equal, raises
import networkx as nx
from networkx.testing import assert_graphs_equal
from networkx.generators.classic import barbell_graph,cycle_graph,path_graph
from networkx.testing.utils import assert_graphs_equal
class TestConver... | gpl-2.0 |
nordri/check_domains | lib/python2.7/site-packages/django/contrib/gis/maps/google/overlays.py | 102 | 11931 | from __future__ import unicode_literals
from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon
from django.utils.functional import total_ordering
from django.utils.safestring import mark_safe
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@pyth... | gpl-3.0 |
dims/glance | glance/tests/functional/test_ssl.py | 6 | 2821 | # Copyright 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 requ... | apache-2.0 |
gjhiggins/sprox | tests/test_fillerbase.py | 1 | 3808 | from sprox.fillerbase import FillerBase, TableFiller, EditFormFiller, AddFormFiller, FormFiller, ConfigBaseError
from sprox.test.base import setup_database, sorted_user_columns, SproxTest, User, Example
from nose.tools import raises, eq_
session = None
engine = None
connection = None
trans = None
def setup():
glo... | mit |
ychfan/tensorflow | tensorflow/contrib/gan/python/estimator/python/gan_estimator_impl.py | 6 | 10251 | # 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 |
AlexHill/django | django/db/models/fields/related.py | 1 | 77816 | from operator import attrgetter
from django.db import connection, connections, router, transaction
from django.db.backends import utils
from django.db.models import signals, Q
from django.db.models.fields import (AutoField, Field, IntegerField,
PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist)
fr... | bsd-3-clause |
tntraina/aff4 | scons-local-1.2.0/SCons/Tool/javah.py | 12 | 4559 | """SCons.Tool.javah
Tool-specific initialization for javah.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
#
# Permissio... | gpl-3.0 |
gef756/statsmodels | statsmodels/sandbox/formula.py | 27 | 22903 | """
Provides the basic classes needed to specify statistical models.
namespace : dictionary
mapping from names to data, used to associate data to a formula or term
"""
from statsmodels.compat.python import (iterkeys, lrange, callable, string_types,
itervalues, range)
import copy
... | bsd-3-clause |
Duraznos/root | build/unix/makepchinput.py | 3 | 16984 | #! /usr/bin/env python
#
# Extract the input needed to build a PCH for the main (enabled) ROOT modules.
# Script takes as argument the source directory path, the set of enabled
# modules and extra headers (from cling) to be included in the PCH.
#
# Copyright (c) 2014 Rene Brun and Fons Rademakers
# Author: Axel Naumann... | lgpl-2.1 |
malept/youtube-dl | youtube_dl/extractor/dvtv.py | 40 | 4467 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
js_to_json,
unescapeHTML,
ExtractorError,
)
class DVTVIE(InfoExtractor):
IE_NAME = 'dvtv'
IE_DESC = 'http://video.aktualne.cz/'
_VALID_URL = r'https?://video\.aktualne\.... | unlicense |
imruahmed/microblog | flask/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/datrie.py | 1301 | 1178 | from __future__ import absolute_import, division, unicode_literals
from datrie import Trie as DATrie
from pip._vendor.six import text_type
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(key, te... | bsd-3-clause |
jomivega/ASE4156 | tests/test_stocks.py | 1 | 3024 | """This module is for testing stocks"""
from unittest import mock
from django.test import TestCase
from stocks.models import Stock, DailyStockQuote
import pandas as pd
from yahoo_historical import Fetcher
from authentication.plaid_middleware import PlaidMiddleware
import pytest
class StocksViewTests(TestCase):
""... | apache-2.0 |
landism/pants | tests/python/pants_test/backend/jvm/tasks/test_classmap_integration.py | 9 | 2536 | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants_test.pant... | apache-2.0 |
erigones/esdc-ce | gui/migrations/0004_alerting_fields_initialization.py | 1 | 1297 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models, transaction
# noinspection PyUnusedLocal
def initialize_alerting_fields(apps, schema_editor):
former_user_profile = apps.get_model('gui', 'UserProfile')
if former_user_profile.objects.count() > 10000:
... | apache-2.0 |
HiroIshikawa/21playground | learning/venv/lib/python3.5/site-packages/pkg_resources/_vendor/packaging/version.py | 439 | 11949 | # Copyright 2014 Donald Stufft
#
# 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... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.