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
TaiSakuma/AlphaTwirl
tests/unit/collector/test_WriteListToFile.py
1
2082
import unittest # import cStringIO import io from alphatwirl.collector import WriteListToFile ##__________________________________________________________________|| class MockOpen(object): def __init__(self, out): self._out = out def __call__(self, path): return self._out ##__________________________________...
bsd-3-clause
40223209/test1
static/Brython3.1.3-20150514-095342/Lib/textwrap.py
745
16488
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> import re __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent'] # Hardcode the recognized whitespace characters to the US-ASCII # whit...
agpl-3.0
chatchavan/pcl
test/convert_image_to_point_cloud.py
74
1403
#/usr/bin/env python import sys import Image # Settings: # Color of background pixels backgroundpixel = (255, 255, 255) # scale the point cloud to fit inside (-1,-1) - (1,1) scaling = True im = Image.open (sys.argv[1]) # resulting point cloud vector points = [] # minimal/maximal pixel positions that contain non-b...
bsd-3-clause
timothycrosley/WebBot
instant_templates/update_webbot_appengine/WebElements/Parser.py
3
10391
''' Parser.py Contains an object that will create a tree of WebElement objects when initialized with HTML Copyright (C) 2013 Timothy Edmund Crosley 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 Fr...
gpl-2.0
javachengwc/hue
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/dumpscript.py
35
29484
# -*- coding: UTF-8 -*- """ Title: Dumpscript management command Project: Hardytools (queryset-refactor version) Author: Will Hardy (http://willhardy.com.au) Date: June 2008 Usage: python manage.py dumpscript appname > scripts/scriptname.py $Revision: 217 $ Description: Generates a Py...
apache-2.0
Franky666/programmiersprachen-raytracer
external/boost_1_59_0/libs/python/test/test_pointer_adoption.py
12
1801
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) """ >>> from test_pointer_adoption_ext import * >>> num_a_instances() 0 >>> a = create('dynamically allocated') >>> num_a_in...
mit
openilabs/falconlab
env/lib/python2.7/site-packages/Cython/Compiler/ModuleNode.py
3
128812
# # Module parse tree node # import cython cython.declare(Naming=object, Options=object, PyrexTypes=object, TypeSlots=object, error=object, warning=object, py_object_type=object, UtilityCode=object, EncodedString=object) import os import operator from PyrexTypes import CPtrType import ...
mit
ettm2012/MissionPlanner
Lib/httplib.py
50
49485
"""HTTP/1.1 client library <intro stuff goes here> <other stuff, too> HTTPConnection goes through a number of "states", which define when a client may legally make another request or fetch the response for a particular request. This diagram details these state transitions: (null) | | HTTPC...
gpl-3.0
hmit/livestreamer
src/livestreamer/plugins/bliptv.py
20
2284
import re from livestreamer.plugin import Plugin, PluginError from livestreamer.plugin.api import http from livestreamer.stream import HTTPStream _url_re = re.compile("(http(s)?://)?blip.tv/.*-(?P<videoid>\d+)") VIDEO_GET_URL = 'http://player.blip.tv/file/get/{0}' SINGLE_VIDEO_URL = re.compile('.*\.((mp4)|(mov)|(m4v)...
bsd-2-clause
M4rtinK/shiboken-android
tests/samplebinding/strlist_test.py
3
4084
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the Shiboken Python Bindings Generator project. # # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). # # Contact: PySide team <contact@pyside.org> # # This program is free software; you can redistribute it and/or # modify it under t...
gpl-2.0
pombredanne/DoSOCS
src/licensingInfo.py
3
8890
#!/usr/bin/python ''' <SPDX-License-Identifier: Apache-2.0> Copyright 2014 University of Nebraska at Omaha (UNO) 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/L...
apache-2.0
Kriechi/netlib
test/websockets/test_websockets.py
2
8423
import os from netlib.http.http1 import read_response, read_request from netlib import tcp, websockets, http, tutils, tservers from netlib.http import status_codes from netlib.tutils import treq from netlib.exceptions import * class WebSocketsEchoHandler(tcp.BaseHandler): def __init__(self, connection, addres...
mit
molobrakos/home-assistant
tests/components/homekit/test_type_thermostats.py
9
22975
"""Test different accessory types: Thermostats.""" from collections import namedtuple from unittest.mock import patch import pytest from homeassistant.components.climate.const import ( ATTR_CURRENT_TEMPERATURE, ATTR_MAX_TEMP, ATTR_MIN_TEMP, ATTR_TARGET_TEMP_LOW, ATTR_TARGET_TEMP_HIGH, ATTR_OPERATION_MODE, ...
apache-2.0
hyperized/ansible-modules-core
network/iosxr/iosxr_config.py
9
7223
#!/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...
gpl-3.0
listingmirror/boto
boto/ec2/instanceinfo.py
152
1893
# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
mit
hmcmooc/muddx-platform
common/djangoapps/course_groups/tests/test_cohorts.py
3
10560
import django.test from django.contrib.auth.models import User from django.conf import settings from django.test.utils import override_settings from course_groups.models import CourseUserGroup from course_groups.cohorts import (get_cohort, get_course_cohorts, is_commentable_cohorted...
agpl-3.0
ewolinetz/openshift-ansible
roles/lib_openshift/src/lib/volume.py
64
2002
# pylint: skip-file # flake8: noqa class Volume(object): ''' Class to represent an openshift volume object''' volume_mounts_path = {"pod": "spec.containers[0].volumeMounts", "dc": "spec.template.spec.containers[0].volumeMounts", "rc": "spec.template.spec.co...
apache-2.0
jamesliu/mxnet
python/mxnet/initializer.py
5
24963
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
printerpam/Stormy
desktop_gui/Stormy/gui/completeWidget.py
2
5836
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'gui-design/complete.ui' # # Created: Sun Feb 22 18:44:33 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from Stormy.gui.components.logoImage import Log...
gpl-2.0
kmonsoor/python-for-android
python3-alpha/python3-src/Lib/test/test_binop.py
139
12658
"""Tests for binary operators on subtypes of built-in types.""" import unittest from test import support from operator import eq, ne, lt, gt, le, ge def gcd(a, b): """Greatest common divisor using Euclid's algorithm.""" while a: a, b = b%a, a return b def isint(x): """Test whether an object i...
apache-2.0
pinkavaj/gnuradio
gr-fec/python/fec/extended_async_encoder.py
47
2515
#!/usr/bin/env python # # Copyright 2014 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) # ...
gpl-3.0
AndyHuu/flocker
flocker/route/functional/networktests.py
15
7739
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Generic tests for ``flocker.route.INetwork`` implementations. """ from zope.interface.verify import verifyObject from ipaddr import IPAddress from twisted.trial.unittest import SynchronousTestCase from .. import INetwork, OpenPort def make_network_te...
apache-2.0
Ialong/shogun
examples/undocumented/python_static/kernel_commwordstring.py
22
1076
from tools.load import LoadMatrix from sg import sg lm=LoadMatrix() traindna=lm.load_dna('../data/fm_train_dna.dat') testdna=lm.load_dna('../data/fm_test_dna.dat') parameter_list=[[traindna,testdna,10,3,0,'n',False,'FULL'], [traindna,testdna,11,4,0,'n',False,'FULL']] def kernel_commwordstring (fm_train_dna=traindna...
gpl-3.0
pyjs/pyjs
examples/misc/flaskexamples/flaskcors/public/services/jsonrpc/apacheServiceHandler.py
24
1923
""" Copyright (c) 2006 Jan-Klaas Kollhof This file is part of jsonrpc. jsonrpc is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later ...
apache-2.0
jtrobec/pants
src/python/pants/option/options_fingerprinter.py
6
2121
# 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) import json from has...
apache-2.0
stuarteberg/numpy
numpy/distutils/command/build_py.py
264
1210
from __future__ import division, absolute_import, print_function from distutils.command.build_py import build_py as old_build_py from numpy.distutils.misc_util import is_string class build_py(old_build_py): def run(self): build_src = self.get_finalized_command('build_src') if build_src.py_modules...
bsd-3-clause
eloquence/unisubs
apps/webdriver_testing/pages/site_pages/teams/activity_tab.py
5
3555
#!/usr/bin/env python from webdriver_testing.pages.site_pages.teams import ATeamPage import time class ActivityTab(ATeamPage): """Actions for the Videos tab of a Team Page. """ _URL = 'teams/%s/activity/' _TEAM_ACTIVITY_URL = 'teams/%s/activity/team/' #FILTER and SORT #_LANG_FILTER = 'div.fil...
agpl-3.0
luca76/QGIS
python/ext-libs/owslib/feature/wfs200.py
3
17252
# ============================================================================= # OWSLib. Copyright (C) 2005 Sean C. Gillies # # Contact email: sgillies@frii.com # # $Id: wfs.py 503 2006-02-01 17:09:12Z dokai $ # ============================================================================= #owslib imports: from owslib...
gpl-2.0
ForgottenKahz/CloudOPC
venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
1777
19348
######################## 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...
mit
khalibartan/Antidote-DM
Antidotes DM/youtube_dl/extractor/letv.py
15
8164
# coding: utf-8 from __future__ import unicode_literals import datetime import re import time from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_ord, ) from ..utils import ( determine_ext, ExtractorError, parse_iso8601, sanitized_Request, int_or_none, ...
gpl-2.0
sergei-maertens/django
django/core/management/commands/loaddata.py
67
13922
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
NL66278/odoo
openerp/addons/base/tests/test_qweb.py
289
4814
# -*- coding: utf-8 -*- import cgi import json import os.path import glob import re import collections from lxml import etree import openerp.addons.base.ir.ir_qweb import openerp.modules from openerp.tests import common from openerp.addons.base.ir import ir_qweb class TestQWebTField(common.TransactionCase): def ...
agpl-3.0
marcuskelly/recover
Lib/site-packages/Crypto/SelfTest/Hash/test_CMAC.py
4
8405
# # SelfTest/Hash/CMAC.py: Self-test for the CMAC 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 provided t...
bsd-2-clause
fighterlyt/bite-project
deps/gdata-python-client/samples/apps/marketplace_sample/atom/token_store.py
280
4048
#!/usr/bin/python # # Copyright (C) 2008 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 ...
apache-2.0
cgar/servo
tests/wpt/web-platform-tests/tools/py/testing/code/test_assertion.py
160
7843
import pytest, py def exvalue(): return py.std.sys.exc_info()[1] def f(): return 2 def test_assert(): try: assert f() == 3 except AssertionError: e = exvalue() s = str(e) assert s.startswith('assert 2 == 3\n') def test_assert_within_finally(): excinfo = py.test.r...
mpl-2.0
Gadal/sympy
sympy/physics/quantum/tests/test_pauli.py
109
3762
from sympy import I, Mul from sympy.physics.quantum import (Dagger, Commutator, AntiCommutator, qapply, Operator) from sympy.physics.quantum.pauli import (SigmaOpBase, SigmaX, SigmaY, SigmaZ, SigmaMinus, SigmaPlus, ...
bsd-3-clause
askebos/dataset
dataset/persistence/util.py
2
2023
from datetime import datetime from inspect import isgenerator try: from collections import OrderedDict except ImportError: # pragma: no cover from ordereddict import OrderedDict from sqlalchemy import Integer, UnicodeText, Float, DateTime, Boolean from six import string_types row_type = OrderedDict def gu...
mit
cloudnautique/cloud-cattle
tests/integration/cattletest/core/test_sample_setup.py
2
4070
from common_fixtures import * # NOQA def test_sample_data(admin_client, system_account): network = find_one(admin_client.list_network, uuid='unmanaged') assert network.accountId == system_account.id assert network.isPublic assert network.kind == 'network' assert network.removed is None asser...
apache-2.0
KevinMidboe/statusHandler
flask/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py
322
4684
from __future__ import absolute_import, division, unicode_literals try: from collections import OrderedDict except ImportError: try: from ordereddict import OrderedDict except ImportError: OrderedDict = dict import re from pip._vendor.six import string_types from . import base from .._ut...
mit
KevZho/buffbot
kol/bot/filter/UneffectHelper.py
4
3490
""" This module implements a FilterManager filter for removing unwanted effects. It lets players send kmails or chat PMs telling the bot to remove any effect with an SGEEA. """ import kol.Error as Error from kol.bot import BotUtils from kol.database import ItemDatabase from kol.manager import FilterManager from kol.re...
mit
ryanjmccall/nupic
tests/unit/nupic/math/array_algorithms_test.py
17
1530
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
gpl-3.0
abhisg/scikit-learn
sklearn/linear_model/tests/test_passive_aggressive.py
169
8809
import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_array_almost_equal, assert_array_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_rais...
bsd-3-clause
eleonrk/SickRage
lib/sqlalchemy/orm/evaluator.py
79
4345
# orm/evaluator.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 import operator from ..sql import operators class UnevaluatableError(Exception): ...
gpl-3.0
luyifan/zulip
zerver/test_decorators.py
115
5293
# -*- coding: utf-8 -*- from django.test import TestCase from zerver.decorator import \ REQ, has_request_variables, RequestVariableMissingError, \ RequestVariableConversionError, JsonableError from zerver.lib.validator import ( check_string, check_dict, check_bool, check_int, check_list ) import ujson cl...
apache-2.0
partofthething/home-assistant
tests/components/zha/conftest.py
4
6996
"""Test configuration for the ZHA component.""" from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch import pytest import zigpy from zigpy.application import ControllerApplication import zigpy.config import zigpy.group import zigpy.types from homeassistant.components.zha import DOMAIN import homeassist...
mit
plivo/plivohelper-python
examples/example-bulkcall.py
1
1573
#!/usr/bin/env python import plivohelper # URL of the Plivo REST service REST_API_URL = 'http://127.0.0.1:8088' API_VERSION = 'v0.1' # Sid and AuthToken SID = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' AUTH_TOKEN = 'YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY' # Define Channel Variable - http://wiki.freeswitch.org/wiki/Channel_Vari...
mit
keflavich/pyspeckit
examples/synthetic_spectrum_example.py
6
4445
import numpy as np import itertools import pyspeckit import scipy.stats import pylab as pl pl.close('all') pl.figure(1).clf() xaxis = np.linspace(-50,150,100.) sigma = 10. center = 50. synth_data = np.exp(-(xaxis-center)**2/(sigma**2 * 2.)) # Add noise stddev = 0.1 noise = np.random.randn(xaxis.size)*stddev error = ...
mit
zhouyao1994/incubator-superset
superset/db_engine_specs/sqlite.py
1
3432
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
invisiblek/python-for-android
python3-alpha/extra_modules/pyxmpp2/ext/dataforms.py
46
25786
# # (C) Copyright 2005-2010 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
apache-2.0
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/notification_permission_v30_rc1.py
1
13313
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
mit
timj/scons
test/D/GDC.py
2
1918
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
tr8dr/.Net-Bridge
src/Python/pyDotNet/src/pydotnet/clr/ctrl/CLRTemplateReply.py
1
1829
# # General: # This file is part of .NET Bridge # # Copyright: # 2010 Jonathan Shore # 2017 Jonathan Shore and Contributors # # License: # 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 c...
apache-2.0
Ghini/ghini.desktop
bauble/plugins/plants/family.py
1
33431
# -*- coding: utf-8 -*- # # Copyright 2008-2010 Brett Adams # Copyright 2014-2015 Mario Frasca <mario@anche.no>. # Copyright 2017 Jardín Botánico de Quito # # This file is part of ghini.desktop. # # ghini.desktop is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
gpl-2.0
askulkarni2/ansible
lib/ansible/plugins/callback/default.py
4
8691
# (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
edx/configuration
playbooks/ec2.py
4
21382
#!/usr/bin/env python """ EC2 external inventory script ================================= Generates inventory that Ansible can understand by making API request to AWS EC2 using the Boto library. NOTE: This script assumes Ansible is being executed where the environment variables needed for Boto have already been set:...
agpl-3.0
isaac-s/cloudify-manager-blueprints
components/manager/scripts/configure_manager.py
2
2177
#!/usr/bin/env python ######### # Copyright (c) 2016 GigaSpaces Technologies Ltd. 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/...
apache-2.0
xrmx/django
django/test/runner.py
113
14812
import logging import os import unittest from importlib import import_module from unittest import TestSuite, defaultTestLoader from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase, TestCase from django.test.utils import setup_test_environment, ...
bsd-3-clause
srkukarni/heron
heron/common/tests/python/network/protocol_unittest.py
10
3510
# Copyright 2016 Twitter. 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 agree...
apache-2.0
youdonghai/intellij-community
python/helpers/pydev/third_party/wrapped_for_pydev/ctypes/util.py
106
4203
#@PydevCodeAnalysisIgnore import sys, os import ctypes # find_library(name) returns the pathname of a library, or None. if os.name == "nt": def find_library(name): # See MSDN for the REAL search order. for directory in os.environ['PATH'].split(os.pathsep): fname = os.path.join(directory...
apache-2.0
urandu/rethinkdb
external/v8_3.30.33.16/tools/ll_prof.py
52
34087
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. 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 # noti...
agpl-3.0
mattcongy/itshop
docker-images/taigav2/taiga-back/tests/integration/resources_permissions/test_storage_resources.py
2
4050
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2016 Anler Hernández ...
mit
damdam-s/OCB
addons/l10n_hr/__openerp__.py
430
2728
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Module: l10n_hr # Author: Goran Kliska # mail: goran.kliska(AT)slobodni-programi.hr # Copyright: Slobodni programi d.o.o., Zagreb # Contributions: #...
agpl-3.0
RCOS-Grading-Server/HWserver
more_autograding_examples/notebook_time_limit/config/custom_validation_code/timelimit.py
2
5278
# ========================================================== # NOTE: Currently implemented as an instructor provided # custom validator, but will likely be available as a built # in validation option in the future. # ========================================================== import os import sys import json import tr...
bsd-3-clause
DirectXMan12/oslo.reports
doc/source/conf.py
2
2460
# -*- coding: utf-8 -*- # 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...
apache-2.0
burlog/mcache-client
powertest/lib/graph.py
3
3684
#!/usr/bin/env python # # Copyright (c) 2010 Corey Goldberg (corey@goldb.org) # License: GNU LGPLv3 # # This file is part of Multi-Mechanize import sys try: import matplotlib matplotlib.use('Agg') # use a non-GUI backend from pylab import * except ImportError: print 'ERROR: can not import Matpl...
lgpl-3.0
dvliman/jaikuengine
.google_appengine/lib/django-1.5/tests/regressiontests/admin_scripts/tests.py
12
78392
# -*- coding: utf-8 -*- """ A series of tests to establish that the command-line managment tools work as advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE and default settings.py files. """ from __future__ import unicode_literals import os import re import shutil import socket import s...
apache-2.0
s20121035/rk3288_android5.1_repo
external/chromium_org/tools/memory_inspector/memory_inspector/classification/results_unittest.py
109
2191
# 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 re import unittest from memory_inspector.classification import results from memory_inspector.classification import rules class ResultsTest(unittest...
gpl-3.0
lilstevie/linux_kernel_TF101
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
183
5410
# SchedGui.py - Python extension for perf trace, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
amontefusco/gnuradio-amontefusco
gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py
3
2549
#!/usr/bin/env python # # Copyright 2007 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) ...
gpl-3.0
c0defreak/python-for-android
python3-alpha/python3-src/Lib/dbm/__init__.py
45
5839
"""Generic interface to all dbm clones. Use import dbm d = dbm.open(file, 'w', 0o666) The returned object is a dbm.gnu, dbm.ndbm or dbm.dumb object, dependent on the type of database being opened (determined by the whichdb function) in the case of an existing dbm. If the dbm does not exist and the cr...
apache-2.0
miyosuda/intro-to-dl-android
HandWriting/jni-build/jni/include/tensorflow/python/ops/image_ops.py
2
40073
# 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
dreamsxin/kbengine
kbe/res/scripts/common/Lib/turtledemo/nim.py
99
6513
""" turtle-example-suite: tdemo_nim.py Play nim against the computer. The player who takes the last stick is the winner. Implements the model-view-controller design pattern. """ import turtle import random import time SCREENWIDTH = 640 SCREENHEIGHT = 480 MINSTICKS = 7 MAXSTICKS = 31 HUNIT = SCR...
lgpl-3.0
marwoodandrew/superdesk-core
superdesk/publish/formatters/newsml_1_2_formatter.py
2
20736
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import time ...
agpl-3.0
sunlianqiang/kbengine
kbe/res/scripts/common/Lib/test/test_symtable.py
126
5960
""" Test the API of the symtable module. """ import symtable import unittest from test import support TEST_CODE = """ import sys glob = 42 class Mine: instance_var = 24 def a_method(p1, p2): pass def spam(a, b, *var, **kw): global bar bar = 47 x = 23 glob def internal(): ...
lgpl-3.0
eirmag/weboob
modules/leclercmobile/test.py
2
1162
# -*- coding: utf-8 -*- # Copyright(C) 2012 Fourcot Florent # # This file is part of weboob. # # weboob 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 o...
agpl-3.0
nhippenmeyer/django
tests/template_tests/filter_tests/test_unordered_list.py
204
8179
from django.template.defaultfilters import unordered_list from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import python_2_unicode_compatible from django.utils.safestring import mark_safe from ..utils import setup class ...
bsd-3-clause
chand3040/sree_odoo
openerp/addons/base_action_rule/tests/__init__.py
260
1088
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
jaeilepp/mne-python
mne/io/kit/constants.py
3
5216
"""KIT constants.""" # Author: Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) from ..constants import Bunch KIT = Bunch() # byte values KIT.SHORT = 2 KIT.INT = 4 KIT.DOUBLE = 8 KIT.STRING = 128 # pointer locations KIT.AMPLIFIER_INFO = 112 KIT.BASIC_INFO = 16 KIT.CHAN_SENS = 80 KIT.RAW_OFFSET = 14...
bsd-3-clause
jimmbraddock/ns-3.20-ATN
src/flow-monitor/bindings/modulegen__gcc_LP64.py
9
411996
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
djbaldey/django
django/db/models/options.py
80
36515
from __future__ import unicode_literals import warnings from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db import connections from djang...
bsd-3-clause
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/pip/_vendor/colorama/winterm.py
578
6290
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL ...
gpl-3.0
develf/mongo-python-driver
test/test_son_manipulator.py
16
4070
# Copyright 2009-2015 MongoDB, 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 writin...
apache-2.0
aioue/ansible
docs/bin/generate_man.py
36
3355
#!/usr/bin/env python import os import sys from jinja2 import Environment, FileSystemLoader from ansible.module_utils._text import to_bytes def get_options(optlist): ''' get actual options ''' opts = [] for opt in optlist: res = { 'desc': opt.help, 'options': opt._short...
gpl-3.0
emersonsoftware/ansiblefork
test/units/modules/network/vyos/test_vyos_command.py
7
5020
# (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 # (at your option) any later version. # # Ansible is dis...
gpl-3.0
m1093782566/openstack_org_ceilometer
ceilometer/tests/api/v2/test_compute_duration_by_resource_scenarios.py
6
7883
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # # 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/li...
apache-2.0
mheap/ansible
lib/ansible/modules/files/unarchive.py
4
35651
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # Copyright: (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: (c) 2016, Dag Wieers <dag@wieers.com> # Copyright: (c) 2017, Ansible Pr...
gpl-3.0
Shekharrajak/pydy
examples/Kane1985/Chapter2/Ex3.10.py
8
2071
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 3.10 from Kane 1985.""" from __future__ import division from sympy import cancel, collect, expand_trig, solve, symbols, trigsimp from sympy import sin, cos from sympy.physics.mechanics import ReferenceFrame, Point from sympy.physics.mechanics import dot, dynami...
bsd-3-clause
Tinkerforge/brickv
src/brickv/plugin_system/plugins/dc/speedometer.py
3
2143
# -*- coding: utf-8 -*- """ brickv (Brick Viewer) Copyright (C) 2010 Olaf Lüke <olaf@tinkerforge.com> Copyright (C) 2014 Matthias Bolte <matthias@tinkerforge.com> speedometer.py: TODO This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published...
gpl-2.0
mnaberez/py65
py65/tests/utils/test_addressing.py
2
6581
import unittest import sys from py65.utils.addressing import AddressParser class AddressParserTests(unittest.TestCase): def test_maxwidth_can_be_set_in_constructor(self): parser = AddressParser(maxwidth=24) self.assertEqual(24, parser.maxwidth) self.assertEqual(0xFFFFFF, parser._maxaddr) ...
bsd-3-clause
grayjay/aenea
client/_aenea.py
6
5546
# This is a command module for Dragonfly. It provides support for several of # Aenea's built-in capabilities. This module is NOT required for Aenea to # work correctly, but it is strongly recommended. # This file is part of Aenea # # Aenea is free software: you can redistribute it and/or modify it under # the terms of...
lgpl-3.0
cccfran/sympy
sympy/combinatorics/tests/test_util.py
31
4499
from sympy.combinatorics.named_groups import SymmetricGroup, DihedralGroup,\ AlternatingGroup from sympy.combinatorics.permutations import Permutation from sympy.combinatorics.util import _check_cycles_alt_sym, _strip,\ _distribute_gens_by_base, _strong_gens_from_distr,\ _orbits_transversals_from_bsgs, _han...
bsd-3-clause
eestay/edx-platform
common/lib/xmodule/xmodule/split_test_module.py
24
29671
""" Module for running content split tests """ import logging import json from webob import Response from uuid import uuid4 from operator import itemgetter from xmodule.progress import Progress from xmodule.seq_module import SequenceDescriptor from xmodule.studio_editable import StudioEditableModule, StudioEditableDe...
agpl-3.0
Bad-boy1306/Ni-m-t-n-t-t-n-c-m-t-l-n-ng-i
installers/generate_tarball.py
65
1559
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
ironbox360/django
tests/gis_tests/maps/tests.py
322
2099
# -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest import skipUnless from django.contrib.gis.geos import HAS_GEOS from django.test import SimpleTestCase from django.test.utils import modify_settings, override_settings from django.utils.encoding import force_text GOOGLE_MAPS_API_KEY = 'XXXX...
bsd-3-clause
lxneng/incubator-airflow
airflow/macros/hive.py
11
4715
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
richgieg/flask-now
migrations/env.py
605
2158
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
mit
ubuntu-chu/linux3.6.9-at91
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
mdshuai/docker-registry
depends/docker-registry-core/docker_registry/testing/query.py
35
1440
# -*- coding: utf-8 -*- # Copyright (c) 2014 Docker. # # 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
s-store/sstore-soft
third_party/python/boto/pyami/bootstrap.py
89
5739
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
gpl-3.0
Ervii/garage-time
garage/src/python/pants/cache/pinger.py
2
1877
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) import httplib from ...
apache-2.0