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
xiaojunwu/crosswalk-test-suite
webapi/tct-content-tizen-tests/inst.xpk.py
1
5746
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=u...
bsd-3-clause
LabAdvComp/indexd
indexd/alias/driver.py
1
1749
import abc from ..driver_base import SQLAlchemyDriverBase class AliasDriverABC(SQLAlchemyDriverBase, metaclass=abc.ABCMeta): """ Alias Driver Abstract Base Class Driver interface for interacting with alias backends. """ def __init__(self, conn, **config): super().__init__(conn, **config)...
apache-2.0
leighpauls/k2cro4
third_party/WebKit/Tools/Scripts/webkitpy/common/system/path.py
191
5046
# 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
neoareslinux/neutron
neutron/plugins/cisco/common/cisco_credentials_v2.py
50
2067
# Copyright 2012 Cisco Systems, 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
eliasdorneles/scrapyd
scrapyd/environ.py
8
2423
import os from urlparse import urlparse, urlunparse from w3lib.url import path_to_file_uri from zope.interface import implements from .interfaces import IEnvironment class Environment(object): implements(IEnvironment) def __init__(self, config, initenv=os.environ): self.dbs_dir = config.get('dbs_di...
bsd-3-clause
vbannai/neutron
neutron/extensions/routerservicetype.py
11
1602
# Copyright 2013 VMware, 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 a...
apache-2.0
sfcl/severcart
accounts/permissions.py
2
4520
# -*- coding:utf-8 -*- from django.utils.translation import ugettext as _ def construct_checkboxes_perm(sever_permissions): unselect_perm = str() # используется для формирования чекбоксов добавления прав аользователя. Если полномочие отсутствует, то право активировано. if not(sever_permissions & 1): ...
gpl-2.0
ruffy91/micropython
tests/basics/syntaxerror.py
21
2762
# test syntax errors def test_syntax(code): try: exec(code) print("no SyntaxError") except IndentationError: print("IndentationError") except SyntaxError: print("SyntaxError") # non-newline after line-continuation character (lexer error) test_syntax("a \\a\n") # dedent mis...
mit
LLNL/spack
var/spack/repos/builtin/packages/mongo-c-driver/package.py
2
5290
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class MongoCDriver(Package): """libmongoc is a client library written in C for MongoDB.""" ...
lgpl-2.1
kingvuplus/ME-TEST1
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py
21
5485
#from Components.ActionMap import ActionMap, NumberActionMap #from Components.Input import Input #from Components.Ipkg import IpkgComponent #from Components.Label import Label #from Components.MenuList import MenuList #from Components.Slider import Slider from Components.NimManager import nimmanager from Plugins.Plugin...
gpl-2.0
Yethiel/re-volt-addon
io_revolt/texanim.py
1
15695
""" Name: texanim Purpose: Provides operators and functions for the texture animation panel Description: Moved from operators and panels here to reduce script line amount """ if "bpy" in locals(): import imp imp.reload(common) import bpy from . import common from . import rvstruct from .common import * ...
gpl-3.0
disigma/depot_tools
third_party/pylint/checkers/__init__.py
67
3927
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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 2 of the License, o...
bsd-3-clause
meabsence/python-for-android
python3-alpha/python3-src/Lib/encodings/mac_farsi.py
272
15170
""" Python Character Mapping Codec mac_farsi generated from 'MAPPINGS/VENDORS/APPLE/FARSI.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,err...
apache-2.0
John-Hart/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/auto_rest_parameter_grouping_test_service.py
9
4692
# 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
joelagnel/ns-3
src/applications/bindings/modulegen__gcc_ILP32.py
2
301167
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
0jpq0/kbengine
kbe/src/lib/python/Lib/test/test_calendar.py
99
39625
import calendar import unittest from test import support from test.script_helper import assert_python_ok import time import locale import sys import datetime result_2004_01_text = """ January 2004 Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ...
lgpl-3.0
naresh21/synergetics-edx-platform
common/lib/calc/calc/tests/test_preview.py
257
8723
# -*- coding: utf-8 -*- """ Unit tests for preview.py """ import unittest from calc import preview import pyparsing class LatexRenderedTest(unittest.TestCase): """ Test the initializing code for LatexRendered. Specifically that it stores the correct data and handles parens well. """ def test_sim...
agpl-3.0
pacificcoin/PacificCoin
share/qt/make_spinner.py
4415
1035
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
mit
bowlofstew/code-for-blog
2009/pyqtris/pyqtris_src/lib/aboutdialog.py
13
3454
from PyQt4.QtCore import * from PyQt4.QtGui import * from images import get_logo_pixmap about_text = """\ PyQtris is a simple, free Tetris clone, developed by Eli Bendersky (http://eli.thegreenplace.net) in Python using PyQt as the GUI toolkit. It was tested on Windows and Linux with Python 2.6 and PyQt...
unlicense
ak2703/edx-platform
lms/djangoapps/debug/views.py
119
2136
"""Views for debugging and diagnostics""" import pprint import traceback from django.http import Http404, HttpResponse, HttpResponseNotFound from django.contrib.auth.decorators import login_required from django.utils.html import escape from django.views.decorators.csrf import ensure_csrf_cookie from edxmako.shortcut...
agpl-3.0
petewarden/tensorflow
tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py
1
29219
# 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
kingmotley/SickRage
lib/rtorrent/peer.py
174
3699
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com> # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, ...
gpl-3.0
brianrodri/oppia
core/domain/user_jobs_one_off_test.py
2
10034
# 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
TechBK/horizon-dev
openstack_dashboard/dashboards/admin/overview/views.py
63
2858
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
lucienimmink/scanner.py
mutagen/_senf/_print.py
9
12366
# -*- coding: utf-8 -*- # Copyright 2016 Christoph Reiter # # 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...
mit
philipn/sycamore
Sycamore/support/pytz/zoneinfo/America/Indiana/Petersburg.py
9
5154
'''tzinfo timezone information for America/Indiana/Petersburg.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Petersburg(DstTzInfo): '''America/Indiana/Petersburg timezone definition. See datetime.tzinfo for details''' z...
gpl-2.0
pbanaszkiewicz/amy
amy/workshops/migrations/0099_dcselforganizedeventrequest.py
3
5636
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-06-18 08:59 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_countries.fields class Migration(migrations.Migration): dependencies = [ ...
mit
tscohen/chainer
tests/cupy_tests/test_ndarray_copy_and_view.py
21
1982
import unittest import numpy from cupy import testing @testing.gpu class TestArrayCopyAndView(unittest.TestCase): _multiprocess_can_split_ = True @testing.numpy_cupy_array_equal() def test_view(self, xp): a = testing.shaped_arange((4,), xp, dtype=numpy.float32) b = a.view(dtype=numpy.i...
mit
tiredpixel/pikka-bird-collector-py
pikka_bird_collector/parsers/redis.py
1
1120
import re from .base import Base class Redis(Base): """ Parses main Redis INFO-type format. e.g. # Clients connected_clients:8 client_longest_raw_list:0 client_biggest_input_buf:0 blocked_clients:0 """ RE_SECTIO...
mit
contactr2m/remote_repo
src/profiles/migrations/0001_initial.py
1
1387
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-13 21:15 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ...
mit
jmoiron/jmoiron.net
jmoiron/comments/models.py
1
1654
#!/usr/bin/env python # -*- coding: utf-8 -*- """comment data models.""" import datetime import argot import operator from jmoiron.utils import summarize from flask import Blueprint, render_template from micromongo import * __all__ = ["Comment", "blueprint"] blueprint = Blueprint("comments", __name__, templa...
mit
nbeck90/city-swap
cityswap/cityswap/settings.py
1
2690
""" Django settings for cityswap project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths...
mit
sdopoku/flask-blog
env/lib/python2.7/site-packages/jinja2/meta.py
336
4198
# -*- coding: utf-8 -*- """ jinja2.meta ~~~~~~~~~~~ This module implements various functions that exposes information about templates that might be interesting for various kinds of applications. :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details. :license: BSD, see LICENSE fo...
gpl-2.0
svanlochem/Paparazzi
sw/ground_segment/python/ivytoredis/ivy_to_redis.py
39
2358
#!/usr/bin/env python from __future__ import print_function import redis import time import signal import argparse import sys import os # if PAPARAZZI_SRC not set, then assume the tree containing this # file is a reasonable substitute PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirnam...
gpl-2.0
nuxeh/keystone
keystone/trust/core.py
1
9580
# Copyright 2012 OpenStack Foundation # # 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...
apache-2.0
sandymanu/android_kernel_xiaomi_kenzo
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
John443/Recommending-System
src/item_pred.py
1
1843
import numpy as np import utils import parse import similarity_functions as sf import calculate as cal import math import copy def constructMatrix(data, metadata): user = int(metadata['users']) item = int(metadata['items']) ratingMatrix = np.zeros((item, user)) for i in data: ratingMatrix[int(...
gpl-3.0
rooshilp/CMPUT410Lab6
virt_env/virt1/lib/python2.7/site-packages/django/db/migrations/state.py
34
14420
from __future__ import unicode_literals from django.apps import AppConfig from django.apps.registry import Apps, apps as global_apps from django.db import models from django.db.models.options import DEFAULT_NAMES, normalize_together from django.db.models.fields.related import do_pending_lookups from django.db.models.f...
apache-2.0
Plourde-Research-Lab/PyQLab
instruments/DCSources.py
2
1333
from atom.api import Str, Int, Float, Bool, Enum from .Instrument import Instrument class DCSource(Instrument): output = Bool(False).tag(desc='Output enabled') mode = Enum('voltage', 'current').tag(desc='Output mode (current or voltage source)') value = Float(0.0).tag(desc='Output value (current or voltage)') cla...
apache-2.0
peterfpeterson/mantid
Testing/SystemTests/tests/framework/EQSANSEffAPIv2.py
3
2186
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pyl...
gpl-3.0
MountainWei/nova
nova/api/openstack/compute/schemas/server_metadata.py
109
1333
# Copyright 2014 NEC Corporation. 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 ...
apache-2.0
YutingZhang/lmdis-rep
net_modules/pixel_bias.py
1
2627
import tensorflow as tf import collections from prettytensor import layers from prettytensor import parameters from prettytensor import pretty_tensor_class as prettytensor from prettytensor.pretty_tensor_class import PROVIDED @prettytensor.Register(assign_defaults=('activation_fn', 'parameter_modifier', 'phase')) c...
apache-2.0
est77/appleseed
src/appleseed.studio/python/studio/plugins.py
6
2935
# # This source file is part of appleseed. # Visit https://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017-2018 Esteban Tovagliari, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaini...
mit
naresh21/synergetics-edx-platform
lms/djangoapps/course_blocks/transformers/start_date.py
15
2896
""" Start Date Transformer implementation. """ from openedx.core.lib.block_structure.transformer import BlockStructureTransformer, FilteringTransformerMixin from lms.djangoapps.courseware.access_utils import check_start_date from xmodule.course_metadata_utils import DEFAULT_START_DATE from .utils import collect_merged...
agpl-3.0
scotthartbti/android_external_chromium_org
mojo/public/bindings/generators/mojom_pack_tests.py
26
5268
# 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 mojom import mojom_pack import mojom_test import sys EXPECT_EQ = mojom_test.EXPECT_EQ EXPECT_TRUE = mojom_test.EXPECT_TRUE RunTest = mojom_test.RunTe...
bsd-3-clause
gpmidi/fragforce.org
fforg/settings.py
1
16780
""" Django settings for fforg project on Heroku. For more info, see: https://github.com/heroku/heroku-django-template For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ ""...
gpl-2.0
tinysun212/swift-windows
tools/SourceKit/bindings/python/sourcekitd/capi.py
60
17369
# capi.py - sourcekitd Python Bindings -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information...
apache-2.0
PyBossa/pybossa
pybossa/pro_features.py
1
1648
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA 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 op...
agpl-3.0
sjsj0101/backtestengine
backtest/optimizer/compare.py
1
21663
# encoding: utf-8 """ @version: python3.6 @author: ‘sj‘ @contact: songjie1217@hotmail.com @file: optimizer.py @time: 10/20/17 10:06 PM """ from backtest.eventengine.eventEngine import * from backtest.eventengine.eventType import * from backtest.core.context import * from backtest.data.getdata import * from backtest.d...
apache-2.0
sajeeshcs/nested_projects_keystone
keystone/tests/test_keystoneclient.py
1
45836
# Copyright 2012 OpenStack Foundation # # 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...
apache-2.0
EduPepperPD/pepper2013
common/djangoapps/course_groups/tests/tests.py
32
10459
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
Noviat/odoo
addons/report_webkit/convert.py
322
2581
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who ...
agpl-3.0
abhiatgithub/shogun-toolbox
examples/undocumented/python_modular/multiclass_randomforest_modular.py
3
1195
#!/usr/bin/env python from numpy import array traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_multiclass.dat' # set both input attributes as not nominal (ie. continuous) feattypes = array([False, False]) parameter_list = [[traindat,testdat,label_train...
gpl-3.0
philpot/pymod
oldwatdb.py
1
17926
#!/usr/bin/python # Filename: watdb.py ''' watdb nee trbotdb @author: Andrew Philpot @version 0.10 Usage: python watdb.py Options: \t-h, --help:\tprint help to STDOUT and quit \t-v, --verbose:\tverbose output ''' ## major functionality in this module beginning trbot/wat merge (0.6) ## ## 1. layer above web.py's web....
apache-2.0
DirtyUnicorns/android_external_chromium-org
tools/valgrind/scan-build.py
103
6714
#!/usr/bin/env python # Copyright (c) 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 argparse import errno import os import re import sys import urllib import urllib2 # Where all the data lives. ROOT_URL = "h...
bsd-3-clause
pajlada/pajbot
main.py
2
1666
#!/usr/bin/env python3 import logging import os import signal import sys from pajbot.bot import Bot from pajbot.utils import parse_args try: basestring except NameError: basestring = str # XXX: What does this achieve exactly? os.chdir(os.path.dirname(os.path.realpath(__file__))) log = logging.getLogger(__na...
mit
zdszxp/gamesrc
Trdlib/src/boost_1_60_0/tools/build/src/build/build_request.py
11
8094
# Status: being ported by Vladimir Prus # TODO: need to re-compare with mainline of .jam # Base revision: 40480 # # (C) Copyright David Abrahams 2002. Permission to copy, use, modify, sell and # distribute this software is granted provided this copyright notice appears in # all copies. This software is provided "as ...
gpl-3.0
p0psicles/SickRage
lib/feedparser/sgml.py
22
2682
from __future__ import absolute_import import re __all__ = [ '_SGML_AVAILABLE', 'sgmllib', 'charref', 'tagfind', 'attrfind', 'entityref', 'incomplete', 'interesting', 'shorttag', 'shorttagopen', 'starttagopen', 'endbracket', ] # sgmllib is not available by default in P...
gpl-3.0
johndpope/tensorflow
tensorflow/python/training/session_run_hook.py
40
10195
# 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
sebres/fail2ban
fail2ban/client/filterreader.py
4
3257
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
dharrigan/plugins
security/etpro-telemetry/src/opnsense/scripts/etpro_telemetry/dump_data.py
2
2514
#!/usr/local/bin/python3 """ Copyright (c) 2018-2019 Ad Schellevis <ad@opnsense.org> 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 th...
bsd-2-clause
nhenezi/kuma
vendor/packages/nose/unit_tests/test_pdb_plugin.py
10
3241
import sys import unittest from nose.config import Config from nose.plugins import debug from optparse import OptionParser from StringIO import StringIO class StubPdb: called = False def post_mortem(self, tb): self.called = True class TestPdbPlugin(unittest.TestCase): def setUp(self): sel...
mpl-2.0
reinaldomaslim/Singaboat_RobotX2016
robotx_nav/nodes/mc_scancode_planner.py
1
1595
#!/usr/bin/env python """ task 4: ----------------- Created by Ren Ye @ 2016-11-06 Authors: Ren Ye, Reinaldo ----------------- scan the code """ import rospy import math import time import numpy as np from sklearn.cluster import KMeans from sklearn import svm import random from geometry_msgs.msg i...
gpl-3.0
lochiiconnectivity/boto
tests/integration/iam/test_cert_verification.py
10
1495
# Copyright (c) 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 withou...
mit
fishilico/selinux-refpolicy-patched
support/sedoctool.py
13
25392
#!/usr/bin/python # Author: Joshua Brindle <jbrindle@tresys.com> # Caleb Case <ccase@tresys.com> # # Copyright (C) 2005 - 2006 Tresys Technology, LLC # 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 Fre...
gpl-2.0
waneric/PyMapLib
src/gabbs/controls/MapToolAction.py
1
6234
# -*- coding: utf-8 -*- """ MapToolAction.py - map tool for user events ====================================================================== AUTHOR: Wei Wan, Purdue University EMAIL: rcac-help@purdue.edu Copyright (c) 2016 Purdue University See the file "license.terms" for information on usage and redistr...
mit
didzis/AMRParsing
stanfordnlp/unidecode/x06d.py
252
4651
data = ( 'Zhou ', # 0x00 'Ji ', # 0x01 'Yi ', # 0x02 'Hui ', # 0x03 'Hui ', # 0x04 'Zui ', # 0x05 'Cheng ', # 0x06 'Yin ', # 0x07 'Wei ', # 0x08 'Hou ', # 0x09 'Jian ', # 0x0a 'Yang ', # 0x0b 'Lie ', # 0x0c 'Si ', # 0x0d 'Ji ', # 0x0e 'Er ', # 0x0f 'Xing ', # 0x10 'Fu ...
gpl-2.0
obnam-mirror/obnam
obnamlib/backup_progress.py
1
6958
# Copyright (C) 2009-2017 Lars Wirzenius # # 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 distribu...
gpl-3.0
blueburningcoder/pybrain
pybrain/optimization/populationbased/multiobjective/constnsga2.py
25
4029
__author__ = 'proposed by Jean Pierre Queau , jeanpierre.queau"sbmoffshore.com' from scipy import array from pybrain.optimization.optimizer import BlackBoxOptimizer from pybrain.optimization.populationbased.ga import GA from pybrain.tools.nondominated import const_non_dominated_front, const_crowding_distance, const_...
bsd-3-clause
Yury191/brownstonetutors
BrownstoneTutors/views.py
1
2876
from allauth.account.views import * from django.shortcuts import render, render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from django.template import RequestContext, Template , Context from django.views.generic import View fro...
unlicense
GeassDB/xunlei-lixian
lixian_plugins/commands/list_torrent.py
14
1951
from lixian_plugins.api import command from lixian_cli_parser import parse_command_line from lixian_config import get_config from lixian_encoding import default_encoding def b_encoding(b): if 'encoding' in b: return b['encoding'] if 'codepage' in b: return 'cp' + str(b['codepage']) return 'utf-8' def b_name(...
mit
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/pip-7.1.0/pip/commands/freeze.py
311
2330
from __future__ import absolute_import import sys import pip from pip.basecommand import Command from pip.operations.freeze import freeze from pip.wheel import WheelCache class FreezeCommand(Command): """ Output installed packages in requirements format. packages are listed in a case-insensitive sorted...
mit
jirikuncar/invenio-formatter
tests/test_formatter_utils.py
1
6829
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2010, 2011, 2013 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 # License, or (at your optio...
gpl-2.0
nkrinner/nova
nova/tests/servicegroup/test_mc_servicegroup.py
27
8500
# Copyright (c) 2013 Akira Yoshiyama <akirayoshiyama at gmail dot com> # # This is derived from test_db_servicegroup.py. # Copyright 2012 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 t...
apache-2.0
sectubs/2016s-SEP
gr-orcatun/docs/doxygen/doxyxml/generated/compound.py
344
20296
#!/usr/bin/env python """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ from string import lower as str_lower from xml.dom import minidom from xml.dom import Node import sys import compoundsuper as supermod from compoundsuper import MixedContainer class DoxygenTypeSub(supermod.DoxygenType): def __i...
gpl-3.0
archf/ansible
lib/ansible/modules/network/netvisor/pn_vrouterbgp.py
29
15104
#!/usr/bin/python """ PN-CLI vrouter-bgp-add/vrouter-bgp-remove/vrouter-bgp-modify """ # # 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 Lice...
gpl-3.0
qiniu/logkit
deploy/python-release-tool/pack/compiled.py
1
1159
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import platform import ConfigParser from tools import models class Compiled(object): def __init__(self, code_path, cf, version): os.chdir(code_path) self.system = platform.system().lower() try: remote = cf.get('code', ...
apache-2.0
KDE/twine2
kbindinggenerator/pplexer.py
1
8743
# -*- coding: utf-8 -*- # Copyright 2007-8 Jim Bublitz <jbublitz@nwinternet.com> # # 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 2 of the License, or # (at your option) any ...
lgpl-3.0
liuqr/edx-xiaodun
lms/djangoapps/instructor/tests/test_legacy_anon_csv.py
13
2237
""" Unit tests for instructor dashboard Based on (and depends on) unit tests for courseware. Notes for running by hand: ./manage.py lms --settings test test lms/djangoapps/instructor """ from django.test.utils import override_settings # Need access to internal func to put users in the right group from django.contr...
agpl-3.0
sidartaoliveira/ansible
lib/ansible/modules/windows/win_package.py
29
5089
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Trond Hindenes <trond@hindenes.com>, and others # # 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 versio...
gpl-3.0
newemailjdm/pybrain
pybrain/optimization/populationbased/multiobjective/nsga2.py
25
3323
__author__ = 'Justin Bayer, Tom Schaul, {justin,tom}@idsia.ch' from scipy import array from pybrain.optimization.populationbased.ga import GA from pybrain.tools.nondominated import non_dominated_front, crowding_distance, non_dominated_sort # TODO: not very elegant, because of the conversions between tuples and arra...
bsd-3-clause
aquametalabs/django-telegram
telegram/handlers/email.py
1
1086
from django.core.mail import send_mail from django.conf import settings from telegram.handlers.base import BasePlatformHandler from telegram.models import PlatformMeta class EmailHandler(BasePlatformHandler): def handle(self): """ Will try to use settings.TELEGRAM_EMAIL_HANDLER_FROM, the...
bsd-3-clause
obeattie/sqlalchemy
test/dialect/test_mssql.py
1
51284
# -*- encoding: utf-8 from sqlalchemy.test.testing import eq_ import datetime, os, re from sqlalchemy import * from sqlalchemy import types, exc, schema from sqlalchemy.orm import * from sqlalchemy.sql import table, column from sqlalchemy.databases import mssql from sqlalchemy.dialects.mssql import pyodbc from sqlalche...
mit
Tranzystorek/servo
etc/servo_gdb.py
233
4284
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
ccrook/Quantum-GIS
python/plugins/processing/algs/grass7/ext/i_cca.py
5
1756
# -*- coding: utf-8 -*- """ *************************************************************************** i_cca.py -------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr *********************************************...
gpl-2.0
AnimeshSinha1309/WebsiteEdunet
WebsiteEdunet/env/Lib/site-packages/django/conf/locale/fi/formats.py
504
1390
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G.i' DATET...
mit
tseaver/gcloud-python
datastore/google/cloud/datastore/key.py
3
21641
# Copyright 2014 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
jjhelmus/scipy
scipy/fftpack/pseudo_diffs.py
36
14318
""" Differential and pseudo-differential operators. """ # Created by Pearu Peterson, September 2002 from __future__ import division, print_function, absolute_import __all__ = ['diff', 'tilbert','itilbert','hilbert','ihilbert', 'cs_diff','cc_diff','sc_diff','ss_diff', 'shift'] from nu...
bsd-3-clause
mdunschen/AirQualityTweeter
aqliverpool.py
1
24825
#!/usr/bin/python3 # coding: utf-8 from optparse import OptionParser import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.dates as mdates import matplotlib.patches as patches import matplotlib.patheffects as patheffects from matplotlib.ticker import FormatStrFormatter from matplot...
apache-2.0
msingh172/youtube-dl
youtube_dl/downloader/rtmp.py
95
8353
from __future__ import unicode_literals import os import re import subprocess import time from .common import FileDownloader from ..compat import compat_str from ..utils import ( check_executable, encodeFilename, encodeArgument, get_exe_version, ) def rtmpdump_version(): return get_exe_version( ...
unlicense
appcelerator/entourage
components/services/appengine/stub/simplejson/__init__.py
3
10786
r""" A simple, fast, extensible JSON encoder and decoder JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. simplejson exposes an API familiar to uses of the standard library marshal and pickle modules. Encoding b...
apache-2.0
Intel-Corporation/tensorflow
tensorflow/python/debug/lib/grpc_tensorflow_server.py
22
4686
# Copyright 2019 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
Abi1ity/uniclust2.0
SQLAlchemy-0.9.9/test/ext/test_horizontal_shard.py
2
8747
import datetime import os from sqlalchemy import * from sqlalchemy import event from sqlalchemy import sql, util from sqlalchemy.orm import * from sqlalchemy.ext.horizontal_shard import ShardedSession from sqlalchemy.sql import operators from sqlalchemy.testing import fixtures from sqlalchemy.testing.engines import tes...
bsd-3-clause
obreitwi/nest-simulator
extras/include_checker.py
14
8100
# -*- coding: utf-8 -*- # # include_checker.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 License...
gpl-2.0
cacarrara/cacarrara.github.io
pelicanconf.py
1
1925
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Caio Carrara' AUTHOR_EMAIL = u'eu@caiocarrara.com.br' SITENAME = u'Caio Carrara' SITEURL = 'http://caiocarrara.com.br' PATH = 'content' TIMEZONE = 'America/Sao_Paulo' DEFAULT_LANG = u'pt' USE_FOLDER_AS_CATEGORY = Tru...
apache-2.0
artemrizhov/django-mail-templated
setup.py
1
1166
import os from setuptools import setup, find_packages DESCRIPTION = 'Send emails using Django template system' LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', ...
mit
hackbutty/git-repo
progress.py
143
2036
# # Copyright (C) 2009 The Android Open Source Project # # 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 la...
apache-2.0
decvalts/landlab
scripts/test-installed-landlab.py
1
1105
#! /usr/bin/env python import sys, os sys.path.pop(0) from optparse import OptionParser parser = OptionParser('usage: %prog [options] -- [nosetests options]') parser.add_option('-v', '--verbose', action='count', dest='verbose', default=1, help='increase verbosity [%default]') parser.add_option('--...
mit
ctiller/grpc
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/network_services.py
4
3665
# Copyright 2020 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
SOKP/external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/oobe.py
33
2064
# 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 logging from telemetry.core import exceptions from telemetry.core import util from telemetry.core import web_contents class Oobe(web_contents.WebCo...
bsd-3-clause