repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
hvnsweeting/Diamond
refs/heads/master
src/collectors/onewire/test/testonewire.py
68
#!/usr/bin/python # coding=utf-8 ############################################################################### from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import patch from diamond.collector import Collector from onewire import OneWireCollector ####...
hortonworks/hortonworks-sandbox
refs/heads/master
desktop/core/ext-py/Django-1.2.3/tests/modeltests/test_client/tests.py
69
# Validate that you can override the default test suite import unittest def suite(): """ Define a suite that deliberately ignores a test defined in this module. """ testSuite = unittest.TestSuite() testSuite.addTest(SampleTests('testGoodStuff')) return testSuite class SampleTests...
madelynfreed/rlundo
refs/heads/master
venv/lib/python2.7/site-packages/IPython/lib/backgroundjobs.py
21
# -*- coding: utf-8 -*- """Manage background (threaded) jobs conveniently from an interactive shell. This module provides a BackgroundJobManager class. This is the main class meant for public usage, it implements an object which can create and manage new background jobs. It also provides the actual job classes manag...
gregdek/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_tunnel.py
21
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2...
albertshift/omim
refs/heads/master
3party/Alohalytics/tests/googletest/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 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 o...
AnaSula/NYU-Python-Programming-Class
refs/heads/master
course-3/projects/flask_blog/db_repository/versions/001_migration.py
581
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind # migrate_engine to your metadata pre_meta.bind = migrate_engine post_meta.bin...
fbidu/namebench
refs/heads/master
nb_third_party/jinja2/constants.py
220
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
fuchsia-mirror/third_party-grpc
refs/heads/master
src/python/grpcio/grpc/_plugin_wrapping.py
4
# Copyright 2015 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...
MCMic/Sick-Beard
refs/heads/ThePirateBay
lib/hachoir_parser/audio/real_audio.py
90
""" RealAudio (.ra) parser Author: Mike Melanson References: http://wiki.multimedia.cx/index.php?title=RealMedia Samples: http://samples.mplayerhq.hu/real/RA/ """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, UInt8, UInt16, UInt32, Bytes, RawBytes, String, PascalS...
eisensheng/patchit
refs/heads/develop
tests.py
2
# -*- coding: utf-8 -*- import os import unittest import patchit def _get_path_to_asset(filename): return os.path.join(os.path.dirname(__file__), 'assets', filename) class ParsingTestCase(unittest.TestCase): def test_patch_parsing(self): """simple valid patch parsing test. The test is succe...
sqlobject/sqlobject
refs/heads/master
sqlobject/tests/dbtest.py
2
""" The framework for making database tests. """ from __future__ import print_function import logging import os import sys from pytest import raises, skip import sqlobject from sqlobject.col import use_microseconds import sqlobject.conftest as conftest if sys.platform[:3] == "win": def getcwd(): return os...
shangwuhencc/shogun
refs/heads/develop
tests/integration/python_static/util.py
22
""" Utilities for testing """ from numpy import double, ushort, ubyte, matrix from sg import sg SIZE_CACHE=10 def check_accuracy (accuracy, **kwargs): acc=double(accuracy) output=[] for key, val in kwargs.iteritems(): if val is not None: output.append('%s: %e' % (key, val)) print ', '.join(output)+' <--- ...
slisson/intellij-community
refs/heads/master
python/testData/MockSdkWithBinaryModules/python_stubs/PySide/QtGui.py
120
class QPen(object): pass
Klaudit/phantomjs
refs/heads/master
src/qt/qtwebkit/Source/WebCore/inspector/inline-javascript-imports.py
140
#!/usr/bin/env python # # Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this...
tectronics/parole
refs/heads/master
src/parole/splash.py
2
#Parole Advanced Roguelike Engine #Copyright (C) 2006-2012 Max Bane # #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 later version. # #Thi...
fujunwei/chromium-crosswalk
refs/heads/master
native_client_sdk/src/build_tools/buildbot_run.py
21
#!/usr/bin/env python # Copyright (c) 2012 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. """Main entry point for the NaCl SDK buildbot. The entry point used to be build_sdk.py itself, but we want to be able to simplify ...
GetSomeBlocks/Score_Soccer
refs/heads/master
resources/lib/twisted/twisted/tap/socks.py
61
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ I am a support module for making SOCKSv4 servers with twistd. """ from twisted.protocols import socks from twisted.python import usage from twisted.application import internet import sys class Options(usage.Options): synopsis...
camilonova/django
refs/heads/master
tests/template_backends/test_django.py
77
from template_tests.test_response import test_processor_name from django.template import Context, EngineHandler, RequestContext from django.template.backends.django import DjangoTemplates from django.template.library import InvalidTemplateLibrary from django.test import RequestFactory, override_settings from .test_du...
hanw/p4-hlir
refs/heads/master
p4_hlir/hlir/p4_tables.py
1
# Copyright 2013-present Barefoot Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
tpokorra/pykolab
refs/heads/master
pykolab/translit.py
1
# -*- coding: utf-8 -*- # Copyright 2010-2013 Kolab Systems AG (http://www.kolabsys.com) # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.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 ...
MER-GROUP/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/py3209_after.py
83
@classmethod def func(arg): <caret>
crossbario/crossbarexamples
refs/heads/master
authentication/ticket/totp/generator.py
2
from time import sleep from autobahn.util import utcnow from autobahn.wamp.auth import generate_totp_secret, compute_totp, qrcode_from_totp from authenticator import PRINCIPALS_DB # generate SVGs for the QR codes of the principals for principal in PRINCIPALS_DB: seed = PRINCIPALS_DB[principal]['seed'] issuer ...
wyc/django
refs/heads/master
tests/invalid_models_tests/test_custom_fields.py
348
from django.db import models from .base import IsolatedModelsTestCase class CustomFieldTest(IsolatedModelsTestCase): def test_none_column(self): class NoColumnField(models.AutoField): def db_type(self, connection): # None indicates not to create a column in the database. ...
plotly/plotly.py
refs/heads/master
packages/python/plotly/plotly/validators/layout/yaxis/_constrain.py
1
import _plotly_utils.basevalidators class ConstrainValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="constrain", parent_name="layout.yaxis", **kwargs): super(ConstrainValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
rwillmer/django
refs/heads/master
tests/m2m_through/models.py
115
from datetime import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible # M2M described on one of the models @python_2_unicode_compatible class Person(models.Model): name = models.CharField(max_length=128) class Meta: ordering = ('name',) def __s...
bit-trade-one/SoundModuleAP
refs/heads/SoundModuleAP
lib-src/lv2/sratom/waflib/Tools/c_config.py
3
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re,shlex,sys from waflib import Build,Utils,Task,Options,Logs,Errors,ConfigSet,Runner from waflib.TaskGen import after_method,feature from waflib.Configure im...
irwinlove/django
refs/heads/master
tests/template_tests/test_extends.py
154
import os from django.template import Context, Engine, TemplateDoesNotExist from django.template.loader_tags import ExtendsError from django.template.loaders.base import Loader from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango20Warning from .utils import ROOT...
ar7z1/ansible
refs/heads/devel
lib/ansible/modules/files/blockinfile.py
6
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, 2015 YAEGASHI Takeshi <yaegashi@debian.org> # 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_...
higumachan/pyscalambda
refs/heads/master
pyscalambda/formula.py
1
import copy from pyscalambda.base_formula import BaseFormula from pyscalambda.utility import convert_operand, is_scalambda_object class Formula(BaseFormula): @property def __name__(self): return self._get_lambda().__name__ def __init__(self): self.is_cache = True self.cache_lamb...
synmnstr/flexx
refs/heads/master
flexx/ui/test.py
20
import time import logging import flexx from flexx import app, ui import faulthandler faulthandler.enable() #logging.log class MyApp(ui.Widget): #_config = ui.App.Config(title='Flexx test app', size=(400, 300), # )#icon='https://assets-cdn.github.com/favicon.ico') ...
0x27/clusterd
refs/heads/master
src/platform/axis2/fingerprints/AX16.py
6
from src.platform.axis2.interfaces import DefaultServer class FPrint(DefaultServer): def __init__(self): super(FPrint, self).__init__() self.version = '1.6'
Ryanglambert/pybrain
refs/heads/master
pybrain/rl/learners/meta/meta.py
35
__author__ = 'Tom Schaul, tom@idsia.ch' from pybrain.rl.learners.learner import Learner class MetaLearner(Learner): """ Learners that make use of other Learners, or learn how to learn. """
tomalrussell/smif
refs/heads/master
src/smif/data_layer/abstract_metadata_store.py
3
"""A metadata store holds shared metadata for smif model scenarios, inputs, parameters and outputs: - units - dimension definitions """ from abc import ABCMeta, abstractmethod from typing import List class MetadataStore(metaclass=ABCMeta): """A MetaDataStore must implement each of the abstract methods defined in ...
bitcoinx1/BitcoinX
refs/heads/master
share/qt/make_spinner.py
4415
#!/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...
mith1979/ansible_automation
refs/heads/master
applied_python/applied_python/lib/python2.7/site-packages/ecdsa/numbertheory.py
29
#! /usr/bin/env python # # Provide some simple capabilities from number theory. # # Version of 2008.11.14. # # Written in 2005 and 2006 by Peter Pearson and placed in the public domain. # Revision history: # 2008.11.14: Use pow( base, exponent, modulus ) for modular_exp. # Make gcd and lcm accept arbitr...
webgeodatavore/django
refs/heads/master
tests/postgres_tests/models.py
231
from django.db import connection, models from .fields import ( ArrayField, BigIntegerRangeField, DateRangeField, DateTimeRangeField, FloatRangeField, HStoreField, IntegerRangeField, JSONField, ) class PostgreSQLModel(models.Model): class Meta: abstract = True required_db_vendor = 'postgre...
OCA/account-invoicing
refs/heads/13.0
account_invoice_tax_note/__manifest__.py
1
# Copyright 2018 ACSONE SA/NV (https://acsone.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) { "name": "Account invoice tax note", "version": "13.0.1.0.0", "author": "ACSONE SA/NV,Odoo Community Association (OCA)", "development_status": "Production/Stable", "summary": "Prin...
andymckay/olympia
refs/heads/master
src/olympia/migrations/453-exclude-games-in-brazil.py
31
import mkt from mkt.webapps.models import AddonExcludedRegion as AER, Webapp def run(): """Exclude Games in Brazil.""" games = Webapp.category('games') if games: apps = Webapp.objects.filter(categories=games.id) for app in apps: AER.objects.get_or_create(addon=app, region=mkt.r...
xiandiancloud/ji
refs/heads/master
common/djangoapps/track/management/tests/test_tracked_command.py
239
import json from StringIO import StringIO from django.test import TestCase from eventtracking import tracker as eventtracker from track.management.tracked_command import TrackedCommand class DummyCommand(TrackedCommand): """A locally-defined command, for testing, that returns the current context as a JSON strin...
danakj/chromium
refs/heads/master
build/android/gyp/jinja_template.py
1
#!/usr/bin/env python # # 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. """Renders one or more template files using the Jinja template engine.""" import codecs import argparse import os import sys from u...
Laimiux/mydeatree
refs/heads/master
django/contrib/comments/templatetags/comments.py
309
from django import template from django.template.loader import render_to_string from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib import comments from django.utils.encoding import smart_unicode register = template.Library() class BaseCommentNode(template.N...
cloudera/hue
refs/heads/master
desktop/core/ext-py/Django-1.11.29/django/conf/locale/zh_Hant/formats.py
1008
# -*- 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 = 'Y年n月j日' # 2016年9月5...
apocalypsebg/odoo
refs/heads/8.0
addons/l10n_ca/__openerp__.py
260
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
jhunufernandes/ArduWatchRaspSerial
refs/heads/master
virtualenv/lib/python3.4/site-packages/pkg_resources/_vendor/pyparsing.py
33
# module pyparsing.py # # Copyright (c) 2003-2015 Paul T. McGuire # # 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, cop...
Neamar/django
refs/heads/master
tests/conditional_processing/urls.py
360
from django.conf.urls import url from . import views urlpatterns = [ url('^condition/$', views.index), url('^condition/last_modified/$', views.last_modified_view1), url('^condition/last_modified2/$', views.last_modified_view2), url('^condition/etag/$', views.etag_view1), url('^condition/etag2/$', ...
shannonjlove/namebench
refs/heads/master
nb_third_party/dns/namedict.py
248
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
toshywoshy/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_step_functions_state_machine_execution.py
27
#!/usr/bin/python # Copyright (c) 2019, Prasad Katti (@prasadkatti) # 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': ['...
lokirius/python-for-android
refs/heads/master
python3-alpha/python3-src/Tools/demo/eiffel.py
47
#!/usr/bin/env python3 """ Support Eiffel-style preconditions and postconditions for functions. An example for Python metaclasses. """ import unittest from types import FunctionType as function class EiffelBaseMetaClass(type): def __new__(meta, name, bases, dict): meta.convert_methods(dict) ret...
archetipo/stock-logistics-workflow
refs/heads/8.0
stock_split_picking/model/__init__.py
33
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
rabipanda/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/bijectors/masked_autoregressive.py
5
# 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...
Universal-Model-Converter/UMC3.0a
refs/heads/master
data/Python/x86/Lib/symtable.py
114
"""Interface to the compiler's internal symbol tables""" import _symtable from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM, DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC, SCOPE_OFF, SCOPE_MASK, FREE, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT, CELL, LOCAL) import weakref __all__ = ["sym...
mathspace/django
refs/heads/master
tests/template_tests/syntax_tests/test_for.py
51
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class ForTagTests(SimpleTestCase): libraries = {'custom': 'template_tests.templatetags.custom'} @setup({'for-tag01': '{% for val in values %}{{ val }}{% endfor %}'}) def test_for_tag01(self):...
edofic/ggrc-core
refs/heads/develop
src/service_specs/steps/query.py
7
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from behave import then, when from tests.ggrc.behave.utils import ( get_resource, get_service_endpoint_url_for_type, handle_get_resource_and_name_it, check_for_resource_in_collection, ) @when('Q...
AndreyPopovNew/asuswrt-merlin-rt-n
refs/heads/master
release/src/router/samba36/source3/build/charset.py
19
# tests for charsets for Samba3 from Configure import conf @conf def CHECK_SAMBA3_CHARSET(conf, crossbuild=False): '''Check for default charsets for Samba3 ''' if conf.CHECK_ICONV(define='HAVE_NATIVE_ICONV'): default_dos_charset=False default_display_charset=False default_unix_char...
FedericoFontana/backtester
refs/heads/master
tests/test_portfolio_check_inputs.py
1
import pytest import numpy as np import pandas as pd from pandas import date_range as t from datetime import datetime as day from backtester.portfolio import Portfolio def test_weights_type_reject_when_wrong(): prices = pd.DataFrame([[1, 2], [2, 4]], index=t('2...
py-geek/City-Air
refs/heads/master
venv/lib/python2.7/site-packages/allauth/account/signals.py
75
from django.dispatch import Signal user_logged_in = Signal(providing_args=["request", "user"]) # Typically followed by `user_logged_in` (unless, e-mail verification kicks in) user_signed_up = Signal(providing_args=["request", "user"]) password_set = Signal(providing_args=["request", "user"]) password_changed = Signa...
andreaso/ansible
refs/heads/devel
lib/ansible/modules/cloud/rackspace/rax_scaling_group.py
66
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
giancarloescobar/project-kappa
refs/heads/master
code/utils/script.py
5
from design_matrix import * from t import * from corrleation import * import numpy as np import matplotlib.pyplot as plt Betas_vol = {'Beta_vols'+str(x): design_matrix('sub001', x, TR = 2.5)[2] for x in range(1,13)} ##### house for i in range(2,9): plt.subplot(4,2,i-1) fixed_house = t_map(Betas_vol,1,i) plt.imsho...
HyperloopTeam/FullOpenMDAO
refs/heads/master
lib/python2.7/site-packages/pycrypto-2.3-py2.7-macosx-10.10-x86_64.egg/Crypto/SelfTest/Cipher/test_ARC2.py
11
# -*- coding: utf-8 -*- # # SelfTest/Cipher/ARC2.py: Self-test for the Alleged-RC2 cipher # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedicat...
jylaxp/django
refs/heads/master
tests/admin_scripts/complex_app/models/foo.py
581
from django.db import models class Foo(models.Model): name = models.CharField(max_length=5) class Meta: app_label = 'complex_app'
YYWen0o0/python-frame-django
refs/heads/master
django/views/generic/__init__.py
238
from django.views.generic.base import View, TemplateView, RedirectView from django.views.generic.dates import (ArchiveIndexView, YearArchiveView, MonthArchiveView, WeekArchiveView, DayArchiveView, TodayArchiveView, DateDetailView) from django.vie...
ryannathans/micropython
refs/heads/master
tests/basics/string_format.py
47
# basic functionality test for {} format string def test(fmt, *args): print('{:8s}'.format(fmt) + '>' + fmt.format(*args) + '<') test("}}{{") test("{}-{}", 1, [4, 5]) test("{0}-{1}", 1, [4, 5]) test("{1}-{0}", 1, [4, 5]) test("{:x}", 1) test("{!r}", 2) test("{:x}", 0x10) test("{!r}", "foo") test("{!s}", "foo") t...
aleneum/kogniserver
refs/heads/master
setup.py
1
from setuptools import setup, find_packages from setuptools.command.install import install import os import codecs from os.path import join, exists, abspath import json with codecs.open('README.md', 'r', 'utf-8') as f: # cut the badges from the description and also the TOC which is currently not working on PyPi ...
noox-/stbgui-1
refs/heads/master
lib/python/Screens/Rc.py
9
from Components.Pixmap import MovingPixmap, MultiPixmap from Tools.Directories import resolveFilename, SCOPE_SKIN from xml.etree.ElementTree import ElementTree from Components.config import config, ConfigInteger from Components.RcModel import rc_model config.misc.rcused = ConfigInteger(default = 1) class Rc: def __i...
carvalhomb/tsmells
refs/heads/master
guess/src/Lib/test/test_jsubclass.py
3
from test_support import * print_test('Subclassing Java from Python (test_jsubclass.py)', 1) from java.lang import Runnable, Thread # Overriding Methods print_test('override methods', 2) class MyThread(Thread): count = 0 def run(self): self.count = self.count+1 t1 = MyThread() t1.start() t1.j...
GluuFederation/cluster-tools
refs/heads/master
install_master.py
1
# -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2015 Gluu # # 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...
watermelo/libcloud
refs/heads/trunk
libcloud/test/backup/test_dimensiondata.py
1
# 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 ...
pra85/calibre
refs/heads/master
src/calibre/ebooks/rtf2xml/fields_large.py
24
######################################################################### # # # # # copyright 2002 Paul Henry Tremblay # # ...
crs4/ProMort
refs/heads/develop
promort/clinical_annotations_manager/migrations/0016_auto_20201124_0832.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-11-24 08:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clinical_annotations_manager', '0015_gleasonelement_creation_date'), ] operations ...
kkouer/PcGcs
refs/heads/master
Lib/site-packages/numpy/doc/byteswapping.py
95
''' ============================= Byteswapping and byte order ============================= Introduction to byte ordering and ndarrays ========================================== The ``ndarray`` is an object that provide a python array interface to data in memory. It often happens that the memory that you want to v...
doismellburning/django
refs/heads/master
tests/template_tests/test_response.py
4
from __future__ import unicode_literals from datetime import datetime import os import pickle import time from django.test import RequestFactory, SimpleTestCase from django.conf import settings from django.template import Context, engines from django.template.response import (TemplateResponse, SimpleTemplateResponse,...
dfdx2/django
refs/heads/master
tests/template_tests/filter_tests/test_title.py
85
from django.template.defaultfilters import title from django.test import SimpleTestCase from ..utils import setup class TitleTests(SimpleTestCase): @setup({'title1': '{{ a|title }}'}) def test_title1(self): output = self.engine.render_to_string('title1', {'a': 'JOE\'S CRAB SHACK'}) self.asse...
leiferikb/bitpop
refs/heads/master
src/third_party/pywebsocket/src/test/test_extensions.py
5
#!/usr/bin/env python # # Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
2ndQuadrant/ansible
refs/heads/master
contrib/inventory/packet_net.py
34
#!/usr/bin/env python ''' Packet.net external inventory script ================================= Generates inventory that Ansible can understand by making API request to Packet.net using the Packet library. NOTE: This script assumes Ansible is being executed where the environment variable needed for Packet API Token...
QuLogic/iris
refs/heads/master
lib/iris/tests/unit/util/test_squeeze.py
17
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
podhmo/boto
refs/heads/develop
boto/vpc/networkacl.py
151
# Copyright (c) 2009-2010 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...
alash3al/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/pylib/gyp/generator/gypd.py
912
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """gypd output module This module produces gyp input as its output. Output files are given the .gypd extension to avoid overwriting the .gyp files that they are ...
sadleader/odoo
refs/heads/master
openerp/addons/test_documentation_examples/__openerp__.py
344
# -*- coding: utf-8 -*- { 'name': "Documentation examples test", 'description': """ Contains pieces of code to be used as technical documentation examples (via the ``literalinclude`` directive) in situations where they can be syntax-checked and tested. """, 'author': "Odoo", 'website': ...
mrquim/mrquimrepo
refs/heads/master
repo/script.module.youtube.dl/lib/youtube_dl/extractor/eyedotv.py
59
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( xpath_text, parse_duration, ExtractorError, ) class EyedoTVIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?eyedo\.tv/[^/]+/(?:#!/)?Live/Detail/(?P<id>[0-9]+)' _TEST = { 'ur...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/operations/_virtual_network_gateway_connections_operations.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
pelya/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/test/test_distutils.py
90
"""Tests for distutils. The tests for distutils are defined in the distutils.tests package; the test_suite() function there returns a test suite that's ready to be run. """ import distutils.tests import test.test_support def test_main(): test.test_support.run_unittest(distutils.tests.test_suite()) if __name__...
illicitonion/Matrix-NEB
refs/heads/master
neb.py
1
#!/usr/bin/env python import argparse from matrix_client.api import MatrixHttpApi from neb.engine import Engine from neb.matrix import MatrixConfig from plugins.b64 import Base64Plugin from plugins.guess_number import GuessNumberPlugin from plugins.jenkins import JenkinsPlugin from plugins.jira import JiraPlugin from ...
CyanogenMod/htc-kernel-msm7x30
refs/heads/master
scripts/rt-tester/rt-tester.py
904
#!/usr/bin/env python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt impor...
ArcherSys/ArcherSys
refs/heads/master
Lib/test/test_statistics.py
1
<<<<<<< HEAD <<<<<<< HEAD """Test suite for statistics module, including helper NumericTestCase and approx_equal function. """ import collections import decimal import doctest import math import random import sys import types import unittest from decimal import Decimal from fractions import Fraction # Module to be...
Moonlight-Angel/PokemonGo-Bot
refs/heads/master
pokemongo_bot/socketio_server/app.py
9
import logging import socketio from flask import Flask sio = socketio.Server(async_mode='eventlet', logging=logging.NullHandler) app = Flask(__name__) # client asks for data @sio.on('remote:send_request') def remote_control(sid, command): if not 'account' in command: return False bot_name = command....
midma101/m0du1ar
refs/heads/master
.venv/lib/python2.7/site-packages/pip/_vendor/html5lib/tokenizer.py
1710
from __future__ import absolute_import, division, unicode_literals try: chr = unichr # flake8: noqa except NameError: pass from collections import deque from .constants import spaceCharacters from .constants import entities from .constants import asciiLetters, asciiUpper2Lower from .constants import digits, ...
ahmetdaglarbas/e-commerce
refs/heads/tez
oscar/apps/order/exceptions.py
74
class InvalidStatus(Exception): pass class InvalidOrderStatus(InvalidStatus): pass class InvalidLineStatus(InvalidStatus): pass class InvalidShippingEvent(Exception): pass class InvalidPaymentEvent(Exception): pass class UnableToPlaceOrder(Exception): pass
neuroelectro/neuroelectro_org
refs/heads/master
neuroelectro/south_migrations/0025_auto__add_neuronephysdatamap.py
2
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'NeuronEphysDataMap' db.create_table('neuroelectro_neuronephysdatamap', ( ...
ErikAndren/linux
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
yajnab/android_kernel_samsung_arubaslim
refs/heads/jellybean
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
uNotes/Notes
refs/heads/master
config/settings/local.py
1
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
edmundgentle/schoolscript
refs/heads/master
SchoolScript/bin/Debug/pythonlib/Lib/idlelib/ClassBrowser.py
3
"""Class browser. XXX TO DO: - reparse when source changed (maybe just a button would be OK?) (or recheck on window popup) - add popup menu with more options (e.g. doc strings, base classes, imports) - show function argument list? (have to do pattern matching on source) - should the classes and methods li...
fritsvanveen/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/ext/i_landsat_acca.py
7
# -*- coding: utf-8 -*- """ *************************************************************************** i_landsat_acca.py ----------------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ***************************...
EuskoHosting/sentora-core
refs/heads/master
etc/apps/phpmyadmin/doc/conf.py
16
# -*- coding: utf-8 -*- # # phpMyAdmin documentation build configuration file, created by # sphinx-quickstart on Wed Sep 26 14:04:48 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
javierlgroba/Eventer-gapp
refs/heads/master
django/contrib/gis/geos/point.py
224
from ctypes import c_uint from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils.six.moves import xrange class Point(GEOSGeometry): _minlength = 2 _ma...
davidedmundson/telepathy-hangups
refs/heads/master
telepathy/_generated/Channel_Dispatch_Operation.py
3
# -*- coding: utf-8 -*- # Generated from the Telepathy spec """Copyright © 2008-2009 Collabora Ltd. Copyright © 2008-2009 Nokia Corporation This library 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 ...
petrutlucian94/nova_dev
refs/heads/master
nova/api/openstack/compute/plugins/v3/security_groups.py
4
# Copyright 2011 OpenStack Foundation # Copyright 2012 Justin Santa Barbara # 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/l...
mpetyx/palmdrop
refs/heads/master
venv/lib/python2.7/site-packages/PIL/GdImageFile.py
40
# # The Python Imaging Library. # $Id$ # # GD file handling # # History: # 1996-04-12 fl Created # # Copyright (c) 1997 by Secret Labs AB. # Copyright (c) 1996 by Fredrik Lundh. # # See the README file for information on usage and redistribution. # # NOTE: This format cannot be automatically recognized, so the # cl...
snowdream1314/scrapy
refs/heads/master
scrapy/utils/sitemap.py
146
""" Module for processing Sitemaps. Note: The main purpose of this module is to provide support for the SitemapSpider, its API is subject to change without notice. """ import lxml.etree class Sitemap(object): """Class to parse Sitemap (type=urlset) and Sitemap Index (type=sitemapindex) files""" def __in...
kozo2/keggclient-gadget
refs/heads/master
gadget.py
1
# -*- coding:utf-8 -*- import os from os import path import garuda.garudaclientbackend as Garuda from garuda.garudaclientbackend import GarudaClientBackend from itertools import count import glob import http.client class GarudaCommunicationHandler(): backend = None gadgetMap = {} loopBreak = True ...