gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # -*- coding: utf-8 -*- import time from .exceptions import IndexAlreadyExistsException, IndexMissingException from .utils import make_path class Indices(object): def __init__(self, conn): self.conn=conn #TODO: clearcache segments templates #Alias Management - START def ...
from image_registration.cross_correlation_shifts import cross_correlation_shifts from image_registration.register_images import register_images from image_registration.chi2_shifts import chi2_shift from image_registration.fft_tools import dftups,upsample_image,shift,smooth import numpy as np def upsample_ft_raw(buf1f...
#%matplotlib inline # All the imports from __future__ import print_function, division import matplotlib.pyplot as plt import os.path from Model import * from DTLZ import * def refresh_objectives(problem, population): for i, obj in enumerate(problem.objectives): scores = [point.objectives[i] for point in p...
from __future__ import absolute_import from ..sail.allegrographserver import AllegroGraphServer from ..repository.repository import Repository from ...miniclient import repository from ..query.query import QueryLanguage from ..vocabulary.rdf import RDF from ..vocabulary.rdfs import RDFS from ..vocabulary.owl import OW...
# Copyright 2010-2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
# Copyright 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...
# 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 django.test import TestCase from dateutil import relativedelta from dateutil.relativedelta import relativedelta from apps.common.models import TimeSlots from datetime import datetime from apps.utils.time import UTC_P0100 from psycopg2.extras import DateTimeTZRange from apps.common.util.util import generate_interva...
# coding: utf-8 from __future__ import absolute_import # This module contains abstractions for the input stream. You don't have to # looks further, there are no pretty code. # # We define two classes here. # # Mark(source, line, column) # It's just a record and its only use is producing nice error messages. # Parser...
# Copyright (c) 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/licenses/LICENSE-2.0 # # Unless r...
# -*- 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...
""" Semantic Interface (SEM-I) """ import re from pathlib import Path from operator import itemgetter import warnings from collections.abc import Sequence, Mapping from itertools import zip_longest from delphin.predicate import normalize as normalize_predicate from delphin import hierarchy from delphin.exceptions im...
from __future__ import absolute_import, division, print_function from ibeis_cnn import utils from ibeis_cnn import models from ibeis_cnn import net_strs from ibeis_cnn import batch_processing as batch from six.moves import cPickle as pickle from lasagne import layers import theano import time import numpy as np impor...
""" This example shows the focusing of an ideal lens in 1:1 configuration for an undulator source sources (see main program at the bottom) """ import numpy from srxraylib.waveoptics.wavefront2D import Wavefront2D from srxraylib.waveoptics.propagator2D import propagate_2D_fraunhofer from srxraylib.waveoptic...
## Automatically adapted for numpy Sep 19, 2005 by convertcode.py __all__ = ['iscomplexobj','isrealobj','imag','iscomplex', 'isreal','nan_to_num','real','real_if_close', 'typename','asfarray','mintypecode','asscalar', 'common_type', 'datetime_data'] import numpy.core.numeric as _nx fr...
from __future__ import division import numpy as np from numpy import sin, cos, pi, exp, sqrt, abs class SimpleQuadratic(object): def fun(self, x): return np.dot(x, x) def der(self, x): return 2. * x def hess(self, x): return 2. * np.eye(x.size) class AsymmetricQuadratic(object...
import abc import argparse import asyncio from asyncio.subprocess import DEVNULL, PIPE from collections import defaultdict import contextlib import enum import logging from pathlib import Path import sys import threading import time from typing import Any, Awaitable, Callable, Container, Dict, List, \ ...
from clang.cindex import * import vim import time import re import threading import os # Check if libclang is able to find the builtin include files. # # libclang sometimes fails to correctly locate its builtin include files. This # happens especially if libclang is not installed at a standard location. This # functio...
import unittest from cpuinfo import * import helpers class MockDataSource(object): bits = '32bit' cpu_count = 8 is_windows = False arch_string_raw = 'armv7l' uname_string_raw = '' can_cpuid = False @staticmethod def has_proc_cpuinfo(): return True @staticmethod def has_lscpu(): return True @static...
# # History: # # 03/11/2016: # - Fix issue where parenthesis in paths would cause a failure to load. Solves #52 # # 10/06/2014: # - Rewrite for version 2.0.0 # - Using subprocess instead of webbrowser. Seems to solve #19 # - Smaller, simplier sublime-settings file # # 05/15/2014: # - Current view o...
from typing import Any, Callable, Dict, Optional, Sequence from fastapi import params from pydantic.fields import Undefined def Path( # noqa: N802 default: Any, *, alias: Optional[str] = None, title: Optional[str] = None, description: Optional[str] = None, gt: Optional[float] = None, ge:...
""" Various utilities used throughout this project """ import ConfigParser import ast import base64 import os import novaclient from jinja2 import Environment from launch_configuration import LaunchConfig from autoscale_configuration import AutoscaleConfig from colors import bcolors, print_msg def config_fixup(parsed...
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tests of a network memoizer.""" import os import subprocess import shutil import sys import unittest sys.path.append(os.path....
# Copyright 2013 OpenStack Foundation. # All Rights Reserved. # 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/LI...
# -*- coding: utf-8 -*- # # 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 #...
__author__ = 'eric' import unittest class BasicTests(unittest.TestCase): def test_civick(self): from geoid import civick region = civick.Region(1) self.assertEqual('0k1', str(region)) tract = civick.Tract(6, 72, 34) self.assertEqual('2g061a000y', str(tract)) ...
from __future__ import absolute_import from __future__ import print_function import ujson from django.http import HttpResponse from mock import patch from typing import Any, Dict from zerver.lib.initial_password import initial_password from zerver.lib.sessions import get_session_dict_user from zerver.lib.test_classe...
"""Support for the Netatmo cameras.""" import logging from pyatmo import NoDevice import requests import voluptuous as vol from homeassistant.components.camera import ( PLATFORM_SCHEMA, Camera, SUPPORT_STREAM, CAMERA_SERVICE_SCHEMA, ) from homeassistant.const import CONF_VERIFY_SSL, STATE_ON, STATE_OF...
# Copyright 2015-2016 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Isaku Yamahata # 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/...
# -*- coding: utf-8 -*- from datetime import timedelta from django.utils import timezone import pytest from .utils import versioned_reverse as reverse from events.tests.utils import assert_event_data_is_equal from events.tests.test_event_post import create_with_post from .conftest import DATETIME from events.models i...
"""Definition of Interval objects. Used to filter/mask data in time. """ try: from bottleneck import nanmin, nanmax except ImportError: from numpy import nanmin, nanmax import numpy as np import pandas as pd class Interval(pd.DataFrame): """Class for defining intervals of interest across ROIs and Trial...
# Copyright 2014 Rustici 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 applicable law or agreed...
from contextlib import contextmanager from copy import copy # Hard-coded processor for easier use of CSRF protection. _builtin_context_processors = ('django.template.context_processors.csrf',) class ContextPopException(Exception): "pop() has been called more times than push()" pass class ContextDict(dict):...
from __future__ import division import os import sys import array import struct import io import math import numpy as np import colorsys import pydicom from pydicom.dataset import Dataset, FileDataset import pydicom.uid import skimage as ski import skimage.io import skimage.transform import skimage.draw import skimage....
import itertools import math import os import tempfile import shutil import shelve import time from collections import deque import threading import tqdm import pyomo.kernel as pmo import numpy def extract_variable_bounds(problem): return [(var, var.bounds) for var in problem.model.components( ...
'hotspotter.algos contains algorithm poltpori' from __future__ import division, print_function from hscom import __common__ (print, print_, print_on, print_off, rrr, profile, printDBG) = __common__.init(__name__, '[algos]', DEBUG=False) # Python from itertools import izip from os.path import join import os import sys ...
import sys, types from .lock import allocate_lock try: callable except NameError: # Python 3.1 from collections import Callable callable = lambda x: isinstance(x, Callable) try: basestring except NameError: # Python 3.x basestring = str class FFIError(Exception): pass class CDefErro...
import json import os from PyQt5 import QtGui from PyQt5 import QtCore from PyQt5 import QtWidgets from collections import defaultdict from sas.qtgui.Utilities.CategoryInstaller import CategoryInstaller from sasmodels.sasview_model import load_standard_models from .UI.CategoryManagerUI import Ui_CategoryManagerUI fr...
from sympy import (Lambda, Symbol, Function, Derivative, Subs, sqrt, log, exp, Rational, Float, sin, cos, acos, diff, I, re, im, E, expand, pi, O, Sum, S, polygamma, loggamma, expint, Tuple, Dummy, Eq, Expr, symbols, nfloat) from sympy.utilities.pytest import XFAIL, raises from sympy.abc import ...
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
from .. import Availability, Class, Constant, Define, Method, Parameter, Type gx_class = Class('TC', doc=""" The :class:`TC` object is used in gravitational modelling to create a terrain correction grid from a topography grid. This is accomplished wit...
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
"""Mixins for LocalSite-related views and forms.""" from __future__ import unicode_literals import logging import django from django.contrib.auth.models import User from django.db import models from django.utils import six from django.utils.decorators import method_decorator from django.utils.translation import uget...
"""Fairly basic set of tools for real-time data augmentation on image data. Can easily be extended to include new transformations, new preprocessing methods, etc... """ from __future__ import absolute_import from __future__ import print_function import numpy as np import re from scipy import linalg import scipy.ndimag...
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 import os import sys import unittest import datahog from datahog.const import util from datahog import error import mummy import psycopg2 sys.path.append(os.path.dirname(os.path.abspath(__file__))) import base from pgmock import * class NodeTests(base.TestCase): def...
from .. import initializations from ..engine import Layer from .. import backend as K import numpy as np class LeakyReLU(Layer): """Leaky version of a Rectified Linear Unit. It allows a small gradient when the unit is not active: `f(x) = alpha * x for x < 0`, `f(x) = x for x >= 0`. # Input shape...
# -*- coding: utf-8 -*- from django.contrib.sites.models import Site from django.urls import reverse from model_mommy import mommy from coop_cms.models import Alias from coop_cms.settings import get_article_class from coop_cms.tests import BaseTestCase class AliasTest(BaseTestCase): def test_redirect(self...
# Copyright (c) 2014 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 in...
# -*- coding:utf-8 -*- """ Created on Aug 25, 2011 @author: grant """ import sys, math, numpy from openGLUtils import Camera, OpenGlLight from PySide import QtCore, QtGui, QtOpenGL from OpenGL import GL, GLU from Joint import Joint import TriModel class GLWidget(QtOpenGL.QGLWidget): def __init__(self, parent=Non...
""" Moving Picture Experts Group (MPEG) video version 1 and 2 parser. Information: - http://www.mpucoder.com/DVD/ - http://dvd.sourceforge.net/dvdinfo/ - http://www.mit.jyu.fi/mweber/leffakone/software/parsempegts/ - http://homepage.mac.com/rnc/EditMpegHeaderIFO.html - http://standards.iso.org/ittf/PubliclyAvailableSt...
from .testutils import FullStackTests from webrecorder.models.usermanager import CLIUserManager from webrecorder.utils import today_str from webrecorder.admincontroller import * # ============================================================================ class TestAdminAPI(FullStackTests): @classmethod de...
# 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...
# -*- coding: utf-8 -*- ''' Manage entries in an LDAP database ================================== .. versionadded:: 2016.3.0 The ``states.ldap`` state module allows you to manage LDAP entries and their attributes. ''' from __future__ import absolute_import import copy import inspect import logging import salt.ext.s...
# PyVision License # # Copyright (c) 2006-2008 David S. Bolme # All rights reserved. # # 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, thi...
# 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...
""" Objects for dealing with Qiita analyses This module provides the implementation of the Analysis and Collection classes. Classes ------- - `Analysis` -- A Qiita Analysis class - `Collection` -- A Qiita Collection class for grouping multiple analyses """ # ----------------------------------------------------------...
# 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 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...
'''Determine accuracy on validation set YYYYMM of various hyperparameter setting for AVMs based on 3 models (linear, random forests, gradient boosting regression) INVOCATION python valavm.py {features_group}-{hps}-{locality}{-validation_month} \ [--test] [--renameoutput] [--makefile [{system} {thr...
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of headers messages to announce blocks. Setup: - Two nodes: - node0 is the node-und...
# # Copyright 2014 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...
# 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 2012 VMware, 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 ...
# Copyright 2020 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: utf-8 -*- import calendar from datetime import date from datetime import timedelta from DateRanger.utils import get_quarter from DateRanger.utils import get_monthrange from DateRanger.objects import DateFrame from DateRanger.exceptions import InvalidDateRange from DateRanger.excepti...
from __future__ import division import torch import math import random from PIL import Image, ImageOps, ImageEnhance try: import accimage except ImportError: accimage = None import numpy as np import numbers import types import collections import warnings from . import functional as F __all__ = ["Compose", "T...
# DB schema # Author: Evgeny Blokhin import os, sys import logging import datetime from collections import namedtuple import six from tilde.core.orm_tools import UniqueMixin, get_or_create, correct_topics from sqlalchemy import and_, or_, Index, UniqueConstraint, MetaData, String, UnicodeText, Table, Column, Boolea...
from pandac.PandaModules import * from pandac.PandaModules import ParticleSystem from pandac.PandaModules import BaseParticleFactory from pandac.PandaModules import PointParticleFactory from pandac.PandaModules import ZSpinParticleFactory #from pandac.PandaModules import OrientedParticleFactory from pandac.PandaModule...
#!/usr/bin/python from __future__ import print_function import os import shlex import signal import subprocess import sys import time from optparse import OptionParser from threading import Thread try: from Queue import Queue, Empty except ImportError: from queue import Queue, Empty # make python 3.x compatible with...
""" flickr.py Copyright 2004-2006 James Clarke <james@jamesclarke.info> Portions Copyright 2007-2008 Joshua Henderson <joshhendo@gmail.com> THIS SOFTWARE IS SUPPLIED WITHOUT WARRANTY OF ANY KIND, AND MAY BE COPIED, MODIFIED OR DISTRIBUTED IN ANY WAY, AS LONG AS THIS NOTICE AND ACKNOWLEDGEMENT OF AUTHORSHIP...
# 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 2021 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.0 # # Unless required by applicable law or agre...
# -*- coding: utf-8 -*- from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth import authenticate, login, logout from django.template import RequestContext from django.http import Http404,HttpResponseRedirect from django.co...
# 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...
#!/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 thumbor@googlegroups.com from unittest import TestCase import mock from thumbor.config impo...
""" TODO: Might be nice to store specific presets of RenderOptions, for specific final choices for rendering stimuli for a given experiment. FOR NOW, this is not going to be a mapped class... """ # Imports import os import sys import math as bnp from .. import utils as bvpu from ..options import config try: im...
"""HTML utilities suitable for global use.""" from __future__ import unicode_literals import re import sys import warnings from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force_text, force_str from django.utils.functional import allow_lazy from django.utils.http import...
#!/usr/bin/env python2.7 from __future__ import division import os import sys import math import subprocess import pprint; pp = pprint.pprint from PIL import Image import io import json import codecs import time import re # ====================================================================== class Database(object):...
__author__ = 'zhengwang' import threading import SocketServer import serial import cv2 import numpy as np import math # distance data measured by ultrasonic sensor sensor_data = " " class NeuralNetwork(object): def __init__(self): self.model = cv2.ANN_MLP() def create(self): layer_size = n...
#!/usr/bin/env python # NOTE: Documentation is intended to be processed by epydoc and contains # epydoc markup. ''' Introduction ============ The ``grizzled.file.includer`` module contains a class that can be used to process includes within a text file, returning a file-like object. It also contains some utility fun...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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...
# Copyright 2014 # The Cloudscaling Group, 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...
import itertools from collections import OrderedDict from ...error import GraphQLError from ...language import ast from ...language.printer import print_ast from ...pyutils.pair_set import PairSet from ...type.definition import (GraphQLInterfaceType, GraphQLList, GraphQLNonNull, GraphQL...
#!/usr/bin/env python from __future__ import unicode_literals from __future__ import print_function import os import re import sys import traceback import logging import threading import shutil import functools import humanize from time import time from codecs import open import click try: import setproctitle ex...
import logging logger = logging.getLogger(__name__) from django import forms from django.contrib.admin import widgets, options from django.core.exceptions import ValidationError from django.core.validators import validate_email from django.utils.translation import ugettext_lazy as _ from django.utils.translation ...
"""Define a V3 (new) SimpliSafe system.""" from __future__ import annotations from datetime import datetime, timedelta from enum import Enum from typing import TYPE_CHECKING, Any, Final, cast import voluptuous as vol from simplipy.const import LOGGER from simplipy.device import DeviceTypes from simplipy.device.camer...
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <anki@ichi2.net> # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html from __future__ import division import time import datetime import json import anki.js from anki.utils import fmtTimeSpan, ids2str from anki.lang import _, ngettext # Car...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license from __future__ import with_statement import sys,os,struct,socket,time from select import select from fcntl import ioctl...
from flask_restful import marshal, marshal_with, fields, reqparse from flask import abort, g from flask import Blueprint as FlaskBlueprint import datetime import logging import json from pebbles.models import db, Blueprint, Instance, InstanceLog, InstanceToken, User from pebbles.forms import InstanceForm, UserIPForm ...
# -*- coding: utf-8 -*- import httplib as http from flask import request from modularodm.exceptions import ValidationError, ValidationValueError from framework import forms, status from framework.auth import cas from framework.auth import User from framework.auth.core import get_user, generate_confirm_token, generat...
# # 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...
"""Support for SolarEdge-local Monitoring API.""" import logging from datetime import timedelta import statistics from copy import deepcopy from requests.exceptions import HTTPError, ConnectTimeout from solaredge_local import SolarEdge import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHE...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division import numpy as np import copy import inspect import types as python_types import warnings from .. import backend as K from .. import activations from .. import initializers from .. import regularizers from .. import const...
# 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 sys import ty...
# Copyright 2011 OpenStack LLC. # 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...
# Copyright 2015 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. """Provides an endpoint and web interface for associating alerts with bug.""" from __future__ import print_function from __future__ import division from __fu...
r""" ================ Error Middleware ================ .. versionadded:: 0.2.0 Middleware to handle errors in aiohttp applications. .. versionchanged:: 1.0.0 Previosly, ``error_middleware`` required ``default_handler`` to be passed on initialization. However in **1.0.0** version ``aiohttp-middlewares`` ships defau...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) ''' As of zookeeper 3.4.0, the `mntr` admin command is provided for easy parsing of zookeeper stats. This check first parses the `stat` admin command for a version number. If the zookeeper version supports `mntr`,...
# -*- coding: utf-8 -*- """ Base classes relevant to all Cauldron tools. """ from __future__ import absolute_import import six import sys import abc import time import weakref import contextlib import threading import logging from ..config import get_timeout from ..utils.callbacks import WeakMethod from ..utils.refer...