gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- from __future__ import unicode_literals import itertools import logging import os import pprint import re import sys import multiprocessing from pelican.generators import ArticlesGenerator from pelican.generators import PagesGenerator from pelican.settings import DEFAULT_CONFIG from pelican im...
# 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 use ...
"""Exceptions raised by the dvc.""" class DvcException(Exception): """Base class for all dvc exceptions.""" def __init__(self, msg, *args): assert msg self.msg = msg super().__init__(msg, *args) class InvalidArgumentError(ValueError, DvcException): """Thrown if arguments are inv...
# Copyright 2011 Isaku Yamahata # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
#!/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 (...
#!/usr/bin/python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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: # # * Redistrib...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 from decimal import Decimal import unittest from benchexec.tablegenerator.columns import ...
# Copyright (c) 2012 Rackspace Hosting # 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 req...
import subutai import hashlib from time import sleep import datetime from subprocess import call class Progress: coreSize = 0 vboxSize = 0 ubuntuSize = 0 openjreSize = 0 managementSize = 0 coreProgress = 0 vboxProgress = 0 ubuntuProgress = 0 openjreProgress = 0 managementProgre...
# -*- coding: utf-8 -*- # Copyright 2015-2016 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 re...
# Copyright 2018-2021 The Matrix.org Foundation C.I.C. # # 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...
import cpp_ast as cpp import python_ast as ast import scala_ast as scala try: from asp.util import * except Exception,e: pass def is_python_node(x): return isinstance(x, ast.AST) def is_cpp_node(x): return isinstance(x, cpp.Generable) def is_scala_node(x): return isinstance(x, scala...
#!/usr/bin/python # coding: utf8 from __future__ import absolute_import import requests import sys import json from collections import defaultdict from geocoder.distance import Distance from six import string_types is_python2 = sys.version_info < (3, 0) class Base(object): _exclude = ['parse', 'json', 'url', '...
# 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...
# encoding: utf-8 """ Step implementations for styles-related features """ from behave import given, then, when from docx import Document from docx.enum.style import WD_STYLE_TYPE from docx.styles.latent import _LatentStyle, LatentStyles from docx.styles.style import BaseStyle from docx.text.font import Font from do...
# 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...
from flask import flash from flask.ext.admin import form from flask.ext.admin.babel import gettext, ngettext, lazy_gettext from flask.ext.admin.model import BaseModelView from peewee import PrimaryKeyField, ForeignKeyField, Field, CharField, TextField from wtfpeewee.orm import model_form from flask.ext.admin.actions...
import base64 import hashlib import hmac import io import logging import random from urllib.parse import urlparse from streamlink.buffers import Buffer from streamlink.exceptions import StreamError from streamlink.packages.flashmedia import FLV, FLVError from streamlink.packages.flashmedia.tag import ScriptData from s...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function from six import iteritems, text_type, string_types, PY2 from frappe.utils import cstr """ frappe.translate ~~~~~~~~~~~~~~~~ Translation tools for frappe """...
"""HTML utilities suitable for global use.""" import re from html.parser import HTMLParser from urllib.parse import ( parse_qsl, quote, unquote, urlencode, urlsplit, urlunsplit, ) from django.utils.encoding import force_text from django.utils.functional import Promise, keep_lazy, keep_lazy_text from django.utils....
# Generated by Django 3.1.7 on 2021-10-12 10:39 import uuid import fernet_fields.fields import versionfield.fields import django.contrib.postgres.fields import django.contrib.postgres.fields.citext import django.contrib.postgres.search import django.core.validators import django.db.models.deletion from django.conf i...
# -*- coding: utf-8 -*- import requests import time import urlparse from pyquery.pyquery import PyQuery import random from decimal import Decimal from django.test import LiveServerTestCase from django.test.client import Client, RequestFactory from django.conf import settings from django.core.urlresolvers import reverse...
import logging import json import tempfile import uuid import pytest import sdk_auth import sdk_cmd import sdk_install import sdk_marathon import sdk_plan import sdk_utils from security import transport_encryption from tests import auth from tests import config from tests import test_utils log = logging.getLogger(...
#!/usr/bin/env python # 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...
"""The tests for the sun automation.""" from datetime import datetime import unittest from unittest.mock import patch from homeassistant.bootstrap import setup_component from homeassistant.components import sun import homeassistant.components.automation as automation import homeassistant.util.dt as dt_util from tests...
"""The Netatmo integration.""" import logging import secrets import pyatmo import voluptuous as vol from homeassistant.components import cloud from homeassistant.components.webhook import ( async_register as webhook_register, async_unregister as webhook_unregister, ) from homeassistant.config_entries import C...
#!/usr/bin/env python # # Created on 07/11/2014 Pat Cappelaere - Vightel Corporation # # Input: Landsat8 Atmospherically Corrected GeoTiff EPSG:4326 # Output: Water map # import os, inspect, sys import argparse import numpy import math from scipy import ndimage from osgeo import gdal from osgeo import osr from osge...
from templeplus.pymod import PythonModifier from toee import * import tpdp import char_class_utils import math ################################################### def GetConditionName(): return "Scout" classEnum = stat_level_scout classSpecModule = __import__("class046_scout") ######################################...
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP import fcntl import json from shutil import rmtree from socket import gethostname import tempfile import os import unittest from monasca_agent.collector.checks_d import json_plugin import monasca_agent.common.config HOSTNAME = gethostname() def _creat...
# Copyright 2015 Observable Networks # # 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 ...
#!/usr/bin/env python3 # # Copyright (c) 2017-2019 Aaron LI # MIT License # # Create image from OSKAR simulated visibility data using `WSClean`. # WSClean: https://sourceforge.net/p/wsclean/ # # 2017-09-01 # import os import sys import re import argparse import subprocess import time import tempfile WSCLEAN_BIN = o...
import matplotlib.pyplot as plt import numpy as np from numpy.fft import fft from numpy import hanning import scipy.io.wavfile as wavfile import pyaudio from datetime import datetime import re import os.path #import scipy.signal as signal class PianoKeyFreq(object): def __init__(self): self.KeyFreqList_std...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from collections import OrderedDict import logging from monty.json import MSONable from pymatgen.core import Molecule from .utils import read_table_pattern, read_pattern """ Classes for reading/manipulating/wri...
""" Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
# -*- coding: utf-8 -*- from __future__ import absolute_import,print_function import os import sys import code import warnings import string import inspect import argparse from flask import _request_ctx_stack from .cli import prompt, prompt_pass, prompt_bool, prompt_choices from ._compat import izip, text_type cl...
# 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 ...
import random import sqlite3 from team_init import Team from coach_init import Coach, load_coaches from player_init import Player, load_players from player_init import cm_to_in, rating_to_letter_grade from coach_first_names import coach_first_names from player_last_names import player_last_names from game_variables imp...
# 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...
# # 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 # ...
# 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...
import sys def typename(t): name = type(t).__name__ if sys.version_info < (2,5): if name == 'classobj' and issubclass(t, MyException): name = 'type' elif name == 'instance' and isinstance(t, MyException): name = 'MyException' return "<type '%s'>" % name class MyExce...
# -*- coding: utf-8 -*- import shelve import flask import re import time from functools import wraps from flask import request, Response from flask.ext.restful import reqparse, Resource from passlib.apps import custom_app_context as pwd_context from itsdangerous import JSONWebSignatureSerializer as Serializer from it...
# 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...
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
import collections import synapse.exc as s_exc import synapse.tests.utils as s_t_utils from synapse.tests.utils import alist class ViewTest(s_t_utils.SynTest): async def test_view_set_parent(self): async with self.getTestCore() as core: view00 = core.getView() view01 = core.get...
from __future__ import print_function, division from .str import StrPrinter from sympy.utilities import default_sort_key class LambdaPrinter(StrPrinter): """ This printer converts expressions into strings that can be used by lambdify. """ def _print_MatrixBase(self, expr): return "%s(%s)...
""" support for skip/xfail functions and markers. """ import py, pytest import sys def pytest_addoption(parser): group = parser.getgroup("general") group.addoption('--runxfail', action="store_true", dest="runxfail", default=False, help="run tests even if they are marked xfail") def pyte...
import json from abc import ABCMeta, abstractmethod import six from moto.sts.models import ACCOUNT_ID @six.add_metaclass(ABCMeta) class TestConfig: """Provides the interface to use for creating test configurations. This class will provide the interface for what information will be needed for the SageMa...
# 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # no...
# Copyright (c) 2008-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.wsgi}. """ __metaclass__ = type from sys import exc_info from urllib import quote from thread import get_ident import StringIO, cStringIO, tempfile from zope.interface.verify import verifyObject from twist...
import logging import os import pipes import random import shutil import string import subprocess import sys import tempfile import time import urllib2 from optparse import OptionParser from sys import stderr no_of_slaves=int(sys.argv[2]) hadoop_major_version = str(sys.argv[3]) spark_version=str(sys.argv[4]) k=sys.arg...
import os import os.path as op from flask import Flask, url_for from flask_sqlalchemy import SQLAlchemy from sqlalchemy.event import listens_for from jinja2 import Markup from flask_admin import Admin, form from flask_admin.form import rules from flask_admin.contrib import sqla # Create application app = Flask(__n...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __authors__ = ['wesc+api@google.com (Wesley Chun)', 'eyeofpie@gmail.com (De...
import datetime import json from lxml import html import os import re from urllib.parse import urlencode from urllib.parse import urlparse, urlunparse import functools import logging import requests import sys from django.conf import settings from django.contrib import messages from django.contrib.auth.models import U...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import # Standard imports from future import standard_library standard_library.install_aliases() from builtins import range from builtins import * from builtins import object fro...
#!/usr/bin/python # # Copyright (c) 2019 Yuwei Zhou, <yuwzho@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
# Copyright (c) 2015, Sergiusz Bazanski <q3k@q3k.org> # Copyright (c) 2015, Remigiusz Marcinkiewicz <enleth@enleth.com> # 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 so...
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-lines # noqa: E301,E302,E303,T001 class OpenShiftCLIError(Exception): '''Exception class for openshiftcli''' pass ADDITIONAL_PATH_LOOKUPS = ['/usr/local/bin', os.path.expanduser('~/bin')] def locate_oc_binary(): ''' Find and return oc binar...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2018-2019 The Particl Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php.z """Test the ZMQ API.""" import configparser import ...
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# # 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...
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
"""Implements a Nvim host for python plugins.""" import functools import imp import inspect import logging import os import os.path import re from traceback import format_exc from . import script_host from ..api import decode_if_bytes, walk from ..compat import IS_PYTHON3, find_module from ..msgpack_rpc import ErrorR...
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl """Write a .xlsx file.""" # Python stdlib imports from io import BytesIO from re import match from zipfile import ZipFile, ZIP_DEFLATED # package imports from openpyxl.xml.constants import ( ARC_SHARED_STRINGS, ARC_CONTENT_TYPES, A...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding index on 'Committee', fields ['type'] db.create_index(u'committe...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
#Copyright (c) 2011-13 Walter Bender #Copyright (c) 2011 Collabora Ltd. <http://www.collabora.co.uk/> #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 limi...
#!/usr/bin/python # # Copyright (c) SAS Institute 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...
# -*- coding: utf-8 -*- """Windows Defender scan DetectionHistory files.""" from dtfabric.runtime import data_maps as dtfabric_data_maps from dtformats import data_format class WindowsDefenderScanDetectionHistoryFile(data_format.BinaryDataFile): """Windows Defender scan DetectionHistory file.""" # Using a clas...
# Software License Agreement (BSD License) # # Copyright (c) 2009-2011, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redistributions of source ...
## EM enumeration definitions EM_NONE = 0 EM_M32 = 1 EM_SPARC = 2 EM_386 = 3 EM_68K = 4 EM_88K = 5 EM_860 = 7 EM_MIPS = 8 EM_S370 = 9 EM_MIPS_RS3_LE = 10 EM_PARISC = 15 EM_VPP500 = 17 EM_SPARC32PLUS = 18 EM_960 = 19 EM_PPC = 20 EM_PPC64 = 21 EM_S390 = 22 EM_V800 = 36 EM_FR20 = 37 EM_RH32 = 38 EM_RCE = 39 EM_ARM = 40 EM...
""" Tests for L{imaginary.action.LookAt} and L{imaginary.action.LookAround}. """ from __future__ import print_function from textwrap import dedent import attr from twisted.trial.unittest import TestCase from zope.interface import implementer from axiom import store, item, attributes from imaginary import iimaginar...
from common_fixtures import * # NOQA import json TEST_SERVICE_OPT_IMAGE = 'ibuildthecloud/helloworld' TEST_SERVICE_OPT_IMAGE_LATEST = TEST_SERVICE_OPT_IMAGE + ':latest' TEST_SERVICE_OPT_IMAGE_UUID = 'docker:' + TEST_SERVICE_OPT_IMAGE_LATEST METADATA_SUBDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), ...
# coding: utf-8 """ Test cases for misc plot functions """ import pytest from pandas import DataFrame from pandas.compat import lmap import pandas.util.testing as tm import pandas.util._test_decorators as td import numpy as np from numpy import random from numpy.random import randn import pandas.plotting as plotti...
""" Waveform simulator ("FaX") - physics backend The only I/O stuff here is pax event creation, everything else is in the WaveformSimulator plugins """ from __future__ import division import logging import math import time import pickle from functools import partial import numpy as np import pandas as pd import multi...
# # 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 the ...
# Copyright 2012 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
from prology import * _ = L from unittest import main, TestCase class Test(TestCase): def testForCover(self): self.assertEqual(str(cons(_.A, _.B)), "cons(A, B)") self.assertEqual(str(nil), "nil") self.assertEqual(str(_.A), "A") self.assertEqual(str(Variable("A", 0)), "A") ...
# Copyright 2011 Justin Santa Barbara # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
import getpass from multiprocessing.dummy import Pool import os from os.path import join import sys from urllib.parse import urlparse import requests from app.client.build_runner import BuildRunner from app.deployment.deploy_target import DeployTarget from app.deployment.remote_master_service import RemoteMasterServi...
import datetime from pytz import UTC from mangrove.datastore.entity import Entity, create_entity, get_by_short_code from mangrove.datastore.entity_type import define_type from mangrove.errors.MangroveException import FormModelDoesNotExistsException from mangrove.form_model.field import TextField, IntegerField, SelectF...
#!/usr/bin/python3 import abc import argparse import enum import functools import glob import itertools import os import pathlib import pyudev import re import shutil import subprocess import sys import yaml def run_one_command(prog_args, my_stderr=None, check=True): proc = subprocess.Popen(prog_args, stdout = su...
""" Implements the PSLQ algorithm for integer relation detection, and derivative algorithms for constant recognition. """ from .libmp.backend import xrange from .libmp import int_types, sqrt_fixed # round to nearest integer (can be done more elegantly...) def round_fixed(x, prec): return ((x + (1<<(prec-1))) >> p...
"""The tests for the Home Assistant API component.""" # pylint: disable=protected-access import json from unittest.mock import patch from aiohttp import web import pytest import voluptuous as vol from homeassistant import const from homeassistant.bootstrap import DATA_LOGGING import homeassistant.core as ha from home...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
# 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...
# 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 os import sys import requests import conans from conans import __version__ as client_version, tools from conans.client.cmd.create import create from conans.client.plugin_manager import PluginManager from conans.client.recorder.action_recorder import ActionRecorder from conans.client.client_cache import ClientC...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
# Copyright 2014 Rackspace # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
from django.db import models from django.utils.translation import ugettext as _ from debugged.contacts.settings import LOCATION_TYPES, CONTACT_TYPES # TODO: Sort by country name # http://xml.coverpages.org/country3166.html COUNTRIES = [ ('AD', _('Andorra')), ('AE', _('United Arab Emirates')), ('AF', _('A...
"""Excentury Core Contains functions that can be used by the binary and text interface as well as the readers. """ import re import six import ctypes import numpy as np CHAR = ctypes.c_char BYTE = ctypes.c_byte UBYTE = ctypes.c_ubyte SHORT = ctypes.c_short USHORT = ctypes.c_ushort INT = ctypes.c_int UINT = ctypes.c...
from functools import partial from warnings import warn import numpy as np from pandas import Series, DataFrame from pandas.core.indexing import _NDFrameIndexer from pandas.util.decorators import cache_readonly import pyproj from shapely.geometry import box, shape, Polygon, Point from shapely.geometry.collection impor...
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import typing from collections import namedtuple from collections.abc import Iterable from dataclasses import dataclass, field from typing import Any, Dict, Type, Union fro...
from operator import itemgetter def linkCue(article, verbs, nouns): attrs = article.attributions sentences = article.sentences keys = attrs.keys() print 'cueresolving' for key in keys: currentAttr = attrs[key] contentSpan = currentAttr['content'] sourceSpan = currentAttr['source'] if contentSpan == [...
#!/usr/bin/env python3 # Copyright 2015 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 appl...