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
MichaelMcDonnell/vrjuggler
modules/tweek/python/tweek-qt.py
6
2014
#!/usr/bin/env python # ************** <auto-copyright.pl BEGIN do not edit this line> ************** # # TweekQt is (C) Copyright 2003-2011 by Patrick Hartling # # This application 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...
lgpl-2.1
NJ-zero/Android
Repuest-Excel/DB-Fixture/Connect_DB.py
1
1446
#coding=utf-8 #author='Shichao-Dong' import psycopg2 import configparser file_path = r'D:/Ptest/Repuest-Excel/db_config.ini' cf = configparser.ConfigParser() cf.read(file_path) host = cf.get('psgconf','host') port = cf.get('psgconf','port') user = cf.get('psgconf','user') password = cf.get('psgconf','password') db ...
mit
google-research/google-research
supcon/blocks_test.py
1
10179
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
manuelep/pydal
pydal/helpers/classes.py
3
12891
# -*- coding: utf-8 -*- import copy import marshal import struct import traceback from .._compat import PY2, exists, copyreg, integer_types, implements_bool, \ iterkeys, itervalues, iteritems from .serializers import serializers long = integer_types[-1] @implements_bool class BasicStorage(object): def __in...
bsd-3-clause
hantek/pylearn2
pylearn2/testing/cost.py
34
3350
""" Simple costs to be used for unit tests. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from functools import wraps from pylearn2.costs....
bsd-3-clause
zniper/automag
magazine/apps/content/migrations/0008_auto__add_field_singleimage_published.py
1
9391
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'SingleImage.published' db.add_column('content_singleimage...
mit
CapOM/ChromiumGStreamerBackend
infra/scripts/legacy/scripts/slave/build_directory.py
33
2117
# 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. """Functions for discovering and clearing the build directory.""" import os import sys def IsFileNewerThanFile(file_a, file_b): """Returns True if f...
bsd-3-clause
James-Firth/steam-download-notifier
steamapi/decorators.py
4
3847
__author__ = 'SmileyBarry' import threading import time class debug(object): @staticmethod def no_return(originalFunction, *args, **kwargs): def callNoReturn(*args, **kwargs): originalFunction(*args, **kwargs) # This code should never return! raise AssertionError("...
mit
MagicSolutions/django-cms
cms/tests/permmod.py
6
49058
# -*- coding: utf-8 -*- from __future__ import with_statement from djangocms_text_ckeditor.models import Text from django.contrib.admin.sites import site from django.contrib.auth.models import (AnonymousUser, Group, Permission) from django.contrib.sites.models import Site from django.core.management import call_comman...
bsd-3-clause
markwal/Cura
plugins/ChangeLogPlugin/ChangeLog.py
2
4155
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from UM.i18n import i18nCatalog from UM.Extension import Extension from UM.Preferences import Preferences from UM.Application import Application from UM.PluginRegistry import PluginRegistry from UM.Version import Version f...
agpl-3.0
huguesv/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/tqdm/__init__.py
8
1268
from ._tqdm import tqdm from ._tqdm import trange from ._tqdm_gui import tqdm_gui from ._tqdm_gui import tgrange from ._tqdm_pandas import tqdm_pandas from ._main import main from ._monitor import TMonitor, TqdmSynchronisationWarning from ._version import __version__ # NOQA from ._tqdm import TqdmTypeError, TqdmKeyErr...
apache-2.0
awmwong/typer-server
api.py
1
2683
#!/usr/bin/env python from json import dumps as to_json, loads as from_json import logging from google.appengine.api import urlfetch from google.appengine.ext import ndb import webapp2 # This is for monitoring purposes only class HealthHandler(webapp2.RequestHandler): def get(self): self.response.out.write('200...
mit
sylarcp/anita
venv/lib/python2.7/site-packages/sqlalchemy/sql/functions.py
21
17883
# sql/functions.py # Copyright (C) 2005-2015 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 """SQL function API, factories, and built-in functions. """ from . import sqltypes...
mit
heeraj123/oh-mainline
mysite/search/migrations/0025_bug_concerns_just_documentation.py
17
4325
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # This program 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 v...
agpl-3.0
Nicop06/ansible
lib/ansible/template/template.py
156
1632
# (c) 2012, 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) any lat...
gpl-3.0
RyanChinSang/ECNG3020-ORSS4SCVI
BETA/TestCode/OpenCV/APP-Scanner.py
1
5275
import cv2 import imutils import threading import numpy as np class WebcamVideoStream: def __init__(self, src=0): # initialize the video camera stream and read the first frame from the stream self.stream = cv2.VideoCapture(src) (self.grabbed, self.frame) = self.stream.read() # init...
gpl-3.0
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/pypy/lib-python/2.7/sgmllib.py
306
17884
"""A parser for SGML, using the derived class as a static DTD.""" # XXX This only supports those SGML features used by HTML. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are ...
agpl-3.0
hargup/sympy
sympy/solvers/bivariate.py
13
12868
from __future__ import print_function, division from sympy.core.add import Add from sympy.core.compatibility import ordered, range from sympy.core.function import expand_log from sympy.core.power import Pow from sympy.core.singleton import S from sympy.core.symbol import Dummy from sympy.functions.elementary.exponenti...
bsd-3-clause
feroda/odoo
addons/account_check_writing/report/__init__.py
446
1066
# -*- 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
unnikrishnankgs/va
venv/lib/python3.5/site-packages/notebook/bundler/tools.py
4
7794
"""Set of common tools to aid bundler implementations.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os import shutil import errno import nbformat import fnmatch import glob def get_file_references(abs_nb_path, version): """Gets a list of files refe...
bsd-2-clause
sudheesh001/RFID-DBSync
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/sax.py
1835
1661
from __future__ import absolute_import, division, unicode_literals from xml.sax.xmlreader import AttributesNSImpl from ..constants import adjustForeignAttributes, unadjustForeignAttributes prefix_mapping = {} for prefix, localName, namespace in adjustForeignAttributes.values(): if prefix is not None: pre...
gpl-2.0
lucacerone/nikola
nikola/data/themes/base/messages/messages_sv.py
6
1478
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d minuter kvar att läsa", "(active)": "(aktiv)", "Also available in:": "Även tillgänglig på:", "Archive": "Arkiv", "Categories": "Kategorier", "Comments": "Kommentarer", "LANGUAGE": "...
mit
mattclay/ansible-modules-core
utilities/helper/meta.py
34
3517
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, a Red Hat company # # 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, o...
gpl-3.0
robovm/robovm-studio
python/lib/Lib/site-packages/django/core/files/base.py
235
3888
import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.utils.encoding import smart_str, smart_unicode from django.core.files.utils import FileProxyMixin class File(FileProxyMixin): DEFAULT_CHUNK_SIZE = 64 * 2**10 def __init__(self, file, name=None)...
apache-2.0
Galexrt/zulip
zerver/migrations/0077_add_file_name_field_to_realm_emoji.py
2
5996
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-09 05:23 import os import io import logging import requests import urllib from mimetypes import guess_type from PIL import Image from PIL import ImageOps from django.db import migrations, models from django.db import migrations from django.db.backends....
apache-2.0
petewarden/tensorflow
tensorflow/python/keras/legacy_tf_layers/pooling.py
3
19497
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
meh/servo
tests/wpt/harness/wptrunner/metadata.py
34
11563
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import shutil import sys import tempfile import types import uuid from collections import defaultdict from mo...
mpl-2.0
imsparsh/python-for-android
python3-alpha/python3-src/Lib/test/test_types.py
56
22005
# Python test set -- part 6, built-in types from test.support import run_unittest, run_with_locale import unittest import sys import locale class TypesTests(unittest.TestCase): def test_truth_values(self): if None: self.fail('None is true instead of false') if 0: self.fail('0 is true instead of f...
apache-2.0
cchurch/ansible
lib/ansible/modules/net_tools/nios/nios_nsgroup.py
52
12687
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
idaholab/raven
framework/UI/FitnessView.py
2
11398
# Copyright 2017 Battelle Energy Alliance, 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 t...
apache-2.0
2014c2g2/teamwork
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/_codecs.py
107
3745
def ascii_decode(*args,**kw): pass def ascii_encode(*args,**kw): pass def charbuffer_encode(*args,**kw): pass def charmap_build(*args,**kw): pass def charmap_decode(*args,**kw): pass def charmap_encode(*args,**kw): pass def decode(*args,**kw): """decode(obj, [encoding[,errors]]) -> ob...
gpl-2.0
shivam1111/odoo
openerp/report/render/rml2html/utils.py
438
2386
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2005, Fabien Pinckaers, UCL, FSA # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesse...
agpl-3.0
beacloudgenius/edx-platform
common/lib/xmodule/xmodule/template_module.py
135
2683
""" Template module """ from xmodule.x_module import XModule, DEPRECATION_VSCOMPAT_EVENT from xmodule.raw_module import RawDescriptor from lxml import etree from mako.template import Template import dogstats_wrapper as dog_stats_api class CustomTagModule(XModule): """ This module supports tags of the form ...
agpl-3.0
Valloric/YouCompleteMe
python/ycm/tests/paths_test.py
7
1665
# Copyright (C) 2016-2017 YouCompleteMe contributors # # This file is part of YouCompleteMe. # # YouCompleteMe 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 opt...
gpl-3.0
emarinizquierdo/xentinels
openid/store/memstore.py
165
3597
"""A simple store using only in-process memory.""" from openid.store import nonce import copy import time class ServerAssocs(object): def __init__(self): self.assocs = {} def set(self, assoc): self.assocs[assoc.handle] = assoc def get(self, handle): return self.assocs.get(handle...
apache-2.0
johankaito/fufuka
microblog/old-flask/venv/lib/python2.7/site-packages/pip/utils/ui.py
316
6774
from __future__ import absolute_import from __future__ import division import itertools import sys from signal import signal, SIGINT, default_int_handler from pip.compat import WINDOWS from pip.utils import format_size from pip.utils.logging import get_indentation from pip._vendor import six from pip._vendor.progress...
apache-2.0
blixt/multifarce
app/waveapi/model_test.py
3
8006
#!/usr/bin/python2.4 # # Copyright (C) 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 l...
apache-2.0
kittiu/odoo
addons/point_of_sale/point_of_sale.py
55
77955
# -*- 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
noironetworks/heat
heat/tests/test_short_id.py
2
2812
# # 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
ClintonMorrison/personal-website
app/core/markdown.py
1
5321
import re import core.functions from cgi import escape class MarkdownParser: def __init__(self, resource_path, **kwargs): self.resource_path = resource_path self.options = kwargs self.codeblocks = [] self.table_blocks = [] self.tables = [] def _render_italics(self, matc...
apache-2.0
USGSDenverPychron/pychron
sandbox/video_stitcher.py
3
1715
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
apache-2.0
jschmer/MiniCheese
Player.py
1
2064
# -*- coding: utf-8 -*- # Copyright © 2013 Jens Schmer, Michael Engelhard from Move import Move from random import choice import sys class Player(object): def generate_move(self, game): pass def process_opponent_move(self, move): pass def process_result(self, result): pass class H...
mit
youdonghai/intellij-community
python/lib/Lib/MimeWriter.py
114
6341
"""Generic MIME writer. This module defines the class MimeWriter. The MimeWriter class implements a basic formatter for creating MIME multi-part files. It doesn't seek around the output file nor does it use large amounts of buffer space. You must write the parts out in the order that they should occur in the final f...
apache-2.0
evanscottgray/ryu
ryu/tests/unit/packet/test_ospf.py
29
4861
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
eangelou/Uncooked
Virtio-serial-askisi/qemu-1.2.0/scripts/tracetool/backend/__init__.py
111
3423
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Backend management. Creating new backends --------------------- A new backend named 'foo-bar' corresponds to Python module 'tracetool/backend/foo_bar.py'. A backend module should provide a docstring, whose first non-empty line will be considered its short descripti...
gpl-3.0
mahendra-r/edx-platform
cms/envs/bok_choy.py
15
4503
""" Settings for Bok Choy tests that are used when running Studio. Bok Choy uses two different settings files: 1. test_static_optimized is used when invoking collectstatic 2. bok_choy is used when running the tests Note: it isn't possible to have a single settings file, because Django doesn't support both generating ...
agpl-3.0
totallybradical/temp_servo2
components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py
74
21227
import WebIDL import traceback def WebIDLTest(parser, harness): def shouldPass(prefix, iface, expectedMembers, numProductions=1): p = parser.reset() p.parse(iface) results = p.finish() harness.check(len(results), numProductions, "%s - Should have production cou...
mpl-2.0
aquamonitor/Aquamonitor
awc.py
1
1507
#!/usr/bin/python import sys, time, RPi.GPIO as GPIO, os, logging, pigpio from time import gmtime, strftime AWC_PUMP_OUT=9 AWC_PUMP_IN=11 if not len(sys.argv) > 1: print "You must provide one numerical argument to this function (duration in seconds). Exiting." sys.exit() logger = logging.getLogger(__name__) lo...
lgpl-3.0
sysadmin75/ansible
lib/ansible/modules/wait_for.py
17
25547
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1...
gpl-3.0
grilo/ansible-1
lib/ansible/modules/files/stat.py
26
18891
#!/usr/bin/python # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['sta...
gpl-3.0
kodiadmin/plugin.video.SOLOMAN-IPTV
youtubedl.py
16
1833
# -*- coding: utf-8 -*- import xbmc,xbmcgui try: from YDStreamExtractor import getVideoInfo from YDStreamExtractor import handleDownload except Exception: print 'importing Error. You need youtubedl module which is in official xbmc.org' xbmc.executebuiltin("XBMC.Notification(BassFox,Please [COLOR ye...
gpl-2.0
chapman/ardupilot
Tools/ardupilotwaf/boards.py
1
11504
#!/usr/bin/env python # encoding: utf-8 from collections import OrderedDict import sys import waflib from waflib.Configure import conf _board_classes = {} class BoardMeta(type): def __init__(cls, name, bases, dct): super(BoardMeta, cls).__init__(name, bases, dct) if 'abstract' not in cls.__dict...
gpl-3.0
coala/coala
coalib/results/TextRange.py
1
4459
import copy from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr) from coalib.results.TextPosition import TextPosition @generate_repr('start', 'end') @generate_ordering('start', 'end') class TextRange: @enforce_signature def __init__(self, start: TextPosition, end: (T...
agpl-3.0
firmanm/ansible
contrib/inventory/linode.py
109
11254
#!/usr/bin/env python ''' Linode external inventory script ================================= Generates inventory that Ansible can understand by making API request to Linode using the Chube library. NOTE: This script assumes Ansible is being executed where Chube is already installed and has a valid config at ~/.chube...
gpl-3.0
drnextgis/QGIS
python/plugins/processing/algs/qgis/RandomPointsLayer.py
3
5105
# -*- coding: utf-8 -*- """ *************************************************************************** RandomPointsLayer.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********...
gpl-2.0
vijayendrabvs/hap
neutron/plugins/cisco/extensions/qos.py
21
5617
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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...
apache-2.0
bixbydev/Bixby
google/gdata-2.0.18/samples/apps/marketplace_sample/gdata/tlslite/integration/AsyncStateMachine.py
238
7198
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readabl...
gpl-3.0
alvaroaleman/ansible
lib/ansible/modules/cloud/openstack/os_floating_ip.py
29
9963
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Author: Davide Guerri <davide.guerri@hp.com> # # This module 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 ...
gpl-3.0
pasonx/muzei
web/lib/bs4/builder/_html5lib.py
423
10647
__all__ = [ 'HTML5TreeBuilder', ] import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from bs4.element import ( Comment, Doctype, NavigableStr...
apache-2.0
ptemplier/ansible
lib/ansible/plugins/lookup/flattened.py
46
2482
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # # 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)...
gpl-3.0
egabancho/invenio
modules/bibcheck/lib/plugins/dates.py
21
2853
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 option) a...
gpl-2.0
Vishluck/sympy
sympy/core/tests/test_compatibility.py
61
1267
from sympy.core.compatibility import default_sort_key, as_int, ordered, iterable from sympy.core.singleton import S from sympy.utilities.pytest import raises from sympy.abc import x def test_default_sort_key(): func = lambda x: x assert sorted([func, x, func], key=default_sort_key) == [func, func, x] def t...
bsd-3-clause
OneRom/external_skia
tools/skpdiff/generate_pmetric_tables.py
179
4156
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from math import * COPYRIGHT = '''/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */''' HELP = '// To regenerate SkPMetricUtil_generated.h, si...
bsd-3-clause
petrjasek/superdesk-core
tests/io/feed_parsers/newsml2_parser_test.py
2
4200
# -*- 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 os i...
agpl-3.0
dturner-tw/pants
tests/python/pants_test/backend/codegen/subsystems/test_thrift_defaults.py
11
2672
# 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 functools imp...
apache-2.0
mensler/ansible
lib/ansible/modules/system/seport.py
69
9176
#!/usr/bin/python # (c) 2014, Dan Keder <dan.keder@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...
gpl-3.0
nikez/android_kernel_htc_msm8660
tools/perf/util/setup.py
4998
1330
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
dougalsutherland/skl-groups
skl_groups/tests/test_features.py
1
7051
from __future__ import division from copy import copy, deepcopy from functools import partial import os import sys import warnings import numpy as np from sklearn.externals.six.moves import xrange, cPickle as pickle from nose.tools import assert_raises if __name__ == '__main__': # make this copy of skl_groups im...
bsd-3-clause
yhoshino11/pytest_example
.tox/flake8/lib/python2.7/site-packages/pip/commands/__init__.py
119
2195
""" Package containing all pip commands """ from __future__ import absolute_import from pip.commands.completion import CompletionCommand from pip.commands.freeze import FreezeCommand from pip.commands.help import HelpCommand from pip.commands.list import ListCommand from pip.commands.search import SearchCommand from p...
mit
pacoqueen/ginn
extra/install/ipython2/ipython-5.10.0/IPython/utils/decorators.py
36
2071
# encoding: utf-8 """Decorators that don't go anywhere else. This module contains misc. decorators that don't really go with another module in :mod:`IPython.utils`. Beore putting something here please see if it should go into another topical module in :mod:`IPython.utils`. """ #---------------------------------------...
gpl-2.0
andrewklau/openshift-tools
ansible/roles/lib_gcloud/build/src/gcloud_dm_resource_reconciler.py
13
5529
# pylint: skip-file class GcloudResourceReconcilerError(Exception): ''' error class for resource reconciler''' pass # pylint: disable=too-many-instance-attributes class GcloudResourceReconciler(object): ''' Class to wrap the gcloud deployment manager ''' # pylint allows 5 # pylint: disable=too-ma...
apache-2.0
GdZ/scriptfile
software/googleAppEngine/lib/django_0_96/django/core/servers/fastcgi.py
32
5506
""" FastCGI server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is a adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standalone or from the django-adm...
mit
bgyori/bioagents
bioagents/bionlg/bionlg_module.py
2
2301
import sys import json import logging from bioagents import Bioagent from indra.statements import stmts_from_json from indra.assemblers.english import EnglishAssembler from kqml import KQMLList, KQMLPerformative, KQMLString logger = logging.getLogger('BIONLG') logging.basicConfig(format='%(levelname)s: %(name)s - %(m...
bsd-2-clause
dbeyer/benchexec
benchexec/test_analyze_run_result.py
3
8057
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import logging import sys import unittest import types from benchexec.util import Process...
apache-2.0
FDio/vpp
test/test_vppinfra.py
2
1066
#!/usr/bin/env python3 import unittest from framework import VppTestCase, VppTestRunner, running_extended_tests from framework import running_gcov_tests class TestVppinfra(VppTestCase): """ Vppinfra Unit Test Cases """ vpp_worker_count = 1 @classmethod def setUpClass(cls): super(TestVppinfr...
apache-2.0
gorkinovich/DefendersOfMankind
dependencies/boost-1.46.0/libs/mpi/test/python/scatter_test.py
64
1300
# Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>. # Use, modification and distribution is subject to 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) # Test scatter() collective. import boost.parallel.mpi as mpi from ...
gpl-3.0
direvus/ansible
lib/ansible/modules/cloud/google/gcp_healthcheck.py
48
15302
#!/usr/bin/python # Copyright 2017 Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
X286/nfc_py
nfc_.py
1
12538
#!/usr/bin/env python # GPL 3.0 # -*- coding: utf-8 -*- import serial from Crypto.Cipher import DES3 import binascii import os import sys import glob # Basic class # if you need some options class NFC(object): def __init__(self, device='/dev/ttyAMA0', baud=115200, parity_=serial.PARITY_NONE, stop_...
gpl-3.0
djoproject/pyshell
pyshell/register/loader/test/variable_test.py
3
1914
#!/usr/bin/env python -t # -*- coding: utf-8 -*- # Copyright (C) 2016 Jonathan Delvaux <pyshell@djoproject.net> # 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...
gpl-3.0
rcatwood/Savu
savu/test/travis/plugin_tests/filter_tests/denoise_bregman_test.py
3
1257
# Copyright 2014 Diamond Light Source Ltd. # # 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 t...
gpl-3.0
incuna/feincms-pages-api
pages/tests/testmigrations/pages/0001_initial.py
1
2746
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import feincms.extensions import feincms.contrib.richtext class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Group', ...
bsd-2-clause
back-to/streamlink
src/streamlink/stream/segmented.py
5
5736
import concurrent.futures.thread import logging from concurrent import futures from threading import Thread, Event from .stream import StreamIO from ..buffers import RingBuffer from ..compat import queue log = logging.getLogger(__name__) class SegmentedStreamWorker(Thread): """The general worker thread. Th...
bsd-2-clause
repotvsupertuga/tvsupertuga.repository
program.plexus/resources/plexus/acestream.py
10
4645
# -*- coding: utf-8 -*- """ Plexus (c) 2015 enen92 This file contains the function that brigdes the addon to the acecore.py file Functions: load_local_torrent() -> Load a local .torrent file acestreams(name,iconimage,chid) -> Function that interprets the received url (acestream://,*.aceliv...
gpl-2.0
Aimage/shinken
test/test_properties_defaults.py
1
29210
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012: # Hartmut Goebel <h.goebel@crazy-compilers.com> # # This file is part of Shinken. # # Shinken 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...
agpl-3.0
chouseknecht/ansible
lib/ansible/modules/storage/netapp/na_elementsw_volume.py
19
13498
#!/usr/bin/python # (c) 2017, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Element OS Software Volume Manager""" from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
alexthered/kienhoc-platform
common/djangoapps/student/tests/test_linkedin.py
150
2265
# -*- coding: utf-8 -*- """Tests for LinkedIn Add to Profile configuration. """ import ddt from urllib import urlencode from django.test import TestCase from opaque_keys.edx.locator import CourseLocator from student.models import LinkedInAddToProfileConfiguration @ddt.ddt class LinkedInAddToProfileUrlTests(TestCase...
agpl-3.0
benjaminabel/pelican-plugins
filetime_from_git/git_wrapper.py
4
4786
# -*- coding: utf-8 -*- """ Wrap python git interface for compatibility with older/newer version """ try: from itertools import zip_longest except ImportError: from six.moves import zip_longest import logging import os from time import mktime from datetime import datetime from pelican.utils import set_date_tzin...
agpl-3.0
mikewiebe-ansible/ansible
lib/ansible/modules/network/check_point/cp_mgmt_multicast_address_range_facts.py
20
4254
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage Check Point Firewall (c) 2019 # # 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
bratatidas9/Impala-1
tests/data_errors/test_data_errors.py
13
3610
# Copyright (c) 2012 Cloudera, 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 o...
apache-2.0
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/django/template/library.py
115
12790
import functools import warnings from importlib import import_module from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.html import conditional_escape from django.utils.inspect import getargspec from django.utils.itercompat import is_iterable from .base import...
mit
jamesbowman/gd2-lib
scripts/mk_bsod.py
1
1139
from __future__ import print_function import array import zlib import textwrap import gameduino2.base import gameduino2.gd3registers as gd3 class Fragment(gameduino2.base.GD2): def __init__(self): self.commands = b'' # Blue screen self.cmd_dlstart() self.ClearColorRGB(0, 0, 96) ...
bsd-3-clause
jpshort/odoo
comunity_modules/help_online/models/help_online.py
6
2768
# -*- coding: utf-8 -*- ############################################################################## # # Authors: Laurent Mignon # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General ...
agpl-3.0
fredrik-johansson/mpmath
mpmath/tests/test_functions.py
2
30955
from mpmath.libmp import * from mpmath import * import random import time import math import cmath def mpc_ae(a, b, eps=eps): res = True res = res and a.real.ae(b.real, eps) res = res and a.imag.ae(b.imag, eps) return res #---------------------------------------------------------------------------- # ...
bsd-3-clause
jlegendary/youtube-dl
youtube_dl/extractor/radiojavan.py
124
2218
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import( unified_strdate, str_to_int, ) class RadioJavanIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?radiojavan\.com/videos/video/(?P<id>[^/]+)/?' _TEST = { 'url': 'http://www.radiojavan.c...
unlicense
mpf82/w2ui
server/python/bottle/bottle.py
28
143552
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
mit
michel-slm/obnam
obnamlib/encryption.py
2
7881
# Copyright 2011-2014 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 distributed ...
gpl-3.0
40223125/w16btest1
static/Brython3.1.3-20150514-095342/Lib/unittest/test/testmock/testhelpers.py
737
25793
import unittest from unittest.mock import ( call, _Call, create_autospec, MagicMock, Mock, ANY, _CallList, patch, PropertyMock ) from datetime import datetime class SomeClass(object): def one(self, a, b): pass def two(self): pass def three(self, a=None): pass class AnyT...
agpl-3.0
rhshah/iAnnotateSV
iAnnotateSV/test/test_iAnnotateSVs.py
1
2648
''' Created on 20/02/2015 @author: Ronak H Shah ''' import filecmp import os import sys from subprocess import Popen import shlex import nose import logging def setup_module(): this_dir, this_filename = os.path.split(__file__) new_dir = os.path.dirname(this_dir) inputFile = os.path.join(new_dir, "data", ...
apache-2.0
fldc/CouchPotatoServer
libs/rtorrent/common.py
88
4050
# 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
ossdemura/django-miniblog
Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py
713
9596
from __future__ import absolute_import # The default socket timeout, used by httplib to indicate that no timeout was # specified by the user from socket import _GLOBAL_DEFAULT_TIMEOUT import time from ..exceptions import TimeoutStateError # A sentinel value to indicate that no timeout was specified by the user in # u...
mit