gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""HPCBench campaign helper functions """ import collections from contextlib import contextmanager import filecmp import functools import json import logging import operator import os import os.path as osp import re import shutil import socket import uuid from cached_property import cached_property from ClusterShell.N...
import datetime from cStringIO import StringIO from django.core import mail from django.conf import settings from django.utils import timezone from django.test.utils import override_settings from funfactory.urlresolvers import reverse import mock from nose.tools import eq_, ok_ from airmozilla.base.tests.testbase i...
#!/usr/bin/env python # # Copyright (c) 2013, ReMake Electric ehf # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # ...
# Copyright (c) 2018 PaddlePaddle 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 app...
# # 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 # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2015 Nikola Kovacevic <nikolak@outlook.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/LICEN...
import unittest from mahjong import algo from mahjong.types import GameContext, Tile class TestCanWin(unittest.TestCase): def setUp(self): self.context = GameContext() # wait for BAMBOO5 self.context.players[0].hand.add_free_tiles([ Tile.CHAR1, Tile.CHAR1, Tile.CHAR1, ...
""" multiRobotworld.py Author: Ariel Anders, aanders@mit.edu this program creates the worldmodel and defines the move primitives for the robots. It has a successor function to use for planning with a single robot or multiple robots """ import time import copy import gridMap from itertools import ...
# -*- coding: utf-8 -*- ''' The Saltutil module is used to manage the state of the salt minion itself. It is used to manage minion modules as well as automate updates to the salt minion. :depends: - esky Python module for update functionality ''' # Import python libs import os import hashlib import shutil import si...
import itertools from inspect import formatargspec, getargspec from types import FunctionType, MethodType from pydot import Dot, Edge, Node from sqlalchemy.orm import class_mapper from sqlalchemy.orm.exc import UnmappedClassError from sqlalchemy.orm.properties import RelationshipProperty NODE_TABLE = ( '<<TABLE B...
#! /usr/bin/env python from api.util import settings from dataprovider.dataprovider import RedisLiveDataProvider from threading import Timer import redis import datetime import threading import traceback import argparse import time class Monitor(object): """Monitors a given Redis server using the MONITOR command...
import os import tempfile import zipfile import shutil import requests from lxml import etree import logging from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound, FileResponse from django....
from __future__ import absolute_import, division, print_function from collections import deque from dask.core import istask, subs def head(task): """Return the top level node of a task""" if istask(task): return task[0] elif isinstance(task, list): return list else: return t...
import json import os import threading import time import traceback import uuid from urllib.parse import urljoin errors = None marionette = None pytestrunner = None here = os.path.dirname(__file__) from .base import (CallbackHandler, CrashtestExecutor, RefTestExecutor, ...
import re from django import forms from django.template.loader import render_to_string from django.conf import settings from django.utils.translation import ugettext_lazy as _, ugettext from django.utils.encoding import smart_unicode from django.utils.hashcompat import sha_constructor from pinax.core.utils import get...
# curio/test/kernel.py import unittest import time from ..import * # ---- Basic Kernel Functionality class TestKernel(unittest.TestCase): def test_hello(self): kernel = get_kernel() results = [] async def hello(): results.append('hello') kernel.add_task(hello()) ...
# 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...
# Copyright 2018 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 wr...
import renderdoc as rd import rdtest # Not a direct test, re-used by API-specific tests class Overlay_Test(rdtest.TestCase): internal = True def check_capture(self, base_event=0): out: rd.ReplayOutput = self.controller.CreateOutput(rd.CreateHeadlessWindowingData(100, 100), rd.ReplayOutputType.Texture...
# -*- coding: utf-8 -*- # Copyright 2010 Alexander Orlov <alexander.orlov@loxal.net> # # 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 numpy as np import pytest import pandas as pd from pandas import DataFrame, Series, concat import pandas._testing as tm from pandas.core.base import DataError def test_rank_apply(): lev1 = tm.rands_array(10, 100) lev2 = tm.rands_array(10, 130) lab1 = np.random.randint(0, 100, size=500) lab2 = ...
from functools import wraps, partial import inspect from json import JSONEncoder from threading import local as threadlocal from typing import AnyStr, Tuple, Optional import warnings import copy import logging from datetime import datetime, timedelta from urllib.parse import urlparse, urlunsplit MAX_PAYLOAD_LENGTH = 1...
# Copyright (c) 2013 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality o...
""" This module contains functions that does convertion of code and equations to PDF and png formats """ from __future__ import print_function import os import sys import hashlib import errno import shutil from xml.sax.saxutils import unescape from lxml import etree from termcolor import colored from . import pstik...
from test import support from test.support import import_helper support.requires('audio') from test.support import findfile ossaudiodev = import_helper.import_module('ossaudiodev') import errno import sys import sunau import time import audioop import unittest # Arggh, AFMT_S16_NE not defined on all platforms -- se...
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c), 2018-2019, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/lice...
# # 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 us...
# # This source file is part of the EdgeDB open source project. # # Copyright 2016-present MagicStack Inc. and the EdgeDB 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...
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of data model for SVC monitor """ from pysandesh.gen_py.sandesh.ttypes import SandeshLevel from cfgm_common.vnc_db import DBBase from cfgm_common import svc_info class DBBaseSM(DBBase): obj_type = __name__ ...
################################### # Category theoretic monadic types. ################################### class Monad(object): "A simple base class for any monadic type to inherit from" def is_monad(self): return True class Maybe(Monad): "The base class for the Maybe monadic type" def __init__(self): su...
import base64 import json import os import shutil import tempfile import zipfile import docopt import pkg_resources import six import dcoscli from dcos import cmds, emitting, http, options, servicemanager, util from dcos.errors import DCOSException from dcos.package import get_package_manager from dcos.util import md...
# # 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 us...
#!/usr/bin/env python # # ROS node to interface with Naoqi speech recognition and text-to-speech modules # Tested with NaoQI: 1.12 # # Copyright (c) 2012, 2013, Miguel Sarabia # Imperial College London # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that th...
import sys import os.path import os import subprocess import datetime import time from itertools import product from collections import defaultdict USE_SBATCH = True USE_QSUB = False QSUB_WORK_QUEUE = 'normal' MEASURE_PERFORMANCE = False MAX_TRIES = 10 RUN_LOCAL = False #Multicore settings MAX_CORES = 4 MAX_MEMORY_...
import xml.etree.ElementTree as ET """ elemToString This takes in content, a node, and returns the inner text """ def elemToString(content): return ET.tostring(content, encoding='utf8', method='text') """ cleanElemToString This takes in content, a node, and returns the inner text with only one space between words...
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# 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/env python """ This program generates a pkl file containing a list of dictionaries. Each dictionary in the list represents a condensedlet. The dictionaries have the structure: {'core': array of ints of core points, 'condensed': array of ints of condensed points, 'plume': array of ints of plume points, 'u_con...
# Copyright 2013 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...
"""ISO 8601 date time string parsing Basic usage: >>> import iso8601 >>> iso8601.parse_date("2007-01-25T12:00:00Z") datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.iso8601.Utc ...>) >>> Copyright (c) 2007 - 2013 Michael Twomey Permission is hereby granted, free of charge, to any person obtaining a copy of this...
from __future__ import unicode_literals from django.contrib import messages from django.contrib.auth.decorators import permission_required from django.contrib.auth.mixins import PermissionRequiredMixin from django.db import transaction from django.db.models import Count from django.shortcuts import get_object_or_404, ...
from __future__ import absolute_import from itertools import imap from django.conf import settings from dimagi.ext.couchdbkit import * import re from dimagi.utils.couch.database import iter_docs from dimagi.utils.decorators.memoized import memoized from corehq.apps.cachehq.mixins import QuickCachedDocumentMixin from ...
#!/usr/bin/env python # # University of California, Santa Barbara # Computer Science # # CS16 # This script grabs a directory from the TURNIN dir # and it uncompresses all the work turned in by the students # into another output directory usually assigned as an argument. # # Victor Fragoso <vfragoso@cs.ucsb.edu> # 02/...
import unittest, time, sys, random, logging sys.path.extend(['.','..','py']) import h2o, h2o_cmd,h2o_hosts, h2o_browse as h2b, h2o_import as h2i, h2o_hosts, h2o_glm import h2o_exec as h2e, h2o_jobs DO_IMPORT_CHECK = True class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() ...
import sys import traceback from browser import document as doc from browser import window, alert, console _credits = """ Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information.""" _copyright = """Copyright (c) 2012...
# 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 sys,pdb from Board import Board from Tkinter import * class Game: # Constants SQUARE_SIZE = 80 VER_SHIFT_MARGIN = 50 HOR_SHIFT_MARGIN = 150 COLOR_2 = '\033[91m' COLOR_1 = '\033[93m' COLOR_RC = '\033[96m' COLOR_END = '\033[0m' CELL_WIDTH = 15 class Player: def __init__(self, flats, capstones): ...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2012,2013 Contributor # # 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...
from npc.character.tags import GroupTag, Tag class TestSavesDefaultValues: def test_saves_list_values(self): tag = GroupTag('group', 'guys', 'dolls') assert 'guys' in tag assert 'dolls' in tag def test_saves_keyword_values(self): tag = GroupTag('group', guys=Tag('rank'), dolls=...
import pysam import sys import csv import os import argparse from quicksect import IntervalNode from random import randint, seed def getOverlap(a, b): return max(0, min(a[1], b[1]) - max(a[0], b[0])) def is_rRNA(read,chr): find_list_rRNA=find(read.reference_start, read.reference_end , tree_rRNA[chr]) ...
""" RobotX Docker Client Docker containers as slaves for running automation tests. Author: ybian <chuijiaolianying@gmail.com> """ import sys import logging import docker # from docker import Client class Docker(object): """ Docker Client """ def __init__(self, docker_server=None): self.lo...
from __future__ import absolute_import, division, print_function import math import itertools import operator import pytest from datetime import datetime, date from cytoolz import pluck import datashape import blaze from blaze.compute.python import (nunique, mean, rrowfunc, rowfunc, ...
from __future__ import unicode_literals # encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ProductImage._order' db.add_column('shop_productimage', '_...
# Python import pytest import mock import json import os import six from datetime import timedelta # Django from django.core.urlresolvers import resolve from django.core.cache import cache from django.utils.six.moves.urllib.parse import urlparse from django.utils import timezone from django.contrib.auth.models import...
""":py:mod:`postgres` is a high-value abstraction over `psycopg2`_. Installation ------------ :py:mod:`postgres` is available on `GitHub`_ and on `PyPI`_:: $ pip install postgres We `test <https://travis-ci.org/gittip/postgres.py>`_ against Python 2.6, 2.7, 3.2, and 3.3. We don't yet have a testing matrix for ...
# Copyright 2020 Datera # 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 applic...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .. import Error, Tags, Warning, register REFERRER_POLICY_VALUES = { 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-ori...
import operator import sys import unittest import numpy import pytest import chainer from chainer.backends import cuda from chainer import basic_math from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import backend from chainer.utils import type_check...
# -*- coding: utf-8 -*- """ Created on Wed Mar 20 12:27:37 2013 @author: Andrew """ import cv2, time, numpy as np, serial as ps class ChaseBall(object): def __init__(self): self.imgScale = np.array([1.0, 1.0 , 1.0], np.float32) self.ballFound = False self.fr...
#!/usr/bin/python # # Copyright 2013 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 a...
#!/usr/bin/env python # 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 # di...
#!/usr/bin/env python # encoding: ISO8859-1 """ Copyright (c)2011, Hideyuki Tanaka 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 ...
# Copyright (c) 2013-2014 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 # # Un...
# -*- coding: utf-8 -*- """ theflasktest.testsuite ~~~~~~~~~~~~~~~ Tests Flask itself. The majority of Flask is already tested as part of Werkzeug. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import os import...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Raw data collector for coverage.py.""" import os, sys from coverage import env from coverage.backward import iitems from coverage.files import abs_file from co...
#!/usr/bin/env python # Copyright (c) 2014-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same director...
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.minigame.Purchase from panda3d.core import CollisionNode, CollisionPolygon, Lens, Point3, Texture, Vec3, Vec4, lookAt from direct.directnotify import DirectNotifyGlobal from direct.gui import DirectGuiGlobals as DGG from direct.showbase.PythonUtil impo...
# coding=utf-8 # Copyright 2018 HuggingFace 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 a...
import tkinter import theory.bellmanFord as bellmanFord ################ ## Controller ## ################ class SimulationController(): def __init__(self, mode, parent): self._model = SimulationModel() self._view = SimulationView(self, parent) self._mode = mode self._model.enterInactiveState() self._...
# Copyright (c) 2011 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 requir...
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozil...
""" Creates a table objects from the fits files arranged into the default file structure, as used by GALAH and from the table observations Authors: Janez Kos (jkos@physics.usyd.edu.au), Sanjib Sharma, Ghayandi de Silva, Sarah Martell, GALAH collaboration barycentric and heliocentric calculation by Andy Casey and astro...
# -*- coding: utf-8 -*- from plivo.utils import to_param_dict from plivo.utils.validators import * from ..base import ListResponseObject, PlivoResource, PlivoResourceInterface class Identity(PlivoResource): _name = 'Identity' _identifier_string = 'id' def update(self, country_iso=None, ...
# -*- coding: utf-8 -*- """This file contains a appfirewall.log (Mac OS X Firewall) parser.""" import datetime import logging import pyparsing from plaso.events import time_events from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers import manager from plaso.parsers import text_parser _...
import copy import warnings import numpy import six from chainer import backend from chainer.backends import cuda from chainer import configuration from chainer.dataset import convert from chainer.dataset import iterator as iterator_module from chainer import function from chainer import iterators from chainer import...
from collections import deque import os import pickle import time import numpy as np import cv2 import tensorflow as tf class LanderState(object): def __init__(self, l_pos, l_v, base_pos, fuel): self.l_pos = l_pos self.l_v = l_v self.base_pos = base_pos self.fuel = fuel def _to_p...
# -*- coding: utf-8 -*- from ethereum.slogging import getLogger from ethereum.utils import big_endian_to_int from raiden.encoding import messages, signing from raiden.encoding.format import buffer_for from raiden.encoding.signing import recover_publickey from raiden.utils import publickey_to_address, sha3, ishash, pex...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
import sys, inspect from fixture.command.generate import ( DataHandler, register_handler, FixtureSet, NoData, UnsupportedHandler) from fixture import SQLAlchemyFixture try: import sqlalchemy except ImportError: sqlalchemy = False class TableEnv(object): """a shared environment of sqlalchemy Table ...
"""Support for Radio Thermostat wifi-enabled home thermostats.""" import logging import radiotherm import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, CURRENT_HVAC_ID...
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor an...
from __future__ import print_function from test_orm import OrloDbTest import arrow import unittest __author__ = 'alforbes' class TestStats(OrloDbTest): ENDPOINT = '/stats' def setUp(self): super(OrloDbTest, self).setUp() for r in range(0, 3): self._create_finished_release() ...
# Standard Python packages import math import numbers # Special dependencies import numpy class InfiniteType: def __init__(self, multiplier=1.): if multiplier == 0.: raise ZeroDivisionError, "Cannot multiply infinity and zero." self._multiplier = multiplier def __repr__(self): if self...
import numpy import types, time from numpy.ma import * from numpy.core.numerictypes import float32 from numpy.ma.core import umath from numpy.testing import * pi = numpy.pi def eq(v,w, msg=''): result = allclose(v,w) if not result: print """Not eq:%s %s ---- %s"""% (msg, str(v), str(w)) return resu...
""" exec_command Implements exec_command function that is (almost) equivalent to commands.getstatusoutput function but on NT, DOS systems the returned status is actually correct (though, the returned status values may be different by a factor). In addition, exec_command takes keyword arguments for (re-)defining enviro...
#!/usr/bin/env python """ Reads original Excel spreadsheets from various authors and builds one new master Excel file. """ import sys import openpyxl import unicodecsv columns = [ "collection", "filename", "page numbers", "pages in document", "main title", "sub title", "alt title", "...
"""Support for MQTT humidifiers.""" import functools import logging import voluptuous as vol from homeassistant.components import humidifier from homeassistant.components.humidifier import ( ATTR_HUMIDITY, ATTR_MODE, DEFAULT_MAX_HUMIDITY, DEFAULT_MIN_HUMIDITY, DEVICE_CLASS_DEHUMIDIFIER, DEVICE...
# # # Copyright (C) 2010, 2011, 2012 Google 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
from deciderType import deciderType class deciderTypeAirplane(deciderType): """Austin's Airplane Finder""" def startup(self): self.setDeciderName("DeciderTypeAirplane") self.planeThreshold = 4 # number of tests that must pass to count as a plane # load correlation data from file ...
########################################################################## # # Copyright (c) 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: # # * Redistrib...
import sys import time from datetime import date, datetime from decimal import Decimal try: basestring except NameError: basestring = str class OrientRecord(object): """ Object that represent an Orient Document / Record """ oRecordData = property(lambda self: self.__o_storage) def __str_...
# -*- coding: utf-8 -*- from rdflib import py3compat __doc__ = py3compat.format_doctest_out(""" The :class:`~rdflib.resource.Resource` class wraps a :class:`~rdflib.graph.Graph` and a resource reference (i.e. a :class:`rdflib.term.URIRef` or :class:`rdflib.term.BNode`) to support a resource-oriented way of working wit...
import asyncio import uuid from waterbutler.core.streams import BaseStream from waterbutler.core.streams import MultiStream from waterbutler.core.streams import StringStream class FormDataStream(MultiStream): """A child of MultiSteam used to create stream friendly multipart form data requests. Usage: >>...
#!/usr/bin/env python from strands_executive_msgs.msg import Task import rospy import json import requests from calendar import timegm from dateutil import parser from dateutil import tz from datetime import datetime from datetime import timedelta from strands_executive_msgs.srv import CreateTask from pprint import pp...
import pytest import numpy as np from devito import (Grid, TimeFunction, SparseTimeFunction, Function, Operator, Eq, SubDimension, SubDomain, configuration, solve) from devito.finite_differences import Derivative from devito.finite_differences.differentiable import diff2sympy from devito.exceptions...
# Copyright 2009-present MongoDB, 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 wri...
from workalendar.core import WesternCalendar, ChristianMixin from workalendar.core import MON, TUE, FRI, SAT, SUN from datetime import date, timedelta class Australia(WesternCalendar, ChristianMixin): "Australia" include_good_friday = True include_easter_monday = True include_queens_birthday = False ...
from importlib import import_module import inspect import os import re from django import template from django.apps import apps from django.conf import settings from django.contrib import admin from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.core.excepti...