input
stringlengths
2.65k
237k
output
stringclasses
1 value
################################################################################################# # Visual object tracking in panoramic video # Master thesis at Brno University of Technology - Faculty of Information Technology # Author: <NAME> (<EMAIL>) # Supervisor: Doc. Ing. <NAME>, Ph.D. # Module: tracker_360_defaul...
import json import pytest from helper import wait_for_response from helper.assertion import assert_successful_request, assert_validation_error @pytest.fixture(scope="class") def system_spec(): return {'system': 'complex', 'system_version': '1.0.0.dev0', 'instance_name': 'c1'} @pytest.mark.usefixtures('easy_client...
<gh_stars>1-10 """Cryptocurrency Due diligence Controller""" __docformat__ = "numpy" # pylint: disable=R0904, C0302, W0622 import argparse import os import pandas as pd from binance.client import Client from prompt_toolkit.completion import NestedCompleter from gamestonk_terminal import feature_flags as gtff from game...
begin th_myfunc_4 <= th_myfunc_4_1; end end th_myfunc_4_1: begin _th_myfunc_4_tid_22 <= _th_myfunc_4_tid_21; th_myfunc_4 <= th_myfunc_4_2; end th_myfunc_4_2: begin $display("-- Thread %d TryLock", _th_myfunc_4_tid_22); th_myfunc_4 <= th_myfunc_4_3; end th_myfunc_4_3: begin th_myfunc_4 <= th_myfunc_4_4; e...
# -*- coding: utf-8 -*- """ Optimization Methods ==================== """ from __future__ import division import itertools from collections import defaultdict import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.cm as cm from scipy import optimize from . import tools from .test...
<gh_stars>0 # encoding: utf-8 # module System.Collections calls itself Collections # from mscorlib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089,System,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089 # by generator 1.145 # no doc # no important # no functions # classes clas...
""" Module contianing all transaction types """ from JumpscaleLib.clients.blockchain.rivine.types.signatures import Ed25519PublicKey from JumpscaleLib.clients.blockchain.rivine.types.unlockconditions import SingleSignatureFulfillment, UnlockHashCondition,\ LockTimeCondition, AtomicSwapCondition, AtomicSwapFulfill...
x[2:]), elements) processed_pairs = imap(lambda x: (x[0], dict( imap(lambda x: list(imap(int, x.split(u":"))), x[1]))), pairs) tid_lyric_pairs_train = list(processed_pairs) f = open(u"/data/jeffrey82221/MSD_Lyrics/mxm_dataset_test.txt") lines = ifilter(lambda x: x[0] != u'#' and x[0] != u'%', f) elements = imap(l...
= 'LI21 0881 0000 2324 013A B' results = iban_recognizer.analyze(iban, entities) assert len(results) == 0 # Lithuania (16n) LTkk bbbb bccc cccc cccc def test_LT_iban_valid_no_spaces(self): iban = 'LT121000011101001000' results = iban_recognizer.analyze(iban, entities) assert len(results) == 1 assert_result(r...
from collections import defaultdict, Counter from datatable_util import AttributeDict, CSV_GivenHeaders, FIXEDWIDTH, JoinType, sortKey from hierarchies import Hierarchy import os from datatable import DataTable, DataColumn from itertools import chain from functools import reduce def createColumnFilter(criteria): if c...
"""Bootleg NED Dataset.""" import logging import multiprocessing import os import re import shutil import sys import time import traceback import warnings from collections import defaultdict import numpy as np import torch import ujson from emmental.data import EmmentalDataset from tqdm import tqdm from bootleg impor...
_preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively igno...
<reponame>holgern/delegationOnboardBot #!/usr/bin/python from beem import Hive from beem.comment import Comment from beem.account import Account from beem.amount import Amount from beem.blockchain import Blockchain from beem.nodelist import NodeList from beem.exceptions import ContentDoesNotExistsException from beem.ut...
#<NAME> #--------------- from PIL import Image from OpenGL.GL import * from OpenGL.GLU import * from numpy import * import random import os, re #from OpenGL.GL.ARB.vertex_buffer_object import * from OpenGL.arrays import ArrayDatatype as ADT try: import psutil psutil_enable = True except: psutil_ena...
<gh_stars>1-10 def getItemsetMetric(freq_metrics, metric="d_fnr"): d = freq_metrics[["itemsets", metric]].set_index("itemsets").to_dict("index") return { k: {k1: v[metric] for k1, v in d.items() if k == len(k1)} for k in range(0, max(freq_metrics["length"] + 1)) } def getItemsetMetrics(freq_metrics, metrics=["d_...
""" Schema is a library for validating Python data structures, such as those obtained from config-files, forms, external services or command-line parsing, converted from JSON/YAML (or something else) to Python data-types. NOTE: This is a fixed fork of: https://github.com/keleshev/schema """ import re import os __all...
<filename>passcrack.py<gh_stars>0 # Simple email script meant for a gmail sender def sendEmail(fromGmail, fromPwd, toEmails, subject, body): # Import smtp library import smtplib # Initialize vars usr = fromGmail pwd = <PASSWORD>Pwd FROM = usr TO = toEmails if type(toEmails) is list else [toEmails] SUBJECT = su...
replacing tags """ # remove tags untagged_text = str.join( " ", list(ET.fromstring(xml_string).itertext())) return untagged_text @staticmethod def remove_para_tags(text): """remove certain tags within paras lexically. Works on flat text Messy. At present tags are in TAGS and TAG_REGEXES """ for key in TAG...
self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) self.acl = kwargs.get('acl', None) self.content = kwargs.get('content', None) self.properties = kwargs.get('properties', None) class MicrosoftGraphExternalItemContent(msrest.serialization.Model): """externalItemConten...
['mCmpCtrlStatus', 'nvmeMiCtrlHealthChngFlags_t', 'NVME_MI_CTRL_HEALTH_CHNG_FLAGS_VERSION_MAJOR', 'NVME_MI_CTRL_HEALTH_CHNG_FLAGS_VERSION_MINOR', 4, None, None, None, None], ['mFlowCtlStatus', 'nmiFlowCtlStatus_t', 'NVME_FLOW_CTL_STATUS_VERSION_MAJOR', 'NVME_FLOW_CTL_STATUS_VERSION_MINOR', 4, None, None, None, None], ...
import shutil import time import typing as T from collections import defaultdict from contextlib import contextmanager from datetime import timedelta from math import ceil from pathlib import Path from queue import Empty from tempfile import TemporaryDirectory, mkdtemp import psutil from snowfakery.api import COUNT_RE...
low_y_distributions, upper_y_distributions = result # consider cross-group overlap and combined area candidate_distributions = None if axis == 0: candidate_distributions = low_x_distributions + upper_x_distributions elif axis == 1: candidate_distributions = low_y_distributions + upper_y_distributions mbr_list_pa...
BYTE SC IMAGE IOD': ['Study'], 'COMPREHENSIVE SR IOD': ['Study'], 'ENHANCED ULTRASOUND VOLUME IOD': ['Study'], 'KEY OBJECT SELECTION DOCUMENT IOD': ['Study'], 'SPATIAL FIDUCIALS IOD': ['Study'], 'RT ION PLAN IOD': ['Study'], 'X-RAY ANGIOGRAPHIC IMAGE IOD': ['Study'], 'CT IMAGE IOD': ['Study'], 'VL WHOLE SLIDE M...
its client area. clientSize: A System.Drawing.Size value representing the height and width of the control's client area. Returns: A System.Drawing.Size value representing the height and width of the entire control. """ pass def Sort(self): """ Sort(self: ListView) Sorts the items of the list ...
# coding=utf-8 # Copyright (C) 2013 <NAME> - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html import re PARAMETERS = { 'ac': {'tam': 13, 'val_tam': 11, 'starts_with': '01'}, 'al': {'tam': 9, 'starts_with': '24'}, 'am': {'tam': 9}, 'ce': {'tam': 9}, 'df': {'tam': 13, 'val_tam': 11, 'start...
string :returns: list of dictionary with key, value, type indicating the DelObject :rtype: string """ if self.cpeid is None: self.cpeid = self.dev.board._cpeid p, cmd, cpe_id = self._build_input_structs(self.cpeid, param, action="DO") # get raw soap response with self.client.settings(raw_response=True): res...
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may ch...
import json from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models import Group from django.db import IntegrityError from django.http import JsonResponse, HttpResponse from django.shortcuts import render, redirect from ..decorators import allowed_...
time machine book into a list of sentences.""" with open('../data/timemachine.txt', 'r') as f: lines = f.readlines() return [re.sub('[^A-Za-z]+', ' ', line.strip().lower()) for line in lines] # Defined in file: ./chapter_recurrent-neural-networks/text-preprocessing.md def tokenize(lines, token='word'): """Split...
def FromDict(cls, val): """Custom function for top-level config data """ obj = super(ConfigData, cls).FromDict(val) obj.cluster = Cluster.FromDict(obj.cluster) obj.nodes = outils.ContainerFromDicts(obj.nodes, dict, Node) obj.instances = \ outils.ContainerFromDicts(obj.instances, dict, Instance) obj.nodegroups ...
""" Lexemes base definitions for the lexemes module. """ from enum import Enum # Definitions # ============================================================================ # Characters # ---------------------------------------------------------------------------- def char_range(first, last): """ Set of characters...
ASN B 1 131 ? 65.744 -30.604 10.789 1.00 18.90 ? 132 ASN B ND2 1 ATOM 2747 N N . THR B 1 132 ? 66.400 -31.556 16.308 1.00 14.98 ? 133 THR B N 1 ATOM 2748 C CA . THR B 1 132 ? 67.036 -32.170 17.433 1.00 15.50 ? 133 THR B CA 1 ATOM 2749 C C . THR B 1 132 ? 66.060 -32.948 18.255 1.00 15.02 ? 133 THR B C 1 ATOM 2750 O ...
cluster generation when the disk was active on a running server. -1 since the disk is currently up. objectsCount: The maximum amount of object that can exists on the disk. objectsAllocated: Statistics about the amount of objects to be allocated on this disk. storedSize: Statistics about the amount of cilent data to ...
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.0539232, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.17736, '...
else: _val = d[s] # type: ignore return True self.assertEqual(*check_ok(f)) def test_dict_key_type_union(self) -> None: def f(d: Dict[Union[int, str], int]) -> Dict: """ pre: len(d) == 2 post: not (42 in d and '42' in d) """ return d self.assertEqual(*check_fail(f)) def test_nonuniform_dict_types(self) ...
{"feature": "Education", "instances": 451, "metric_value": 0.3659, "depth": 8} if obj[6]>1: # {"feature": "Restaurant20to50", "instances": 273, "metric_value": 0.3959, "depth": 9} if obj[10]<=1.0: # {"feature": "Age", "instances": 157, "metric_value": 0.4229, "depth": 10} i...
<filename>tests/contract_modules.py """ Copyright BOOSTRY Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
<filename>angr/state_plugins/symbolic_memory.py<gh_stars>1-10 from collections import defaultdict import logging import itertools l = logging.getLogger(name=__name__) import claripy from ..storage.memory import SimMemory, DUMMY_SYMBOLIC_READ_VALUE from ..storage.paged_memory import SimPagedMemory from ..storage.mem...
<filename>example/ssd/tools/caffe_converter/convert_symbol.py<gh_stars>0 # 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...
# -*- coding: utf-8 -*- """ Microsoft-Windows-PowerShell GUID : a0c1853b-5c40-4b15-8766-3cf1c58f985a """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl....
<filename>battlechess/game.py # -*- coding: utf-8 -*- ''' @name: game @author: Memory&Xinxin @date: 2019/11/14 @document: 皇家战棋游戏的主要文件 ''' import time import pygame from random import choice from .base import BaseGame, Button, Chess from .utils import * from .configs import * class BeginGame(BaseGame): """游戏开始选择的画面...
<gh_stars>0 # MIT License # # Copyright (c) 2021 <NAME> # # 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, ...
# -*- coding: utf-8 -*- # imageio is distributed under the terms of the (new) BSD License. """ Read SPE files. Backend: internal This plugin supports reading files saved in the Princeton Instruments SPE file format. Parameters for reading ---------------------- char_encoding : str Character encoding used to decode...
not changed: p = deepcopy(p) p.item_types = item_types changed = True elif isinstance(p, serial.properties.Dictionary) and (p.value_types is not None): value_types = version_properties(p.value_types) if value_types is not None: if not changed: p = deepcopy(p) p.value_types = value_types changed = True if p.t...
""" .. module:: gQuery :synopsis: Defines and constructs common queries that are passed to the GALEX databases (esp: photon, aspect, and MCAT) at MAST. """ from __future__ import absolute_import, division, print_function # Core and Third Party imports. from builtins import str # gPhoton imports. import gPhoton.CalUt...
) if len(np.atleast_1d(weights)) != len(np.atleast_1d(y)): raise ValueError(' weight vector must be same length as response vector') # calculate log posterior Hessian mu = logistic_prob(X, w) S = mu * (1. - mu) * weights if len(H.shape) == 2: H_log_post = np.dot(X.T, X * S[:, np.newaxis]) + H elif len(H.sha...
link battery.inputs.current = -battery.cell.charging_current*n_parallel * np.ones_like(volts) battery.inputs.voltage = battery.cell.charging_voltage*n_series * np.ones_like(volts) battery.inputs.power_in = -battery.inputs.current * battery.inputs.voltage battery.energy_calc(numerics,battery_discharge_flag) to...
length = len([i for i in utterance if i not in self.special_tokens]) if length > 0: item_n.append(utterance) l.append(length) self.data.extend(item_n) # (begin, end, max-length) for one session for i in range(1, len(item_n)): self.table.append(( offset, offset+i, len(self.data) )) def __len__(self): r...
<gh_stars>0 import logging from datetime import date from babel.dates import format_date import re from lxml import etree from common import Resources from parsing import parse_organization_name, SessionParser from nltk.tokenize import word_tokenize from pathlib import Path from common import StringFormatter from commo...
from datetime import datetime import numpy as np import os import glob from pathlib import Path from vtk.util.numpy_support import numpy_to_vtk, vtk_to_numpy, numpy_to_vtkIdTypeArray import vtk import vedo import math #import trimesh ROOT_FOLDER = Path(__file__).parent.parent ASSETS_FOLDER = ROOT_FOLDER.joinpath('./...
# coding: utf-8 from CvPythonExtensions import * import CvUtil import PyHelpers from Consts import * from Civics import * from StoredData import data from RFCUtils import * from Areas import * import CityNameManager as cnm from Events import handler from Locations import * from Core import * from Core import name as ...
# -*- coding: utf-8 -*- """ :author: Kleon :url: https://github.com/kleon1024 """ from datetime import datetime from enum import Enum from werkzeug.security import generate_password_hash, check_password_hash from .extensions import db, whooshee from .common import merge import json DIGEST_LENGTH = 64 COLOR_MAX = ...
num timelimit: timedelta def __init__(_beneficiary: address, _goal: wei_value, _timelimit: timedelta): self.beneficiary = _beneficiary self.deadline = block.timestamp + _timelimit self.timelimit = _timelimit self.goal = _goal @payable def participate(): assert block.timestamp < self.deadline nfi = self.nextFund...
suite_soup): """ Returns a dict with information about 1 Suite from Test-Suites XML. The "suite" must be a XML Soup class. """ logFull('xmlparser:getSuiteInfo') # A suite can be a part of only 1 EP ! res = OrderedDict() # The first parameter is the Suite name if suite_soup.getparent().xpath('id'): res['suite'...
<reponame>muxuezi/django-popupcrud # -*- coding: utf-8 -*- # pylint: disable=too-many-lines """ Popupcrud views """ from collections import OrderedDict import copy from django import forms from django.db import transaction from django.conf import settings from django.conf.urls import include, url from django.core.exc...
timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ["owner"] all_params.extend...
%.4f \tbatchtime: %.4f' % ( epoch, opt.niter, i, len(train_loader), Hlosses.val, Rlosses.val, R_mselosses.val, R_consistlosses.val, Dlosses.val, FakeDlosses.val, RealDlosses.val, Ganlosses.val, Pixellosses.val, Vgglosses.val, SumLosses.val, data_time.val, batch_time.val) if i % opt.logFrequency == 0: print_log(log...
m.x852 <= 1106.777870451) m.c748 = Constraint(expr= 1106.777870451*m.b61 + m.x156 - m.x853 <= 1106.777870451) m.c749 = Constraint(expr= 1106.777870451*m.b62 + m.x158 - m.x848 <= 1106.777870451) m.c750 = Constraint(expr= 1106.777870451*m.b63 + m.x160 - m.x849 <= 1106.777870451) m.c751 = Constraint(expr= 1106.7778704...
"""Integration tests for client library""" from hil.flaskapp import app from hil.client.base import ClientBase, FailedAPICallException from hil.errors import BadArgumentError from hil.client.client import Client from hil.test_common import config_testsuite, config_merge, \ fresh_database, fail_on_log_warnings, server_...
<filename>MUTANTS/ERIK.py # -*- coding: utf-8 -*- # filE ReadIng and Kleaning [Magneto] import json import os import typing import subprocess import uuid from shutil import copyfile from datetime import datetime import numpy as np from astropy.io import fits from RAVEN import standardize_single_dataset, convert_bytes...
+= next_group continue elif next_group == '\n': if prev_group != '\n': next_peeked.append(next_group) break if highlight: result += terminal.uninverse() highlight = False elif prev_group == next_group: if highlight: result += terminal.uninverse() highlight = False else: if not highlight: result += termin...
objects per minute, but 99% time # spent in memmove(). # # Using manual indexing of arrays, CPU usage of less than # 35%; for the first time, 35% of profile time is spent in # talking to MySQL (over gigabit switch); clearly parallel # pre-fetching would be useful. batch = oids[oids_done:oids_done + self.fill_ob...
"""Defines N-1 dimensional surfaces in N-dimensional space. All surfaces are represented by a Mesh with points and connections (i.e. line segments or triangles) between those points. """ import numpy as np from scipy import sparse, linalg from nibabel import freesurfer, spatialimages, gifti import nibabel as nib from ...
#----------------------------------------------------------------------------- # press-stitch.py # Merges the three Press Switch games together # pylint: disable=bad-indentation #----------------------------------------------------------------------------- import getopt import hashlib import os.path import pathlib imp...
<gh_stars>0 """ @package mi.instrument.teledyne.workhorse_monitor_75_khz.test.test_driver @author <NAME> """ __author__ = '<NAME>' __license__ = 'Apache 2.0' import socket import unittest import time as time import datetime as dt from mi.core.time import get_timestamp_delayed from nose.plugins.attrib import attr fr...
"disseise", "disseize", "dissents", "disserts", "disserve", "dissever", "distaffs", "distains", "distally", "distaves", "distends", "distichs", "distills", "distomes", "distrain", "distrait", "disulfid", "disunion", "disunite", "disunity", "disusing", "disvalue", "disyoked", "disyokes", "ditcher...
base_dict_data in well-known text format. target_sr_wkt (str): target spatial reference in well-known text format Returns: None """ # If the target_vector_path exists delete it if os.path.isfile(target_vector_path): driver = ogr.GetDriverByName(_VECTOR_DRIVER_NAME) driver.DeleteDataSource(target_vector_path) ...
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/MedicationAdministration Release: STU3 Version: 3.0.2 Revision: 11917 Last updated: 2019-10-24T11:53:00+11:00 """ from typing import Any, Dict from typing import List as ListType from pydantic import Field, root_validator from . import backb...
from re import match import sys from socket import * def parseReceiptToCmd(string, current_place, string_length): if(string_length < 4): try: connectionSocket.send("500 Syntax error: command unrecognized") except: print "Failed to send message" return 0 return 0 token = string[:4] if (token ==...
from direct.gui.DirectGui import * from pandac.PandaModules import * from pirates.piratesgui import GuiPanel, PiratesGuiGlobals from pirates.piratesbase import PiratesGlobals from pirates.piratesbase import PLocalizer from pirates.piratesbase import Freebooter from otp.otpbase import OTPLocalizer from pirates.piratesgu...
= pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize('MongoDBCollectionGetResults', pipeline_response) i...
<gh_stars>0 # -*- coding: utf-8 -*- import os, sys import logging from .control import Control from .prms import Prms from .supports import _get_file_abs from .prms_help import Helper import flopy import subprocess as sp if sys.version_info > (3, 0): import queue as Queue else: import Queue from datetime import date...
fontsize=12) cbax.xaxis.set_label_position('top') # PLT.tight_layout() fig.subplots_adjust(right=0.72) fig.subplots_adjust(top=0.88) PLT.savefig('/data3/t_nithyanandan/'+project_dir+'/figures/'+telescope_str+'multi_baseline_screening_CLEAN_noiseless_PS_'+ground_plane_str+snapshot_type_str+obs_mode+'_gaussian_FG...
is self: reader.read() # Discard (already parsed item first line). writer.write_tag(self.tag.term, [self.label], self.presubs, self.attributes,trace='list term') if self.text: break writer.write(labeltag[1],trace='list label close') # Write item text. self.translate_item() writer.write(entrytag[1],trace='list e...
import os import numpy as np import gym from gym.utils import seeding from .cake_paddle import CakePaddle, RENDER_RATIO from .manual_control import manual_control from pettingzoo import AECEnv from pettingzoo.utils import wrappers from pettingzoo.utils.agent_selector import agent_selector from pettingzoo.utils.to_paral...
<filename>impl/dlsgs/data_generation/generator.py #!python3.7 # implementation based on DeepLTL https://github.com/reactive-systems/deepltl # pylint: disable=line-too-long from __future__ import generator_stop # just to be safe with python 3.7 import sys, os, re import signal import datetime import argparse import r...
permits(self): """ Returns the value of the `permits` property. """ return self._permits @permits.setter def permits(self, value): """ Sets the value of the `permits` property. """ self._permits = value @property def user(self): """ Returns the value of the `user` property. """ return self._user @us...
The default value is Abort. - **MaxAttempts** *(integer) --* The maximum number of tries to run the action of the step. The default value is 1. - **ExecutionStartTime** *(datetime) --* If a step has begun execution, this contains the time the step started. If the step is in Pending status, this field is not popul...
= cproduct.value self._revision = crevision.value self._serialnumber = cserialnumber.value self._major = cmajor.value self._minor = cminor.value if self._major < 5: raise AttributeError("No device connected") self.__drift_tube = {"offset": 0.0, "gain": 1.0/10.0, "range": {"min":-10.0, "max":10.0}, "value": 0.0}...
<filename>UR_Control/geometry/surface.py<gh_stars>0 import Rhino.Geometry as rg from geometry.beam import Beam import copy import math class Surface(object): def __init__(self, surface, u_div=5, v_div=3, beam_width = 160, beam_thickness = 40): """ Initialization :param surface: Base rg.geometry object that will b...
guys begin to move closer circling around you two. You step to the side so you all form a small circle. "No idea my mind is completely blank" one of theem says. His voice was incredibly deep considering how young he looked. He had very dark skin and his hair was in these reall nice dreads. He had a sharp jawline a chi...
if self.update_tenant_req: self.update_tenant_req.validate() def to_map(self): result = dict() if self.auth_token is not None: result['auth_token'] = self.auth_token if self.product_instance_id is not None: result['product_instance_id'] = self.product_instance_id if self.nonce is not None: result['nonce'] = s...
# Copyright 2018 D-Wave 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 writi...
if weights_name in weights: gamma = weights[weights_name].numpy() mean = weights[mean_name].numpy() variance = weights[var_name].numpy() eps = params['epsilon'] momentum = params['momentum'] if weights_name not in weights: bn = keras.layers.BatchNormalization( axis=1, momentum=momentum, epsilon=eps, center=...
""" GHGraphToPointArray(reg: RectangleF,pix_accuracy: float,eval: GH_Evaluator) -> Array[PointF] GHGraphToPointArray(self: GH_AbstractGraph,reg: RectangleF,pix_accuracy: float) -> Array[PointF] """ pass def Internal_GripChanged(self, *args): """ Internal_GripChanged(self: GH_AbstractGraph,grip: GH_Graph...
'v' + date_string else: today = datetime.datetime.utcnow() version_string = today.strftime('v%Y%m%d') # if the file isn't online (e.g. loaded from JSON) then directory is blank directory = metadata['directory'] if file_online else None # create a data file. If the file already exists in the database with # ide...
"""Monte Carlo Tree Search for stochastic environments.""" import asyncio import random import gin import gym_open_ai from alpaca.alpacka import data from alpaca.alpacka.agents import base from alpaca.alpacka.agents import core @gin.configurable def rate_new_leaves_with_rollouts( leaf, observation, model, disc...
<gh_stars>0 #!/usr/bin/env python from osgeo import gdal, osr import numpy as np from pointcloud2raster.raster import Raster import os import math import csv import random import argparse # this allows GDAL to throw Python Exceptions """ This file creates a bunch of rasters with interesting patterns that we can us...
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2009-2011, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redistribu...
from __future__ import annotations from datetime import datetime, timedelta import json from typing import Any, cast, Dict, Optional, TYPE_CHECKING import requests from aiohttp import web import logging from bitcoinx import hex_str_to_hash, hash_to_hex_str from electrumsv_node import electrumsv_node from .constants ...
<reponame>CosminStefanica/RatPack_PapaRat<gh_stars>0 """ Copyright (C) 2017 <NAME> 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 u...
<filename>pycvm/horizontal_slice.py ## # @file horizontal_slice.py # @brief Plots a horizontal slice either for display or saving to a file. # @author <NAME> - SCEC <<EMAIL>> # @version 14.7.0 # # Allows for generation of a horizontal slice, either interactively, via # arguments, or through Python code in the class Hor...
source address B in * VLAN C, this would set up the flow "dl_dst=B, vlan_vid=C, * actions=output:A". * * In syntax accepted by ovs-ofctl, this action is: * learn(NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], * output:NXM_OF_IN_PORT[]) * * 3. Here's a recipe for a very simple-minded MAC learning swi...
<reponame>Hidberg/Landmark2019-1st-and-3rd-Place-Solution import itertools import random import math import albumentations.augmentations.functional as F import cv2 from PIL import Image import numpy as np import torch from albumentations import ImageOnlyTransform from torch.optim.lr_scheduler import _LRScheduler from...
in txtLine): continue if dataObjectName + ';' in txtLine or dataObjectName + '[' in txtLine: txtLine = txtLine.strip() txtLine = re.sub('^ +', '', txtLine) txtLine = re.sub(' +', ' ', txtLine) if objectDeclarationString.search(txtLine): m = objectDeclarationString.search(txtLine) typeDefName = m.group(1) return...
if self.zoomed: self.toggleZoom() self.currentCrosshair = self.entity.components[self.activeWeapon].defaultCrosshair if self.keyMap["alternate-action"]: self.keyMap["alternate-action"] = False if self.entity.special is not None: self.entity.special.enable() if self.currentCrosshair == -1: self.currentCrosshair...
<filename>reinforcement_learning/gym/vector/async_vector_env.py import numpy as np import multiprocessing as mp import time import sys from enum import Enum from copy import deepcopy from reinforcement_learning.gym import logger from reinforcement_learning.gym.vector.vector_env import VectorEnv from reinforcement_lear...
blobdict def generate_xferspec_download( blob_service, args, storage_in_queue, localfile, remoteresource, contentlength, contentmd5, addfd): """Generate an xferspec for download Parameters: blob_service - blob service args - program arguments storage_in_queue - storage input queue localfile - name ...
""" Programmer: <NAME> Date of Development: 14/10/2020 This code has been developed according to the procedures mentioned in the following research article: "Fathollahi-Fard, <NAME>, <NAME>, and <NAME>. 'Red deer algorithm (RDA): a new nature-inspired meta-heuristic.''" Soft Computing (2020): 1-29." """ import nump...
<reponame>preduct0r/mixup-text import logging import math import os from operator import itemgetter import sys from typing import List, Tuple, Iterator, Optional # from . import optimize from .classifier import Classifier, AlgorithmProps from .utils import calculate_confidence_threshold sys.path.append('..') from clas...