gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python3 # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2017 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lic...
import copy from functools import partial import os.path import sys try: from collections.abc import Mapping except ImportError: from collections import Mapping import six from fudge import Fake, patched_context from nose.tools import ok_, eq_ from fabric.decorators import hosts, roles, task from fabric.conte...
# 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 (t...
import pytest import os if not os.environ.get('USE_ASYNCIO', False): raise pytest.skip("Only for asyncio") from unittest import TestCase, main try: from unittest.mock import Mock, call except ImportError: from mock import Mock, call from autobahn.asyncio.rawsocket import PrefixProtocol, RawSocketClientPro...
#!/usr/bin/python # -*- coding: utf-8 -*- # ====================================================================== # Copyright 2017 Julien LE CLEACH # # 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 Lice...
from __future__ import absolute_import, unicode_literals import copy import json from django.db import DEFAULT_DB_ALIAS, models from django.db.models.sql import Query from django.db.models.sql.constants import SINGLE from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import url...
# -*- coding: utf-8 -*- import collections import datetime import os.path import string import matplotlib.dates import matplotlib.pyplot as plt import numpy import operator import pandas from midas.compat import imap from midas.compat import str_type from midas.see5 import calculate_recall_precision from midas.see5 ...
## # \namespace cross3d.softimage.softimagesceneobject # # \remarks The SoftimageSceneObject class provides the implementation of the AbstractSceneObject class as it applies # to Softimage # # \author douglas # \author Blur Studio # \date 04/04/11 # #--------------------------------------------------------------...
# -*- coding: utf-8 -*- # Copyright (c) 2014 Plivo Team. See LICENSE.txt for details. import os import gevent import configparser import ujson as json from flask import Flask, request, jsonify from redis.exceptions import LockError import traceback from sharq import SharQ class SharQServer(object): """Defines a ...
#!/usr/local/sci/bin/python2.7 #***************************** # # apply 5x5 climatology to 5x5 monthly fields # # #************************************************************************ ''' Author: Robert Dunn Created: March 2016 Last update: 11 Feb 2021 Location: /home/h04/hadkw/HadISDH_Code/MARINE_BUILD/EUSTACE_SST...
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake Smart Dictionary Implementation Functions for interacting with the data structure used by the BitBake build tools. """ # Copyright (C) 2003, 2004 Chris Larson # Copyright (C) 2004, 2005 Seb Frankengul # Copyright (...
""" Testing DKI """ from __future__ import division, print_function, absolute_import import numpy as np import random import dipy.reconst.dki as dki from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_almost_equal) from nose.tools import assert_raises from dipy....
"""Utilities for input validation""" # Authors: Olivier Grisel # Gael Varoquaux # Andreas Mueller # Lars Buitinck # Alexandre Gramfort # Nicolas Tresegnie # License: BSD 3 clause import warnings import numbers import numpy as np from scipy import sparse from ..externals i...
import asyncio import os import socket import stat import sys import warnings from argparse import ArgumentParser from collections import Iterable, MutableMapping from importlib import import_module from yarl import URL from . import (hdrs, web_exceptions, web_fileresponse, web_middlewares, web_protoco...
# -*- coding: utf-8 -*- """ Tests that the file header is properly handled or inferred during parsing for all of the parsers defined in parsers.py """ import numpy as np import pandas.util.testing as tm from pandas import DataFrame, Index, MultiIndex from pandas.compat import StringIO, lrange, u class HeaderTests(...
# -*- coding: utf-8 -*- """ Pdb debugger class. Modified from the standard pdb.Pdb class to avoid including readline, so that the command line completion of other programs which include this isn't damaged. In the future, this class will be expanded with improvements over the standard pdb. The code in this file is ma...
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import requests import warnings from coinbase.compat import imap from coinbase.compat import quote from coinbase.compat import urljoin from coi...
# -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: fred """ import os import glob import numpy as np import pysac.yt as sacyt import pysac.mhs_atmosphere as atm l_mpi=False scales, physical_constants = \ atm.units_const.get_parameters() #define the models required papers = ['paper1','paper2a...
"""Tests for Konnected Alarm Panel config flow.""" from unittest.mock import patch import pytest from homeassistant.components import konnected from homeassistant.components.konnected import config_flow from tests.common import MockConfigEntry @pytest.fixture(name="mock_panel") async def mock_panel_fixture(): ...
# # 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 # ...
from sympy import ( adjoint, And, Basic, conjugate, diff, expand, Eq, Function, I, im, Integral, integrate, Interval, lambdify, log, Max, Min, oo, Or, pi, Piecewise, piecewise_fold, Rational, re, solve, symbols, transpose, cos, exp, Abs, Not ) from sympy.utilities.pytest import XFAIL, raises x, y = sym...
from __future__ import absolute_import, division import os import traceback import sys import math import urwid from netlib import odict from netlib.http import CONTENT_MISSING, Headers from . import common, grideditor, signals, searchable, tabs from . import flowdetailview from .. import utils, controller, contentvi...
#!/usr/bin/python #====================================================================== # # Project : hpp_IOStressTest # File : Libs/IOST_Testcase/IOST_WSetupTestcase.py # Date : Sep 27, 2016 # Author : HuuHoang Nguyen # Contact : hhnguyen@apm.com # : hoangnh.hpp@gmail.com # License : MIT Licens...
# Copyright DataStax, 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 writing, softwa...
import unittest from mongoengine import * from mongoengine.connection import get_db __all__ = ("DynamicTest", ) class DynamicTest(unittest.TestCase): def setUp(self): connect(db='mongoenginetest') self.db = get_db() class Person(DynamicDocument): name = StringField() ...
# Author: Alexander Fabisch -- <afabisch@informatik.uni-bremen.de> # Author: Christopher Moody <chrisemoody@gmail.com> # Author: Nick Travers <nickt@squareup.com> # License: BSD 3 clause (C) 2014 # This is the exact and Barnes-Hut t-SNE implementation. There are other # modifications of the algorithm: # * Fast Optimi...
# 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 requests from io import BytesIO from time import sleep, time from zipfile import ZipFile, BadZipfile from logging import getLogger from requests.exceptions import RequestException try: from types import NoneType except ImportError: NoneType = type(None) from .exceptions import BadCredential...
# -*- coding: utf-8 -*- # -- Dual Licence ---------------------------------------------------------- ############################################################################ # GPL License # # ...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
import json from django.conf import settings from django.test import TestCase from hamcrest import ( assert_that, equal_to, has_entry, has_item, has_key ) from httmock import HTTMock from .factories import NodeFactory, NodeTypeFactory from stagecraft.libs.authorization.tests.test_http import govuk_signon_moc...
# -*- coding: latin-1 -*- # ----------------------------------------------------------------------------- # Copyright 2009-2011 Stephen Tiedemann <stephen.tiedemann@googlemail.com> # # Licensed under the EUPL, Version 1.1 or - as soon they # will be approved by the European Commission - subsequent # versions of the EU...
from contextlib import contextmanager from typing import TYPE_CHECKING, Any, Callable, Dict, List, Tuple from annotypes import Array, FrozenOrderedDict from .concurrency import RLock from .loggable import Loggable from .request import Subscribe, Unsubscribe from .response import Response if TYPE_CHECKING: from ....
from __future__ import unicode_literals from operator import attrgetter from django.test import TestCase from .models import Person class RecursiveM2MTests(TestCase): def test_recursive_m2m(self): a, b, c, d = [ Person.objects.create(name=name) for name in ["Anne", "Bill", "Chuc...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
""" This platform enables the possibility to control a MQTT alarm. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/alarm_control_panel.mqtt/ """ import logging import re import voluptuous as vol from homeassistant.components import mqtt import homeassis...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Alex Grigorevskiy # Licensed under the BSD 3-clause license (see LICENSE.txt) """ The standard periodic kernel which mentioned in: [1] Gaussian Processes for Machine Learning, C. E. Rasmussen, C. K. I. Williams. The MIT Press, 2005. [2] Introduction to Gaussian processes...
# -*- coding: utf-8 -*- import os import logging from itertools import chain import numpy as np import pandas as pd from anacode import codes from anacode.api import writers from anacode.api.writers import CSV_FILES from anacode.agg import plotting from nltk.text import TextCollection, Text def _capitalize(string)...
# 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...
#!/usr/bin/env python # This example demonstrates the use of the vtkTransformPolyDataFilter # to reposition a 3D text string. import vtk from vtk.util.colors import * # Define a Single Cube Scalars = vtk.vtkFloatArray() Scalars.InsertNextValue(1.0) Scalars.InsertNextValue(0.0) Scalars.InsertNextValue(0.0) Scalars.In...
"""Matrix factorization with Sparse PCA""" # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause import numpy as np from ..utils import check_random_state, array2d from ..linear_model import ridge_regression from ..base import BaseEstimator, TransformerMixin from .dict_learning import dic...
import math import unittest from monty.serialization import MontyDecoder from pymatgen.core.operations import SymmOp from pymatgen.core.tensors import * from pymatgen.symmetry.analyzer import SpacegroupAnalyzer from pymatgen.util.testing import PymatgenTest class TensorTest(PymatgenTest): _multiprocess_shared_ ...
"""15th Night Flask App.""" from email_client import send_email, verify_email from flask import ( Flask, render_template, redirect, url_for, request, session, flash ) from flask.ext.login import ( login_user, current_user, login_required, LoginManager ) from twilio_client import send_sms from werkzeug.exceptio...
# Copyright 2018 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...
import json from rest_framework import status from api.models import Launch from api.tests.test__base import SLNAPITests class LaunchTests(SLNAPITests): def test_v300_upcoming_normal(self): """ Ensure launch endpoints work as expected. """ # Test Normal endpoint path = '...
# Python LDAP import ldap # Django from django.utils.translation import ugettext_lazy as _ # Django Auth LDAP import django_auth_ldap.config from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion # Tower from awx.conf import fields from awx.conf.fields import * # noqa from awx.conf.license import feature_e...
""" Unit tests for DynamoDB Config Store """ import time import unittest from random import random from boto.dynamodb2.layer1 import DynamoDBConnection from boto.dynamodb2.exceptions import ItemNotFound, ValidationException from boto.dynamodb2.table import Table from dynamodb_config_store import DynamoDBConfigStore f...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
from sys import getsizeof import operator import numpy as np import pandas.index as _index from pandas.types.common import (is_integer, is_scalar, is_int64_dtype) from pandas import compat from pandas.compat import lrange, range from pandas.compat.num...
""" **hep_ml.commonutils** contains some helpful functions and classes which are often used (by other modules) """ from __future__ import print_function, division, absolute_import from multiprocessing.pool import ThreadPool import numbers import itertools import numpy import pandas from scipy.special import expit tr...
#!/usr/bin/env python """HTTP API logic that ties API call renderers with HTTP routes.""" import json from django import http from werkzeug import exceptions as werkzeug_exceptions from werkzeug import routing import logging from grr.gui import api_call_renderers from grr.lib import access_control from grr.lib i...
# -*- coding: utf-8 -*- """ :mod:`Solver` -- ODE Solvers ============================ .. module :: solver .. moduleauthor :: Olivier Verdier <olivier.verdier@gmail.com> The class :class:`~odelab.solver.Solver` takes care of calling the numerical scheme to produce data, and of storing that data. The higher level cla...
#Continuous_alternate_GUI_creation #Description: This module is the core of the sincronization process. #The main function is con_alt_measure which is called in the module ConAltHandlers.py from lib.util.SweepType import SweepType from lib.util.SourceType import SourceType from lib.util.SourceMode import SourceMode fr...
#!/usr/bin/python # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import print_...
# Copyright 2008 German Aerospace Center (DLR) # # 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...
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides methods and Pythonic idioms that make it easy to navigate, search,...
# Copyright (c) 2012 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
from datetime import date from django.forms import DateField, Form, SelectDateWidget from django.test import override_settings from django.utils import translation from django.utils.dates import MONTHS_AP from .base import WidgetTest class SelectDateWidgetTest(WidgetTest): maxDiff = None widget = SelectDate...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
import gspread # import pdb import datetime import os from oauth2client.service_account import ServiceAccountCredentials URL = os.environ['AE_gsheet_url'] SHEET_NAME = 'Sheet2' scope = ['https://spreadsheets.google.com/feeds'] credentials = ServiceAccountCredentials.from_json_keyfile_name('CAMSCAS-6ac566f0e517.json', s...
#!/usr/bin/python #====================================================================== # # Project : hpp_IOStressTest # File : Libs/IOST_WMain/IOST_WMainI2C.py # Date : Oct 20, 2016 # Author : HuuHoang Nguyen # Contact : hhnguyen@apm.com # : hoangnh.hpp@gmail.com # License : MIT License # Copyr...
#!/usr/bin/env python # -*- coding: utf-8 -*- """This is the main executable of Maraschino. It parses the command line arguments, does init and calls the start function of Maraschino.""" import sys import os # Check if frozen by py2exe def check_frozen(): return hasattr(sys, 'frozen') def get_rundir(): if ...
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of Paramiko. # # Paramiko 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 of the License, or (a...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Event.icaluid' db.add_column(u'events_event', 'icaluid', ...
#!/usr/bin/env python """Unit tests run as PYTHONPATH=.. python3 ./test_valve.py.""" # Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2018 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in comp...
# Copyright 2017 Red Hat, 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 ...
"""The sensor tests for the august platform.""" from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, PERCENTAGE, STATE_UNKNOWN from homeassistant.helpers import entity_registry as er from tests.components.august.mocks import ( _create_august_with_devices, _mock_activities_from_fixture, _mock_doorbell_...
#!/usr/bin/env python """ Prints a map of the entire world. """ import locale, os, sys import re, math from struct import pack, unpack # local module try: import nbt except ImportError: # nbt not in search path. Let's see if it can be found in the parent folder extrasearchpath = os.path.realpath(os.path.jo...
# Copyright (C) 2013 Deutsche Telekom AG # 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 r...
# Copyright 2014 - Rackspace Hosting. # # 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...
import os, json, atexit, copy import matplotlib.pyplot as plt import numpy as np import scipy.io.wavfile as wavfile from numpy import exp, pi from mpl_toolkits.mplot3d import Axes3D from math import radians, degrees, log from musp import Location class ASTF: def __init__(self, astf_data_generator, location, post_...
from django.contrib.auth.models import User from django.db import transaction from jsonrpc import jsonrpc_method from alexia.api.decorators import manager_required from alexia.api.exceptions import InvalidParamsError from alexia.apps.billing.models import RfidCard from alexia.auth.backends import RADIUS_BACKEND_NAME, ...
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # import ConfigParser import copy import gevent import hashlib import platform import random import signal import socket import time from ConfigParser import NoOptionError from buildinfo import build_info from pysandesh.connection_info import Connecti...
import csv import logging import pathlib from optparse import Values from typing import Iterator, List, NamedTuple, Optional, Tuple from pip._vendor.packaging.utils import canonicalize_name from pip._internal.cli.base_command import Command from pip._internal.cli.status_codes import ERROR, SUCCESS from pip._internal....
# Copyright 2010-2011 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
# Copyright (C) 2007 - 2009 The MITRE Corporation. See the toplevel # file LICENSE for license terms. # In this file, I'm going to put most of the guts of the Web services, # so that I can maintain a CGI script as I migrate to CherryPy. # Utilities, to mimic getfirst and getlist for CGI forms. import os, sys def _g...
''' Copyright 2020 The Rook 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 law or agreed to...
import hashlib import mimetypes import os import posixpath import re from time import time from urlparse import urlsplit, urlunsplit from werkzeug.exceptions import NotFound from werkzeug.http import is_resource_modified, http_date from spa.static.handlers import StaticHandler from spa.utils import clean_path class...
#! /usr/bin/env python # # Author: Damian Eads # Date: April 17, 2008 # # Copyright (C) 2008 Damian Eads # # 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 copy...
import random from collections import namedtuple import pytest from markupsafe import Markup from jinja2 import Environment from jinja2 import StrictUndefined from jinja2 import TemplateRuntimeError from jinja2 import UndefinedError from jinja2.exceptions import TemplateAssertionError class Magic: def __init__(...
from datetime import timedelta from decimal import Decimal import uuid from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.core.validators import MinValueValidator from django.db import models from django.db.models import Q from d...
import json import os import urllib2 from sendgrid.helpers.mail import * from sendgrid import * # NOTE: you will need move this file to the root # directory of this project to execute properly. def build_hello_email(): """Minimum required to send an email""" from_email = Email("test@example.com") subject...
"""Algorithms for partial fraction decomposition of rational functions. """ from __future__ import print_function, division from sympy.polys import Poly, RootSum, cancel, factor from sympy.polys.polytools import parallel_poly_from_expr from sympy.polys.polyoptions import allowed_flags, set_defaults from sympy.polys.p...
from __future__ import absolute_import import logging from uuid import uuid4 from django.apps import apps from django.db import transaction from django.utils import timezone from sentry.constants import ObjectStatus from sentry.exceptions import DeleteAborted from sentry.signals import pending_delete from sentry.ta...
""" Created: 11 November 2016 Last Updated: 16 February 2018 Dan Marley daniel.edison.marley@cernSPAMNOT.ch Texas A&M University ----- Base class for plotting deep learning Designed for running on desktop at TAMU with specific set of software installed --> not guaranteed to work in CMSSW environment! Doe...
# -*- 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...
# Copyright 2017 Mycroft AI 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 writin...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012-2013 Red Hat, 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....
"""Support for Google Actions Smart Home Control.""" import asyncio from datetime import timedelta import logging from uuid import uuid4 from aiohttp import ClientError, ClientResponseError from aiohttp.web import Request, Response import jwt # Typing imports from homeassistant.components.http import HomeAssistantVie...
# Copyright 2014 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 or agreed to in...
import copy from collections import defaultdict from contextlib import contextmanager from functools import partial from django.apps import AppConfig from django.apps.registry import Apps, apps as global_apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db import mo...
import numpy as np from scipy.ndimage import map_coordinates from scipy.fftpack import fftn, fftshift, ifftshift from dipy.reconst.odf import OdfModel, OdfFit, gfa from dipy.reconst.cache import Cache from dipy.reconst.multi_voxel import multi_voxel_fit from dipy.reconst.recspeed import local_maxima, remove_similar_ver...
""" This implements resources for twisted webservers using the wsgi interface of django. This alleviates the need of running e.g. an apache server to serve Evennia's web presence (although you could do that too if desired). The actual servers are started inside server.py as part of the Evennia application. (Lots of t...
#!/usr/bin/env python3 # Copyright 2016 The Kubernetes 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 appl...
#!/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")...
#!/bin/env python """ Copyright 2010-2019 University Of Southern California 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 applicabl...
from __future__ import absolute_import import logging import operator import os import tempfile import shutil import warnings from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.locations import build_prefix, virtualenv_no_global, distutils_scheme from pip.basecommand import Command fr...
import logging import os import typing from dvc.exceptions import OutputNotFoundError from dvc.utils import relpath from ..progress import DEFAULT_CALLBACK from ._metadata import Metadata from .base import FileSystem if typing.TYPE_CHECKING: from dvc.output import Output from dvc.types import AnyPath logger...
# -*- test-case-name: twisted.python.test.test_components -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Component architecture for Twisted, based on Zope3 components. Using the Zope3 API directly is strongly recommended. Everything you need is in the top-level of the zope.interface ...
# 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 ...