gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Installs and configures heat """ import uuid import logging import os from packstack.installer import utils from packstack.installer import validators from packstack.modules.ospluginutils import (getManifestTemplate, manifestfiles, ...
#!/usr/local/bin/python2.7-32 """ @brief Joystick control for the QuickBot. @description This program is used to drive the QuickBot via a joystick (actually gamepad). Currently setup for tank drive. @author Rowland O'Flaherty (rowlandoflaherty.com) @date 12/10/2013 @note Does not work with 64-bit python This code wa...
from markdown import markdown from keras_autodoc import autogen from keras_autodoc import get_methods import pytest import sys import pathlib from typing import Union, Optional, Tuple from .dummy_package import dummy_module from . import dummy_package test_doc1 = { "doc": """Base class for recurrent layers. # Arg...
import unittest import mock from sure import expect from simpleflow import activity, format, futures from simpleflow.swf.executor import Executor from swf.models.history import builder from swf.responses import Response from tests.data import DOMAIN, BaseTestWorkflow, increment from tests.utils import MockSWFTestCase...
#!/usr/bin/env python3 # reproduce_character_models.py # Reproduce predictive modeling of characters. # This script assumes that you have subset.tar.gz # in the parent directory of the /train_models directory # directory. It also expects to have a /temp directory # as a sibling (at the same level as /train_models). ...
# 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# -*- coding: utf-8 -*- # This script is designed to be run as a Web2Py application: # python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py # or # python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A testscript import argparse import unittest from gluon import current from gl...
########################################################################## # # Copyright (c) 2018, 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...
""""Vendoring script, python 3.5 with requests needed""" # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False import os import re import shutil import tarfile import zipfile from pathlib import Path import invoke import requests TASK_NAME = 'update' FILE_WHITE_...
# 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...
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
# encoding: utf-8 """ Constant values related to the Open Packaging Convention, in particular, content types and relationship types. """ class CONTENT_TYPE(object): """ Content type URIs (like MIME-types) that specify a part's format """ BMP = ( 'image/bmp' ) DML_CHART = ( 'ap...
""" API views """ import hashlib import itertools import json import random import urllib from datetime import date, timedelta from django.core.cache import cache from django.db.transaction import non_atomic_requests from django.http import HttpResponse, HttpResponsePermanentRedirect from django.utils.decorators impor...
""" Client class. Base class for the clients. """ import logging from abc import ABCMeta, abstractmethod from json import dumps as serialize from json import loads as deserialize from typing import Any, Callable, Dict, Iterator, List, Optional, Union from apply_defaults import apply_config, apply_self # type: ignore...
import scipy import numpy as np from pyqtgraph.metaarray import MetaArray def downsample(data, n, axis=0, xvals='subsample'): """Downsample by averaging points together across axis. If multiple axes are specified, runs once per axis. If a metaArray is given, then the axis values can be either subsampled ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 compli...
# -*- coding: utf8 -*- # # Copyright (c) 2016 Linux Documentation Project from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import io import os import uuid import errno import codecs import random from tempfile import NamedTemporaryFile as ntf from argparse impo...
# (C) Copyright 2015,2016 Hewlett Packard Enterprise Development LP from __future__ import absolute_import import os import re import docker from monasca_agent.collector import checks CONTAINER_ID_RE = re.compile('[0-9a-f]{64}') DEFAULT_BASE_URL = "unix://var/run/docker.sock" DEFAULT_VERSION = "auto" DEFAULT_TIMEO...
# 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...
# -*- coding: utf-8 -*- # Copyright 2016 Open Permissions Platform Coalition # 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...
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
#!/usr/bin/env python """This file defines the base classes for Flows. A Flow is a state machine which executes actions on the client. Messages are transmitted between the flow object and the client with their responses introduced into a state handler within the flow. The flow can send messages to a client, or launch...
import abc import csv from tempfile import NamedTemporaryFile from typing import List from django.http import HttpResponse, HttpRequest from binder.json import jsonloads from binder.router import list_route class ExportFileAdapter: """ Adapter between the data that is exported, and the export file """ __metacla...
# # 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 module conatins helper functions and utilities. """ from flash.models import Collection, Deck from flash import queries import string import random import os import StringIO import xlrd, xlwt def parse_deck_template_file(card_template, file_contents, mappings=None, custom=False): """Parses a spreadsheet...
# Copyright (c) 2014 VMware, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 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 law ...
# 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...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from sklearn.linear_model import LogisticRegression as MaxEnt import copy import random import collections from itertools import izip import constants import helper import warnings from predict import evaluatePrediction import pdb warnings.filterwarnings("ignore") class Classifier(object): def __init__(self, T...
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from test import run_only from mock import MagicMock from mock import patch from mock import call from diamond....
import time import gym import numpy as np import tensorflow as tf from stable_baselines import logger from stable_baselines.common import explained_variance, ActorCriticRLModel, tf_util, SetVerbosity, TensorboardWriter from stable_baselines.common.runners import AbstractEnvRunner from stable_baselines.common.policies...
# coding: utf-8 """ Deals with generating the site-wide navigation. This consists of building a set of interlinked page and header objects. """ from __future__ import unicode_literals import datetime import logging import os from mkdocs import utils, exceptions log = logging.getLogger(__name__) def filename_to_t...
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
# 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 writing,...
"""Convert a csv file to an sqlite table.""" import sys import csv import sqlite3 import os import re # pointer to our csv file descriptor csvFile = None columnNames = None columnTypes = None columnComments = None validDataTypes = ["string", "number", "date"] idColumnName = "_id" outfileName = None outfileExtension =...
# -*- coding: latin-1 -*- import random import sys sys.path.append("..") #so other modules can be found in parent dir from Player import * from Constants import * from Construction import CONSTR_STATS from Ant import UNIT_STATS from Move import Move from GameState import addCoords from AIPlayerUtils import * ## #AI...
import usocket as socket import ustruct as struct from ubinascii import hexlify class MQTTException(Exception): pass class MQTTClient: def __init__(self, client_id, server, port=0, user=None, password=None, keepalive=0, ssl=False, ssl_params={}): if port == 0: port = 8883...
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from numpy import (abs, sum, sin, cos, sqrt, log, prod, where, pi, exp, arange, floor, log10, atleast_2d, zeros) from .go_benchmark import Benchmark class Parsopoulos(Benchmark): r""" Parsopoulos obje...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- ''' Bottom Sheets ============= `Material Design spec Bottom Sheets page <http://www.google.com/design/spec/components/bottom-sheets.html>`_ In this module there's the :class:`MDBottomSheet` class which will let you implement your own Material Design Bottom Sheets, and there are two classes ca...
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012, 2013 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 no...
'''Class SigFig for repressenting digits of a measurement that convey meaningful inormation (i.e. are significant). ''' from __future__ import absolute_import from decimal import Decimal from collections import defaultdict from hlab.lexing import Lexer, LexicalError from hlab.bases import AutoRepr valid_digits =...
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from django.core.urlresolvers import reverse from exam import fixture from social_auth.models import UserSocialAuth from sentry.models import UserOption, LostPasswordHash, User from sentry.testutils import TestCase class RegisterTest(TestC...
# Copyright (c) 2010 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 ...
"""This module contains the class that defines the interaction between different modules that govern agent's behavior. """ from tqdm import tqdm import pandas as pd import numpy as np import torch from torch import zeros, ones, tensor from pyro import clear_param_store, get_param_store from pyro.infer import SVI, Tr...
"""Implementations of osid abstract base class search_orders.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' and includ...
"""Support for Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier with humidifier entity.""" from enum import Enum import logging import math from miio.airhumidifier import OperationMode as AirhumidifierOperationMode from miio.airhumidifier_miot import OperationMode as AirhumidifierMiotOperationMode from miio.airhumi...
#!/usr/bin/env python3 # Copyright (c) 2018 The Navcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import NavCoinTestFramework from test_framework.staticr_util import * #imp...
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
"""Tests for Vizio config flow.""" import pytest import voluptuous as vol from homeassistant import data_entry_flow from homeassistant.components.media_player import DEVICE_CLASS_SPEAKER, DEVICE_CLASS_TV from homeassistant.components.vizio.config_flow import _get_config_schema from homeassistant.components.vizio.const...
"""Home Assistant auth provider.""" import base64 from collections import OrderedDict import logging from typing import Any, Dict, List, Optional, Set, cast # noqa: F401 import bcrypt import voluptuous as vol from homeassistant.const import CONF_ID from homeassistant.core import callback, HomeAssistant from homeass...
import os from django import http from django.db.transaction import non_atomic_requests from django.shortcuts import get_object_or_404, redirect import caching.base as caching import commonware.log from mobility.decorators import mobile_template from olympia import amo from olympia.amo.urlresolvers import reverse fr...
from __future__ import with_statement from contextlib import contextmanager from fudge import Fake, patched_context, with_fakes import unittest from nose.tools import eq_, raises, ok_ import random import sys import fabric from fabric.tasks import WrappedCallableTask, execute, Task, get_task_details from fabric.main ...
# encoding: utf-8 """ attribute.py Created by Thomas Mangin on 2009-11-05. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from struct import pack from exabgp.bgp.message.notification import Notify from exabgp.util.cache import Cache # ================================================================...
"""Imported from the recipes section of the itertools documentation. All functions taken from the recipes section of the itertools library docs [1]_. Some backward-compatible usability improvements have been made. .. [1] http://docs.python.org/library/itertools.html#recipes """ from collections import deque from ite...
from sqlalchemy import cast from sqlalchemy import Column from sqlalchemy import func from sqlalchemy import MetaData from sqlalchemy import select from sqlalchemy import String from sqlalchemy import Table from sqlalchemy import testing from sqlalchemy import TypeDecorator from sqlalchemy import union from sqlalchemy....
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, 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.apach...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import numpy as np def write_array(fname, xa): fp = open(fname,"w") for x in xa: s = '%lf\n' % x fp.write(s) fp.close() def read_array(fname): fp = open(fname,"r") fl = fp.readlines() x = np.fromfile(fname, dtype=np.float32, sep='\n') fp.close() return x def write_two_arrays(fname, xa, ya): ...
# Author: Andrew.M.G.Reynen from __future__ import print_function from future.utils import iteritems from PyQt5 import QtWidgets, QtCore, QtGui from PyQt5.QtCore import Qt from lazylyst.UI.Configuration import Ui_ConfDialog from Actions import Action, ActionSetupDialog # Configuration dialog class ConfDialog(QtWidge...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.xmlrpc import client as xmlrpc_client import os import mock from flexget.plugins.clients.rtorrent import RTorrent torrent_file = os.path.join(os.path.d...
""" Topological sort. From Tim Peters, see: http://mail.python.org/pipermail/python-list/1999-July/006660.html topsort takes a list of pairs, where each pair (x, y) is taken to mean that x <= y wrt some abstract partial ordering. The return value is a list, representing a total ordering that respects all the inpu...
# -*- coding: utf-8 -*- """Linear Filters for time series analysis and testing TODO: * check common sequence in signature of filter functions (ar,ma,x) or (x,ar,ma) Created on Sat Oct 23 17:18:03 2010 Author: Josef-pktd """ #not original copied from various experimental scripts #version control history is there fr...
# 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...
#!/usr/bin/python2.4 # # Copyright 2008 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 o...
""" WebAPI provides a thin wrapper over `Steam's Web API <https://developer.valvesoftware.com/wiki/Steam_Web_API>`_ It is very friendly to exploration and prototyping when using ``ipython``, ``notebooks`` or similar. The ``key`` will determine what WebAPI interfaces and methods are available. .. note:: Some endpo...
from lettuce import step, world from survey.features.page_objects.indicators import NewIndicatorPage, ListIndicatorPage from survey.models import QuestionModule, Batch, Indicator @step(u'And I visit new indicator page') def and_i_visit_new_indicator_page(step): world.page = NewIndicatorPage(world.browser) wor...
from contextlib import suppress import functools import os from os.path import dirname, join, realpath from pprint import pformat from subprocess import DEVNULL, Popen import sys import shutil import tempfile import requests from app.client.cluster_api_client import ClusterMasterAPIClient, ClusterSlaveAPIClient from ...
from future import standard_library standard_library.install_aliases() from builtins import str from configparser import ConfigParser import errno import logging import os import sys import textwrap try: from cryptography.fernet import Fernet except: pass def generate_fernet_key(): try: FERNET_K...
import urllib2 try: import xml.etree.cElementTree as xml except ImportError: import xml.etree.ElementTree as xml from datetime import datetime import logging import socket from util import create_xml_from_dict, dict_ignore_nones from api_exceptions import CommsException, InvalidResponse import parse import set...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# -*- coding: utf-8 -*- # Copyright 2020 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright (C) 2014,2015 VA Linux Systems Japan K.K. # Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp> # 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 t...
""" This module (mostly) uses the XenAPI to manage Xen virtual machines. Big fat warning: the XenAPI used in this file is the one bundled with Xen Source, NOT XenServer nor Xen Cloud Platform. As a matter of fact it *will* fail under those platforms. From what I've read, little work is needed to adapt this code to XS/...
import py, pytest import os from _pytest.resultlog import generic_path, ResultLog, \ pytest_configure, pytest_unconfigure from _pytest.main import Node, Item, FSCollector def test_generic_path(testdir): from _pytest.main import Session config = testdir.parseconfig() session = Session(config) p1...
#!/usr/bin/python ############################################################################### # Copyright 2017 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of t...
import sys import os import gzip import zipfile from optparse import make_option from django.conf import settings from django.core import serializers from django.core.management.base import BaseCommand from django.core.management.color import no_style from django.db import connections, router, transaction, DEFAULT_DB_...
""" Support for the Netatmo binary sensors. The binary sensors based on events seen by the Netatmo cameras. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.netatmo/. """ import logging import voluptuous as vol from homeassistant.component...
#!/usr/bin/env python """ Subrequest for partial content checks. """ from configparser import SectionProxy import random from typing import TYPE_CHECKING from redbot.resource.active_check.base import SubRequest from redbot.formatter import f_num from redbot.speak import Note, categories, levels, display_bytes from r...
#!/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...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import ( BooleanField, CharField, ChoiceField, DateField, DateTimeField, DecimalField, EmailField, FileField, FloatField, Form, GenericIPAddressField, IntegerField...
# Copyright (c) 2015 Mirantis 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 writ...
# coding: utf-8 from __future__ import division, unicode_literals """ Module containing analysis classes which compute a pourbaix diagram given a target compound/element. """ from six.moves import zip __author__ = "Sai Jayaraman" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.0" __maintain...
from __future__ import print_function import zmq import socket import dill import uuid from collections import defaultdict import itertools from multiprocessing.pool import ThreadPool import random from datetime import datetime from threading import Thread, Lock from contextlib import contextmanager import traceback i...
# # The Python Imaging Library. # $Id$ # ## # Image plugin for Palm pixmap images (output only). ## from . import Image, ImageFile from ._binary import o8, o16be as o16b # fmt: off _Palm8BitColormapValues = ( (255, 255, 255), (255, 204, 255), (255, 153, 255), (255, 102, 255), (255, 51, 255), (255, 0, 255)...
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Mon 13 Aug 2012 16:19:18 CEST """This module defines, among other less important constructions, a management interface that can be used by Bob to display information about the database and manage installed files. """ import os import abc import six def dbshell...
# Libraries built in to Google Apps Engine import sys import os import cgi import webapp2 import urllib2 import ee import config import json # Libraries that we need to provide ourselves in the libs folder rootdir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(rootdir, 'libs')) from bs4 im...
import unittest from ray.rllib.policy.sample_batch import SampleBatch, MultiAgentBatch from ray.rllib.utils.test_utils import check_same_batch class TestMultiAgentBatch(unittest.TestCase): def test_timeslices_non_overlapping_experiences(self): """Tests if timeslices works as expected on a MultiAgentBatch...
''' Copyright (c) 2012-2017, Agora Games, LLC All rights reserved. https://github.com/agoragames/kairos/blob/master/LICENSE.txt ''' from .exceptions import * from .timeseries import * import cql import time from datetime import date, datetime from datetime import time as time_type from decimal import Decimal from Qu...
# -*- coding: utf-8 -*- # Copyright 2018 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 require...
#! /usr/bin/python #this version saves data on text file #four routers from xbee import XBee, ZigBee import serial from time import sleep import re from datetime import datetime as dt from ConfigParser import SafeConfigParser config = SafeConfigParser() config.read('cfg_mag.ini') #PORT = config.get('port', 'xb') POR...
# 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...
# -*- test-case-name: foolscap.test.test_promise -*- from twisted.python import util from twisted.python.failure import Failure from twisted.internet import defer from foolscap.eventual import eventually id = util.unsignedID EVENTUAL, CHAINED, NEAR, BROKEN = range(4) class UsageError(Exception): """Raised when ...
print ("LAKE WASHING THE TABE. JOHNNY") print ("LAKE WASHING THE TABE. JOHNNY") print ("LAKE WASHING THE TABE. JOHNNY") print ("LAKE WASHING THE TABE. JOHNNY") print ("LAKE WASHING THE TABE. JOHNNY") print ("LAKE WASHING THE TABE. JOHNNY") print ("LAKE WASHING THE TABE. JOHNNY") print ("LAKE WASHING THE TABE. JO...
# Copyright 2011 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 a...
from csv import reader from django.core.management.base import BaseCommand, CommandError import os from django import db from geo import errors from geo.models import Geo from hmda.models import HMDARecord import sys import traceback import logging class Command(BaseCommand): args = "<path/to/20XXHMDALAR - Natio...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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/...