text
stringlengths
475
200k
import unittest, struct import os from test import test_support import math from math import isinf, isnan, copysign, ldexp import operator import random, fractions INF = float("inf") NAN = float("nan") class GeneralFloatCases(unittest.TestCase): def test_float(self): self.assertEqual(float(3.14), 3.14) ...
''' #Cover 22976 based on test_zs_upgd_3.5.2_latest_on_cos74.py Test the upgrade master from 3.5.2.53 & check API permissions @author: Zhaohao ''' import os import tempfile import uuid import time import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_s...
from unittest import TestCase from lxml import etree from pcs_test.tools.assertions import assert_xml_equal from pcs_test.tools.xml import etree_to_str from pcs.lib.cib import nvpair from pcs.lib.cib.tools import IdProvider # pylint: disable=no-self-use, protected-access class AppendNewNvpair(TestCase): def te...
"""Provides functionality to interact with climate devices.""" from abc import abstractmethod from datetime import timedelta import functools as ft import logging from typing import Any, Dict, List, Optional import voluptuous as vol from homeassistant.const import ( ATTR_TEMPERATURE, PRECISION_TENTHS, PRE...
#!/usr/bin/env python import gevent import logging import os import random import re import sys import time from gevent import socket from gevent.event import Event from gevent.queue import Queue from logging.handlers import RotatingFileHandler from optparse import OptionParser from irc import IRCConnection, IRCBot ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import imp import os import sys import shutil import six from migrate import exceptions from migrate.versioning import version, repository from migrate.versioning.script import * from migrate.versioning.util import * from migrate.tests import fixture from migrate.tests.f...
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ [EMAIL], www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------------...
import numpy as np import scipy.sparse as sp import pytest from re import escape from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import ignore_warnings from sklearn.utils._mocking import CheckingClassifier from sklearn.multiclass...
"""Classes for manipulating audio devices (currently only for Sun and SGI)""" from warnings import warnpy3k warnpy3k("the audiodev module has been removed in Python 3.0", stacklevel=2) del warnpy3k __all__ = ["error","AudioDev"] class error(Exception): pass class Play_Audio_sgi: # Private instance variables ...
# Copyright 2019 Anapaya Systems # # 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...
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import pytest from pootle_app.forms import ...
#! /usr/local/bin/python # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin/env w...
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 Andrea Cometa. # Email: [EMAIL] # Web site: http://www.andreacometa.it # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2012 Domsense srl ...
#! /usr/bin/env python """Test the errno module Roger E. Masse """ import errno from test import support import unittest std_c_errors = frozenset(['EDOM', 'ERANGE']) class ErrnoAttributeTests(unittest.TestCase): def test_for_improper_attributes(self): # No unexpected attributes should be on the modul...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-07-28 08:26 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depend...
# -*- 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...
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <[EMAIL]> 2007-2008 # # 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 l...
import datetime import os import uuid from decimal import Decimal import pytest from django.http import QueryDict from django.test import TestCase, override_settings from django.utils import six, timezone import rest_framework from rest_framework import serializers # Tests for field keyword arguments and core funct...
#!/usr/bin/env python3 """! @file """ import glob import sys import time # @todo: manage test that have to be checked manually (such as plots) def analyse_log(filename): """! @brief Analyse a test log to find passed and failed tests @param filename Name of the log file @return res @todo doc this ...
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
""" MPEG audio file parser. Creation: 12 decembre 2005 Author: Victor Stinner """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, MissingField, ParserError, createOrphanField, Bit, Bits, Enum, PaddingBits, PaddingBytes, RawBytes) from hachoir_parser.audio.id3 import ID3v1, ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# -*- coding: utf-8 -*- # # Copyright © 2015,2016 Mathieu Duponchelle <[EMAIL]> # Copyright © 2015,2016 Collabora Ltd # # 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 Foundation; either version 2.1 ...
# bdiff.py - Python implementation of bdiff.c # # Copyright 2009 Matt Mackall <[EMAIL]> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import struct, difflib, re def splitnewlines(text): '''like str.splitlines, bu...
from __future__ import unicode_literals import base64 import binascii import hashlib import importlib import warnings from collections import OrderedDict from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.signals import setting_changed from django.dispatch import...
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from allauth.socialaccount.providers import registry from .provider import E...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
# Copyright (c) 2019 PaddlePaddle 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 appli...
# geotecha - A software suite for geotechncial engineering # Copyright (C) 2018 Rohan T. Walker ([EMAIL]) # # 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 #...
"""The nut component.""" from homeassistant.components.sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_POWER, DEVICE_CLASS_TEMPERATURE, ) from homeassistant.const import ( ELECTRICAL_CURRENT_AMPERE, ELECTRICAL_VOLT_AMPERE, FREQUENCY_HERTZ, PERCENTAGE, POWER_WATT, TEMP_CELSIUS, ...
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# system call counts # (c) 2010, Tom Zanussi <[EMAIL]> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.environ['PERF_EX...
from sword2 import HttpLayer, HttpResponse from octopus.lib import http import json from requests.auth import HTTPBasicAuth class OctopusHttpResponse(HttpResponse): def __init__(self, *args, **kwargs): self.resp = None if len(args) > 0: self.resp = args[0] def __getitem__(self, att...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/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. """Utility to decode a crash dump generated by untrusted_crash_dump.[ch] Currently this produces a simple stack trace. """ import...
#!/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': ['...
# 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...
# 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 unittest fro...
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
# -*- 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 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus.at # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
# -*- 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...
from django.http import Http404 from django.shortcuts import get_object_or_404, get_list_or_404 from django.test import TestCase from models import Author, Article class GetObjectOr404Tests(TestCase): def test_get_object_or_404(self): a1 = Author.objects.create(name="Brave Sir Robin") a2 = Author...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.admin import FieldListFilter try: from django.contrib.admin.utils import prepare_lookup_value except ImportError: # django < 1.7 from django.contrib.admin.util import prepare_lookup_value from django.utils.translation impor...
""" Support for Apple TV. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.apple_tv/ """ import asyncio import logging import hashlib import aiohttp import voluptuous as vol from homeassistant.core import callback from homeassistant.componen...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('donors', '0004_auto_20141108_1110'), ] operations = [ migrations.CreateModel( name='Donation', ...
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
""" BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21). Adapted from wsgiref.simple_server: http://svn.eby-sarna.com/wsgiref/ This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. Don't use it for production use. """ from BaseHTTPSe...
# textbox.py import waxyobject import wx import core import styles class TextBox(wx.TextCtrl, waxyobject.WaxyObject): __events__ = { 'Char': wx.EVT_CHAR, # do all controls have this? 'MaxLength': wx.EVT_TEXT_MAXLEN, # alias for TextMaxLen 'Text': wx.EVT_TEXT, 'Tex...
# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
from chowdren.writers.objects import ObjectWriter from chowdren.common import get_animation_name, to_c, make_color from chowdren.writers.events import (ComparisonWriter, ActionMethodWriter, ConditionMethodWriter, ExpressionMethodWriter, make_table) from mmfparser.bitdict import BitDict from mmfparser.data.font i...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
#!/usr/bin/env python # # Copyright 2012 Google Inc. All Rights Reserved. """Parser for OSX quarantine sqlite files.""" __program__ = "osx_quarantine.py" import datetime import glob import locale import sys from grr.parsers import sqlite_file class OSXQuarantineEvents(sqlite_file.SQLiteFile): """Class for han...
#!/usr/bin/env python ########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way...
from test.test_support import verbose, have_unicode, TestFailed import sys # test string formatting operator (I am not sure if this is being tested # elsewhere but, surely, some of the given cases are *not* tested because # they crash python) # test on unicode strings as well overflowok = 1 def testformat(formatstr,...
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry.models import OrganizationMember, OrganizationMemberTeam from sentry.testutils import TestCase class ProjectTest(TestCase): def test_member_set_simple(self): user = self.create_user() org = self.create_organization(owner=...
import re from core import plugins class Plugin: """Triggering plugin attributes. Get attributes of the currently running plugin. This object is generally imported like this: >>> from api import plugin The following attributes descriptions include some examples, based on an imaginative plug...
import logging from pip.basecommand import Command from pip.operations.check import check_requirements from pip.utils import get_installed_distributions logger = logging.getLogger(__name__) class CheckCommand(Command): """Verify installed packages have compatible dependencies.""" name = 'check' usage =...
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import warnings from pip.basecommand import RequirementCommand from pip.index import PackageFinder from pip.exceptions import CommandError, PreviousBuildDirError from pip.req import RequirementSet from pip.utils import import_or_r...
# Copyright (c) 2015 "aldarionsevero Lucas Severo Alves # <[EMAIL]>"" # 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, c...
# (C) Datadog, Inc. 2014-2016 # (C) Leif Walsh <[EMAIL]> 2014 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import time import types # 3p import bson from pymongo import ( MongoClient, ReadPreference, uri_parser, version as py_version, ) # project from checks im...
import os import sys import unittest import test.support as test_support from tkinter import Tcl, TclError test_support.requires('gui') class TkLoadTest(unittest.TestCase): @unittest.skipIf('DISPLAY' not in os.environ, 'No $DISPLAY set.') def testLoadTk(self): tcl = Tcl() self.assertRaises(Tc...
# -*- coding: utf-8 -*- """ *************************************************************************** gdalcalc.py --------------------- Date : Janaury 2015 Copyright : (C) 2015 by Giovanni Manghi Email : giovanni dot manghi at naturalgis dot pt **********...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# -*- coding: utf-8 -*- from django.conf import settings if settings.OSCAR_DELETE_IMAGE_FILES: from oscar.core.loading import get_model from django.db import models from django.db.models.signals import post_delete from sorl import thumbnail from sorl.thumbnail.helpers import ThumbnailError ...
''' .. module:: skrf.calibration.calibrationSet ================================================================ calibrationSet (:mod:`skrf.calibration.calibrationSet`) ================================================================ Contains the CalibrationSet class, and supporting functions CalibrationSet Class ...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, models, router, transaction from django...
# -coding=latin1- from warnings import warnpy3k warnpy3k("In 3.x, the macerrors module is removed.", stacklevel=2) svTempDisable = -32768 #svTempDisable svDisabled = -32640 #Reserve range -32640 to -32768 for Apple temp disables. fontNotOutlineErr = -32615 #bitmap font passed to routine that does outlin...
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, absolute_import import sys import click import cProfile import StringIO import pstats import frappe import frappe.utils from functools import wraps click.disable_unicode_lite...
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") e...
# -*- coding: utf-8 -*- tests = r""" >>> from django.forms import * >>> from django.core.files.uploadedfile import SimpleUploadedFile # CharField ################################################################### >>> e = {'required': 'REQUIRED'} >>> e['min_length'] = 'LENGTH %(length)s, MIN LENGTH %(min)s' >>> e['ma...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
"""The test for the random number sensor platform.""" import unittest from homeassistant.bootstrap import setup_component from tests.common import get_test_home_assistant class TestRandomSensor(unittest.TestCase): """Test the Random number sensor.""" def setup_method(self, method): """Set up things...
""" TODO """ from openedx.core.lib.block_structure.transformer import BlockStructureTransformer from .block_depth import BlockDepthTransformer class DescendantList(object): """ Contain """ def __init__(self): self.items = [] class BlockNavigationTransformer(BlockStructureTransformer): ""...
# # Copyright 2013 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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...
#!/usr/bin/env python # # Copyright 2011 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage import os from portage.util._ctypes import find_library, LoadLibrary from portage.util._async.ForkProcess import ForkProcess class SyncfsProcess(ForkProcess): """ Isolate ctypes usage in a subprocess, ...
from __future__ import unicode_literals import re from .common import InfoExtractor from .youtube import YoutubeIE class WimpIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?wimp\.com/([^/]+)/' _TESTS = [{ 'url': 'http://www.wimp.com/maruexhausted/', 'md5': 'f1acced123ecb28d9bb79f2479f2b6a...
# 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...
"""Implementation module for socket operations. See the socket module for documentation.""" AF_APPLETALK = 16 AF_DECnet = 12 AF_INET = 2 AF_INET6 = 23 AF_IPX = 6 AF_IRDA = 26 AF_SNA = 11 AF_UNSPEC = 0 AI_ADDRCONFIG = 1024 AI_ALL = 256 AI_CANONNAME = 2 AI_NUMERICHOST = 4 AI_NUMERICSERV = 8 AI_PASSIVE = 1...
# coding=utf-8 """ Test Suite for InaSAFE. Contact : etienne at kartoza dot com .. note:: 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 ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import filer.fields.file import filer.fields.image import cms.models.fields class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347')...
from __future__ import division, absolute_import, print_function import sys import collections import pickle from os import path import numpy as np from numpy.compat import asbytes from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_array_equal, assert_array_almost_equal, ass...
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
""" Enrollment operations for use by instructor APIs. Does not include any access control, be sure to check access before calling. """ import json from django.contrib.auth.models import User from django.conf import settings from django.core.urlresolvers import reverse from django.core.mail import send_mail from stud...
# -*- coding: utf-8 -*- import pytest from time import sleep from six.moves.urllib.parse import urlparse from cfme.base.ui import ServerView from cfme.common.vm import VM from cfme.infrastructure.provider import wait_for_a_provider from cfme.utils.appliance import provision_appliance from cfme.utils.appliance.impleme...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# 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 t...
""" Python Character Mapping Codec for CP858, modified from cp850. """ import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): return codecs.charmap_decod...
#!/usr/bin/python # #Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import argparse import ConfigParser from provision_dns import DnsProvisioner from requests.exceptions import ConnectionError class DelVirtualDns(object): def __init__(self, args_str = None): self._args = None...
# Copyright (c) 2017 Cisco and/or its affiliates. # # 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 v...
# -*- 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...
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale ...
""" Copyright (c) 2015 Michael Bright and Bamboo HR 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...
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
from flask import Flask, jsonify, make_response, abort,request, send_from_directory, redirect, render_template, Response import db, datetime, csv from time import time from io import StringIO DEBUG = False #path to file to be displayed on index page INDEX = '/opt/index.html' app = Flask(__name__, static_url_path='') ...