gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/python #============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 3.0 of the GNU General Public # License as published by the Free Software Foundation. # # This library is distributed in ...
# Copyright (c) 2014 Intel Corporation. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this list # of conditions and the following disclaimer....
"""Test the Xiaomi Aqara config flow.""" from socket import gaierror from unittest.mock import Mock, patch import pytest from homeassistant import config_entries from homeassistant.components import zeroconf from homeassistant.components.xiaomi_aqara import config_flow, const from homeassistant.const import CONF_HOST...
"""Support KNX devices.""" import logging import voluptuous as vol from xknx import XKNX from xknx.devices import DateTime, ExposeSensor from xknx.dpt import DPTArray, DPTBase, DPTBinary from xknx.exceptions import XKNXException from xknx.io import ( DEFAULT_MCAST_GRP, DEFAULT_MCAST_PORT, ConnectionConfig,...
from enum import Enum, auto from typing import ( Any, Iterator, NamedTuple, Optional, List, NoReturn, Type, Union, ) from httpie.cli.dicts import NestedJSONArray from httpie.cli.constants import EMPTY_STRING, OPEN_BRACKET, CLOSE_BRACKET, BACKSLASH, HIGHLIGHTER class HTTPieSyntaxError(V...
# Copyright 2015 NEC Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
from __future__ import unicode_literals import bz2 import gc import hashlib import os from django.db import DatabaseError, models, reset_queries, connection from django.db.models import Count, Q from django.db.utils import IntegrityError from django.utils.encoding import smart_unicode from django.utils.functional imp...
from ctypes import * from vcx.common import do_call, create_cb import json import logging class Wallet: @staticmethod async def close_search(handle: int): logger = logging.getLogger(__name__) if not hasattr(Wallet.close_search, "cb"): logger.debug("vcx_wallet_close_search: Creat...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com import warnings import os from tempfile import mkstemp from subproces...
## protocol.py ## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later versio...
''' S transform (time-frequency transformation) Submodule of the Modular EEg Toolkit - MEET for Python. the 'standard' S transform: ---------------------------- Stockwell, Robert Glenn, Lalu Mansinha, and R. P. Lowe. "Localization of the complex spectrum: the S transform." Signal Processing, IEEE Transactions on 44....
"""AMQPStorm Channel.Basic.""" import logging import math from pamqp import body as pamqp_body from pamqp import header as pamqp_header from pamqp import specification from amqpstorm import compatibility from amqpstorm.base import FRAME_MAX from amqpstorm.base import Handler from amqpstorm.exception import AMQPChann...
#!/usr/bin/env python3 from __future__ import print_function, division from collections import Counter import itertools import math import re import sys import six if six.PY3: viewkeys = dict.keys else: viewkeys = dict.viewkeys from .idf import IDF from .model import dr, prev_next_sentences from .stopwords i...
import base64 import datetime import sys import time import unittest import xmlrpclib import SimpleXMLRPCServer import mimetools import httplib import socket import StringIO import os import re from test import test_support try: import threading except ImportError: threading = None try: unicode except Nam...
""" Statistical tests to be used in conjunction with the models Notes ----- These functions haven't been formally tested. """ from scipy import stats import numpy as np from statsmodels.tools.sm_exceptions import ValueWarning # TODO: these are pretty straightforward but they should be tested def durbin_watson(resid...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' A simple, lightweight, WSGI-compatible web framework. ''' __author__ = 'Michael Liao' import types, os, re, cgi, sys, time, datetime, functools, mimetypes, threading, urllib, traceback try: from cStringIO import StringIO except ImportError: from StringIO impo...
"""deCONZ binary sensor platform tests.""" from unittest.mock import patch from homeassistant.components.binary_sensor import BinarySensorDeviceClass from homeassistant.components.deconz.const import ( CONF_ALLOW_CLIP_SENSOR, CONF_ALLOW_NEW_DEVICES, CONF_MASTER_GATEWAY, DOMAIN as DECONZ_DOMAIN, ) from...
""" Threshold Graphs - Creation, manipulation and identification. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)\nDan Schult (dschult@colgate.edu)""" # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@la...
"""id_transferer_cli Command line interface to the spectra-cluster id_transferer tool. This tool can be used to transfer identifications to other incorrectly or unidentified spectra. Quality criteria can be specified in terms of minimum cluster size and minimum ratio (the proportion of spectra identified as the most ...
#!/usr/bin/python # ---------------------------------------------------------------------- # Copyright (2010) Aram Davtyan and Garegin Papoian # Papoian's Group, University of Maryland at Collage Park # http://papoian.chem.umd.edu/ # Last Update: 03/04/2011 # ---------------------------------------------------------...
import datetime import functools import logging from collections import namedtuple from app import constants, models from app.util.timestamps import utc_now LOGGER = logging.getLogger(__name__) NODE_PATH_CACHE_SIZE = 16 # should be a power of 2 NodeInfo = namedtuple('NodeInfo', ['answer_type', 'tag']) def map_n...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import copy from flexget.api.app import base_message from flexget.api.plugins.pending_list import ObjectsContainer as OC from flexget.entry import Entry from flexget.manager im...
''' Created on Jan 24, 2014 @author: Matthias Sperber ''' import numpy as np import source.utility as utility import source.prob as prob import math import source.expressions as expr import random import copy class RevertableParent(object): def getRevertableObjects(self): pass def activateRevertable...
""" Proxy module tests. """ import pickle import time from threading import Timer import pytest from Pyro4.errors import ConnectionClosedError import osbrain from osbrain import Agent from osbrain import AgentProcess from osbrain import NameServer from osbrain import Proxy from osbrain import run_agent from osbrain i...
import os import wx import sys from Slideshow import * from ImageUtils import * class MainFrame(wx.Frame): def __init__(self, parent, title, filepath): wx.Frame.__init__(self, parent, title=title, size=(400,400)) self.registerEvents() self.initialize(filepath) def registerEvents(self...
# Copyright 2015 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
import sys import argparse import os import subprocess import numpy as np import pm_funcs from astropy.utils.console import color_print from scipy.optimize import curve_fit from sklearn.neighbors import KernelDensity #PARAMETROS radio, itera, output, refer, nframes, min_ep, max_err = pm_funcs.get_script() print 'Inic...
# # Copyright (c) 2015 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
#!/usr/bin/env python import optparse from sys import * import os,sys,re from optparse import OptionParser import glob import subprocess from os import system import linecache import numpy as np import matplotlib.pyplot as plt import Image import pylab from matplotlib.ticker import MultipleLocator, FormatStrFormatter...
#!/usr/bin/env python2.7 import os import sys import tempfile import shutil from subprocess import call, check_output, CalledProcessError import tarfile from gzip import GzipFile import StringIO import argparse NODEJS_VERSION = 'v0.10.29' TYPESCRIPT_VERSION = '1.0.1' NODEJS_DIST = 'http://nodejs.org/dist' PLATFORM =...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 btypes import syntax import blocks from ast import NodeVisitor from collections import Counter binary_ops = { '+' : 'BINARY_ADD', '-' : 'BINARY_SUBTRACT', '*' : 'BINARY_MULTIPLY', '/' : 'BINARY_DIVIDE', } unary_ops = { '+' : 'UNARY_POSITIVE', '-' : 'UNARY_NEGATIVE', '!' : 'UNARY_NO...
#!/usr/bin/env python # TODO add onos-app-fwd to features # TODO check if service is running... i think this might already be done by mn from mininet.node import Controller, OVSSwitch, CPULimitedHost, RemoteController from mininet.net import Mininet from mininet.cli import CLI from mininet.topo import LinearTopo, Top...
# -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- import json import random from peak.rules import when from nagare.i18n import _ from nagare.se...
''' game.py Game module for Tic-Tac-Toe This is where the game context is created. ''' from player import Player from board import Board import json class Game: def __init__(self): ''' Constructor ''' self.board = Board() self.one = None self.two = None s...
# Copyright 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.0 # # Unless required by applicable law or agr...
# # 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 __future__ import unicode_literals import getpass import optparse import os import re import socket import subprocess import sys try: import urllib.request as compat_urllib_request except ImportError: # Python 2 import urllib2 as compat_urllib_request try: import urllib.error as compat_urllib_erro...
# 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 agreed ...
# 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...
from kivy.properties import * from pentai.gui.screen import Screen import pentai.base.rules as r_m from pentai.base.defines import * from pentai.base.pente_exceptions import * import pentai.base.logger as log from pentai.gui.game_defaults import * import pentai.gui.game_gui as gg_m import pentai.gui.checkbox_list as ...
# 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...
# Copyright 2017 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 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import json import o...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
import logging import random import re from streamlink.plugin import Plugin, PluginArgument, PluginArguments, pluginmatcher from streamlink.plugin.api import useragents, validate from streamlink.plugin.api.utils import itertags from streamlink.stream.ffmpegmux import MuxedStream from streamlink.stream.hls import HLSSt...
# Coding: utf8 """Controller for claims (statements about observed or generalized occurances of behavior)""" PART_OF_URI = 'http://purl.obolibrary.org/obo/BFO_0000050' PARTICIPATES_IN_URI = 'http://purl.obolibrary.org/obo/RO_0000056' HAS_PARTICIPANT_URI = 'http://purl.obolibrary.org/obo/RO_0000057' ACTIVELY_PARTICIPAT...
from __future__ import with_statement from copy import deepcopy import re import sys from django.core.cache import cache from django.conf import settings from django.contrib.auth.models import Permission from django.core.urlresolvers import clear_url_caches from django.http import Http404 from django.template import V...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # (c) Camille Scott, 2019 # File : cdbg_stream.py # License: MIT # Author : Camille Scott <camille.scott.w@gmail.com> # Date : 11.03.2020 from goetia import libgoetia from goetia.cdbg import (compute_connected_component_callback, compute_unit...
# # LayerImage.py -- Abstraction of an generic layered image. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy import time from ginga import BaseImage fro...
import time from datetime import datetime, date from stdnet import odm class CustomManager(odm.Manager): def small_query(self, **kwargs): return self.query(**kwargs).load_only('code', 'group') def something(self): return "I'm a custom manager" class SimpleModel(odm.StdModel): code = o...
# Copyright (c) 2013 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 collections import fnmatch import optparse import os import sys # 'KEY' : ( <TYPE>, [Accepted Values], <Required?>) DSC_FORMAT = { 'DISABLE':...
# # MLDB-1750-dist-tables.py # Simon Lemieux, 2016-06-27 # This file is part of MLDB. Copyright 2016 mldb.ai inc. All rights reserved. # import os, tempfile from math import sqrt from mldb import mldb, MldbUnitTest, ResponseException def get_temporary_file(): return tempfile.NamedTemporaryFile(prefix=tmp_dir) N...
# -*- coding: utf-8 -*- { "Acronym of the organization's name, eg. IFRC.": 'Lista organizasaun nia naran sira e.g IFRC', "If you don't see the Office in the list, you can add a new one by clicking link 'Create Office'.": 'Se ita la hare eskritorio iha lista laran, ita bele hatama foun fali hodi klik iha ligasaun : Tipu...
# # Copyright (c) 2009-2015, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # from environment import * import Graph as G class Spars...
#!/usr/bin/env python from pyVim.connect import SmartConnect, SmartConnectNoSSL, Disconnect from pyVmomi import vim, vmodl import atexit import os import sys import errno from pprint import pprint, pformat import time from netaddr import IPNetwork, IPAddress import yaml import ssl import requests class EZMomi(object)...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2016 Vedams Inc. # Copyright (C) 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 ...
"""Base class extended by connection adapters. This extends the connection.Connection class to encapsulate connection behavior but still isolate socket and low level communication. """ import errno import logging import socket import ssl import pika.compat from pika import connection from pika import exceptions try:...
import logging import requests from . import config, storage, utils, log from .components import load_components class Core(object): def __init__(self): ''' init is the only method defined in core.py alive is value showing whether core is running - you should call logout metho...
# Copyright (c) 2011 Justin Santa Barbara # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Metaswitch Networks # 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/LIC...
import subprocess import re import os import shlex import datetime def dpkg_check(packagename): """ Checks the installation status of packages that need to be checked via dpkg -s <packagename>. Returns True if installed, False if not. """ dpkg_success = "Status: install ok installed" compare_r...
# Copyright 2013: 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...
#!/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...
#!/usr/bin/env python3 '''\ Read and report upon a ViPR SRM alerting.xml file. Tested with Python 3.4.3 ''' # Insure maximum compatibility between Python 2 and 3 from __future__ import absolute_import, division, print_function __version__ = 1.1 __copyright__ = "Copyright 2015 Samuel T. Denton, III" __author__ = "S...
# Copyright (c) 2013-2014 Parallels, 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 ...
#!/usr/bin/python import sys, getopt, os, numpy, math import re import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 15}) def movingAverage (values, window): weights = numpy.repeat(1.0, window)/window return numpy.convolve(values, weights, 'valid') def hann_filter (g, n): for i in range(0,l...
# Copyright 2015 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 ...
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
import collections import platform from typing import Any, Dict, Optional import numpy as np import ray from ray.rllib import SampleBatch from ray.rllib.execution import PrioritizedReplayBuffer, ReplayBuffer from ray.rllib.execution.buffers.replay_buffer import logger, _ALL_POLICIES from ray.rllib.policy.rnn_sequencin...
import logging import re from typing import Any, Dict, List, Optional, Tuple import DNS from django import forms from django.conf import settings from django.contrib.auth import authenticate, password_validation from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm, SetPasswordForm from django.co...
# 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...
# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # Copyright (c) 2011 Jann Kleen # # 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 limitat...
# # Copyright 2013 Red Hat, Inc # Copyright 2013 eNovance <licensing@enovance.com> # # Authors: Eoghan Glynn <eglynn@redhat.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may ob...
# Copyright (C) 2013 Jaedyn K. Draper # # 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, di...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
"""High-level polynomials manipulation functions. """ from sympy.polys.polytools import ( poly_from_expr, parallel_poly_from_expr, Poly) from sympy.polys.polyoptions import allowed_flags from sympy.polys.specialpolys import ( symmetric_poly, interpolating_poly) from sympy.polys.polyerrors import ( Polifi...
"""Copyright 2009 Chris Davis 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 dist...
import os import eyed3 import re import sys import urllib from selenium import webdriver from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoSuchElementException from...
# encoding: utf-8 import numpy as np import chainer from chainer import cuda import chainer.functions as F import chainer.links as L from chainer import reporter from train import source_pad_concat_convert # linear_init = chainer.initializers.GlorotNormal() linear_init = chainer.initializers.LeCunUniform() def se...
######## # Copyright (c) 2014 GigaSpaces Technologies 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 # # Unless...
# Copyright 2011 Nicholas Bray # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# Copyright 2014 The Oppia 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 ...
"""The tests for hls streams.""" from datetime import timedelta import io from unittest.mock import patch from urllib.parse import urlparse import av import pytest from homeassistant.components.stream import create_stream from homeassistant.components.stream.const import MAX_SEGMENTS, NUM_PLAYLIST_SEGMENTS from homea...
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
# standard modules import itertools as it import os import types import utils # third-party modules import MDAnalysis.analysis.distances as mdaad import pandas as pd # custom modules import DatabaseProvider import Parser class Analyser(object): def __init__(self): #: Link to the underlying database self._db = ...
# Copyright (c) 2014 Cloudera, Inc. All rights reserved. # Tests admission control import pytest import threading import re from time import sleep, time from tests.beeswax.impala_beeswax import ImpalaBeeswaxException from tests.common.custom_cluster_test_suite import CustomClusterTestSuite from tests.common.impala_cl...
# -*- coding: utf-8 -*- """ .. module:: models :platform: Unix :synopsis: ORM defenition .. moduleauthor:: Anton Konyshev <anton.konyshev@gmail.com> """ from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.engine.url import URL from sqlalchemy import Colu...
# -*- coding: utf-8 -*- # This file is part of the pymfony package. # # (c) Alexandre Quercia <alquerci@email.com> # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. from __future__ import absolute_import; import os; from time import time; im...
""" Import variable into your Django settings.py file, and whenever you define a variable that could change depending on where the project is deployed, use something like: DEBUG = variable("DEBUG") DEBUG = variable("DEBUG", default=False) Here is a more useful example: import os # This needs to be a...
''' Module of classes used to test M-LOOP. ''' from __future__ import absolute_import, division, print_function __metaclass__ = type import numpy as np import threading import mloop.utilities as mlu import numpy.random as nr import logging import os import time class TestLandscape(): ''' Produces fake landsca...
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on Jan 1, 2011 @author:Drew Bratcher @contact: dbratcher@gatech.edu @summary: Contains tutorial for backteste...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
# Copyright 2014 LinkedIn Corp. # # 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....
from __future__ import unicode_literals from __future__ import absolute_import, division, print_function """ Tests for views that use field aliased. """ __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2014, G. Klyne" __license__ = "MIT (http://opensource.org/licenses/MIT)" import os im...
import sqlalchemy from sqlalchemy import Table, Column, Integer, String, Binary, DateTime, MetaData, ForeignKey from sqlalchemy.orm import mapper, sessionmaker from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import mapper, sessionmaker, aliased from sqlalchemy import ForeignKey from sqlalche...
# -*- coding: utf-8 -*- # ============================================================================= # Federal University of Rio Grande do Sul (UFRGS) # Connectionist Artificial Intelligence Laboratory (LIAC) # Renato de Pontes Pereira - rppereira@inf.ufrgs.br # ======================================================...