text
stringlengths
475
200k
"""This test for the LFW require medium-size data dowloading and processing If the data has not been already downloaded by running the examples, the tests won't run (skipped). If the test are run, the first execution will be long (typically a bit more than a couple of minutes) but as the dataset loader is leveraging ...
"""Various helper functions""" __all__ = ['BasicAuth', 'FormData', 'parse_mimetype'] import base64 import binascii import io import os import uuid import urllib.parse from collections import namedtuple from wsgiref.handlers import format_date_time from . import hdrs, multidict class BasicAuth(namedtuple('BasicAuth'...
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (C) 2010,2011,2012 Michael Hale Ligh <[EMAIL]> # # This file is part of Volatility. # # Volatility 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 F...
""" Continuous to discrete transformations for state-space and transfer function. """ from __future__ import division, print_function, absolute_import # Author: Jeffrey Armstrong <[EMAIL]> # March 29, 2011 import numpy as np from scipy import linalg from .ltisys import tf2ss, ss2tf, zpk2ss, ss2zpk __all__ = ['cont2...
# -*- coding: utf-8 -*- """Class representing the mapper for the formatter init files.""" from plasoscaffolder.bll.mappings import base_mapping_helper from plasoscaffolder.bll.mappings import base_sqliteplugin_mapping from plasoscaffolder.model import init_data_model class FormatterInitMapping( base_sqliteplugin_...
import skimage import skimage.io import skimage.transform import numpy as np # synset = [l.strip() for l in open('synset.txt').readlines()] # returns image of shape [224, 224, 3] # [height, width, depth] def load_image(path): # load image img = skimage.io.imread(path) img = img / 255.0 assert (0 <= ...
from django.shortcuts import render, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.views import generic from django.core.context_processors import csrf from django.views.decorators.csrf import csrf_protect, csrf_exempt from django.contrib import auth from django.contrib.auth....
""" SWF """ from tag import SWFTimelineContainer from stream import SWFStream from export import SVGExporter try: import cStringIO as StringIO except ImportError: import StringIO class SWFHeaderException(Exception): """ Exception raised in case of an invalid SWFHeader """ def __init__(self, message): ...
""" Python Character Mapping Codec cp1257 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.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,in...
#!/usr/bin/python2 # -*- coding: utf-8 -*- ##intento import cElementTree que es código nativo import sys reload(sys) sys.setdefaultencoding('utf-8') import csv import os import glob try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET """ Creado 1 de Diciembre 2015 @...
# -*- coding: utf-8 -*- """ werkzeug.routing ~~~~~~~~~~~~~~~~ When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback fun...
import logging as log import sys import getopt import os import subprocess import shutil def RunCMake(workspace, target, platform): # run CMake print "\n==================================================\n" returncode = 0 if platform == "windows": print "Running: vcvarsall.bat x86_amd64 && " +...
#!/usr/bin/python #/**************************************************************************** #* * #* OpenNI 2.x Alpha * #* Copyright (C) 2012 PrimeSense Ltd. ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0013_update_golive_expire_help_text'), ] operations = [ migrations.AlterField( model_name='groupp...
# -*- coding: utf-8 -*- # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>) # Code snippets from openobject-server copyright (C) 2004-2013 OpenERP S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Ge...
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP # # 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 limi...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-6 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" > <meta name="ROBOTS" content="NOARCHIVE"> <link rel="icon" type="image/vnd.microsoft.icon" href="https://ssl.gstatic.com/codesite/ph/images/phosti...
""" This is the default template for our main set of AWS servers. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 import json from .common import * from logsettings import get_logger_config import os from p...
import unittest from email import _encoded_words as _ew from email import errors from test.test_email import TestEmailBase class TestDecodeQ(TestEmailBase): def _test(self, source, ex_result, ex_defects=[]): result, defects = _ew.decode_q(source) self.assertEqual(result, ex_result) self.a...
# Maildir folder support with labels # Copyright (C) 2002 - 2011 John Goerzen & contributors # # 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 # (...
#!/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. import json import os import posixpath import shutil import subprocess import sys import tempfile import unittest SCRIPT_DIR = os.p...
from __future__ import print_function, division from sympy import zeros, Matrix, diff, solve_linear_system_LU, eye from sympy.core.compatibility import range from sympy.utilities import default_sort_key from sympy.physics.vector import (ReferenceFrame, dynamicsymbols, partial_velocity...
# -*- 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...
''' ================================================================================================= R Cipher Suite Includes all variants of the R cipher ================================================================================================= Developed by: ProgramRandom, a division of RandomCorporations A Pa...
# # 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 us...
""" Slack OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/slack.html https://api.slack.com/docs/oauth """ import re from social.backends.oauth import BaseOAuth2 class SlackOAuth2(BaseOAuth2): """Slack OAuth authentication backend""" name = 'slack' AUTHORIZATION_URL = 'https://...
from django.contrib.auth.models import User from django.db import models from django.utils import timezone from oauth2client.django_orm import FlowField, CredentialsField from crowdsourcing.utils import get_delimiter import pandas as pd import os class RegistrationModel(models.Model): user = models.OneToOneField(...
from __future__ import absolute_import import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.download import (url_to_path, unpack_url) from pip.exceptions import (InstallationError, BestVersionAlreadyInstalled, DistributionNotFound, Previ...
# Copyright 2008, 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version....
#!/usr/bin/env python # Copyright 2015 Red Hat, Inc. # # 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. # # This program ...
"""Simple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the following modu...
# 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...
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
""" Todo: cross-check the F-value with stats model """ from __future__ import division import itertools import warnings import numpy as np from scipy import stats, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_raises...
import six import chainer from chainer.backends import cuda from chainer.functions.activation import lstm from chainer.functions.array import concat from chainer.functions.array import split_axis from chainer import initializers from chainer import link from chainer.links.connection import linear from chainer import u...
from __future__ import unicode_literals import time import hmac import hashlib import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, float_or_none, int_or_none, sanitized_Request, urlencode_postdata, xpath_text, ) class AtresPlayerI...
import urllib import urlparse from django.core.paginator import Paginator from django.core.urlresolvers import reverse from .utils import json_response from ..models import Author, Module, Release ## Helper methods def error_response(errors, **kwargs): """ Returns an error response for v3 Forge API. ""...
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import traceback import warnings import zipfile from distutils import sysconfig from distutils.util import change_root from email.parser import FeedParser from pip._vendor import pkg_resources, six from...
# Copyright (C) 2011, 2014, 2015 David Maxwell # # This file is part of PISM. # # PISM 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. ...
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-06-06 15:14 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0027_project_notification_strategy'), ] opera...
# testing/fixtures.py # Copyright (C) 2005-2017 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 from . import config from . import assertions, schema from .util import adict fr...
""" Matrix Solver Parses a calibration table and solves the equations for the alpha constants used in the Hardy's Multi-Quadric method of calibration. """ import os, sys, string from math import sqrt from xml.dom import * from xml.dom.minidom import * import Numeric, LinearAlgebra # Define useful functions def length(...
#!/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'], ...
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, triang, blackmanharris import sys, os, functools, time from scipy.fftpack import fft, ifft, fftshift sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import dftModel as DFT import ...
""" Forms and validation code for user user_registration. """ from django.contrib.auth.models import User from django import forms from django.utils.translation import ugettext_lazy as _ # I put this on all required fields, because it's easier to pick up # on them with CSS or JavaScript if they have a ...
"""ASN.1 specification for X509 extensions.""" from ct.crypto.asn1 import named_value from ct.crypto.asn1 import oid from ct.crypto.asn1 import tag from ct.crypto.asn1 import types from ct.crypto.asn1 import x509_common from ct.crypto.asn1 import x509_name # Standard extensions from RFC 5280. class BasicConstraints(...
"""Utilities for writing code that runs on Python 2 and 3 In luigi, we hard-copy this file into the project itself, to ensure that all luigi users use the same version of six. """ # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this so...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2020 OSGeo # # 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 ...
# -*- coding: utf-8 -*- """ AR-specific Form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, CharField, Selec...
from __future__ import unicode_literals import sys from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import six...
""" Commands related to links, references and footnotes. Exported commands: ReferenceJumpCommand ReferenceJumpContextCommand ReferenceNewReferenceCommand ReferenceNewInlineLinkCommand ReferenceNewInlineImage ReferenceNewImage ReferenceNewFootnote ReferenceDeleteReference ReferenceOr...
#!/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...
import unittest import time from django.test import TestCase from django.test.utils import override_settings from django.conf import settings from django.core import management from django.utils.six import StringIO from wagtail.tests.utils import WagtailTestUtils from wagtail.tests.search import models from wagtail.w...
""" Utilities for django models. """ import unicodedata import re from eventtracking import tracker from django.conf import settings from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django_countries.fields import Country # The setting name used for events when "sett...
""" A refactored implementation of Boids from a deliberately bad implementation of [Boids](http://dl.acm.org/citation.cfm?doid=37401.37406): an exercise for class. """ from matplotlib import pyplot as plt from matplotlib import animation import numpy as np class Boids(object): def __init__(self, ...
############################################################################ # Copyright (C) 2005 by Reithinger GmbH # [EMAIL] # # This file is part of faces. # # faces is free software; you can redistribute it and/or modify # it under t...
""" Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context diff format. Function nd...
from protocols.forms import forms from core.utils import VOLUME_UNITS, CONCENTRATION_UNITS, TIME_UNITS class ResuspendForm(forms.VerbForm): name = "Resuspend" slug = "resuspend" # has_component = True has_manual = True layers = ['item_to_act', 'reagent', 'settify'] item_to_act = forms.CharFie...
""" Mostly equivalent to the views from django.contrib.auth.views, but implemented as class-based views. """ from __future__ import unicode_literals import warnings from django.conf import settings from django.contrib.auth import get_user_model, REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_requ...
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_raises, assert_equal, assert_warns) from numpy import random from numpy.compat import asbytes import sys class TestSeed(TestCase): def test_sc...
# 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...
# -*- coding: utf-8 -*- """ Tests that quoting specifications are properly handled during parsing for all of the parsers defined in parsers.py """ import csv import pandas.util.testing as tm from pandas import DataFrame from pandas.compat import PY3, StringIO, u class QuotingTests(object): def test_bad_quote_...
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
# Authors: Alexandre Gramfort <[EMAIL]> # Denis Engemann <[EMAIL]> # Martin Luessi <[EMAIL]> # Eric Larson <[EMAIL]> # Marijn van Vliet <[EMAIL]> # Jona Sassenhagen <[EMAIL]> # Teon Brooks <[EMAIL]> # Christian Brodbeck <[EMAIL]> # Stefan Appelhoff...
"""Unittests for test.script_helper. Who tests the test helper?""" import subprocess import sys from test import script_helper import unittest from unittest import mock class TestScriptHelper(unittest.TestCase): def test_assert_python_expect_success(self): t = script_helper._assert_python(True, '-c', 'i...
"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..prepr...
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import threading import unittest import concurrent def _ForkTestHelper(arg1, arg2, pickle_me_not, test_instance, parent_pi...
from unittest import TestCase from mock import patch, MagicMock, call import probe.controllers.ftpctrl as module from irma.common.base.exceptions import IrmaFtpError class TestFtpctrl(TestCase): @patch("probe.controllers.ftpctrl.os.path.isdir") @patch('probe.controllers.ftpctrl.config.IrmaSFTPv2') def te...
import threading import Queue import time from core.task import Task def _populate_list_with_file(file_name): """ Open a file, read its content and strips it. Returns a list with the content additionally it filter and clean some splinters """ with open(file_name, 'r') as f: tmp_list = f.r...
from common_fixtures import * # NOQA from gdapi import ApiError @pytest.fixture(scope='module') def user_client(context): return context.user_client def _user_preference(client, name=None): if name is None: name = random_str() preference = client.wait_success(client.create_user_preference( ...
# Copyright 2014 Donald Stufft # # 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, so...
"""Read the time series and output a csv""" import argparse import h5py import csv import sys import numpy as np parser = argparse.ArgumentParser( __doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( "file", nargs=1, help="hdf5 file" ) if __name__ == '__main__': ...
from . import base from .decorators import command_custom from tuned import consts import tuned.logs import errno import perf import re log = tuned.logs.get() class IrqbalancePlugin(base.Plugin): """ Plugin for irqbalance settings management. """ def __init__(self, *args, **kwargs): super(IrqbalancePlugin, sel...
# PyGEGL - Python bindings for the GEGL image processing library # Copyright (C) 2007 Manish Singh # # __init__.py: initialization file for the Gegl package # # PyGEGL 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 Softw...
from __future__ import absolute_import from datetime import timedelta from django.core.urlresolvers import reverse from django.utils import timezone from mock import patch from sentry.models import ( EventMapping, Group, GroupBookmark, GroupSeen, GroupStatus ) from sentry.testutils import APITestCase from sentry....
#!/usr/bin/env python ''' menu handling widgets for wx Andrew Tridgell November 2013 ''' import wx from MAVProxy.modules.lib import mp_util class MPMenuGeneric(object): '''a MP menu separator''' def __init__(self): pass def find_selected(self, event): return None def _append(self, m...
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
from pandac.PandaModules import Point3 from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import ClassicFSM, State from direct.task import Task from toontown.minigame import DistributedMinigameAI from toontown.minigame import MinigameGlobals from toontown.minigame import IceGameGlobals from toon...
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Cenobit Technologies, Inc. http://cenobit.es/ # 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 sour...
# -*- 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...
# -*- 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 = 'd F Y' # 25 Ottobre 2006 TIME_FO...
# -*- 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...
# # 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 # distributed under ...
''' Created on May 8, 2011 @author: sander ''' import os.path import shutil import sys ''' nose.tools has to be imported into the Eclipse project, eg, from /usr/local/lib/python2.6/dist-packages/nose-1.0.0-py2.6.egg/nose/tools.py ''' from tools import with_setup, raises, nottest import lab_o_matic.compiler paths ...
"""By using execfile(this_file, dict(__file__=this_file)) you will activate this virtualenv environment. This can be used when you must use an existing Python interpreter, not the virtualenv bin/python """ try: __file__ except NameError: raise AssertionError( "You must run this like execfile('path/to/...
#################################################### # # This file records all the constant variables used # in tsdb module # #################################################### OPMAP = { '<': 0, '>': 1, '==': 2, '!=': 3, '<=': 4, '>=': 5 } FILES_DIR = 'persistent_files' MAX_CARD = 8 INDEX...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class Procurement...
from clang.cindex import TokenKind from nose.tools import eq_ from nose.tools import ok_ from nose.tools import raises def test_constructor(): """Ensure TokenKind constructor works as expected.""" t = TokenKind(5, 'foo') eq_(t.value, 5) eq_(t.name, 'foo') @raises(ValueError) def test_bad_register():...
import fsui from launcher.i18n import gettext from launcher.setup.setupwelcomepage import SetupWelcomePage from launcher.ui.skin import LauncherTheme from launcher.ui.widgets import PrevButton, NextButton, CloseButton class SetupWizardDialog(fsui.Window): @classmethod def open(cls, parent=None): retur...
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata ([EMAIL]) # # This program is free software: you can redistribute it and/or modify # it under the t...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The code base had inconsistent usage of tabs/spaces for indenting in Lua. files. Spaces were more prominent - and I prefer them over tabs. So I wrote this small script to fix leading tabs in Lua files to spaces. It also saves files in unix file endings ("\r\n") and s...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import jsonfield.fields import badges.models from django.conf import settings import django.utils.timezone from model_utils import fields import xmodule_django.models class Migration(migrations.Migration): d...
# Author: jkaberg <[EMAIL]>, based on fuzemans work (https://github.com/RuudBurger/CouchPotatoServer/blob/develop/couchpotato/core/downloaders/rtorrent/main.py) # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under t...
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <[EMAIL]> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as ...
# 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...