gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Convert Android xml resources to API 14 compatible. There are two reasons that we cannot just use API 17 attributes, so we are ge...
import pprint import difflib from django.contrib.auth.models import User from django.test import TestCase, Client from django.utils import simplejson from ..models import Build, Project class PonyTests(TestCase): urls = 'devmason_server.urls' fixtures = ['authtestdata', 'devmason_server_test_data'] def se...
# region Description """ test_network.py: Unit tests for Raw-packet network classes Author: Vladimir Ivanov License: MIT Copyright 2020, Raw-packet Project """ # endregion # region Import from sys import path from os.path import dirname, abspath import unittest # endregion # region Authorship information __author__ =...
# Copyright 2012 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 ...
"""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_...
import numpy as np import operator as op from nose.tools import assert_equal, assert_true, assert_false, assert_raises from numpy.testing import assert_equal, assert_array_equal, \ assert_array_less import cyclopts.analysis as sis def test_value_split(): a = np.array(zip(range(10), range(10, 20)), dtype=[('x...
""" Demo platform for the cover component. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.cover import ( CoverDevice, SUPPORT_OPEN, SUPPORT_CLOSE) from homeassistant.helpers.event import track_utc_time_change de...
if __name__ == "__main__": import sys sys.path += [ "." ] from base64 import b64encode, b64decode from binascii import hexlify from hashlib import sha256 import os.path from os import urandom from timeit import default_timer as timer from collections import defaultdict from twisted.test.proto_helpers import ...
import datetime import itertools import json import logging import shlex from json.decoder import JSONDecodeError from typing import Dict, List, Optional, Tuple, Union import requests import requests.adapters from requests.exceptions import HTTPError, RequestException from datahub import __package_name__ from datahub...
import os # Path helper location = lambda x: os.path.join( os.path.dirname(os.path.realpath(__file__)), x) USE_TZ = True DEBUG = True TEMPLATE_DEBUG = True SQL_DEBUG = True EMAIL_SUBJECT_PREFIX = '[Oscar US sandbox] ' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # Use a Sqlite database by d...
# coding=utf-8 """Module that provides a cron-like task scheduler. This task scheduler is designed to be used from inside your own program. You can schedule Python functions to be called at specific intervals or days. It uses the standard 'sched' module for the actual task scheduling, but provides much more: * repea...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
#!/usr/bin/python # Copyright (c) 2009, Purdue University # 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 ...
#!/usr/bin/env python import feedparser # pip install feedparser from pymongo import MongoClient import json import re import datetime import logging import RAKE from calendar import timegm from datetime import datetime import hashlib from fuzzywuzzy import fuzz from bs4 import BeautifulSoup import time start = time.t...
# Copyright 2013 Google Inc. All Rights Reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. from itertools import izip import logging import random import re from net import bsonrpc from net import gorpc from vtdb import dbapi from vtdb import dbexceptions f...
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry import page as page_module from telemetry.page import page_set from telemetry.results import base_test_results_unit...
# 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...
import queue import concurrent.futures import time import hashlib import sys import re import string import random import urllib.request import urllib.parse from html.parser import HTMLParser from collections import namedtuple from classes.cache import Cache from classes.results import Results class HTMLStripper(HTM...
# -*- coding: utf-8 -*- # Copyright 2012 Leonidas Poulopoulos # # 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...
RiskNotify = { "secuid": "char", "alarm_score": "char", "alarm_status": "char", "alarm_rule": "char", "alarm_time": "char", "alarm_msg": "char", } OrderReq = { "cl_order_id": "char", "symbol": "char", "order_type": "int16_t", "side": "int16_t", "volume": "int64_t", "pric...
import BTrees import UserDict import ZODB.POSException import ZODB.blob import cStringIO import logging import persistent import persistent.mapping import tempfile import time import transaction import zc.set import zeit.connector.interfaces import zope.interface import zope.security.proxy import zope.testing.cleanup ...
# Author: Lars Buitinck <[email protected]> # License: BSD 3 clause from array import array from collections import Mapping from operator import itemgetter import numpy as np import scipy.sparse as sp from ..base import BaseEstimator, TransformerMixin from ..externals import six from ..externals.six.moves import x...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import base64 from datetime import date, datetime, timedelta import gzip import hashlib import hmac import logging import StringIO from urllib import urlencode from urlparse import urlparse, parse_qs import pytz log = logging.getLogger(__name__) DATET...
""" Automated Theorem Prover within Forseti """ # pylint: disable=fixme from copy import deepcopy import time from forseti.formula import Formula, Not, And, Or, Skolem, Herbrand, Predicate from forseti import converter, parser import forseti.util as util from forseti import exceptions class Prover(object): """ ...
#!/usr/bin/env python # Copyright 2012 Cloudera 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 ag...
from decimal import Decimal from django.utils.translation import gettext_lazy as _ from django.utils import timezone from django.conf import settings as django_settings from oscar.core.loading import get_class, get_model from oscarapicheckout.methods import PaymentMethod, PaymentMethodSerializer from oscarapicheckout.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...
""" Test Suites ----------- Provides a LazySuite, which is a suite whose test list is a generator function, and ContextSuite,which can run fixtures (setup/teardown functions or methods) for the context that contains its tests. """ from __future__ import generators import logging import sys import unittest from nose....
#!/usr/bin/env python # =================================== # Copyright (c) Microsoft Corporation. All rights reserved. # See license.txt for license information. # =================================== from contextlib import contextmanager import socket import os import sys import imp import hashlib import codecs impor...
from abc import abstractmethod from enable.colors import ColorTrait from traits.api import ABCHasStrictTraits, Any, Event, Instance, Trait, Tuple from ..core.component import Component from ..core.container import Container # XXX: Rename to Window (and subclasses) to WindowCanvas? class AbstractWindow(ABCHasStrictT...
"""Automatically adapted for numpy Sep 19, 2005 by convertcode.py """ from __future__ import division, absolute_import, print_function __all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex', 'isreal', 'nan_to_num', 'real', 'real_if_close', 'typename', 'asfarray', 'mintypecode', 'asscalar', ...
"""Tests for openid.server. """ from base64 import b64decode import unittest import warnings from urllib.parse import urlparse, parse_qsl, parse_qs from openid.server import server from openid import association, cryptutil, oidutil from openid.message import Message, OPENID_NS, OPENID2_NS, OPENID1_NS, \ IDENTIFIE...
import logging from django.conf import settings from django.db.models import Subquery, OuterRef, Sum from django.db.models.expressions import Value from django.utils.translation import gettext_lazy as _ from mapentity.views import (MapEntityLayer, MapEntityList, MapEntityJsonList, MapEntityFormat, MapEntityViewSet, ...
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
import pytest from api.base.settings.defaults import API_BASE from osf_tests.factories import ( ProjectFactory, AuthUserFactory, PrivateLinkFactory, NodeFactory ) from osf.utils import permissions @pytest.fixture() def url(public_project, view_only_link): return '/{}nodes/{}/view_only_links/{}/'....
"""Implementation of RootOf class and related tools. """ from __future__ import print_function, division from sympy.core import (S, Expr, Integer, Float, I, Add, Lambda, symbols, sympify, Rational, Dummy) from sympy.core.cache import cacheit from sympy.core.function import AppliedUndef from sympy.functions.el...
from control4.cloud.cloud_interface import * from control4.misc.console_utils import maybe_call_and_print,check_output_and_print,colorize,call_and_print from control4.config import load_config import threading import time,json,re import pexpect import os.path as osp import tempfile import subprocess # XXX terminal ou...
# -*- coding: utf-8 -*- ''' Created on 09.09.2016 @author: gongy ''' import io import struct from reflexif.models.jpeg import SZ_VARIABLE, SZ_ZERO, SEGMENTS from reflexif import errors, compat from reflexif.models import jpeg from reflexif.io import readexactly class SegmentData(object): def __init__(self, segm...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals from collections import namedtuple import json import os try: import koji except ImportError: ...
""" :created: 2018-01 :author: Alex BROSSARD <[email protected]> """ from PySide2 import QtWidgets, QtCore, QtGui from pymel import core as pmc from auri.auri_lib import AuriScriptView, AuriScriptController, AuriScriptModel, is_checked, grpbox from auri.scripts.Maya_Scripts import rig_lib from auri.scripts.Maya_Scri...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
"""Robinhood.py: a collection of utilities for working with Robinhood's Private API """ #Standard libraries import logging import warnings from enum import Enum #External dependencies from six.moves.urllib.parse import unquote # pylint: disable=E0401 from six.moves.urllib.request import getproxies # pylint: disabl...
# -*- coding: utf-8 -*- """ celery.events.state ~~~~~~~~~~~~~~~~~~~ This module implements a datastructure used to keep track of the state of a cluster of workers and the tasks it is working on (by consuming events). For every event consumed the state is updated, so the state represents th...
"""The test for binary_sensor device automation.""" from datetime import timedelta from unittest.mock import patch import pytest import homeassistant.components.automation as automation from homeassistant.components.binary_sensor import DEVICE_CLASSES, DOMAIN from homeassistant.components.binary_sensor.device_conditi...
# 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...
import os import contextlib import os.path import errno import stat import time import mmap from functools import partial import logging import fnmatch from ftsdb import re # re or re2 from ftsdb import update_document, add_document, remove_document from ftsdb import prefix_expr, logger, Cursor # nly index the first...
# Copyright 2019 The Meson development team # 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 requests import unittest import time import json import sys import shutil import getpass from zrest.server import App from zrest.datamodels.shelvemodels import ShelveModel, ShelveForeign from urllib import request def set_proxies(cls, done=list()): #This is going to be moved, it's useful if len(done) == 0: ...
#!/usr/bin/env python2.7 from __future__ import absolute_import from __future__ import division from __future__ import print_function from argparse import ArgumentParser from collections import OrderedDict from contextlib import contextmanager import json import logging import multiprocessing import os import shutil ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# python imports import json # django imports from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.http import Http404 from django.http import HttpResponse from django.http import HttpResponseRedirect from django.shortcuts impor...
# -*- test-case-name: twisted.test.test_compat -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Compatibility module to provide backwards compatibility for useful Python features. This is mainly for use of internal Twisted code. We encourage you to use the latest version of Python di...
"""Base class for sparse matrices""" from __future__ import division, print_function, absolute_import __all__ = ['spmatrix', 'isspmatrix', 'issparse', 'SparseWarning','SparseEfficiencyWarning'] import sys import numpy as np from scipy.lib.six import xrange from .sputils import isdense, isscalarlike, isintli...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Variable definition makefile = 'Makefile' executable = 'chimera' extend_library = 'module' extend_library_name = 'lib' + extend_library + '.so' core_library = 'chimera' core_library_name = 'lib' + core_library + '.so' runtime_library = 'runtime' runtime_libra...
# -*- 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...
"""The nut component.""" from homeassistant.components.sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_POWER, DEVICE_CLASS_TEMPERATURE, ) from homeassistant.const import ( ELECTRICAL_CURRENT_AMPERE, ELECTRICAL_VOLT_AMPERE, FREQUENCY_HERTZ, POWER_WATT, TEMP_CELSIUS, TIME_SECONDS, ...
#!/usr/bin/python # # Copyright (c) 2016, The OpenThread Authors. # 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 # not...
"""This module is part of the EDA(essential dynamics analysis) program, it provides several classes to perform the EDA. Classes: EDAnalysis -> It is the main class, provides an easy interface to carry out ED WrongModeException -> Specific Exception class that indicates a misuse of the EDA program """ i...
import socket import telnetlib import time import Queue import unittest from unittest import TestCase from test import test_support threading = test_support.import_module('threading') HOST = test_support.HOST EOF_sigil = object() def server(evt, serv, dataq=None): """ Open a tcp server in three steps 1) ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
""" Miscellaneous utilities, and serializers. Pyro - Python Remote Objects. Copyright by Irmen de Jong ([email protected]). """ import array import sys import zlib import uuid import logging import linecache import traceback import inspect import struct import datetime import decimal import numbers from Pyro4 impo...
""" Support for an interface to work with a remote instance of Home Assistant. If a connection error occurs while communicating with the API a HomeAssistantError will be raised. For more details about the Python API, please refer to the documentation at https://home-assistant.io/developers/python_api/ """ import asyn...
import asyncio import curses import random import math import time DEFAULT_COLOR = 1 class Window: """ represents a window space on the screen that you can place text in """ contents = None def __init__(self, parent, height=-1, width=-1, y_start=0, x_start=0): if height == -1: height = parent.getmaxyx()[...
import os import io import codecs import yaml import jenkins from jenkins_jobs import cmd from jenkins_jobs.errors import JenkinsJobsException from tests.base import mock from tests.cmd.test_cmd import CmdTestsBase from tests.cmd.test_recurse_path import fake_os_walk os_walk_return_values = { '/jjb_projects': [...
# Powered by Python 2.7 # the order is: # fp7graphBuilder #fp7projector #fp7filter1st2yrs #fp7dropOldOrgs #fp7edgeStacker #fp7stablePartnership #fp7findIntermediatedOrgs #deathStarPrint # To cancel the modifications performed by the script # on the current graph, click on the undo button. # Some useful ke...
import codecs import errno import os import sys import time from typing import Iterable, Optional from .helpers import reraise from .languages.javascript.generator import Generator as JavascriptGenerator from .languages.python.generator import Generator as PythonGenerator from .runtime import python, exceptions from ....
"""Affinity Propagation clustering algorithm. This module is an extension of sklearn's Affinity Propagation to take into account sparse matrices, which are not currently supported. Author: Federico Tomasi Copyright (c) 2016, Federico Tomasi. Licensed under the FreeBSD license (see LICENSE.txt). Original authors for ...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Immunization) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class Immunization(domainresource.DomainResource): """ Immunization event information. Desc...
########################################################################## # # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
""" The itty-bitty Python web framework. Totally ripping off Sintra, the Python way. Very useful for small applications, especially web services. Handles basic HTTP methods (PUT/DELETE too!). Errs on the side of fun and terse. Example Usage:: from itty import get, run_itty @get('/') def index(reque...
from collections import defaultdict from relational_data import ( CHANGED_ROWS, COMPARAND_MISSING_ROWS, RelationalData, MISSING_ROWS, ) from sqlalchemy import ( create_engine, inspect, MetaData, ) from sqlalchemy.orm import sessionmaker # 'description', # I don't care about description ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
from __future__ import absolute_import, division, print_function import argparse import os import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from PyAstronomy import pyasl ''' Remove spikes (tellurics) from continuum-normalized apVisit APOGEE spectra. Typically you will run this after a...
from urllib.parse import parse_qs import aiohttp import discord from discord.ext import commands from lxml import etree class Google(commands.Cog): def __init__(self, bot): self.bot = bot def parse_google_card(self, node): if node is None: return None e = discord.Embed(c...
""" Generic tag bot, yay. """ import asyncio import copy import shlex import traceback import discord from discord.ext import commands from discord.ext.commands import CommandError, CommandInvokeError, CommandNotFound from joku.cogs._common import Cog from joku.core.bot import Context, Jokusoramame from joku.core.tag...
import pytest import io import json from http import client import aiohttpretty from waterbutler.core import streams from waterbutler.core import exceptions from waterbutler.core.path import WaterButlerPath from waterbutler.providers.dataverse import settings as dvs from waterbutler.providers.dataverse import Datave...
from __future__ import absolute_import import sys import os import errno import types import gc import signal import traceback from gevent.event import AsyncResult from gevent.hub import get_hub, linkproxy, sleep, getcurrent from gevent.fileobject import FileObject from gevent.greenlet import Greenlet, joinall spawn = ...
from __future__ import absolute_import, unicode_literals # -*- coding: utf-8 -*- import json from datetime import datetime from xml.dom import minidom from django.conf import settings from django.core import serializers from django.db import transaction, connection from django.test import TestCase, TransactionTestCas...
# Copyright 2017 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, ...
# # Copyright 2018 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
""" Runner to provide F5 Load Balancer functionality :depends: - pycontrol Python module :configuration: In order to connect to a F5 Load Balancer, you must specify in the Salt master configuration the currently available load balancers .. code-block:: yaml load_balancers: bigip1.example...
# 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/env python # # BitBake Graphical GTK User Interface # # Copyright (C) 2012 Intel Corporation # # Authored by Dongxiao Xu <[email protected]> # Authored by Shane Wang <[email protected]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Gene...
""" Like described in the :mod:`parso.python.tree` module, there's a need for an ast like module to represent the states of parsed modules. But now there are also structures in Python that need a little bit more than that. An ``Instance`` for example is only a ``Class`` before it is instantiated. This class represents...
#=============================================================================== # Copyright 2009 Matt Chaput # # 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/li...
# -*- coding: utf-8 -*- import heapq def sorted_merge(a, b): """ 10.1 Sorted Merge: You are given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B. Write a method to merge B into A in sorted order. """ if len(a) == 0 and len(b) == 0: return [] if len(a...
# Copyright 2012 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...
"""Loading unittests.""" import os import re import sys import traceback import types import unittest from fnmatch import fnmatch from airy.utils.unittest import case, suite try: from os.path import relpath except ImportError: from airy.utils.unittest.compatibility import relpath __unittest = True def _C...
# Copyright (c) 2015-2016, the authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from GPy.util.linalg import jitchol, backsub_both_sides, tdot, dtrtrs, dtrtri,pdinv from GPy.util import diag from GPy.core.parameterization.variational import VariationalPosterior import numpy as n...
''' This module provides functions for embedding Bokeh plots in various different ways. There are a number of different combinations of options when embedding Bokeh plots. The data for the plot can be contained in the document, or on a Bokeh server, or in a sidecar JavaScript file. Likewise, BokehJS may be inlined in ...
# -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import, division) from pusher.http import GET, POST, Request, request_method from pusher.signature import sign, verify from pusher.util import ensure_text, validate_channel, validate_socket_id, app_id_re,...
#!/usr/bin/env python # -- coding: utf-8 -- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (th...
# 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...
# -*- 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...
import logging from numpy import nan from collections import Counter from protmapper import uniprot_client, ProtMapper from indra.statements import * from indra.databases import hgnc_client logger = logging.getLogger(__name__) # Map of HPRD PTM types to INDRA Statement types _ptm_map = { 'ADP-Ribosylation': Non...
"""Support for Tesla cars.""" import asyncio from collections import defaultdict from datetime import timedelta import logging import async_timeout import httpx from teslajsonpy import Controller as TeslaAPI from teslajsonpy.exceptions import IncompleteCredentials, TeslaException import voluptuous as vol from homeass...
# Copyright 2012 Nicira, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...