gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# # 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...
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems 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.o...
""" Copyright 2015 Hewlett-Packard 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, softwar...
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from ...util.linalg import pdinv, dpotrs, dpotri, symmetrify, jitchol, dtrtrs, tdot from GPy.core.parameterization.variational import VariationalPosterior class Posterior(object): ""...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse from collections import OrderedDict, namedtuple import inspect import functools import os import re import sys import types import warnings from tfi.base import _GetAttrAccumulator from tfi.par...
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 import os import sys import unittest import datahog from datahog import error import psycopg2 sys.path.append(os.path.dirname(os.path.abspath(__file__))) import base from pgmock import * class RelationshipTests(base.TestCase): def setUp(self): super(Relation...
import UserDict from pygr import annotation, seqdb, sequence, sqlgraph, worldbase from pygr.classutil import read_only_error class UCSCStrandDescr(object): def __get__(self, obj, objtype): if obj.strand == '+': return 1 else: return -1 class UCSCSeqIntervalRow(sqlgraph....
""" The :mod:`sklearn.utils` module includes various utilities. """ from collections import Sequence import numpy as np from scipy.sparse import issparse import warnings from .murmurhash import murmurhash3_32 from .validation import (as_float_array, assert_all_finite, ...
# -*- 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...
# python3 # Copyright 2020 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 or agreed to in...
# Copyright (c) 2010 Anil Kumar # All rights reserved. # # License: BSD import os, re import copy from PyQt4.QtCore import QObject, pyqtSignal, QProcess def NOT_IMPLEMENTED(n, f): msg = '%s: %s: Not implemeted' % (n, f) from PyQt4.QtGui import QMessageBox QMessageBox.warning(None, "Seascope", msg, QMessageBox.Ok...
# Copyright 2014 Mirantis, 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...
"""Support for Ambient Weather Station Service.""" import asyncio import logging from aioambient import Client from aioambient.errors import WebsocketError import voluptuous as vol from homeassistant.components.binary_sensor import DEVICE_CLASS_CONNECTIVITY from homeassistant.config_entries import SOURCE_IMPORT from ...
# 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...
""" Instead of the change detector looking at each revision for an item what i want here, is to compare the current state of an item's key/value pairs that I define, with another set of data (a reference dataset, from an owl/obographs json file) Steps: - Does a sparql query against wikidata to get all mesh IDs on all ...
from __future__ import unicode_literals from django.template import Context, Template, TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango20Warning from .templatetags import custom, inclusion class CustomFilterTests(SimpleTestCase): d...
# Copyright 2014: Mirantis 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 b...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta import operator from decimal import Decimal import numpy as np import pytest from pandas import Series, Timestamp, Timedelta, Period, NaT from pandas._libs.tslibs.period import IncompatibleFrequency import pandas as pd import pandas.util.testing as tm ...
""" The :mod:`sklearn.model_selection._validation` module includes classes and functions to validate the model. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org>, # Olivier Grisel <olivier.grisel@ensta.org> # License: BSD 3 clause from _...
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANS...
import re import string from termcolor import colored import parser def tab_to_space (c, spaces=4): if c == "\t": return "".join (list (map (lambda x: " ", range (spaces)))) return c def escape (string): def _inner (s): if s == "\n": return "\\n" elif s == "\t": ...
# coding: utf-8 """ pytorch Python SDK for PyTorch-Operator # noqa: E501 OpenAPI spec version: v0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import io import json import logging import re import ssl import certifi # python 2...
from __future__ import unicode_literals from collections import defaultdict from django.core import checks from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db import models, router, transaction, DEFAULT_DB_ALIAS from django.db.models import signals, FieldDoesNotExist,...
from alembic.testing.env import clear_staging_env, staging_env from alembic.testing import assert_raises_message, eq_ from alembic import util from alembic.testing.fixtures import TestBase from alembic.testing import mock from alembic.migration import MigrationStep, HeadMaintainer class MigrationTest(TestBase): ...
# stdlib from typing import Any from typing import Dict # third party from fastapi import APIRouter from fastapi import Body from fastapi import Depends from fastapi.responses import JSONResponse from nacl.encoding import HexEncoder from nacl.signing import SigningKey # syft absolute from syft.core.node.common.action...
"""Support for Coinbase sensors.""" import logging from homeassistant.components.sensor import SensorEntity from homeassistant.const import ATTR_ATTRIBUTION from .const import ( API_ACCOUNT_AMOUNT, API_ACCOUNT_BALANCE, API_ACCOUNT_CURRENCY, API_ACCOUNT_ID, API_ACCOUNT_NAME, API_ACCOUNT_NATIVE_...
#========================================================================== # # Copyright Insight Software Consortium # # 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...
# !/usr/bin/env python """This module supplies a function that can generate custom sequences of optimization passes for arbitrary programs. This module provides an implementation of a genetic algorithm presented by Cooper in his paper "Optimizing for Reduced Code Space using Genetic Algorithms" (published 1999). The a...
# -*- coding: utf-8 -*- # Natural Language Toolkit: Transformation-based learning # # Copyright (C) 2001-2017 NLTK Project # Author: Marcus Uneson <marcus.uneson@gmail.com> # based on previous (nltk2) version by # Christopher Maloof, Edward Loper, Steven Bird # URL: <http://nltk.org/> # For license information, see...
# 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...
from datetime import timedelta from django.conf import settings from django.contrib.comments.models import Comment from django.db import models from django.db.models.signals import m2m_changed, post_save, pre_delete from django.dispatch import receiver from moderator.constants import CLASS_CHOICES from likes.signals i...
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc. # Copyright 2019 Open GEE Contributors # # 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-...
from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from direct.showbase.DirectObject import DirectObject from pandac.PandaModules import * import random import string from toontown.fishing import FishSellGUI from toontown.hood import ZoneUtil from toontown.pets import Pet, PetConstan...
# -*- coding: utf-8 -*- """ pygments.lexers.text ~~~~~~~~~~~~~~~~~~~~ Lexers for non-source code file types. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from bisect import bisect from pygments.lexer import Lexer, LexerC...
import os import shutil import subprocess import tempfile import traceback import zipfile import json import resource from celery import task from django.conf import settings from django.utils.timezone import now import apptools.addr2lines from ide.utils.sdk import generate_wscript_file, generate_jshint_file, genera...
"""Support for Netgear LTE modems.""" import asyncio from datetime import timedelta import logging import aiohttp import attr import eternalegypt import voluptuous as vol from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.components.notify import DOMAIN as NOTIFY_DOMA...
# coding: utf-8 import logging import requests from .config import Config from .utils import is_valid_email, is_valid_cpf, is_valid_cnpj from .parsers import (PagSeguroNotificationResponse, PagSeguroPreApprovalNotificationResponse, PagSeguroPreApprovalCancel, ...
#!/usr/bin/env python # coding=utf-8 import os import sys import subprocess import urllib import zipfile import platform import shlex import time import json import datetime # ======================================================================================================================= # Project pa...
import argparse import os import platform import sys from distutils.spawn import find_executable from typing import ClassVar, Type wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) sys.path.insert(0, os.path.abspath(os.path.join(wpt_root, "tools"))) from . import browser, insta...
# Copyright 2020 Kapil Thangavelu # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 """Functional Tests for the Docker The uses here is a little specialized to be invoked by tools/dev/dockerpkg.py during image building. """ import json import os import pytest import yaml try: import ...
# Copyright 2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# pylint: disable=g-bad-file-header # pylint: disable=cell-var-from-loop # Copyright 2016 The Bazel 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:/...
import os import ctypes import ctypes.util import syslog import tempfile from functools import wraps if os.name == 'posix': path = ctypes.util.find_library('rsync') if path is None: raise ImportError('Could not find librsync, make sure it is installed') try: _librsync = ctypes.cdll.LoadLi...
# -*- coding: utf-8 -*- # Module for pretty-printing tabular data. # Imported from https://bitbucket.org/astanin/python-tabulate # Found at https://pypi.python.org/pypi/tabulate # Pulled in verbatim to xypath to avoid extraneous dependencies. # Copyright (c) 2011-2013 Sergey Astanin # Permission is hereby granted, ...
# -*- coding: utf-8 -*- # Copyright 2020 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...
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 ''' See Ansible Module Documentation (Below) ''' DOCUMENTATION = ''' --- module: iptables_chain short_description: Entirely manage a single iptables chain description: - Set the rules of a chain to match the specified rules. options...
import time import unittest from ate import testcase from ate.exception import ParamsError class TestcaseParserUnittest(unittest.TestCase): def test_extract_variables(self): self.assertEqual( testcase.extract_variables("$var"), ["var"] ) self.assertEqual( ...
# Copyright (c) 2009, 2010, 2011, 2012 Nicira, 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...
"""Testing for the boost module (sklearn.ensemble.boost).""" import numpy as np from sklearn.utils.testing import assert_array_equal, assert_array_less from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal, assert_true, assert_greater from sklearn.utils.testing impo...
# -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import reverse from django.shortcuts import resolve_url from django.test import TestCase from django.test.utils import override_settings from django_otp import DEVICE_ID_SESSION_KEY from django_otp.oath import totp from django_otp.u...
# -*- coding: utf-8 -*- import os import csv import fudge from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django.test import TestCase from compat.tests.helpers import patch_identifier_index, restore_patched from editor.models...
# 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...
from django.contrib.contenttypes.models import ContentType from nose.tools import eq_ from pyquery import PyQuery as pq from kitsune.access.tests import permission from kitsune.forums.models import Post from kitsune.forums.tests import ( ForumTestCase, forum, thread, post as forum_post) from kitsune.sumo.tests im...
import json import django from django.contrib.admin import ModelAdmin, SimpleListFilter from django.contrib import messages from django.conf.urls import url from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseRedirect, HttpRespon...
from __future__ import absolute_import import datetime from decimal import Decimal from django.db.models import Avg, Sum, Count, Max, Min from django.test import TestCase, Approximate from .models import Author, Publisher, Book, Store class BaseAggregateTestCase(TestCase): fixtures = ["aggregation.json"] ...
# # Copyright (c) SAS Institute 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 w...
# -*- coding: utf-8 -*- """ jinja2.testsuite.filters ~~~~~~~~~~~~~~~~~~~~~~~~ Tests for the jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Markup, Environment en...
import os import boto3 import botocore from botocore.exceptions import ClientError import pytest import sure # noqa # pylint: disable=unused-import from moto import mock_elbv2, mock_ec2, mock_acm from moto.elbv2 import elbv2_backends from moto.core import ACCOUNT_ID from tests import EXAMPLE_AMI_ID @mock_elbv2 @moc...
from rest_framework import serializers as ser from rest_framework import exceptions from rest_framework.exceptions import ValidationError from modularodm import Q from modularodm.exceptions import ValidationValueError from framework.auth.core import Auth from framework.exceptions import PermissionsError from website....
# ***** BEGIN LICENSE BLOCK ***** # Sconspiracy - Copyright (C) IRCAD, 2004-2010. # Distributed under the terms of the BSD Licence as # published by the Open Source Initiative. # ****** END LICENSE BLOCK ****** import os import racy import racy.rlog as rlog import racy.rplugins as rplug from racy.renv ...
import pandas as pd from pandas import DataFrame import math import numpy as np from .utils import * from .functions import * from .parameters import Parameters from .records import Records import copy all_cols = set() def add_df(alldfs, df): for col in df.columns: if col not in all_cols: all...
#!/usr/bin/env python ''' /************************************************************************** * * Copyright 2009 VMware, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), ...
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2004, 2006 Sean C. Gillies # Copyright (c) 2007 STFC <http://www.stfc.ac.uk> # # Authors : # Oliver Clements <olcl@pml.ac.uk> # # Contact email: olcl@pml.ac.uk # =======================...
# # Copyright (c) 2001 - 2016 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 limitation the rights to use, copy, modify, merge...
# # __COPYRIGHT__ # # 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, merge, publish, # distribute, sublicen...
"""Unit tests for ClearCaseClient.""" from __future__ import unicode_literals import os import unittest import kgb import six from rbtools.clients.clearcase import ClearCaseClient, ClearCaseRepositoryInfo from rbtools.clients.errors import SCMError from rbtools.clients.tests import SCMClientTestCase from rbtools.ut...
# coding: utf-8 # #![Spark Logo](http://spark-mooc.github.io/web-assets/images/ta_Spark-logo-small.png) + ![Python Logo](http://spark-mooc.github.io/web-assets/images/python-logo-master-v3-TM-flattened_small.png) # # **Word Count Lab: Building a word count application** # #### This lab will build on the techniques co...
""" Logging ------- This module provides custom logging functionality for other amici modules """ import logging import platform import socket import amici import os import warnings import time import functools from inspect import getouterframes, currentframe LOG_LEVEL_ENV_VAR = 'AMICI_LOG' BASE_LOGGER_NAME = 'amici...
from decimal import Decimal from django.contrib.gis.db.models.fields import GeometryField, RasterField from django.contrib.gis.db.models.sql import AreaField from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as DistanceMeasure, ) from dj...
# -*- 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...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: rpc.py """RPC Implemention, originally written for the Python Idle IDE For security reasons, GvR requested that Idle's Python execution server proce...
from collections import deque, OrderedDict import logging import queue import signal import threading import time from .sqs import SQSDeleteThread, SQSReceiveThread logger = logging.getLogger("zentral.core.queues.backends.aws_sns_sqs.consumer") # BaseConsumer class BaseConsumer: def __init__(self, queue_url, ...
#!/usr/bin/python2.6 # Copyright 2020 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 ...
from unittest import mock from ddt import data, ddt from freezegun import freeze_time from rest_framework import status, test from waldur_core.core import utils as core_utils from waldur_core.logging import models as logging_models from waldur_core.structure import models as structure_models from waldur_core.structur...
<<<<<<< HEAD <<<<<<< HEAD # To fully test this module, we would need a copy of the stringprep tables. # Since we don't have them, this test checks only a few code points. import unittest from test import support from stringprep import * class StringprepTests(unittest.TestCase): def test(self): self.asser...
""" Tree Objects """ import types import re import sys import logging from collections import deque from baal.nlp.lexicon import get_entries from copy import copy from baal.utils.general import cformat, nonstr_join from baal.utils.hlf import gensym, unboundgensym from baal.utils.data_structures.nodes import * # loggin...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
# Copyright 2016 Canonical Ltd # # 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, s...
#!/usr/bin/env python3 import argparse import glob import os import shutil import sys from typing import List ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) import pygments from pytz import VERSION as timezones_version from scripts.lib import cle...
# Copyright 2016 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...
# 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 2015-2016 Palo Alto Networks, 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...
### # Copyright (c) 2004, Brett Kelly # Copyright (c) 2010, James Vega # 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...
import os.path as op import gc import pytest import numpy as np from numpy.testing import (assert_array_almost_equal, assert_equal, assert_array_equal, assert_allclose) from mne.datasets import testing from mne import (read_forward_solution, apply_forward, apply_forward_raw, ...
#!/usr/bin/python # # aes.py: implements AES - Advanced Encryption Standard # from the SlowAES project, http://code.google.com/p/slowaes/ # # Copyright (c) 2008 Josh Davis ( http://www.josh-davis.org ), # Alex Martelli ( http://www.aleax.it ) # # Ported from C code written by Laurent Haan ( http://www.prog...
"""Test the UniFi Protect switch platform.""" # pylint: disable=protected-access from __future__ import annotations from unittest.mock import AsyncMock, Mock import pytest from pyunifiprotect.data import Camera, Light from pyunifiprotect.data.types import RecordingMode, VideoMode from homeassistant.components.unifip...
# Copyright 2013 Huawei Technologies Co.,LTD. # 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 # # Unl...
#!/usr/bin/env python import unittest import lief import tempfile import sys import subprocess import stat import os import logging import random import itertools from subprocess import Popen from unittest import TestCase from utils import get_sample class TestMachO(TestCase): def setUp(self): self.logg...
"""Unittests for heapq.""" from heapq import heappush, heappop, heapify, heapreplace, nlargest, nsmallest import random import unittest from test import test_support import sys def heapiter(heap): # An iterator returning a heap's elements, smallest-first. try: while 1: yield heappop(heap)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # ...
try: import Queue as queue except ImportError: import queue from helpers import Struct class uiParameter(Struct): """uiParameter represents a single GUI element that is used to build a parameter window in the UI (simulator event "make_param_window"). It has one parameter, ``type``, t...
# encoding: utf-8 """Initializes lxml parser, particularly the custom element classes. Also makes available a handful of functions that wrap its typical uses. """ from __future__ import absolute_import, division, print_function, unicode_literals import os from lxml import etree from .ns import NamespacePrefixedTa...
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# coding=utf-8 # Copyright 2018 The DisentanglementLib 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 # # Un...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch Networks, 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # Copyright 2012 Red Hat, 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 a...
""" Cisco_IOS_XR_ha_eem_oper This module contains a collection of YANG definitions for Cisco IOS\-XR ha\-eem package operational data. This module contains definitions for the following management objects\: system\-monitoring\: Processes operational data Copyright (c) 2013\-2015 by Cisco Systems, Inc. All rights ...
#!/usr/bin/env python ''' brozzler-easy - brozzler-worker, warcprox, pywb, and brozzler-dashboard all working together in a single process Copyright (C) 2016 Internet Archive 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...
# -*- coding: utf-8 -*- from django.db import models, migrations import coop_cms.settings import coop_cms.models import django.utils.timezone import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ('contenttypes', '0002_remove_conten...