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 |
|---|---|---|---|---|---|
jeasoft/odoo | addons/account_anglo_saxon/purchase.py | 427 | 2043 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | agpl-3.0 |
mbaijal/incubator-mxnet | example/gluon/tree_lstm/scripts/preprocess-sick.py | 61 | 4765 | # 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 |
veselosky/siteqa | siteqa/__about__.py | 1 | 1122 | # vim: set fileencoding=utf-8 :
#
# Copyright 2017 Vince Veselosky and contributors
#
# 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.... | apache-2.0 |
ClearCorp/odootools | odootools/odootools/install/update.py | 1 | 2076 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
########################################################################
#
# Odoo Tools by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
skosukhin/spack | var/spack/repos/builtin/packages/r-tiff/package.py | 1 | 1775 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
blaiseli/p4-phylogenetics | p4/node.py | 1 | 9111 | import func
from var import var
import sys
import pf
class NodeBranchPart(object):
def __init__(self):
self.rMatrixNum = -1
self.gdasrvNum = -1
#self.bigP = None
class NodeBranch(object):
def __init__(self):
self.len = 0.1
# self.textDrawSymbol = '-' # See var.mode... | gpl-2.0 |
jm-begon/scikit-learn | examples/linear_model/plot_bayesian_ridge.py | 248 | 2588 | """
=========================
Bayesian Ridge Regression
=========================
Computes a Bayesian Ridge Regression on a synthetic dataset.
See :ref:`bayesian_ridge_regression` for more information on the regressor.
Compared to the OLS (ordinary least squares) estimator, the coefficient
weights are slightly shift... | bsd-3-clause |
madre/analytics_nvd3 | analytics/settings.py | 1 | 5979 |
# Django settings for analytics project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
APPLICATION_DIR = os.path.dirname(globals()['__file__'])
PROJECT_ROOT = os.path.abspath(
os.path.join(os.path.dirname(__file__), ".."),
)
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATAB... | apache-2.0 |
szeged/servo | tests/wpt/web-platform-tests/tools/third_party/py/bench/localpath.py | 215 | 1883 |
import py
import timeit
class Listdir:
numiter = 100000
numentries = 100
def setup(self):
tmpdir = py.path.local.make_numbered_dir(self.__class__.__name__)
for i in range(self.numentries):
tmpdir.join(str(i))
self.tmpdir = tmpdir
def run(self):
return self... | mpl-2.0 |
Carroll-Lab/scram | scram_modules/srnaseq.py | 1 | 5630 | '''
Small RNA storage class
Stores unique sequence and read count in an internal dictionary.
Automatic normalisation to RPMR once loaded from file
'''
from scram_modules.dna import DNA
import time
class SRNASeq(object):
def __init__(self):
self._internal_dict = {} # internal dictionary for class
... | mit |
nkhuyu/neon | neon/transforms/sum_squared.py | 9 | 3782 | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems 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.o... | apache-2.0 |
pedropena/iteexe | twisted/test/test_lockfile.py | 20 | 1423 | # Copyright (c) 2005 Divmod, Inc.
# See LICENSE for details.
from twisted.trial import unittest
from twisted.python import lockfile
class LockingTestCase(unittest.TestCase):
def testBasics(self):
lockf = self.mktemp()
lock = lockfile.FilesystemLock(lockf)
self.failUnless(lock.lock())
... | gpl-2.0 |
sergiohzlz/complejos | JdelC/jdelc.py | 1 | 2211 | #!/usr/bin/python
import numpy as np
import numpy.random as rnd
import sys
import matplotlib
matplotlib.use('TkAgg')
from matplotlib import pyplot as plt
from numpy import pi
poligono_p = lambda n,rot: [(1,i*2*np.pi/n+rot) for i in range(1,n+1)]
pol2cart = lambda ro,te: (ro*np.cos(te),ro*np.sin(te))
poligono_... | gpl-2.0 |
u3099811/BaxterTictacToe | src/baxter_examples/scripts/head_wobbler.py | 5 | 4073 | #!/usr/bin/env python
# Copyright (c) 2013-2015, Rethink Robotics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# ... | apache-2.0 |
zarnold/transitfeed | tests/testexamples.py | 5 | 4038 | #!/usr/bin/python2.5
# Test the examples to make sure they are not broken
from __future__ import absolute_import
import os
import re
import transitfeed
import unittest
import urllib
from tests import util
class WikiExample(util.TempDirTestCaseBase):
# Download example from wiki and run it
def runTest(self):
... | apache-2.0 |
AlvaroRQ/prototipo | ownLibraries/object_detection/object_detection/protos/box_predictor_pb2.py | 1 | 27896 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/box_predictor.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | gpl-3.0 |
thushcapone/YouNotify | pytz/gae.py | 74 | 3068 | """
A pytz version that runs smoothly on Google App Engine.
Based on http://appengine-cookbook.appspot.com/recipe/caching-pytz-helper/
To use, add pytz to your path normally, but import it from the gae module:
from pytz.gae import pytz
Applied patches:
- The zoneinfo dir is removed fr... | gpl-2.0 |
odyaka341/pyglet | tests/text/ELEMENT_CHANGE_STYLE.py | 25 | 4341 | #!/usr/bin/env python
'''Test that inline elements can have their style changed, even after text
has been deleted before them. [This triggers bug 538 if it has not yet been fixed.]
To run the test, delete the first line, one character at a time,
verifying that the element remains visible and no tracebacks are
printed... | bsd-3-clause |
mcking49/apache-flask | Python/Lib/idlelib/ZoomHeight.py | 130 | 1300 | # Sample extension: zoom a window to maximum height
import re
import sys
from idlelib import macosxSupport
class ZoomHeight:
menudefs = [
('windows', [
('_Zoom Height', '<<zoom-height>>'),
])
]
def __init__(self, editwin):
self.editwin = editwin
def zoom_height... | mit |
Hasimir/brython | www/src/Lib/test/test_crypt.py | 29 | 1265 | from test import support
import unittest
def setUpModule():
# this import will raise unittest.SkipTest if _crypt doesn't exist,
# so it has to be done in setUpModule for test discovery to work
global crypt
crypt = support.import_module('crypt')
class CryptTestCase(unittest.TestCase):
def test_cry... | bsd-3-clause |
hryamzik/ansible | test/units/modules/packaging/os/test_rhn_register.py | 44 | 9058 | import contextlib
import json
import os
from ansible.compat.tests.mock import mock_open
from ansible.module_utils import basic
from ansible.module_utils._text import to_native
import ansible.module_utils.six
from ansible.module_utils.six.moves import xmlrpc_client
from ansible.modules.packaging.os import rhn_register
... | gpl-3.0 |
ahu-odoo/odoo | addons/product_margin/__openerp__.py | 121 | 1927 | # -*- 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 |
peihe/incubator-beam | sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes.py | 8 | 3576 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 |
chromium/gyp | pylib/gyp/MSVSToolFile.py | 2736 | 1804 | # 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.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
class Writer(object):
"""Visual Studio XML tool file writer."""
... | bsd-3-clause |
unor/schemaorg | lib/rdflib/parser.py | 7 | 5970 | """
Parser plugin interface.
This module defines the parser plugin interface and contains other
related parser support code.
The module is mainly useful for those wanting to write a parser that
can plugin to rdflib. If you are wanting to invoke a parser you likely
want to do so through the Graph class parse method.
... | apache-2.0 |
binRick/thc.digital | anyproxy/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py | 2767 | 2174 | # Copyright (c) 2011 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.
"""Applies a fix to CR LF TAB handling in xml.dom.
Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
Working around this: http://bugs.python.or... | unlicense |
akretion/l10n-brazil | l10n_br_account_product/models/wizard_account_product_fiscal_classification.py | 1 | 4195 | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import models, api
class WizardAccountProductFiscalClassification(models.TransientModel):
_inherit = 'wizard.account.product.fiscal.classification'
@api.multi
d... | agpl-3.0 |
lxki/pjsip | tests/pjsua/mod_recvfrom.py | 57 | 2797 | # $Id: mod_recvfrom.py 3259 2010-08-09 07:31:34Z nanang $
import imp
import sys
import inc_sip as sip
import inc_const as const
import re
from inc_cfg import *
# Read configuration
cfg_file = imp.load_source("cfg_file", ARGS[1])
# Default server port (should we randomize?)
srv_port = 50070
def test_func(test):
pjsu... | gpl-2.0 |
mheap/ansible | lib/ansible/playbook/role/include.py | 109 | 2430 | # (c) 2014 Michael DeHaan, <michael@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 License, or
# (at your option) any later ve... | gpl-3.0 |
teeple/pns_server | work/install/Python-2.7.4/Tools/scripts/parseentities.py | 44 | 1719 | #!/usr/bin/env python
""" Utility for parsing HTML entity definitions available from:
http://www.w3.org/ as e.g.
http://www.w3.org/TR/REC-html40/HTMLlat1.ent
Input is read from stdin, output is written to stdout in form of a
Python snippet defining a dictionary "entitydefs" mapping literal
ent... | gpl-2.0 |
quodlibet/quodlibet | quodlibet/browsers/collection/main.py | 2 | 14366 | # Copyright 2010, 2012-2014 Christoph Reiter
# 2017 Uriel Zajaczkovski
# 2017-2018 Nick Boultbee
#
# 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 ver... | gpl-2.0 |
ustramooner/CouchPotato | app/lib/nma.py | 10 | 1419 | from app.config.cplog import CPLog
import cherrypy
from pynma import pynma
log = CPLog(__name__)
class NMA:
app_name = 'CouchPotato'
def __init__(self):
self.enabled = self.conf('enabled')
self.apikey = self.conf('apikey')
self.devkey = self.conf('devkey')
... | gpl-3.0 |
XristosMallios/cache | exareme-tools/madis/src/functions/vtable/output.py | 4 | 14438 |
"""
.. function:: output formatting_options 'filename' query
Writes in *filename* the output of *query* formatted according to *formatting* options.
:Returned table schema:
- *return_value* int
Boolean value 1 indicating success. On failure an exception is thrown.
Formatting options:
.. toadd html ... | mit |
meisamhe/GPLshared | Research_Projects_UTD/ProjectFinalDelivery/PrjImgTxtFeatureSelection.py | 2 | 1846 | __author__ = 'MeisamHe'
# feature selection in WEKA
# keep only n features
nfeatures = 10
import os
inputFile = "C:\\Users\\MeisamHe\\Desktop\\BackupToRestoreComputerApril15\\MachineLearning\\Project\\combinedARFF\\combinedARFF.arff"
outputFile = "C:\\Users\\MeisamHe\\Desktop\\BackupToRestoreComputerApril15\\MachineLe... | gpl-3.0 |
MSeifert04/astropy | astropy/nddata/decorators.py | 7 | 11802 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from copy import deepcopy
from inspect import signature
from itertools import islice
import warnings
from functools import wraps
from astropy.utils.exceptions import AstropyUserWarning
from .nddata import NDData
__all__ = ['support_nddata']
# All su... | bsd-3-clause |
mwmuni/LIGGGHTS_GUI | networkx/algorithms/flow/capacityscaling.py | 10 | 14431 | # -*- coding: utf-8 -*-
"""
Capacity scaling minimum cost flow algorithm.
"""
__author__ = """ysitu <ysitu@users.noreply.github.com>"""
# Copyright (C) 2014 ysitu <ysitu@users.noreply.github.com>
# All rights reserved.
# BSD license.
__all__ = ['capacity_scaling']
from itertools import chain
from math import log
imp... | gpl-3.0 |
antiface/mne-python | mne/io/egi/tests/test_egi.py | 10 | 2932 | # Authors: Denis A. Engemann <denis.engemann@gmail.com>
# simplified BSD-3 license
import os.path as op
import warnings
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_array_equal
from nose.tools import assert_true, assert_raises, assert_equal
from mne import find_events, pi... | bsd-3-clause |
Carmezim/tensorflow | tensorflow/contrib/tensor_forest/hybrid/python/layers/fully_connected.py | 106 | 2900 | # 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 |
aisipos/django | django/core/management/templates.py | 56 | 14053 | import cgi
import errno
import mimetypes
import os
import posixpath
import re
import shutil
import stat
import sys
import tempfile
from os import path
import django
from django.core.management.base import BaseCommand, CommandError
from django.core.management.utils import handle_extensions
from django.template import C... | bsd-3-clause |
jbenden/ansible | lib/ansible/modules/cloud/amazon/lightsail.py | 1 | 15824 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'status': ['preview'],
'sup... | gpl-3.0 |
genodeftest/exaile | xl/player/player.py | 2 | 18557 | # Copyright (C) 2008-2010 Adam Olsen
# Copyright (C) 2014-2015 Dustin Spicuzza
#
# 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, or (at your option)
# any later version.
#
# Th... | gpl-2.0 |
shujunqiao/cocos2d-python | test/test_lens_3d.py | 6 | 1547 | from __future__ import division, print_function, unicode_literals
# This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
testinfo = "s, t 1, s, t 5.1, s, q"
tags = "Lens3D, StopGrid"
import pyglet
from pyglet.g... | bsd-3-clause |
sivaprakashniet/push_pull | p2p/lib/python2.7/site-packages/pycparser/ply/lex.py | 98 | 42889 | # -----------------------------------------------------------------------------
# ply: lex.py
#
# Copyright (C) 2001-2015,
# David M. Beazley (Dabeaz LLC)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ar... | bsd-3-clause |
gef756/statsmodels | statsmodels/compat/scipy.py | 31 | 6660 | from __future__ import absolute_import
import numpy as np
def _bit_length_26(x):
if x == 0:
return 0
elif x == 1:
return 1
else:
return len(bin(x)) - 2
try:
from scipy.lib._version import NumpyVersion
except ImportError:
import re
from .python import string_types
... | bsd-3-clause |
tsdmgz/ansible | lib/ansible/vars/manager.py | 12 | 29340 | # (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 |
Shadowtags/ModularRiggingTool | nwModularRiggingTool/Modules/System/controlModule.py | 1 | 13045 | import pymel.core as pm
import System.utils as utils
reload(utils)
from functools import partial
class ControlModule:
def __init__(self, _moduleNamespace):
# Class variables
self.moduleContainer = None
self.blueprintNamespace = ''
self.moduleNamespace = ''
self.characterNamespace = ''
self.publishe... | mit |
kanagasabapathi/python-for-android | python3-alpha/extra_modules/gdata/spreadsheet/text_db.py | 47 | 21241 | #!/usr/bin/python
#
# Copyright Google 2007-2008, 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 ... | apache-2.0 |
tobegit3hub/deep_cnn | java_predict_client/src/main/proto/tensorflow/python/ops/logging_ops.py | 2 | 13593 | # 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 |
devopservices/ansible | plugins/inventory/vagrant.py | 72 | 3659 | #!/usr/bin/env python
"""
Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and
returns it under the host group 'vagrant'
Example Vagrant configuration using this script:
config.vm.provision :ansible do |ansible|
ansible.playbook = "./provision/your_playbook.yml"
... | gpl-3.0 |
msdx321/android_kernel_samsung_heroXqltechn | lazy-prebuilt/aarch64-linux-android-4.9/share/gdb/python/gdb/command/pretty_printers.py | 126 | 14474 | # Pretty-printer commands.
# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any la... | gpl-2.0 |
ssvsergeyev/ZenPacks.zenoss.AWS | src/boto/boto/vpc/subnet.py | 168 | 2101 | # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | gpl-2.0 |
gooddata/openstack-nova | nova/tests/unit/test_context.py | 1 | 22297 | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 |
qedsoftware/commcare-hq | corehq/apps/smsbillables/tests/generator.py | 1 | 10417 | import calendar
import random
import datetime
import string
import uuid
from collections import namedtuple
from decimal import Decimal
from dimagi.utils.data import generator as data_gen
from corehq.apps.accounting.models import Currency
from corehq.apps.sms.models import INCOMING, OUTGOING, SMS
from corehq.apps.sms.... | bsd-3-clause |
Southpaw-TACTIC/TACTIC | 3rd_party/python3/site-packages/dateutil/tz/tz.py | 48 | 48924 | # -*- coding: utf-8 -*-
"""
This module offers timezone implementations subclassing the abstract
:py:`datetime.tzinfo` type. There are classes to handle tzfile format files
(usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`, etc), TZ
environment string (in all known formats), given ranges (with help fr... | epl-1.0 |
waytai/odoo | addons/l10n_be/wizard/l10n_be_vat_intra.py | 332 | 14728 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# Adapted by Noviat to
# - make the 'mand_id' field optional
# - support Noviat tax code scheme
#... | agpl-3.0 |
andersonresende/django | django/contrib/gis/db/backends/oracle/schema.py | 608 | 4050 | from django.contrib.gis.db.models.fields import GeometryField
from django.db.backends.oracle.schema import DatabaseSchemaEditor
from django.db.backends.utils import truncate_name
class OracleGISSchemaEditor(DatabaseSchemaEditor):
sql_add_geometry_metadata = ("""
INSERT INTO USER_SDO_GEOM_METADATA
... | bsd-3-clause |
antepsis/anteplahmacun | sympy/assumptions/tests/test_matrices.py | 71 | 8294 | from sympy import Q, ask, Symbol
from sympy.matrices.expressions import (MatrixSymbol, Identity, ZeroMatrix,
Trace, MatrixSlice, Determinant)
from sympy.matrices.expressions.factorizations import LofLU
from sympy.utilities.pytest import XFAIL
X = MatrixSymbol('X', 2, 2)
Y = MatrixSymbol('Y', 2, 3)
Z = MatrixSy... | bsd-3-clause |
PF2-pasteur-fr/seqan | apps/samcat/tests/run_tests.py | 13 | 3112 | #!/usr/bin/env python
"""Execute the tests for the samcat program.
The golden test outputs are generated by the script generate_outputs.sh.
You have to give the root paths to the source and the binaries as arguments to
the program. These are the paths to the directory that contains the 'projects'
directory.
Usage: ... | bsd-3-clause |
openstack/blazar | blazar/tests/api/v1/oshosts/test_v1_0.py | 1 | 10633 | # Copyright (c) 2013 Bull.
#
# 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, sof... | apache-2.0 |
Teamxrtc/webrtc-streaming-node | third_party/webrtc/src/chromium/src/tools/win/sizeviewer/sizeviewer.py | 46 | 7024 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import base64
import codecs
import json
import os
import string
import subprocess
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def Ru... | mit |
ric2b/Vivaldi-browser | chromium/tools/site_compare/commands/maskmaker.py | 10 | 10548 | # Copyright (c) 2011 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.
"""Component for automatically creating masks of changing areas of a website.
Works by repeated invokation of a browser and scraping of the resulting pa... | bsd-3-clause |
julian-seward1/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/example/benchmark_helper_wsh.py | 451 | 3234 | # Copyright 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 f... | mpl-2.0 |
kastnerkyle/pylearn2 | pylearn2/distributions/mnd.py | 49 | 4113 | """A Multivariate Normal Distribution."""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
import warnings
try:
from scipy.linalg import choles... | bsd-3-clause |
FinalHashLLC/namecore | qa/rpc-tests/rest.py | 3 | 6817 | #!/usr/bin/env python2
# Copyright (c) 2014 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 REST interface
#
from test_framework import BitcoinTestFramework
from util import *
import auxpow
i... | mit |
maxive/erp | addons/purchase/tests/test_average_price.py | 1 | 6253 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from .common import TestPurchase
class TestAveragePrice(TestPurchase):
def test_00_average_price(self):
""" Testcase for average price computation"""
self._load('account', 'test', 'ac... | agpl-3.0 |
gitromand/phantomjs | src/breakpad/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-all.py | 399 | 1269 | #!/usr/bin/env python
# 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.
"""
Verifies building a target and a subsidiary dependent target from a
.gyp file in a subdirectory, without specifying an explicit output b... | bsd-3-clause |
mr-karan/coala | tests/settings/SectionTest.py | 16 | 7503 | import unittest
import os
from coalib.misc import Constants
from coalib.settings.Section import Section, Setting, append_to_sections
from coalib.settings.ConfigurationGathering import get_config_directory
from coalib.parsing.Globbing import glob_escape
class SectionTest(unittest.TestCase):
def test_construction... | agpl-3.0 |
shakamunyi/tensorflow | tensorflow/python/kernel_tests/linalg/linear_operator_util_test.py | 25 | 9406 | # 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 |
Lh4cKg/sl4a | python-build/python-libs/gdata/samples/blogger/app/blogapp.py | 128 | 4959 | # Copyright (C) 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 |
NewpTone/stacklab-nova | debian/tmp/usr/lib/python2.7/dist-packages/nova/tests/integrated/test_xml.py | 11 | 1775 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Justin Santa Barbara
# 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.apach... | apache-2.0 |
stacywsmith/ansible | test/runner/lib/metadata.py | 26 | 2260 | """Test metadata for passing data to delegated tests."""
from __future__ import absolute_import, print_function
import json
from lib.util import (
display,
)
from lib.diff import (
parse_diff,
FileDiff,
)
class Metadata(object):
"""Metadata object for passing data to delegated tests."""
def __i... | gpl-3.0 |
thanos/mykonosbiennale.org | pages/views-1.py | 2 | 2461 | import os
from django.shortcuts import render
from django.http import Http404
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
from django.views.generic import View
from bakery.views import BuildableDetailView, BuildableRedirectView
import models
def page(request, slug):
... | apache-2.0 |
lvh/maxims | maxims/test/test_creation.py | 1 | 2711 | from axiom import attributes, errors, item, store
from datetime import timedelta
from epsilon import extime
from twisted.trial import unittest
from maxims import creation
class SimpleItem(item.Item):
activations = attributes.integer(default=0)
def activate(self):
self.activations += 1
def _get... | isc |
mahendra-r/edx-platform | cms/djangoapps/contentstore/migrations/0002_auto__del_field_videouploadconfig_status_whitelist.py | 108 | 4442 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'VideoUploadConfig.status_whitelist'
db.delete_column('contentstore_videouploadconfig', 'st... | agpl-3.0 |
vslavik/poedit | deps/boost/tools/build/src/tools/unix.py | 15 | 5053 | # Copyright (c) 2004 Vladimir Prus.
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)
""" This file implements linking semantics common to all unixes. On unix, static
libraries must be... | mit |
gustavo-guimaraes/siga | backend/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py | 2994 | 1681 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit |
WhileRomeBurns/VEX_Syntax | src/vcc_utils.py | 1 | 4987 | import os
import sys
import re
import subprocess
import json
VCC_PATH = 'C:/Program Files/Side Effects Software/Houdini 16.0.600/bin/vcc.exe'
SYN_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')
COMP_PATH = os.path.join(SYN_PATH, 'VEX.sublime-completions')
FUNC_PATH = os.path.join(os.path.join(S... | mit |
bilgili/Voreen | modules/python/ext/python27/modules/sgmllib.py | 306 | 17884 | """A parser for SGML, using the derived class as a static DTD."""
# XXX This only supports those SGML features used by HTML.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are ... | gpl-2.0 |
thedep2/CouchPotatoServer | couchpotato/core/notifications/plex/__init__.py | 32 | 1177 | from .main import Plex
def autoload():
return Plex()
config = [{
'name': 'plex',
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'plex',
'options': [
{
'name': 'enabled',
... | gpl-3.0 |
ErykB2000/home-assistant | tests/test_component_light.py | 4 | 8711 | """
tests.test_component_switch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests switch component.
"""
# pylint: disable=too-many-public-methods,protected-access
import unittest
import os
import homeassistant.loader as loader
import homeassistant.util.color as color_util
from homeassistant.const import (
ATTR_ENTITY_ID, STATE... | mit |
kailIII/geraldo | site/newsite/site-geraldo/django/contrib/auth/__init__.py | 16 | 3127 | import datetime
from django.core.exceptions import ImproperlyConfigured
SESSION_KEY = '_auth_user_id'
BACKEND_SESSION_KEY = '_auth_user_backend'
REDIRECT_FIELD_NAME = 'next'
def load_backend(path):
i = path.rfind('.')
module, attr = path[:i], path[i+1:]
try:
mod = __import__(module, {}, {}, [attr]... | lgpl-3.0 |
evolutional/flatbuffers | tests/MyGame/Example/Test.py | 3 | 1387 | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: Example
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Test(object):
__slots__ = ['_tab']
# Test
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
... | apache-2.0 |
pombreda/pysal | pysal/contrib/weights_viewer/weights_viewer.py | 20 | 6506 | import wx
import pysal
from transforms import WorldToViewTransform
__author__ = "Charles R Schmidt <schmidtc@gmail.com>"
POINT_RADIUS = 5
BORDER_COLOR = wx.Colour(0,0,0,255)
SELECTION_COLOR = wx.Colour(255,128,0,255)
NEIGHBORS_COLOR = wx.Colour(128,255,0,255)
BACKGROUND_COLOR = wx.Colour(0,0,0,0)
class WeightsMapFra... | bsd-3-clause |
michaeljohnbennett/zipline | tests/modelling/test_numerical_expression.py | 15 | 13165 | from operator import (
and_,
ge,
gt,
le,
lt,
methodcaller,
ne,
or_,
)
from unittest import TestCase
import numpy
from numpy import (
arange,
eye,
full,
isnan,
zeros,
)
from pandas import (
DataFrame,
date_range,
Int64Index,
)
from zipline.modelling.expre... | apache-2.0 |
RuudBurger/CouchPotatoV1 | app/lib/provider/yarr/sources/newzbin.py | 8 | 5880 | from app.config.cplog import CPLog
from app.lib.provider.yarr.base import nzbBase
from dateutil.parser import parse
from urllib import urlencode
from urllib2 import URLError
import time
import traceback
import urllib
import urllib2
log = CPLog(__name__)
class newzbin(nzbBase):
"""Api for newzbin"""
name = 'N... | gpl-3.0 |
wscullin/spack | var/spack/repos/builtin/packages/ninja/package.py | 2 | 2564 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
yousrabk/mne-python | mne/externals/six.py | 40 | 20587 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2013 Benjamin Peterson
#
# 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 with... | bsd-3-clause |
neoscoin/neos-core | src/ledger/lib/python2.7/site-packages/pip/_internal/commands/freeze.py | 5 | 3320 | from __future__ import absolute_import
import sys
from pip._internal import index
from pip._internal.basecommand import Command
from pip._internal.cache import WheelCache
from pip._internal.compat import stdlib_pkgs
from pip._internal.operations.freeze import freeze
DEV_PKGS = {'pip', 'setuptools', 'distri... | mit |
fangxingli/hue | desktop/core/ext-py/Django-1.6.10/django/contrib/auth/tests/test_forms.py | 104 | 16206 | from __future__ import unicode_literals
import os
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm,
ReadOnlyPasswordHash... | apache-2.0 |
rsmuc/health_monitoring_plugins | test/testagent/snmp_fd.py | 1 | 1194 | import ctypes
import netsnmpapi
class fd_set(ctypes.Structure):
_fields_ = [('fds_bits', ctypes.c_long * 32)]
class Timeval(ctypes.Structure):
_fields_ = [("tv_sec", ctypes.c_long), ("tv_usec", ctypes.c_long)]
def FD_SET(fd, fd_set):
"""Set fd in fd_set, where fd can may be in range of 0..FD_SE... | gpl-2.0 |
trujunzhang/djzhang-targets | cwfuqs/cwfuqs/settings.py | 1 | 2988 | # -*- coding: utf-8 -*-
# Scrapy settings for cwfuqs project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/latest/... | mit |
thurt/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_xmllib.py | 90 | 1361 | '''Test module to thest the xmllib module.
Sjoerd Mullender
'''
testdoc = """\
<?xml version="1.0" encoding="UTF-8" standalone='yes' ?>
<!-- comments aren't allowed before the <?xml?> tag,
but they are allowed before the <!DOCTYPE> tag -->
<?processing instructions are allowed in the same places as comments ?>... | apache-2.0 |
llhe/tensorflow | tensorflow/contrib/opt/python/training/lazy_adam_optimizer.py | 86 | 3881 | # 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 |
lholland421/LiamPlayground | collectd-rabbitmq/test_rabbitmq.py | 1 | 1563 | #!/usr/bin/env python
"""
Unit test for the RabbitMQ collectd plugin. Meant to be run with pytest.
"""
# Copyright (C) 2015 SignalFx, Inc.
import collections
import mock
import sys
import sample_responses
class MockCollectd(mock.MagicMock):
"""
Mocks the functions and objects provided by the collectd module... | mit |
tbinjiayou/Odoo | openerp/modules/registry.py | 11 | 18542 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 |
youprofit/servo | tests/wpt/web-platform-tests/mixed-content/generic/tools/generate.py | 96 | 6567 | #!/usr/bin/env python
import os, sys, json
from common_paths import *
import spec_validator
import argparse
def expand_pattern(expansion_pattern, test_expansion_schema):
expansion = {}
for artifact_key in expansion_pattern:
artifact_value = expansion_pattern[artifact_key]
if artifact_value ==... | mpl-2.0 |
firerszd/kbengine | kbe/res/scripts/common/Lib/ctypes/macholib/dylib.py | 320 | 1828 | """
Generic dylib path manipulation
"""
import re
__all__ = ['dylib_info']
DYLIB_RE = re.compile(r"""(?x)
(?P<location>^.*)(?:^|/)
(?P<name>
(?P<shortname>\w+?)
(?:\.(?P<version>[^._]+))?
(?:_(?P<suffix>[^._]+))?
\.dylib$
)
""")
def dylib_info(filename):
"""
A dylib name can take one of the ... | lgpl-3.0 |
donce/django-cms | cms/utils/page.py | 17 | 2960 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.db.models import Q
import re
APPEND_TO_SLUG = "-copy"
COPY_SLUG_REGEX = re.compile(r'^.*-copy(?:-(\d+)*)?$')
def is_valid_page_slug(page, parent, lang, slug, site, path=None):
"""Validates given slug depending on settings.
"""
from cms.... | bsd-3-clause |
hazrpg/calibre | src/calibre/gui2/tweak_book/editor/__init__.py | 14 | 2193 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
from PyQt5.Qt import QTextCharFormat
from calibre.ebooks.oeb.base import OE... | gpl-3.0 |
log2timeline/dfvfs | tests/file_io/cpio_file_io.py | 2 | 6471 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the CPIO extracted file-like object."""
import unittest
from dfvfs.file_io import cpio_file_io
from dfvfs.lib import definitions
from dfvfs.path import factory as path_spec_factory
from dfvfs.resolver import context
from tests.file_io import test_lib
class... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.