gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Skeleton example of a Ginga global plugin called 'MyGlobalPlugin' To enable it, copy it to your $HOME/.ginga/plugins folder (create it first if it does not already exist), then run ginga with the command: $ ginga --modules=MyLocalPlugin From the "Operations" menu you should be able to select Custom->MyGlobal...
"""Support for Verisure devices.""" from datetime import timedelta from jsonpath import jsonpath import verisure import voluptuous as vol from homeassistant.const import ( CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP, HTTP_SERVICE_UNAVAILABLE, ) from homeassistant.hel...
from functools import partial import json import logging import sys import click import fiona from fiona.transform import transform_geom from fiona.fio.cli import cli, obj_gen def make_ld_context(context_items): """Returns a JSON-LD Context object. See http://json-ld.org/spec/latest/json-ld.""" ctx = {...
from __future__ import print_function import argparse from bs4 import BeautifulSoup import exifread import facebook from flask import Flask, request from ghostblog import Ghost, GhostError import json import logging import requests import sys try: # Python 3 from io import BytesIO from urllib.parse import urle...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines classes to generate point defect structures """ import logging from abc import ABCMeta, abstractmethod from monty.json import MSONable from pymatgen.core import PeriodicSite from pyma...
import unittest import six from w3lib.encoding import resolve_encoding from scrapy.http import (Request, Response, TextResponse, HtmlResponse, XmlResponse, Headers) from scrapy.selector import Selector from scrapy.utils.python import to_native_str class BaseResponseTest(unittest.TestCase): ...
""" Paver-enable template Copyright (c) 2009, Damien Lebrun All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list...
from util import * from util import raiseNotDefined import time, os import traceback try: import boinc _BOINC_ENABLED = True except: _BOINC_ENABLED = False ####################### # Parts worth reading # ####################### class Agent: """ An agent must define a getAction method, but may also define t...
import unittest import numpy import pytest import six import chainer from chainer import initializers from chainer import testing from chainer import utils import chainerx # Utilities for contiguousness tests. # # These tests checks incoming array contiguousness. # As it's not possible to assume contiguousness of i...
import numpy as np from collections import namedtuple from numba import cuda from numba.cuda.testing import unittest, CUDATestCase class TestCudaArrayArg(CUDATestCase): def test_array_ary(self): @cuda.jit('double(double[:],int64)', device=True, inline=True) def device_function(a, c): ...
from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model #from django.contrib import messages #from django.contrib.contenttypes.models import ContentType # <<<<<<< HEAD # from .models import Interview, Excerpt, get_concept_list, ConceptExcerpt, Top...
""" mbed CMSIS-DAP debugger Copyright (c) 2015-2017 ARM Limited 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 ...
"""Code to help with HTTP requests, responses, and events from GitHub's developer API. This code has been constructed to perform no I/O of its own. This allows you to use any HTTP library you prefer while not having to implement common details when working with GitHub's API (e.g. validating webhook events or specifyin...
# 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...
# Copyright 2015 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
import json import time import traceback import uuid import flask # import smqtk.algorithms from smqtk.algorithms import ( get_classifier_impls, get_nn_index_impls, get_relevancy_index_impls, SupervisedClassifier, ) from smqtk.iqr import ( iqr_controller, iqr_session, ) from smqtk.representati...
# Copyright 2012 Michael Still and Canonical 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 a...
# -*- coding: utf-8 -*- def post_auction_auction(self): self.app.authorization = ('Basic', ('auction', '')) response = self.app.post_json('/auctions/{}/auction'.format(self.auction_id), {'data': {}}, status=403) self.assertEqual(response.status, '403 Forbidden') self.assertEqual(response.content_type, ...
# -*- coding: utf-8 -*- import json from typing import Optional, Iterable, List, Union, Dict from mdxpy import MdxBuilder, MdxHierarchySet, Member from TM1py.Objects.Axis import ViewAxisSelection, ViewTitleSelection from TM1py.Objects.Subset import Subset, AnonymousSubset from TM1py.Objects.View import View from TM1...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainWindow.ui' # # Created: Tue May 28 11:30:41 2013 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
from itertools import product import pytest from boxsdk.object.base_object import BaseObject from boxsdk.object.file import File from boxsdk.object.folder import Folder from boxsdk.object.group import Group from boxsdk.object.user import User from boxsdk.object.web_link import WebLink from boxsdk.util.translator impo...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = Ser...
import os import gettext as gettext_module from django import http from django.conf import settings from django.utils import importlib from django.utils.translation import check_for_language, activate, to_locale, get_language from django.utils.text import javascript_quote from django.utils.encoding import smart_unicod...
# -*- coding: utf-8 -*- import os import sys sys.path.append(os.getenv('HOME') + '/bin/python/libs') # just in case notebook was not launched with the option #%pylab inline import pylab as plt import numpy as np from scipy import sparse from matplotlib.mlab import griddata from matplotlib.ticker import MaxNLocator f...
import pytest from .common import * # NOQA project = {} project_detail = {"p_client": None, "namespace": None, "cluster": None, "project": None} global_client = {"client": None, "cluster_count": False} answer_105version = { "values": { "defaultImage": "true", "externalDatabase.dat...
""" Fire module ffire.core.fire ~~~~~~~~~~~~~~~ Some names say everything. """ import requests import validators from requests import ConnectionError from requests import Request, Session from validators import ValidationFailure from ffire.constants import EVENT_INDEX, PAYLOAD_INDEX, TIME_INTERVALS from ffire.cons...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Manga provides a simpler way for working with a MongoDB database. Copyright (c) 2013, Wladston Viana. """ __author__ = 'Wladston Viana' __version__ = '0.1.13' __license__ = 'MIT' # Python. from re import compile from datetime import datetime, timedelta, tzinfo # Pymo...
# Copyright 2015, 2018 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 require...
# 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...
"""VideoCapture.py by Markus Gritsch <gritsch@iue.tuwien.ac.at> """ import vidcap from PIL import Image, ImageFont, ImageDraw import time, string default_textpos = 'bl' # t=top, b=bottom; l=left, c=center, r=right textcolor = 0xffffff shadowcolor = 0x000000 def now(): """Returns a string containing the curre...
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for workspace stages.""" from __future__ import print_function import os import shutil import mock from chromite....
import matplotlib.pyplot as plt # import matplotlib import numpy as np from scipy.stats import gaussian_kde import sys import re import os import george from george import kernels import celerite from celerite import terms sys.path.append('/home/joao/Work/OPEN') from OPEN.classes import params as params_paper # from...
# -*- coding: utf-8 -*- # @Author: aaronpmishkin # @Date: 2017-07-11 11:20:08 # @Last Modified by: aaronpmishkin # @Last Modified time: 2017-08-09 21:41:31 import numpy as np import json def parse_valuechart(value_chart_json): if type(value_chart_json) == str: value_chart = json.loads(value_chart_jso...
# -*- coding: utf-8 -*- # TODO: Add test for ObjectDelegate """Test CLR delegate support.""" import Python.Test as Test import System import pytest from Python.Test import DelegateTest, StringDelegate from ._compat import DictProxyType from .utils import HelloClass, hello_func, MultipleHandler def test_delegate_st...
import unittest from steam import vdf class SyntaxTestCase(unittest.TestCase): # Deserialization UNQUOTED_VDF = """ node { key value } """ QUOTED_VDF = """ "node" { "key" "value" } """ MACRO_UNQUOTED_VDF = """ node { key value [$MACRO] ...
""" This module contains all logic necessary to decipher the signature. YouTube's strategy to restrict downloading videos is to send a ciphered version of the signature to the client, along with the decryption algorithm obfuscated in JavaScript. For the clients to play the videos, JavaScript must take the ciphered ver...
#! python3 """ from: https://adventofcode.com/2019/day/5 --- Part Two --- The air conditioner comes online! Its cold air feels good for a while, but then the TEST alarms start to go off. Since the air conditioner can't vent its heat anywhere but back into the spacecraft, it's actually making the air inside the ship wa...
"""Graphical element of an application.""" from __future__ import division from copy import copy from pygame import Rect, SRCALPHA from thorpy.painting.fusionner import _Fusionner from thorpy.miscgui.title import Title from thorpy.elements.ghost import Ghost from thorpy.miscgui.state import State from thorpy.miscgu...
# 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 functools imp...
#!/usr/bin/env python2.7 ''' Copyright 2018 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/licenses/LICENSE-2.0 Unless required by applicable law or agreed t...
# TODO: SimValue being able to compare two symbolics for is_solution import logging l = logging.getLogger("angr.state_plugins.inspect") event_types = { 'mem_read', 'mem_write', 'address_concretization', 'reg_read', 'reg_write', 'tmp_read', 'tmp_write', 'expr', 'statement', 'ins...
# Copyright 2020 Google 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,...
#!/usr/bin/env python3 import logging import os, os.path import time import socket import requests import shutil import random LOGGER = logging.getLogger(__name__) APP_ID = os.getenv('MARATHON_APP_ID') MESOS_TASK_ID = os.getenv('MESOS_TASK_ID') MARATHON_URI = os.environ.get('MARATHON_URI', 'http://marathon.mesos:8080'...
import os import pip import sys import json from distutils.version import LooseVersion from django.core.management.base import NoArgsCommand from django_extensions.management.color import color_style from optparse import make_option from pip.req import parse_requirements try: from urllib.parse import urlparse ...
#!/usr/bin/env python # vim:fileencoding=utf-8 from urllib.request import Request, urlopen from urllib.error import HTTPError, URLError from acme_lite.error import ACMEError from acme_lite.utils import linkurl from cryptography import x509 from cryptography.hazmat.primitives import serialization from cryptography.hazm...
# Copyright 2018 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
# See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for # high-level documentation on how this system works. import atexit import copy import logging import os import random import signal import sys import time import traceback from collections import deque from dataclasses import asdict from typ...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
from cloudify import ctx from cloudify.exceptions import NonRecoverableError from cloudify.state import ctx_parameters as inputs import subprocess import os import re import sys import time import threading import platform from StringIO import StringIO from cloudify_rest_client import CloudifyClient from cloudify impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import re from libs.mock import * from runner.sensei import Sensei from runner.writeln_decorator import WritelnDecorator from runner.mockable_test_result import MockableTestResult class AboutParrots: pass class AboutLumberjacks: pass class AboutT...
"""Pass low-level move commands to motors with mecanum wheels.""" from math import sin, cos, pi, fabs, hypot, atan2, degrees from time import sleep import bot.lib.lib as lib import bot.driver.driver as driver from bot.hardware.dmcc_motor import DMCCMotorSet class MecDriver(driver.Driver): """Subclass of Driver...
# -*- coding: utf-8 -*- from south.v2 import DataMigration try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) user_model_...
"""SCons.Platform SCons platform selection. This looks for modules that define a callable object that can modify a construction environment as appropriate for a given platform. Note that we take a more simplistic view of "platform" than Python does. We're looking for a single string that determines a set of tool-ind...
import os from copy import copy import pytest from voidpp_tools.mocks.file_system import FileSystem from voidpp_tools.compat import FileNotFoundError, FileExistsError, UnsupportedOperation init_data = dict( filename1 = u"content of filename 1", dir1 = dict( filename1 = u"content of filename 2 in dir ...
""" trees v0.2 procedurally generated foliage (implicitly happy) agrippa kellum : june 2013 """ __all__ = ['Branch', 'Seed'] import numpy as np import copy np.random.seed(7) seglength = 1 C = 600 k = 0.005 thresholdE = 10e-3 memoryrate = 0.001 class Branch(object): def __init__(self, inc, ori, pos, parent): ...
# -*- coding: utf-8; -*- # # Licensed to CRATE Technology GmbH ("Crate") under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this file to you under the Apache License, Version 2.0 (the "License"...
# Copyright ClusterHQ Limited. See LICENSE file for details. """ Tests that verify that Docker behaviour is unchanged when running through Powerstrip. Run these tests as so. Ensure Docker is running on /var/run/docker.sock. $ TEST_PASSTHRU=1 trial powerstrip.test.test_passthru """ import os from twisted.internet im...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# -*- coding: utf-8 -*- from __future__ import unicode_literals colors = { "red": { "lighten-5": "#ffebee", "lighten-4": "#ffcdd2", "lighten-3": "#ef9a9a", "lighten-2": "#e57373", "lighten-1": "#ef5350", "base": "#f44336", "darken-1": "#e53935", "dark...
""" Module responsible for translating feature expression data into GA4GH native objects. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import ga4gh.server.datamodel as datamodel import ga4gh.server.exceptions as exceptions import ga4gh.server.sqlite_...
import json import sqlite3 import uuid from logbook import Logger from maildump.util import decode_header, split_addresses from maildump.web_realtime import broadcast log = Logger(__name__) _conn = None def connect(db=None): global _conn db = db or ':memory:' log.info('Using database {0}'.format(db)) ...
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
"""Search tables for formula using the IDF method""" import ast import math from itertools import chain from apiv2.models import Formula, FormulaIndex from apiv2.search.fsearch import formula_features_extractor as ffe, \ formula_extractor as fe def search_formula(latex_str): """ Performs inverted index s...
import numpy as np from scipy import special # some variables sq2 = np.sqrt(2) eps = np.finfo(np.float32).eps l2p = np.log(2) + np.log(np.pi) def joint_min(mu, var, with_derivatives=False, **kwargs): """ Computes the probability of every given point to be the minimum based on the EPMGP[1] algorithm. ...
import logging from io import IOBase from copy import copy from .. errors import * from .. import lekvar from .lexer import Lexer, Tokens from . import pragma # # Tools # def parseFile(source:IOBase, logger=logging.getLogger()): with lekvar.State.ioSource(source): try: module = Parser(Lexer(...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Amplitude calibration tool for USRP/UBX # Author: Dave Aragon # Written: Mon Sep 5 2016 # Last Edited: Fri Sep 9 2016 ################################################## if __na...
import fileinput import requests import json import base64 import random import datetime import re import time import hashlib from Phone import * import uuid import codecs # Globle Var file1 = open('route.data') routes = file1.readlines() file1.close() file2 = codecs.open('tp.data', 'r', 'utf-8') tps = file2.readline...
import logging from . import astnodes as ast from .scope import SemanticError class TypeChecker: """ Type checker """ logger = logging.getLogger("c3check") def __init__(self, diag, context): self.diag = diag self.context = context def check(self): """ Check everything """ ...
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo 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 ...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from collections import defaultdict from datetime import datetime from itertools import chain import date...
from __future__ import absolute_import, division, unicode_literals from six import text_type from ..constants import scopingElements, tableInsertModeElements, namespaces # The scope markers are inserted when entering object elements, # marquees, table cells, and table captions, and are used to prevent formatting # fr...
# Copyright (c) 2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
# Rest Server from flask import Flask, jsonify, abort, request # Eureka client from eureka.client import EurekaClient # Background tasks import threading import atexit import logging import socket import netifaces as ni import sys import os import time from sklearn.feature_extraction.text import TfidfVectorizer from s...
# 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...
"""Functions for extrinsic calibration of cameras. .. versionadded:: 0.9 """ from klampt import * from klampt.math import vectorops,so3,se3 from klampt.io import resource from klampt.model.trajectory import RobotTrajectory import math from klampt.control.robotinterface import RobotInterfaceBase from klampt.model impo...
import sys from numpy.testing import * import numpy.core.umath as ncu import numpy as np class FailingWrap(object): def __array__(self): return np.zeros(1) def __array_wrap__(self, arr, context): raise RuntimeError class TestDivision(TestCase): def test_division_int(self): # int ...
from flask import Flask, render_template, request, url_for, redirect from flask.ext.security import SQLAlchemyUserDatastore, Security, \ login_required, current_user, logout_user from flask.ext.security.utils import encrypt_password, verify_password from flask.ext.restless import APIManager, ProcessingException from ...
import unittest from openid import consumer from openid import message from openid.test import support class DummyEndpoint(object): _ns = None local_id = None server_url = None _is_op_identifier = False def ns(self): return self._ns def identity(self): return self.local_id ...
import ast import json import logging from urllib.parse import urlencode from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import FileResponse, JsonResponse from django.shortcuts import redirect, render from core import tasks, xml2kvp from core.mod...
from pymongo import MongoClient import multiprocessing import threading import datetime import time cache = MongoClient(host='10.8.8.111', port=27017, connect=False)['cache25'] db30 = MongoClient(host='10.8.8.111', port=27017, connect=False)['onionsBackupOnline'] events = db30['events'] userAttr = cache['userAttr'] d...
# -*- coding: utf-8 -*- # Copyright 2019 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 ...
"""Mixin for _send_to_jira(). This Mixin should now only be accessed via the send_to_bugtracker() Mixin rather than directly by callers in our codebase. Any changes to this Mixin's interface need to be in sync with the interface of bugtracker. """ from __future__ import absolute_import import json import logging impo...
""" Collection of utilities to manipulate structured arrays. Most of these functions were initially implemented by John Hunter for matplotlib. They have been rewritten and extended for convenience. """ import itertools from itertools import chain as iterchain, repeat as iterrepeat, izip as iterizip import numpy as...
# Notifry - Google App Engine backend # # Copyright 2011 Daniel Foote # # 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 (c) 2021 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
''' @author Luke Campbell <luke.s.campbell@gmail.com> @file ion/services/dm/inventory/test/dataset_management_test.py @description Unit and Integration test implementations for the data set management service class. ''' from pyon.core.exception import NotFound from pyon.util.int_test import IonIntegrationTestCase from...
#!/usr/bin/env python3 """ Analyze docstrings to detect errors. If no argument is provided, it does a quick check of docstrings and returns a csv with all API functions and results of basic checks. If a function or method is provided in the form "pandas.function", "pandas.module.class.method", etc. a list of all erro...
from . import web_reqrep from . import web_exceptions from . import web_urldispatcher from . import web_ws from .web_reqrep import * # noqa from .web_exceptions import * # noqa from .web_urldispatcher import * # noqa from .web_ws import * # noqa from .protocol import HttpVersion # noqa import asyncio from . imp...
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.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....
# coding: utf-8 # # Using Python to Access NEXRAD Level 2 Data from Unidata THREDDS Server # This is a modified version of Ryan May's notebook here: # http://nbviewer.jupyter.org/gist/dopplershift/356f2e14832e9b676207 # # The TDS provides a mechanism to query for available data files, as well as provides access to ...
"""Module provider for hostingde (Hosting.de)""" import json import logging import time import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ["hosting.de"] # be aware to provide an auth_token # LEXICON_HOSTINGDE_AUTH_TOKEN def provi...
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## 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 ## ## h...
"""Test the Z-Wave JS config flow.""" import asyncio from unittest.mock import DEFAULT, patch import pytest from zwave_js_server.version import VersionInfo from homeassistant import config_entries, setup from homeassistant.components.hassio.handler import HassioAPIError from homeassistant.components.zwave_js.config_f...
# The following comment should be removed at some point in the future. # mypy: strict-optional=False # mypy: disallow-untyped-defs=False from __future__ import absolute_import import contextlib import errno import getpass import io import logging import os import posixpath import shutil import stat import sys from co...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) import inspect from copy import deepcopy import numpy as np from numpy.testing.utils import (assert_allclose, assert_array_equal, ...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/python # $Id:$ from pyglet import app from pyglet import gl from pyglet import window class Display(object): '''A display device supporting one or more screens. :Ivariables: `name` : str Name of this display, if applicable. `x_screen` : int The X11 screen nu...
# 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 ...