input
stringlengths
2.65k
237k
output
stringclasses
1 value
cardsLeftString = list(map(str, cardsLeft)) # print("Cards left as list of strings: ",cardsLeftString) # return cardsLeftString def show_cards_left_buttons(cardsLefts): print(cardsLefts) cardsLefts = update_left_cards_in_deck(cardsLefts) print(cardsLefts) for i in range(0,len(cardsLefts),1): # print("Thats the i...
self._test_everything(self.hitX.strict_can_append, default=True) def test_strict_can_prepend(self): self._test_everything(self.hitX.strict_can_prepend, default=True) def test_hitX_0(self): """PartInXEnsemble treatment of zero-length trajectory""" assert_equal(self.hitX(paths.Trajectory([])), False) assert_equal...
# Copyright 2019 The TensorFlow Probability Authors. # Copyright 2019 OpenAI (http://openai.com). # # 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....
<reponame>YuanYunshuang/OpenCOOD<filename>opencood/utils/box_utils.py # -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, # License: TDG-Attribution-NonCommercial-NoDistrib """ Bounding box related utility functions """ import sys import numpy as np import torch import torch.nn.functional as F imp...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008-2011 Zuza Software Foundation # # This file is part of translate. # # translate 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; eith...
continue start = Util.current_time_in_millis () other_graph = Util.read_object (path_2) load_time = Util.current_time_in_millis () - start start = Util.current_time_in_millis () other_nodes = other_graph.get('nodes', []) other_map = { n['id'] : n for n in other_nodes } other_keys = set(other_map.keys()) inter...
from __future__ import print_function import os import sys import time import traceback from unittest import TestResult, TextTestResult from unittest.result import failfast from jinja2 import Template DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), "template", "report_template.html") def load_template(t...
fid == 3: if ftype == TType.STRUCT: self.auth = TimAuth() self.auth.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary ...
``val``. :param Optional[str] val: :rtype: LookupError """ return cls('malformed_path', val) def is_malformed_path(self): """ Check if the union tag is ``malformed_path``. :rtype: bool """ return self._tag == 'malformed_path' def is_not_found(self): """ Check if the union tag is ``not_found``. :rtype...
<gh_stars>10-100 import os import sys import json import argparse sys.path.append('../') import numpy as np import pandas as pd from aser.extract.eventuality_extractor import SeedRuleEventualityExtractor from tqdm import tqdm from utils.atomic_utils import SUBJ2POSS, PP_SINGLE from itertools import permutations from it...
<gh_stars>0 # -*- coding: utf-8 -*- import uqra, unittest,warnings,os, sys from tqdm import tqdm import numpy as np, scipy as sp from uqra.solver.PowerSpectrum import PowerSpectrum from uqra.environment import Kvitebjorn as Kvitebjorn from sklearn import datasets from sklearn.linear_model import LinearRegression fro...
registry_secret) assert mount_path == path if 'v1' in registry_api_versions: assert get_plugin(plugins, "postbuild_plugins", "pulp_push") assert plugin_value_get(plugins, "postbuild_plugins", "pulp_push", "args", "pulp_registry_name") == pulp_env else: with pytest.raises(NoSuchPluginException): get_plugin(plu...
# Copyright (c) 2022 PaddlePaddle 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 applicabl...
<gh_stars>1-10 import titration_class as ts """pK values and names taken from http://www.periodensystem-online.de/index.php (tyty)""" acidic_water = ts.Compound(name="Water", acidic=True, pKas=[14.0]) basic_water = ts.Compound(name="Water", acidic=False, pKas=[14.0]) # Acids Hydrochloric = ts.Compound(name="HCl", ac...
str(d.mouseX) + "," + str(d.mouseY) + ")" i.dl().text(txt, (10,i.height / 2), color=col) txt = "color: " + str(i.getPixel(d.mouseX,d.mouseY)) i.dl().text(txt, (10,(i.height / 2) + 10), color=col) print "coord: (" + str(d.mouseX) + "," + str(d.mouseY) + "), color: " + str(i.getPixel(d.mouseX,d.mouseY)) if elapsed...
Calculate overfill start_mismatch[j].append((time_list[tseg_start] - time_list[pseg_start]).total_seconds()) for ts, (tseg_start, tseg_stop) in enumerate(truth_segs): ps = _find_overlap_seg(pred_segs, tseg_stop) if ps == -1: # potential underfill or deletion ps = _find_seg_end_within(pred_segs, tseg_start, tseg_s...
cur.execute('SELECT COUNT(*) AS count, XImage.id, path FROM XImage, XBelonging WHERE XImage.id=XBelonging.ximage_id GROUP BY XImage.id ORDER BY count DESC LIMIT 1;').fetchone() print('Items per image:\n Minimum: %d (%s)\n Maximum: %d (%s)\n Average: %.1f' % (min_items_per_image, min_items_per_image_path, max_items_per...
<filename>QUANTAXIS/QAFetch/QAQuery.py<gh_stars>1-10 # coding: utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # 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 Softwar...
<gh_stars>1-10 # -*- coding: utf-8 -*- """EDA_Loan Approval System.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1Sv6QW4TJX0C9sCKhxevV5ocqAyY1sxbx # Problem Statement ## Business Use-case - Home loan company/bank gets application for loan from var...
import h5py import numpy as np import pyxrf from pyxrf.model.scan_metadata import * from pyxrf.core.utils import * from pyxrf.model.load_data_from_db import _get_fpath_not_existing, helper_encode_list try: from databroker.v0 import Broker except ModuleNotFoundError: from databroker import Broker try: from pyxrf.ap...
so change perms on the directory's contents changed |= recursive_set_attributes(b_fsname, follow, file_args, mtime, atime) # Change perms on the file pointed to by the link tmp_file_args = file_args.copy() tmp_file_args['path'] = to_native(b_fsname, errors='surrogate_or_strict') changed |= module.set_fs_attribute...
""" The various classes that launch external programs to view files """ import plugins, os from .. import guiplugins from string import Template from copy import copy import subprocess class FileViewAction(guiplugins.ActionGUI): def __init__(self, *args, **kw): self.performArgs = [] guiplugins.ActionGUI.__init__(...
False): """ Inits a row in current review optimization table :param detector: User who created ReviewOptimization :param argument: Argument.uid :param statement: Statement.uid :param is_executed: Boolean :param is_revoked: Boolean """ self.detector: 'User' = detector self.argument: Optional['Argument'] = arg...
logger.info("Removing server access to NSD {0} from node " "{1}".format(nsd_to_delete, node_to_delete.get_admin_node_name())) SpectrumScaleNSD.remove_server_access_to_nsd(nsd_to_delete, node_to_delete.get_admin_node_name(), nsd_attached_to_nodes) # All "mmchnsd" calls are asynchronous. Therefore wait here til...
import tensorflow as tf def build_VGG19_feature_extractor(input_shape): x = tf.keras.Input(shape=input_shape) base_model = VGG19(weights='imagenet', include_top=False) outputs = [] out = x for layer in base_model.layers: out = layer(out) if layer.name in ['block1_conv1', 'block2_conv1', 'block3_conv1', 'bloc...
or a list of strings with the technology names to run.") # Based on wealth index, minimum wage and a lower an upper range for cost of oportunity print(f'[{self.specs["Country_name"]}] Getting value of time') self.get_value_of_time() # Loop through each technology and calculate all benefits and costs for tech in t...
import functools import json import typing as t import warnings from datetime import datetime from io import BytesIO from .._internal import _to_str from .._internal import _wsgi_decoding_dance from ..datastructures import Accept from ..datastructures import Authorization from ..datastructures import CharsetAccept fro...
x, y, w, h): """ Set the dimensions for this view. :param int x: The horizontal position. :param int y: The vertical position. :param int w: The width. :param int h: The height. :returns: Self, to allow chaining. :rtype: VitessceConfigView """ self.view["x"] = x self.view["y"] = y self.view["w"] = w self...
# Copyright (c) 2020 The Khronos Group 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 i...
shapes, they're completely # useless. the previous step may also have created # an empty geometry if there weren't any items of # the type we're looking for. if shape.is_empty: return # add the shape as-is unless we're trying to keep # the geometry type or the geometry dimension is # identical. self.new_featu...
self.x_tree[self.act_node['ix']] # get X data of the node self.y_node = self.y_tree[self.act_node['ix']] # get Y data of the node self.p_val = self.act_node['state']['p'] self.n_reduce_sigma = self.act_node['state']['Cr'] self.n_fail = self.act_node['state']['Cf'] self.gamma = self.act_node['state']['gamma'] self...
self.translation.write(f) self.rotation.write(f) self.scale.write(f) vec3D.write(f, self.pivot) return self def build_relations(self, bones): if self.parent_bone >= 0: parent = bones[self.parent_bone] self.parent = parent parent.children.append(self) def load_bone_name(self, bone_type_dict): self.name = ...
""" Copyright 2019 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
import time from datetime import datetime import os import logging import platform import csv import statistics from polyglotdb import CorpusContext from polyglotdb.config import CorpusConfig from polyglotdb.io import (inspect_buckeye, inspect_textgrid, inspect_timit, inspect_labbcat, inspect_mfa, inspect_fave, gue...
= 'ATP Hydrolysis' reaction.lower_bound = 0. # This is the default reaction.upper_bound = 1000. # This is the default reaction.add_metabolites({atp_HAOc: -1.0, h2o_HAOc: -1.0, adp_HAOc: 1.0, pi_HAOc: 1.0, h_HAOc: 1.0, ATP_SLP_HAO: -1.0}) model.add_reactions([reaction]) print(reaction.name + ": " + str(reac...
= coefs self.offset = offset self.symmetric_bonds = symmetric_bonds kwargs = {**desc.index_dict, **kwargs} Expr.__init__(self, **kwargs) # === PROPERTY EVALUATION METHODS def _pyomo_expr(self, index=None): """Interface for generating Pyomo expressions. Args: index (list): Optional, index to to create an inst...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest import TestCase import pytest import os from cielo_webservice.models import ( Comercial, Cartao, Pedido, Pagamento, Autenticacao, Autorizacao, Token, Transacao, Avs, Captura, Cancelamento, Erro, xml_to_object ) BASE_DIR = os.path.dirname...
a topic distribution for "<input_data>" Then the topic distribution is "<topic_distribution>" And I create a local topic distribution for "<input_data>" Then the local topic distribution is "<topic_distribution>" """ headers = ["data", "source_wait", "dataset_wait", "model_wait", "source_conf", "input_data", "top...
import logging, requests, json, smtplib, datetime, os, random, sys, subprocess, traceback from django.utils import timezone from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from homeauto.models import Trigger, Nugget, Action, HouseLight, Account, Person, CustomEvent from...
None: stream_retval = RewriteRuleSubtreeStream(self._adaptor, "rule retval", retval.tree) else: stream_retval = RewriteRuleSubtreeStream(self._adaptor, "token retval", None) root_0 = self._adaptor.nil() # 218:36: -> set_func self._adaptor.addChild(root_0, stream_set_func.nextTree()) retval.tree = root_0 ...
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.337767, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.80515, 'S...
#!/usr/local/bin/python3 import sys import re import os import copy import pickle if len(sys.argv) < 2: sys.exit('./callMom.py <reference> <fasta>') ### CLASS DEFINITIONS # Site variables: id, pos, end, ref, alt, len, out, vtype, maxlen # create site class class Site(): def __init__(self, a, b, c, d): self.id = a...
waveform_size, n_spikes = wf.shape # upsample using cubic interpolation x = np.linspace(0, waveform_size - 1, num=waveform_size, endpoint=True) shifts = np.linspace(0, 1, upsample_factor, endpoint=False) xnew = np.sort(np.reshape(x[:, np.newaxis] + shifts, -1)) wfs_upsampled = np.zeros((waveform_size * upsample_f...
from __future__ import (absolute_import, division, print_function, unicode_literals) import copy import six import warnings import logging import numpy as np from ..utils import (apply_to_dict_recursively, sanitize_np, format_time as _format_time, transpose as _transpose) from event_model import MismatchedDataKeys ...
'HLT_BTagMu_DiJet40_Mu5_v3', 'HLT_BTagMu_DiJet70_Mu5_v3', 'HLT_BTagMu_Jet300_Mu5_v3'), Charmonium = cms.vstring('HLT_Dimuon0_Jpsi_Muon_v3', 'HLT_Dimuon0er16_Jpsi_NoOS_NoVertexing_v3', 'HLT_Dimuon0er16_Jpsi_NoVertexing_v3', 'HLT_Dimuon10_Jpsi_Barrel_v4', 'HLT_Dimuon13_PsiPrime_v3', 'HLT_Dimuon16_Jpsi_v3...
""" # pylint: disable-msg=too-many-locals def __init__(self, name: str = '', command: Optional[List[str]] = None, environment: Optional[Dict[str, str]] = None, artifacts: str = '', report_artifacts: str = '', artifact_prebuild_clean: bool = False, directory: str = '', critical: bool = False, background: boo...
""" Magic Link. pymdownx.magiclink An extension for Python Markdown. Find http|ftp links and email address and turn them to actual links MIT license. Copyright (c) 2014 - 2017 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Determining whether files are being measured/reported or not.""" # For finding the stdlib import atexit import inspect import itertools import os import platfor...
# Open the database to keep "done" records, # and delete moldy, old in-progress records. g.mdb = searchdatabasemongo.CSearchDatabase(g.sSearchDbMongoName, g.sSearchDbProgressCollectionName, g.sSearchDbDoneCollectionName) g.mdb.fnvDeleteProgressCollection() # Get the set of instructions for today from database....
"""Contains plot functions.""" from platform import system import numpy as np import matplotlib.pyplot as plt from matplotlib import gridspec from matplotlib.lines import Line2D from matplotlib.patches import Polygon from . import utils as ut from . import salt_utils as salt_ut from . import nb_fun as nbf def plt_ma...
<reponame>woblob/Crystal_Symmetry import podstawa as pod # missing matrices _matrix_inv_000_h00_miss = pod.matrices_dict["inv_000"] + pod._translation_h00 #0 _matrix_m_0yz_h00_miss = pod.matrices_dict["m_0yz"] + pod._translation_h00 #1 _matrix_m_x0z_h00_miss = pod.matrices_dict["m_x0z"] + pod._translation_h00 #2 _matr...
from tkinter import * from tkinter import messagebox from tkinter import ttk from datetime import * import webbrowser from tkcalendar import * import sqlite3 # create connection to BMI database try: cn = sqlite3.connect("../bmil.db") except: cn = sqlite3.connect("bmil.db") cr = cn.cursor() # if there is no database...
module.exit_json(**result) def validate_cer_connectivity(): url = 'https://' + hostname + ":" + api_port + '/cerappservices/export/authenticate/status/' + username + '/' + str(hashlib.sha256(password.encode()).hexdigest()) i = 0 cer_headers = { 'Host': hostname + ":" + api_port } while True: try: response = (...
= AttributeEventWait(self.getAttribute("state")) evt_wait.lock() try: time_stamp = time.time() try: self.command_inout("ReleaseMacro") except PyTango.DevFailed as df: # Macro already finished - no need to release if df.args[0].reason == "API_CommandNotAllowed": return evt_wait.waitForEvent((self.Running, ), e...
assert balance_maker == deploy_args[2] - _amount_make assert balance_taker == _amount_take assert commitment == _amount_make - _amount_take # Assert: last_price assert bond_exchange.lastPrice(bond_token.address) == 123 # 正常系2 # Make買、Take売 # <発行体>新規発行 -> <投資家>Make注文(買) # -> <発行体>Take注文(売) -> <決済業者>決済処理 def test_...
<filename>packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class ZAxis(_BaseLayoutHierarchyType): # autorange # --------- @property def autorange(self): """ Determines whether or not the r...
#! usr/bin/python from __future__ import print_function, division, absolute_import from os import remove from os.path import join, abspath from sys import stdout, exit from time import time import multiprocessing as mp from argparse import ArgumentParser import logging import numpy as np from disvis import DisVis, PD...
200 self.assertContains(response, 'lang: fr') self.assertContains(response, 'course name: test_template_3_course') @override_settings(FEATURES=FEATURES_WITH_CUSTOM_CERTS_ENABLED) @patch('lms.djangoapps.certificates.views.webview.get_course_run_details') def test_certificate_custom_template_with_org_and_mode(self,...
data[resource] actions.update({resource: {'action': 'subtract', 'amount': data[resource]}}) tgtactions.update({resource: {'action': 'add', 'amount': data[resource]}}) freighters = world.freighters - world.freightersinuse required_freighters = (required_capacity / v.freighter_capacity['total'])+ 1 if len(resources...
# Boolean indices out_aet = x_aet[x_aet < 0] assert isinstance(out_aet.owner.op, aet_subtensor.AdvancedSubtensor) out_fg = FunctionGraph([], [out_aet]) compare_jax_and_py(out_fg, []) # Advanced indexing out_aet = x_aet[[1, 2]] assert isinstance(out_aet.owner.op, aet_subtensor.AdvancedSubtensor1) out_fg = Funct...
<reponame>fengwang/jax # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
""" .. codeauthor:: <NAME> <<EMAIL>> """ import datetime import ipaddress import sys from decimal import Decimal import pytest from termcolor import colored from typepy import ( Bool, DateTime, Dictionary, Integer, Nan, RealNumber, StrictLevel, String, Typecode, ) from dataproperty import ( MIN_STRICT_LEVE...
import logging import cv2 import numpy as np import pytesseract import os import time import json import re from multiprocessing import Pool from Levenshtein import distance from .input_handler import InputHandler from .grabscreen import grab_screen from .utils import get_config, filter_mod # This is a position of ...
<reponame>nudglabs/books-python-wrappers #$Id$ from books.model.Address import Address class Organization: """This class is used to create object for organization.""" def __init__(self): """Initialize parameters for organization object. """ self.organization_id = '' self.name = '' self.is_default_org = None s...
""" Base class for the contexts as used in the paper "How to Train Your Differentiable Filter". Contains code that is shared between all three contexts. """ # this code only works with tensorflow 1 import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import numpy as np import os import csv from differentiable_...
<filename>python/webgme_bindings/webgme_bindings/test.py<gh_stars>0 """ To run with coverage first: pip install coverage Then from <rootDir>/python/webgme_bindings: coverage run -m unittest discover -s <rootDir>/python/webgme_bindings/webgme_bindings -p test.py -t <rootDir>/python/webgme_bindings coverage html cove...
# -*- coding: utf-8 -*- ''' Some Tools for Pip-In - Verbose Documentation ''' # ################################################################################## # MG ILLUMINATION # # First Crazy Debroussailleur : jDepoortere # # Author : cPOTTIER # # Last Update : 27-06-2016 # # #####################################...
your least favorite subject at school?', 'Who is your dream dinner guest?', 'Would you rather publish a book or release an album?', 'Have you ever met someone famous?', 'Have you ever had a supernatural experience?', 'Who is your favorite superhero?', 'What job would you be doing if computers had not ...
' '"path /usr/libexec/argo-monitoring/probes/argo", ' '"interval 5", "retryInterval 3"]' ) self.assertEqual(metric.attribute, '["argo.api_TOKEN --token"]') self.assertEqual(metric.dependancy, '') self.assertEqual(metric.flags, '["OBSESS 1"]') self.assertEqual(metric.files, '') self.assertEqual(metric.parameter,...
edge mask using adaptive thresholding """ img_edges = cv2.adaptiveThreshold(src=img_blur, maxValue=255, adaptiveMethod=adaptive_method, thresholdType=thresh_method, blockSize=thresh_bsize, C=thresh_C) """ step 4. combine color image with edge mask """ if (nb_channels == 3): img_edges = cv2.cvtColor(img_edges,...
pass def MItMeshPolygon_getUVArea(*args, **kwargs): pass def MFnNumericData_getData2Double(*args, **kwargs): pass def MArrayDataHandle_setClean(*args, **kwargs): pass def MFnCamera_postProjectionMatrix(*args, **kwargs): pass def MDGContext_isNormal(*args, **kwargs): pass def MItDag_root(*args, **kwargs...
import torch from torch import nn from torch.nn import functional as F from torch.nn.modules.utils import _pair from detectron2.layers.wrappers import _NewEmptyTensorOp from ..spatial_conv import _SpatialConv __all__ = [ "R4ConvF", "R4Conv",#"R4ConvL", "R4TConv", "ginterpolate" ] spatial_conv = _SpatialConv.apply ...
values (default: %(default)s)') parser.add_argument('--synthesis-bool-only', action='store_true', help='synthesize only boolean expressions (default: %(default)s)') parser.add_argument('--max-z3-trials', metavar='NUM', type=int, default=2, help='maxium Z3 trials when using SemFix synthesizer (default: %(default)s)'...
to Slice. to_slice([int] v, bool ind1) -> Slice Construct from an index vector (requires is_slice(v) to be true) to_slice(IM x, bool ind1) -> Slice > to_slice(IM x, bool ind1) ------------------------------------------------------------------------ Convert IM to Slice. > to_slice([int] v, bool ind1) ---...
matrices') return self._new(L), self._new(D) def liupc(self): """Liu's algorithm, for pre-determination of the Elimination Tree of the given matrix, used in row-based symbolic Cholesky factorization. Examples ======== >>> from sympy.matrices import SparseMatrix >>> S = SparseMatrix([ ... [1, 0, 3, 2], ......
k_elongation.flatten().tolist()[:-1] kelongs = kelongs + k_elongation.flatten().tolist()[:-1] return kelongs def get_k(self, nt_seq, k_init, k_elong_mean): ''' returns all propensities for a given nucleotide sequence *args* **nt_seq**, nucleotide sequence as a string **k_initiation**, initiation r...
<filename>nevermined_gateway/routes.py<gh_stars>1-10 import json import logging from authlib.integrations.flask_oauth2 import current_token from authlib.jose.errors import BadSignatureError from common_utils_py.agreements.service_agreement import ServiceAgreement from common_utils_py.agreements.service_types import Se...
<filename>firmware/coreboot/util/me_cleaner/me_cleaner.py #!/usr/bin/python # me_cleaner - Tool for partial deblobbing of Intel ME/TXE firmware images # Copyright (C) 2016-2018 <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
import yaml import os import logging from os.path import relpath from dc_exceptions import DcException from copy import deepcopy class DcMixer(object): """ Main class for dc-mixer """ __MIXER_FILE = 'docker-compose-mixer.yml' """:type : string""" __EXIT_STATUS_INPUT_FILE_NOT_EXISTS = 2 """:type : string""" ...
current law and records modified with imputation elecv_credit = max(0., min(ev_credit_amt, EV_credit_c)) # phaseout based on agi posevagi = max(c00100, 0.) ev_max = EV_credit_ps[MARS - 1] if posevagi < ev_max: evtc = elecv_credit else: evtc_reduced = max(0., evtc - EV_credit_prt * (posevagi - ev_max)) evtc = m...
domain where the type named typeName is created. assemblyName: The name of the assembly where the type named typeName is sought. If assemblyName is null,the executing assembly is searched. typeName: The name of the preferred type. ignoreCase: true to specify that the search for typeName is not cas...
self.sessionUuid: raise Exception('sessionUuid of action[QueryVolumeAction] cannot be None') reply = api.sync_call(self, self.sessionUuid) self.reply = reply self.out = reply.inventories return self.out class QueryVolumeSnapshotAction(inventory.APIQueryVolumeSnapshotMsg): def __init__(self): super(QueryVolumeSn...
dict(np.load(os.path.join(opts.out_dir, "word_index.npy"), allow_pickle=True).item()) vocab.word2index.update(word_index) else: word_set = raw_data.get_word_set(attack_surface, use_counter_vocab=not opts.use_a3t_settings and not opts.use_none_settings) vocab, word_mat = vocabulary.Vocabulary.read_word_vecs(word_se...
== 'blueprint': INPUT_FASTQ_PREFIX = "out/ln/updir/mw/" + ACCESSION if SE_OR_PE == 'se': fq_to_rename = INPUT_FASTQ_PREFIX + ".fastq.gz" elif SE_OR_PE == 'pe': fq_to_rename_1 = INPUT_FASTQ_PREFIX + "_1.fastq.gz" fq_to_rename_2 = INPUT_FASTQ_PREFIX + "_2.fastq.gz" elif str(row['origin']) == 'fastq_absolute_path...
_get_times(energy) + r / v0 - (st.sonset - st.origintime) if smooth: plot(t, energy.data_unsmoothed, color='0.7') plot(t, energy.data, color=c1l) G_ = smooth_func(lambda t_: G_func(r, t_, v0, g0), t, smooth, window=smooth_window) Emod = get_Emod(G_, t) index = np.argwhere(Emod < 1e-30)[-1] Emod[index] = 1e-30 ...
""" Copyright 2020 <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 copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
# Audio processing tools # # <NAME> 2020 # # Some code modified from original MATLAB rastamat package. # import numpy as np from scipy.signal import hanning, spectrogram, resample, hilbert, butter, filtfilt from scipy.io import wavfile # import spectools # from .fbtools import fft2melmx from matplotlib import pyplot...
<reponame>sun1638650145/text # coding=utf-8 # Copyright 2022 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
origins. """ return pulumi.get(self, "web_origins") @web_origins.setter def web_origins(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "web_origins", value) class Client(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.Re...
***" % interaction.action.utterance) super().add_interaction(interaction) interaction.action.success = 1 return # noqa R502 elif action_type == "Audio": if interaction.agent_id == 0: # Commander self.logger.info("*** Commander - Audio: %s ***" % interaction.action.utterance) else: self.logger.info("*** Driver -...
<reponame>aledelmo/3DSlicer_Plugins import os import string import time import unittest from builtins import range try: from itertools import izip as zip except ImportError: pass import RegistrationLib from __main__ import vtk, qt, ctk, slicer import MyRegistrationLib class BonesSegmentation: def __init__(self,...
import time import os import sys from pathlib import Path import numpy as nump import pandas as panda import uuid import csv import inspect import re import platform import requests import json from datetime import datetime from tir.technologies.core.config import ConfigLoader from tir.technologies.core.logging_config ...
<reponame>TAGC-Brun/RAINET-RNA import shutil import os from os.path import basename from fr.tagc.rainet.core.data import DataConstants from fr.tagc.rainet.core.data.TableStatus import TableStatus from fr.tagc.rainet.core.execution.ExecutionStrategy import ExecutionStrategy from fr.tagc.rainet.core.util import Constan...
Criteria:** Includes only relevant concepts associated with diagnoses that represent frailty. This is a grouping of ICD10CM and SNOMEDCT codes. **Exclusion Criteria:** No exclusions. """ OID = '2.16.840.1.113883.3.464.1003.113.12.1074' VALUE_SET_NAME = 'Frailty Diagnosis' EXPANSION_VERSION = 'eCQM Update 2020-05...
lagged_regressor_df], axis=1, sort=False) if value_col in features_df_fut.columns: # This is to remove duplicate ``value_col`` generated by building features. # The duplicates happen during calculating extended fitted values # when we intentionally include ``value_col``. del features_df_fut[value_col] features...
import sys, os, random, scipy import numpy as np import pandas as pd from numba.typed import List import statsmodels.api as sm from statsmodels.stats.multitest import multipletests from tqdm import tqdm from sklearn.cluster import AgglomerativeClustering from anndata import AnnData from .base import lr, calc_neighbou...
f.read() == "hello" @pytest.mark.datafiles(DATA_DIR) def test_open_force_different_workspace(cli, tmpdir, datafiles): _, project, workspace = open_workspace(cli, tmpdir, datafiles, "git", "-alpha") # Assert the workspace dir exists assert os.path.exists(workspace) hello_path = os.path.join(workspace, "usr", "bi...
<filename>awxkit/test/test_dependency_resolver.py import pytest from awxkit.utils import filter_by_class from awxkit.utils.toposort import CircularDependencyError from awxkit.api.mixins import has_create class MockHasCreate(has_create.HasCreate): connection = None def __str__(self): return "instance of {0.__cla...
The size of the image to generate in [Nx, Ny, Nz] where N is the number of voxels in each direction. For a 2D image, use [Nx, Ny]. radius : int The radius of spheres (circles) in the packing. spacing : int or List[int] The spacing between unit cells. If the spacing is too small then spheres may overlap. If an ``...
Specific pending changes are identified by subelements. - **MasterUserPassword** *(string) --* The pending or in-progress change of the master user password for the cluster. - **NodeType** *(string) --* The pending or in-progress change of the cluster's node type. - **NumberOfNodes** *(integer) --* The pending...