repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
mbareta/edx-platform-ft | common/djangoapps/track/views/tests/test_segmentio.py | 11 | 22013 | """Ensure we can parse events sent to us from the Segment webhook integration"""
from datetime import datetime
import json
from ddt import ddt, data, unpack
from mock import sentinel
from nose.plugins.attrib import attr
from django.contrib.auth.models import User
from django.test.client import RequestFactory
from dj... | agpl-3.0 |
wateraccounting/SEBAL | PreSEBAL/preSEBAL.py | 1 | 110216 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 08 15:09:49 2016
#test Github
@author: tih
"""
import numpy as np
import os
import scipy.interpolate
import gdal
from openpyxl import load_workbook
import osr
from datetime import datetime, timedelta
import pandas as pd
import shutil
import glob
from netCDF4 import Dataset... | apache-2.0 |
benschmaus/catapult | telemetry/telemetry/internal/platform/mac_platform_backend.py | 1 | 7073 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import ctypes
import os
import platform
import subprocess
import sys
import time
from telemetry.core import os_version as os_version_module
from telemetry i... | bsd-3-clause |
akintoey/django | tests/ordering/models.py | 261 | 1379 | """
Specifying ordering
Specify default ordering for a model using the ``ordering`` attribute, which
should be a list or tuple of field names. This tells Django how to order
``QuerySet`` results.
If a field name in ``ordering`` starts with a hyphen, that field will be
ordered in descending order. Otherwise, it'll be ... | bsd-3-clause |
fintech-circle/edx-platform | lms/djangoapps/commerce/tests/test_utils.py | 1 | 4317 | """Tests of commerce utilities."""
from django.conf import settings
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils import override_settings
from mock import patch
from waffle.testutils import override_switch
from commerce.models import CommerceConfiguration
from c... | agpl-3.0 |
YuepengGuo/backtrader | backtrader/feeds/blaze.py | 2 | 2832 | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 |
wkeyword/pip | pip/_vendor/requests/packages/chardet/mbcssm.py | 1783 | 19590 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit |
SummerLW/Perf-Insight-Report | telemetry/telemetry/internal/platform/network_controller_backend_unittest.py | 1 | 14322 | # 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.
import os
import mock
import unittest
from telemetry.internal import forwarders
from telemetry.internal.platform import network_controller_backend
from tele... | bsd-3-clause |
kylepolich/sandbox | andrew/example.py | 1 | 2031 | #!/usr/bin/python
import daemon
import web
import sys
import os
port=8081
header = '<html><body><a href="/car/list">List</a> | <a href="/car/set">Set</a> | <a href="/goodbye">Terminate Server</a><br/>'
footer = '</body></html>'
class hello:
def GET(self):
return header + footer
class car_list:
def GET(self)... | cc0-1.0 |
ricotabor/opendrop | site_scons/site_tools/cython.py | 2 | 8689 | import os
import re
import shlex
import subprocess
from SCons.Scanner import FindPathDirs
from SCons.Script import Action, Builder
def exists(env):
return env.Detect('cython')
def generate(env):
env.Tool('python')
env.SetDefault(CYTHONPATH=[])
env['BUILDERS']['Cython'] = Builder(
action=A... | gpl-2.0 |
iDTLabssl/kitsune | kitsune/settings_test.py | 16 | 1298 | # The test system uses this to override settings in settings.py and
# settings_local.py with settings appropriate for testing.
import os
ES_LIVE_INDEXING = False
ES_INDEX_PREFIX = 'sumotest'
ES_INDEXES = {
'default': 'test-default',
'non-critical': 'test-non-critical',
'metrics': 'test-metrics',
}
ES_WRITE... | bsd-3-clause |
xubenben/scikit-learn | sklearn/cross_decomposition/cca_.py | 209 | 3150 | from .pls_ import _PLS
__all__ = ['CCA']
class CCA(_PLS):
"""CCA Canonical Correlation Analysis.
CCA inherits from PLS with mode="B" and deflation_mode="canonical".
Read more in the :ref:`User Guide <cross_decomposition>`.
Parameters
----------
n_components : int, (default 2).
numb... | bsd-3-clause |
Buckmarble/Elite_Lunar_kernel | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
vladikr/nova_drafts | nova/db/sqlalchemy/migrate_repo/versions/252_add_instance_extra_table.py | 29 | 2574 | # 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
# d... | apache-2.0 |
yeyuexia/shadowsocks | setup.py | 929 | 1321 | import codecs
from setuptools import setup
with codecs.open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(
name="shadowsocks",
version="2.8.2",
license='http://www.apache.org/licenses/LICENSE-2.0',
description="A fast tunnel proxy that help you get through firewalls",
... | apache-2.0 |
grantcoin/grantcoin-new | contrib/p2pool/wstools/WSDLTools.py | 292 | 60641 | # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISC... | agpl-3.0 |
tylertian/Openstack | openstack F/python-glanceclient/tests/test_exc.py | 3 | 1035 | # Copyright 2012 OpenStack LLC.
# 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 b... | apache-2.0 |
savoirfairelinux/OpenUpgrade | addons/hw_escpos/controllers/main.py | 125 | 14043 | # -*- coding: utf-8 -*-
import commands
import logging
import simplejson
import os
import os.path
import io
import base64
import openerp
import time
import random
import math
import md5
import openerp.addons.hw_proxy.controllers.main as hw_proxy
import pickle
import re
import subprocess
import traceback
from threading ... | agpl-3.0 |
kastriothaliti/techstitution | venv/lib/python2.7/site-packages/jinja2/loaders.py | 333 | 17380 | # -*- coding: utf-8 -*-
"""
jinja2.loaders
~~~~~~~~~~~~~~
Jinja loader classes.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
import weakref
from types import ModuleType
from os import path
from hashlib import sha1
from jinja2.excepti... | gpl-3.0 |
sechacking/MITMf | plugins/browsersniper.py | 26 | 6804 | #!/usr/bin/env python2.7
# Copyright (c) 2014-2016 Marcello Salvati
#
# 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-3.0 |
colinligertwood/odoo | addons/base_gengo/__openerp__.py | 68 | 2119 | # -*- 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 |
PlayUAV/MissionPlanner | Lib/xml/sax/saxutils.py | 53 | 10131 | """\
A library of useful helper classes to the SAX classes, for the
convenience of application and driver writers.
"""
import os, urlparse, urllib, types
import handler
import xmlreader
try:
_StringTypes = [types.StringType, types.UnicodeType]
except AttributeError:
_StringTypes = [types.StringTyp... | gpl-3.0 |
Zanzibar82/streamondemand.test | lib/gdata/geo/__init__.py | 249 | 6006 | # -*-*- encoding: utf-8 -*-*-
#
# This is gdata.photos.geo, implementing geological positioning in gdata structures
#
# $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $
#
# Copyright 2007 Håvard Gulldahl
# Portions copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");... | gpl-3.0 |
40223245/2015cdb_g6-team1 | static/Brython3.1.1-20150328-091302/Lib/warnings.py | 752 | 13825 | """Python part of the warnings subsystem."""
# Note: function level imports should *not* be used
# in this module as it may cause import lock deadlock.
# See bug 683658.
import linecache
import sys
__all__ = ["warn", "showwarning", "formatwarning", "filterwarnings",
"resetwarnings", "catch_warnings"]
def... | gpl-3.0 |
hadjian/gtest-1.6.0 | test/gtest_xml_output_unittest.py | 397 | 11279 | #!/usr/bin/env python
#
# Copyright 2006, 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 |
p4datasystems/CarnotKEdist | dist/Lib/test/test_codecencodings_kr.py | 149 | 2750 | #!/usr/bin/env python
#
# test_codecencodings_kr.py
# Codec encoding tests for ROK encodings.
#
from test import test_support
from test import test_multibytecodec_support
import unittest
class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase):
encoding = 'cp949'
tstring = test_multibytecod... | apache-2.0 |
rds0751/colinkers | env/Lib/site-packages/django/utils/log.py | 85 | 6462 | from __future__ import unicode_literals
import logging
import logging.config # needed when logging_config doesn't start with logging.config
from copy import copy
from django.conf import settings
from django.core import mail
from django.core.mail import get_connection
from django.core.management.color import color_st... | agpl-3.0 |
eonpatapon/nova | nova/tests/unit/objects/test_aggregate.py | 30 | 7793 | # Copyright 2013 IBM Corp.
#
# 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 agree... | apache-2.0 |
fgesora/odoo | addons/sale_journal/__openerp__.py | 262 | 2637 | # -*- 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 |
choderalab/YankTools | testsystems/systems.py | 1 | 74487 | #!/usr/local/bin/env python
"""
Module to generate Systems and positions for simple reference molecular systems for testing.
DESCRIPTION
This module provides functions for building a number of test systems of varying complexity,
useful for testing both OpenMM and various codes based on pyopenmm.
Note that the PYOPE... | gpl-2.0 |
eLvErDe/nicotine-plus | plugins/plugindebugger/__init__.py | 1 | 3009 | from pynicotine.pluginsystem import BasePlugin
def enable(plugins):
global PLUGIN
PLUGIN = Plugin(plugins)
def disable(plugins):
global PLUGIN
PLUGIN = None
class Plugin(BasePlugin):
__name__ = "Plugin Debugger"
__version__ = "2009-05-27r00"
__author__ = "quinox"
__desc__ = """Plug... | gpl-3.0 |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/pygame/examples/macosx/aliens_app_example/aliens.py | 17 | 9634 | #! /usr/bin/env python
import random, os.path
#import basic pygame modules
import pygame
from pygame.locals import *
#see if we can load more than standard BMP
if not pygame.image.get_extended():
raise SystemExit("Sorry, extended image module required")
#game constants
MAX_SHOTS = 2 #most player bull... | gpl-3.0 |
lhellebr/GreenTea | apps/core/admin.py | 2 | 10226 | #!/bin/python
# -*- coding: utf-8 -*-
# Author: Pavel Studenik
# Email: pstudeni@redhat.com
# Date: 24.9.2013
import reversion
from django.contrib import admin
from django.core.urlresolvers import reverse
from models import (Arch, Author, CheckProgress, Distro, DistroTemplate, Event,
FileLog, Git... | gpl-2.0 |
Edraak/edraak-platform | cms/djangoapps/contentstore/views/library.py | 14 | 10232 | """
Views related to content libraries.
A content library is a structure containing XBlocks which can be re-used in the
multiple courses.
"""
from __future__ import absolute_import
import logging
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.exceptions imp... | agpl-3.0 |
vlegoff/tsunami | src/secondaires/navigation/editeurs/matedit/__init__.py | 1 | 5288 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# 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
# ... | bsd-3-clause |
kogotko/carburetor | openstack_dashboard/api/rest/keystone.py | 1 | 19555 | # Copyright 2014, Rackspace, US, 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 w... | apache-2.0 |
Drooids/odoo | addons/l10n_multilang/__init__.py | 438 | 1082 | # -*- 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 |
ultilix/catawampus | tr/vendor/bup/lib/bup/ssh.py | 8 | 1763 | """SSH connection.
Connect to a remote host via SSH and execute a command on the host.
"""
import sys, os, re, subprocess
from bup import helpers, path
def connect(rhost, port, subcmd):
"""Connect to 'rhost' and execute the bup subcommand 'subcmd' on it."""
assert(not re.search(r'[^\w-]', subcmd))
nicedir... | apache-2.0 |
vinutah/apps | tools/llvm/llvm_39/opt/bindings/python/llvm/tests/test_disassembler.py | 97 | 1475 | from .base import TestBase
from ..disassembler import Disassembler, Option_UseMarkup
class TestDisassembler(TestBase):
def test_instantiate(self):
Disassembler('i686-apple-darwin9')
def test_basic(self):
sequence = '\x67\xe3\x81' # jcxz -127
triple = 'i686-apple-darwin9'
dis... | gpl-3.0 |
yg257/Pangea | lib/boto-2.34.0/boto/ec2/elb/healthcheck.py | 185 | 3775 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 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 wi... | apache-2.0 |
hdemeyer/king-phisher | king_phisher/client/tabs/campaign.py | 1 | 27197 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/client/tabs/campaign.py
#
# 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
# not... | bsd-3-clause |
JFriel/honours_project | venv/lib/python2.7/site-packages/numpy/core/tests/test_longdouble.py | 65 | 5845 | from __future__ import division, absolute_import, print_function
import locale
import numpy as np
from numpy.testing import (
run_module_suite, assert_, assert_equal, dec, assert_raises,
assert_array_equal, TestCase, temppath,
)
from numpy.compat import sixu
from test_print import in_foreign_locale
longdoubl... | gpl-3.0 |
pf/enso | enso/contrib/evaluate.py | 8 | 5500 | # 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 |
CopeX/odoo | addons/procurement/procurement.py | 151 | 15839 | # -*- 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 |
noba3/KoTos | addons/script.module.youtube.dl/lib/youtube_dl/extractor/sunporno.py | 127 | 2384 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
int_or_none,
qualities,
determine_ext,
)
class SunPornoIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?sunporno\.com/videos/(?P<id>\d+)'
_TEST = {
'url': 'ht... | gpl-2.0 |
adrian-zumbler/IdealNews | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/colorful.py | 364 | 2778 | # -*- coding: utf-8 -*-
"""
pygments.styles.colorful
~~~~~~~~~~~~~~~~~~~~~~~~
A colorful style, inspired by CodeRay.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, ... | mit |
Haibo-Wang-ORG/pytest | _pytest/pdb.py | 27 | 3415 | """ interactive debugging with PDB, the Python Debugger. """
from __future__ import absolute_import
import pdb
import sys
import pytest
def pytest_addoption(parser):
group = parser.getgroup("general")
group._addoption('--pdb',
action="store_true", dest="usepdb", default=False,
h... | mit |
Atlas-Sailed-Co/oppia | core/domain/gadget_registry_test.py | 24 | 1686 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 |
Ghalko/osf.io | tests/test_permissions.py | 58 | 1302 | # -*- coding: utf-8 -*-
"""Tests for the permissions module."""
import unittest
from nose.tools import * # PEP8 asserts
from website.util import permissions
def test_expand_permissions():
result = permissions.expand_permissions('admin')
assert_equal(result, ['read', 'write', 'admin'])
result2 = permiss... | apache-2.0 |
julien78910/CouchPotatoServer | libs/chardet/langcyrillicmodel.py | 2762 | 17725 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | gpl-3.0 |
sasukeh/neutron | neutron/tests/unit/plugins/oneconvergence/test_plugin_helper.py | 43 | 2504 | # Copyright 2014 OneConvergence, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 |
harshilasu/LinkurApp | y/google-cloud-sdk/platform/gsutil/third_party/boto/boto/file/bucket.py | 97 | 4075 | # Copyright 2010 Google Inc.
# Copyright (c) 2011, Nexenta Systems 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... | gpl-3.0 |
apyrgio/synnefo | snf-cyclades-app/synnefo/volume/util.py | 6 | 4183 | # Copyright (C) 2010-2014 GRNET S.A.
#
# 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.
#
# This program is distributed i... | gpl-3.0 |
40223136/w17test2 | static/Brython3.1.0-20150301-090019/Lib/xml/dom/domreg.py | 841 | 3402 | """Registration facilities for DOM. This module should not be used
directly. Instead, the functions getDOMImplementation and
registerDOMImplementation should be imported from xml.dom."""
# This is a list of well-known implementations. Well-known names
# should be published by posting to xml-sig@python.org, and are
# ... | gpl-3.0 |
horance-liu/tensorflow | tensorflow/python/estimator/estimator_lib.py | 13 | 3243 | # 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 |
magul/pywikibot-core | scripts/isbn.py | 1 | 42218 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This script reports and fixes invalid ISBN numbers.
Additionally, it can convert all ISBN-10 codes to the ISBN-13 format, and
correct the ISBN format by placing hyphens.
These command line parameters can be used to specify which pages to work on:
¶ms;
Furthermore, t... | mit |
adityacs/ansible | lib/ansible/utils/module_docs_fragments/openswitch.py | 166 | 4001 | #
# (c) 2015, Peter Sprygada <psprygada@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | gpl-3.0 |
vaishalitekale/treeherder | tests/etl/test_perf_data_adapters.py | 1 | 2747 | import json
import zlib
from tests.sampledata import SampleData
from treeherder.etl.perf_data_adapters import TalosDataAdapter
def test_adapt_and_load():
talos_perf_data = SampleData.get_talos_perf_data()
tda = TalosDataAdapter()
result_count = 0
for datum in talos_perf_data:
datum = {
... | mpl-2.0 |
mschurenko/ansible-modules-core | cloud/rackspace/rax_clb_nodes.py | 43 | 8603 | #!/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 distributed... | gpl-3.0 |
yugangw-msft/azure-cli | src/azure-cli/azure/cli/command_modules/kusto/_params.py | 6 | 1902 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit |
yanirs/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/common.py | 489 | 9947 | # Copyright 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 f... | mpl-2.0 |
GuneetAtwal/Blaze.Kernel-MT6589 | 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 |
yamila-moreno/django | tests/gis_tests/gdal_tests/test_geom.py | 256 | 20748 | import json
import unittest
from binascii import b2a_hex
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.utils.six.moves import range
from ..test_data import TestDataMixin
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
if... | bsd-3-clause |
vanloswang/conky_all | conky_colors/conkycolors/scripts/conkyGoogleReader.py | 7 | 12797 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
###############################################################################
# conkyEmail.py is a simple python script to gather
# details of google reader subscriptions for use in conky.
#
# Author: Kaivalagi
# Created: 09/07/2008
#
# 18/05/2009 Updated to expa... | gpl-3.0 |
blakfeld/ansible | contrib/inventory/libvirt_lxc.py | 132 | 1324 | #!/usr/bin/env python
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# 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 o... | gpl-3.0 |
hexastorm/opticaldesign | simulation.py | 1 | 3946 | %pylab inline
import warnings
import numpy as np
import matplotlib.pyplot as plt
import rayopt as ro
# Lens used 12.5mm Dia. x 90mm FL, VIS-NIR, Inked, Achromatic Lens from Edmund Optics
# LINK: http://www.edmundoptics.com/document/download/391099
filename='zmax_49332ink.zmx'
with open(filename) as file:
data=f... | gpl-3.0 |
davidbz/trafficserver | tests/gold_tests/autest-site/ports.py | 5 | 3718 | '''
'''
# 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");... | apache-2.0 |
2ndy/RaspIM | usr/lib/python2.7/lib-tk/tkCommonDialog.py | 193 | 1418 | # base class for tk common dialogues
#
# this module provides a base class for accessing the common
# dialogues available in Tk 4.2 and newer. use tkFileDialog,
# tkColorChooser, and tkMessageBox to access the individual
# dialogs.
#
# written by Fredrik Lundh, May 1997
#
from Tkinter import *
class Dialog:
com... | gpl-2.0 |
ihidalgo/uip-prog3 | Parciales/practicas/kivy-designer-master/designer/tree.py | 5 | 2922 | from kivy.uix.widget import Widget
class TreeException(Exception):
pass
class TreeNode(object):
'''TreeNode class for representing information of Widgets
'''
def __init__(self):
super(TreeNode, self).__init__()
self.parent_node = None
self.list_children = []
self.cl... | mit |
nyee/RMG-Py | external/cclib/method/lpa.py | 24 | 4492 | """
cclib (http://cclib.sf.net) is (c) 2006, the cclib development team
and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html).
"""
__revision__ = "$Revision: 837 $"
import random
import numpy
from population import Population
class LPA(Population):
"""The Lowdin population analysis"""
def __... | mit |
mengxn/tensorflow | tensorflow/contrib/keras/python/keras/engine/training_test.py | 36 | 24119 | # 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 |
eneabio/nova | nova/scheduler/filter_scheduler.py | 1 | 11203 | # Copyright (c) 2011 OpenStack, LLC.
# 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 requi... | apache-2.0 |
SwissTPH/odk_planner | tools/create_instance.py | 1 | 3752 | """Creates a new instance with default configuration files
this script creates a new instance with the default configuration files from
the ``demo/config`` directory, asking the user for MySQL credentials, and
also creating a temporary password that has to be used for first login
"""
import sys, ConfigParser, os, os.... | gpl-2.0 |
v0lk3r/ansible-modules-core | files/fetch.py | 94 | 3057 | # this is a virtual module that is entirely implemented server side
# 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 op... | gpl-3.0 |
blindroot/django | tests/admin_widgets/models.py | 49 | 4830 | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class MyFileField(models.FileField):
pass
@python_2_unicode_compatible
class Member(models.Model):
name = models.CharField(max_lengt... | bsd-3-clause |
coolblaze03/WSNNS3Port | .waf-1.5.16-e6d03192b5ddfa5ef2c8d65308e48e42/wafadmin/Tools/gnome.py | 6 | 6844 | #! /usr/bin/env python
# encoding: utf-8
import os,re
import TaskGen,Utils,Runner,Task,Build,Options,Logs
import cc
from Logs import error
from TaskGen import taskgen,before,after,feature
n1_regexp=re.compile('<refentrytitle>(.*)</refentrytitle>',re.M)
n2_regexp=re.compile('<manvolnum>(.*)</manvolnum>',re.M)
def posti... | gpl-2.0 |
bregman-arie/ansible | lib/ansible/modules/messaging/rabbitmq_user.py | 15 | 9514 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chatham Financial <oss@chathamfinancial.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 |
itdaniher/WeDoMore | setup.py | 1 | 1174 | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='wedo',
version='1.1.0',
packages=find_packages(),
install_requires=['pyusb'],
zip_safe=False,
include_package_data=... | gpl-2.0 |
mandeepdhami/neutron | neutron/tests/unit/common/test_ipv6_utils.py | 24 | 5641 | # Copyright 2013 IBM 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 app... | apache-2.0 |
Suiname/LearnPython | functions.py | 1 | 1636 | def my_function():
print "Hello From My Function!"
def my_function_with_args(username, greeting):
print "Hello, %s , From My Function!, I wish you %s"%(username, greeting)
def sum_two_numbers(a, b):
return a + b
# print a simple greeting
my_function()
#prints - "Hello, John Doe, From My Function!, I wish... | mit |
louietsai/python-for-android | python3-alpha/python3-src/Lib/turtledemo/__main__.py | 55 | 9369 | #!/usr/bin/env python3
import sys
import os
from tkinter import *
from idlelib.Percolator import Percolator
from idlelib.ColorDelegator import ColorDelegator
from idlelib.textView import view_file # TextViewer
from imp import reload
import turtle
import time
demo_dir = os.path.dirname(os.path.abspath(__file__))
STA... | apache-2.0 |
ali-salman/Aspose_Words_Java | Plugins/Aspose_Words_Java_for_Jython/asposewords/programming_documents/InsertBarcode.py | 4 | 2722 | from asposewords import Settings
from com.aspose.words import Document
from com.aspose.words import DocumentBuilder
from com.aspose.words import HeaderFooterType
from com.aspose.words import ControlChar
from com.aspose.words import SectionStart
from com.aspose.words import TabAlignment
from com.aspose.words import TabL... | mit |
timhuanggithub/pox_load_balancing | pox/forwarding/l2_learning.py | 25 | 6779 | # Copyright 2011 James McCauley
#
# 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) any later version.
#
# POX is distri... | gpl-3.0 |
volpino/Yeps-EURAC | lib/galaxy/web/framework/middleware/profile.py | 2 | 6006 | """
Middleware that profiles the request with cProfile and displays profiling
information at the bottom of each page.
"""
import sys
import os
import threading
import cgi
import time
from cStringIO import StringIO
from paste import response
try:
# Included in Python 2.5
import cProfile
except:
try:
... | mit |
ganeshrn/ansible | lib/ansible/plugins/action/gather_facts.py | 11 | 6368 | # 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
import os
import time
from ansible import constants as C
from ansible.executor.module_common import... | gpl-3.0 |
scottferg/web-console | django/db/backends/oracle/creation.py | 9 | 11427 | import sys, time
from django.db.backends.creation import BaseDatabaseCreation
TEST_DATABASE_PREFIX = 'test_'
PASSWORD = 'Im_a_lumberjack'
class DatabaseCreation(BaseDatabaseCreation):
# This dictionary maps Field objects to their associated Oracle column
# types, as strings. Column-type strings can co... | bsd-3-clause |
progdupeupl/pdp_website | pdp/messages/urls.py | 1 | 1131 | # coding: utf-8
#
# This file is part of Progdupeupl.
#
# Progdupeupl is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Progdu... | agpl-3.0 |
sycy600/pamietacz | src/pamietacz/tests/dump_load_tests.py | 1 | 12140 | from django.core.files.uploadedfile import SimpleUploadedFile
from pamietacz.models import Shelf, Deck, Card
from test_utils import (add_shelf,
add_deck,
add_card,
TransactionTestCaseWithAuthentication)
class DumpLoadTests(TransactionTestCaseWith... | bsd-2-clause |
factorlibre/OCB | addons/resource/faces/pcalendar.py | 433 | 28436 | #@+leo-ver=4
#@+node:@file pcalendar.py
#@@language python
#@<< Copyright >>
#@+node:<< Copyright >>
############################################################################
# Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH
# mreithinger@web.de
#
# This file is part of faces.
#
# faces is free softw... | agpl-3.0 |
jart/tensorflow | tensorflow/python/kernel_tests/weights_broadcast_test.py | 130 | 9711 | # 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 |
slyphon/pants | tests/python/pants_test/backend/core/tasks/test_paths.py | 6 | 5072 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.c... | apache-2.0 |
GenericStudent/home-assistant | homeassistant/components/eddystone_temperature/sensor.py | 16 | 5640 | """
Read temperature information from Eddystone beacons.
Your beacons must be configured to transmit UID (for identification) and TLM
(for temperature) frames.
"""
import logging
# pylint: disable=import-error
from beacontools import BeaconScanner, EddystoneFilter, EddystoneTLMFrame
import voluptuous as vol
from hom... | apache-2.0 |
alexmandujano/django | tests/admin_validation/models.py | 192 | 1332 | """
Tests of ModelAdmin validation logic.
"""
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class Album(models.Model):
title = models.CharField(max_length=150)
@python_2_unicode_compatible
class Song(models.Model):
title = models.CharField(max_length=150)
al... | bsd-3-clause |
edx/locust | setup.py | 5 | 1581 | # encoding: utf-8
from setuptools import setup, find_packages, Command
import sys, os
version = '0.7.2'
class Unit2Discover(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys, subprocess
basecmd... | mit |
dandygithub/kodi | addons/script.module.dandy.search.history/plugin.py | 1 | 2321 | # -*- coding: utf-8 -*-
# Writer (c) 2019, dandy
# Rev. 1.0.0
# Licence: GPL v.3: http://www.gnu.org/copyleft/gpl.html
import xbmc
import xbmcaddon
import xbmcplugin
import xbmcgui
import XbmcHelpers as common
import resources.lib.SearchHistory as history
ID = 'script.module.dandy.search.history'
ADDON = xbmcaddon.... | gpl-3.0 |
haroldl/homeworklog | django/contrib/gis/db/backends/util.py | 377 | 1749 | """
A collection of utility routines and classes used by the spatial
backends.
"""
def gqn(val):
"""
The geographic quote name function; used for quoting tables and
geometries (they use single rather than the double quotes of the
backend quotename function).
"""
if isinstance(val, basestring):
... | bsd-3-clause |
Eward5513/oceanbase | oceanbase_0.4/script/data_dispatcher/copy_sstable.py | 13 | 7762 | #!/usr/bin/python2.6
import os
import sys
import Queue
import threading
from subprocess import Popen, PIPE, STDOUT
import copy
import time
import re
import logging
class ExecutionError(Exception): pass
class Shell:
@classmethod
def sh(cls, cmd, host=None, username=None):
'''Execute a command locally or remot... | gpl-2.0 |
selyanhb/Markus | lib/tools/api_helper.py | 14 | 8102 | #!/usr/bin/python
#
# The intention of this Python script is to provide
# MarkUs users with a tool which is able to generate HTTP's
# GET, PUT, DELETE and POST requests. This may be handy for
# users planning to use MarkUs' Web API.
#
## DISCLAIMER
#
# This script is made available under the OSI-approved
# MIT license... | mit |
adamtiger/tensorflow | tensorflow/contrib/boosted_trees/python/ops/stats_accumulator_ops.py | 62 | 9211 | # 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 |
HwisooSo/gemV-update | src/arch/x86/isa/insts/simd64/floating_point/arithmetic/multiplication.py | 91 | 2452 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.