input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>Akatsuki96/falkon<filename>falkon/kernels/distance_kernel.py import collections import functools import math from abc import ABC, abstractmethod from typing import Optional, Union, Tuple, Dict import torch from falkon.kernels import Kernel, KeopsKernelMixin from falkon.options import BaseOptions, FalkonOpti...
'cancel', 'cancel_run': True, 'msg': self.persister.secondary_database_fail} else: return True else: return True # =============================================================================== # setup # =============================================================================== def setup_persister(self...
linewidth=linewidth ) self.__bounding_boxes.append(visualise_bounding_box) elif isinstance(bounding_box, (list, tuple, sitk.Image)): # Use a default name if not specified if name is None: name = "Bounding box" visualise_bounding_box = VisualiseBoundingBox( bounding_box, name=name, color=color, linewidth=line...
path into the job workspace corresponding to the state point specified in the manifest file. Alternatively the schema argument may be a string, that is converted into a schema function, for example: Providing ``foo/{foo:int}`` as schema argument means that all directories under ``foo/`` will be imported and their ...
<filename>text_processing.py<gh_stars>0 """ This module is a part of system for the automatic enrichment of a WordNet-like taxonomy. Copyright 2020 <NAME>, <NAME> 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 c...
<reponame>onap/dcaegen2-deployments<filename>dcae-services-policy-sync/policysync/clients.py<gh_stars>0 # ============LICENSE_START======================================================= # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. # =============================================================...
), ) case_stmt_py_syntax = ( match_kwd + testlist_star_namedexpr + colon.suppress() + newline.suppress() + indent.suppress() + Group(OneOrMore(case_match_py_syntax)) + dedent.suppress() + Optional(keyword("else").suppress() - suite) ) case_stmt_ref = case_stmt_co_syntax | case_stmt_py_syntax assert_stmt = adds...
import glob from subprocess import Popen, PIPE, STDOUT import os from backend.smc2py import parseEngineStdout import math import copy # validate data and proxy to real functions def execute(data): models = list_models()['models'] if 'type' not in data: return {'error': 'No type recieved'} if data['type'] not in [...
from!") elif (sizeOfSets == 2): # if we have only 2 sets for intersection methods = self.loadAnnotationFiles(inputDir, inputFiles) colors = [] methodNames = [] for method in methods.keys(): colors.append(self.methodColors[method]) if len(method) > 20: method = method.replace("_", "_\n") methodNames.append(meth...
from .models import Lap, QCAR, Accumulator from .forms import dataForm, quarterCarForm, accumulatorForm from flask import Blueprint,render_template, redirect, url_for, request, flash, send_file from flask_login import LoginManager,login_user,current_user,logout_user, login_required import datetime from . import db from...
self.covariance_factors()[:2] new_A = self.linear_part.dot(sqrt_cov) den = np.sqrt((new_A**2).sum(1)) new_b = self.offset - self.linear_part.dot(self.mean) new_con = constraints(new_A / den[:,None], new_b / den) mu = self.mean.copy() def inverse_map(Z): if Z.ndim == 2: return sqrt_cov.dot(Z) + mu[:,None] e...
#!/usr/bin/env python3 # # Copyright (c) 2004-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. ...
""" StarryPy Player Manager Plugin Provides core player management features: - implements roles - implements bans - manages player database Original authors: AMorporkian Updated for release: kharidiron """ import asyncio import datetime import pprint import re import json from operator import attrgetter from base_p...
# /usr/bin/env python3 import datetime import itertools import json import logging import os import os.path import pathlib import sys import click import osxmetadata from ._version import __version__ from .attributes import _LONG_NAME_WIDTH, _SHORT_NAME_WIDTH, ATTRIBUTES from .backup import load_backup_file, write_...
<gh_stars>0 # pylint: skip-file import cv2 import time import collections import enum import math import numpy as np import os import pathlib import uuid from collections import OrderedDict from importlib import import_module from darcyai.utils import validate_type, validate from darcyai.config import Config from .co...
Shortsword+8", 200809: "Fire Shortsword+9", 200810: "Fire Shortsword+10", 200900: "Chaos Shortsword", 200901: "Chaos Shortsword+1", 200902: "Chaos Shortsword+2", 200903: "Chaos Shortsword+3", 200904: "Chaos Shortsword+4", 200905: "Chaos Shortsword+5", 201000: "Longsword", 201001: "Longsword+1", 20...
uk_145 + 26640 * uk_146 + 31248 * uk_147 + 20016 * uk_148 + 410700 * uk_149 + 10275601 * uk_15 + 481740 * uk_150 + 308580 * uk_151 + 565068 * uk_152 + 361956 * uk_153 + 231852 * uk_154 + 6331625 * uk_155 + 7426825 * uk_156 + 4757275 * uk_157 + 8711465 * uk_158 + 5580155 * uk_159 + 6582067 * uk_16 + 357...
csv cmdlsamplemodel=None, #sampling of model data cmdlsampleprediction=None, #sampling of prediction data cmdlmodelscalefeatures=True, #scale model data cmdlpredictioncolsrange=None, cmdlpredictioncolselect=None, cmdlpredictionscalefeatures=True, #scale predcition data cmdlmodelscalesave=True, #save model scaler...
articles.article_id = lfind.article_id AND lfind.article_link = '${aLink}' """ # [ LIMIT { number | ALL } ] [ OFFSET number ] # article_id tplWrk = string.Template(strTpl) # strTpl strSelect = tplWrk.substitute(sId=str(spectatorId), aLink=article_link) # logging.info( 'Article ::: get strSelect = ' + ...
cmd = listTemplates.listTemplatesCmd() cmd.templatefilter = template_filter if domain_id is not None: cmd.domainid = domain_id if zone_id is not None: cmd.zoneid = zone_id if template_id is not None: cmd.id = template_id if template_name is not None: cmd.name = template_name if hypervisor is not None: cmd.hy...
== 200: if response.content: deserialized = response.json() else: deserialized = None if response.status_code == 201: if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized @distributed_trace_async async...
assert isinstance(param3, iap.Power) assert param3.other_param == param1 assert param3.val == param2 def test_exponentiate_stochastic_param_by_integer(self): param1 = iap.Normal(0, 1) param3 = param1 ** 2 assert isinstance(param3, iap.Power) assert param3.other_param == param1 assert isinstance(param3.val, i...
which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. """ return pulumi.get(self, "service_cidr") @service_cidr.setter def service_cidr(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "service_cidr", value) @property @pulumi.getter(name="subnetId") def subnet_id(self)...
<reponame>rachaonline789/hellomod # # Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolExce...
Optional[PostalCode] = field( default=None, metadata={ "name": "PostalCode", "type": "Element", } ) other_element: List[object] = field( default_factory=list, metadata={ "type": "Wildcard", "namespace": "##other", } ) type: Optional[str] = field( default=None, metadata={ "name": "Type", "type": "Attri...
(R_values[14] / (1 + w * 1j * t_values[14])) + (R_values[15] / (1 + w * 1j * t_values[15])) + (R_values[16] / (1 + w * 1j * t_values[16])) + (R_values[17] / (1 + w * 1j * t_values[17])) + (R_values[18] / (1 + w * 1j * t_values[18])) + (R_values[19] / (1 + w * 1j * t_values[19])) + (R_values[20] / (1 + w * 1j * t_...
<filename>src/defs/classes/lodash.py from typing import Any, Callable, Dict, Generic, List, Optional, Tuple, Type, TypeVar, Union _L1 = TypeVar('_L1') _L2 = TypeVar('_L2') _L3 = TypeVar('_L3', int, float) _L4 = TypeVar('_L4') # noinspection PyPep8Naming class _LodashChain(Generic[_L1]): def __init__(self, value: Un...
<gh_stars>0 import sys from typing import List from concurrent.futures import ThreadPoolExecutor, as_completed import grpc import pickle #import structures #from structures import Node sys.path.append("../") from net import net_pb2, net_pb2_grpc from server.connect import Conndb import etcd3 from etcd.etcd import Etcd...
data DataContainer in hera_cal.DataContainer form antpos : type=dictionary, antenna positions dictionary keys are antenna integers, values are ndarray baseline vectors. tol : type=float, redundant baseline distance tolerance in units of baseline vectors weights : type=bool, if True, treat data as a wgts dictiona...
copy.deepcopy(ampA0) maxA = maxA*Afmean minA = minA*Afmean maxP = gammaP*1.0 + (1.0 - gammaP)*np.max(s.P[s.flagNode<0,:].flatten()) minP = (1.0 - gammaP)*np.min(s.P[s.flagNode<0,:].flatten()) pertPoint0 = pertPoint*np.mean(s.Lf) pertPoint = copy.deepcopy(pertPoint0) neighBoundPts = np.arange(s.n...
δρεπάνι δρεπάνισμα δρεπανοκυττάρωση δρεπανοκύτταρο δριμόνι δριμύτητα δριστέλα δρογογνωσία δρολάπι δρομάδα δρομάκι δρομάκος δρομίσκος δρομολόγηση δρομολόγησις δρομολόγιο δρομολόγιον δρομόμετρο δροσέρα δροσερότητα δροσιά δροσοπηγή δροσοστάλα δροσοσταλίδα δροσοσταλιά δροσό δροσόπαγο δροσόπαγος δρουγγάριος δρυΐδης δρυά...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import numpy as np import os import re import signal import subprocess import sys def wait_for_output(proc): """This is a convenience method to parse a process's stdout and stderr. Args: p...
self.virtual_size is not None: _dict['VirtualSize'] = self.virtual_size if hasattr(self, 'vulnerability_count') and self.vulnerability_count is not None: _dict['VulnerabilityCount'] = self.vulnerability_count if hasattr(self, 'vulnerable') and self.vulnerable is not None: _dict['Vulnerable'] = self.vulnerable ret...
not need_frontports: return all_rearports = {str(item): item for item in nb.dcim.rear_port_templates.filter(devicetype_id=deviceType)} for port in need_frontports: try: rpGet = all_rearports[port["rear_port"]] port["rear_port"] = rpGet.id except KeyError: logger.debug(f'Could not find Rear Port for Front Port:...
= {'first_name': 'Bill'} self.assertRaises(redpipe.InvalidOperation, lambda: self.User(data)) self.assertRaises(redpipe.InvalidOperation, lambda: self.UserWithPk(data)) def test_incr(self): key = '1' class T(redpipe.Struct): keyspace = 'T' fields = { } field = 'arbitrary_field' t = T(key) t.incr(field)...
TODO: verify that this was indeed wrong # w = self.node_weights # indicator matrix that i,j are not neighboured or equal not_adjacent_or_equal = (1 - A - np.identity(N)).astype('int8') if mpi.available: parts = max(1, int(np.ceil(min((mpi.size-1) * 10.0, 0.1 * N)))) step = int(np.ceil(1.0*N/(1.0*parts))) if s...
<filename>tests/sat/Models/c710.160.UNSAT.dimacs.test.py input = """ c num blocks = 1 c num vars = 160 c minblockids[0] = 1 c maxblockids[0] = 160 p cnf 160 710 -111 68 67 0 -144 28 -44 0 -152 -121 -142 0 -54 -39 -89 0 103 -114 -137 0 60 -125 127 0 -145 116 106 0 75 118 -99 0 -152 -63 95 0 -123 146 134 0 -103 -133 -77 ...
# coding: utf-8 # /*########################################################################## # Copyright (C) 2016-2017 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to dea...
) generate_test_file(test_file) result = runner.invoke( cli, [ "--cache", cache_minutes, "validate", "shcd-cabling", "--csm", csm, "--architecture", architecture, "--ips", ips, "--username", username, "--password", password, "--shcd", test_file, "--tabs", tabs, "--corners", corners_too_narrow, ...
<reponame>stolarczyk/peppy """ Build a Project object. """ import os from collections import Mapping from logging import getLogger import pandas as pd from attmap import PathExAttMap from ubiquerg import is_url from .const import * from .exceptions import * from .sample import Sample from .utils import copy, load_yam...
<gh_stars>0 #! /usr/bin/env python # Copyright: (c) 2019, <NAME> # This software is made available to you under the terms of the Apache2.0 license. # Apache License v2.0 # See LICENSE.txt for details. ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION =...
with self._option(): self._token("Cornelius") with self._option(): self._token("Cressida") with self._option(): self._token("Cymberline") with self._option(): self._token("Demetrius") with self._option(): self._token("Desdemona") with self._option(): self._token("Dionyza") with self._option(): self._token(...
<filename>pipecaster/transform_wrappers.py<gh_stars>0 """ Wrapper classes for internal ML models. MultichannelPipelines treat all internal component as transfomers (i.e. invoking fit/transform/fit_transform). As a consequence, when predictors are used internally (e.g. for voting or stacking) a transformer interface mu...
#!/usr/bin/env python """ Pydoc sub-class for generating documentation for entire packages. Taken from: http://pyopengl.sourceforge.net/pydoc/OpenGLContext.pydoc.pydoc2.html Author: <NAME> """ import logging import pydoc, inspect, os, string, shutil import sys, imp, os, stat, re, types, inspect from repr import Repr f...
systemic_vel_est(z,param_dict,burn_in,run_dir,plot_param_hist=plot_param_hist) extra_dict = {**extra_dict, **z_dict} if verbose: print('\n > Saving Data...') # Write all chains to a fits table if (write_chain==True): write_chains({**param_dict,**flux_dict,**lum_dict,**cont_lum_dict,**eqwidth_dict,**int_vel_disp...
helper_position1 = helper_position + len(Settings.CONTROL_MAPPING_DELIMITER) helper_position2 = input_string.find(Settings.CONTROL_MAPPING_DELIMITER,helper_position1) debug_log("loading control mapping") settings_string = input_string[helper_position1:helper_position2].lstrip().rstrip() self.player_key_maps.load_...
<gh_stars>0 """ANTs' utilities.""" import os from ..base import traits, isdefined, TraitedSpec, File, Str, InputMultiObject from ..mixins import CopyHeaderInterface from .base import ANTSCommandInputSpec, ANTSCommand class ImageMathInputSpec(ANTSCommandInputSpec): dimension = traits.Int( 3, usedefault=True, positio...
"blipmale.ogg" def ssound(self,v): self._clicksound = v clicksound = property(gsound,ssound) def can_continue(self): """If not blocking, player cannot make text continue If skip mode is on (_debug mode) we can just skip the text Otherwise, check to see if all the text has been written out""" if not self.blockin...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE.txt file in the root directory of this source tree. import logging import multiprocessing as mp import queue import time import traceback...
<reponame>rickyHong/Cirq-repl # Copyright 2018 The Cirq Developers # # 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 appli...
<reponame>claraElk/cc_saflow<gh_stars>1-10 import os import numpy as np import pandas as pd import mne from mne.preprocessing import ICA, create_ecg_epochs, create_eog_epochs from autoreject import AutoReject from scipy.io import loadmat, savemat #from brainpipe import feature from src.saflow_params import BIDS_PATH, L...
#!/usr/bin/python # -*- coding: utf8 -*- # cp936 """ 建立HDF5索引 """ import datetime import tables class IndexRecord(tables.IsDescription): datetime = tables.UInt64Col() #IGNORE:E1101 start = tables.UInt64Col() #IGNORE:E1101 def UpdateWeekIndex(h5file): try: group = h5file.getNode("/","week") except: group = h...
# -*- coding: utf-8 -*- from radish import world, given, when, then, step from terraform_compliance.steps import property_match_list from terraform_compliance.common.helper import check_sg_rules, convert_resource_type, find_root_by_key, seek_key_in_dict from terraform_compliance.common.helper import seek_regex_key_in_...
Array of document results that match the query. """ self.matching_results = matching_results self.notices = notices @classmethod def from_dict(cls, _dict: Dict) -> 'QueryNoticesResponse': """Initialize a QueryNoticesResponse object from a json dictionary.""" args = {} valid_keys = ['matching_results', 'notice...
<gh_stars>10-100 from enum import Enum from pprint import pformat, pprint from typing import Any, Dict, List, Optional, TypeVar, Union from mstrio import config from mstrio.api import subscriptions from mstrio.connection import Connection from mstrio.distribution_services.schedule import Schedule from mstrio.distribut...
stEvt:instan\ ceID=\x22xmp.iid:f2\ b9677e-2393-754d\ -9ae5-5eb8693c7b\ 40\x22 stEvt:when=\x22\ 2020-05-02T17:59\ :57-03:00\x22 stEvt\ :softwareAgent=\x22\ Adobe Photoshop \ 21.0 (Windows)\x22 \ stEvt:changed=\x22/\ \x22/> </rdf:Seq> <\ /xmpMM:History> \ </rdf:Descriptio\ n> </rdf:RDF> </\ x:xmpmeta> <?xpa\ cket end=\x2...
'size:9.8pt; color:#a5c261;">\'type\'</span><span style=" font-family:\'Consolas\'; font-size:9.8pt; ' \ 'color:#a9b7c6;">: </span><span style=" font-family:\'Consolas\'; font-size:9.8pt; color:#a5c261;">\'' \ 'pyNodeMulti\'</span><span style=" font-family:\'Consolas\'; font-size:9.8pt; color:#cc7832;">, </spa' \ ...
import tkinter as tk import sys from tkinter import filedialog import random import numpy as np import pandas as pd import math import seaborn as sns sys.path.append('Portplanering') sys.path.append('Bilbokning/src') from bilbokning import calculate_carriages HEURISTICS = ['local_search', 'simulated_annealing', 'v...
<reponame>benstear/manubot """Functions importable from manubot.cite submodule (submodule API): standardize_citekey() citekey_to_csl_item() Helpers: inspect_citekey() is_valid_citekey() - also used in manubot.process shorten_citekey() - used solely in manubot.process infer_citekey_prefix() """ import functool...
# -*- coding: utf-8 -*- from settings import * from messages import * from functions import * import time import random import sqlite3 from aiogram import asyncio from aiogram import Bot, types from aiogram.dispatcher import Dispatcher from aiogram.utils import executor from aiogram.utils.helper import Helper, HelperMo...
List[Dict[str, str]] params = assign_params(category=category, search=search, sort=sort, created_by=created_by, offset=0, limit=limit or 100) if share_mode: params["category.share_mode"] = share_mode if alerted: params["stats.alerted_agents"] = share_mode # get all results while len(indicators) < max_record...
# -*- coding: utf-8 -*- import pickle, re, timeit import unicodedata as ud from nltk import trigrams, bigrams, FreqDist, sent_tokenize from include.morph_analyzer import Analyzer, buckwalter def talaa_pos_xml2talaa_pos_dic_phrase(annotated_corpus_path, annotated_corpus_name, path): """ Parameters ---------- an...
<filename>utils/ERLplot_utils.py #!/usr/bin/env python3 # Import modules import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib import ticker, gridspec from deprecated import deprecated import utils.ERLexperiment_utils as exp import numpy as np from scipy import ndimage import seaborn as s...
from datetime import datetime import sys sys.path.insert(1, r'C:\Users\ASUS\Desktop\sources\Telegram\werewolf\Darkhelper\2\V2\Databases') from Databases.Groups import GroupsPlayersBase , GroupsBase , GroupsControlBase from Databases.Groups.Bet import BetBase from Databases.Users import AdminsBase from Databases...
'rho','sigma','tau2','beta'] # necessary params if any(x not in param.keys() for x in lst_params): raise ValueError('Missing parameter in param.\n Need {}.\n Got {} '.format(lst_params,list(param.keys()))) niter = param['niter'] eta_star = param['eta_star'] delta = param['delta'] tau = param['tau'] rho = param['...
# Copyright (c) 2010 Citrix 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 ...
# DO NOT MODIFY THIS FILE # Run me via: python3 -m unittest test_max_heap import unittest import time import random from max_heap import MaxHeap class TestMaxHeap(unittest.TestCase): """ Initialization """ def test_instantiation(self): """ A MaxHeap exists. """ try: MaxHeap() except NameError: self.fail...
def setup(self): self.output.string.set(str(self.args.s1) + str(self.args.s2)) # Build the pipeline ppl = Pipeline() task1 = AppendString("Append 1","This ","is ") task2 = AppendString("Append 2",task1.output.string,"the full string") ppl.add_task(task2,requires=(task1,)) # Define outputs ppl.add_output('result...
<filename>Websocket.py import time, base64, hmac, hashlib, json, datetime import pandas as pd import numpy as np from random import randint from threading import Thread from websocket import WebSocketApp#, WebSocketConnectionClosedException from multiprocessing import Pool from multiprocessing.dummy import Pool as Thre...
message to tell us that the panel has finished download mode, so we too should stop download mode self.DownloadMode = False self.pmExpectedResponse = [] #self.pmWaitingForAckFromPanel = False if self.pmLastSentMessage is not None: lastCommandData = self.pmLastSentMessage.command.data log.debug("[handle_msgtype0B]...
<gh_stars>0 ''' This module contains all of the panels for mcblend GUI. ''' # don't import future annotations Blender needs that from typing import List, Optional from dataclasses import dataclass from .custom_properties import EffectTypes import bpy from bpy.props import ( StringProperty, IntProperty, BoolProperty,...
str was expected but a %s datatype variable was input.' % type(path) ) elif not os.path.isfile(path): raise FileNotFoundError("No file named %s was found, aborting" % path) if path.endswith(".h5"): # Assume SLC """ h5 has both the SLC images and metadata. gdal/rasterio seems to break a lot of the metadata fiel...
<reponame>nimzco/Environment # -*- coding: utf-8 -*- import os import platform import fnmatch from re import match, sub from subprocess import PIPE from subprocess import Popen import sublime import sublime_plugin # # Monkey patch `sublime.Region` so it can be iterable: sublime.Region.totuple = lambda self: (self.a...
<filename>np_processor/processor/np_faster_rcnn_post.py # -*- coding: utf-8 -*- from __future__ import division from __future__ import absolute_import import numpy as np from platformx.plat_tensorflow.tools.processor.np_utils import shape_utils, \ anchor_generator_builder, box_list_ops, box_list, ops, post_proc...
* Ii1I + oO0o if 66 - 66: i1IIi . I1ii11iIi11i if 86 - 86: Oo0Ooo if 48 - 48: OoO0O00 if 55 - 55: OoO0O00 * i1IIi * I11i / iII111i if ( ooOOOo0o0oo and ooOOOo0o0oo . accept_more_specifics == False ) : if ( ooOOOo0o0oo . eid_record_matches ( iI1iii1IIIIi ) == False ) : iiiIIIII1iIi = ooOOOo0o0oo . parent_for_more...
single (T1,T2) pair and configured as trunk for VLAN and VXLAN is enabled. :param conn: Connection object :return: True or False """ #ToDo(Hareesh): Interfaces are hard coded for now. Make it dynamic. interfaces = ['GigabitEthernet 2', 'GigabitEthernet 3'] try: for i in interfaces: conf_str = snippets.ENABLE...
Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.338416, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime ...
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ TestGyp.py: a testing framework for GYP integration tests. """ from contextlib import contextmanager import os import shutil import subprocess import sys impo...
standard_val if lot_attr in item[attributes_attr]: sample_doc[SampleConstants.STANDARD_ATTRIBUTES] = {} sample_doc[SampleConstants.STANDARD_ATTRIBUTES][SampleConstants.BEAD_MODEL] = DEFAULT_BEAD_MODEL sample_doc[SampleConstants.STANDARD_ATTRIBUTES][SampleConstants.BEAD_BATCH] = item[attributes_attr][lot_attr] # o...
<filename>addons/account/tests/test_account_payment_register.py<gh_stars>0 # -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.exceptions import UserError from odoo.tests import tagged @tagged('post_install', '-at_install') class TestAccountPaymentRegister(Account...
"objc-archive", flag_sets = [ flag_set( flag_groups = [ flag_group( flags = [ "-static", "-filelist", "%{obj_list_path}", "-arch_only", "<architecture>", "-syslibroot", "%{sdk_dir}", "-o", "%{archive_path}", ], ), ], ), ], implies = ["apple_env"], tools = [ tool( path = "<tool_dir>/libtool", exe...
and gets outcomes [6, 6]. End scores = (48, 61) >>> print(turns[6]) Start scores = (48, 61). Player 0 rolls 0 dice and gets outcomes []. End scores = (53, 61) >>> print(turns[7]) Start scores = (53, 61). Player 1 rolls 0 dice and gets outcomes []. End scores = (53, 65) >>> print(turns[8]) Start scores = (53,...
# -*- coding: utf-8 -*- """ This module bundles all the tools of the SNN conversion toolbox. Important functions: .. autosummary:: :nosignatures: test_full update_setup @author: rbodo """ from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import os from imp...
<gh_stars>0 # # Copyright (c) 2021 IBM Corp. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
= fluence_seq[:final_step+1] + [fluence_seq[final_step] + extra_fluence] return fluence_seq_until_time def get_fluence_subseq_until_time(path, cell, final_time): final_substep =find_substep_from_time(path, cell, final_time) extra_fluence = get_extra_subfluence_from_time(path, cell, final_time) fluence_subseq = g...
<filename>gym_highway/modell/modell.py import gym import numpy as np import matplotlib.pyplot as plt import math import copy from gym_highway.modell.ego_vehicle import Egovehicle from gym_highway.modell.environment_vehicle import Envvehicle, env_add_entry class Modell: def __init__(self, envdict): self.envdict = en...
# Copyright (c) 2012 <NAME> http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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 restri...
DQR) + r_rh * DHR - r_re_R*R - r_v * (1-zeta) D1 = D + r_dth * (AD + DQD + DHD) # Helper states TH1 = TH + r_d * p_d * p_h * I DVR1 = DVR + r_d * (1 - p_dth) * p_d * p_h * p_v * I - r_rv * DVR DVD1 = DVD + r_d * p_dth * p_d * p_h * p_v * I - r_dth * DVD DD1 = DD + r_dth * (DHD + DQD) DT1 = DT + r_d * p_d...
import re import traceback from pathlib import Path from unittest.mock import Mock, patch, call from math import sqrt, isclose import pytest import sys from PyQt5.QtCore import QTimer from PyQt5.QtGui import QColor, QImage, QPixmap from PyQt5.QtWidgets import QApplication, QLabel from PyQt5.QtWidgets import QHBoxLayo...
from scipy.optimize import OptimizeResult from scipy.optimize.optimize import _status_message from scipy.sparse.linalg import eigsh from torch import Tensor import torch from .function import ScalarFunction from .line_search import strong_wolfe _status_message['cg_warn'] = "Warning: CG iterations didn't converge. The...
the default reaction.add_metabolites({accoa_HSFc: -1.0, pi_HSFc: -1.0, actp_HSFc: 1.0, coa_HSFc: 1.0}) model.add_reactions([reaction]) print(reaction.name + ": " + str(reaction.check_mass_balance())) #accoa_HSFc + h2o_HSFc -> ac_HSFc + coa_HSFc + h_HSFc reaction = Reaction('HSF_ACOAH') reaction.name = 'Ac...
Admin settings for OfficeBasedVisits18 model""" def has_change_permission(self, request, obj=None): """ Do not allow users to edit model instances """ return False def has_delete_permission(self, request, obj=None): """ Do not allow users to delete model instances """ return False model = OfficeBasedVisits18 ...
+ m.x310 + m.x311 + m.x312 + m.x313 + m.x314 + m.x315 + m.x316 + m.x317 + m.x318 + m.x319 + m.x320 + m.x321 + m.x322 + m.x323 + m.x324 + m.x325 + m.x326 + m.x327 + m.x328 + m.x329 + m.x330 + m.x331 + m.x332 + m.x333 + m.x334 + m.x335 + m.x336 + m.x337 + m.x338 + m.x339 + m.x340 + m.x341 + m.x342 + m.x1102 + m.x1103...
"$qst_bring_back_runaway_serfs_num_parties_fleed"), (ge, ":sum_removed", 3), (try_begin), (ge, "$qst_bring_back_runaway_serfs_num_parties_returned", 3), (call_script, "script_succeed_quest", "qst_bring_back_runaway_serfs"), (else_try), (eq, "$qst_bring_back_runaway_serfs_num_parties_returned", 0), (call_script, ...
<reponame>YBZh/AuxSelfTrain import torch import os import math import torch.nn as nn import time import numpy as np from .base_solver import BaseSolver import torch.nn.functional as F from utils.utils import AverageMeter, to_cuda, accuracy, weight_ema, to_onehot, EMA_fixmatch, LabelGuessor, fix_bn, \ release_bn, get_l...
import numpy as np import pandas as pd from datetime import datetime from .pandas_functions import unique_values_from_column from bokeh.models import ColumnDataSource, Select, DataTable, TableColumn, DateFormatter, NumberFormatter, Circle, Label from bokeh.models import NumeralTickFormatter from bokeh.layouts import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017-2018, <NAME> # Distributed under the MIT License. See LICENSE.md for more info. # http://pymiescatt.readthedocs.io/en/latest/inverse.html from PyMieScatt.Mie import Mie_ab import numpy as np import matplotlib.pyplot as plt from matplotlib.cont...
"""Implementation of vpype's data model """ import logging import math from typing import Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast import numpy as np from shapely.geometry import LinearRing, LineString, MultiLineString from .geometry import crop, reloop from .line_index import LineIndex ...
<reponame>spxiwh/pegasus<filename>packages/pegasus-python/src/Pegasus/monitoring/event_output.py """ Functions for output pegasus-monitord events to various destinations. """ ## # Copyright 2007-2011 University Of Southern California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use...
the dimension to downsample downsampling_factor : int downsampling factor Returns ------- ndarray a downsampled image ''' if downsampling_factor == 1: logger.error("downsampling with a factor = 1 means no downsampling, thereby ignoring...") return self if self.metadata['dimensions'] is None: logger.erro...