gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# # Copyright (c) 2008-2015 Citrix 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.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
# 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 displaying collected data over SNMP.""" from __future__ import annotations from datetime import timedelta import logging import pysnmp.hlapi.asyncio as hlapi from pysnmp.hlapi.asyncio import ( CommunityData, ContextData, ObjectIdentity, ObjectType, SnmpEngine, UdpTransportTarget...
from django.db import OperationalError from django.http import HttpResponseRedirect, JsonResponse from django.shortcuts import render, Http404 import datetime from django.core.urlresolvers import reverse from django.conf import settings from django.views.decorators.csrf import csrf_exempt from PiControl.models import ...
# 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...
import asyncio import logging from functools import partial from unittest import mock import pytest from raven_aiohttp import QueuedAioHttpTransport from tests.utils import Logger pytestmark = pytest.mark.asyncio @asyncio.coroutine def test_basic(fake_server, raven_client, wait): server = yield from fake_serve...
# Copyright 2013 Violin Memory, 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 requi...
"""Record simulated nightly statistics by program. """ from __future__ import print_function, division, absolute_import import numpy as np import astropy.io.fits import desiutil.log import desisurvey.config import desisurvey.utils import desisurvey.tiles import desisurvey.plots class SurveyStatistics(object): ...
''' Created on Apr 3, 2017 @author: dearj019 ''' import os import errno from .imdb import imdb import xml.dom.minidom as minidom import numpy as np import scipy.sparse import scipy.io as sio import pickle as cPickle import subprocess import uuid from .generic_eval import generic_eval import xml.etree.ElementTree as E...
# 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 python3 # # Copyright (c) 2019 Roberto Riggio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
import re import sys import gam from gam.var import * from gam import controlflow from gam import display from gam import gapi from gam.gapi import errors as gapi_errors from gam.gapi.directory import customer as gapi_directory_customer def _get_customerid(): ''' returns customerId with format C{customer_id}''' ...
from __future__ import print_function import gc import inspect import math, copy import os import sys import threading import multiprocessing import concurrent.futures import time import random import pygreentea # Determine where PyGreentea is pygtpath = os.path.normpath(os.path.realpath(os.path.abspath(os.path.split...
import unittest from .. import normalize_reference, scripture_re, reference_to_string def f(txt): """ accept a string containing a scripture reference, normalize it, and then return the reformatted string """ return reference_to_string( *normalize_reference(*scripture_re.match(txt).gro...
"""Implement a simple shell for running on MicroPython. MicroPython shell, by Dave Hylands, see:https://github.com/dhylands/upy-shell This is a very simple command line based shell for MicroPython. It is based on a stripped down version of cmd, which can be found here: https://github.com/micropython/micropython-lib/t...
#!/router/bin/python from .stl_general_test import CStlGeneral_Test, CTRexScenario from functools import wraps from trex_stl_lib.api import * import os, sys import copy ERROR_LATENCY_TOO_HIGH = 1 ERROR_CNTR_NOT_0 = 2 class STLRX_Test(CStlGeneral_Test): """Tests for RX feature""" def setUp(self): per_...
# -*- coding: utf-8 -*- """Tests for deprecation tools.""" # # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __version__ = '$Id$' from pywikibot.tools import ( deprecated, deprecate_arg, deprecated_args, add_full_name, remove_last_args ) fr...
"""Climate data pre-processing""" # Built ins import logging from distutils.version import LooseVersion import warnings # External libs import cftime import numpy as np import netCDF4 import xarray as xr # Locals from oggm import cfg from oggm import utils from oggm import entity_task from oggm.exceptions import Inva...
# 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 ...
# 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 ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
import copy import importlib import json import sys try: from unittest import mock except ImportError: import mock try: import fastapi FASTAPI_INSTALLED = True ALLOWED_FASTAPI_VERSION = fastapi.__version__ >= '0.41.0' except ImportError: FASTAPI_INSTALLED = False ALLOWED_FASTAPI_VERSION =...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright (c) 2010-2017 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # #!/usr/bin/python doc = """\ Node manager listens to process state change events and other flag value change events to provide advanced service management functionality. Rules files looks like following: ==================== { "Rules": [ {"pro...
import datetime import html import json import logging import os import random import re import threading import time import accounts import args import captcha import config import log import stats import vkapi import storage from bot_response import ResponseType, BotResponse from cache import UserCache, ConfCache, ...
#------------------------------------------------------------------------------- # Name: opan_utils_base # Purpose: Test objects for opan.utils.base # # Author: Brian Skinn # bskinn@alum.mit.edu # # Created: 28 Feb 2016 # Copyright: (c) Brian Skinn 2016 # License: The MIT Licens...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'valerio cosentino' import mysql.connector class DbUtil(): """ This class provides database utilities """ def get_connection(self, config): """ gets DB connection :type config: dict :param config: the DB conf...
# Copyright (c) 2014, Oracle and/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. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
#!/usr/bin/env python # # This program returns the gray matter segmentation given anatomical, spinal cord segmentation and t2star images # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Sara Dupont #...
''' Individual stages of the pipeline implemented as functions from input files to output files. The run_stage function knows everything about submitting jobs and, given the state parameter, has full access to the state of the pipeline, such as config, options, DRMAA and the logger. ''' from utils import safe_make_di...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division import re import six from nibble import decorators, Information, Duration @decorators.python_2_div_compatible @decorators.python_2_nonzero_compatible @six.python_2_unicode_compatible class Speed(object): """ Represents a quantity of in...
# 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...
import json from datetime import datetime from sqlalchemy import desc from flask_babel import lazy_gettext from c3bottles import app, db from c3bottles.model.category import Category, all_categories from c3bottles.model.location import Location from c3bottles.model.report import Report from c3bottles.model.visit impo...
# Copyright (c) 2010 Chris Moyer http://coredumped.org/ # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation ...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import sys, types, weakref from collections import deque from test.bootstrap import config from test.lib.util import decorator, gc_collect from sqlalchemy.util import callable from sqlalchemy import event, pool from sqlalchemy.engine import base as engine_base import re import warnings class ConnectionKiller(object): ...
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Doriancoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test descendant package tracking code.""" from test_framework.test_framework import DoriancoinTestF...
import re import os import shutil import time import cloudpickle from typing import List, Optional, Dict import numpy as np import torch import torch.nn as nn from torch.autograd import Variable from torch.nn import functional as F from torch.optim import Adam, lr_scheduler from torchtext.data.field import Field fro...
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Bit...
__all__ = ["make_node", "CM_Node"] import bpy import bpy.types import bpy_types import bmesh import bmesh.ops import math import mathutils import pyconspack as cpk from array import array from pyconspack import Conspack from mathutils import Matrix import io_scene_consmodel.consmodel as consmodel from io_scene_con...
import hashlib, binascii, struct, array, os, time, sys, optparse import scrypt from construct import * def main(): options = get_args() algorithm = get_algorithm(options) input_script = create_input_script(options.timestamp) output_script = create_output_script(options.pubkey) # hash merkle root is the ...
import json import tornado.ioloop, tornado.websocket from tornado import gen import traceback class TradersBot: # takes in variable number of args def __doNothing(self, *args): pass def __init__(self, host, id, password, token = None): ''' hyuh ''' self.host = host self.id = id self.password = passwo...
# mako/cache.py # Copyright (C) 2006-2014 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from mako import compat, util _cache_plugins = util.PluginLoader("mako.cache") register_plugin = _...
# -*- coding: utf-8 -*- from Instanssi.common.http import Http403 from Instanssi.common.auth import staff_access_required from django.shortcuts import get_object_or_404 from django.http import Http404, HttpResponseRedirect from django.urls import reverse from Instanssi.kompomaatti.models import * from Instanssi.arkist...
"""KDDCUP 99 dataset. A classic dataset for anomaly detection. The dataset page is available from UCI Machine Learning Repository https://archive.ics.uci.edu/ml/machine-learning-databases/kddcup99-mld/kddcup.data.gz """ import errno import logging import os import sys from gzip import GzipFile from io import Bytes...
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function from .. import __author__, __version__ from ..core import np as np import operator as op class Funlib(object): """ Funlib This class must be loaded by xl2py.core.processor as Funlib to parse simple lambda-conversion r...
# Copyright 2014 Open Source Robotics Foundation, 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...
# Copyright 2016 Mobile CSP Project. 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...
#!/usr/bin/env python """ Main program to run pySPACE For further instructions take a look at the pySPACE documentation and the tutorials in there! .. note:: Due to errors in configuration files, data or the software, the software may crash. Because of internal parallelization and threading, it is currently ...
import datetime import unittest # 5 years from now (more or less) fiveyrsfuture = datetime.datetime.utcnow() + datetime.timedelta(5*365) class Test_static_view_use_subpath_False(unittest.TestCase): def _getTargetClass(self): from pyramid.static import static_view return static_view def _makeO...
# oracle/zxjdbc.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the Oracle database via the zxjdbc JDBC connector. JDBC Driver ------...
# 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...
#!/usr/bin/env python """ Created by: Lee Bergstrand (2017) Description: A parser for parsing genome properties flat files into a rooted DAG of genome properties. """ from pygenprop.step import Step from pygenprop.evidence import Evidence from pygenprop.genome_property import GenomeProperty from pygenprop.functional...
#!/usr/bin/python # -*- coding: utf-8 -*- __doc__ = """ Implementation of the standard AST output converters. """ __all__ = ( 'TermBuilder', 'LiteralTermBuilder', 'InfixTermBuilder', 'PrefixTermBuilder', 'PostfixTermBuilder', 'tree_converters' ) try: from psyco.classes import * except ImportError...
import numpy as np import fitsio import os import logging logger = logging.getLogger('legacypipe.outliers') def info(*args): from legacypipe.utils import log_info log_info(logger, args) def debug(*args): from legacypipe.utils import log_debug log_debug(logger, args) from legacypipe.bits import OUTLIER...
from typing import Optional, Union from sanic.helpers import STATUS_CODES class SanicException(Exception): message: str = "" def __init__( self, message: Optional[Union[str, bytes]] = None, status_code: Optional[int] = None, quiet: Optional[bool] = None, ) -> None: ...
# Copyright 2020-present Kensho Technologies, LLC. from abc import ABCMeta, abstractmethod from typing import AbstractSet, Any, Collection, Generic, Iterable, Mapping, Optional, Tuple from ..compiler.metadata import FilterInfo from ..typedefs import Literal, TypedDict from .data_context import DataContext, DataToken ...
# 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 ...
import os import itertools from collections import Callable, OrderedDict from functools import reduce from django.forms.forms import (BaseForm, DeclarativeFieldsMetaclass, NON_FIELD_ERRORS, pretty_name) from django.forms.widgets import media_property from django.core.exceptions import F...
################################################################################ #This software was developed by the University of Tennessee as part of the #Distributed Data Analysis of Neutron Scattering Experiments (DANSE) #project funded by the US National Science Foundation. # #See the license text in license.txt ...
import datetime import logging import warnings from werkzeug.exceptions import BadRequest from rdr_service.dao.base_dao import BaseDao from rdr_service.dao.hpo_dao import HPODao from rdr_service.dao.metrics_cache_dao import ( MetricsAgeCacheDao, MetricsCacheJobStatusDao, MetricsEnrollmentStatusCacheDao, ...
# Copyright 2013 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/LICENSE-2...
# 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...
import mock import random import libvirt import difflib import unittest import itertools import ipaddress from see.context.resources import network def compare(text1, text2): """Utility function for comparing text and returning differences.""" diff = difflib.ndiff(str(text1).splitlines(True), ...
########################################################################## # # Copyright (c) 2008-2013, Image Engine Design 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: # # * Redis...
# Copyright (C) 2013 Nippon Telegraph and Telephone 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 appli...
# Copyright 2015 CloudByte 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...
""" Various tests related to validation for automated signing. """ from nose.tools import eq_ from .helper import RegexTestCase from .js_helper import TestCase from validator.testcases import regex from validator.testcases.regex import maybe_tuple class TestSearchService(TestCase, RegexTestCase): """Tests that...
import pytest import numpy as np import tensorflow as tf from tfsnippet.utils import * class IntShapeTestCase(tf.test.TestCase): def test_int_shape(self): self.assertEqual(get_static_shape(tf.zeros([1, 2, 3])), (1, 2, 3)) self.assertEqual( get_static_shape(tf.placeholder(tf.float32, ...
from __future__ import print_function import os import click import json import logging import functools import sys import time import girder_client import paramiko from contextlib import contextmanager from cumulus.scripts.command import (cli, pass_proxy, get_aws_instance_info, ...
import importlib import os import subprocess import time import re import pprint import sys import traceback class FrameworkTest: ########################################################################################## # Class variables ##########################################################################...
""" =================================== Column Transformer with Mixed Types =================================== .. currentmodule:: sklearn This example illustrates how to apply different preprocessing and feature extraction pipelines to different subsets of features, using :class:`~compose.ColumnTransformer`. This is...
""" Copyright 2017-present Airbnb, 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, sof...
import gzip import http.server import threading import unittest import wfdb.io._url class TestNetFiles(unittest.TestCase): """ Test accessing remote files. """ def test_requests(self): """ Test reading a remote file using various APIs. This tests that we can create a file obj...
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
# 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 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # 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....
#!/usr/bin/env python # # ESP32 efuse table generation tool # # Converts efuse table to header file efuse_table.h. # # Copyright 2017-2018 Espressif Systems (Shanghai) PTE 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...
# Copyright (c) 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 writ...
#!/usr/bin/env python # encoding: utf-8 """ Copyright (c) 2010 The Echo Nest. All rights reserved. Created by Tyler Williams on 2010-04-25. Utility functions to support the Echo Nest web API interface. """ import urllib import urllib2 import httplib import config import logging import socket import re import time imp...
import matplotlib.pyplot as plt import sys import os import textwrap #from TamuzApp.models import * import gc lib_path = os.path.abspath(r'E:\Tamuz\Utils\RobotQAUtils') sys.path.append(lib_path) from Utils.RobotQAUtils.plateReader import * from Utils.RobotQAUtils.classes import * from Utils.DBUtil.FilesIO.saveFileToMo...
import json import math import socket import logging import asyncio import aiohttp from enum import Enum from random import uniform from nyuki.services import Service from nyuki.api import Response, resource log = logging.getLogger(__name__) class State(Enum): UNKNOWN = 'unknown' FOLLOWER = 'follower' ...
"""Elliptical geometrical entities. Contains * Ellipse * Circle """ from __future__ import division, print_function from sympy.core import S, pi, sympify from sympy.core.logic import fuzzy_bool from sympy.core.numbers import Rational, oo from sympy.core.compatibility import range from sympy.core.symbol import Dummy...
# coding=utf-8 # Copyright 2014 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 re from colle...
## # Copyright (c) 2013-2015 Apple 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 l...
# Copyright 2011-2013 James McCauley # # 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 ...
# 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 # d...
# -*- coding: utf-8 -*- import json import requests from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache from django.db import models from django.urls import reverse from django.utils.safestring import mark_safe from djforms.core.models import BINARY_CHOICES...
#!/usr/bin/python # # See https://github.com/MikeStitt/simple-locating/blob/master/license.txt for license. import math import cv2 import numpy as np import scipy as Sci import scipy.linalg pi = math.pi debug_found = '' leftmost = 0 rightmost = 0 az1 = 0. east1 = 0. south1 = 0. az2 = 0. east2 = 0. south2 = 0. # #...
from __future__ import division, print_function import numpy as np from scipy.signal import fftconvolve, convolve import itertools """ 08/31/17 Author: Rex McArthur Creates a class of n-dim chebyshev polynomials. Tracks leading term, coefficents, and inculdes basic operations (+,*,scaler multip, etc.) Assumes GRevLex ...
#! /usr/bin/env python3 ############### ###IMPORTS### ############### # LIBRARIES import datetime import multiprocessing import os import random import shutil import string import sys import tempfile import time from queue import Queue from threading import Thread # OTHER SCRIPTS import arguments as arguments impor...
# -*- coding: utf-8 -*- """ Production Configurations - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis for cache - Use sentry for error logging """ from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat fro...
#!/usr/bin/env python # -*- coding: Latin-1 -*- # pycrc test application. from optparse import OptionParser, Option, OptionValueError from copy import copy import os, sys import tempfile sys.path.append('..') sys.path.append('.') from pycrc.models import CrcModels from pycrc.algorithms import Crc class Options(obj...
# Copyright (c) 2017 Civic Knowledge. This file is licensed under the terms of the # MIT License, included in this distribution as LICENSE.txt """ """ from rowgenerators import Source from rowgenerators.source import Source from rowgenerators import SourceError class YamlMetatabSource(Source): """Turn a metatab-f...
"""Treadmill master low level API. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import os import kazoo import six from treadmill import appevents from treadmill import zknamespace as z from tre...
"""Tests for AVM Fritz!Box config flow.""" from unittest import mock from pyfritzhome import LoginError import pytest from requests.exceptions import HTTPError from homeassistant.components.fritzbox.const import DOMAIN from homeassistant.components.ssdp import ( ATTR_SSDP_LOCATION, ATTR_UPNP_FRIENDLY_NAME, ...
"""Support for DoorBird devices.""" from http import HTTPStatus import logging from aiohttp import web from doorbirdpy import DoorBird import requests import voluptuous as vol from homeassistant.components.http import HomeAssistantView from homeassistant.config_entries import ConfigEntry from homeassistant.const impo...
"""Pre-trained ImageNet networks.""" from typing import Callable, NamedTuple, Tuple, Optional import sys from typeguard import check_argument_types import numpy as np import tensorflow as tf import tensorflow.contrib.slim as tf_slim # pylint: disable=unused-import # Workaround of missing slim's import # see https://g...