gt
stringclasses
1 value
context
stringlengths
2.49k
119k
''' JoyCursor ========= .. versionadded:: 1.10.0 The JoyCursor is a tool for navigating with a joystick as if using a mouse or touch. Most of the actions that are possible for a mouse user are available in this module. For example: * left click * right click * double click (two clicks) * moving the ...
''' Created on Nov 11, 2010 @author: Mark V Systems Limited (c) Copyright 2010-2013 Mark V Systems Limited, All rights reserved. ''' import os, re, datetime from collections import defaultdict from arelle import (XbrlConst, XbrlUtil, XmlUtil, UrlUtil, ModelXbrl, ModelDocument, ModelVersObject, Vers...
# coding=utf-8 """ Collect IO Stats Note: You may need to artifically generate some IO load on a disk/partition before graphite will generate the metrics. * http://www.kernel.org/doc/Documentation/iostats.txt #### Dependencies * /proc/diskstats """ import diamond.collector from diamond.collector import str_to_...
import numpy as np import pandas as pd from pvlib.tools import cosd, sind, tand from pvlib.pvsystem import ( PVSystem, Array, SingleAxisTrackerMount, _unwrap_single_value ) from pvlib import irradiance, atmosphere from pvlib._deprecation import deprecated @deprecated('0.9.0', alternative='PVSystem with SingleAxi...
""" pop.py Contains Population related classes Contributors: salvadordura@gmail.com """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import from builtins import map from builtins import range try: basestring excep...
#!/usr/bin/env python # coding=utf-8 ## @package biopredyn ## Copyright: [2012-2019] Cosmo Tech, All Rights Reserved ## License: BSD 3-Clause import sys import libsedml ## Representation of an algorithm in SED-ML workflows; an algorithm is defined ## using a KiSAO id along with several optional algorithm parameters....
""" oiot.job ~~~~~~~~~ This module implements the Job class. :copyright: (c) 2014 by Konstantin Bokarius. :license: MIT, see LICENSE for more details. """ import os, sys, traceback, binascii, json, random, string, \ datetime, uuid from datetime import datetime from .settings import _locks_c...
# -*- coding: utf-8 -*- """ Transformations from the breakdowns to some surface in 3-space (sometimes 2-space) Attributes: PROJECTIONS: A map of maps. The first map is keyed on the name of a family of projections, and the second is keyed on shape (3 or 4). For instance, PROJECTIONS['nslerp'][3] giv...
import py from rpython.rlib.jit import JitDriver, hint, set_param from rpython.rlib.jit import unroll_safe, dont_look_inside, promote from rpython.rlib.objectmodel import we_are_translated from rpython.rlib.debug import fatalerror from rpython.jit.metainterp.test.support import LLJitMixin from rpython.jit.codewriter.po...
# 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 use ...
"""STIX2 core versioning methods.""" from collections.abc import Mapping import copy import datetime as dt import itertools import uuid import stix2.base import stix2.registry from stix2.utils import ( detect_spec_version, get_timestamp, is_sco, parse_into_datetime, ) import stix2.v20 from .exceptions import ( ...
# keyboardString.py # Used to get a string of text entered by the user import pygame, sys from pygame.locals import * from Tkinter import Tk class keyboardString(object): def __init__(self, string): self.string = string self.start = 0 self.end = 0 self.cursor = 0 def addKeyPress(self, keyCode): # THIS METHO...
# -*- coding: utf-8 -*- from collections import namedtuple from struct import pack, unpack from .log import log from .main import DBFile from .structures import fields, StructureNotFound, getstructure, LocalizedStringField, LocalizedField from .utils import getfilename, generate_structure SEEK_CUR = 1 # os.SEEK_CUR ...
import logging assignments = [] def assign_value(values, box, value): """ Please use this function to update your values dictionary! Assigns a value to a given box. If it updates the board record it. """ values[box] = value if len(value) == 1: assignments.append(values.copy()) retu...
import os import unittest from peewee import CharField, BooleanField, ForeignKeyField, SqliteDatabase from playhouse.db_url import connect from playhouse.migrate import SqliteMigrator, MySQLMigrator, PostgresqlMigrator from playhouse.reflection import Introspector from . import VersionedModel from . import migrate ...
import rope.base.pyobjects from rope.base import exceptions, utils class PyName(object): """References to `PyObject`\s inside python programs""" def get_object(self): """Return the `PyObject` object referenced by this `PyName`""" def get_definition_location(self): """Return a (module, li...
"""UniFi sensor platform tests.""" from datetime import datetime from unittest.mock import patch from aiounifi.controller import MESSAGE_CLIENT, MESSAGE_CLIENT_REMOVED import pytest from homeassistant.components.device_tracker import DOMAIN as TRACKER_DOMAIN from homeassistant.components.sensor import DOMAIN as SENS...
# Copyright 2013 Rackspace Hosting 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 re...
# -*- coding: utf-8 -*- from __future__ import absolute_import import datetime import mock from django.utils import timezone from sentry.conf import settings from sentry.interfaces import Interface from sentry.models import Event, Group, Project, MessageCountByMinute, ProjectCountByMinute, \ SearchDocument from se...
############################################################################### # Caleydo - Visualization for Molecular Biology - http://caleydo.org # Copyright (c) The Caleydo Team. All rights reserved. # Licensed under the new BSD license, available at http://caleydo.org/license ######################################...
import sys import pythoncom from win32com.axscript.server.error import Exception from win32com.axscript import axscript from win32com.axscript.server import axsite from win32com.server import util, connect import win32com.server.policy from win32com.client.dynamic import Dispatch from win32com.server.exception import C...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 2 19:15:50 2017 @author: ajaver """ from tierpsy.analysis.stage_aligment.alignStageMotion import isGoodStageAligment, _h_get_stage_inv from tierpsy.helper.params import read_fps, read_microns_per_pixel, read_ventral_side from tierpsy import AUX_FIL...
"""Tests for certbot.auth_handler.""" import functools import logging import unittest import mock from acme import challenges from acme import client as acme_client from acme import messages from certbot import achallenges from certbot import errors from certbot import le_util from certbot.tests import acme_util ...
from __future__ import absolute_import from __future__ import print_function import ujson from django.http import HttpResponse from mock import patch from typing import Any, Dict from zerver.lib.initial_password import initial_password from zerver.lib.sessions import get_session_dict_user from zerver.lib.test_classe...
#!/usr/bin/python import json import socket import sys import time import os import array import math #import BGReadings import sensor from calibration import * from linreg import * BESTOFFSET = (60000 * 0) # Assume readings are about x minutes off from actual! def getTimeDelta(BRReading,CurSensor): return ((BRRea...
import time import datetime import pygiftgrab as pgg use_numpy = True try: import numpy as np except ImportError: use_numpy = False class StereoFrameBackwardsCompatibilityChecker(pgg.IObserver): """Descendant of GIFT-Grab's `Observer`, which will listen to `Observable`s for some time and when asked, ...
# Copyright (c) 2013 eNovance , 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 requ...
# Copyright 2012-2020 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) import re from html import escape import types import datetime from etgen.html import E from django.db import models from django.conf import settings from lino.utils.report import EmptyTable from lino...
""" Internal module for the plugin system, the API is exposed via __init__.py """ from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect from future.builtins import str from future.utils import with_metaclass from django.conf import settings from django.contrib import admin from django.contrib.cont...
# Copyright Dave Trollope 2014 # This source code is not to be distributed without agreement from # D. Trollope # # This example demonstrates how to code up a simple sequence server # which accepts connections using the TCP data flow module, # manages a service group and responds to sequences # from a client. # System...
# -*- coding: utf-8 -*- """ pygments.lexers.int_fiction ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for interactive fiction languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, b...
# # 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...
#!/usr/bin/env python """ a work in progress toy python interpreter """ # python 2/3 compatibility from __future__ import ( absolute_import, division, print_function, unicode_literals ) import sys if sys.version_info < (3, 0): input = raw_input # pylint: disable=redefined-builtin,invalid-name c...
import re valid_variable_match = re.compile(r'^[^\d][A-Za-z0-9\_]*$') class DAIndexError(IndexError): pass class DAAttributeError(AttributeError): pass class DAError(Exception): def __init__(self, value, code=501): self.value = value self.error_code = code super().__init__(value)...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Recipe module to ensure a checkout is consistent on a bot.""" from recipe_engine import recipe_api from PB.go.chromium.org.luci.buildbucket.proto import...
import os from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-Registry', 'Author': ['@mattifestation', '@harmj0y'], 'Description': ('Persist a stager (or script) via the HKLM:SOFTWARE\Microsoft\Windows\C...
# 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/...
import random import json from datetime import date, timedelta from django.test import TestCase from django.conf import settings from django.utils.six.moves import xrange from uwsgiit.api import UwsgiItClient from console.utils import daterange from console.models import * class MetricTesterMixin(): @classme...
#!/usr/bin/env python import functools import logging import os import subprocess from argparse import ArgumentParser, Action from collections import OrderedDict import sys import numpy import time import theano from theano.tensor.type import TensorType from pandas import DataFrame from blocks.algorithms import Grad...
import logging import os from sys import version import unittest import uuid import re import pytest from tests.waiter import cli, util @pytest.mark.cli @unittest.skipUnless(util.multi_cluster_tests_enabled(), 'Requires setting WAITER_TEST_MULTI_CLUSTER') @pytest.mark.timeout(util.DEFAULT_TEST_TIMEOUT_SECS) class M...
from itertools import combinations import numpy as np def _test(actual, expected, description=None, debug=False): """Compares the numerically derived list of Nash equilibria with the expected (analytical) solution, and prints the result of the comparison to screen. Keyword arguments: actual -- Numerically...
"""Survey Models """ import datetime from django.db import models from django.conf import settings from django.core.cache import cache from django.utils import encoding from django.template.defaultfilters import date as datefilter from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models ...
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2015 Corrado Ubezio # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the ri...
"""This module is based on the Steam WebAPI and can be used to get information about items in TF2. Using this module, you can obtain the item schema, store prices, bundles, item sets and attributes for TF2. You can also obtain market prices from backpack.tf. There are also functions for parsing the information of each...
#coding=utf-8 #2014.12.13 #author@shibin import json #import datetime import sys def get_part_info(input_fname,output_fname): def part_info(line_data): #----------------------- uin=json.loads(line_data).get('uin') if uin!=None:uin=str(uin) return uin #----------------------- ''' data_list=line_data....
import webapp2 from google.appengine.api import users from google.appengine.ext import ndb import jinja2 import os import logging import json import csv JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=['jinja2.ext.autoescape'], autoescape=True) class th...
# SPDX-License-Identifier: MIT # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2020 Tobias Gruetzmacher import argparse import contextlib import os import platform from pathlib import Path import appdirs from . import events, configurat...
import re import urwid from mitmproxy.tools.console import common from mitmproxy.tools.console import signals from mitmproxy.tools.console import statusbar from mitmproxy.tools.console import flowlist from mitmproxy.tools.console import flowview from mitmproxy.tools.console import commands from mitmproxy.tools.console...
# ----------------------------------------------------------------------- # Standalone and testing code import sys, struct try: import _idaapi except: print "Please try me from inside IDA" sys.exit(0) try: import pywraps pywraps_there = True print "Using pywraps" _idaapi.pyscv_init = pywr...
import warnings from typing import Callable, List, Optional, Tuple, Type, Union import numpy as np from sklearn.exceptions import UndefinedMetricWarning from seqeval.reporters import DictReporter, StringReporter from seqeval.scheme import Entities, Token, auto_detect PER_CLASS_SCORES = Tuple[List[float], List[float]...
from tornado.gen import multi from tornado.testing import gen_test from .. server import SocialServer from .. model.group import GroupFlags, GroupJoinMethod, GroupError, GroupsModel from .. model.request import NoSuchRequest from anthill.common import testing from .. import options as _opts class GroupsTestCase(te...
""" Unit tests for reverse URL lookups. """ from __future__ import unicode_literals import unittest from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist from django.core.urlresolvers import (reverse, resolve, get_callabl...
#!/usr/bin/env python # encoding: utf-8 """ Author: Isabel Restrepo A script that encapsulates 3d-registration algorithms in the PVM September 12, 2012 """ import os, sys, argparse sys.path.append(os.pardir) import reg3d if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--roo...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
# TODO: keep only classes, move functions to _utils, rename to preprocessor import os import numpy as np from scipy.io import savemat import nibabel import nipype.interfaces.spm as spm from nipype.interfaces import fsl from nipype.interfaces.base import BaseInterface, \ BaseInterfaceInputSpec, traits, File, Traite...
""" B2 Conan Generator This is a generator for conanbuildinfo.jam files declaring all conan dependencies as B2 project and library targets. This generates multiple tagged build info source files, each containing a single variant as specified by the user's conan install profile in addition to the central generic one th...
from __future__ import unicode_literals from decimal import Decimal from datetime import datetime from django.utils import datetime_safe from django.utils.encoding import smart_text from django.conf import settings try: from django.utils.encoding import force_text except ImportError: from django.utils.encodin...
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import itertools import json import mock impor...
#MIT License # #Copyright (c) 2017 Willian Fuks # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publi...
''' Created on Jan 11, 2014 @author: mxu This module does dirty work to handle gatt related request ''' import sqlite3 as lite import utils import bluetooth class sqls: sql_select_handles_in_range = ''' select handle, value, properties, permission from defaultTable where uuid = "%s" and handle >= "%...
# Copyright (c) 2014 Andrew Kerr. All rights reserved. # Copyright (c) 2015 Tom Barron. All rights reserved. # 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 ...
# Copyright 2012 Nebula, 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 agree...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # txaio documentation build configuration file, created by # sphinx-quickstart on Wed Mar 18 14:29:26 2015. # # 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 # auto...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin 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.mininode import * from test_framework.test_framework import BitcoinTestFramework from...
"""Conversion tool from EDF+,BDF to FIF """ # Authors: Teon Brooks <teon.brooks@gmail.com> # Martin Billinger <martin.billinger@tugraz.at> # # License: BSD (3-clause) import os import calendar import datetime import re import warnings from math import ceil, floor import numpy as np from ...utils import ve...
# 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...
from __future__ import print_function, division import os import sys root = os.path.join(os.getcwd().split('src')[0], 'src/defects') if root not in sys.path: sys.path.append(root) from prediction.model import nbayes, rf_model0 from py_weka.classifier import classify from utils import * from metrics.abcd import ab...
# # File : building.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of...
""" This is the syntax tree for Python 3 syntaxes. The classes represent syntax elements like functions and imports. All of the nodes can be traced back to the `Python grammar file <https://docs.python.org/3/reference/grammar.html>`_. If you want to know how a tree is structured, just analyse that file (for each Pytho...
""" (c) RIKEN 2015. All rights reserved. Author: Keitaro Yamashita This software is released under the new BSD License; see LICENSE. """ import iotbx.phil from cctbx import uctbx from cctbx import sgtbx from cctbx import crystal from cctbx.crystal import reindex from cctbx.uctbx.determine_unit_cell import NCDist from...
# (C) William W. Cohen and Carnegie Mellon University, 2016 import sys import re import math import os.path import collections import scipy.sparse as SS import scipy.io as SIO import numpy as NP import numpy.random as NR import logging from tensorlog import config from tensorlog import mutil from tensorlog import mat...
# Copyright 2015, The Lvn Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import os import sys import subprocess import tempfile _logger = logging.getLogger(__name__) class Branch(object): def __init_...
"""The test for the Ecobee thermostat module.""" from unittest import mock import pytest from homeassistant.components.ecobee import climate as ecobee import homeassistant.const as const from homeassistant.const import STATE_OFF @pytest.fixture def ecobee_fixture(): """Set up ecobee mock.""" vals = { ...
""" ============================ ``ctypes`` Utility Functions ============================ See Also --------- load_library : Load a C library. ndpointer : Array restype/argtype with verification. as_ctypes : Create a ctypes array from an ndarray. as_array : Create an ndarray from a ctypes array. References ----------...
""" <Program> decorators.py <Started> 6 July 2009 <Author> Justin Samuel <Purpose> These define the decorators used in seattlegeni code. Decorators are something we try to avoid using, so they should only be used if absolutely necessary. Currently we only use them for logging function calls (such as the ...
import json import os import sys import shutil import tempfile import unittest import ray from ray.rllib import _register_all from ray import tune from ray.tune.logger import NoopLogger from ray.tune.utils.placement_groups import PlacementGroupFactory from ray.tune.utils.trainable import TrainableUtil from ray.tune.f...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -*- coding: utf-8 -*- # Polymorphisme with DJANGO: # + http://stackoverflow.com/questions/1397537/polymorphism-in-django # + http://stackoverflow.com/questions/929029/how-do-i-access-the-child-classes-of-an-object-in-django-without-knowing-the-nam/929982#929982 import os import re import sys from django.db import m...
#!/usr/bin/env python import pprint import re import os, sys import unittest sys.path.insert(0, '..') from pycparser import c_parser from pycparser.c_ast import * from pycparser.c_parser import CParser, Coord, ParseError _c_parser = c_parser.CParser( lex_optimize=False, yacc_debug=Tr...
import itertools import numpy as np # from pyjavaproperties import Properties from vaex.ext import jprops import collections import functools from vaex.ui.qt import * import vaex.dataset import vaex.ui.plot_windows import logging as logging import vaex.ui.qt as dialogs import vaex.execution import vaex.kld from matplot...
# Copyright (c) 2014. Mount Sinai School of Medicine # # 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 2014 Mirantis 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...
# python 2 from __future__ import absolute_import # builtin from unittest import TestCase, main # custom from blowdrycss.classpropertyparser import ClassPropertyParser class TestClassPropertyParser(TestCase): def test_class_set_to_lowercase(self): original_class_set = {'ThE', 'the', 'THE', 't2HE'} ...
#!/usr/bin/env python # vim: sw=2 ts=2 import click import os import sys @click.command() ### AWS/EC2 options @click.option('--glusterfs-stack-name', help='Specify a gluster stack name. Making the name unique will allow for multiple deployments', show_default=True) @click.option('--region', default='us...
"""Tests for acme.client.""" import datetime import json import unittest from six.moves import http_client # pylint: disable=import-error import mock import requests from acme import challenges from acme import errors from acme import jose from acme import jws as acme_jws from acme import messages from acme import ...
"""Factor Analysis. A latent linear variable model. FactorAnalysis is similar to probabilistic PCA implemented by PCA.score While PCA assumes Gaussian noise with the same variance for each feature, the FactorAnalysis model assumes different variances for each of them. This implementation is based on David Barber's B...
import socket,sqlite3,tkinter,time from multiprocessing import Process, Queue def add_nulls(dlen,data): to_ret = data if(len(data)<dlen): dif = dlen-len(data) to_ret = "0"*dif+to_ret return to_ret class settings: def __init__(self): connection = sqlite3.connect("conf.db") ...
import os from urllib import quote, unquote from mimetypes import guess_type from django.http import HttpResponse, Http404, HttpResponseBadRequest, HttpResponseRedirect, HttpResponsePermanentRedirect, HttpResponseServerError from django.template import RequestContext, loader from django.shortcuts import render_to_res...
import logging import netuitive from . import statsd logger = logging.getLogger(__name__) class Elements(object): """ manage list of elements """ def __init__(self, hostname, element_obj): self.hostname = hostname self.element = element_obj self.elements = {} self.eleme...
import socket import warnings from email.errors import MessageDefect from http.client import IncompleteRead as httplib_IncompleteRead from typing import TYPE_CHECKING, Callable, List, Optional, Tuple, Union if TYPE_CHECKING: from .connection import HTTPConnection from .connectionpool import ConnectionPool ...
from openerp import netsvc from openerp import models, fields, api from openerp.tools.translate import _ import openerp.addons.decimal_precision as dp from datetime import datetime from openerp.osv import osv import time class wizard_stock_internal_transfer(models.TransientModel): _name = 'wizard.stock.internal.trans...
# Copyright (c) 2015 Infortrend Technology, 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 # # ...
import os import time import subprocess from oeqa.runtime.bluetooth import bluetooth from oeqa.oetest import oeRuntimeTest from oeqa.utils.helper import shell_cmd_timeout from oeqa.utils.helper import get_files_dir class CommBTTestMNode(oeRuntimeTest): """ @class CommBTTestMNode """ @classmethod de...
import functools from typing import List, Any import numpy as np import scipy.sparse as sp import pytest from sklearn.metrics import euclidean_distances from sklearn.random_projection import johnson_lindenstrauss_min_dim from sklearn.random_projection import _gaussian_random_matrix from sklearn.random_projection im...
# -*- test-case-name: twisted.conch.test.test_userauth -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation of the ssh-userauth service. Currently implemented authentication types are public-key and password. Maintainer: Paul Swartz """ from __future__ import absolute_import...
# -*- coding: utf-8 -*- """Simple JMS client for request based processing .. module:: network.jms.simplejms :platform: Unix :synopsis: Simple JMS client for request based processing .. moduleauthor:: Petr Czaderna <pc@hydratk.org> """ from hydratk.lib.network.jms import jms_client from hydratk.lib.system impor...
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
""" Implements the reaction decorator, class and desciptor. """ # Note: there are some unusual constructs here, such as ``if xx is True``. # These are there to avoid inefficient JS code as this code is transpiled # using PScript. This code is quite performance crirical. import weakref import inspect from ._loop impo...
# 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...