gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import print_function __author__ = """Alex "O." Holcombe""" ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor import numpy as np import itertools #to calculate all subsets from copy import deepcopy from math import atan, pi, cos, sin, sqrt, ceil import time, sys, platfo...
# coding: utf-8 from __future__ import division, unicode_literals """ Created on Jul 16, 2012 """ __author__ = "Shyue Ping Ong, Stephen Dacek" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Jul 16, 2012" import u...
import numpy import array import copy import re,os,sys,copy from glob import glob from scipy.interpolate import griddata from scipy.integrate import simps,quad from scipy.optimize import leastsq, fsolve #from sm_functions import read_ised,read_ised2,calc_lyman,calc_beta from astropy import units as U from astropy impo...
from collections import namedtuple import numpy as np from . import distributions from . import futil __all__ = ['find_repeats', 'linregress', 'theilslopes'] def linregress(x, y=None): """ Calculate a regression line This computes a least-squares regression for two sets of measurements. Paramete...
import json import logging import os import sys import six from docker.utils.ports import split_port from jsonschema import Draft4Validator from jsonschema import FormatChecker from jsonschema import RefResolver from jsonschema import ValidationError from .errors import ConfigurationError log = logging.getLogger(__...
# 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...
"""Unit tests for new super() implementation.""" import sys import unittest class A: def f(self): return 'A' @classmethod def cm(cls): return (cls, 'A') class B(A): def f(self): return super().f() + 'B' @classmethod def cm(cls): return (cls, super().cm(), 'B')...
import serverconf from thrift.transport import TTransport from thrift.transport import TSocket from thrift.transport import THttpClient from thrift.protocol import TBinaryProtocol import thrift import sdhashsrv from sdhashsrv import * from sdhashsrv.ttypes import * from sdhashsrv.constants import * from sdhashsrv.sdh...
# coding=utf-8 # Copyright 2022 The Tensor2Robot 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 ...
# Copyright 2012 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
# # Filename: IBMarketingCloud.py # 6/12/2016 1:56 AM # # __author__ = 'measley' import ConfigParser import json import requests from lxml import etree from lxml import objectify from lxml.etree import Element from lxml.etree import SubElement class IBMCloud(object): # constants AUTH_LEGACY = 1 AUTH_O...
# Copyright 2018 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...
""" This module defines the different types of terms... """ __all__ = [ 'Node', 'Identifier', 'URIRef', 'BNode', 'Literal', 'Variable', 'Statement', ] import logging _LOGGER = logging.getLogger(__name__) import base64 import re import threading from urlparse import urlparse, urlj...
# 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...
import json import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest from ..exceptions import JSONRPCInvalidRequestException from ..jsonrpc1 import ( JSONRPC10Request, JSONRPC10Response, ) class TestJSONRPC10Request(unittest.TestCase): """ Test JSONRPC10Reques...
"""Coverage controllers for use by pytest-cov and nose-cov.""" import os import random import socket import sys import coverage class CovController(object): """Base class for different plugin implementations.""" def __init__(self, cov_source, cov_report, cov_config, config=None, nodeid=None): """Ge...
import difflib from test.support import run_unittest, findfile import unittest import doctest import sys class TestWithAscii(unittest.TestCase): def test_one_insert(self): sm = difflib.SequenceMatcher(None, 'b' * 100, 'a' + 'b' * 100) self.assertAlmostEqual(sm.ratio(), 0.995, places=3) sel...
# -*- coding: utf-8 -*- r""" werkzeug.contrib.sessions ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains some helper classes that help one to add session support to a python WSGI application. For full client-side session storage see :mod:`~werkzeug.contrib.securecookie` which implements a secure,...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
# coding=utf-8 # Copyright 2014 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 logging impor...
# 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 -*- 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 field 'Group.users_seen' db.add_column('sentry_groupedmessage', 'users_seen', ...
# coding: utf-8 import httplib import json from urllib import urlencode from urllib2 import urlopen, Request # python-iugu package modules import base import config class IuguMerchant(base.IuguApi): def __init__(self, **kwargs): super(IuguMerchant, self).__init__(**kwargs) self.__conn = base.Iu...
from collections import OrderedDict import os.path import shutil import pytest from edalize import get_edatool tests_dir = os.path.dirname(__file__) class TestFixture: """A fixture that makes an edalize backend with work_root directory Create this object using the make_edalize_test factory fixture. This ...
import threading import sys from django.contrib.sessions.models import Session from django.template import RequestContext, TemplateDoesNotExist from django.test import Client, TestCase from mock import MagicMock, Mock, patch from django_mobile import get_flavour, set_flavour from django_mobile.conf import settings from...
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import json import os import re import subprocess import sys from distutils.dist import Distribution from ...
from .utils import UsingURLPatterns from django.conf.urls import include, url from rest_framework import serializers from rest_framework import status, versioning from rest_framework.decorators import APIView from rest_framework.response import Response from rest_framework.reverse import reverse from rest_framework.tes...
#!/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. """Entry point for both build and try bots. This script is invoked from XXX, usually without arguments to package an SDK. It autom...
import os import jinja2 import webapp2 import re import hashlib import string import random # import user # import post # import comment from google.appengine.ext import db template_dir = os.path.join(os.path.dirname(__file__), 'templates') jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir), ...
import logging import os from rest_framework.authentication import SessionAuthentication from rest_framework.permissions import IsAdminUser from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import status from seaserv import ccnet_api, seafile_api from seahub.ap...
# Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The vyos_lag_interfaces class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necessary to bring the current co...
"""Based on a Python Cookbook entry. Title: Decorator for BindingConstants at compile time Submitter: Raymond Hettinger http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277940 Example uses: Importing ========= from schevo.lib import optimize Module optimization =================== import sys optimize.bind_...
# coding: utf-8 """ THIS SOFTWARE IS LICENSED UNDER THE BSD LICENSE CONDITIONS. FOR LICENCE DETAILS SEE share/LICENSE.TXT (c) 2005-2009, Marco Hoehle <marco.hoehle@unibas.ch> (c) 2010, Hanspeter Spalinger <h.spalinger@stud.unibas.ch> Ldap Plugin for ud2 Client This class provides the admin functionailty. This file sh...
#!/usr/bin/env python """ Minimal backend for an mcash powered store with unlimited supplies. Our main persona is a friendly pizza shop at the corner. """ import functools import json import logging import md5 import os import random import time import urlparse import uuid import requests import tornado.ioloo...
#!/usr/bin/env python ''' 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")...
"""Logic expressions handling NOTE ---- at present this is mainly needed for facts.py , feel free however to improve this stuff for general purpose. """ from __future__ import print_function, division def _fuzzy_group(args, quick_exit=False): """Return True if all args are True, None if there is any None else F...
""" @package mi.instrument.seabird.sbe54tps.test.test_driver @file mi/instrument/seabird/sbe54tps/test/test_driver.py @author Roger Unwin @brief Test cases for sbe54 driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driver -u $ bin/test_driver -i ...
""" A simple test server for integration tests. Only understands stdio. Uses the asyncio module and mypy types, so you'll need a modern Python. To make this server reply to requests, send the $test/setResponse notification. To await a method that this server should eventually (or already has) received, send the $tes...
""" Kernel dump configuration files =============================== This module contains the following parsers: KDumpConf - file ``/etc/kdump.conf`` ------------------------------------ KexecCrashLoaded - file ``/sys/kernel/kexec_crash_loaded`` ---------------------------------------------------------- SysconfigKdu...
import pytest import unittest class TestGatherFilepathList(unittest.TestCase): def setUp(self): # setup import os import pkg_resources as p from qap.script_utils import gather_filepath_list self.gather_filepath_list = gather_filepath_list # inputs self.da...
# Authors: Dirko Coetsee # License: 3-clause BSD """ Implements feature extraction methods to use with HACRF models. """ import numpy as np import functools import itertools class PairFeatureExtractor(object): """Extract features from sequence pairs. For each feature, a grid is constructed for a sequency 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 use ...
import functools from importlib import import_module from inspect import getfullargspec from django.utils.html import conditional_escape from django.utils.itercompat import is_iterable from .base import Node, Template, token_kwargs from .exceptions import TemplateSyntaxError class InvalidTemplateLibrary(Exception):...
# -*- coding: utf-8 -*- # coding=utf-8 # Copyright 2019 The SGNMT 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 requir...
"""This module contains a class for representing the gameboard.""" from random import randint from collections import namedtuple import json import pandas as pd from .constants import Constants as C from .gameboard_delegate import GameBoardDelegate from .combiners import combine_left, combine_right from .combiners impo...
from yargy.visitor import Visitor from yargy.dot import ( style, DotTransformator, BLUE, ORANGE, RED, PURPLE, GREEN, DARKGRAY ) from yargy.predicates import is_predicate from .constructors import ( is_rule, Production, EmptyProduction, Rule, OrRule, OptionalRule...
#---------------------------------------------------------------------- # Copyright (c) 2011-2013 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
# -*- coding: utf-8 -*- """ flaskbb.management.models ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains all management related models. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ from wtforms import (TextField, IntegerField, FloatField, BooleanField, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Encrypt/decrypt files with symmetric AES cipher-block chaining (CBC) mode. Usage: File Encryption: aescrypt.py [-f] infile [outfile] File decryption: aescrypt.py -d [-f] infile [outfile] This script is derived from an answer to this StackOverflow question: ...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# 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 th...
#!/usr/bin/env python ''' Controls or queries the web components of gpperfmon. ''' import os import stat import sys import signal import time import socket import subprocess import shutil import ConfigParser import re import getpass import psutil from gppylib.db import dbconn GPPERFMONHOME=os.getenv('GPPERFMONHOME')...
#!/usr/bin/python3 '''Manages virtual machines.''' import argparse import getpass import json import logging import os.path import shlex import subprocess import sys from typing import Any, List, Mapping, Optional def _run(args: List[str], check: bool = True) -> 'subprocess.CompletedProcess[str]': '''A...
"""Support for LIFX lights.""" import asyncio from datetime import timedelta from functools import partial import logging import math import aiolifx as aiolifx_module import aiolifx_effects as aiolifx_effects_module import voluptuous as vol from homeassistant import util from homeassistant.components.light import ( ...
""" This file must not depend on any other CuPy modules. """ import ctypes import json import os import os.path import shutil import sys import warnings # '' for uninitialized, None for non-existing _cuda_path = '' _nvcc_path = '' _rocm_path = '' _hipcc_path = '' _cub_path = '' """ Library Preloading --------------...
import feedparser import json import logging import sys import plugin from utils import str_utils FAIL_MESSAGE = ( "Unable to download or parse feed. Remove unused feeds using " "the !listfeed and !removefeed commands." ) HELP_MESSAGE = ( "!addfeed url [fetch time [custom title]] where:\n" "url - is...
class CpuStoppedCall(Exception): pass instruction_map = {} instruction_names = {} DEBUG = False def instruction(alt=None): def decorator(func): number = 110 + len(instruction_map) instruction_map[number] = func instruction_names[alt or func.__name__] = number return func ...
""" pygments.lexers.hdl ~~~~~~~~~~~~~~~~~~~ Lexers for hardware descriptor languages. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, include, using, this, words from pygment...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2013 OpenStack Foundation # 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 ...
import os from django.contrib import messages import traceback from django.contrib.auth.views import login from django.http import HttpResponseForbidden, HttpResponseRedirect from django.utils.importlib import import_module from limbo import exceptions from django.views.static import serve from limbo.paths import reque...
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
from __future__ import absolute_import from __future__ import unicode_literals import logging import os import re import sys from collections import namedtuple from operator import attrgetter import enum import six from docker.errors import APIError from docker.utils import LogConfig from docker.utils.ports import bu...
""" For developing tabular api """ from os.path import join, isfile, dirname, realpath import sys import json import requests from gc_apps.geo_utils.msg_util import * """ Load up the server and username """ GEONODE_CREDS_FNAME = join(dirname(realpath(__file__)), 'server_creds.json') assert isfile(GEONODE_CREDS_FNAME...
# -*- coding: utf-8 -*- """ ulmo.cdec.historical.core ~~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides access to data provided by the `California Department of Water Resources`_ `California Data Exchange Center`_ web site. .. _California Department of Water Resources: http://www.water.ca.gov/ ....
# -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
from __future__ import absolute_import from __future__ import print_function from functools import wraps from django.core.cache import cache as djcache from django.core.cache import caches from django.conf import settings from django.db.models import Q from django.core.cache.backends.base import BaseCache from typin...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 tabstop=4 expandtab shiftwidth=4 softtabstop=4 """ #============================================================================# # # # FILE: make_sheet (python 3) ...
from __future__ import (absolute_import, division, print_function) from logging import getLogger from PySide import QtCore, QtGui from ret.elf import RetkitElfDocument from .ConsoleWindow import ConsoleWindow from .Ui_RetWindow import Ui_RetWindow log = getLogger("ret.ui.qt") class FunctionTableModel(QtCore.QAbstract...
""" Model creation / weight loading / state_dict helpers Hacked together by / Copyright 2020 Ross Wightman """ import logging import os import math from collections import OrderedDict from copy import deepcopy from typing import Any, Callable, Optional, Tuple import torch import torch.nn as nn from torch.hub import l...
from __future__ import unicode_literals from frappe import _ from frappe.desk.moduleview import add_setup_section def get_data(): data = [ { "label": _("Users"), "icon": "fa fa-group", "items": [ { "type": "doctype", "name": "User", "description": _("System and Website Users") }, ...
# 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...
""" Functionality to read and write the Newick serialization format for trees. .. seealso:: https://en.wikipedia.org/wiki/Newick_format """ import re import pathlib __version__ = "1.0.1.dev0" RESERVED_PUNCTUATION = ':;,()' COMMENT = re.compile(r'\[[^\]]*\]') def length_parser(x): return float(x or 0.0) def l...
import contextlib import re import urllib from django.conf import settings from django.contrib import messages from django.contrib.auth import BACKEND_SESSION_KEY, logout from django.core.exceptions import MiddlewareNotUsed from django.core.urlresolvers import is_valid_path from django.core.validators import validate_...
# Copyright 2014 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 agre...
# Copyright 2017, OpenCensus 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 w...
# -*- coding: utf-8 -*- """ Dependencies: flask, tornado SeeAlso: routes.turk_identification """ from __future__ import absolute_import, division, print_function, unicode_literals from ibeis.control import controller_inject from flask import url_for, request, current_app # NOQA import numpy as np # NOQA import ...
import json from django.http.response import HttpResponseServerError from corehq.apps.commtrack.exceptions import DuplicateProductCodeException from corehq.util.files import file_extention_from_filename from couchexport.writers import Excel2007ExportWriter from couchexport.models import Format from couchdbkit import Re...
""" Utilities for the manager cli's db operations """ import copy import importlib import json import time import anchore_engine.db from anchore_engine.db.entities.common import normalize_db_params from anchore_engine.subsys import logger ENGINE_UPGRADE_MODULE_NAME = "anchore_engine.db.entities.upgrade" _db_context ...
# Test case for the os.poll() function import os import random import select import _testcapi try: import threading except ImportError: threading = None import time import unittest from test.support import TESTFN, run_unittest, reap_threads try: select.poll except AttributeError: raise unittest.SkipTe...
import sys import pytest import pprint import pylibefp from qcelemental.testing import compare, compare_recursive, compare_values from systems import * def blank_ene(): fields = [ 'charge_penetration', 'disp', 'dispersion', 'elec', 'electrostatic', 'electrostatic_point_charges', 'exchange_repuls...
# coding: utf-8 from __future__ import unicode_literals from admitad.items.base import Item __all__ = ( 'Websites', 'WebsitesManage' ) class Websites(Item): """ List of websites """ SCOPE = 'websites' URL = Item.prepare_url('websites') SINGLE_URL = Item.prepare_url('websites/%(we...
#!/usr/bin/env python # # xferfcn_input_test.py - test inputs to TransferFunction class # jed-frey, 18 Feb 2017 (based on xferfcn_test.py) import unittest import numpy as np from numpy import int, int8, int16, int32, int64 from numpy import float, float16, float32, float64, longdouble from numpy import all, ndarray, ...
# 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...
"""Data template classes for discovery used to generate additional data for setup.""" from __future__ import annotations from collections.abc import Iterable from dataclasses import dataclass from typing import Any from zwave_js_server.const import CommandClass from zwave_js_server.const.command_class.meter import ( ...
# 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 applicable ...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ vispy backend for wxPython. """ from __future__ import division from time import sleep import gc import warnings from ..base import (BaseApplicationBackend, BaseCanvasB...
import sys # for exception info DEFAULT_CONN_ENDPOINT = 'https://outlook.office365.com/EWS/Exchange.asmx' param_connector = Parameter({'title': 'Connector', 'schema': {'type': 'object', 'properties': { 'ewsEndPoint': {'title': 'EWS end-point', 'type': 'string', 'hint': DEFAULT_CONN_ENDPOINT, 'order': 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...
import math import os import unittest import sys import _ast import tempfile import types from test import support from test.support import script_helper class TestSpecifics(unittest.TestCase): def compile_single(self, source): compile(source, "<single>", "single") def assertInvalidSingle(self, sourc...
# 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 ...
#!/usr/bin/env python # Cloudeebus # # Copyright 2012 Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
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 import warnings class TestSeed(TestCase...
from nose.tools import eq_, ok_ from nose.plugins.skip import SkipTest # Skip test on PY3 from flask_admin._compat import PY2, as_unicode if not PY2: raise SkipTest('MongoEngine is not Python 3 compatible') from wtforms import fields, validators from flask_admin import form from flask_admin.contrib.mongoengine i...
#!/usr/bin/python # Copyright (c) 2009, Purdue University # 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 ...
#!/usr/bin/env python # # Copyright 2007 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...
from unittest import skipUnless from django.contrib.gis import forms from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, skipUnlessDBFeature from django.utils import six from django.utils.html imp...
import copy import datetime from django.core.exceptions import EmptyResultSet, FieldError from django.db.backends import utils as backend_utils from django.db.models import fields from django.db.models.query_utils import Q from django.utils.deconstruct import deconstructible from django.utils.functional import cached_...
# Copyright (c) 2016-present, Facebook, 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...