gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#qpy:console import site import os from peewee import * import time import datetime import io import sys # 20160103 if os.path.exists('/storage/extSdCard'): db = SqliteDatabase('/storage/extSdCard/mydb/lessonplan2010.db', **{}) #backupdir = '/storage/extSdCard/dbbackup/' #db = '/storage/extSdCard/mydb/engl...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from six.moves import range import frappe from six.moves import html_parser as HTMLParser import smtplib, quopri, json from frappe import msgprint, throw, _ from frappe.email.smtp...
""" Interactivity functions and classes using matplotlib and IPython widgets **Gravity forward modeling** * :class:`~fatiando.gravmag.interactive.Moulder`: a matplitlib GUI for 2D forward modeling using polygons ---- """ from __future__ import division import cPickle as pickle import numpy from matplotlib impor...
#!/usr/bin/python # ======================================= # multimux v0.1b - Copyright 2011 # Writted by muttley # Get last version from muttley.eb2a.com # ======================================= import os import sys import glob import re import shlex import subprocess from optparse import OptionParser # GLOBAL VA...
""" Author: Bharat Balegere Date created: 10-Oct-2017 Date last modified: 23-Jan-2018 Python Version: 3.6 """ import argparse import datetime import numpy as np import pandas as pd from gurobipy import * def read_input_csv(filename, typ=None): sldf = pd.read_csv(filename, header=0, dtype=typ) ...
import os import json import hashlib import jsonschema import requests from flask import ( Flask, request, jsonify, send_from_directory, render_template, abort, send_file) from flask.ext.cacheify import init_cacheify from flask.views import MethodView APP_ROOT = os.path.dirname(os.path.abspath(__file__)) DEB...
import sys import os import re import shutil import collections import datetime import json from textwrap import fill import click from anchore.cli.common import anchore_print, anchore_print_err from anchore import navigator, controller, anchore_utils, anchore_auth, anchore_feeds, anchore_policy from anchore.util imp...
"""The tests for Nest device triggers.""" from google_nest_sdm.device import Device from google_nest_sdm.event import EventMessage import pytest import homeassistant.components.automation as automation from homeassistant.components.device_automation.exceptions import ( InvalidDeviceAutomationConfig, ) from homeass...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Django settings for askkit project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproj...
# coding=utf-8 # Copyright 2021 DeepMind Technologies 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 applic...
# # 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 # distr...
# ------------------------------------------------------------------------ # # Copyright 2005-2015 WSO2, Inc. (http://wso2.com) # # 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....
# # (c) Christian Sommerfeldt OEien # All rights reserved from math import floor, pi, cos, sin from rmg.math_ import rnd, matrix_multiply class Color: def __init__(self, r, g, b): self.r = r self.g = g self.b = b def __mul__(self, o): if isinstance(o, Color): ...
#Paranaues importantes import os import time #comentario bug #Variaveis globais empate = 0 Novo_Jogo = 0 x = 0 end_game = 0 l1 = ' | | ' l2 = ' t | i | c ' l3 = '_____|_____|_____' l4 = ' | | ' l5 = ' t | a | c ' l6 = '_____|_____|_____' l7 = ' | | ' l8 = ' t | o | ...
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
''' TODO (29.05.2012): 1) show 1x, 2x, 3x threshold (as line) 2) auto scale in y axis? (calc and save min & max values of buffer) 3) draw y axis? 4) 'max_nbr_buffers_transmitted' must be 1 and 'framesize' must be 512 otherwise we get in trouble in RT mode. 5) set 'SHIFT_VIEW' in update() and dequeue in 'do_draw'?...
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
#!/usr/bin/env python3 import unittest from framework import VppTestCase, VppTestRunner from scapy.layers.inet import IP, TCP from scapy.layers.inet6 import IPv6 from scapy.layers.l2 import Ether from scapy.packet import Raw class TestMSSClamp(VppTestCase): """ TCP MSS Clamping Test Case """ def setUp(sel...
# 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 os import pkg...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
#!/usr/bin/python import sys import argparse from argparse import RawTextHelpFormatter, SUPPRESS # # by James # https://github.com/viaMorgoth/Steganize # # version: 1.0.1 # #======================================= #DEFINE THE GLOBAL VARIABLES OF THIS SCRIPT #======================================= #These are signat...
""" This module defines handlers for storing sessions when handles sessions of users connecting to the server. There are two similar but separate stores of sessions: ServerSessionHandler - this stores generic game sessions for the game. These sessions has no knowledge about how they are connected t...
""" flask.ext.hmacauth --------------- This module provides HMAC-based authentication and authorization for Flask. It lets you work with reuests in a database-independent manner. initiate the HmacManager with a app and set account ID, signature and timestamp """ from flask import current_app, request...
# Copyright 2014 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 ...
"""HTML utilities suitable for global use.""" import re from urllib.parse import ( parse_qsl, quote, unquote, urlencode, urlsplit, urlunsplit, ) from django.utils.encoding import force_text from django.utils.functional import keep_lazy, keep_lazy_text from django.utils.http import RFC3986_GENDELIMS, RFC3986_SUBDE...
# ##### BEGIN GPL LICENSE BLOCK ##### # # JewelCraft jewelry design toolkit for Blender. # Copyright (C) 2015-2019 Mikhail Rachinskiy # # 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, eith...
import requests from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ from django_comments.signals import comment_was_posted from django_comments.forms import CommentSecurityForm from django_comments.models import Comment from django.contrib.contenttypes.models import ContentType f...
from __future__ import unicode_literals import datetime import time import re import six import itertools from operator import attrgetter from hashlib import md5 from boto3 import Session from moto.compat import OrderedDict from moto.core import BaseBackend, BaseModel, CloudFormationModel from moto.core.utils impor...
""" Tests for dit.distribution. """ import pytest from dit import Distribution, ScalarDistribution from dit.distribution import BaseDistribution from dit.exceptions import ditException, InvalidNormalization def test_dist_iter1(): outcomes = ['00', '01', '10', '11'] pmf = [1 / 4] * 4 d = Distribution(out...
# coding=utf-8 # Copyright 2018 DPR Authors, The Hugging Face 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 a...
# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*- # vim: tabstop=2:shiftwidth=2:noexpandtab # kate: tab-width 2; replace-tabs off; indent-width 2; # # ============================================================================== # Authors: Patrick Lehmann # # Python Main Module: Entry point to...
################################ # Problem: Doomsday Fuel (Google foobar) # Author: babhishek21 # Lang: Python 2.7 # # Hint: Absorbing Markov Chains # # This solution follows the wikipedia format of canonizing the transition matrix `P`: # https://en.wikipedia.org/wiki/Absorbing_Markov_chain # # Problem Solution at: #...
#! /usr/bin/env python # By Fedor Iskhakov # fedor.iskh.me # The packages: # geopy is needed for geo-locating the employers # bleach is needed for cleaning up the content of ads for Evernote standard (ENML) # https://dev.evernote.com/doc/articles/enml.php#prohibited # https://pypi.python.org/pypi/bleach # http://geop...
# JN 2015-04-22 # JN 2021-12-01 adding type check for stored sign # refactoring """ manages spikes and sorting, after concatenation """ import numpy as np import tables import os from .. import SIGNS, TYPE_NAMES, TYPE_ART, GROUP_NOCLASS, GROUP_ART, NcsFile,\ TYPE_NON_NOISE, TYPE_ALL debug = False class SortingF...
import pickle import hashlib import datetime import logging import dateutil.parser from django.db import models from django.db.models import Q from django.db.models import Max, Min from django_pgjson.fields import JsonField from core.utilities import check_domain_valid, get_base_domain from pivoteer.records import Reco...
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
def conc(corpus, query, option = 'tregex', dep_function = 'any', dep_type = 'basic-dependencies', n = 100, random = False, window = 100, trees = False, plaintext = False, #'guess', add_links = False, show_links = False, ...
from unittest import TestCase from game.game_variant import GameVariantGrand from model.card import Card from model.player import Player class GameVariantGrandTest(TestCase): def setUp(self): self.game_variant = GameVariantGrand() def test_isTrump_jacksTrue(self): # when/then for sui...
# 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 t...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
# 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 (t...
"""Build and Version QuerySet classes.""" import datetime import logging from django.db import models from django.db.models import Q from django.utils import timezone from readthedocs.builds.constants import ( BUILD_STATE_FINISHED, BUILD_STATE_TRIGGERED, EXTERNAL, ) from readthedocs.core.utils.extend impo...
# # Collective Knowledge (CK) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin # import sys import os ############################################################################## def load_json_file(i): """Load json from file into dict ...
# Copyright 2019 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 applicable law or agree...
# -*- encoding: utf-8 -*- """A script to control an HEOS player, see <https://github.com/ping13/heospy> for details. Specification of the HEOS interface at http://rn.dmglobal.com/euheos/HEOS_CLI_ProtocolSpecification.pdf """ import json import os import telnetlib import re import logging import argparse import six ...
#!/usr/bin/env python # #===- run-clang-tidy.py - Parallel clang-tidy runner ---------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===---------...
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 # This script aims to replicate the behavior of examples/sir_hmc.py but using # the high-level components of pyro.contrib.epidemiology. Command line # arguments and results should be similar. import argparse import logging import math...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{incremental}. """ from __future__ import division, absolute_import import operator from incremental import getVersionString, IncomparableVersions from incremental import Version, _inf from twisted.trial.unittest import TestCase...
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides methods and Pythonic idioms that make it easy to navigate, search,...
# Copyright 2012 NEC Corporation # Copyright 2015 Cisco Systems, 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 # # Un...
import random import copy import sys from Observation import * from Reward import * from Action import * class Environment: # The grid world # 1 = walls # 4 = goal (non-terminal) # 5 = goal (terminal) map = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 4, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1...
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable import math import numpy as np import matplotlib.pyplot as plt from collections import OrderedDict # Tra...
# Copyright 2012-2013 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 la...
''' sifraplot.py This module provides easy access to selected colours from the Brewer palettes, and functions for customising and improving plot aesthetics ''' import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams['legend.numpoints'] = 2 mpl.rcParams['xtick.direction'] = 'out' mpl.rcParams['ytick.direc...
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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 ...
import re import six import json import uuid import traceback from peewee import ( BigIntegerField, ForeignKeyField, TextField, DateTimeField, BooleanField, UUIDField ) from datetime import datetime, timedelta from playhouse.postgres_ext import BinaryJSONField, ArrayField from disco.types.base import UNSET fr...
# 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...
"""Upload and download support for apitools.""" from __future__ import print_function import email.generator as email_generator import email.mime.multipart as mime_multipart import email.mime.nonmultipart as mime_nonmultipart import io import json import mimetypes import os import StringIO import threading import six...
import os #To set working directory properly import re #import regular expression evaluator import urllib #Used to test if internet is available import time #required for sleep pauses import threading #We will be making threads import RPi.GPIO as GPIO #We use lots of GPIOs in this program import datetime #To allow for ...
# 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. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class PolymerPage(page_module.Page):...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import re import redis import json import os from bs4 import BeautifulSoup from frappe.utils import cint, strip_html_tags from frappe.mod...
# 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 -*- from __future__ import unicode_literals, print_function import json import logging import shutil import time import os import pytest from gcdt_bundler.bundler import get_zipped_file from nose.tools import assert_equal, assert_in, assert_not_in from gcdt import utils from gcdt.ramuda_core impor...
import logging import time import threading from coapthon import defines __author__ = 'Giacomo Tanganelli' logger = logging.getLogger(__name__) class ObserveItem(object): def __init__(self, timestamp, non_counter, allowed, transaction, serv=None): """ Data structure for the Observe option ...
# Copyright 2016 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
# # The Python Imaging Library # $Id$ # # map CSS3-style colour description strings to RGB # # History: # 2002-10-24 fl Added support for CSS-style color strings # 2002-12-15 fl Added RGBA support # 2004-03-27 fl Fixed remaining int() problems for Python 1.5.2 # 2004-07-19 fl Fixed gray/grey spelling issues # 2...
# 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...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
#!/usr/bin/env python import os from uuid import uuid4 from tabulate import tabulate from multiprocessing.pool import ThreadPool as Pool from multiprocessing import Lock from virtbmc.models import VirtBMC, QemuVM from virtbmc.template import gen_template_content from virtbmc.clrlog import LOG import virtbmc.utils as...
#!/usr/bin/env python3 # transpiled with BefunCompile v1.3.0 (c) 2017 import gzip, base64 _g = ("Ah+LCAAAAAAABADt0OtLU3EcBvCfd7volAQp2OaKigpdYl5I54glEUqFUStZ6pBminlLnE7zSIG+8AZmC29bvskXRgsrZm257CALbGosXXI82+Skh3nZpsep03mW9qJ/" + "ot/z4sPzhe+rh90UDPbjD1ZmDcXYbd/6H0JxdH4eevNZ4akTI2EHf58cDJtdHrqfmHXGkdqOSNp/RksCH/TYpKG...
import django from django.contrib.contenttypes.generic import GenericRelation, GenericRel from django.contrib.contenttypes.models import ContentType from django.db import DEFAULT_DB_ALIAS from django.db.models.query_utils import Q from django.utils.functional import lazy from django.utils.text import capfirst from flue...
#!/usr/bin/env python """Example code of DDPG on OpenAI Gym environments. For DDPG, see: https://arxiv.org/abs/1509.02971 """ from __future__ import print_function from __future__ import division import argparse import collections import copy import random import gym import numpy as np import chainer from chainer im...
# 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 IBM Corporation # Copyright 2015 Lenovo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
# Copyright (C) 2018 NTT DATA # 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 ...
from pathlib import Path import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np def plot_history(out, history, metric='loss', val=True, title=None, width=8, height=6): title = title or 'model {}'.format(metric) val_metric = 'val_{}'.format(metric) plt.figure(figsize=(wi...
#! /usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Simple distributed kmeans implementation Relies on an abstraction for the training matrix, that can be sharded ov...
# Copyright 2015, Ansible, Inc. # Luke Sneeringer <lsneeringer@ansible.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals) import mock from django.test import TestCase from rest_framework.test import APIRequestFactory, APITestCase from readthedocs.builds.constants import BRANCH, LATEST, TAG from readthedocs.builds.models impo...
import fastlmm.inference.lmm_cov as lmm import numpy as np import fastlmm.util.stats.chi2mixture as c2 import fastlmm.association as association import scipy.stats as st import tests_util as tu class lrt(association.varcomp_test): __slots__ = ["lmm","lrt","forcefullrank","nullModel","altModel","G0","K0","__testGca...
from __future__ import absolute_import import logging from typing import Any, Set, Tuple, Optional, Text from django.contrib.auth.backends import RemoteUserBackend from django.conf import settings from django.http import HttpResponse import django.contrib.auth from django_auth_ldap.backend import LDAPBackend, _LDAPU...
# Copyright 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 requ...
"""The tests for the demo climate component.""" import pytest import voluptuous as vol from homeassistant.components.climate.const import ( ATTR_AUX_HEAT, ATTR_CURRENT_HUMIDITY, ATTR_CURRENT_TEMPERATURE, ATTR_FAN_MODE, ATTR_HUMIDITY, ATTR_HVAC_ACTIONS, ATTR_HVAC_MODES, ATTR_MAX_HUMIDITY, ATTR_MAX_TEMP, AT...
colors = { 'Pink': { '50': 'fce4ec', '100': 'f8bbd0', '200': 'f48fb1', '300': 'f06292', '400': 'ec407a', '500': 'e91e63', '600': 'd81b60', '700': 'C2185B', '800': 'ad1457', '900': '88e4ff', 'A100': 'ff80ab', 'A400': 'F50057', 'A700': 'c51162', 'A200': 'ff4081' }, 'Blue': { '200': '90ca...
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # xfsslower Trace slow XFS operations. # For Linux, uses BCC, eBPF. # # USAGE: xfsslower [-h] [-j] [-p PID] [min_ms] # # This script traces common XFS file operations: reads, writes, opens, and # syncs. It measures the time spent in these oper...
from data_set import DataSet from flowstats import cluster import numpy as np import pandas as pd import multiprocessing def bem_cluster(input_dict): model = cluster.DPMixtureModel( input_dict['component_count'], input_dict['iteration_count'], burn_in=0, model='bem' ) bem_...
import sys import asyncio import pickle import itertools from dataclasses import dataclass from typing import Any, Dict, List, Optional import random from ray.actor import ActorHandle from ray.serve.common import RunningReplicaInfo from ray.serve.long_poll import LongPollClient, LongPollNamespace from ray.serve.utils ...
import json from contextlib import contextmanager from tempfile import NamedTemporaryFile import pytest from nose.tools import eq_ import amo import amo.tests from addons.models import Addon from applications.models import AppVersion from files.models import File from files.utils import find_jetpacks, is_beta, Packag...
<<<<<<< HEAD <<<<<<< HEAD from .. import util from . import util as import_util import sys import unittest import importlib from test import support class ParentModuleTests: """Importing a submodule should import the parent modules.""" def test_import_parent(self): with util.mock_spec('pkg.__init__'...
from functools import partial from urllib.parse import urlencode from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder from geopy.location import Location from geopy.util import logger __all__ = ("Pelias", ) class Pelias(Geocoder): """Pelias geocoder. Documentation at: https://github.com/peli...
import re import click import six from httpie.context import Environment from httpie.core import main as httpie_main from parsimonious.exceptions import ParseError, VisitationError from parsimonious.grammar import Grammar from parsimonious.nodes import NodeVisitor from six import BytesIO from six.moves.urllib.parse i...
# 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 t...
#!/usr/bin/env python # 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 (the # "License"); you ma...
import os.path from abc import ABCMeta, abstractmethod from functools import partial from bistiming import SimpleTimer import h5py import h5sparse from mkdir_p import mkdir_p import numpy as np import pandas as pd from past.builtins import basestring import scipy.sparse as ss import six from six.moves import cPickle ...
import argparse import ast import codecs import re import os import sys from configparser import SafeConfigParser, DEFAULTSECT from syncplay import constants, utils, version, milestone from syncplay.messages import getMessage, setLanguage, isValidLanguage from syncplay.players.playerFactory import PlayerFactory from ...
############################################################################################ # QN-S3VM BFGS optimizer for semi-supervised support vector machines. # # This implementation provides both a L-BFGS optimization scheme # for semi-supvised support vector machines. Details can be found in: # # F. Gieseke, A....
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the Partially Signed Transaction RPCs. """ from decimal import Decimal from test_framework.test_f...