gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# ============================================================================= # # Copyright (c) 2016, Cisco Systems # 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 ...
# # Copyright 2013 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# -*- coding: utf-8 -*- # Copyright (c) 2021, Michael Boyle # See LICENSE file for details: <https://github.com/moble/quaternion/blob/main/LICENSE> __version__ = "2022.2.10.14.20.39" __doc_title__ = "Quaternion dtype for NumPy" __doc__ = "Adds a quaternion dtype to NumPy." __all__ = ['quaternion', 'as_quat...
# 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 # -*- coding: utf8 -*- import sys try: from cdecimal import Decimal except ImportError: # pragma: no cover from decimal import Decimal from agate import Table from agate.aggregations import Sum from agate.computations import Percent from agate.data_types import * from agate.testcase im...
import numpy as np import numpy.random as npr import kayak from . import * # These behaviors requires prepending singeltons. Do we want to keep them? # def test_0d_opplus_2d_scalar_value(): # npr.seed(1) # for ii in xrange(NUM_TRIALS): # npX1 = npr.randn(1, 1) # X1 = kayak.Parameter( n...
# 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...
import math import re import random from collections import defaultdict import src.settings as var from src.utilities import * from src import debuglog, errlog, plog from src.decorators import cmd, event_listener from src.messages import messages from src.events import Event KILLS = {} # type: Dict[str, str] TARGETS ...
import sys,os import csv import pickle from math import log, sqrt from collections import OrderedDict from mystructs import Rel, RelProb, WordProb words_path = "/Users/liangchen/Documents/Projects/NLI/word_set.p" rels_path = "/Users/liangchen/Documents/Projects/NLI/rel_set.p" line_to_file_path = "/Users/liangchen/Docu...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2012,2013,2014,2015,2016,2017,2018 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licen...
# Copyright 2012 SINA Corporation # 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/licens...
# Copyright 2014 IBM 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
#!/usr/bin/env python #-*- coding: utf-8 -*- import os import sys import subprocess import textwrap import warnings from functools import partial from distutils.sysconfig import get_python_inc import setuptools from setuptools import setup, Extension from setuptools.command.test import test as TestCommand MAJOR = 1 ...
# Copyright (c) 2010-2012 OpenStack, 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 ...
# Copyright 2017-present Open Networking 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 agr...
from django.test import TestCase from chain.core.models import Unit, Metric, Device, ScalarSensor, Site, \ PresenceSensor, Person, Metadata from chain.core.models import GeoLocation from chain.core.api import HTTP_STATUS_SUCCESS, HTTP_STATUS_CREATED from chain.core.hal import HALDoc from chain.core import resources...
# # The Python Imaging Library. # $Id$ # # EPS file handling # # History: # 1995-09-01 fl Created (0.1) # 1996-05-18 fl Don't choke on "atend" fields, Ghostscript interface (0.2) # 1996-08-22 fl Don't choke on floating point BoundingBox values # 1996-08-23 fl Handle files from Macintosh (0.3) # 2001-02-17 fl ...
# Copyright 2016 Infinite Connection # # 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...
import importlib import inspect import sys import django from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import BaseCommand from django.utils.functional import Promise from blessings import Terminal from cbv.models import Project, ProjectVersio...
#!/usr/bin/env python """ calc_pot_alignment.py Jeff Doak jeff.w.doak@gmail.com Calculates the electrostatic alignment between defected and perfect-crystal supercells. (This script is newer/better than calc_pot_alignment.py). Possible command line options: calc_pot_alignment.py <path to defect dir> <path to host dir...
#!/usr/bin/env python ''' PypeR (PYthon-piPE-R) PypeR is free software subjected to the GPL license 3.0. and comes with ABSOLUTELY NO WARRANT. This package provides a light-weight interface to use R in Python by pipe. It can be used on multiple platforms since it is written in pure python. Prerequisites: ...
# Copyright 2017 Google LLC. # # 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 the following disclaimer. # #...
'''tests for some time series analysis functions ''' from statsmodels.compat.python import zip import numpy as np from numpy.testing import assert_array_almost_equal, assert_equal import statsmodels.api as sm import statsmodels.tsa.stattools as tsa import statsmodels.tsa.tsatools as tools from statsmodels.tsa.tsatool...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify 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 law...
import os, sys import json import time import csv try: import http.client as client import urllib.parse as parse from urllib.request import urlopen as urlopen from urllib.request import Request as request from urllib.parse import urlencode as encode # py2 except ImportError: import httplib as c...
from .common import random_str, check_subject_in_rb from rancher import ApiError from .conftest import wait_until, wait_for, DEFAULT_TIMEOUT import pytest import time import kubernetes rb_resource = 'rolebinding' def test_create_cluster_template_with_revision(admin_mc, remove_resource): cluster_template = creat...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.apach...
""" .. codeauthor:: Kevin Kennedy <protonyx@users.noreply.github.com> Driver ------ The BK Precision 9110 Series DC Power Sources use the default USB Test and Measurement driver and should be recognized without problems when plugged in. If the device is not recognized, it is likely because there is a problem with the...
"Simple Fts backend" import re import os import datetime from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import connection, transaction from django.db.models import Q, Max from django.core.cache import cache from fts.backends.base import BaseCl...
#!/usr/bin/python # # Copyright 2018 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. # # Functions to facilitate a branching for merges. # # A "sushi branch" is a branch that we've created and manage. We do this to # preve...
# # 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 # ...
"""A collection of tools for analysing a pdb file. Helper module for the biostructmap package. """ from __future__ import absolute_import, division, print_function from collections import defaultdict from Bio.SeqIO import PdbIO from Bio.SeqUtils import seq1 from Bio.Data.SCOPData import protein_letters_3to1 from Bio....
# Copyright 2013 IBM 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
#!/usr/bin/python import StringIO import subprocess import os import time from datetime import datetime from PIL import Image threshold = 10 sensitivity = 20 forceCapture = True forceCaptureTime = 60 * 60 # Once an hour filepath = "/home/pi/www/picam" filenamePrefix = "capture" diskSpaceToReserve = 40 * 10...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
import torch from torch import nn from torch.nn import functional as F from math import sqrt class EqualLR: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(module, self.name + "_orig") fan_in = weight.data.size(1) * weight.data[0][0].nume...
# Copyright 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 requ...
# -*- coding: utf-8 -*- """Models for blogging app.""" from __future__ import unicode_literals import hashlib import time from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.d...
# -*- test-case-name: wokkel.test.test_generic -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ Generic XMPP protocol helpers. """ from zope.interface import implements from twisted.internet import defer, protocol from twisted.python import reflect from twisted.words.protocols.jabber import error, ...
from __future__ import print_function import collections import os import numpy try: from PIL import Image available = True except ImportError as e: available = False _import_error = e import chainer from chainer.dataset.convert import concat_examples from chainer.dataset import download from chainer ...
"""Attempt to generate templates for module reference with Sphinx XXX - we exclude extension modules To include extension modules, first identify them as valid in the ``_uri2path`` method, then handle them in the ``_parse_module`` script. We get functions and classes by parsing the text of .py files. Alternatively w...
# -*- 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): # Deleting field 'Snapshot.identifier' db.delete_column(u'backup_snapshot...
# 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...
"""An abstraction over virtualenv and Conda environments.""" import codecs import copy import hashlib import itertools import json import logging import os import shutil import yaml from django.conf import settings from readthedocs.builds.constants import EXTERNAL from readthedocs.config import PIP, SETUPTOOLS, Pars...
""" Neutron module for interacting with OpenStack Neutron .. versionadded:: 2018.3.0 :depends:shade Example configuration .. code-block:: yaml neutron: cloud: default .. code-block:: yaml neutron: auth: username: admin password: password123 user_domain_name: mydomain ...
import logging import requests from django.shortcuts import render from ..utils.lgUtils import * from ..utils.earthquakesUtils import * from ..utils.cylinders.cylindersHeatMap import * from django.http import HttpResponse from json.decoder import JSONDecodeError from django.views.decorators.csrf import csrf_exempt log...
################################ # EvoMan FrameWork - V1.0 2016 # # Author: Karine Miras # # karine.smiras@gmail.com # ################################ import sys import numpy import struct import binascii import Base from Base.SpriteConstants import * from Base.SpriteDefinition import * from sensors imp...
from __future__ import division from __future__ import unicode_literals from django.utils.six import BytesIO from PIL import Image, ImageOps from .datastructures import FilteredImage, SizedImage from .registry import versatileimagefield_registry class CroppedImage(SizedImage): """ A SizedImage subclass tha...
#!/usr/bin/python # -*- coding: utf-8 -*- import json import os import zipfile from action import base_manager from action import user_manager from bottle import redirect from bottle import request from entity import category as category_entity from entity import image as image_entity from entity import recipe as reci...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2007-2015, GoodData(R) Corporation. All rights reserved from builtins import object import mock import os import pytest import shutil import smoker.client as smoker_client from smoker.client import cli as smoker_cli import socket from tests.server.smoker_te...
from __future__ import absolute_import from __future__ import unicode_literals import re import datetime as dt from decimal import Decimal from ...util_tests import TestLogin from evesrp import db from evesrp.models import Request, Action, AbsoluteModifier, RelativeModifier,\ ActionType, PrettyDecimal from eves...
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
# 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 VMware, 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 # # ...
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This file contains a contains the high-level functions to read a VOTable file. """ # STDLIB import io import os import sys import textwrap import warnings # LOCAL from . import exceptions from . import tree from astropy.utils.xml import iterparser f...
## # Copyright (c) 2015, David Jurgens # # All rights reserved. See LICENSE file for details ## import codecs import collections import json import operator import random import logging from geopy.point import Point from geopy import distance import os.path import itertools import gzip from multiprocessing import P...
# Copyright (c) 2015 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 ...
# Licensed under the Apache License. See footer for details. # <build-dir> <cache-dir> import os import re import sys import json import time import semver # from: https://github.com/k-bx/python-semver import shutil import urllib import subprocess #--------------------------------------------------------------...
from __future__ import with_statement from cms.views import details from cms.utils.compat.dj import force_unicode from cms.api import create_page, create_title from cms.cms_toolbar import ADMIN_MENU_IDENTIFIER from cms.toolbar.items import ToolbarAPIMixin, LinkItem, ItemSearchResult from cms.toolbar.toolbar import CMST...
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what ...
# # pololu/motors/qik2s9v1.py # # Usual device on Linux: /dev/ttyUSB0 # """ This code was written to work with the Pololu Qik 2s9v1 motor controller. http://www.pololu.com/catalog/product/1110 by Carl J. Nobile THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMI...
""" This example demonstrates how to embed matplotlib WebAgg interactive plotting in your own web application and framework. It is not necessary to do all this if you merely want to display a plot in a browser or use matplotlib's built-in Tornado-based server "on the side". The framework being used must support web s...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
__author__ = "grburgess" import itertools import functools import numpy as np from threeML.io.progress_bar import progress_bar from astromodels import use_astromodels_memoization class GenericFittedSourceHandler(object): def __init__(self, analysis_result, new_function, parameter_names, parameters, confidence_l...
# Copyright 2019 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 # Copyright 2016 the V8 project authors. All rights reserved. # Copyright 2014 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. """Given the output of -t commands from a ninja build for a gyp and GN g...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from signbank.dictionary.models import * from reversion.admin import VersionAdmin from signbank.settings import server_specific from signbank.settings.server_specific import FIELDS, SEPARATE_ENGLISH_IDGLOSS_FIELD from modeltranslation.adm...
import six from adminsortable2.admin import SortableInlineAdminMixin from django.contrib import admin from django.db.models import Count from django.utils.safestring import mark_safe from icekit.admin_tools.polymorphic import \ ChildModelPluginPolymorphicParentModelAdmin import models from icekit.content_collection...
# 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 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...
"""See __init__.py for what is considered public here.""" import errno import itertools import logging import os import shutil import struct import sys import tempfile import xml.etree.ElementTree as etree import zipfile import urllib.request def safe_open(path, overwrite=False): """ Open but do not overwri...
# 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 in ...
"""Support for KNX/IP lights.""" from __future__ import annotations from typing import Any, Callable, Iterable from xknx.devices import Light as XknxLight from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPOR...
# Copyright 2018 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. """Contains a helper function for deploying and executing a packaged executable on a Target.""" from __future__ import print_function import common import h...
#!/usr/bin/env python # Author: csiu # Created: 2015-02-01 import argparse from ConfigParser import SafeConfigParser import sys import os import math import re import linecache from utils import lmean, random_string, line_count, all_same, ensure_dir, get_value_from_keycolonvalue_list usage = """Feature extraction: - ...
# 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. import json import os import sys import buildbot_common import build_version import getos from buildbot_common import ErrorExit from easy_template impor...
# Copyright 2012 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 ...
#!/usr/bin/env python import urlparse import urllib2 import BaseHTTPServer import unittest import hashlib from test import test_support mimetools = test_support.import_module('mimetools', deprecated=True) threading = test_support.import_module('threading') # Loopback http server infrastructure class LoopbackHttpServ...
#!/usr/bin/env python # # 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 require...
# -*- coding: utf-8 -*- ''' Connection module for Amazon SNS :configuration: This module accepts explicit sns credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necess...
# -*- 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. # # This software consists...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ FileInstall: Polls for changes on files in a directory and notifies listeners :author: Thomas Calmant :copyright: Copyright 2020, Thomas Calmant :license: Apache License 2.0 :version: 1.0.1 .. Copyright 2020 Thomas Calmant Licensed under the Apache L...
import csv import json import cStringIO import time import pystache from flask import make_response, request from flask_login import current_user from flask_restful import abort import xlsxwriter from redash import models, settings, utils from redash.tasks import QueryTask, record_event from redash.permissions import ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from copy import deepcopy from elasticsearch_dsl import search, query, F, Q, DocType def test_search_starts_with_empty_query(): s = search.Search() assert s.query._proxied == query.MatchAll() def test_search_query_combines_query(): s = search.Search() s2 = s.query('match', f=42) assert s2.query...
import re from datetime import timedelta from enum import Enum from typing import Union, Tuple, List from django.apps import apps from django.core import exceptions from django.conf import settings from django.db.models import F, Count, Min, Max, Sum, Value, Avg, ExpressionWrapper, DurationField, FloatField, Model fro...
"""The test for binary_sensor device automation.""" from datetime import timedelta import pytest from unittest.mock import patch from homeassistant.components.binary_sensor import DOMAIN, DEVICE_CLASSES from homeassistant.components.binary_sensor.device_condition import ENTITY_CONDITIONS from homeassistant.const impor...
import struct import synapse.axon as s_axon import synapse.common as s_common import synapse.neuron as s_neuron import synapse.lib.iq as s_iq import synapse.lib.cell as s_cell import synapse.lib.crypto.vault as s_vault from synapse.tests.common import * logger = logging.getLogger(__name__) # This causes blocks whi...
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. 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...
""" Test SBProcess APIs, including ReadMemory(), WriteMemory(), and others. """ from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test.lldbutil import get_stopped_thread, state_type_to_str class ProcessAPITestCase(TestBase...
#!/usr/bin/python # # Siglent power supply-based battery charger for lead acid batteries. # # Implementation Plan # (* indicates latest released version) # # Rev Goal #*0.10 Initial release, emulates BQ24450 dual state charger, but # with many additional features. # 0.20 ...
import csv import datetime import logging import math import os import re import pandas as pd from django.db import connections from django.conf import settings from md.models import ( FAILURE_TO_REMAIN_PURPOSE, INVESTIGATION_PURPOSE, PURPOSE_BY_INDEX, PURPOSE_CHOICES, UNKNOWN_PURPOSE ) from tsdata.sql impor...
# -*- coding: utf-8 -*- from collections import Counter from django.conf import settings from django.core.management.base import BaseCommand from django.db import transaction import waffle from django_statsd.clients import statsd from post_request_task.task import ( _discard_tasks, _start_queuing_tasks, ...
""" DESCRIPTORS.TXTGREY: textural descriptors from grey-scale images. @author: vlad """ from __future__ import (absolute_import, division, print_function, unicode_literals) __version__ = 0.05 __author__ = 'Vlad Popovici' __all__ = ['GaborDescriptor', 'LBPDescriptor', 'GLCMDescriptor', 'HOGDescriptor', 'His...
# # 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...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Question.state_exclusive' db.add_column('website_question', 'state_exclusive', ...
# coding=utf-8 # Copyright 2021 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 agreed ...
""" pydevd_vars deals with variables: resolution/conversion to XML. """ import pickle from _pydev_imps._pydev_saved_modules import thread from _pydevd_bundle.pydevd_constants import get_frame, get_thread_id, xrange from _pydevd_bundle.pydevd_custom_frames import get_custom_frame from _pydevd_bundle.pydevd_xml impo...