gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- encoding: utf-8 -*- from __future__ import print_function import json import time import codecs from . errorObjs import * from collections import namedtuple, defaultdict __all__ = ["LogEnvManager","LogEnvironment", "LogAgent"] Position = namedtuple('position', ['x', 'y']) class DictAttr(dict): """A speci...
# coding=utf-8 from collections import defaultdict import datetime import decimal import logging from json import dumps, loads, JSONEncoder import django from django.conf import settings from django.core import serializers from django.http import HttpResponse, Http404 from django.utils.crypto import constant_time_comp...
# Copyright 2001-2013 Python Software Foundation; All Rights Reserved # https://github.com/aliles/funcsigs - Licenced under the Apache 2.0 # Licence - see: licences/FUNCSIGS.rst """Function signature objects for callables Back port of Python 3.3's function signature tools from the inspect module, modified to be compat...
import time import datetime import uuid import os import sys import os.path import threading import zipfile import hashlib import string from future.utils import iteritems from globus_sdk import TransferClient from globus_sdk import TransferData from globus_sdk import NativeAppAuthClient from globus_sdk import Refresh...
""" SQLite3 backend for Hachi, used during analysis. """ import re import sys import datetime from django.analysis.tracer import mark_sql_call, is_analysis_running, \ is_analysis_paused, taint, in_view, is_tainted from django.db import utils from django.db.backends import * from django.db.backends.signals impor...
#!/usr/bin/env python # ------------------------------------------------------------------------------ # Name: SerializeKiller # Purpose: Finding vulnerable java servers # # Author: (c) John de Kroon, 2015 # Version: 1.0.2 # ---------------------------------------------------------------------------...
import numpy as np import time import socket import math import random import traceback import serialWrapper import packetBuilder import packetParser from collections import deque from serial.tools import list_ports ############################## ## Hokuyo socket parameters ## ## Should go into main prog ## #########...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# Copyright 2016 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
from collections import OrderedDict import numpy from numpy.testing import assert_raises, assert_equal from picklable_itertools import repeat from six.moves import zip, range, cPickle from fuel.datasets import Dataset, IterableDataset, IndexableDataset from fuel.streams import DataStream from fuel.schemes import Shuf...
import collections import datetime import random import re import StringIO import sys import bio import features import vcf DELETE_BASE = '-' class ProbabilisticFasta(object): ''' generate fasta with probabilities attached from mapped fragments ''' def __init__( self, log=None ): self.genome = {} #...
# 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 io import json import autobahn.websocket.types as A from twisted.trial import unittest from twisted.internet import error from twisted.internet.defer import Deferred, DeferredList from twisted.internet.protocol import Protocol, Factory, connectionDone from twisted.test.proto_helpers import StringTransport from...
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2022 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from collections import defaultdict from flask import g from sqlalchemy impo...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Urwid unicode character processing tables # Copyright (C) 2004-2011 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; e...
#!/usr/bin/env python from StringIO import StringIO from unittest import TestCase, main from collections import defaultdict from americangut.results_utils import ( filter_mapping_file, clean_and_reformat_mapping, count_unique_sequences_per_otu, write_bloom_fasta ) class ResultsUtilsTests(TestCase): def s...
from __future__ import division, absolute_import, print_function __all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'block', 'hstack', 'stack', 'vstack'] import functools import operator import warnings from . import numeric as _nx from . import overrides from ._asarray import array, asanyarray from .mu...
from sympy import (Symbol, zeta, nan, Rational, Float, pi, dirichlet_eta, log, zoo, expand_func, polylog, lerchphi, S, exp, sqrt, I, exp_polar, polar_lift, O, stieltjes, Abs, Sum, oo) from sympy.core.function import ArgumentIndexError from sympy.functions.combinatorial.numbers impo...
import copy from ctypeslib.codegen import typedesc from funcs import find_unqualified_type def _signatures_types(funcs, items): """Given a sequence of typedesc.Function instances, generate a set of all typedesc instances used in function declarations.""" arguments = set() for f in funcs: for ...
""" Routines for interacting with AutoDock Vina program These routines were developed by: Rodrigo Antonio Faccioli - rodrigo.faccioli@usp.br / rodrigo.faccioli@gmail.com Leandro Oliveira Bortot - leandro.bortot@usp.br / leandro.obt@gmail.com """ import sys import os import ntpath from subprocess...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.logging_v2.proto import logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class ConfigServiceV2Stub(o...
# -*- test-case-name: calendarserver.push.test.test_applepush -*- ## # Copyright (c) 2011-2015 Apple 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.a...
import struct import sys import math from .encoding import encode as base_pack, decode as unpack from .object_update import decode_obj_update_packet from .enumerations import * def pack(fmt, *args): return base_pack(fmt, args) class SoftDecodeFailure(RuntimeError): pass PACKETS = {} def packet(n): def w...
# Copyright 2019 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, ...
from datetime import datetime, timedelta import logging from urllib.parse import urlencode from django import forms from django.contrib import messages from django.contrib.auth.mixins import PermissionRequiredMixin from django.http import Http404, HttpResponseRedirect, JsonResponse from django.shortcuts import get_obje...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # Copyright (c) 2018-2019 NVIDIA CORPORATION. All rights reserved. import torch # transpose FLIP_LEFT_RIGHT = 0 FLIP_TOP_BOTTOM = 1 class BoxList(object): """ This class represents a set of bounding boxes. The bounding boxes are repr...
import os import numpy as np import argparse import time import librosa import glob from preprocess import * from model import * from sklearn.utils import shuffle from sklearn.preprocessing import LabelEncoder, OneHotEncoder from utility import * def get_files_labels(pattern: str): files = glob.glob(pattern) ...
""" Covariance estimators using shrinkage. Shrinkage corresponds to regularising `cov` using a convex combination: shrunk_cov = (1-shrinkage)*cov + shrinkage*structured_estimate. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile ...
# Copyright 2013 VMware, 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 ap...
# BEGIN_COPYRIGHT # # Copyright 2009-2013 CRS4. # # 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 os import sys import pytest import glob from tests.lib.path import Path def test_install_from_future_wheel_version(script, data): """ Test installing a future wheel """ from tests.lib import TestFailure package = data.packages.join("futurewheel-3.0-py2.py3-none-any.whl") result = scri...
"""Support for UV data from openuv.io.""" import asyncio import logging from pyopenuv import Client from pyopenuv.errors import OpenUvError import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_API_KEY, CONF_BINARY_SENSORS,...
from shapely.geometry.multipolygon import MultiPolygon from shapely.geometry.polygon import Polygon from shapely.ops import cascaded_union, unary_union from shapely.validation import explain_validity import pyclipper def _coords(shape): """ Return a list of lists of coordinates of the polygon. The list consis...
# -*- coding: utf-8 -*- import json import os import time import unittest.mock from .. import base from girder.api import access from girder.api.describe import describeRoute from girder.api.rest import getApiUrl, loadmodel, Resource from girder.constants import AccessType, registerAccessFlag, ROOT_DIR, VERSION from g...
from datetime import date, time, timedelta from decimal import Decimal import random from django.db.models import F, Func, Value from django.db.models.functions import Concat from django.test import TestCase from django.utils import timezone from django_bulk_update import helper from .models import Person, Role, Per...
"""Reward analysis functions.""" from __future__ import absolute_import import numpy as np import pandas as pd import itertools as it from collections import defaultdict import warnings from scipy.ndimage.morphology import binary_dilation from . import behavior_analysis as ba from . import new_intervals as ints from...
# coding: utf-8 # # `travelmaps2`: An updated version of `travelmaps` # # I did not want to change `travelmaps`, as it is a blog entry. # # These functions are very basic, and include almost no checking or similar at all. Feel free to fork and improve them! # In[1]: import shapefile import numpy as np import matp...
""" Some common utilities for Uptane, to be assigned to more sensible locations in the future. """ from __future__ import print_function from __future__ import unicode_literals import uptane # Import before TUF modules; may change tuf.conf values. import tuf import tuf.formats import json import os import shutil impor...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required b...
# -*- coding: utf-8 -*- from wakatime.main import execute from wakatime.packages import requests import logging import os import shutil import sys from testfixtures import log_capture from wakatime.compat import u from wakatime.constants import API_ERROR, SUCCESS from wakatime.packages import certifi from wakatime.p...
import re import urllib import difflib from grab.tools import rex from grab.error import DataNotFound from rdflib import URIRef, Literal, Graph from rdflib.plugins.stores.sparqlstore import SPARQLStore from rdflib.namespace import RDF, RDFS, XSD, FOAF from base import Parser, ListParser, create_proceedings_uri, find_...
import argparse, json, os, random, subprocess, sys, time from parcellearning.utilities import gnnio from parcellearning.utilities.load import load_schema, load_model from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.metrics import f1_score import torch fro...
import django from django.core import mail from django.test import TestCase try: try: from django.utils import unittest except PendingDeprecationWarning: import unittest except ImportError: import unittest # NOQA try: from django.test.utils import override_settings except ImportError: ...
from __future__ import division import numpy as np from itertools import combinations_with_replacement from .core import Data, Summary, Propensity, PropensitySelect, Strata from .estimators import OLS, Blocking, Weighting, Matching, Estimators class CausalModel(object): """ Class that provides the main tools of C...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import json from django.utils.encoding import force_bytes from email.utils import formatdate from urllib.parse import parse_qsl from time import time from services.utils import ( get_cdn_url, log_configure, mypool, settings, PLATFORM_NAMES_TO_CONSTANTS) # This has to be imported after the settings so statsd know...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.apps import apps from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.forms import ChoiceField, widgets from django.template import TemplateDoesNotExist from django.template.l...
from sympy import ( Abs, Dummy, Eq, Gt, LambertW, Piecewise, Poly, Rational, S, Symbol, acos, atan, atanh, cos, erf, erfinv, erfc, erfcinv, exp, log, pi, sin, sinh, sqrt, symbols, tan, tanh, atan2, arg, Lambda, imageset, cot, acot, I, EmptySet, Union, E, Interval, oo) from sympy.core.function i...
"""The tests for the MQTT binary sensor platform.""" import json import unittest from unittest.mock import ANY, Mock, patch from datetime import timedelta import homeassistant.core as ha from homeassistant.setup import setup_component, async_setup_component from homeassistant.components import binary_sensor, mqtt fro...
# Copyright (c) 2014 Red Hat, 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...
#!/usr/bin/env python import argparse import copy import hashlib import json import logging import os import shutil import struct import subprocess import tempfile import xml.etree.ElementTree as ET from collections import defaultdict from Bio.Data import CodonTable logging.basicConfig(level=logging.INFO) log = loggi...
"""This section introduces classes used by pulsar :ref:`wsgi application <apps-wsgi>` to pass a request/response state during an HTTP request. .. contents:: :local: The :class:`WsgiRequest` is a thin wrapper around a WSGI ``environ`` dictionary. It contains only the ``environ`` as its private data. The :class:`Ws...
""" A Maximum-Entropy model for backbone torsion angles. Reference: Rowicka and Otwinowski 2004 """ import numpy from csb.statistics.pdf import BaseDensity class MaxentModel(BaseDensity): """ Fourier expansion of a biangular log-probability density """ def __init__(self, n, beta=1.): """ ...
import os import sys import shutil import os.path as op from textwrap import dedent import argparse import subprocess as sp import nipype from nipype import Node, SelectFiles, DataSink, IdentityInterface from nipype.interfaces import fsl import lyman import lyman.workflows as wf from lyman import tools from lyman.t...
"""Module with view factor calculation tools""" from pvfactors.config import MIN_X_GROUND, MAX_X_GROUND, DISTANCE_TOLERANCE from pvfactors.geometry.timeseries import TsLineCoords, TsPointCoords from pvlib.tools import cosd, sind import numpy as np class VFTsMethods(object): """This class contains all the methods...
from oslo.config import cfg import addons src = cfg.OptGroup(name='src', title='Credentials and general config for source cloud') src_opts = [ cfg.StrOpt('type', default='os', help='os - OpenStack Cloud'), cfg.StrOpt('auth_url', default='-', help='Keystone servi...
"""Bridges between the `asyncio` module and Tornado IOLoop. .. versionadded:: 3.2 This module integrates Tornado with the ``asyncio`` module introduced in Python 3.4 (and available `as a separate download <https://pypi.python.org/pypi/asyncio>`_ for Python 3.3). This makes it possible to combine the two libraries on...
from __future__ import unicode_literals from collections import OrderedDict import six class Memoize(object): """ This class is meant to be used as a decorator. It decorates a class so that values can be cached (and later pruned from that cache). Usage: class Foo(object): @Mem...
#A script to create custom POX flows #http://github.com/abh15/pox-flowgen #import random #fname="poxscript_"+str(random.randint(1000,9999))+".py" #uncomment above lines if each script with a new name is required fname="controllerScript.py" file=open(fname,'w') file.close() #----create a new empty file---- target=o...
import pickle import codecs from hashlib import md5 from datetime import datetime from elasticsearch_dsl import document, field, Mapping from elasticsearch_dsl.exceptions import ValidationException, IllegalOperation from pytest import raises class MyInner(field.InnerObjectWrapper): pass class MyDoc(document.Doc...
"""Support for Tasmota sensors.""" from __future__ import annotations from datetime import datetime from typing import Any from hatasmota import const as hc, sensor as tasmota_sensor, status_sensor from hatasmota.entity import TasmotaEntity as HATasmotaEntity from hatasmota.models import DiscoveryHashType from homea...
# -*- coding: utf-8 -*- """This module defines commonly used pieces for widgets""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from logging import getLogger from math import sqrt from builtins import str from collec...
# orm/__init__.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Functional constructs for ORM configuration. See the SQLAlchemy object relation...
# -*- coding: utf-8 -*- # @Author: Zachary Priddy # @Date: 2016-05-03 08:06:32 # @Last Modified by: Zachary Priddy # @Last Modified time: 2016-06-26 16:21:46 import logging from core.models.command import Command as ffCommand from core.models.device import Device from core.models.event import Event as ffEvent from...
import pytest from osf.utils.workflows import DefaultStates, RequestTypes from osf_tests.factories import ( AuthUserFactory, NodeRequestFactory, PreprintFactory, PreprintProviderFactory, PreprintRequestFactory, ProjectFactory, ) from osf.utils import permissions @pytest.mark.django_db class No...
#!/usr/bin/env python import sqlite3 import serial from threading import Timer import logging import hashlib import os.path from time import sleep from datetime import datetime, timedelta from sys import exit import paho.mqtt.client as paho import RPi.GPIO as GPIO import config DIR = os.path.dirname(os.path.realpath...
import os, configparser, sys, string, re from fnmatch import fnmatch def writeMakefile(type): config = Config('bakefile.ini') settings = ProjectSettings(config, type) bakefile = Bakefile(settings) bf = open('generated-bakefile.bkl', 'w', newline='') bf.write(bakefile.generateProgram(type)) bf.close() def runBa...
""" Celery Worker Setup """ import abc import asyncio import logging import os import re from functools import wraps import subprocess from importlib import import_module import aiohttp from celery import Celery, Task from celery.signals import celeryd_init from kombu import serialization import simplejson from .....
# 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...
#!/usr/bin/env python """ A unittest script for the VisitAttribute module. """ import unittest from CutlassTestConfig import CutlassTestConfig from CutlassTestUtil import CutlassTestUtil # pylint: disable=W0703, C1801 class VisitAttributeTest(unittest.TestCase): """ Unit tests for the VisitAttribute class """ ...
"""Support for the iZone HVAC.""" import logging from typing import Optional, List from pizone import Zone, Controller from homeassistant.core import callback from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const import ( HVAC_MODE_HEAT_COOL, HVAC_MODE_COOL, ...
#!/usr/bin/env python3 """ BLIF/EBLIF parsing, writing and manipulation utilities. BLIF format specification: https://course.ece.cmu.edu/~ee760/760docs/blif.pdf EBLIF format specification: https://docs.verilogtorouting.org/en/latest/vpr/file_formats/#extended-blif-eblif """ import re from collections import ...
""" HTML Widget classes """ import copy import datetime import re import warnings from contextlib import suppress from itertools import chain from django.conf import settings from django.forms.utils import to_current_timezone from django.templatetags.static import static from django.utils import datetime_safe, format...
#!/usr/bin/env python class Node(object): def __init__(self, key): self.__key = key self.__parent = None self.__left_child = None self.__sibling = None def __lt__(self, node): """Making nodes sortable""" return self.key < node.key @property def key(s...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates test runner factory and tests for GTests.""" # pylint: disable=W0212 import logging import os import sys from pylib import constants from pyl...
from tkinter import * from tkinter import ttk from collections import defaultdict from tkinter import messagebox class loadingGUI(): def __init__(self, master): self.master = master self.master.title("Dataset selection") master.protocol("WM_DELETE_WINDOW", self.catch_destroy) # S...
"""Fab file for the blog project (install on Vex.net)""" from fabric.api import * from fabric.contrib import project from fabric.contrib.files import exists import os, glob, datetime, subprocess env.user = 'mcfletch' env.product = 'webtoys' env.product_dir = os.path.join('/opt',env.product,'current' ) env.virtual_env =...
# -*- coding: utf-8 -*- """ Created on Mon Feb 08 23:00:39 2016 @author: perrytsao """ import cv2 import numpy as np import itertools from datetime import datetime timestamp="{:%Y_%m_%d_%H_%M}".format(datetime.now()) # load params to undistort images calfile=np.load('camera_cal_data_2016_02_20_03_09.npz') newcamera...
# 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...
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2016 Paul Watkins, National Institutes of Health / NINDS # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction...
#!/usr/bin/env python3 """ clang-tidy and clang-format related tools for the euphoria project """ import argparse import os import subprocess import re import collections import sys import json import typing import statistics from timeit import default_timer as timer import compile_commands as cc HEADER_SIZE = 65 H...
import numpy as np import librosa import six from os import environ import sklearn from sklearn.externals import joblib import os import sox import tempfile as tmp import matplotlib.pyplot as plt from sklearn.ensemble import RandomForestClassifier from scipy.stats import mode from collections import namedtuple import o...
# Copyright 2015 HGST # 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 applicab...
# # # File: utilities.py # # # # # # # File: data_acquisition.py # Class for monitoring data acquisition # # import time import json class Data_Acquisition(object): def __init__(self): pass def process_fifteen_second_data( self, chainFlowHandle,chainOjb, parameters, event): print ("received 1...
# -*- coding: utf-8 -*- # Copyright 2017 DST Controls # # 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 ...
# 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 ...
# Copyright 2013 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
from __future__ import print_function from __future__ import unicode_literals from inspect import getdoc from operator import attrgetter import logging import re import signal import sys from docker.errors import APIError import dockerpty from .. import __version__ from .. import legacy from ..const import DEFAULT_TI...
from ctypes import * import datetime import traceback import sys import os.path from time import sleep def errorCheck(stat): """Check the error status and print if error""" if stat != 0: print stat print c_char_p(veristandInterOp.GetLastErrorMessage()) quit() #print os.path.abspat...
""" Support for Osram Lightify. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.osramlightify/ """ import logging import socket import random from datetime import timedelta import voluptuous as vol from homeassistant import util from homeassistant...
# # 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...
# 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 ...
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
import unittest import string from tests import * from binding import Context from contenthandling import ContentHandler import generators class TestsTest(unittest.TestCase): """ Testing for basic rest test methods """ def test_parse_test(self): """ Test basic ways of creating test objects from input ...
import cgi import urllib from google.appengine.api import users from google.appengine.ext import ndb import webapp2 from myadmin import * from utils import * from chichar import * from sentence import * from word import * from viewstat import * from chartest import * from drawing i...
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2014 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including with...
import argparse import numpy as np import pyx import suspect import os from cubric_mrs import voxel, table # define some useful global parameters voxel_outline_color = pyx.color.rgb(1, 1, 0) voxel_outline_width = pyx.style.linewidth(1.0) plot_linewidth = pyx.style.linewidth(0.01) simple_plot_color = pyx.color.rgb(0, ...
# Copyright 2010-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 a 3-clause BSD style license - see LICENSE.rst import itertools import pytest import numpy as np from numpy.testing import assert_allclose from astropy.convolution.utils import discretize_model from astropy.modeling.functional_models import ( Gaussian1D, Box1D, RickerWavelet1D, Gaussian2D, Box2D...
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code...