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 |
|---|---|---|---|---|---|
fibbo/DIRAC | DataManagementSystem/scripts/dirac-dms-remove-catalog-replicas.py | 2 | 1490 | #!/usr/bin/env python
########################################################################
# $Header: $
########################################################################
__RCSID__ = "$Id$"
from DIRAC import exit as DIRACExit
from DIRAC.Core.Base import Script
Script.setUsageMessage( """
Remove th... | gpl-3.0 |
indiereign/shaka-player | build/checkversion.py | 3 | 2606 | #!/usr/bin/env python
#
# Copyright 2016 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 requir... | apache-2.0 |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.5.9/Python-3.5.9/Lib/test/test_fractions.py | 1 | 26461 | """Tests for Lib/fractions.py."""
from decimal import Decimal
from test.support import requires_IEEE_754
import math
import numbers
import operator
import fractions
import sys
import unittest
import warnings
from copy import copy, deepcopy
from pickle import dumps, loads
F = fractions.Fraction
gcd = fractions.gcd
cla... | apache-2.0 |
poornimakshirsagar/sos | sos/plugins/cobbler.py | 12 | 1483 | # 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 the hope that it will be useful,
# but... | gpl-2.0 |
coronary/RandomEpisode | depends/Lib/site-packages/requests/packages/urllib3/util/url.py | 375 | 5760 | from collections import namedtuple
from ..exceptions import LocationParseError
url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment']
class Url(namedtuple('Url', url_attrs)):
"""
Datastructure for representing an HTTP URL. Used as a return value for
:func:`parse_url`.
"""
s... | mit |
saquiba2/numpy2 | numpy/distutils/command/build_ext.py | 149 | 22493 | """ Modified version of build_ext that handles fortran source files.
"""
from __future__ import division, absolute_import, print_function
import os
import sys
from glob import glob
from distutils.dep_util import newer_group
from distutils.command.build_ext import build_ext as old_build_ext
from distutils.errors impo... | bsd-3-clause |
snphbaum/scikit-gpuppy | skgpuppy/MLE.py | 1 | 5756 | # Copyright (C) 2015 Philipp Baumgaertel
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE.txt file for details.
import numpy as np
from scipy.optimize import fmin
from scipy.misc import derivative
from scipy.stats import norm
from .Utiliti... | bsd-3-clause |
jusdng/odoo | openerp/addons/base/tests/test_acl.py | 338 | 6323 | import unittest2
from lxml import etree
import openerp
from openerp.tools.misc import mute_logger
from openerp.tests import common
# test group that demo user should not have
GROUP_TECHNICAL_FEATURES = 'base.group_no_one'
class TestACL(common.TransactionCase):
def setUp(self):
super(TestACL, self).setU... | agpl-3.0 |
lushfuture/Phys-Comp | five-test/node_modules/johnny-five/junk/firmata-latest/node_modules/serialport/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/xcodeproj_file.py | 42 | 116836 | # Copyright (c) 2009 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.
"""Xcode project file generator.
This module is both an Xcode project file generator and a documentation of the
Xcode project file format. Knowledge of the proje... | mit |
alexryndin/ambari | ambari-server/src/main/resources/stacks/ADH/1.0/services/HDFS/package/scripts/journalnode.py | 2 | 6746 | """
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 use this ... | apache-2.0 |
zackslash/scrapy | scrapy/shell.py | 44 | 6963 | """Scrapy Shell
See documentation in docs/topics/shell.rst
"""
from __future__ import print_function
import os
import signal
import warnings
from twisted.internet import reactor, threads, defer
from twisted.python import threadable
from w3lib.url import any_to_uri
from scrapy.crawler import Crawler
from scrapy.exc... | bsd-3-clause |
andante20/volatility | volatility/plugins/gui/vtypes/win2003.py | 58 | 2168 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the F... | gpl-2.0 |
OpenPymeMx/OCB | addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py | 90 | 10565 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | agpl-3.0 |
lupyuen/RaspberryPiImage | home/pi/GrovePi/Software/Python/others/temboo/Library/Amazon/CloudDrive/Children/AddChild.py | 5 | 5572 | # -*- coding: utf-8 -*-
###############################################################################
#
# AddChild
# Moves a specified folder into a parent folder.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | apache-2.0 |
jepler/linuxcnc-mirror | configs/sim/axis/orphans/pysubs/task.py | 5 | 1340 | # This is a component of LinuxCNC
# Copyright 2011, 2013, 2014 Dewey Garrett <dgarrett@panix.com>,
# Michael Haberler <git@mah.priv.at>
#
# 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 Foundati... | lgpl-2.1 |
TeemuAhola/sailelfcloud | src/qml/python/elfcloudclient.py | 1 | 9585 | '''
Created on Sep 17, 2016
@author: Teemu Ahola [teemuahola7@gmail.com]
'''
import os
import elfcloud
import worker
import binascii
import logger
APIKEY = 'swrqwb95d98ou8d'
VALULT_TYPES = [elfcloud.utils.VAULT_TYPE_DEFAULT, 'com.ahola.sailelfcloud']
DEFAULT_REQUEST_SIZE_BYTES = 256 * 1024 # Size of one request wh... | gpl-3.0 |
CopeX/odoo | addons/hw_scale/__openerp__.py | 220 | 1699 | # -*- 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 |
hrayr-artunyan/shuup | shuup/xtheme/migrations/0001_initial.py | 9 | 1682 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import enumfields.fields
import shuup.core.fields
import shuup.xtheme.models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name... | agpl-3.0 |
youprofit/servo | components/script/dom/bindings/codegen/Configuration.py | 4 | 14097 | # 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/.
from WebIDL import IDLInterface
class Configuration:
"""
Represents global configuration state based on IDL pa... | mpl-2.0 |
analyseuc3m/ANALYSE-v1 | openedx/core/djangoapps/credit/tests/test_partition.py | 76 | 7030 | # -*- coding: utf-8 -*-
"""
Tests for In-Course Reverification Access Control Partition scheme
"""
import ddt
import unittest
from django.conf import settings
from lms.djangoapps.verify_student.models import (
VerificationCheckpoint,
VerificationStatus,
SkippedReverification,
)
from openedx.core.djangoap... | agpl-3.0 |
tarballs-are-good/sympy | sympy/integrals/tests/test_rationaltools.py | 3 | 2614 | from sympy import symbols, S, I, atan, log, Poly
from sympy.integrals.rationaltools import ratint, \
ratint_ratpart, ratint_logpart, log_to_atan, log_to_real
from sympy.abc import a, x, t
half = S(1)/2
def test_ratint():
assert ratint(S(0), x) == 0
assert ratint(S(7), x) == 7*x
assert ratint(x, x) ... | bsd-3-clause |
leppa/home-assistant | tests/components/vacuum/common.py | 24 | 6031 | """Collection of helper methods.
All containing methods are legacy helpers that should not be used by new
components. Instead call the service directly.
"""
from homeassistant.components.vacuum import (
ATTR_FAN_SPEED,
ATTR_PARAMS,
DOMAIN,
SERVICE_CLEAN_SPOT,
SERVICE_LOCATE,
SERVICE_PAUSE,
... | apache-2.0 |
scanno/android_kernel_motorola_msm8992 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
aksh1/wagtail-cookiecutter-foundation | {{cookiecutter.repo_name}}/pages/migrations/0001_initial.py | 5 | 12936 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
import modelcluster.fields
import wagtail.wagtailcore.fields
import wagtail.wagtailcore.blocks
class Migration(migrations.Migration):
dependencies = [
('wagtailimages... | mit |
willdonetang/taisi360 | tools/parse/parse.py | 1 | 2303 | #!/bin/env
# -*- coding: utf-8 -*-
from langconv import *
from bs4 import BeautifulSoup
import re
import os
import json
#输入Unicode编辑,输出Unicode
def big2simple(line):
#转换繁体到简体
line = Converter('zh-hans').convert(line)
return line
def save_img_url(img_url,num):
img_url_file = open("img_url.txt","a")
line = num+"... | apache-2.0 |
pabloborrego93/edx-platform | lms/djangoapps/staticbook/views.py | 11 | 6395 | """
Views for serving static textbooks.
"""
from django.contrib.auth.decorators import login_required
from django.http import Http404
from edxmako.shortcuts import render_to_response
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from xmodule.annotator_token import retrieve_token
from courseware.acces... | agpl-3.0 |
losywee/rethinkdb | external/v8_3.30.33.16/testing/gmock/gtest/test/gtest_help_test.py | 2968 | 5856 | #!/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... | agpl-3.0 |
econchick/heroku-buildpack-python | vendor/pip-1.2.1/contrib/packager/template.py | 12 | 1308 | #! /usr/bin/env python
sources = """
@SOURCES@"""
import os
import sys
import base64
import zlib
import tempfile
import shutil
def unpack(sources):
temp_dir = tempfile.mkdtemp('-scratchdir', 'unpacker-')
for package, content in sources.items():
filepath = package.split(".")
dirpath = os.sep.... | mit |
nzavagli/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Mac/Modules/cf/cfscan.py | 34 | 5533 | # Scan an Apple header file, generating a Python file of generator calls.
import sys
from bgenlocations import TOOLBOXDIR, BGENDIR
sys.path.append(BGENDIR)
from scantools import Scanner_OSX
LONG = "CoreFoundation"
SHORT = "cf"
OBJECTS = ("CFTypeRef",
"CFArrayRef", "CFMutableArrayRef",
... | mit |
jmesteve/medical | openerp/addons/point_of_sale/wizard/pos_session_opening.py | 46 | 5175 |
from openerp import netsvc
from openerp.osv import osv, fields
from openerp.tools.translate import _
from openerp.addons.point_of_sale.point_of_sale import pos_session
class pos_session_opening(osv.osv_memory):
_name = 'pos.session.opening'
_columns = {
'pos_config_id' : fields.many2one('pos.config... | agpl-3.0 |
terbolous/CouchPotatoServer | libs/suds/transport/__init__.py | 209 | 3895 | # 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 |
nicememory/pie | pyglet/pyglet/extlibs/future/py2_3/future/backports/urllib/response.py | 82 | 3180 | """Response classes used by urllib.
The base class, addbase, defines a minimal file-like interface,
including read() and readline(). The typical response object is an
addinfourl instance, which defines an info() method that returns
headers and a geturl() method that returns the url.
"""
from __future__ import absolut... | apache-2.0 |
zaxliu/scipy | doc/source/tutorial/examples/normdiscr_plot2.py | 84 | 1642 | import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
npoints = 20 # number of integer support points of the distribution minus 1
npointsh = npoints / 2
npointsf = float(npoints)
nbound = 4 #bounds for the truncated normal
normbound = (1 + 1 / npointsf) * nbound #actual bounds of truncated normal
... | bsd-3-clause |
yqm/sl4a | python/src/Lib/encodings/unicode_internal.py | 827 | 1196 | """ Python 'unicode-internal' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is in... | apache-2.0 |
spr/album-sound-check | mutagen/musepack.py | 11 | 4118 | # A Musepack reader/tagger
#
# Copyright 2006 Lukas Lalinsky <lalinsky@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# $Id: musepack.py 4013 2007-04-23 09:18:22Z luks ... | gpl-2.0 |
barachka/odoo | addons/website/controllers/main.py | 8 | 18654 | # -*- coding: utf-8 -*-
import cStringIO
import datetime
from itertools import islice
import json
import logging
import re
from sys import maxint
import werkzeug.utils
import werkzeug.wrappers
from PIL import Image
import openerp
from openerp.addons.web import http
from openerp.http import request, Response
logger ... | agpl-3.0 |
aminert/scikit-learn | examples/applications/plot_model_complexity_influence.py | 323 | 6372 | """
==========================
Model Complexity Influence
==========================
Demonstrate how model complexity influences both prediction accuracy and
computational performance.
The dataset is the Boston Housing dataset (resp. 20 Newsgroups) for
regression (resp. classification).
For each class of models we m... | bsd-3-clause |
CS-SI/QGIS | python/plugins/processing/algs/gdal/aspect.py | 1 | 5659 | # -*- coding: utf-8 -*-
"""
***************************************************************************
aspect.py
---------------------
Date : October 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
******************... | gpl-2.0 |
LSS-USP/kiskadee | kiskadee/queue.py | 1 | 2457 | """Provide kiskadee queues and operations on them."""
import time
from multiprocessing import Queue
import kiskadee
analysis = Queue()
results = Queue()
packages = Queue()
class Queues():
"""Provide kiskadee queues objects."""
@staticmethod
def enqueue_analysis(package_to_analysis):
"""Put a ana... | agpl-3.0 |
crosswalk-project/blink-crosswalk-efl | Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py | 44 | 5791 | # Copyright (C) 2013 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 |
Didacti/elixir | tests/test_o2m.py | 1 | 7242 | """
test one to many relationships
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import six
from elixir import *
from sqlalchemy import and_
from sqlalchemy.ext.orderinglist import ordering_list
def setup():
... | mit |
LegoStormtroopr/mallard-questionnaire-registry | mallard_qr/models.py | 1 | 2839 | from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext as _
from model_utils import Choices
import aristotle_mdr as aristotle
"""
These models are based on the DDI3.2 and the SQBL XML formats.
"""
class AdministrationMode(aristotle.models.unmanagedObject... | gpl-2.0 |
Revanth47/addons-server | src/olympia/tags/tests/test_helpers.py | 4 | 1150 | from jingo import get_env
from mock import Mock
from pyquery import PyQuery as pq
from olympia import amo
from olympia.addons.models import Addon
def render(s, context=None):
"""Taken from jingo.tests.utils, previously jingo.tests.test_helpers."""
if context is None:
context = {}
t = get_env().fr... | bsd-3-clause |
Epirex/android_external_chromium_org | third_party/tlslite/tlslite/integration/SMTP_TLS.py | 87 | 4726 | """TLS Lite + smtplib."""
from smtplib import SMTP
from tlslite.TLSConnection import TLSConnection
from tlslite.integration.ClientHelper import ClientHelper
class SMTP_TLS(SMTP):
"""This class extends L{smtplib.SMTP} with TLS support."""
def starttls(self,
username=None, password=None, share... | bsd-3-clause |
vladzur/radiotray | data/plugins/MateMediaKeysPlugin.py | 1 | 2312 | ##########################################################################
# Copyright 2009 Carlos Ribeiro
#
# This file is part of Radio Tray
#
# Radio Tray 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, eit... | gpl-2.0 |
frodrigo/osmose-backend | analysers/analyser_merge_public_equipment_FR_rennes_toilets.py | 4 | 2991 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Adrien Pavie 2017 ##
## ... | gpl-3.0 |
ethanrowe/python-data-packager | setup.py | 1 | 1089 | from setuptools import setup
import os
readme = open(os.path.join(os.path.dirname(__file__), 'README'), 'r').read()
license = open(os.path.join(os.path.dirname(__file__), 'LICENSE'), 'r').read()
setup(
name = "data_packager",
version = "0.0.1",
author = "Ethan Rowe",
author_email = "ethan@the-rowes.co... | mit |
floresconlimon/qutebrowser | tests/unit/browser/network/test_schemehandler.py | 8 | 1174 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 Softwa... | gpl-3.0 |
joel-airspring/Diamond | src/collectors/gridengine/gridengine.py | 29 | 4886 | # coding=utf-8
"""
The GridEngineCollector parses qstat statistics from Sun Grid Engine,
Univa Grid Engine and Open Grid Scheduler.
#### Dependencies
* Grid Engine qstat
"""
import os
import re
import subprocess
import sys
import xml.dom.minidom
import diamond.collector
class GridEngineCollector(diamond.collec... | mit |
ljgabc/lfs | usr/lib/python2.7/pdb.py | 119 | 46016 | #! /usr/bin/env python
"""A Python debugger."""
# (See pdb.doc for documentation.)
import sys
import linecache
import cmd
import bdb
from repr import Repr
import os
import re
import pprint
import traceback
class Restart(Exception):
"""Causes a debugger to be restarted for the debugged python program."""
pa... | gpl-2.0 |
ClearCorp/server-tools | base_import_match/models/base_import.py | 2 | 10305 | # -*- coding: utf-8 -*-
# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# Copyright 2016 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api, fields, models
from openerp import SUPERUSER_ID # TODO remove in v10
class BaseI... | agpl-3.0 |
BTCfork/hardfork_prototype_1_mvf-bu | contrib/devtools/optimize-pngs.py | 126 | 3201 | #!/usr/bin/env python
'''
Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text).
#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text
'''
import os
impor... | mit |
wiltonlazary/arangodb | 3rdParty/V8/V8-5.0.71.39/build/gyp/test/variables/commands/gyptest-commands.py | 311 | 1208 | #!/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.
"""
Test variable expansion of '<!()' syntax commands.
"""
import os
import TestGyp
test = TestGyp.TestGyp(format='gypd')
expect = test.... | apache-2.0 |
nburn42/tensorflow | tensorflow/python/summary/writer/writer.py | 13 | 16422 | # 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 |
peterfpeterson/mantid | Framework/PythonInterface/test/python/mantid/geometry/CrystalStructureTest.py | 3 | 3758 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
# py... | gpl-3.0 |
marklee77/fail2ban | fail2ban/client/filterreader.py | 3 | 3047 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
# vi: set ft=python sts=4 ts=4 sw=4 noet :
# This file is part of Fail2Ban.
#
# Fail2Ban 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;... | gpl-2.0 |
patrickod/stem | stem/response/mapaddress.py | 3 | 1326 | # Copyright 2012-2017, Damian Johnson and The Tor Project
# See LICENSE for licensing information
import stem.response
import stem.socket
class MapAddressResponse(stem.response.ControlMessage):
"""
Reply for a MAPADDRESS query.
Doesn't raise an exception unless no addresses were mapped successfully.
:var di... | lgpl-3.0 |
jpaalasm/pyglet | contrib/scene2d/tests/scene2d/VIEW_SUBWINDOW.py | 29 | 1420 | #!/usr/bin/env python
'''Testing flat map allow_oob enforcement.
Press 0-9 to set the size of the view in the window (1=10%, 0=100%)
Press arrow keys to move view focal point (little ball) around map.
Press "o" to turn allow_oob on and off.
You should see no black border with allow_oob=False.
Press escape or close... | bsd-3-clause |
loop1024/pymo-global | android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_bisect.py | 41 | 13043 | import sys
import unittest
from test import test_support
from UserList import UserList
# We do a bit of trickery here to be able to test both the C implementation
# and the Python implementation of the module.
# Make it impossible to import the C implementation anymore.
sys.modules['_bisect'] = 0
# We must also handl... | mit |
40223151/2015cd_midterm | static/Brython3.1.1-20150328-091302/Lib/http/cookies.py | 735 | 20810 | #!/usr/bin/env python3
#
####
# Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu>
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software
# and its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in... | gpl-3.0 |
capoe/espressopp.soap | src/storage/DomainDecompositionNonBlocking.py | 2 | 2753 | # Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | gpl-3.0 |
pothosware/gnuradio | gr-vocoder/examples/g723_40_audio_loopback.py | 58 | 1477 | #!/usr/bin/env python
#
# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# ... | gpl-3.0 |
Lineberty/kubernetes | cluster/juju/charms/trusty/kubernetes/unit_tests/lib/test_registrator.py | 232 | 2215 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 |
aps-sids/ansible-modules-extras | system/svc.py | 83 | 9627 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Brian Coca <bcoca@ansible.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 Licen... | gpl-3.0 |
ArtsiomCh/tensorflow | tensorflow/contrib/data/python/kernel_tests/list_files_dataset_op_test.py | 51 | 5617 | # 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 |
RasPlex/plex-home-theatre | plex/Third-Party/gtest/scripts/upload.py | 2511 | 51024 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | gpl-2.0 |
MattDevo/edk2 | AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/macsupport.py | 6 | 7828 | """\
Augment the "bgen" package with definitions that are useful on the Apple Macintosh.
Intended usage is "from macsupport import *" -- this implies all bgen's goodies.
"""
# Import everything from bgen (for ourselves as well as for re-export)
from bgen import *
# Simple types
Boolean = Type("Boolean"... | bsd-2-clause |
BernhardDenner/libelektra | src/bindings/swig/python/tests/test_kdb.py | 2 | 1614 | import kdb, unittest
TEST_NS = "user/tests/swig_py3"
class Constants(unittest.TestCase):
def setUp(self):
pass
def test_kdbconfig_h(self):
self.assertIsInstance(kdb.DB_SYSTEM, str)
self.assertIsInstance(kdb.DB_USER, str)
self.assertIsInstance(kdb.DB_HOME, str)
self.assertIsInstance(kdb.DEBUG, int... | bsd-3-clause |
dlopes-samba/dlopes-maps-sambatech | django/conf/locale/pt_BR/formats.py | 231 | 1530 | # -*- 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 = r'j \de N \de Y'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = r'j \de N \de Y à\s... | bsd-3-clause |
iglpdc/nipype | nipype/interfaces/fsl/tests/test_auto_SUSAN.py | 12 | 1465 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ....testing import assert_equal
from ..preprocess import SUSAN
def test_SUSAN_inputs():
input_map = dict(args=dict(argstr='%s',
),
brightness_threshold=dict(argstr='%.10f',
mandatory=True,
position=2,
),
dimension=dict(argstr='%d',... | bsd-3-clause |
xodus7/tensorflow | tensorflow/contrib/distributions/python/ops/bijectors/inline.py | 32 | 6367 | # 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 |
Elandril/SickRage | lib/unidecode/x0b4.py | 253 | 4762 | data = (
'dwaen', # 0x00
'dwaenj', # 0x01
'dwaenh', # 0x02
'dwaed', # 0x03
'dwael', # 0x04
'dwaelg', # 0x05
'dwaelm', # 0x06
'dwaelb', # 0x07
'dwaels', # 0x08
'dwaelt', # 0x09
'dwaelp', # 0x0a
'dwaelh', # 0x0b
'dwaem', # 0x0c
'dwaeb', # 0x0d
'dwaebs', # 0x0e
'dwaes', # 0x... | gpl-3.0 |
lexxito/monitoring | ceilometer/image/glance.py | 1 | 4868 | # -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Julien Danjou <julien@danjou.info>
#
# 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:... | apache-2.0 |
Blake-R/pylijm | tests/test_list.py | 1 | 1069 | # -*- coding: utf8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from unittest2 import TestCase
from pylijm.list import List
class TestDict(TestCase):
@property
def fixture(self):
return List(int)
def test_init_good(self):
Fix = self.fixture
... | gpl-3.0 |
ENCODE-DCC/encoded | src/encoded/tests/test_audit_characterization.py | 1 | 2460 | import pytest
def test_audit_biosample_characterization_review_lane_not_required(
testapp,
biosample_characterization,
review,
):
testapp.patch_json(
biosample_characterization['@id'],
{
'review': review,
'characterization_method': 'immunoprecipitati... | mit |
gnmiller/craig-bot | craig-bot/lib/python3.6/site-packages/pip/_vendor/packaging/specifiers.py | 62 | 27778 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
import functools
import itertools
import re
from ._compat impo... | mit |
incaser/odoo-odoo | addons/account_budget/report/__init__.py | 444 | 1139 | # -*- 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 |
Nexenta/cinder | cinder/volume/drivers/coprhd/helpers/virtualpool.py | 7 | 2887 | # Copyright (c) 2016 EMC Corporation
# 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 |
sencha/chromium-spacewalk | third_party/pexpect/pexpect.py | 173 | 77354 | """Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be u... | bsd-3-clause |
kyle0311/oliot-llrp | ThirdParty/libxml2/python/tests/build.py | 87 | 1542 | #!/usr/bin/python -u
import libxml2
import sys
# Memory debug specific
libxml2.debugMemory(1)
doc = libxml2.newDoc("1.0")
comment = doc.newDocComment("This is a generated document")
doc.addChild(comment)
pi = libxml2.newPI("test", "PI content")
doc.addChild(pi)
root = doc.newChild(None, "doc", None)
ns = root.newNs("... | lgpl-2.1 |
harry-7/addons-server | src/olympia/devhub/feeds.py | 2 | 1711 | import uuid
from django import http
from django.contrib.syndication.views import Feed
from django.shortcuts import get_object_or_404
from django.utils.feedgenerator import Rss201rev2Feed as RSS
from django.utils.translation import ugettext
from olympia import amo
from olympia.activity.models import ActivityLog
from o... | bsd-3-clause |
blckshrk/Weboob | modules/parolesmania/test.py | 4 | 1700 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... | agpl-3.0 |
cwu2011/seaborn | doc/sphinxext/ipython_directive.py | 37 | 37557 | # -*- coding: utf-8 -*-
"""
Sphinx directive to support embedded IPython code.
This directive allows pasting of entire interactive IPython sessions, prompts
and all, and their code will actually get re-executed at doc build time, with
all prompts renumbered sequentially. It also allows you to input code as a pure
pyth... | bsd-3-clause |
prajjwal1/prajjwal1.github.io | markdown_generator/talks.py | 199 | 4000 |
# coding: utf-8
# # Talks markdown generator for academicpages
#
# Takes a TSV of talks with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_i... | mit |
mhnatiuk/phd_sociology_of_religion | scrapper/lib/python2.7/site-packages/twisted/mail/bounce.py | 26 | 2292 | # -*- test-case-name: twisted.mail.test.test_bounce -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Support for bounce message generation.
"""
import StringIO
import rfc822
import time
import os
from twisted.mail import smtp
BOUNCE_FORMAT = """\
From: postmaster@%(failedDomain)s
... | gpl-2.0 |
taohungyang/cloud-custodian | c7n/filters/missing.py | 1 | 2009 | # Copyright 2018 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 |
bjtrost/TCAG-WGS-CNV-workflow | convert_CNV_calls_to_common_format.py | 1 | 1095 | #!/usr/bin/env python
# Convert calls from Canvas, cn.MOPS, CNVnator, ERDS, Genome STRiP, or RDXplorer to a common format
# Usage example:
# convert_CNV_calls_to_common_format.py input_filename name_of_caller
# name_of_caller must be one of "Canvas", "cn.MOPS", "CNVnator", "ERDS", "Genome_STRiP" (note underscore), or ... | mit |
AnasGhrab/scikit-learn | doc/tutorial/text_analytics/skeletons/exercise_02_sentiment.py | 256 | 2406 | """Build a sentiment analysis / polarity model
Sentiment analysis can be casted as a binary text classification problem,
that is fitting a linear classifier on features extracted from the text
of the user messages so as to guess wether the opinion of the author is
positive or negative.
In this examples we will use a ... | bsd-3-clause |
kevint2u/audio-collector | server/node_modules/binaryjs/node_modules/binarypack/node_modules/buffercursor/node_modules/verror/node_modules/extsprintf/deps/javascriptlint/javascriptlint/htmlparse.py | 28 | 1348 | # vim: ts=4 sw=4 expandtab
import HTMLParser
import unittest
class _Parser(HTMLParser.HTMLParser):
def __init__(self):
HTMLParser.HTMLParser.__init__(self)
self._tags = []
def handle_starttag(self, tag, attributes):
if tag.lower() == 'script':
attr = dict(attributes)
... | mit |
pakpoomton/CellmodellerShadow | CellModeller/Integration/CrankNicIntegrator.py | 1 | 6405 | import numpy
import scipy.integrate.odepack
from scipy.sparse.linalg import LinearOperator
from scipy.ndimage.filters import convolve
from scipy.sparse.linalg import gmres
import pyopencl as cl
import pyopencl.array as cl_array
from pyopencl.array import vec
import math
class CrankNicIntegrator:
def __init__(self,... | bsd-3-clause |
ykim362/mxnet | example/ssd/config/config.py | 31 | 3112 | # 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 |
Just-D/chromium-1 | tools/telemetry/third_party/gsutilz/gslib/gcs_json_media.py | 13 | 21674 | # -*- coding: utf-8 -*-
# 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 require... | bsd-3-clause |
Jayflux/servo | tests/wpt/web-platform-tests/tools/html5lib/setup.py | 418 | 1694 | from distutils.core import setup
import os
import codecs
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Pyt... | mpl-2.0 |
jaywreddy/django | django/contrib/gis/gdal/base.py | 654 | 1179 | from ctypes import c_void_p
from django.contrib.gis.gdal.error import GDALException
from django.utils import six
class GDALBase(object):
"""
Base object for GDAL objects that has a pointer access property
that controls access to the underlying C pointer.
"""
# Initially the pointer is NULL.
_... | bsd-3-clause |
konstruktoid/ansible-upstream | lib/ansible/plugins/lookup/aws_ssm.py | 20 | 10325 | # (c) 2016, Bill Wang <ozbillwang(at)gmail.com>
# (c) 2017, Marat Bakeev <hawara(at)gmail.com>
# (c) 2018, Michael De La Rue <siblemitcom.mddlr(at)spamgourmet.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_im... | gpl-3.0 |
HiroIshikawa/21playground | voting/venv/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py | 436 | 5992 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from lxml import etree
from ..treebuilders.etree import tag_regexp
from . import _base
from .. import ihatexml
def ensure_str(s):
if s is None:
return None
elif isinstance(s, text_type):
... | mit |
xmission/d-note | venv/lib/python2.7/site-packages/werkzeug/contrib/securecookie.py | 254 | 12206 | # -*- coding: utf-8 -*-
r"""
werkzeug.contrib.securecookie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module implements a cookie that is not alterable from the client
because it adds a checksum the server checks for. You can use it as
session replacement if all you have is a user id or something to mark
... | agpl-3.0 |
ros2/demos | demo_nodes_py/setup.py | 1 | 1716 | from setuptools import find_packages
from setuptools import setup
package_name = 'demo_nodes_py'
setup(
name=package_name,
version='0.15.0',
packages=find_packages(exclude=['test']),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
(... | apache-2.0 |
nigeriacoin/p2pool | p2pool/web.py | 47 | 25848 | from __future__ import division
import errno
import json
import os
import sys
import time
import traceback
from twisted.internet import defer, reactor
from twisted.python import log
from twisted.web import resource, static
import p2pool
from bitcoin import data as bitcoin_data
from . import data as p2pool_data, p2p
... | gpl-3.0 |
Noviat/account-financial-reporting-V3-intrastat | account_financial_report_webkit/wizard/balance_common.py | 7 | 18311 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
#
# Author: Guewen Baconnier (Camptocamp)
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole resp... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.