gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# The MIT License (MIT) # # Copyright (c) 2014 Autodesk, Inc. # # 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, mo...
from dal import autocomplete from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, HTML from django import forms from django.urls import reverse, reverse_lazy from demoslogic.blockobjects.forms import VoteForm, SearchForm from . import models, settings class NewPremiseF...
# 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...
import os import time from copy import copy from datetime import datetime from optparse import make_option from paramiko import SSHException from django_backup.utils import ( GOOD_RSYNC_FLAG, TIME_FORMAT, decide_remove, is_db_backup, is_media_backup, is_backup, BaseBackupCommand, DATABA...
#!/neo/opt/bin/python # # Copyright (C) 2001 by Neotonic Software Corporation # All Rights Reserved. # # hdfhelp.py # # This code makes using odb with Clearsilver as "easy as stealing candy # from a baby". - jeske # # How to use: # # rows = tbl.fetchAllRows() # rows.hdfExport("CGI.rows", hdf_dataset) # # row = tbl....
#!/usr/bin/python3 """Tests for editing pages.""" # # (C) Pywikibot team, 2015-2022 # # Distributed under the terms of the MIT license. # import time import unittest from contextlib import suppress import pywikibot from pywikibot import config, page_put_queue from pywikibot.exceptions import Error from tests.aspects i...
# -*- coding: utf-8 -*- import os import io from collections import OrderedDict import pytest from boussole.exceptions import SettingsDiscoveryError from boussole.conf.discovery import Discover from boussole.conf.json_backend import SettingsBackendJson from boussole.conf.yaml_backend import SettingsBackendYaml clas...
import pytest from dash import Dash, Input, Output, State, html from dash.exceptions import InvalidCallbackReturnValue, IncorrectTypeException def test_cbva001_callback_dep_types(): app = Dash(__name__) app.layout = html.Div( [ html.Div("child", id="in1"), html.Div("state", id...
# 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...
import asyncio import collections import logging from itertools import chain import kafka.common as Errors from kafka.common import TopicPartition from kafka.protocol.fetch import FetchRequest from kafka.protocol.message import PartialMessage from kafka.protocol.offset import OffsetRequest, OffsetResetStrategy from a...
#!/usr/bin/env python # # Bootstrap PySDL2 by fetching SDL2 binaries (Windows) # and the PySDL2 library itself. # # Use `locally` bootstrap code to securely fetch SDL2 # binaries using known hash/size combination, unpack # them locally and optionaly run PySDL2 tests on them. # This stuff is placed into public domain b...
# Copyright 2016 The Meson development team # 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 ...
# Copyright (c) 2016 Intel Corporation # 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 req...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
"""Support for sending data to an Influx database.""" import logging import re import queue import threading import time import math import requests.exceptions import voluptuous as vol from homeassistant.const import ( CONF_DOMAINS, CONF_ENTITIES, CONF_EXCLUDE, CONF_HOST, CONF_INCLUDE, CONF_PASSWORD, CONF_POR...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Python 3.3 or higher import shelve import os import datetime import time import uuid import glob import sys import random import shutil #if sys.version_info.minor == 3: # from contextlib import closing # shelve_open = lambda file, flag="c", protocol=None, writeback=False: closing(shelve.open(file, flag)) #else...
from cStringIO import StringIO import urllib2 import urlparse import lxml import pytest import gaereader from google.appengine.ext import ndb, testbed testbed = testbed.Testbed() testbed.activate() testbed.init_urlfetch_stub() class Result(str): def __init__(self, value): super(Result, self).__init__(value) ...
from sympy import ( symbols, expand, expand_func, nan, oo, Float, conjugate, diff, re, im, Abs, O, factorial, exp_polar, polar_lift, gruntz, limit, Symbol, I, integrate, S, sqrt, sin, cos, sinh, cosh, exp, log, pi, EulerGamma, erf, erfc, erfi, erf2, erfinv, erfcinv, erf2inv, gamma, uppergamma, l...
# # Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. # import sys from antlr4.IntervalSet import IntervalSet from antlr4.Token import Token from antlr4.atn.ATNState import ATNState...
""" Module handling HTTP Requests and Connection Diagnostics """ from __future__ import print_function from __future__ import absolute_import import requests import os import six import json import logging import platform import xml.etree.ElementTree as ET import warnings import errno # import io from tempfile import T...
"""Implementation of :class:`Domain` class. """ from sympy.core import Basic, sympify from sympy.polys.polyerrors import ( UnificationFailed, CoercionFailed, DomainError, ) from sympy.polys.domains.groundtypes import python_factorial class Domain(object): """Represents an abstract domain. """ d...
""" An H2OConnection represents the latest active handle to a cloud. No more than a single H2OConnection object will be active at any one time. """ from __future__ import print_function from __future__ import absolute_import import requests import math import tempfile import os import re import sys import time import s...
# Copyright 2013 OpenStack Foundation # # 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 ...
from os.path import abspath, basename, join, exists from os.path import dirname from os.path import relpath from os import listdir, sep from re import findall from io import open from ..staging import COMMAND_VERSION_FILENAME from ..action_mapper import FileActionMapper from ..action_mapper import path_type from ..act...
import inspect import textwrap from unittest import TestCase, main from lark import Lark from lark.indenter import PythonIndenter from lark.exceptions import UnexpectedCharacters, UnexpectedToken, ParseError valid_DEC_NUMBER = [ "0", "000", "0_0_0", "4_2", "1_0000_0000", "123456789012345678901...
from __future__ import print_function from __future__ import unicode_literals import logging import re import signal import sys from inspect import getdoc from operator import attrgetter from docker.errors import APIError from requests.exceptions import ReadTimeout from .. import __version__ from .. import legacy fr...
from unittest import TestCase from board import Board from util.input_parser import parse from util.enums import Player, Side from piece import Pawn, Queen, Rook, Bishop, Knight, King from board.location import Location class TestBoard(TestCase): def setUp(self): self.board = Board() self.board2 ...
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # 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 limitati...
#!/usr/bin/python # (c) 2016, Marcin Skarbek <github@skarbek.name> # (c) 2016, Andreas Olsson <andreas@arrakis.se> # (c) 2017, Loic Blot <loic.blot@unix-experience.fr> # # This module was ported from https://github.com/mskarbek/ansible-nsupdate # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/l...
import re from collections import defaultdict from .base_section import BaseSection try: from mtools.util.profile_collection import ProfileCollection except ImportError: ProfileCollection = None class ConnectionSection(BaseSection): """ ConnectionSection class. This section goes through the log...
# -*- coding: utf-8 -*- from gluon import * from s3 import * from s3layouts import * try: from .layouts import * except ImportError: pass import s3menus as default # ============================================================================= class S3OptionsMenu(default.S3OptionsMenu): """ Custom...
import itertools import warnings from collections import Counter, OrderedDict import pandas as pd from . import utils from .alignment import align from .merge import merge from .variable import IndexVariable, Variable, as_variable from .variable import concat as concat_vars from .computation import result_name def ...
from __future__ import unicode_literals from django.contrib.auth.models import AnonymousUser, User from djblets.testing.decorators import add_fixtures from reviewboard.reviews.models import Group from reviewboard.scmtools.models import Repository, Tool from reviewboard.testing import TestCase class PolicyTests(Test...
""" Test SBTarget APIs. """ from __future__ import print_function import unittest2 import os import time import re import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TargetAPITestCase(TestBase): mydir = TestBase.compute_mydir(__f...
# -*- coding: utf-8 -*- """ Created on Fri Oct 16 23:43:30 2015 @author: ajaver """ #import os import sys import os import time import subprocess as sp from functools import partial from io import StringIO from tierpsy.helper.misc import TimeCounter, ReadEnqueue GUI_CLEAR_SIGNAL = '+++++++++++++++++++++++++++++++++...
import ujson import datetime as dt import random as rnd from Globals import * class NewJSONPackGenerator: def __init__(self): self.pathToHelloPackTemplate = "" self.pathToDataPackTemplate = "" def dateGenerate(self): from faker import Faker fake = Faker() startDate =...
""" Lights on Zigbee Home Automation networks. For more details on this platform, please refer to the documentation at https://home-assistant.io/components/light.zha/ """ from datetime import timedelta import logging from homeassistant.components import light from homeassistant.const import STATE_ON from homeassistan...
# coding: utf-8 """ Salt Edge Account Information API API Reference for services # noqa: E501 OpenAPI spec version: 5.0.0 Contact: support@saltedge.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class IncomeReportStrea...
from collections import namedtuple import re from ._compat import string_types from .exceptions import UnexpectedTokenError, TakeSyntaxError from .scanner import TokenType from .utils import split_name, get_via_name_list, save_to_name_list _WS = re.compile(r'\s+') class _SaveNode(namedtuple('_SaveNode', 'ident_par...
# -*- coding: utf-8 -*- """ Sahana Eden Content Management System Model @copyright: 2012 (c) Sahana Software Foundation @license: MIT 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 S...
from mpf.tests.MpfFakeGameTestCase import MpfFakeGameTestCase class TestVariablePlayer(MpfFakeGameTestCase): def get_config_file(self): return 'config.yaml' def get_machine_path(self): return 'tests/machine_files/variable_player/' def test_variable_player(self): # start game wit...
""" RED Log Encodings ================= Defines the *RED* log encodings: - :func:`colour.models.log_encoding_REDLog` - :func:`colour.models.log_decoding_REDLog` - :func:`colour.models.log_encoding_REDLogFilm` - :func:`colour.models.log_decoding_REDLogFilm` - :func:`colour.models.log_encoding_Log3G10_v1` - ...
import numpy as np from proteus import Domain, Context, Comm from proteus.mprans import SpatialTools as st import proteus.TwoPhaseFlow.TwoPhaseFlowProblem as TpFlow import proteus.TwoPhaseFlow.utils.Parameters as Parameters from proteus import WaveTools as wt from proteus.Profiling import logEvent from proteus.mbd impo...
# -*- coding: utf-8 -*- from collections import Iterable from math import sqrt import numpy as np from pyfr.nputil import chop from pyfr.util import lazyprop, subclass_where def jacobi(n, a, b, z): j = [1] if n >= 1: j.append(((a + b + 2)*z + a - b) / 2) if n >= 2: apb, bbmaa = a + b, ...
import unittest import ctypes import struct import sys from calpack import models from calpack.utils import PYPY, FieldAlreadyExistsError, FieldNameDoesntExistError class Test_BasicPacket(unittest.TestCase): def test_pkt_create_packet_object_with_defined_values(self): """ This test verifies that...
"""DistributedObjectAI module: contains the DistributedObjectAI class""" from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectBase import DistributedObjectBase from direct.showbase import PythonUtil from pandac.PandaModules import * #from PyDatagram import PyDatagram...
# Copyright 2014 Rustici Software # # 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 2021 Sean Robertson # 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, ...
"""Copyright 2008 Orbitz WorldWide 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...
''' Stack Layout ============ .. only:: html .. image:: images/stacklayout.gif :align: right .. only:: latex .. image:: images/stacklayout.png :align: right .. versionadded:: 1.0.5 The :class:`StackLayout` arranges children vertically or horizontally, as many as the layout can fit. The siz...
# Copyright 2014 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import logging import re import simplejson as json import traceback import sys from functools import partial from lxml.builder import ElementMaker import lxml.html from lxml.etree import Entity from lxml.html import html_parser, HtmlElement import jinja2 from paucore.utils.data import is_seq_not_string logger = lo...
# Copyright 2013-2015 ARM Limited # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import logging import select import time import urllib.request import aiohttp import psycopg2 import psycopg2.extensions import fumbbl_trans.exc import fumbbl_trans.html_match from fumbbl_trans.session import get_relax_iterator import fumbbl_trans.xml_mat...
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.utils impo...
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
import operator import re from functools import partial from django.apps import apps from django.db import connections from wagtail.search.index import RelatedFields, SearchField from .query import MATCH_NONE, Phrase, PlainText NOT_SET = object() def balanced_reduce(operator, seq, initializer=NOT_SET): """ ...
# # Copyright 2013 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...
""" Provides an APIView class that is the base of all views in REST framework. """ from __future__ import unicode_literals from django.core.exceptions import PermissionDenied from django.http import Http404 from django.utils import six from django.utils.encoding import smart_text from django.utils.translation import ug...
#!/usr/bin/env python from multiprocessing import Pool import numpy as np from gtapps_mp.utils import pyfits import tempfile import os import subprocess import sys from gt_apps import filter,expCube def ltcube(times): '''This is the atomic function that actually runs in the seperate threads. It takes a lis...
import traceback, sys from unittest import TestResult import datetime from tcmessages import TeamcityServiceMessages PYTHON_VERSION_MAJOR = sys.version_info[0] def strclass(cls): if not cls.__name__: return cls.__module__ return "%s.%s" % (cls.__module__, cls.__name__) def smart_str(s): encoding = 'utf-...
#!/usr/bin/python2.7 # Copyright 2017 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 or ...
# yellowbrick.text.dispersion # Implementations of lexical dispersions for text visualization. # # Author: Larry Gray # Created: 2018-06-21 10:06 # # Copyright (C) 2018 District Data Labs # For license information, see LICENSE.txt # # ID: dispersion.py [] lwgray@gmail.com $ """ Implementation of lexical dispersion ...
"""Tests related to embargoes of registrations""" import datetime import httplib as http import json from modularodm import Q from modularodm.exceptions import ValidationValueError import mock from nose.tools import * # noqa from tests.base import fake, OsfTestCase from tests.factories import ( AuthUserFactory,...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you m...
#!/usr/bin/env python # coding=utf-8 """ Name : time_event.py Author : David M. Freestone Date : 03.22.2016 This time_event module is covered under the modified BSD license Copyright (c) 2016, David M. Freestone All rights reserved. """ import pandas as pd import numpy as np from glob import glob from os.pa...
# Copyright 2013 - Mirantis, Inc. # Copyright 2016 - StackStorm, 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 # # Unl...
# -*- coding: utf-8 -*- # File: transform.py import numpy as np import cv2 from ...utils.argtools import log_once from .base import ImageAugmentor, _default_repr TransformAugmentorBase = ImageAugmentor """ Legacy alias. Please don't use. """ # This legacy augmentor requires us to import base from here, causing circ...
#!/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 __future__ import absolute_import, print_function import unittest import tempfile from bokeh.document import Document from bokeh.model import Model from bokeh.core.property_mixins import FillProps, LineProps, TextProps from bokeh.core.properties import Int, String from bokeh.themes import Theme class ThemedMod...
''' Created on Feb 1, 2019 @author: Mark V Systems Limited (c) Copyright 2019 Mark V Systems Limited, All rights reserved. This plugin allows GUI and command line users to test transforms. Custom extensions are also made available when their plugin has been loaded (e.g., for SEC custom transforms use plugin transfor...
#!/usr/bin/env python """ Copyright (c) 2014 Alex Forencich 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 (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
''' Info: This script loads root files containing standard b-tagging information + the IPMP outputs. It turns the data into jet-flat structure, replicates the variable creation and modification that are present in MV2, scales the variables and splits them into training and testing sets. F...
import logging import time from datetime import datetime from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponse, HttpResponseRedirect, Http...
# basic_source.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0103,C0111,E0611,R0201,R0204,W0212,W0232,W0612 # PyPI imports from numpy import array import pytest # Putil imports from putil.plot import BasicSource as FUT from putil.test import AE, AI, APROP, AROPROP ##...
""" Load an analysis file and redo the predictions on the validation set / test set, this time with augmented data and averaging. Store them as numpy files. """ import numpy as np # import pandas as pd import theano import theano.tensor as T import layers import cc_layers import custom import load_data import realtime...
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
# 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...
# 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...
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files ...
import threading import collections import time import logging from listener import SiteStream, FOLLOW_LIMIT from thread import ListenThread from util import grouper from parser import DefaultParser logger = logging.getLogger("sitebucket") NONFULL_STREAM_LIMIT = 10 RESTART_DEAD_STREAMS = True MONITOR_SLEEP_INTERVAL ...
from os import path import re from lib.pybars import Compiler from lib.utils.DevTreeUtils import DevTree from lib.utils.Logger import Log from lib.utils.ProcessUtils import ExecutableRunner UINT32 = "uint32" HEADER_TEMPLATE = "{{#each commands}}{{>command}}{{>br}}{{/each}}" COMMAND_STRUCT_TEMPLATE = """ struct {{na...
#!/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. """Generates .h and .rc files for strings extracted from a .grd file. This script generates an rc file and header (NAME.{rc,h}) to...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2010 Chris Liechti <cliechti@gmx.net> # All Rights Reserved. # Simplified BSD License (see LICENSE.txt for full text) """\ This is a parser for configuration files that describe the memory map of a micro controller. The syntax is quite simple: it is pars...
"""Tests for aiohttp/worker.py""" import asyncio import pathlib import ssl from unittest import mock import pytest from aiohttp import helpers from aiohttp.test_utils import make_mocked_coro base_worker = pytest.importorskip('aiohttp.worker') try: import uvloop except ImportError: uvloop = None WRONG_LOG...
""" Interest rate transformations =============================================================================== Overview ------------------------------------------------------------------------------- Transformations between nominal, effective and periodic interest rates can be realized using **cashflows**. This mo...
"""Policies Note that Dispatchers are now implemented in "dispatcher.py", but are still documented here. Policies A policy is an object which manages the interaction between a public Python object, and COM . In simple terms, the policy object is the object which is actually called by COM, and it invokes the r...
import logging import re import secrets from email.headerregistry import AddressHeader from email.message import EmailMessage from typing import Dict, List, Optional, Tuple from django.conf import settings from django.utils.timezone import now as timezone_now from django.utils.timezone import timedelta from zerver.li...
""" $lic$ Copyright (C) 2016-2020 by Tsinghua University and The Board of Trustees of Stanford University This program is free software: you can redistribute it and/or modify it under the terms of the Modified BSD-3 License as published by the Open Source Initiative. This program is distributed in the hope that it wi...
#! /usr/bin/env python """Helper functions for processing Dakota parameter and results files.""" import os import subprocess import re import yaml import numpy as np import collections def is_dakota_installed(): """Check whether Dakota is installed and in the execution path. Returns ------- bool ...
from __future__ import absolute_import, print_function import ast, io, re, os.path, sys, inspect, types, warnings, pickle from datetime import datetime from itertools import count as _count from inspect import isfunction from time import strptime from collections import defaultdict from functools import update_wrappe...
__author__ = 'yyekovenko' from base_rest_helper import * class InstanceHelper(BaseRESTHelper): def __init__(self, utils, auth): """ Arguments: - utils: instance of Utils class - auth: instance of AuthenticationHelper class """ super(InstanceHelper, self).__ini...
# Copyright (c) 2021, DjaoDjin 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
# -*- coding: utf-8 -*- # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# -*- coding: utf-8 -*- """ Flask Extension Tests ~~~~~~~~~~~~~~~~~~~~~ Tests the Flask extensions. :copyright: (c) 2016 by Ali Afshar. :license: BSD, see LICENSE for more details. """ import os import sys import shutil import urllib2 import tempfile import subprocess import argparse from flask ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Selection classes. Represents an enumeration using a widget. """ from collections import Mapping, Iterable try: from itertools import izip except ImportError: #python3.x izip = zip from itertools import c...
# -*- coding: utf-8 -*- import subprocess import struct import os import json import uuid import StringIO import django from django.test import TestCase from django.test.utils import override_settings from django.conf import settings from django.core.urlresolvers import reverse from django.contrib.auth.models import U...