gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar" _path_str = "bar.insidetextfont" _valid_props = {"color", "colorsrc", "family",...
from __future__ import unicode_literals import json import boto import sure # noqa from moto import ( mock_autoscaling, mock_cloudformation, mock_ec2, mock_elb, mock_iam, ) from .fixtures import ( single_instance_with_ebs_volume, vpc_single_instance_in_subnet, ec2_classic_eip, vp...
"""A generic rest serving layer for NDB models.""" import logging import sys from google.appengine.api import namespace_manager from google.appengine.ext import db import flask import flask.views from appengine import user def command(func): """Command decorator - automatically dispatches methods.""" setattr(f...
"""Tests for the WiLight integration.""" from unittest.mock import patch import pytest import pywilight from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_HS_COLOR, DOMAIN as LIGHT_DOMAIN, ) from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON, ...
import os import sys import numpy as np from ..pakbase import Package from ..utils import Util2d, Util3d class ModflowBcf(Package): """ MODFLOW Block Centered Flow Package Class. Parameters ---------- model : model object The model object (of type :class:`flopy.modflow.Modflow`) to whic...
# # pandas documentation build configuration file, created by # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # se...
import IPython, graphviz, re from io import StringIO from IPython.display import Image import numpy as np import pandas as pd import math from sklearn import tree from sklearn.datasets import load_boston, load_iris from collections import defaultdict import string import re YELLOW = "#fefecd" # "#fbfbd0" # "#FBFEB0" B...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a complete example where you have to push an order to Fulfil.IO. The steps are: 1. Fetch inventory for the products that have been sold 2. Create new customer, address 3. Process the order. """ from datetime import date from decimal import Decimal ...
# Copyright 2014 Cloudbase Solutions Srl # 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 r...
import itertools import logging.config import os import unittest from botocore.exceptions import ClientError from docker.errors import APIError from mock import MagicMock, Mock, call, patch from requests.exceptions import ConnectionError, SSLError from testfixtures import LogCapture from captain import exceptions fro...
#!/usr/bin/env python # Copyright 2017 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 ...
# SVD module from lxml import etree as et arights = ('read-only', 'read-write', 'write-only', 'writeOnce', 'read-writeOnce') __version__ = '1.0.1' default_xml = ('<device><name>NEW_DEVICE</name>' '<version>1.0</version>' '<description>Default CMSIS device</description>' '...
# -*- coding:utf-8 -*- import numpy as np def quick_sort(a): quick_sort_call(a, 0, len(a) - 1) def quick_sort_call(a, sp, ep): if sp >= ep: return pivot = partition(a, sp, ep) quick_sort_call(a, sp, pivot - 1) quick_sort_call(a, pivot + 1, ep) def partition(a, sp, ep): i = j = sp ...
# 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/env python import vtk def main(): colors = vtk.vtkNamedColors() # Set the background color. colors.SetColor("BkgColor", [51, 77, 102, 255]) titles = list() textMappers = list() textActors = list() uGrids = list() mappers = list() actors = list() renderers = list(...
from PresentationObject import PresentationObject from img import img from font import font from qt import QColor import math # ceil() import os import time true = success = 1 false = failure = 0 class equation( img ): """ &lt;equation&gt; uses LaTeX code to insert math characters. The following programs must be...
import asynchat import errno import socket import struct import RPCProto import string import sys from xdrlib import Packer, Unpacker from traceback import print_exc from SocketServer import ThreadingTCPServer # FIXME: get rid of these... VERSION = RPCProto.RPC_VERSION CALL = RPCProto.CALL REPLY...
#!/usr/bin/env python # coding:utf-8 import platform import env_info import urlparse import json import os import re import subprocess import cgi import urllib2 import sys import datetime import locale import time import hashlib from xlog import getLogger xlog = getLogger("gae_proxy") from config import config fr...
#!/usr/bin/env python """An unofficial Python API for http://kickass.to/ Supports searching and getting popular torrents from the home page. Search results can be made more precise by using Categories and can be sorted according to file size, seeders etc. @author Stephan McLean @email stephan.mclean2@m...
import scipy.stats as stats import matplotlib.pyplot as plt import MySQLdb from wsd.database import MySQLDatabase import matplotlib.cm as cm from matplotlib.colors import LogNorm, Normalize, BoundaryNorm, PowerNorm from conf import * from collections import defaultdict import cPickle as pickle import pandas as pd impor...
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, 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 b...
''' Name: Tim Molleman Doel: Dit script wordt gebruikt om MigrantsData(1999-2015) naar een json-file om te zetten ''' import csv import json codes_data = [ ["af", "AFG", "Afghanistan"], ["ax", "ALA", "Aland Islands"], ["al", "ALB", "Albania"], ["dz", "DZA", "Algeria"], ["as", "ASM", "American Samo...
_input_connector_schema = { 'type': 'object', 'properties': { 'connector_type': {'type': 'string'}, 'connector_access': {'type': 'object'} }, 'required': ['connector_type', 'connector_access'], 'additionalProperties': False } _result_connector_schema = { 'type': 'object', 'p...
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
# coding=utf-8 # Copyright 2019 The Interval Bound Propagation 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 ...
#!/usr/bin/env python2 # Copyright (c) 2016 The Zcash 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 BitcoinTestFramework from test_framework.authproxy import JSONRPCException...
''' List View =========== .. versionadded:: 1.5 .. warning:: This code is still experimental, and its API is subject to change in a future version. The :class:`~kivy.uix.listview.ListView` implements an :class:`~kivy.uix.abstractview.AbstractView` as a vertical, scrollable,pannable list clipped to the scrol...
from __future__ import unicode_literals from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_init, post_save from django.utils import timezone from django.utils.encoding im...
import torch import p3b7 as bmk import candle import numpy as np import torch.nn as nn from torch.utils.data import DataLoader from data import P3B3, Egress from mtcnn import MTCNN, Hparams from util import to_device from meters import AccuracyMeter from metrics import F1Meter from prune import ( negative_prune...
""" This file contains a class that holds the TimeSeries class. This class is used to "manage" the time series within PASTAS. It has methods to change a time series in frequency and extend the time series, without losing the original data. August 2017, R.A. Collenteur """ from logging import getLogger import pandas...
# -*- coding: utf-8 -*- # # xarray documentation build configuration file, created by # sphinx-quickstart on Thu Feb 6 18:57:54 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
"""Test the Z-Wave JS config flow.""" import asyncio from unittest.mock import patch import pytest from zwave_js_server.version import VersionInfo from homeassistant import config_entries, setup from homeassistant.components.hassio.handler import HassioAPIError from homeassistant.components.zwave_js.config_flow impor...
"""SmartFactory code generator base. Base of code generator for SmartFactory that provides SmartSchema object in accordance with given internal model. """ # pylint: disable=W0402 # pylint: disable=C0302 import codecs import os import string import uuid import re from model.enum import Enum from model.enum_element im...
# Copyright (c) 2011 - 2017, Intel Corporation. # # 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 agre...
# test_codecs.py from CPython 2.7, modified for Jython from test import test_support import unittest import codecs import locale import sys, StringIO if not test_support.is_jython: import _testcapi class Queue(object): """ queue: write bytes at one end, read bytes from the other end """ def __init_...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Boot session from cache or build Session bootstraps info needed by common client side activities including permission, homepage, default variables, system defaults etc """ im...
import argparse import os import re import shutil import subprocess import tempfile import xml.etree.cElementTree as xml import zipfile from os import path SRC_ROOTS_REGEX = re.compile(r'^\s*src_roots\s*=\s*(.*)$') BUCK_FILE_TEMPLATE = """{library_type}( name = '{name}', srcs = {sources}, deps = [ {deps} ], ...
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 compatibility library from six im...
""" Functions and classes used to extend a GATK tool with Python. GATK uses two FIFOs to communicate wth Python. The "ack" FIFO is read by GATK and written by Python code, and is used to signal that a Python command has completed execution. The "data" FIFO is written by GATK and read by Python, and is used to pass dat...
# 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 to in writing, s...
# encoding: utf-8 from collections import defaultdict import datetime from decimal import Decimal import logging from django.core.exceptions import ObjectDoesNotExist from django.core.management import call_command from south.db import db from south.v2 import DataMigration from django.db import models from corehq.apps....
import tempfile import uuid from django.core.management import call_command from django.db import DataError from django.test import TestCase from django.test import TransactionTestCase from le_utils.constants import content_kinds from mock import call from mock import patch from .sqlalchemytesting import django_conne...
from mobiletrans.mtdistmap.transit_network import TransitNetwork """ from mobiletrans.mtdistmap import cta_conn tn = cta_conn.load_transitnetwork() tn.shortest_path("Red_40330", 'Red_40900') tn.shortest_path("Red_40900", 'Red_40330') tn.shortest_path("Red_41320", 'Red_40650') tn.shortest_path("Red_40650", 'Red_41320'...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """vtlooku...
from django.utils.datastructures import SortedDict from django.utils.translation import ugettext_lazy as _lazy # The number of answers per page. ANSWERS_PER_PAGE = 20 # The number of questions per page. QUESTIONS_PER_PAGE = 20 # Highest ranking to show for a user HIGHEST_RANKING = 100 # Special tag names: ESCALATE_...
from sympy.core import S from sympy.integrals.quadrature import (gauss_legendre, gauss_laguerre, gauss_hermite, gauss_gen_laguerre, gauss_chebyshev_t, gauss_chebyshev_u, gauss_jacobi) def test_legend...
"""Compute Linearly constrained minimum variance (LCMV) beamformer.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Roman Goj <roman.goj@gmail.com> # Britta Westner <britta.wstnr@gmail.com> # # License: BSD-3-Clause import numpy as np from ..rank import compute_rank from ..io.meas_i...
#!/usr/bin/env python """ @package ion.agents.instrument.test.test_high_volume @file ion/agents.instrument/test_high_volume.py @author Bill French @brief Test cases for high volume agents """ __author__ = 'Bill French' import simplejson, urllib, os, unittest, gevent from mock import patch import sys import time imp...
#!/usr/bin/env python # # Copyright 2007 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...
""" We have four main abstractions: Users, Collections, Memberships, and Roles. Users represent people, like students in a school, teachers for a classroom, or volunteers setting up informal installations. There are two main user types, ``FacilityUser`` and ``DeviceOwner``. A ``FacilityUser`` belongs to a particular f...
# -*- coding: utf-8 -*- """ A real simple app for using webapp2 with auth and session. It just covers the basics. Creating a user, login, logout and a decorator for protecting certain handlers. Routes are setup in routes.py and added in main.py """ # standard library imports import logging import jso...
#!/usr/bin/env python from __future__ import print_function import sys from builtins import map from builtins import object import argparse import os from PyAnalysisTools.base.ShellUtils import make_dirs, copy class ModuleCreator(object): """ Class to setup a new analysis module """ def __init__(self...
###################################### Sparse Autoencoder ############################################ ## Author: Sara Regina Ferreira de Faria ## Email: sarareginaff@gmail.com #Needed libraries import numpy import matplotlib.pyplot as plt import pandas import math import scipy.io as spio import scipy.ndimage from skl...
from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from lrs import models, views import datetime from django.utils.timezone import utc from django.utils import timezone import hashlib import urllib import os import json import base64 import ast class Activity...
# -*- coding: utf-8 -*- from ccxt.async.base.exchange import Exchange import base64 import hashlib from ccxt.base.errors import ExchangeError class btcturk (Exchange): def describe(self): return self.deep_extend(super(btcturk, self).describe(), { 'id': 'btcturk', 'name': 'BTCTurk...
# -*- coding: utf-8 -*- """ Tests for Series timezone-related methods """ from datetime import datetime import pytest import pytz import numpy as np from dateutil.tz import tzoffset import pandas.util.testing as tm from pandas._libs.tslibs import timezones, conversion from pandas.compat import lrange from pandas.core...
"Parses and creates Grammar objects" import os.path import sys from copy import copy, deepcopy from io import open from .utils import bfs, eval_escaping from .lexer import Token, TerminalDef, PatternStr, PatternRE from .parse_tree_builder import ParseTreeBuilder from .parser_frontends import LALR_TraditionalLexer fr...
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# # 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 # ...
""" Cisco_IOS_XR_infra_dumper_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR infra\-dumper package configuration. This module contains definitions for the following management objects\: exception\: Core dump configuration commands Copyright (c) 2013\-2015 by Cisco Systems, Inc. All ri...
from django import VERSION as DJANGO_VERSION from django.contrib.auth.models import Group, Permission from django.test import TestCase from wagtail.core.models import GroupPagePermission, Page from wagtail.tests.testapp.models import BusinessIndex, EventCategory, EventPage from wagtail.tests.utils import WagtailTestUt...
""" Fuzz Testing for Thrift Services """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import collections import imp import itertools import json import logging import os import pprint import random ...
from __future__ import with_statement from copy import copy import re import sys from django.core.cache import cache from django.conf import settings from django.contrib.auth.models import Permission from django.core.urlresolvers import clear_url_caches from django.http import Http404 from django.template import Vari...
import unittest from mako import ast from mako import compat from mako import exceptions from mako import pyparser from test import eq_ from test import requires_python_2 from test import requires_python_3 exception_kwargs = {"source": "", "lineno": 0, "pos": 0, "filename": ""} class AstParseTest(unittest.TestCase)...
# 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Midokura Japan K.K. # Copyright (C) 2013 Midokura PTE LTD # 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 th...
#!/usr/bin/env python """Events framework with publisher, subscriber and repository.""" __author__ = 'Dave Foster <dfoster@asascience.com>, Michael Meisinger' import functools import sys import traceback from gevent import event as gevent_event from pyon.core import bootstrap from pyon.core.exception import BadRequ...
"""Support for Hyperion remotes.""" import json import logging import socket import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, ATTR_HS_COLOR, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_EFFECT, LightEntity, ) from homeas...
#!/usr/bin/env python """ Download Padova isochrones from: http://stev.oapd.inaf.it/cgi-bin/cmd Adapted from ezpadova by Morgan Fouesneau: https://github.com/mfouesneau/ezpadova """ import os try: from urllib.parse import urlencode from urllib.request import urlopen except ImportError: from urllib import ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
import os import shutil import tempfile import unittest from pyparams import ( _bool_check, _str_list_check, _str_dict_check, _Param, ParamError, PARAM_TYPE_BOOL, PARAM_TYPE_INT, ...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python wrapper for Android uiautomator tool.""" import sys import os import subprocess import time import itertools import json import hashlib import socket import re import collections DEVICE_PORT = int(os.environ.get('UIAUTOMATOR_DEVICE_PORT', '9008')) LOCAL_PORT = ...
#!/usr/bin/python # # HD44780 LCD Driver for RaspberryPI # # Author: Daniele Costarella <daniele.costarella@gmail.com> # # Date: 07/03/2014 # __author__ = "Daniele Costarella" __credits__ = ["Daniele Costarella"] __license__ = "MIT" __version__ = "0.1.0" import RPi.GPIO as GPIO from time import sleep """ Ra...
import functools import logging from copy import deepcopy from jsonschema import ValidationError from .decorators import validation from .decorators.decorator import (BeginOfRequestLifecycleDecorator, EndOfRequestLifecycleDecorator) from .decorators.metrics import UWSGIMetricsCollec...
""" .. _intro_basic_tracking: ============================== Introduction to Basic Tracking ============================== Local fiber tracking is an approach used to model white matter fibers by creating streamlines from local directional information. The idea is as follows: if the local directionality of a tract/p...
# lesson2.py # Stand-alone script to run the code from the lesson2-matsaleh.ipynb Jupyter Notebook. ''' Lesson 3 Assignment Plan: 1. Start with Vgg16 model with binary output and weights from lesson2.5.py. 2. Create an overfitted model: a. Split conv and FC layers into two separate models. b. Precalculate FC ...
# -*- coding: utf-8 -*- # Copyright 2013 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 requi...
"""aospy.Run objects for observational data.""" import datetime from aospy.run import Run from aospy.data_loader import NestedDictDataLoader # CRU cru_v322 = Run( name='v3.22', description='CRU v3.22', data_direc='/archive/Spencer.Hill/obs/HadCRU/3.22', data_dur=113, data_start_date=datetime.datet...
""" An experimental support for curvilinear grid. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import zip from itertools import chain from .grid_finder import GridFinder from .axislines import AxisArtistHelper, GridHelperB...
"""`Percept`""" import numpy as np import matplotlib.pyplot as plt from matplotlib.axes import Subplot from matplotlib.animation import FuncAnimation from math import isclose import imageio import logging from skimage import img_as_uint from skimage.transform import resize from ..utils import Data, Grid2D, deprecated...
import numpy as np from veros import VerosSetup, veros_routine from veros.variables import allocate, Variable from veros.core.operators import numpy as npx, update, at from veros.pyom_compat import load_pyom, setup_pyom from test_base import compare_state yt_start = -39.0 yt_end = 43 yu_start = -40.0 yu_end = 42 ...
"Test posix functions" from test import support try: import posix except ImportError: raise support.TestSkipped("posix is not available") import time import os import pwd import shutil import unittest import warnings warnings.filterwarnings('ignore', '.* potential security risk .*', R...
"""KDDCUP 99 dataset. A classic dataset for anomaly detection. The dataset page is available from UCI Machine Learning Repository https://archive.ics.uci.edu/ml/machine-learning-databases/kddcup99-mld/kddcup.data.gz """ import sys import errno from gzip import GzipFile from io import BytesIO import logging import ...
from __future__ import print_function from __future__ import unicode_literals import unittest import mongoengine from bson import DBRef, ObjectId from pyramid import testing from pyramid.request import Request from mongoengine_relational.relationalmixin import set_difference, equals from tests_mongoengine_relation...
import numpy as np from numba import cuda, int32, int64, float32, float64 from numba.cuda.testing import unittest, CUDATestCase, skip_on_cudasim from numba.core import config def useful_syncwarp(ary): i = cuda.grid(1) if i == 0: ary[0] = 42 cuda.syncwarp(0xffffffff) ary[i] = ary[0] def use_s...
"""The tests for the Script component.""" # pylint: disable=protected-access from datetime import timedelta import functools as ft from unittest import mock import asynctest import jinja2 import voluptuous as vol import pytest import homeassistant.components.scene as scene from homeassistant import exceptions from ho...
# pylint: disable-msg=E1101,W0612 import operator import pytest from numpy import nan import numpy as np import pandas as pd from pandas import Series, DataFrame, bdate_range from pandas.core.common import isnull from pandas.tseries.offsets import BDay import pandas.util.testing as tm from pandas.compat import range...
""" This example will probe selected switches based on pre-planned probing algorithm ./pox.py log.level --DEBUG MultiSwitchPreplannedProbing sudo mn --custom ~/mininet/custom/topo-6sw.py --topo mytopo --mac --switch ovsk --controller remote """ from pox.core import core import pox log = core.getLogger() from pox.lib...
# coding: utf-8 from __future__ import absolute_import # The following YAML grammar is LL(1) and is parsed by a recursive descent # parser. # # stream ::= STREAM-START implicit_document? explicit_document* # STREAM-END # implicit_document ::...
#!/usr/bin/env python """ Copyright 2010-2017 University Of Southern California 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 appli...
#! /usr/bin/env python # -*- coding: utf-8 -*- '''Tests cribbed from linkscape/processing/test/robotstxt.test.old.cc''' import unittest import reppy import logging from reppy import Utility reppy.logger.setLevel(logging.FATAL) MYNAME = 'rogerbot' class TestOldMozscape(unittest.TestCase): @staticmethod def ...
# -*- coding: utf-8 -*- # Author: Joris Jensen <jjensen@techfak.uni-bielefeld.de> # # License: BSD 3 clause from __future__ import division import numpy as np from scipy.optimize import minimize from sklearn.utils import validation from .rslvq import RslvqModel class LmrslvqModel(RslvqModel): """Localized Mat...
''' Created on Apr 20, 2015 @author: root ''' import mock import testtools from paxes_nova.virt.ibmpowervm.ivm import operator from paxes_nova.virt.ibmpowervm.ivm.common import Connection from paxes_nova.virt.ibmpowervm.ivm import exception from decimal import Decimal from paxes_nova.virt.ibmpowervm.ivm.operator imp...
""" Core OpenBCI object for handling connections and samples from the board. EXAMPLE USE: def handle_sample(sample): print(sample.channels) board = OpenBCIBoard() board.print_register_settings() board.start(handle_sample) NOTE: If daisy modules is enabled, the callback will occur every two samples, hence "packet_...
# coding=utf-8 """ Collects all number values from the db.serverStatus() command, other values are ignored. #### Dependencies * pymongo #### Example Configuration MongoDBCollector.conf ``` enabled = True hosts = localhost:27017, alias1@localhost:27018, etc ``` """ import diamond.collector from diamond.c...
######################### #### General Imports #### ######################### import sys import os import cProfile import pstats import StringIO import time from idaapi import * from idautils import * from idc import * ### DIE Imports### import DIE.Lib.DieConfig import DIE.Lib.DataParser from DIE.Lib.DIE_Exceptions...
# 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_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page ...
#!/usr/bin/env python import math import random import pygame import sys screen_width = 640 screen_height = 480 screen_size = screen_width, screen_height press_events = pygame.KEYDOWN, pygame.MOUSEBUTTONDOWN screen = None wait_time = 2000 # Display each shape for 2 seconds def write_text( screen, text, color, big ...