gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Lint as: python3 # pylint: disable=bad-indentation,line-too-long """DFIV Learner implementation.""" import datetime from typing import Dict, List import acme from acme.tf import savers as tf2_savers from acme.tf import utils as tf2_utils from acme.utils import counting from acme.utils import loggers import numpy as...
""" This module implements all the functions to read a video or a picture using ffmpeg. It is quite ugly, as there are many pitfalls to avoid """ from __future__ import division import subprocess as sp import re import warnings import logging logging.captureWarnings(True) import numpy as np from moviepy.config impo...
import warnings from contextlib import contextmanager from copy import copy from django.utils.deprecation import RemovedInDjango20Warning # Hard-coded processor for easier use of CSRF protection. _builtin_context_processors = ('django.template.context_processors.csrf',) _current_app_undefined = object() class Cont...
# -*- coding: utf-8 -*- # Copyright (c) 2014, OneLogin, Inc. # All rights reserved. import json from os.path import dirname, join, exists import unittest from xml.dom.minidom import parseString from onelogin.saml2 import compat from onelogin.saml2.logout_request import OneLogin_Saml2_Logout_Request from onelogin.sam...
"""Support for Queensland Bushfire Alert Feeds.""" from datetime import timedelta import logging from typing import Optional from georss_qld_bushfire_alert_client import QldBushfireAlertFeedManager import voluptuous as vol from homeassistant.components.geo_location import ( PLATFORM_SCHEMA, GeolocationEvent) from...
# 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) 2013, Thomas P. Robitaille # 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, # this list of conditions a...
import weakref from fontTools.ttLib import TTFont from fontTools.feaLib.builder import addOpenTypeFeaturesFromString from defcon.objects.base import BaseObject try: import compositor from defcon.objects.uniData import UnicodeData from defcon.objects.features import Features except ImportError: pass # ...
test_sub_dir = "test_data/1019436/session_1" def test_fd_jenkinson(): import os import pickle import pkg_resources as p from qap.temporal_qc import fd_jenkinson coord_xfm = p.resource_filename("qap", os.path.join(test_sub_dir, \ "rest_1", \ ...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services: Specifications handling utility methods :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.5.8 :status: Beta .. Copyright 2014 isandlaTech Licensed under the Apache License,...
# 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 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
""" Search for software built from source to include in the blueprint as a tarball. """ import errno import glob import hashlib import logging import os import os.path import re import shutil import stat import subprocess import tarfile from blueprint import context_managers from blueprint import util def _source(b...
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env 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...
"""Test Alexa config.""" import contextlib from homeassistant.components.cloud import ALEXA_SCHEMA, alexa_config from homeassistant.helpers.entity_registry import EVENT_ENTITY_REGISTRY_UPDATED from homeassistant.util.dt import utcnow from tests.async_mock import AsyncMock, Mock, patch from tests.common import async_f...
import json import pytest from CiscoEmailSecurity import Client def get_fetch_data(): with open('./test_data.json', 'r') as f: return json.loads(f.read()) test_data = get_fetch_data() def test_date_to_cisco_date(): from CiscoEmailSecurity import date_to_cisco_date res = date_to_cisco_date('201...
from __future__ import division import abc import os.path as path import numpy as np from menpo.image import ShapeImage from menpo.io.base import (Importer, find_alternative_files, map_filepath_to_importer) from scipy.spatial import Delaunay from menpo.transform.affine import Scale import re ...
# BenchExec is a framework for reliable benchmarking. # This file is part of BenchExec. # # Copyright (C) 2007-2015 Dirk Beyer # 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 Lic...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implements the SSH v2 key agent protocol. This protocol is documented in the SSH source code, in the file U{PROTOCOL.agent<http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.agent>}. Maintainer: Paul Swartz """ import struct fr...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import os import rdflib import logging try: from functools import lru_cache except ImportError: from functools32 import lru_cache logger = logging.getLogger('hierarchy_manager') class HierarchyManager(objec...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python import os, logging, json from exceptions import KeyError import tornado.httpclient import tornado.httpserver import tornado.ioloop import tornado.web from tornado.escape import json_encode, json_decode from tornado.options import define, options from sphericalmercator import SphericalMercator im...
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.db.models import Q from djblets.webapi.errors import DOES_NOT_EXIST, WebAPIError from djblets.webapi.fields import (BooleanFieldType, ChoiceFieldType, DateTimeFieldTy...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ vispy backend for the IPython notebook (vnc approach). We aim to have: * ipynb_static - export visualization to a static notebook * ipynb_vnc - vnc-approach: render in Py...
import os import shutil from ..instrumenters import InstrumentPlugin from ...metrics import formatting from ..collectl import subsystems from ..collectl import cli from ..collectl import processes from galaxy import util from galaxy.util import directory_hash import logging log = logging.getLogger( __name__ ) DEFAU...
""" Copyright (c) 2008-2015, Jesus Cea Avion <jcea@jcea.es> 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, this list of...
from collections import OrderedDict import mock from nose.tools import * from website.notifications.events.base import Event, register, event_registry from website.notifications.events.files import ( FileAdded, FileRemoved, FolderCreated, FileUpdated, AddonFileCopied, AddonFileMoved, AddonFileRenamed, ) from ...
#!/usr/bin/env python #------------------------------------------------------------------------------- # scripts/readelf.py # # A clone of 'readelf' in Python, based on the pyelftools library # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #------------------------------------------------------...
#!/usr/bin/env python from __future__ import print_function from builtins import map, range, zip import errno from itertools import product from os import getcwd, makedirs, path import random import cv2 from keras import backend, layers, models from keras.applications import vgg16 import matplotlib.pyplot as plt im...
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
# # This file is part of Gruvi. Gruvi is free software available under the # terms of the MIT license. See the file "LICENSE" that was provided # together with this source file for the licensing terms. # # Copyright (c) 2012-2017 the Gruvi authors. See the file "AUTHORS" for a # complete list. """ The :mod:`gruvi.dbus...
# coding=utf-8 from __future__ import absolute_import, division, print_function, \ unicode_literals import json import re import socket import unicodedata from base64 import standard_b64decode, urlsafe_b64decode from collections import OrderedDict from decimal import Decimal as DecimalType from typing import Any, ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE from werkzeug.wrappers import Response import frappe import frappe.utils import frappe.sessions from frappe.utils import cint from frappe import _, is_whitelisted from frappe.utils.response import build_response from frap...
#!/usr/bin/env python3 # Copyright (c) 2014-2021 Daniel Kraft # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test the merge-mining RPC interface: # getauxblock, createauxblock, submitauxblock from test_framework.test_framework...
from __future__ import division import numpy as np import matplotlib.pyplot as plt from scipy.ndimage import grey_dilation from skimage import img_as_float from skimage import color from skimage import exposure from skimage.util.dtype import dtype_limits __all__ = ['imshow_all', 'imshow_with_histogram', 'mean_filt...
# 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...
import pytest import io from CommonServerPython import * import OpsGenieV3 from unittest import mock def util_load_json(path): with io.open(path, mode='r', encoding='utf-8') as f: return json.loads(f.read()) def test_create_alert_wrong_responders(): """ Given: - An app client object ...
# Copyright 2014 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 ...
# 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...
from __future__ import print_function """Contains useful and reusable code for EPP scripts. Classes, methods and exceptions. Johannes Alneberg, Science for Life Laboratory, Stockholm, Sweden. Copyright (C) 2013 Johannes Alneberg """ import logging import sys import os import pkg_resources from pkg_resources import D...
#!/usr/bin/python # # Copyright 2014 Huawei Technologies Co. Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# 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...
""" DocBlockr v2.12.1 by Nick Fisher, and all the great people listed in CONTRIBUTORS.md https://github.com/spadgos/sublime-jsdocs *** Please read CONTIBUTING.md before sending pull requests. Thanks! *** """ import sublime import sublime_plugin import re import datetime import time import imp from functools import re...
r""" Arithmatex. pymdownx.arithmatex Extension that preserves the following for MathJax use: $Equation$, \(Equation\) $$ Display Equations $$ \[ Display Equations \] \begin{align} Display Equations \end{align} and $Inline MathJax Equations$ Inline equations are converted to the following form for HTML outp...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # Copyright 2011 - 2012, 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 # # ...
""" Tools for API access. Currently, only Bitfinex supported (includes data from Bitstamp). Based on sample code by Raphael Nicolle (https://community.bitfinex.com/showwiki.php?title=Sample+API+Code). """ from decimal import Decimal, getcontext getcontext().prec = 8 import requests import json import simplejson import...
# bootstrapping setuptools import ez_setup ez_setup.use_setuptools() import os import sys import textwrap from distutils.errors import * from distutils.command.clean import clean as _clean from distutils.cmd import Command from setuptools import setup from distutils import log from distutils.core import setup class...
import json import subprocess from pathlib import Path import pytest from sanic_routing import __version__ as __routing_version__ from sanic import __version__ def capture(command): proc = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=Path(__fil...
# 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...
""" The :mod:`sklearn.model_selection._validation` module includes classes and functions to validate the model. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org>, # Olivier Grisel <olivier.grisel@ensta.org> # License: BSD 3 clause from __...
#!/usr/bin/env python # # Copyright 2007 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...
# Copyright (c) 2014 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 applica...
""" Stores customer, organization, and order information. """ from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext, ugettext_lazy as _ from l10n.models import Country from satchmo_store.contact import CUSTOMER_ID import datetime import logging log = log...
__author__ = 'Michael Isik' from pybrain.structure.networks.network import Network from pybrain.structure.modules.lstm import LSTMLayer from pybrain.structure.modules.linearlayer import LinearLayer from pybrain.structure.connections.full import FullConnection from pybrain.structure.modules.module ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Testing utilities provided by ``flocker.volume``. """ import errno import os import uuid from unittest import SkipTest from characteristic import attributes from twisted.python.filepath import FilePath from twisted.internet.task import Clock from twis...
import os, sys, codecs, shutil, filecmp, subprocess # the template_dir is the path where this file lives on disk template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) def ensure_dev_path(debug=True): rc = subprocess.call(["xcode-select", "-print-path"], stdout=open(os.devnull, 'w'), s...
""" # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Nicira Networks, 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....
from stripe.test.helper import ( StripeApiTestCase, MyUpdateable ) class UpdateableAPIResourceTests(StripeApiTestCase): def setUp(self): super(UpdateableAPIResourceTests, self).setUp() self.mock_response({ 'thats': 'it' }) self.obj = MyUpdateable.construct_from({...
from dal_5 import DAL5 ################################################################################ class DAL6: # Disk Abstraction Layer def __init__(self, blocks, size): self.__disk = DAL5(blocks, size) # Get Context Object def new_context(self): return Context(self.__di...
# pylint: disable=missing-docstring import mock from django.contrib.auth.models import AnonymousUser from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.db import DEFAULT_DB_ALIAS, connections from django.test.utils import CaptureQueriesContext from guar...
# -*- coding: utf-8 -*- from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseGone from django.shortcuts import redirect from django.urls import reverse from django.utils.translation import gettext as _ from django.views....
# # 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 # distributed under...
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
""" Copyright 2016 Pavlos Vougiouklis 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, soft...
## # \namespace cross3d.studiomax.studiomaxsceneobject # # \remarks The StudiomaxSceneObject class provides the implementation of the AbstractSceneObject class as it applies # to 3d Studio Max scenes # # \author eric # \author Blur Studio # \date 03/15/10 # from Py3dsMax import mxs from cross3d import UserProps ...
""" This file is part of SleekXMPP. SleekXMPP 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 of the License, or (at your option) any later version. SleekXMPP is distribu...
# 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 numpy as np import pandas as pd import cPickle as pickle import keras from keras import optimizers from keras import backend as K from keras import regularizers from keras.models import Sequential from keras.layers import LSTM, Embedding, TimeDistributed, Dense from keras.layers import RepeatVector, Merge, Acti...
"""Closable and thread-safe queues.""" __all__ = [ 'Closed', 'Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue', 'ForwardingQueue', ] import collections import heapq import time import threading from queue import Empty from queue import Full class Closed(Exception): """Exception ...
from __future__ import absolute_import, division, unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from modelcluster.fields import ParentalKey from modelcluster.models import ClusterableModel from wagtail.wagtailadmin.edit_handlers import ( FieldPanel, ...
# # salt api wrapper for horizon dashboard # # # import salt import salt.config from salt import runner import salt.gdc.groups # from openstack_dashboard.settings import SALT_MASTER_CONFIG # # Determine package management system type # from openstack_dashboard.settings import OS_PACKAGE_SPEC # # opts = salt.config.m...
"""test_poisson.py [options] Solves the Heterogeneous Poisson equation on a unit cube. A full script for testing generation and tools provided by proteus. """ import numpy as np import sys from proteus import Comm, Profiling, NumericalSolution, TransportCoefficients, default_so, default_s from proteus.FemTools impor...
import logging import pymongo from collections import OrderedDict from datetime import datetime, timedelta from facepy.exceptions import FacepyError from pyusps import address_information from pygeocode import geocoder from ubernear.util import mongo from ubernear.util import ( utc_from_iso8601, address as ad...
import django from django.contrib.contenttypes.fields import GenericRel, GenericRelation from django.contrib.contenttypes.models import ContentType from django.db import DEFAULT_DB_ALIAS from django.db.models.query_utils import Q from django.utils.functional import lazy from django.utils.text import capfirst from flue...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM # # 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...
""" Settings and configuration for Django. Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global settings file for a list of all possible variables. """ import os import re import time # Needed for Windows import...
# encoding: utf-8 """ Test suite for pptx.parts.slide module """ from __future__ import absolute_import import pytest from pptx.chart.data import ChartData from pptx.enum.base import EnumValue from pptx.opc.constants import CONTENT_TYPE as CT, RELATIONSHIP_TYPE as RT from pptx.opc.packuri import PackURI from pptx.o...
import inspect import functools import mongoengine as me from marshmallow_mongoengine import fields as ma_fields from marshmallow_mongoengine.conversion import params from marshmallow_mongoengine.exceptions import ModelConversionError class MetaFieldBuilder(object): """ Convert a given Mongoengine Field to ...
import tensorflow as tf import numpy as np import os import sys import random import subprocess from redis import Redis import time sys.path.append(os.path.realpath("..")) import helpers.utils as hlp from models.feed_forward import FFDiscrete class A3CDiscreteTrainer(FFDiscrete): def __init__(self, sess, args):...
# 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...
# 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...
# Copyright (c) 2017, John Skinner import database.entity import enum class JobState(enum.Enum): UNSTARTED = 0 RUNNING = 1 DONE = 2 class TaskType(enum.Enum): """ These are the 8 kinds of tasks in this system. They are things that are done asynchronously, and take significant time. """ ...
# coding: utf-8 """ Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W...
# -*- coding: utf-8 -*- # pylint: disable=W0102 from datetime import datetime, date import nose import numpy as np import re import itertools from pandas import (Index, MultiIndex, DataFrame, DatetimeIndex, Series, Categorical) from pandas.compat import OrderedDict, lrange from pandas.sparse.arra...
# Copyright 2014 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...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function from tornado import netutil from tornado.escape import json_decode, json_encode, utf8, _unicode, recursive_unicode, native_str from tornado import gen from tornado.http1connection import HTTP1Connection from tornado.httpserver impo...
"""Shelly entity helper.""" from __future__ import annotations import asyncio from collections.abc import Callable from dataclasses import dataclass import logging from typing import Any, Final, cast from aioshelly.block_device import Block import async_timeout from homeassistant.components.sensor import ATTR_STATE_...
# 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...
""" Test lldb-vscode setBreakpoints request """ import unittest2 import vscode from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil import lldbvscode_testcase import os import shutil import subprocess import tempfile import threading import time def spawn...
# Copyright 2016-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
"""current schema Revision ID: e3a246e0dc1 Revises: Create Date: 2015-08-18 16:35:00.883495 """ # revision identifiers, used by Alembic. revision = 'e3a246e0dc1' down_revision = None branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sqlalchemy import func from sqlalchemy.eng...
# -*- coding: utf-8 -*- # Copyright 2018 Microsoft 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 applic...
""" webpack_manifest.py - https://github.com/markfinger/python-webpack-manifest MIT License Copyright (c) 2015-present, Mark Finger 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 restri...
# The Nexus software is licensed under the BSD 2-Clause license. # # You should have recieved a copy of this license with the software. # If you did not, you can find one at the following link. # # http://opensource.org/licenses/bsd-license.php import math, random from reqs.twisted.internet import reactor from core.p...
#!/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 # Copyright 2016 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/LICEN...
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import re import sys import datetime from django.analysis.tracer import mark_sql_call, is_analysis_running, is_analysis_paused, taint, in_view from django.db import utils from django.db.backends import * from djan...
# Copyright 2016 - Nokia Networks. # Copyright 2016 - Brocade Communications Systems, Inc. # Copyright 2018 - Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at #...
########################################################################### # # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...