repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
ivanamihalek/tcga | tcga/01_somatic_mutations/024_mutation_type_stats.py | 1 | 6021 | #!/usr/bin/python
#
# This source code is part of tcga, a TCGA processing pipeline, written by Ivana Mihalek.
# Copyright (C) 2014-2016 Ivana Mihalek.
#
# 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 Fou... | gpl-3.0 |
Distrotech/PyQt-x11 | examples/animation/animatedtiles/animatedtiles_rc2.py | 5 | 399279 | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: Wed Mar 20 11:12:39 2013
# by: The Resource Compiler for PyQt (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x36\xe2\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x... | gpl-2.0 |
panmari/tensorflow | tensorflow/python/ops/rnn.py | 2 | 24038 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
bala4901/odoo | addons/plugin_thunderbird/plugin_thunderbird.py | 92 | 2075 | # -*- 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 |
idncom/odoo | openerp/addons/base/tests/test_menu.py | 501 | 1450 | import openerp.tests.common as common
class test_menu(common.TransactionCase):
def setUp(self):
super(test_menu,self).setUp()
self.Menus = self.registry('ir.ui.menu')
def test_00_menu_deletion(self):
"""Verify that menu deletion works properly when there are child menus, and those
... | agpl-3.0 |
ff94315/hiwifi-openwrt-HC5661-HC5761 | staging_dir/host/lib/python2.7/xml/sax/_exceptions.py | 250 | 4785 | """Different kinds of SAX Exceptions"""
import sys
if sys.platform[:4] == "java":
from java.lang import Exception
del sys
# ===== SAXEXCEPTION =====
class SAXException(Exception):
"""Encapsulate an XML error or warning. This class can contain
basic error or warning information from either the XML parser o... | gpl-2.0 |
Jonekee/chromium.src | third_party/markdown/extensions/wikilinks.py | 109 | 7050 | # markdown is released under the BSD license
# Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
# Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
# Copyright 2004 Manfred Stienstra (the original version)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or... | bsd-3-clause |
centwave/jg82ksgvqkuan | django/contrib/gis/gdal/libgdal.py | 156 | 3390 | import os, re, sys
from ctypes import c_char_p, CDLL
from ctypes.util import find_library
from django.contrib.gis.gdal.error import OGRException
# Custom library path set?
try:
from django.conf import settings
lib_path = settings.GDAL_LIBRARY_PATH
except (AttributeError, EnvironmentError, ImportError):
lib... | bsd-3-clause |
chjw8016/GreenOdoo7-haibao | openerp/addons/account_check_writing/__init__.py | 446 | 1111 | # -*- 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... | mit |
bop/rango | lib/python2.7/site-packages/django/conf/locale/sr/formats.py | 210 | 1691 | # -*- 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 = 'j. F Y.'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. F Y. H:i'
YEAR_MONTH_F... | gpl-2.0 |
achang97/YouTunes | lib/python2.7/site-packages/botocore/parsers.py | 3 | 32630 | # Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | mit |
ghandiosm/Test | addons/mass_mailing/wizard/mail_compose_message.py | 47 | 3245 | # -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class MailComposeMessage(osv.TransientModel):
"""Add concept of mass mailing campaign to the mail.compose.message wizard
"""
_inherit = 'mail.compose.message'
_columns = {
'mass_mailing_campaign_id': fields.many2one(
'mai... | gpl-3.0 |
40223144/2015cd_midterm | static/Brython3.1.0-20150301-090019/Lib/pydoc.py | 637 | 102017 | #!/usr/bin/env python3
"""Generate Python documentation in HTML or text for interactive use.
In the Python interpreter, do "from pydoc import help" to provide
help. Calling help(thing) on a Python object documents the object.
Or, at the shell command line outside of Python:
Run "pydoc <name>" to show documentation ... | gpl-3.0 |
stutivarshney/Bal-Aveksha | WebServer/BalAvekshaEnv/lib/python3.5/site-packages/django/views/generic/list.py | 81 | 7623 | from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from django.core.paginator import InvalidPage, Paginator
from django.db.models.query import QuerySet
from django.http import Http404
from django.utils import six
from django.utils.translation import ugettext as _
from djang... | gpl-3.0 |
squadran2003/PYTHON-DIRECTORY-WATCHER | lib/python3.5/site-packages/pathtools/path.py | 18 | 6614 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# path.py: Path functions.
#
# Copyright (C) 2010 Yesudeep Mangalapilly <yesudeep@gmail.com>
#
# 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 wi... | mit |
agileblaze/OpenStackTwoFactorAuthentication | horizon/openstack_dashboard/dashboards/project/data_processing/data_image_registry/tables.py | 26 | 2507 | # 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... | apache-2.0 |
gauthierm/bedrock | bedrock/mozorg/tests/test_credits.py | 29 | 3418 | # -*- coding: utf-8 -*-
# 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 collections import OrderedDict
from mock import Mock
from bedrock.mozorg import credits
fr... | mpl-2.0 |
NMTHydro/Recharge | utils/ndvi_linear_interpolation.py | 1 | 11551 | # ===============================================================================
# Copyright 2016 gabe-parrish
#
# 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/licen... | apache-2.0 |
pquentin/django | django/core/cache/backends/dummy.py | 629 | 1213 | "Dummy cache backend"
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
class DummyCache(BaseCache):
def __init__(self, host, *args, **kwargs):
BaseCache.__init__(self, *args, **kwargs)
def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
key = self.make_key... | bsd-3-clause |
kaiweifan/neutron | neutron/plugins/ryu/db/models_v2.py | 24 | 1466 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Isaku Yamahata <yamahata at private email ne jp>
# 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
#... | apache-2.0 |
vismantic-ohtuprojekti/qualipy | qualipy/utils/utils.py | 2 | 3284 | """
Common utilities used in the library.
"""
from functools import wraps
import numpy
# Numba integration
# If Numba is installed, certain functions are automatically
# sped-up by Numba's JIT compilation.
try:
import numba
jit = numba.jit
except ImportError:
def jit(func):
return func
def fi... | mit |
marratj/ansible | lib/ansible/modules/database/proxysql/proxysql_query_rules.py | 30 | 22638 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (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_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: proxysql_query_rules
versi... | gpl-3.0 |
2014c2g2/w16b_test | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/draw.py | 603 | 6456 | from javascript import console
from browser import timer
import math
class Queue:
def __init__(self):
self._list=[]
def empty(self):
return len(self._list) == 0
def put(self, element):
self._list.append(element)
def get(self):
if len(self._list) == 0:
raise BaseError
... | gpl-3.0 |
Phoenix1708/OpenAcademy_OpenStack_Flyway | flyway/tests/flow/test_flow_specify_resource.py | 1 | 8693 | from utils.db_base import delete_all_data
__author__ = 'chengxue'
from tests.flow.test_base import TestBase
from flyway.flow import flow
from flyway.utils.helper import *
from keystoneclient import exceptions as ks_exceptions
from utils.db_handlers import tenants
from utils.db_handlers import users
from utils.db_hand... | apache-2.0 |
B-UMMI/INNUca | src/SPAdes-3.11.1-Linux/share/spades/spades_pipeline/truspades/launch_options.py | 12 | 6476 | ############################################################################
# Copyright (c) 2015 Saint Petersburg State University
# All Rights Reserved
# See file LICENSE for details.
############################################################################
__author__ = 'anton'
import getopt
import os
import sys
... | gpl-3.0 |
LeeXiaolan/tplink-vxworks-based-firmware | unow2fs.py | 1 | 2851 | #!/usr/bin/env python2
'''
Extract web resource files from TP-LINK VxWorks-based routers' compiled web resouce files.
Copyright (C) 2014 Xiaolan.Lee<LeeXiaolan@gmail.com>
License: GPLv2 (see LICENSE for details).
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCL... | gpl-2.0 |
gkarlin/django-jenkins | build/Django/django/conf/project_template/project_name/wsgi.py | 123 | 1455 | """
WSGI config for {{ project_name }} project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APP... | lgpl-3.0 |
batxes/4c2vhic | Six_mouse_models/Six_mouse_models_final_output_0.2_-0.1_11000/mtx1_models/Six_mouse_models31015.py | 4 | 18217 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 |
blentz/zabbix_api | zabbix/zabbix_api.py | 1 | 14829 | # This is a port of the ruby zabbix api found here:
# http://trac.red-tux.net/wiki/zbx_api
#
# Zabbix API Python Library.
#
# Original Ruby Library is Copyright (C) 2009 Andrew Nelson nelsonab(at)red-tux(dot)net
# Python Library is Copyright (C) 2009 Brett Lentz brett.lentz(at)gmail(dot)com
#
# This library is ... | lgpl-3.0 |
GoSteven/Diary | django/contrib/localflavor/is_/is_postalcodes.py | 12 | 5064 | # -*- coding: utf-8 -*-
IS_POSTALCODES = (
('101', u'101 Reykjavík'),
('103', u'103 Reykjavík'),
('104', u'104 Reykjavík'),
('105', u'105 Reykjavík'),
('107', u'107 Reykjavík'),
('108', u'108 Reykjavík'),
('109', u'109 Reykjavík'),
('110', u'110 Reykjavík'),
('111', u'111... | bsd-3-clause |
Alwnikrotikz/pymssql | tests/test_pymssql.py | 10 | 2980 | from nose.plugins.skip import SkipTest
from nose.tools import eq_
import pymssql as pym
from .helpers import pymssqlconn, PyTableBase, drop_table, CursorBase
class TestDBAPI2(object):
def test_version(self):
assert pym.__version__
class TestTransaction(PyTableBase):
tname = 'users'
cols = (
... | lgpl-2.1 |
yarbroughw/JMDE | JMDE/scripts/repackage.py | 1 | 2885 | """ repackage.py
This script repackages the instances dataset to be more sane.
Specifically, it favors a flat structure in a single file, rather than a
complex nested directory of multiple files.
To compensate for the lack of structure in this repackaged version, the modules
that use the dataset will need to be rewri... | mit |
pschmitt/home-assistant | tests/components/vera/test_lock.py | 6 | 1647 | """Vera tests."""
import pyvera as pv
from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED
from homeassistant.core import HomeAssistant
from .common import ComponentFactory, new_simple_controller_config
from tests.async_mock import MagicMock
async def test_lock(
hass: HomeAssistant, vera_component_fact... | apache-2.0 |
BaichuanWu/Blog_on_django | site-packages/PIL/Hdf5StubImagePlugin.py | 77 | 1549 | #
# The Python Imaging Library
# $Id$
#
# HDF5 stub adapter
#
# Copyright (c) 2000-2003 by Fredrik Lundh
#
# See the README file for information on usage and redistribution.
#
from PIL import Image, ImageFile
_handler = None
##
# Install application-specific HDF5 image handler.
#
# @param handler Handler object.
d... | mit |
mkennedy04/knodj | env/Lib/site-packages/django/contrib/gis/geos/prototypes/threadsafe.py | 529 | 2859 | import threading
from django.contrib.gis.geos.libgeos import (
CONTEXT_PTR, error_h, lgeos, notice_h,
)
class GEOSContextHandle(object):
"""
Python object representing a GEOS context handle.
"""
def __init__(self):
# Initializing the context handler for this thread with
# the noti... | mit |
buqing2009/MissionPlanner | Lib/lib2to3/fixes/fix_throw.py | 61 | 1642 | """Fixer for generator.throw(E, V, T).
g.throw(E) -> g.throw(E)
g.throw(E, V) -> g.throw(E(V))
g.throw(E, V, T) -> g.throw(E(V).with_traceback(T))
g.throw("foo"[, V[, T]]) will warn about string exceptions."""
# Author: Collin Winter
# Local imports
from .. import pytree
from ..pgen2 import token... | gpl-3.0 |
smartforceplus/SmartForceplus | addons/crm_profiling/__openerp__.py | 260 | 2204 | # -*- 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 |
jeffzheng1/tensorflow | tensorflow/contrib/lookup/__init__.py | 12 | 1249 | # 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 |
mm1ke/portage | pym/_emerge/PackageUninstall.py | 12 | 3734 | # Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import logging
import portage
from portage import os
from portage.dbapi._MergeProcess import MergeProcess
from portage.exception import UnsupportedAPIException
from _emerge.EbuildBuildDir import EbuildBuildDir
fr... | gpl-2.0 |
thaim/ansible | lib/ansible/modules/network/cloudengine/ce_mlag_interface.py | 5 | 36674 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | mit |
rudix-mac/rudix | Utils/darwin_remover.py | 1 | 4789 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Remove packages.
#
# Copyright © 2011-2017 Rudá Moura (Rudix)
# Author: Rudá Moura <ruda.moura@gmail.com>
"""Remove one or more packages."""
import os
import sys
# For Snow Leopard compatibility, we can't use argparse
import optparse
from subprocess import Popen, PIPE
fro... | bsd-3-clause |
neumerance/cloudloon2 | .venv/lib/python2.7/site-packages/pbr/tests/test_packaging.py | 3 | 3984 | # Copyright (c) 2013 New Dream Network, LLC (DreamHost)
#
# 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... | apache-2.0 |
vlw/android_kernel_samsung_msm8916_A3 | 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 |
Jayflux/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/ie.py | 8 | 2879 | from .base import Browser, ExecutorBrowser, require_arg
from ..webdriver_server import InternetExplorerDriverServer
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorselenium import (SeleniumTestharnessExecutor,
SeleniumRefTestExecutor)
fr... | mpl-2.0 |
rduivenvoorde/QGIS | scripts/bounds_sync.py | 30 | 1395 | import os
import sys
import sqlite3 as sqlite
def gen():
db = sqlite.connect(":memory:")
tablesfile = sys.argv[1]
datafiles = sys.argv[2]
with open(os.path.join("data", tablesfile)) as f:
data = f.read()
db.executescript(data)
with open(os.path.join("data", datafiles)) as f:
... | gpl-2.0 |
kun--hust/libcloud_with_cn | libcloud/test/loadbalancer/test_rackspace.py | 31 | 67308 | # 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 ... | apache-2.0 |
mikadosoftware/weaver | weaver/devtools/devclean.py | 1 | 1535 | #!/bin/env python
"""devclean
Usage:
devclean <rootpath> [--show]
devclean (-h | --help)
devclean --version
Options:
-h --help Show this screen.
--version Show version.
--show Only show dont kill files
"""
import os, sys
from fnmatch import fnmatch
from docopt import docopt
crap_matcher... | mit |
labsland/labmanager | alembic/versions/e657e849733_populate_rlms_name.py | 5 | 1458 | """Populate RLMS name
Revision ID: e657e849733
Revises: 298c12227419
Create Date: 2015-05-10 19:56:50.353550
"""
# revision identifiers, used by Alembic.
revision = 'e657e849733'
down_revision = '298c12227419'
import json
from alembic import op
import sqlalchemy as sa
import sqlalchemy.sql as sql
from labmanager.d... | bsd-2-clause |
Tamfoolery/Save-Yourself-from-the-Quantum-Cyborgs | Game/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py | 2214 | 1347 | #!/usr/bin/env python
import re
import json
# http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
# http://stackoverflow.com/a/13436167/96656
def unisymbol(codePoint):
if codePoint >= 0x0000 and codePoint <= 0xFFFF:
return unichr(codePoint)
elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
... | gpl-2.0 |
ga7g08/sympy | sympy/utilities/pkgdata.py | 109 | 1872 | """
pkgdata is a simple, extensible way for a package to acquire data file
resources.
The getResource function is equivalent to the standard idioms, such as
the following minimal implementation::
import sys, os
def getResource(identifier, pkgname=__name__):
pkgpath = os.path.dirname(sys.modules[pkgna... | bsd-3-clause |
n-west/gnuradio | gr-utils/python/modtool/scm.py | 49 | 8688 | #
# Copyright 2013 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)
# any later version.
#
#... | gpl-3.0 |
InjectionSoftwareDevelopment/csuCTF | api/api/routes/problem.py | 7 | 3493 | from flask import Flask, request, session, send_from_directory, render_template
from flask import Blueprint
import api
from api.common import WebSuccess, WebError
from api.annotations import api_wrapper, require_login, require_teacher, require_admin, check_csrf
from api.annotations import block_before_competition, blo... | mit |
mcreenan/eve | eve/tests/versioning.py | 4 | 56753 | # -*- coding: utf-8 -*-
from bson import ObjectId
import copy
import time
from eve.tests import TestBase
from eve.tests.utils import DummyEvent
from eve import STATUS, STATUS_OK, ETAG
from eve.tests.test_settings import MONGO_DBNAME
class TestVersioningBase(TestBase):
def setUp(self):
self.versioned_fiel... | bsd-3-clause |
jk1/intellij-community | python/lib/Lib/shlex.py | 104 | 11124 | # -*- coding: iso-8859-1 -*-
"""A lexical analyzer class for simple shell-like syntaxes."""
# Module and documentation by Eric S. Raymond, 21 Dec 1998
# Input stacking and error message cleanup added by ESR, March 2000
# push_source() and pop_source() made explicit by ESR, January 2001.
# Posix compliance, split(), st... | apache-2.0 |
pothosware/gr-runtime | gnuradio-runtime/examples/volk_benchmark/volk_math.py | 59 | 5334 | #!/usr/bin/env python
from gnuradio import gr
from gnuradio import blocks
import argparse
from volk_test_funcs import *
try:
from gnuradio import blocks
except ImportError:
sys.stderr.write("This example requires gr-blocks.\n")
def multiply_const_cc(N):
k = 3.3
op = blocks.multiply_const_cc(k)
tb... | gpl-3.0 |
v-a/check_mk | web/plugins/pages/wato.py | 1 | 2002 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 |
omula/easybuild-easyblocks | easybuild/easyblocks/o/openssl.py | 1 | 2591 | ##
# Copyright 2009-2013 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (htt... | gpl-2.0 |
nightjean/Deep-Learning | tensorflow/compiler/aot/tests/make_test_graphs.py | 27 | 4850 | # 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 |
yeraydiazdiaz/nonrel-blog | django/utils/timesince.py | 86 | 2424 | import datetime
from django.utils.timezone import is_aware, utc
from django.utils.translation import ungettext, ugettext
def timesince(d, now=None, reversed=False):
"""
Takes two datetime objects and returns the time between d and now
as a nicely formatted string, e.g. "10 minutes". If d occurs after now... | bsd-3-clause |
lsellens/service.libreelec.settings | src/resources/lib/oeWindows.py | 1 | 33438 | ################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2013 Lutz Fiebach (lufie@openelec.tv)
#
# This program is dual-licensed; you can redistri... | gpl-2.0 |
boretom/pyload-apkg | source/py-mods-prebuilt-i386/site-packages/OpenSSL/test/test_rand.py | 88 | 5802 | # Copyright (c) Frederick Dean
# See LICENSE for details.
"""
Unit tests for L{OpenSSL.rand}.
"""
from unittest import main
import os
import stat
from OpenSSL.test.util import TestCase, b
from OpenSSL import rand
class RandTests(TestCase):
def test_bytes_wrong_args(self):
"""
L{OpenSSL.rand.byt... | gpl-3.0 |
azumimuo/family-xbmc-addon | script.module.urlresolver/lib/urlresolver/plugins/mp4stream.py | 7 | 1584 | """
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
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.
... | gpl-2.0 |
bref/googletest | scripts/fuse_gtest_files.py | 2577 | 8813 | #!/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... | bsd-3-clause |
CUCWD/edx-platform | lms/djangoapps/courseware/testutils.py | 8 | 11306 | """
Common test utilities for courseware functionality
"""
# pylint: disable=attribute-defined-outside-init
from abc import ABCMeta, abstractmethod
from datetime import datetime, timedelta
from urllib import urlencode
import ddt
from mock import patch
from lms.djangoapps.courseware.field_overrides import OverrideMod... | agpl-3.0 |
sestrella/ansible | lib/ansible/modules/storage/netapp/na_elementsw_cluster_pair.py | 21 | 6984 | #!/usr/bin/python
# (c) 2018, NetApp, Inc
# 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 = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
StackStorm/python-mistralclient | mistralclient/commands/v2/members.py | 1 | 6389 | # Copyright 2016 - Catalyst IT Limited
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 |
sander76/home-assistant | homeassistant/components/wilight/config_flow.py | 3 | 3689 | """Config flow to configure WiLight."""
from urllib.parse import urlparse
import pywilight
from homeassistant.components import ssdp
from homeassistant.config_entries import CONN_CLASS_LOCAL_PUSH, ConfigFlow
from homeassistant.const import CONF_HOST
from . import DOMAIN
CONF_SERIAL_NUMBER = "serial_number"
CONF_MOD... | apache-2.0 |
tylerjereddy/scipy | scipy/stats/tests/test_tukeylambda_stats.py | 21 | 3232 | import numpy as np
from numpy.testing import assert_allclose, assert_equal
from scipy.stats._tukeylambda_stats import (tukeylambda_variance,
tukeylambda_kurtosis)
def test_tukeylambda_stats_known_exact():
"""Compare results with some known exact formulas."""
# Some... | bsd-3-clause |
ewitz/PhotoHaus | venv/lib/python2.7/site-packages/jinja2/compiler.py | 623 | 61785 | # -*- coding: utf-8 -*-
"""
jinja2.compiler
~~~~~~~~~~~~~~~
Compiles nodes into python code.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
from itertools import chain
from copy import deepcopy
from keyword import iskeyword as is_python_keyword
from jinja2... | mit |
chaeplin/p2pool-give | p2pool/p2p.py | 147 | 27992 | from __future__ import division
import math
import random
import sys
import time
from twisted.internet import defer, protocol, reactor
from twisted.python import failure, log
import p2pool
from p2pool import data as p2pool_data
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral, p2proto... | gpl-3.0 |
curaloucura/Enso-Ubuntu | enso/quasimode/__init__.py | 6 | 15705 | # Copyright (c) 2008, Humanized, 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:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditi... | bsd-3-clause |
podemos-info/odoo | addons/product_visible_discount/__openerp__.py | 9 | 2157 | ##############################################################################
#
# 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 Affero General Public L... | agpl-3.0 |
jiagang/shadowsocks | shadowsocks/crypto/table.py | 1044 | 8108 | # !/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 |
windedge/odoo | addons/sale_analytic_plans/__openerp__.py | 262 | 1634 | # -*- 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 |
fhe-odoo/odoo | addons/event/__init__.py | 13 | 1056 | # -*- 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 |
google/pigweed | pw_build/py/pw_build/python_runner.py | 1 | 16622 | # Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 |
ominux/skia | tools/skp/page_sets/skia_wikipedia_desktop.py | 32 | 1150 | # Copyright 2015 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.
# pylint: disable=W0401,W0614
from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
clas... | apache-2.0 |
nwjs/chromium.src | third_party/pexpect/FSM.py | 171 | 14248 | #!/usr/bin/env python
"""This module implements a Finite State Machine (FSM). In addition to state
this FSM also maintains a user defined "memory". So this FSM can be used as a
Push-down Automata (PDA) since a PDA is a FSM + memory.
The following describes how the FSM works, but you will probably also need to
see the... | bsd-3-clause |
waprin/google-cloud-python | system_tests/attempt_system_tests.py | 4 | 3387 | # 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 required by applicable law or a... | apache-2.0 |
0asa/scikit-learn | sklearn/feature_selection/rfe.py | 2 | 15171 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Vincent Michel <vincent.michel@inria.fr>
# Gilles Louppe <g.louppe@gmail.com>
#
# License: BSD 3 clause
"""Recursive feature elimination for feature ranking"""
import numpy as np
from ..utils import check_X_y, safe_sqr
from ..utils.metaes... | bsd-3-clause |
huiyiqun/check_mk | web/plugins/userdb/ldap.py | 1 | 83309 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 |
parthea/pydatalab | tests/ml/dataset_tests.py | 3 | 3980 | # Copyright 2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 |
TheTypoMaster/chromium-crosswalk | chrome/common/extensions/docs/server2/appengine_blobstore.py | 120 | 1904 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import blob_reference_store as datastore
from blob_reference_store import BlobReferenceStore
from appengine_wrappers import blobstore
from appengine_wrap... | bsd-3-clause |
0/SpanishAcquisition | spacq/devices/tektronix/tests/server/test_awg5014b.py | 2 | 3450 | import logging
log = logging.getLogger(__name__)
from nose.tools import eq_
from numpy import linspace
from numpy.testing import assert_array_almost_equal
from unittest import main
from spacq.interface.units import Quantity
from spacq.tests.tool.box import AssertHandler, DeviceServerTestCase
from ... import awg5014b... | bsd-2-clause |
nuuuboo/odoo | addons/account/wizard/account_fiscalyear_close.py | 222 | 15660 | # -*- 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 |
dezynetechnologies/odoo | addons/portal_project_issue/__openerp__.py | 375 | 1713 | # -*- 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 |
decvalts/iris | lib/iris/tests/unit/fileformats/grib/message/test__GribMessage.py | 5 | 10209 | # (C) British Crown Copyright 2014 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | gpl-3.0 |
vmayoral/ardupilot | Tools/LogAnalyzer/tests/TestIMUMatch.py | 84 | 4067 | from LogAnalyzer import Test,TestResult
import DataflashLog
from math import sqrt
class TestIMUMatch(Test):
'''test for empty or near-empty logs'''
def __init__(self):
Test.__init__(self)
self.name = "IMU Mismatch"
def run(self, logdata, verbose):
#tuning parameters:
war... | gpl-3.0 |
segrey/npm | node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py | 1363 | 58344 | # 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.
import filecmp
import gyp.common
import gyp.xcodeproj_file
import gyp.xcode_ninja
import errno
import os
import sys
import posixpath
import re
import shutil
import... | artistic-2.0 |
goodwinnk/intellij-community | python/helpers/pydev/tests_pydevd/test_jyserver.py | 11 | 4259 | '''
@author Fabio Zadrozny
'''
import sys
import unittest
import socket
import urllib
import pytest
import pycompletionserver
IS_JYTHON = sys.platform.find('java') != -1
DEBUG = 0
def dbg(s):
if DEBUG:
sys.stdout.write('TEST %s\n' % s)
@pytest.mark.skipif(not IS_JYTHON, reason='Jython related test')
cla... | apache-2.0 |
apixandru/intellij-community | python/lib/Lib/site-packages/django/contrib/gis/geos/tests/test_io.py | 321 | 4159 | import binascii, ctypes, unittest
from django.contrib.gis.geos import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter, geos_version_info
class GEOSIOTest(unittest.TestCase):
def test01_wktreader(self):
# Creating a WKTReader instance
wkt_r = WKTReader()
wkt = 'POINT (5 23)'
... | apache-2.0 |
ibressler/pyqtgraph | pyqtgraph/widgets/GraphicsView.py | 1 | 14821 | # -*- coding: utf-8 -*-
"""
GraphicsView.py - Extension of QGraphicsView
Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more infomation.
"""
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph as pg
try:
from pyqtgraph.Qt import QtOpenGL
HAVE_OPENGL = True
except ... | mit |
arborh/tensorflow | tensorflow/python/training/learning_rate_decay.py | 7 | 29596 | # 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 |
mscherer/ansible | v1/ansible/runner/action_plugins/fetch.py | 110 | 7941 | # (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 |
Radagast-red/golem | golem/core/databuffer.py | 2 | 4612 | import struct
from variables import LONG_STANDARD_SIZE
MAX_BUFFER_SIZE = 2 * 1024 * 1024
class DataBuffer:
""" Data buffer that helps with network communication. """
def __init__(self):
""" Create new data buffer """
self.buffered_data = ""
def append_ulong(self, num):
... | gpl-3.0 |
watonyweng/horizon | openstack_dashboard/dashboards/identity/groups/urls.py | 64 | 1248 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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 |
abims-sbr/bioconda-recipes | recipes/snpsift/snpsift.py | 143 | 2604 | #!/usr/bin/env python
#
# Wrapper script for Java Conda packages that ensures that the java runtime
# is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128).
#
# Program Parameters
#
import os
import s... | mit |
sjlehtin/django | django/core/mail/message.py | 14 | 17159 | import mimetypes
import os
from email import (
charset as Charset, encoders as Encoders, generator, message_from_string,
)
from email.errors import InvalidHeaderDefect, NonASCIILocalPartDefect
from email.header import Header
from email.headerregistry import Address
from email.message import Message
from email.mime.... | bsd-3-clause |
debugger22/sympy | sympy/calculus/tests/test_codomain.py | 21 | 4793 | from sympy import Symbol, S, oo, sqrt
from sympy.calculus.codomain import codomain, not_empty_in
from sympy.sets.sets import Interval, FiniteSet, Complement, Union
from sympy.utilities.pytest import XFAIL, raises
def test_codomain():
x = Symbol('x', real=True)
assert codomain(x, Interval(-1, 1), x) == Interva... | bsd-3-clause |
abhikeshav/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_aaa_protocol_radius_oper.py | 1 | 92535 | """ Cisco_IOS_XR_aaa_protocol_radius_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR aaa\-protocol\-radius package operational data.
This module contains definitions
for the following management objects\:
radius\: RADIUS operational data
This YANG module augments the
Cisco\-IOS\-XR\... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.