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 |
|---|---|---|---|---|---|
cancerregulome/gidget | commands/feature_matrix_construction/main/parse_tcga_repeat_features.py | 1 | 20264 | '''
Created on Jun 18, 2012
this is a refactoring of sheila's new_Level3_matrix script into an OO
approach
this test version duplicates features to test tsvIO.duplicateFeatureLabels()
@author: m.miller
'''
import ConfigParser
from datetime import datetime
import os
import sys
import traceback
import miscIO
import ... | mit |
newrocknj/horizon | openstack_dashboard/dashboards/project/firewalls/tables.py | 21 | 14346 | # Copyright 2013, Big Switch Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 |
NEERAJIITKGP/pybbm | docs/conf.py | 16 | 6957 | # -*- coding: utf-8 -*-
#
# PyBBM documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 22 16:28:25 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | bsd-2-clause |
gavoski/audacity | lib-src/lv2/lv2/plugins/eg03-metro.lv2/waflib/Tools/gnu_dirs.py | 329 | 2796 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os
from waflib import Utils,Options,Context
_options=[x.split(', ')for x in'''
bindir, user executables, ${EXEC_PREFIX}/bin
sbindir, system admin executables, ${EXEC_PR... | gpl-2.0 |
nemesisdesign/django | django/contrib/gis/measure.py | 100 | 12463 | # Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
# 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,
#... | bsd-3-clause |
wonjohnchoi/EE122-Project3 | pox/lib/packet/packet_base.py | 8 | 5057 | # Copyright 2011 James McCauley
# Copyright 2008 (C) Nicira, Inc.
#
# This file is part of POX.
#
# POX 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 |
ttsda/beets | beetsplug/ihate.py | 25 | 3034 | # This file is part of beets.
# Copyright 2015, Blemjhoo Tezoulbr <baobab@heresiarch.info>.
#
# 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 limitati... | mit |
xydinesh/webdev | flask/testsuite/ext.py | 57 | 4720 | # -*- coding: utf-8 -*-
"""
flask.testsuite.ext
~~~~~~~~~~~~~~~~~~~
Tests the extension import thing.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import sys
import unittest
from flask.testsuite import FlaskTestCase... | apache-2.0 |
amarzavery/AutoRest | src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyDate/auto_rest_date_test_service/models/error.py | 432 | 1285 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
shaheemirza/pupy | pupy/packages/windows/amd64/psutil/_psposix.py | 81 | 5085 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Routines common to all posix systems."""
import errno
import glob
import os
import sys
import time
from ._common import sdiskus... | bsd-3-clause |
blackye/luscan-devel | thirdparty_libs/requests/structures.py | 398 | 3575 | # -*- coding: utf-8 -*-
"""
requests.structures
~~~~~~~~~~~~~~~~~~~
Data structures that power Requests.
"""
import os
import collections
from itertools import islice
class IteratorProxy(object):
"""docstring for IteratorProxy"""
def __init__(self, i):
self.i = i
# self.i = chain.from_iter... | gpl-2.0 |
mganeva/mantid | Framework/PythonInterface/test/python/mantid/geometry/ComponentInfoTest.py | 1 | 20085 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 |
ppiotr/Invenio | modules/bibsched/lib/bibtask_config.py | 8 | 3589 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2008, 2009, 2010, 2011, 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## Licens... | gpl-2.0 |
jchevin/MissionPlanner-master | Lib/Bastion.py | 298 | 5744 | """Bastionification utility.
A bastion (for another object -- the 'original') is an object that has
the same methods as the original but does not give access to its
instance variables. Bastions have a number of uses, but the most
obvious one is to provide code executing in restricted mode with a
safe interface to an ... | gpl-3.0 |
abhikeshav/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_drivers_media_eth_oper.py | 1 | 182469 | """ Cisco_IOS_XR_drivers_media_eth_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR drivers\-media\-eth package operational data.
This module contains definitions
for the following management objects\:
ethernet\-interface\: Ethernet operational data
Copyright (c) 2013\-2015 by Cisco Sy... | apache-2.0 |
uannight/reposan | plugin.video.tvalacarta/lib/youtube_dl/extractor/vine.py | 24 | 5172 | # coding: utf-8
from __future__ import unicode_literals
import re
import itertools
from .common import InfoExtractor
from ..utils import (
determine_ext,
int_or_none,
unified_timestamp,
)
class VineIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?vine\.co/(?:v|oembed)/(?P<id>\w+)'
_TESTS = [... | gpl-2.0 |
zhangjunlei26/servo | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/http_header_util.py | 694 | 6905 | # Copyright 2011, 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 |
xgess/HTTPretty | tests/functional/__init__.py | 10 | 1274 | # #!/usr/bin/env python
# -*- coding: utf-8 -*-
# <HTTPretty - HTTP client mock for Python>
# Copyright (C) <2011-2013> Gabriel Falcão <gabriel@nacaolivre.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to d... | mit |
allenlavoie/tensorflow | tensorflow/compiler/tests/adam_test.py | 79 | 7193 | # 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 |
aleju/ImageAugmenter | imgaug/validation.py | 2 | 2574 | """Helper functions to validate input data and produce error messages."""
from __future__ import print_function, division, absolute_import
import imgaug as ia
def convert_iterable_to_string_of_types(iterable_var):
"""Convert an iterable of values to a string of their types.
Parameters
----------
ite... | mit |
gurneyalex/odoo | addons/stock/wizard/stock_picking_return.py | 4 | 10775 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_round
class ReturnPickingLine(models.TransientModel):
_name = "stock.return.picking.line"
_... | agpl-3.0 |
cliixtech/bigorna | tests/tasks/test_task_factory.py | 1 | 1725 | from unittest import TestCase
from unittest.mock import create_autospec
from nose.tools import istest, raises
from bigorna.commons.config import Config
from bigorna.tasks import TaskFactory, TaskDefinition
class TaskFactoryTest(TestCase):
def setUp(self):
TestCase.setUp(self)
self.out = "%s.out"... | gpl-3.0 |
gisce/openobject-server | openerp/report/render/rml2pdf/utils.py | 48 | 7022 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2003, Fabien Pinckaers, UCL, FSA
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesse... | agpl-3.0 |
WorldMG/production-email | lib/flask/exthook.py | 783 | 5087 | # -*- coding: utf-8 -*-
"""
flask.exthook
~~~~~~~~~~~~~
Redirect imports for extensions. This module basically makes it possible
for us to transition from flaskext.foo to flask_foo without having to
force all extensions to upgrade at the same time.
When a user does ``from flask.ext.foo import... | apache-2.0 |
ktan2020/legacy-automation | win/Lib/ctypes/test/test_struct_fields.py | 12 | 1553 | import unittest
from ctypes import *
class StructFieldsTestCase(unittest.TestCase):
# Structure/Union classes must get 'finalized' sooner or
# later, when one of these things happen:
#
# 1. _fields_ is set.
# 2. An instance is created.
# 3. The type is used as field of another Structur... | mit |
hrishioa/Aviato | flask/Scripts/gdal_polygonize.py | 1 | 6499 | #!C:\Users\SeanSaito\Dev\aviato\flask\Scripts\python.exe
# -*- coding: utf-8 -*-
#******************************************************************************
# $Id$
#
# Project: GDAL Python Interface
# Purpose: Application for converting raster data to a vector polygon layer.
# Author: Frank Warmerdam, warm... | gpl-2.0 |
kawasaki2013/python-for-android-x86 | python-modules/twisted/twisted/test/test_roots.py | 81 | 1823 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.trial import unittest
from twisted.python import roots
import types
class RootsTest(unittest.TestCase):
def testExceptions(self):
request = roots.Request()
try:
request.write("blah")
... | apache-2.0 |
3ffusi0on/Addicted-to-XDCC | Addict7ed.py | 1 | 3211 | #!/usr/bin/env python3.4
import sys
from PyQt4 import QtGui
import re
import os, sys
import subprocess
import urllib.request
import urllib.error
import hashlib
#TODO
#-input for the link of xdcc server
#-dl button ? or automatize the action
#- /!\ Configuration file /!\
def get_hash(name):
readsize = 64 * 1024
... | gpl-2.0 |
fangxingli/hue | desktop/core/ext-py/boto-2.38.0/boto/cloudfront/invalidation.py | 78 | 8056 | # Copyright (c) 2006-2010 Chris Moyer http://coredumped.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, mod... | apache-2.0 |
smarisa/neronet | test/test_specify_clusters.py | 2 | 1753 | import unittest
import tempfile
import os
import shutil
import neronet.neroman as neroman
import neronet.config_parser as config_parser
class TestSpecifyClusters(unittest.TestCase):
def setUp(self):
self.folder = tempfile.mkdtemp()
self.clusterpath = 'clusters.yaml'
os.chdir(self... | mit |
michaelni/audacity | lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/Tools/errcheck.py | 331 | 5821 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
typos={'feature':'features','sources':'source','targets':'target','include':'includes','export_include':'export_includes','define':'defines','importpath':'includes','installpa... | gpl-2.0 |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_express_route_service_providers_operations.py | 1 | 5203 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/raw/GL/NV/texture_shader.py | 9 | 4881 | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import ctypes
_... | gpl-3.0 |
cyberphox/MissionPlanner | Lib/site-packages/scipy/optimize/tests/test_linesearch.py | 53 | 8856 | """
Tests for line search routines
"""
import sys
from numpy.testing import assert_, assert_equal, dec, \
assert_array_almost_equal, assert_array_almost_equal_nulp
import scipy.optimize.linesearch as ls
import numpy as np
def assert_wolfe(s, phi, derphi, c1=1e-4, c2=0.9, err_msg=""):
"""
Check that stro... | gpl-3.0 |
alien4cloud/alien4cloud-cloudify3-provider | alien4cloud-cloudify3-provider/src/test/resources/outputs/blueprints/openstack/tomcat/wrapper/War/custom/update_war_file/_a4c_update_war_file.py | 6 | 17096 |
from cloudify import ctx
from cloudify.exceptions import NonRecoverableError
from cloudify.state import ctx_parameters as inputs
import subprocess
import os
import re
import sys
import time
import threading
import platform
from StringIO import StringIO
from cloudify_rest_client import CloudifyClient
from cloudify im... | apache-2.0 |
ThinkingBridge/platform_external_chromium_org | tools/traceline/traceline/scripts/syscalls.py | 189 | 37329 | # 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.
syscalls = {
0: "ntdll.dll!NtAcceptConnectPort",
1: "ntdll.dll!NtAccessCheck",
2: "ntdll.dll!ZwAccessCheckAndAuditAlarm",
3: "ntdll.dll!NtAccessCheckByTy... | bsd-3-clause |
strets123/rdkit | Code/GraphMol/Wrap/testConformer.py | 3 | 3539 | # $Id$
#
# Copyright (C) 2004 Rational Discovery LLC
# All Rights Reserved
#
from rdkit import RDConfig
import os,sys
import unittest
from rdkit import Chem
from rdkit.Geometry import Point3D
def feq(v1,v2,tol2=1e-4):
return abs(v1-v2)<=tol2
def ptEq(pt1, pt2, tol=1e-4):
return feq(pt1.x,pt2.x,tol) and ... | bsd-3-clause |
doduytrung/odoo-8.0 | addons/account_bank_statement_extensions/report/bank_statement_balance_report.py | 378 | 2723 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under ... | agpl-3.0 |
Leila20/django | tests/raw_query/tests.py | 16 | 12657 | from __future__ import unicode_literals
from datetime import date
from decimal import Decimal
from django.db.models.query_utils import InvalidQuery
from django.test import TestCase, skipUnlessDBFeature
from .models import Author, Book, BookFkAsPk, Coffee, FriendlyAuthor, Reviewer
class RawQueryTests(TestCase):
... | bsd-3-clause |
rob356/SickRage | autoProcessTV/autoProcessTV.py | 3 | 4401 | #!/usr/bin/env python
# Author: Nic Wolfe <nic@wolfeden.ca>
# 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 ve... | gpl-3.0 |
geometrybase/gensim | gensim/utils.py | 9 | 40280 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
This module contains various general utility functions.
"""
from __future__ import with_statement
import logging
logger = logging... | gpl-3.0 |
skevy/django | django/utils/unittest/loader.py | 353 | 13437 | """Loading unittests."""
import os
import re
import sys
import traceback
import types
import unittest
from fnmatch import fnmatch
from django.utils.unittest import case, suite
try:
from os.path import relpath
except ImportError:
from django.utils.unittest.compatibility import relpath
__unittest = True
de... | bsd-3-clause |
quanganh2627/android_device_asus_a500cg-1 | libintelprov/releasetools.py | 3 | 1199 | # Copyright (C) 2011 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 |
quoclieu/codebrew17-starving | env/lib/python3.5/site-packages/Crypto/SelfTest/IO/__init__.py | 12 | 1994 | #
# SelfTest/IO/__init__.py: Self-test for input/output module
#
# ===================================================================
#
# Copyright (c) 2014, Legrandin <helderijs@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | mit |
RedHatQE/cfme_tests | cfme/tests/services/test_service_manual_approval.py | 3 | 3629 | # -*- coding: utf-8 -*-
import fauxfactory
import pytest
from cfme import test_requirements
from cfme.automate.explorer.domain import DomainCollection
from cfme.infrastructure.provider import InfraProvider
from cfme.infrastructure.provider.rhevm import RHEVMProvider
from cfme.markers.env_markers.provider import ONE_PE... | gpl-2.0 |
JoePelz/SAM | sam/models/security/alerts.py | 2 | 7678 | import datetime
import time
import cPickle
import web
class AlertFilter:
def __init__(self, min_severity=0, limit=20, offset=0, age_limit=None, sort="id", order="DESC"):
"""
:param offset: first result to return
:type offset: int
:param min_severity: minimum severity (inclusive) t... | gpl-3.0 |
sjfloat/youtube-dl | youtube_dl/extractor/openfilm.py | 63 | 2297 | from __future__ import unicode_literals
import json
from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote_plus
from ..utils import (
parse_iso8601,
parse_age_limit,
int_or_none,
)
class OpenFilmIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)openfilm\.com/videos/(?P<id... | unlicense |
waseem18/oh-mainline | vendor/packages/kombu/kombu/pidbox.py | 23 | 12704 | """
kombu.pidbox
===============
Generic process mailbox.
"""
from __future__ import absolute_import
import socket
import warnings
from collections import defaultdict, deque
from copy import copy
from itertools import count
from threading import local
from time import time
from . import Exchange, Queue, Consumer, ... | agpl-3.0 |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/ipython_genutils/py3compat.py | 14 | 10712 | # coding: utf-8
"""Compatibility tricks for Python 3. Mainly to do with unicode."""
import functools
import os
import sys
import re
import shutil
import types
from .encoding import DEFAULT_ENCODING
def no_code(x, encoding=None):
return x
def decode(s, encoding=None):
encoding = encoding or DEFAULT_ENCODING
... | gpl-3.0 |
Firefly-Automation/Firefly | Firefly/automation/door_motion_triggered_lights/metadata.py | 1 | 1710 | AUTHOR = 'Zachary Priddy. (me@zpriddy.com)'
TITLE = 'Motion/Door Triggered Lights'
METADATA = {
'title': TITLE,
'author': AUTHOR,
'commands': ['execute'],
'interface': {
'sensors': {
'motion': {
'context': 'motion sensors to use to trigger light',
'filter': {
'mot... | apache-2.0 |
vicnet/weboob | modules/foncia/browser.py | 2 | 2089 | # -*- coding: utf-8 -*-
# Copyright(C) 2017 Phyks (Lucas Verney)
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 o... | lgpl-3.0 |
2014c2g19/2014c2g19 | exts/w2/static/Brython2.0.0-20140209-164925/Lib/base64.py | 733 | 13975 | #! /usr/bin/env python3
"""RFC 3548: Base16, Base32, Base64 Data Encodings"""
# Modified 04-Oct-1995 by Jack Jansen to use binascii module
# Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support
# Modified 22-May-2007 by Guido van Rossum to use bytes everywhere
import re
import struct
import binascii
_... | gpl-2.0 |
trondhindenes/ansible | lib/ansible/module_utils/network/vyos/vyos.py | 29 | 4718 | # 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 |
LamCiuLoeng/gap | ez_setup/__init__.py | 23 | 8955 | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | mit |
gauribhoite/personfinder | rtd/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py | 2801 | 1782 | ######################## 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... | apache-2.0 |
belmiromoreira/nova | nova/tests/unit/scheduler/weights/test_weights_ram.py | 73 | 4062 | # Copyright 2011-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... | apache-2.0 |
endlessm/chromium-browser | third_party/catapult/third_party/gsutil/gslib/vendored/boto/tests/unit/emr/test_connection.py | 19 | 39107 | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# 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 right... | bsd-3-clause |
oberlin/django | django/core/management/commands/loaddata.py | 294 | 12977 | from __future__ import unicode_literals
import glob
import gzip
import os
import warnings
import zipfile
from itertools import product
from django.apps import apps
from django.conf import settings
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.management.b... | bsd-3-clause |
Sodki/ansible | lib/ansible/modules/identity/ipa/ipa_sudocmd.py | 71 | 6199 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 |
fp12/achallonge | challonge/enums.py | 1 | 1529 | from enum import Enum
class TournamentState(Enum):
""" State a tournament can be in """
pending = 'pending'
open_ = 'open' #: can't use `open`
complete = 'complete'
in_progress = 'in progress'
class TournamentType(Enum):
""" Type of a tournament """
single_elimination = 'single eliminat... | mit |
BhallaLab/moose | moose-gui/plugins/kkitOrdinateUtil.py | 1 | 19921 | __author__ = "HarshaRani"
__credits__ = ["Upi Lab"]
__license__ = "GPL3"
__version__ = "1.0.0"
__maintainer__ = "HarshaRani"
__email__ = "hrani@ncbs.res.in"
__status__ = "Development"
__updated__ = "Oct 26 2018"
'''
2018
Oct 26: xfer molecules are not put into screen
Se... | gpl-3.0 |
shigin/radist | radist/content.py | 1 | 10660 | """This module contains method to handle varios URI scheme."""
import os, sys
import re
import itertools
import urllib2
import ftplib
import socket
import netrc
from warnings import warn
from radist.helpers import R_SUB2
scheme = re.compile('(?P<scheme>[a-z]+)://(?P<host>[a-z:0-9.]+)/(?P<path>.*)')
localhost = socket.g... | bsd-2-clause |
thaim/ansible | lib/ansible/modules/cloud/vmware/vmware_guest_snapshot_info.py | 21 | 6210 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# 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__ = t... | mit |
surligas/gnuradio | gr-channels/python/channels/qa_fading_model.py | 47 | 1949 | #!/usr/bin/env python
#
# Copyright 2012,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 optio... | gpl-3.0 |
fpy171/django | tests/generic_views/views.py | 286 | 7527 | from __future__ import unicode_literals
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator
from django.core.urlresolvers import reverse, reverse_lazy
from django.utils.decorators import method_decorator
from django.views import generic
from .models import Artist, Aut... | bsd-3-clause |
mccheung/kbengine | kbe/res/scripts/common/Lib/site-packages/pip/commands/show.py | 344 | 2767 | import os
from pip.basecommand import Command
from pip.log import logger
from pip._vendor import pkg_resources
class ShowCommand(Command):
"""Show information about one or more installed packages."""
name = 'show'
usage = """
%prog [options] <package> ..."""
summary = 'Show information about in... | lgpl-3.0 |
leighpauls/k2cro4 | ppapi/native_client/tools/browser_tester/browsertester/server.py | 17 | 8732 | # 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.
import BaseHTTPServer
import cgi
import mimetypes
import os
import os.path
import posixpath
import SimpleHTTPServer
import SocketServer
import threading
... | bsd-3-clause |
randomrandomlol123/fewgewgewgewhg | reg.py | 1 | 44174 | import asyncio
import requests
import sys
from random import randint
from random import choice
from time import sleep
from concurrent.futures import ProcessPoolExecutor
def dprint(data):
print(data)
sys.stdout.flush()
class main:
def __init__(self):
self.captchaKey = '373c86b245bad384e69a93bb8060162a'
def cre... | gpl-3.0 |
rishilification/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py | 127 | 4570 | # Copyright (c) 2010 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 |
Kazade/NeHe-Website | google_appengine/lib/django_1_2/django/utils/translation/__init__.py | 64 | 3222 | """
Internationalization support.
"""
from django.utils.encoding import force_unicode
from django.utils.functional import lazy, curry
__all__ = ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext',
'ngettext_lazy', 'string_concat', 'activate', 'deactivate',
'get_language', 'get_language_bidi', 'get_... | bsd-3-clause |
Bitl/RBXLegacy-src | Cut/RBXLegacyDiscordBot/lib/urllib3/response.py | 42 | 22805 | from __future__ import absolute_import
from contextlib import contextmanager
import zlib
import io
import logging
from socket import timeout as SocketTimeout
from socket import error as SocketError
from ._collections import HTTPHeaderDict
from .exceptions import (
BodyNotHttplibCompatible, ProtocolError, DecodeErr... | gpl-3.0 |
wankunde/cloudera_hadoop | hadoop-mapreduce1-project/src/contrib/cloud/src/py/hadoop/cloud/providers/ec2.py | 16 | 18676 | # 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 |
danakj/chromium | build/gyp_environment.py | 2 | 1214 | # Copyright 2014 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.
"""
Sets up various automatic gyp environment variables. These are used by
gyp_chromium and landmines.py which run at different stages of runhooks. To
make s... | bsd-3-clause |
doksu/TA-centralops | bin/splunklib/modularinput/validation_definition.py | 4 | 2775 | # Copyright 2011-2015 Splunk, 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 wri... | mit |
brandond/ansible | lib/ansible/modules/system/awall.py | 50 | 4437 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ted Trask <ttrask01@yahoo.com>
# 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': '... | gpl-3.0 |
scorpionis/docklet | web/webViews/authenticate/auth.py | 4 | 1405 | from flask import session, request, abort, redirect
from functools import wraps
def login_required(func):
@wraps(func)
def wrapper(*args, **kwargs):
if request.method == 'POST' :
if not is_authenticated():
abort(401)
else:
return func(*args, **kw... | bsd-3-clause |
comipayan/googletest | scripts/upload.py | 2511 | 51024 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | bsd-3-clause |
vinegret/youtube-dl | setup.py | 15 | 4621 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import os.path
import warnings
import sys
try:
from setuptools import setup, Command
setuptools_available = True
except ImportError:
from distutils.core import setup, Command
setuptools_available = False
from distutils.spawn ... | unlicense |
follow99/django | django/contrib/messages/storage/cookie.py | 471 | 6545 | import json
from django.conf import settings
from django.contrib.messages.storage.base import BaseStorage, Message
from django.http import SimpleCookie
from django.utils import six
from django.utils.crypto import constant_time_compare, salted_hmac
from django.utils.safestring import SafeData, mark_safe
class Message... | bsd-3-clause |
wouwei/PiLapse | picam/picamEnv/Lib/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py | 436 | 12855 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
try:
from functools import reduce
except ImportError:
pass
from ..constants import voidElements, booleanAttributes, spaceCharacters
from ..constants import rcdataElements, entities, xmlEntities
from .. imp... | apache-2.0 |
CodeMath/jinrockets | BluePrint/lib/sqlalchemy/testing/engines.py | 75 | 13114 | # testing/engines.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from __future__ import absolute_import
import types
import weakref
from collection... | mit |
pramsey/mapnik | scons/scons-time.py | 9 | 50434 | #!/usr/bin/env python
#
# scons-time - run SCons timings and collect statistics
#
# A script for running a configuration through SCons with a standard
# set of invocations to collect timing and memory statistics and to
# capture the results in a consistent set of output files for display
# and analysis.
#
#
# Copyrigh... | lgpl-2.1 |
hernad/erpnext | erpnext/config/hr.py | 28 | 4504 | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Employee",
"description": _("Employee records."),
},
{
"type": "doctype",
"name": "Leave Applic... | agpl-3.0 |
nowls/gnuradio | gr-blocks/python/blocks/qa_file_metadata.py | 40 | 6783 | #!/usr/bin/env python
#
# Copyright 2012,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 optio... | gpl-3.0 |
strongswan/strongTNC | apps/devices/paging.py | 1 | 5001 | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import math
from .models import Device, Product
from apps.core.models import Session
from apps.devices.models import Device
from apps.swid.models import Event
from apps.front.paging import ProducerFactory
# PA... | agpl-3.0 |
theseyi/WhereHows | wherehows-etl/src/main/resources/jython/DatasetTreeBuilder.py | 6 | 3348 | #
# Copyright 2015 LinkedIn Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 |
openstack/sahara | sahara/utils/files.py | 1 | 1190 | # Copyright (c) 2013 Mirantis 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 |
EvanK/ansible-modules-core | files/synchronize.py | 25 | 18182 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012-2013, Timothy Appnel <tim@appnel.com>
#
# 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 |
HesselTjeerdsma/Cyber-Physical-Pacman-Game | Algor/flask/lib/python2.7/site-packages/numpy/core/tests/test_deprecations.py | 9 | 18802 | """
Tests related to deprecation warnings. Also a convenient place
to document how deprecations should eventually be turned into errors.
"""
from __future__ import division, absolute_import, print_function
import datetime
import sys
import operator
import warnings
import numpy as np
from numpy.testing import (
r... | apache-2.0 |
crhym3/bs2gcs | mapreduce/lib/simplejson/encoder.py | 77 | 15810 | #!/usr/bin/env python
"""Implementation of JSONEncoder
"""
import re
try:
from mapreduce.lib.simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from mapreduce.lib.simplejson._speedups import make_encoder as c_make_encod... | mit |
adviti/melange | thirdparty/google_appengine/google/storage/speckle/python/django/backend/base.py | 1 | 8172 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
sfam/home-assistant | tests/components/alarm_control_panel/test_manual.py | 8 | 10786 | """
tests.components.alarm_control_panel.test_manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests manual alarm control panel component.
"""
from datetime import timedelta
import unittest
from unittest.mock import patch
import homeassistant.core as ha
from homeassistant.const import (
STATE_ALARM_DISARME... | mit |
imclab/confer | server/auth.py | 1 | 12729 | import json, sys, re, hashlib, smtplib, base64, urllib, os
from django.http import *
from django.shortcuts import render_to_response
from django.views.decorators.csrf import csrf_exempt
from django.core.context_processors import csrf
from django.core.validators import email_re
from django.db.utils import IntegrityErro... | mit |
alvaroaleman/ansible | lib/ansible/modules/cloud/ovirt/ovirt_host_networks.py | 11 | 13893 | #!/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 |
ingadhoc/odoo-support | server_mode/__manifest__.py | 1 | 1354 | ##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | lgpl-3.0 |
AladdinSonni/youtube-dl | youtube_dl/extractor/footyroom.py | 104 | 1590 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class FootyRoomIE(InfoExtractor):
_VALID_URL = r'http://footyroom\.com/(?P<id>[^/]+)'
_TESTS = [{
'url': 'http://footyroom.com/schalke-04-0-2-real-madrid-2015-02/',
'info_dict': {
'id': 'scha... | unlicense |
micahmicah/new-years-2016 | _site/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/xcode_emulation.py | 92 | 64156 | # 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.
"""
This module contains classes that help to emulate xcodebuild behavior on top of
other build systems, such as make and ninja.
"""
import copy
import gyp.common... | mit |
mccheung/kbengine | kbe/res/scripts/common/Lib/unittest/test/test_setups.py | 81 | 16426 | import io
import sys
import unittest
def resultFactory(*_):
return unittest.TestResult()
class TestSetups(unittest.TestCase):
def getRunner(self):
return unittest.TextTestRunner(resultclass=resultFactory,
stream=io.StringIO())
def runTests(self, *cases... | lgpl-3.0 |
ahmed-mahran/hue | desktop/core/ext-py/Django-1.6.10/django/utils/unittest/suite.py | 219 | 9301 | """TestSuite"""
import sys
import unittest
from django.utils.unittest import case, util
__unittest = True
class BaseTestSuite(unittest.TestSuite):
"""A simple test suite that doesn't provide class or module shared fixtures.
"""
def __init__(self, tests=()):
self._tests = []
self.addTests... | apache-2.0 |
misterhat/youtube-dl | youtube_dl/extractor/dfb.py | 87 | 2255 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import unified_strdate
class DFBIE(InfoExtractor):
IE_NAME = 'tv.dfb.de'
_VALID_URL = r'https?://tv\.dfb\.de/video/(?P<display_id>[^/]+)/(?P<id>\d+)'
_TEST = {
'url': 'http://tv.dfb.de/video/u-19-em... | unlicense |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.