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 |
|---|---|---|---|---|---|
saurabh6790/medsynaptic-app | setup/doctype/naming_series/naming_series.py | 28 | 5980 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr
from webnotes import msgprint
import webnotes.model.doctype
class DocType:
def __init__(self, d, ... | agpl-3.0 |
mccheung/kbengine | kbe/src/lib/python/Lib/encodings/iso8859_5.py | 272 | 13015 | """ Python Character Mapping Codec iso8859_5 generated from 'MAPPINGS/ISO8859/8859-5.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='... | lgpl-3.0 |
simonwydooghe/ansible | lib/ansible/module_utils/network/cnos/cnos_devicerules.py | 69 | 100502 | # 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 |
gibiansky/tensorflow | tensorflow/python/training/saver.py | 12 | 67021 | # 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 |
alanjw/GreenOpenERP-Win-X86 | python/Lib/bsddb/test/test_sequence.py | 3 | 5589 | import unittest
import os
from test_all import db, test_support, get_new_environment_path, get_new_database_path
class DBSequenceTest(unittest.TestCase):
import sys
if sys.version_info < (2, 4) :
def assertTrue(self, expr, msg=None):
self.failUnless(expr,msg=msg)
def setU... | agpl-3.0 |
roscoeZA/GeoGigSync | src/pydev/third_party/pep8/lib2to3/lib2to3/pgen2/literals.py | 399 | 1614 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Safely evaluate Python string literals without using eval()."""
import re
simple_escapes = {"a": "\a",
"b": "\b",
"f": "\f",
"n": "\n",
... | cc0-1.0 |
ioreshnikov/wells | wells/time_dependent.py | 1 | 1615 | import scipy as s
import scipy.fftpack as fft
import scipy.integrate
import sys
def integrate(t, x, input, potential, delta, pump, loss, absorber):
nt = len(t)
nx = len(x)
dx = x[1] - x[0]
k = 2*s.pi * fft.fftfreq(nx, dx)
d = - delta - 1/2 * k**2
spectrum = fft.fft(input)
spectrum_ = sp... | mit |
pplatek/odoo | addons/l10n_in_hr_payroll/wizard/__init__.py | 430 | 1110 | # -*- 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 |
guangxingli/python-neo | neo/io/rawbinarysignalio.py | 7 | 7213 | # -*- coding: utf-8 -*-
"""
Class for reading/writing data in a raw binary interleaved compact file.
Sampling rate, units, number of channel and dtype must be externally known.
This generic format is quite widely used in old acquisition systems and is quite universal
for sharing data.
Supported : Read/Write
Author: s... | bsd-3-clause |
Akasurde/rdopkg | rdopkg/guess.py | 3 | 6560 | import os
import re
import exception
from utils.cmd import run, git
from utils import specfile
from rdopkg.actionmods import rdoinfo
from rdopkg.conf import cfg
def package(default=exception.CantGuess):
pkg = os.path.basename(os.getcwd())
if not pkg:
if default is exception.CantGuess:
rai... | apache-2.0 |
HenriqueLR/payments | app/main/decorators.py | 1 | 1514 | #encoding: utf-8
from django.core.exceptions import PermissionDenied
from django.contrib import messages
from django.shortcuts import redirect
from django.contrib.auth import get_user_model
from wallet.models import Debit, Deposit, Note
from main.utils import get_list_permissions
User = get_user_model()
def ajax_r... | mit |
jmatthed/avatar-samples | qemu_uboot/test_system.py | 1 | 4490 | from avatar.system import System
import logging
from avatar.emulators.s2e import init_s2e_emulator
import threading
import subprocess
from avatar.targets.gdbserver_target import init_gdbserver_target
import os
import time
log = logging.getLogger(__name__)
configuration = {
"output_directory": "/tmp/1",
"con... | apache-2.0 |
Ted1993/Flasky | venv/lib/python2.7/site-packages/jinja2/bccache.py | 346 | 12793 | # -*- coding: utf-8 -*-
"""
jinja2.bccache
~~~~~~~~~~~~~~
This module implements the bytecode cache system Jinja is optionally
using. This is useful if you have very complex template situations and
the compiliation of all those templates slow down your application too
much.
Situations whe... | mit |
maxim-borisyak/craynn | craynn/layers/conv_ops.py | 1 | 2783 | from lasagne import *
__all__ = [
'conv', 'conv1x1',
'deconv', 'deconv1x1',
'upscale',
'max_pool', 'mean_pool', 'floating_maxpool', 'floating_meanpool',
'global_pool',
'upconv', 'downconv'
]
get_conv_nonlinearity = lambda f=None: nonlinearities.LeakyRectify(0.05) if f is None else f
get_companion_nonline... | mit |
takeicoin/takeicoin | share/qt/extract_strings_qt.py | 2945 | 1844 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
OUT_CPP="src/qt/bitcoinstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' format produced by x... | mit |
vindeka/gateswift | gateswift/middleware.py | 1 | 5131 | # Copyright (c) 2013 Vindeka, 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 writ... | apache-2.0 |
GustavoRD78/78Kernel-5.1.1-23.4.A.0.546 | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
t0mk/python-stdnum | stdnum/gb/vat.py | 3 | 4336 | # vat.py - functions for handling United Kingdom VAT numbers
#
# Copyright (C) 2012, 2013 Arthur de Jong
#
# This library 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 Lice... | lgpl-2.1 |
ListFranz/picamera | tests/test_mock.py | 2 | 4194 | # vim: set et sw=4 sts=4 fileencoding=utf-8:
#
# Python camera library for the Rasperry-Pi camera module
# Copyright (c) 2013-2015 Dave Jones <dave@waveform.org.uk>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# ... | bsd-3-clause |
EdTsft/swilite | swilite/prolog.py | 1 | 50967 | """An object-oriented interface to Prolog."""
from collections import namedtuple
from ctypes import (
POINTER,
byref,
c_char,
c_double,
c_int,
c_int64,
c_size_t,
c_void_p,
)
from swilite.core import (
BUF_DISCARDABLE,
CVT_WRITEQ,
PL_ATOM,
PL_BLOB,
PL_DICT,
PL_FLO... | mit |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/util/plugin_config.py | 1 | 2386 | from xml.etree import ElementTree
try:
from galaxy import eggs
eggs.require('PyYAML')
except Exception:
# If not in Galaxy, ignore this.
pass
try:
import yaml
except ImportError:
yaml = None
from galaxy.util.submodules import submodules
def plugins_dict(module, plugin_type_identifier):
"... | gpl-3.0 |
heeraj123/oh-mainline | vendor/packages/sphinx/sphinx/websupport/search/whooshsearch.py | 16 | 2010 | # -*- coding: utf-8 -*-
"""
sphinx.websupport.search.whooshsearch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Whoosh search adapter.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from whoosh import index
from whoosh.fields import Schema, ID... | agpl-3.0 |
NeuralEnsemble/neuroConstruct | lib/jython/Lib/readline.py | 11 | 6233 | from __future__ import with_statement
import os.path
import sys
from warnings import warn
import java.lang.reflect.Array
__all__ = ['add_history', 'clear_history', 'get_begidx', 'get_completer',
'get_completer_delims', 'get_current_history_length',
'get_endidx', 'get_history_item', 'get_history_... | gpl-2.0 |
uclouvain/OSIS-Louvain | program_management/tests/business/test_excel.py | 1 | 6599 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 |
rekhajoshm/pig | src/python/streaming/controller.py | 13 | 13335 | #! /usr/bin/env python
import sys
import os
import logging
from datetime import datetime
try:
from dateutil import parser
USE_DATEUTIL = True
except ImportError:
USE_DATEUTIL = False
from pig_util import write_user_exception, udf_logging
FIELD_DELIMITER = ','
TUPLE_START = '('
TUPLE_END = ')'
BAG_START =... | apache-2.0 |
andykimpe/chromium-test-npapi | tools/telemetry/telemetry/core/gpu_info.py | 14 | 2216 | # 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.
from telemetry.core import gpu_device
class GPUInfo(object):
"""Provides information about the GPUs on the system."""
def __init__(self, device_array, ... | bsd-3-clause |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Werkzeug-0.10.4/werkzeug/exceptions.py | 148 | 18577 | # -*- coding: utf-8 -*-
"""
werkzeug.exceptions
~~~~~~~~~~~~~~~~~~~
This module implements a number of Python exceptions you can raise from
within your views to trigger a standard non-200 response.
Usage Example
-------------
::
from werkzeug.wrappers import BaseRequest
... | mit |
18padx08/PPTex | PPTexEnv_x86_64/lib/python2.7/site-packages/sympy/physics/quantum/tests/test_qubit.py | 14 | 7891 | import random
from sympy import Integer, Matrix, Rational, sqrt, symbols
from sympy.physics.quantum.qubit import (measure_all, measure_partial,
matrix_to_qubit, matrix_to_density,
qubit_to_matrix, IntQubit,
... | mit |
aoom/pattern | pattern/server/cherrypy/cherrypy/__init__.py | 37 | 21634 | """CherryPy is a pythonic, object-oriented HTTP framework.
CherryPy consists of not one, but four separate API layers.
The APPLICATION LAYER is the simplest. CherryPy applications are written as
a tree of classes and methods, where each branch in the tree corresponds to
a branch in the URL path. Each method is a 'pa... | bsd-3-clause |
CognizantOneDevOps/Insights | PlatformAgents/com/cognizant/devops/platformagents/core/MessageQueueProvider3.py | 2 | 6204 | #-------------------------------------------------------------------------------
# Copyright 2017 Cognizant Technology Solutions
#
# 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 |
akash1808/tempest | tempest/services/object_storage/object_client.py | 28 | 9840 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
jakevdp/scipy | scipy/special/orthogonal.py | 1 | 58856 | """
A collection of functions to find the weights and abscissas for
Gaussian Quadrature.
These calculations are done by finding the eigenvalues of a
tridiagonal matrix whose entries are dependent on the coefficients
in the recursion formula for the orthogonal polynomials with the
corresponding weighting function over ... | bsd-3-clause |
caveman-dick/ansible | test/units/modules/network/f5/test_bigip_partition.py | 10 | 6736 | # -*- coding: utf-8 -*-
#
# Copyright 2017 F5 Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | gpl-3.0 |
miltonruelas/cursotecnico | branch/account_transfer_invoice/__init__.py | 7 | 1400 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2013 Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be used by professional
# programmers who take t... | agpl-3.0 |
edxzw/edx-platform | cms/envs/test_static_optimized.py | 35 | 1732 | """
Settings used when generating static assets for use in tests.
For example, Bok Choy uses two different settings files:
1. test_static_optimized is used when invoking collectstatic
2. bok_choy is used when running CMS and LMS
Note: it isn't possible to have a single settings file, because Django doesn't
support bo... | agpl-3.0 |
davidfather/TizenRT | external/protobuf/python/google/protobuf/reflection.py | 56 | 4562 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | apache-2.0 |
draugiskisprendimai/odoo | addons/hr_recruitment/wizard/__init__.py | 381 | 1095 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-Today OpenERP (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
Semi-global/edx-platform | openedx/core/lib/api/tests/test_paginators.py | 46 | 4525 | """ Tests paginator methods """
import ddt
from mock import Mock, MagicMock
from unittest import TestCase
from django.http import Http404
from openedx.core.lib.api.paginators import paginate_search_results
@ddt.ddt
class PaginateSearchResultsTestCase(TestCase):
"""Test cases for paginate_search_results method"""... | agpl-3.0 |
Duoxilian/home-assistant | homeassistant/__main__.py | 10 | 12156 | """Starts home assistant."""
from __future__ import print_function
import argparse
import os
import platform
import subprocess
import sys
import threading
from typing import Optional, List
from homeassistant.const import (
__version__,
EVENT_HOMEASSISTANT_START,
REQUIRED_PYTHON_VER,
REQUIRED_PYTHON_V... | mit |
shakamunyi/solum | solum/api/controllers/v1/service.py | 2 | 2583 | # 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 t... | apache-2.0 |
lobnek/pyutil | test/test_mongo/test_engine/test_strategy.py | 1 | 3434 | from pyutil.mongo.engine.strategy import Strategy, strategies, configuration
from pyutil.mongo.engine.symbol import Symbol, Group
from pyutil.performance.drawdown import drawdown
from pyutil.performance.month import monthlytable
from pyutil.performance.return_series import from_nav
from pyutil.portfolio.portfolio impor... | mit |
KlinkOnE/caf-port | scripts/gcc-wrapper.py | 1 | 3550 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011, The Linux Foundation. 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 abo... | gpl-2.0 |
areski/django | tests/forms_tests/tests/test_regressions.py | 135 | 9054 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms import (
CharField, ChoiceField, Form, HiddenInput, IntegerField, ModelForm,
ModelMultipleChoiceField, MultipleChoiceField, RadioSelect, Select,
TextInput,
)
from django.test import TestCase, ignore_warnings
from django.utils... | bsd-3-clause |
wholebiome/MetaPathways_Python_Koonkie.3.0 | utilities/generate_run_stats.py | 2 | 7561 | #!/usr/bin/python
# File created on 27 Jan 2012.
from __future__ import division
__author__ = "Kishori M Konwar"
__copyright__ = "Copyright 2013, MetaPathways"
__credits__ = ["r"]
__version__ = "1.0"
__maintainer__ = "Kishori M Konwar"
__status__ = "Release"
try:
import os, re
from os import makedirs, sys, ... | mit |
alexanderturner/ansible | lib/ansible/plugins/lookup/dig.py | 14 | 8240 | # (c) 2015, Jan-Piet Mens <jpmens(at)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) any later ver... | gpl-3.0 |
Sodki/ansible-modules-extras | network/a10/a10_virtual_server.py | 117 | 11533 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to manage A10 Networks slb virtual server objects
(c) 2014, Mischa Peters <mpeters@a10networks.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 publish... | gpl-3.0 |
crosswalk-project/blink-crosswalk | Tools/Scripts/webkitpy/style/checkers/common_unittest.py | 50 | 5207 | # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# 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, this list of conditions and... | bsd-3-clause |
hynnet/openwrt-mt7620 | staging_dir/host/lib/scons-2.1.0/SCons/Node/Python.py | 21 | 4225 | """scons.Node.Python
Python nodes.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# 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 Soft... | gpl-2.0 |
iAmMrinal0/CouchPotatoServer | libs/pyutil/test/current/test_time_format.py | 106 | 3967 | #!/usr/bin/env python
"""\
Test time_format.py
"""
import os, time, unittest
from pyutil import time_format, increasing_timer
class TimeUtilTestCase(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_iso8601_utc_time(self, timer=increasing_timer.timer):
... | gpl-3.0 |
premanandchandrasekar/boto | boto/gs/lifecycle.py | 157 | 9086 | # Copyright 2013 Google Inc.
#
# 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, dis-
# trib... | mit |
CanalTP/navitia | source/tyr/tests/integration/autocomplete_test.py | 1 | 11540 | # coding: utf-8
# Copyright (c) 2001-2018, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public transport:
# a non ending quest to... | agpl-3.0 |
franciscodominguezmateos/DeepLearningNanoDegree | face_generation/problem_unittests.py | 159 | 6094 | from copy import deepcopy
from unittest import mock
import tensorflow as tf
def test_safe(func):
"""
Isolate tests
"""
def func_wrapper(*args):
with tf.Graph().as_default():
result = func(*args)
print('Tests Passed')
return result
return func_wrapper
def _ass... | mit |
samuelshaner/openmc | tests/run_tests.py | 1 | 17900 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
import shutil
import re
import glob
import socket
from subprocess import call, check_output
from collections import OrderedDict
from optparse import OptionParser
# Command line parsing
parser = OptionParser()
parser.add_option('-j', '--... | mit |
deikaRabbit/Paven | com.paven.core/.gradle/nodejs/node-v7.9.0-darwin-x64/lib/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... | apache-2.0 |
hogarthj/ansible | lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py | 74 | 3659 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 |
abought/osf.io | framework/transactions/context.py | 51 | 2005 | # -*- coding: utf-8 -*-
import logging
import functools
from pymongo.errors import OperationFailure
from framework.mongo import database as proxy_database
from framework.transactions import commands, messages, utils
logger = logging.getLogger(__name__)
class TokuTransaction(object):
"""Transaction context ma... | apache-2.0 |
alikins/ansible | lib/ansible/plugins/lookup/together.py | 57 | 2150 | # (c) 2013, Bradley Young <young.bradley@gmail.com>
# (c) 2012-17 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
DOCUMENTATION = """
lookup: toghether
author: B... | gpl-3.0 |
tsotetsi/textily-web | temba/middleware.py | 1 | 5471 | from __future__ import absolute_import, unicode_literals
import pstats
import traceback
import copy
from cStringIO import StringIO
from django.conf import settings
from django.db import transaction
from django.utils import timezone, translation
from temba.orgs.models import Org
from temba.contacts.models import Conta... | agpl-3.0 |
vuolter/autoupgrade | setup.py | 1 | 1152 | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="autoupgrade-ng",
version="0.3.0",
author="Walter Purcaro",
author_email="vuolter@gmail.com",
description="Automatic upgrade of PyPI packages",
long_description=open('README.rst').read(),
keywords=['autoupgrade', 'pip-upgrade... | mit |
litchfield/django | tests/check_framework/test_security.py | 242 | 17428 | from django.conf import settings
from django.core.checks.security import base, csrf, sessions
from django.test import SimpleTestCase
from django.test.utils import override_settings
class CheckSessionCookieSecureTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.sessions i... | bsd-3-clause |
avicizhu/Load-balancer | .waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Tools/c_config.py | 11 | 21756 | #! /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 sys
if sys.hexversion < 0x020400f0: from sets import Set as set
import os,imp,sys,re,shlex,shutil
from waflib import Build,Utils,Configure,Task,Options,Logs,TaskGen,Err... | gpl-2.0 |
JianyuWang/nova | nova/api/openstack/compute/flavor_rxtx.py | 33 | 2097 | # Copyright 2012 Nebula, 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... | apache-2.0 |
lavvy/osmc | package/mediacenter-addon-osmc/src/script.module.elementtree/lib/elementtree/ElementInclude.py | 24 | 5051 | #
# ElementTree
# $Id: ElementInclude.py 3225 2007-08-27 21:32:08Z fredrik $
#
# limited xinclude support for element trees
#
# history:
# 2003-08-15 fl created
# 2003-11-14 fl fixed default loader
#
# Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved.
#
# fredrik@pythonware.com
# http://www.pythonware... | gpl-2.0 |
pjbriggs/tools-iuc | data_managers/data_manager_snpsift_dbnsfp/data_manager/data_manager_snpsift_dbnsfp.py | 4 | 7888 | #!/usr/bin/env python
import gzip
import json
import optparse
import os
import os.path
import re
import shutil
import sys
import urllib
import zipfile
from pysam import ctabix
"""
# Install dbNSFP databases
# from DbNsfp site
# Download dbNSFP database
$ wget ftp://dbnsfp:dbnsfp@dbnsfp.softgenetics.com/dbNSFPv... | mit |
neurord/pysb | pysb/export/potterswheel.py | 3 | 5442 | """
Module containing a class for converting a PySB model to an equivalent set of
ordinary differential equations for integration or analysis in PottersWheel_.
.. _PottersWheel: http://www.potterswheel.de
For information on how to use the model exporters, see the documentation
for :py:mod:`pysb.export`.
Output for t... | bsd-2-clause |
alxgu/ansible | test/units/module_utils/network/ftd/test_fdm_swagger_parser.py | 37 | 17322 | # Copyright (c) 2018 Cisco and/or its affiliates.
#
# 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 v... | gpl-3.0 |
rosihorrorshow/askbot-devel | askbot/auth.py | 2 | 10532 | """
Authorisation related functions.
This entire module will be removed some time in
the future
Many of these functions are being replaced with assertions:
User.assert_can...
"""
import datetime
from django.db import transaction
from askbot.models import Repute
from askbot.models import Answer
from askbot.models impo... | gpl-3.0 |
coderbone/SickRage | sickbeard/providers/morethantv.py | 3 | 8361 | # Author: Seamus Wassman
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at you... | gpl-3.0 |
aequitas/home-assistant | homeassistant/components/insteon/__init__.py | 6 | 23042 | """Support for INSTEON Modems (PLM and Hub)."""
import collections
import logging
from typing import Dict
import voluptuous as vol
from homeassistant.const import (
CONF_ADDRESS, CONF_ENTITY_ID, CONF_HOST, CONF_PLATFORM, CONF_PORT,
EVENT_HOMEASSISTANT_STOP)
from homeassistant.core import callback
from homeass... | apache-2.0 |
carlvlewis/bokeh | bokeh/charts/builder/tests/test_line_builder.py | 33 | 2376 | """ This is the Bokeh charts testing interface.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with thi... | bsd-3-clause |
JioCloud/python-neutronclient | neutronclient/neutron/client.py | 11 | 2622 | # Copyright 2012 OpenStack Foundation.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
FlintHill/SUAS-Competition | SUASSystem/SUASSystem/image_processing.py | 1 | 3266 | from time import sleep
from PIL import Image
import os
import math
import random
from .utils import *
from UpdatedImageProcessing import *
from .settings import GCSSettings
from .converter_functions import inverse_haversine, get_mission_json
from .location import Location
"""
This file contains our image processing log... | mit |
gnarula/eden_deployment | modules/geopy/geocoders/dot_us.py | 46 | 3194 | import getpass
from urllib import urlencode
from urllib2 import urlopen
from geopy.geocoders.base import Geocoder
from geopy import util
import csv
class GeocoderDotUS(Geocoder):
def __init__(self, username=None, password=None, format_string='%s'):
if username and (password is None):
password =... | mit |
darjus-amzn/ryu | ryu/lib/sockaddr.py | 48 | 1871 | # Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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 |
itoledoc/gWTO2 | arrayResolution2p.py | 1 | 23318 | #!/usr/bin/python
"""
Script to return the Cycle 2 arrays for a given LAS, Angular Resolution
HISTORY:
2012.10.11:
- first shot
- Cycle 1 setup
2012.11.20:
- Adding resolution, LAS for different declination
2012.12.27:
- adding a filter if no configurati... | gpl-2.0 |
icloudrnd/automation_tools | openstack_dashboard/dashboards/project/data_processing/wizard/urls.py | 23 | 1865 | # 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 the Li... | apache-2.0 |
koharjidan/bitcoin | qa/rpc-tests/sendheaders.py | 12 | 21860 | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramewor... | mit |
Gamebasis/3DGamebasisServer | GameData/blender-2.71-windows64/2.71/python/lib/_sitebuiltins.py | 5 | 2896 | """
The objects used by the site module to add custom builtins.
"""
# Those objects are almost immortal and they keep a reference to their module
# globals. Defining them in the site module would keep too many references
# alive.
# Note this means this module should also avoid keep things alive in its
# globals.
imp... | gpl-3.0 |
kirca/OpenUpgrade | addons/purchase/__openerp__.py | 259 | 3787 | # -*- 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 |
Strepto/sumatrapdf | ext/freetype2/src/tools/docmaker/content.py | 146 | 19167 | #
# content.py
#
# Parse comment blocks to build content blocks (library file).
#
# Copyright 2002, 2004, 2006-2009, 2012-2014 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
# modified, and distributed under the terms of the FreeType project
# license, LICENSE.TXT. By ... | gpl-3.0 |
Sayter99/86Scratch | Helpers/86Scratch/s2a_fm.py | 1 | 4575 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 25 13:17:15 2013
@author: Alan Yorinks
Copyright (c) 2013-14 Alan Yorinks All right reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Fre... | mit |
yfried/ansible | test/units/modules/network/netscaler/test_netscaler_server.py | 68 | 24867 |
# Copyright (c) 2017 Citrix Systems
#
# 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.
#
# ... | gpl-3.0 |
alalek/cmake_utils | tests/checkoutput.py | 1 | 12432 | #!/bin/env python3
import os
import string
import sys
import re
from pprint import pprint
class CheckException(Exception):
pass
CHECK_SIMPLE = ''
CHECK_NEXT = '-NEXT'
CHECK_SAME = '-SAME'
CHECK_NOT = '-NOT'
CHECK_BETWEEN = '-BETWEEN' # check without order
CHECK_LABEL = 'LABEL'
def _apply_check(c, m, varia... | mit |
VinceZK/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py | 117 | 4727 | # 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 |
Unow/edx-platform | common/djangoapps/user_api/migrations/0001_initial.py | 71 | 4832 | # -*- 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):
# Adding model 'UserPreference'
db.create_table('user_api_userpreference', (
('id', self.gf('dja... | agpl-3.0 |
maxvonhippel/q2-diversity | q2_diversity/_filter.py | 1 | 1145 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2017, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause |
nzavagli/UnrealPy | UnrealPyEmbed/Source/Python/Lib/python27/string.py | 39 | 21548 | """A collection of string operations (most are no longer used).
Warning: most of the code you see here isn't normally used nowadays.
Beginning with Python 1.6, many of these functions are implemented as
methods on the standard string object. They used to be implemented by
a built-in module called strop, but strop is n... | mit |
0jpq0/kbengine | kbe/src/lib/python/Lib/distutils/tests/test_dist.py | 83 | 15954 | """Tests for distutils.dist."""
import os
import io
import sys
import unittest
import warnings
import textwrap
from unittest import mock
from distutils.dist import Distribution, fix_help_options, DistributionMetadata
from distutils.cmd import Command
from test.support import TESTFN, captured_stdout, run_unittest
fro... | lgpl-3.0 |
lamotriz/sistemas-de-aterramento | src/agilent_u2531a.py | 1 | 14700 | # -*- coding: utf-8 -*-
# Comunicacao com a placa agilent U2531A
#
# UFC - Universidade de Federal do Ceará
#
# Responsáveis:
# Felipe Bandeira da Silva
# Francisco Alexander
#
from __future__ import division
import platform
#if platform.system() == 'Windows':
# import visa
#else:
# import visa_linux_emulatio... | apache-2.0 |
creasyw/IMTAphy | documentation/doctools/tags/0.4.3/tests/etree13/ElementPath.py | 4 | 6558 | #
# ElementTree
# $Id: ElementPath.py 65372 2008-08-01 19:11:22Z georg.brandl $
#
# limited xpath support for element trees
#
# history:
# 2003-05-23 fl created
# 2003-05-28 fl added support for // etc
# 2003-08-27 fl fixed parsing of periods in element names
# 2007-09-10 fl new selection engine
#
# Copyright (... | gpl-2.0 |
argivaitv/argivaitv | plugin.video.salts/salts_lib/kodi.py | 1 | 4210 | """
SALTS XBMC Addon
Copyright (C) 2015 tknorris
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.
T... | gpl-2.0 |
nsg/ansible-modules-extras | files/patch.py | 77 | 6509 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Luis Alberto Perez Lazaro <luisperlazaro@gmail.com>
# (c) 2015, Jakub Jirutka <jakub@jirutka.cz>
#
# 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... | gpl-3.0 |
xyguo/scikit-learn | examples/model_selection/plot_underfitting_overfitting.py | 53 | 2668 | """
============================
Underfitting vs. Overfitting
============================
This example demonstrates the problems of underfitting and overfitting and
how we can use linear regression with polynomial features to approximate
nonlinear functions. The plot shows the function that we want to approximate,
wh... | bsd-3-clause |
mezzovide/btcd | share/qt/extract_strings_qt.py | 1294 | 1784 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
OUT_CPP="src/qt/bitcoinstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' format produced by xgettext.
Ret... | mit |
speedbot/android_kernel_sony_Nicki | tools/perf/python/twatch.py | 7370 | 1334 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 |
sweimer/ICFID8 | docroot/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py | 1382 | 30567 | # Copyright (c) 2014 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.
"""
This script is intended for use as a GYP_GENERATOR. It takes as input (by way of
the generator flag config_path) the path of a json file that dictates the file... | mit |
venzen/zen2pool | p2pool/util/forest.py | 281 | 13557 | '''
forest data structure
'''
import itertools
from p2pool.util import skiplist, variable
class TrackerSkipList(skiplist.SkipList):
def __init__(self, tracker):
skiplist.SkipList.__init__(self)
self.tracker = tracker
self.tracker.removed.watch_weakref(self, lambda self, item: se... | gpl-3.0 |
dol-sen/gentoolkit | pym/gentoolkit/test/test_cpv.py | 1 | 4129 | #!/usr/bin/python
#
# Copyright(c) 2009, Gentoo Foundation
#
# Licensed under the GNU General Public License, v2
#
# $Header$
import unittest
from gentoolkit.cpv import *
from gentoolkit.test import cmp
class TestGentoolkitCPV(unittest.TestCase):
def assertEqual2(self, o1, o2):
# logic bugs hidden behind short c... | gpl-2.0 |
les69/calvin-base | calvin/examples/webserver/actors/path/Append.py | 3 | 2787 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 |
Ezhil-Language-Foundation/open-tamil | tests/solthiruthi_data_parser.py | 1 | 1780 | # -*- coding: utf-8 -*-
# (C) 2015 Muthiah Annamalai
# setup the paths
from opentamiltests import *
from solthiruthi.data_parser import *
from solthiruthi.solthiruthi import Solthiruthi
import sys
class CmdLineIO(unittest.TestCase):
def test_CLI_interface_help(self):
return
# find a way to run th... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.