input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>crisien/ooi-data-explorations<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- """ @author <NAME> @brief Calculates QARTOD test ranges and creates the resulting tables used by the OOI QC lookup functions to implement the QARTOD testing. """ import argparse import numpy as np import pandas as pd im...
matrix(0.0, (x.size[1], 1)) for k in range(len(W['v'])): v = W['v'][k] m = v.size[0] if inverse == 'I': blas.scal(-1.0, x, offset=ind, inc=x.size[0]) blas.gemv(x, v, w, trans='T', m=m, n=x.size[1], offsetA=ind, ldA=x.size[0]) blas.scal(-1.0, x, offset=ind, inc=x.size[0]) blas.ger(v, w, x, alpha=2.0, m=m, n=x.si...
""" All SI UNITS unless specified. """ import typing import numpy as np def eq_5_dimensionless_hrr( Q_dot_kW: float, rho_0: float, c_p_0_kJ_kg_K: float, T_0: float, g: float, D: float, ) -> float: """Equation 5 in Section 8.3.2.2 PD 7974-1:2019 calculates dimensionless for rectangular fire source. :param Q_...
niface at position index Method returns a perturbation from a particular interface. ``niface`` must be a valid integer index referring to an interface. ``index`` is the index into the perturbation list for the particular index. If ``index`` is not provided or is ``None``, the method returns the entire list. :para...
import os from fnmatch import fnmatch from typing import Iterator, List, Optional, Sequence, Tuple, Union import numpy as np from typing_extensions import Literal from . import lib from .otf import TemporaryOTF from .util import PathOrArray, _kwargs_for, imread def rl_cleanup(): """Release GPU buffer and cleanup a...
import pytest import retrying import time import traceback from datetime import timedelta from dcos.mesos import DCOSClient from dcos import mesos from shakedown import * from utils import * def app(id=1, instances=1): app_json = { "id": "", "instances": 1, "cmd": "for (( ; ; )); do sleep 100000000; done", "cpu...
<filename>test/jsonchecks/jsonschema.py """ An implementation of JSON Schema for Python The main functionality is provided by the validator classes for each of the supported JSON Schema versions. Most commonly, :func:`validate` is the quickest way to simply validate a given instance under a schema, and will create a ...
4.31171], [1562500, 2, 0, 8, 0, 4.36883], [1568000, 8, 0, 3, 2, 3.89379], [1572864, 19, 1, 0, 0, 3.23712], [1574640, 4, 9, 1, 0, 3.96278], [1575000, 3, 2, 5, 1, 4.70566], [1580544, 9, 2, 0, 3, 4.43738], [1587600, 4, 4, 2, 2, 3.82147], [1594323, 0, 13, 0, 0, 3.99824], [1600000, 9, 0, 5, 0, 3.81046], [1605632, 15, 0, 0, ...
A (matrix A_star of related papers)") gen_matrix_G(ncomp=pca_G_ncomponents) # TODO: increase automatically pca_A_ncomponents if the explained variance drops to less than, for instance, 0.85 gen_matrix_A_star(ncomp=pca_A_ncomponents) print("\n[x] Generating matrix M out of two parts " "| ui | aj | target {1 if rela...
<reponame>carlos-jenkins/ops-topology-lib-vtysh # -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Hewlett Packard Enterprise Development LP # # 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 #...
<reponame>thunder95/wiki-django-wechat-apitester-album<gh_stars>1-10 # -*- coding: utf-8 -*- #!/usr/bin/python from __future__ import print_function import os import requests import re import time import xml.dom.minidom import json import math import subprocess import ssl import threading import urllib import urllib3 ...
import copy import json import math import random from battle_wizard.game.data import Constants from create_cards.models import CustomCard class Card: def __init__(self, info): self.id = info["id"] if "id" in info else -1 self.attacked = info["attacked"] if "attacked" in info else False self.author_username = i...
in reversed(self.outputs): ans = ans.bind(decl.name, decl.type, decl) else: for elt in reversed(self.body): if isinstance(elt, (Call, WorkflowSection)): ans = Env.merge(elt.effective_outputs, ans) return ans @property def children(self) -> Iterable[SourceNode]: """""" for d in self.inputs or []: yield d f...
>>> ibs.show_depc_image_graph(reduced=reduced) >>> ut.show_if_requested() """ self.show_depc_graph(self.depc_image, **kwargs) def show_depc_annot_graph(self, *args, **kwargs): """ CommandLine: python -m wbia.control.IBEISControl --test-show_depc_annot_graph --show python -m wbia.control.IBEISControl --test-sho...
<gh_stars>0 # coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
if `not None` *and* there's more than one sample. separate_lowpass : None / bool If True, will pack spinned (`psi_t * psi_f_up`, `psi_t * psi_f_dn`) and lowpass (`phi_t * phi_f`, `phi_t * psi_f`, `psi_t * phi_f`) pairs separately. Recommended for convolutions (see Structures & Uniformitym). Defaults to False if ...
fractions measured by Li+ 2011) Special options 'max','mid','min' : use a redshift-dependent prior based on simple models for the CCSN and SNIa rate vs z. The first uses the baseline rate models, the latter 2 use alternate rate models that ~minimize/maximize the fraction assigned to Type Ia at any z. See hstsnpi...
from __future__ import annotations import random import struct from typing import Union, Iterator, TYPE_CHECKING import elma.models from elma.constants import VERSION_ELMA from elma.constants import VERSION_ACROSS from elma.constants import END_OF_DATA_MARKER from elma.constants import END_OF_FILE_MARKER from elma.co...
import numpy as np import param import colorsys from functools import reduce from holoviews import Element, Layout, NdOverlay, Overlay, Collator from holoviews import RGB, Image, ItemTable, Operation, Dimension from holoviews.core.traversal import unique_dimkeys from holoviews.operation.normalization import raster_n...
import claim return claim.ClaimAccident(jsondict) if "ClaimInsurance" == resource_type: from . import claim return claim.ClaimInsurance(jsondict) if "ClaimProcedure" == resource_type: from . import claim return claim.ClaimProcedure(jsondict) if "ClaimDiagnosis" == resource_type: from . import claim return cla...
<reponame>ii-research-yu/pgbm<filename>examples/pytorch/example10_covidhospitaladmissions.py # -*- coding: utf-8 -*- """ Copyright (c) 2021 <NAME> as part of Airlab Amsterdam & Kickstart.AI Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Licens...
of cells</th>\n" cel_tbl += "</tr>\n" for level in non_zero_levels: cel_tbl += "<tr>\n" cel_tbl += "<td" + style + ">{}</td>\n".format(level) cel_tbl += "<td" + style + ">{}</td>\n".format(level_count[level]) cel_tbl += "</tr>\n" cel_tbl += "<tr>\n" cel_tbl += ( "<td style='font-weight: bold; padding: 5px 20px...
<reponame>AayushVyasKIIT/Athena from __future__ import print_function import os.path from re import S import subprocess from sys import stdout from webbrowser import get from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request ...
@classmethod def find_or_new(cls, id, columns=None): """ Find a model by its primary key or return new instance. :param id: The id of the model :type id: mixed :param columns: The columns to retrieve :type columns: list :return: A Model instance :rtype: Model """ instance = cls.find(id, columns) if inst...
<gh_stars>10-100 """ PLEASE READ DISCLAIMER This is a sample script for demo and reference purpose only. It is subject to change for content updates without warning. REQUIREMENTS - Python 2.7 minimum - Python modules: requests - IxNetwork 8.41+ DESCRIPTION - Configures 3 NGPF Topology Groups with ISIS proto...
# Copyright (c) 2018 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...
checks for destination and abort if necessary.""" try: self.destination.safety_checks() except hw_obj.CriticalHardwareError as err: std.print_error( f'Critical error(s) detected for: {self.destination.path}', ) raise std.GenericAbort() from err def safety_check_size(self): """Run size safety check and abort i...
pre_states[-1] = (objs, tuple(set(pre_states[-1][1]) | set((('HAZARD-SERIOUSNESS', fromloc, toloc, 'VERY-HAZARDOUS'),)))) return pre_states """ ;; block-road - blocks off a road (:method (block-road ?from ?to) normal ((police-unit ?police)) (:unordered (set-up-cones ?from ?to) (get-to ?police ?from))) """ ...
1, amount=Amount(100), dividend=Amount(1)), Transaction(date(2019, 6, 1), "ABC", 1, amount=Amount(100), dividend=Amount(2)), ] dividend = next_linear_dividend(records) assert dividend == GeneratedAmount(2) records = [ Transaction(date(2019, 3, 1), "ABC", 1, amount=Amount(100), dividend=Amount(1)), Transaction...
<reponame>Freakwill/pyparsing_ext #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import re import pyparsing as pp from pyparsing_ext.actions import * from pyparsing_ext.oplists import * '''notations: pe: ParserElement s: string l, loc: location char, chr: character *x: extension ''' #...
# Mrs # Copyright 2008-2012 Brigham Young University # # 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 ag...
def _apply_lookup_to_query(query, key, lookup): if isinstance(lookup, slice): expr = LSMTable.slice_to_expr(key, lookup) if expr is not None: query = query.where(expr) return query, False elif isinstance(lookup, Expression): return query.where(lookup), False else: return query.where(key == lookup), True @cla...
<filename>wikidump/languages.py supported = {'de', 'en', 'es', 'fr', 'it', 'nl', 'pl', 'ru', 'sv'} bibliography = { 'en': { 'bibliography', 'references', 'reference', 'further reading', 'notes', 'sources', 'footnotes', 'citations', 'publications', 'publication history', 'literature', }, 'it': {'bibliogra...
not in other or self[key] != other[key]: return False return True return False raise NotImplementedError( "Cannot compare type {type_} to an Header. Use str or Header.".format( type_=type(other) ) ) def __str__(self) -> str: """ Allow to cast a single header to a string. Only content would be exposed here. ...
from __future__ import annotations from sauronlab.core.core_imports import * from sauronlab.lookups import * from sauronlab.model.compound_names import TieredCompoundNamer look = Tools.look _users = {u.id: u.username for u in Users.select()} _compound_namer = TieredCompoundNamer(max_length=50) @abcd.external class ...
# NOTE: This file is auto-generated, please do not modify from ..packet import * from .. import events class ACI_GATT_INIT(CommandPacket): """ Initialize the GATT layer for server and client roles. It adds also the GATT service with Service Changed Characteristic. Until this command is issued the GATT channel ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import print_function """ Created on Fri Feb 17 12:38:44 2017 @author: ahefny, zmarinho """ from collections import defaultdict import numpy as np import theano import theano.printing import theano.tensor as T import theano.tensor.slinalg from theano.te...
a string that defines low, medium, or high significance or an "actual" level of significance and converts it to a comparison level/significance level tuple. This is used to mimic other software packages as some test's decision rules check test-statistic against pre-defined treshholds while others check sig. level ...
# -*- coding: utf-8 -*- import sys, traceback, os import multiwordnet.db as db from multiwordnet.wordnet import WordNet import Levenshtein libdir = "/usr/local/lib/python3.6/site-packages/multiwordnet/db/" eng_numbers = ("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten") lat_numbers = ("...
def context_for_org_email(self): worst = self.worst_performing_in_period(3) best = self.best_performing_in_period(3) most_changing = self.most_change_against_window(12) interesting = [] most_changing_interesting = [] for extreme in [worst, best]: self._move_non_ordinal(extreme, interesting) for extreme in [most...
<reponame>Secure-AI-Systems-Group/Qu-ANTI-zation<gh_stars>1-10 """ Run various analysis with clean and perturbed models. """ import os, gc, csv import copy import random import itertools import numpy as np from tqdm import tqdm # to disable future warnings import warnings warnings.simplefilter(action='ignore', catego...
<filename>cemc/tools/phase_boundary_tracker.py """ Module holding the nessecary classes for tracing a phase boundary """ import os from itertools import combinations import logging import numpy as np from scipy.interpolate import UnivariateSpline import h5py as h5 from ase.units import kB from cemc.mcmc.sgc_montecar...
from datetime import datetime, time, timedelta from flask import current_app from notifications_utils.timezones import convert_local_timezone_to_utc from sqlalchemy import Date, case, func from sqlalchemy.dialects.postgresql import insert from sqlalchemy.sql.expression import extract, literal from sqlalchemy.types imp...
else: raise Error.ArgumentError("Unsupported input of qubitNum, it should be an int value or a list.") # Update the sysLevel property if isinstance(self._sysLevel, list): if isinstance(onSubSys, int): subHam.sysLevel = self._sysLevel[onSubSys] subHam.job.sysLevel = self._sysLevel[onSubSys] else: subHam.sysLeve...
options = [option for option in options if option['key']!= bad_option] else: retry = False else: retry = False if response.error_description: raise HomeConnectError(response.error_description, response=response) raise HomeConnectError("Failed to set program ({response.status})", response=response) async def ...
######################################################################################## ## ## ## THIS LIBRARY IS PART OF THE SOFTWARE DEVELOPED BY THE JET PROPULSION LABORATORY ## ## IN THE CONTEXT OF THE GPU ACCELERATED FLEXIBLE RADIOFREQUENCY READOUT PROJECT ## ## ## #################################################...
<filename>pygfx/objects/_base.py import random import weakref import threading import numpy as np from ._events import EventTarget from ..linalg import Vector3, Matrix4, Quaternion from ..linalg.utils import transform_aabb, aabb_to_sphere from ..resources import Resource, Buffer from ..utils import array_from_shadert...
onelha in lhaid] except Exception as error: logger.debug(str(error)) logger.warning('impossible to download all the pdfsets. Bypass systematics') return if self.options['run_mode'] ==2 and self.options['nb_core'] != 1: nb_submit = min(self.options['nb_core'], nb_event//2500) elif self.options['run_mode'] ==1: ...
".join(f'"{t.__name__}"' for t in self.contains)) else: shouldbe = f'"{self.contains.__name__}"' return f'contained a value of type "{type(each).__name__}" but should have been {shouldbe}' if self.pairs and len(value) % 2 != 0: return 'container should be of even length, but is not' if not value and not self.allo...
is null, and you evaluate it using ``NULL`` , the result is a Boolean ``false`` . This is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NULL`` comparison operator. * ``CONTAINS`` : Checks for a subsequence, or value in a set. ``AttributeValueList`` can contain only one ``AttributeValu...
<gh_stars>1-10 import io import os import json import base64 import logging import argparse import tempfile import requests from PIL import Image from libs import automation, utils from libs.android import Android from libs.calls import CallManager from libs.sdk_manager import SDKManager from libs.messages import Mes...
<reponame>we-the-diff/cs207-FinalProject import math import numpy as np #=====================================Elementary functions=====================================================# def e(x): #try: return np.exp(x) #except: # return x.exp() def sin(x): #try: return np.sin(x) #except: # return x.sin() ...
""" @copyright: 2012-2016 <NAME> (as file __init__.py) @copyright: 2016-2018 <NAME> @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import os, sys sys.path.insert(1, os.path.dirname(sys.path[0])) import errno, fnmatch, glob, shutil, re import unittest, difflib, logging, imp import gettext...
''' Cache service for XBMC Copyright (C) 2010-2011 <NAME> And <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Th...
import inspect import operator from functools import wraps from typing import ( Any, Callable, List, Mapping, NamedTuple, Optional, Sequence, Tuple, TypeVar, Union, ) T = TypeVar("T") OT = TypeVar("OT", bound="Op") class _Constant: __slots__ = ("name",) def __init__(self, name) -> None: self.name: str ...
RESTAURANT', 'PARA TI COLOMBIA CON SABOR', 'BUTTERMILK CHANNEL', 'NEW TUNG HING', 'AZUL TEQUILA', 'CAPLES JEFFERSON ARCHITECTS, PC', 'MICHAEL DERUVO & ASSOCIATES ARCHITE', 'COFFE SHOP', 'PATTY PLUS BAKERY & RESTAURANT', 'SAKURA JAPANESE RESTAURANT', 'KEFI', 'TASTEE CORNER', 'OLLIES NOODLE SHOP & GRILLE', 'BERIMBAU'...
<filename>dnanexus/chip_workflow.py #!/usr/bin/env python '''Instantiate the ENCODE ChIP-seq workflow''' import sys import logging import re import dxpy import time import pprint EPILOG = '''Notes: Examples: # Build blank TF workflow from fastq to peaks %(prog)s --target tf --name "ENCODE TF ChIP-seq (no reference...
allowed_values = ["IN_PROGRESS", "READY"] # noqa: E501 if update_status not in allowed_values: raise ValueError( "Invalid value for `update_status` ({0}), must be one of {1}" # noqa: E501 .format(update_status, allowed_values) ) self._update_status = update_status @property def categorization_status(self): "...
from common_fixtures import * # NOQA from selenium import webdriver from requests.auth import AuthBase from github import GitHub import requests import json if_test_github = pytest.mark.skipif( not os.environ.get('GITHUB_MAIN_USER') or not os.environ.get('GITHUB_MAIN_PASS') or not os.environ.get('GITHUB_USER_1') or...
# -*- coding: utf-8 -*- r'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2020, 2021 <NAME> <<EMAIL>> 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 w...
address set; run `!setaddress 0xAAA...` first.\nProtip: You can PM me this if you like. Run `!setaddress dontcare` if you don't care." try: command, nonce = command_str.split(maxsplit=1) except: return "Bad nonce; try `mine 0xABBA`, `!mine 27`, or `!mine message`" try: nonce, digest = apis.token.get_digest_for_...
new_data.update({_NodeOrEdgeSet._DATAKEY_FEATURES: features}) return self.__class__.from_fields(**new_data) class _NodeOrEdgeSetSpec(_GraphPieceWithFeaturesSpec): """A type spec for _NodeOrEdgeSet.""" pass class NodeSet(_NodeOrEdgeSet): """A composite tensor for node set features plus size information. The it...
<filename>scripts/crTestCaseGen.py #!/usr/bin/env python import re import math import crTemplate def csvBooleanExpand(csvLineData): """Each line which contains 'X' is duplicated and the X replace with 0,1. Only one expansion per line is processed""" ExpandOccurred = 0 newCsvLineData = [] for line in csvLineData: ...
import numpy as np import csv import prob2020.python.utils as utils from ..cython import cutils import prob2020.python.mutation_context as mc import prob2020.python.scores as scores def deleterious_permutation(obs_del, context_counts, context_to_mut, seq_context, gene_seq, num_permutations=10000, stop_criteria=...
long (vector form)""" logger.debug("%s instruction not currently implemented.", instruction.mnem) @opcode def UMLAL2(cpu_context: ProcessorContext, instruction: Instruction): """Unsigned multiply-add long (vector form)""" logger.debug("%s instruction not currently implemented.", instruction.mnem) @opcode def UML...
by other tests # not sure why zone 2 is coming back as invalid (1e30) zone1 = self.zone_array == 1 assert np.allclose(result[zone1], parval) # revert to original wd os.chdir(self.original_wd) mult2model_row += 1 def test_add_array_parameters_to_file_list(self): """test setting up array parameters with a list...
<gh_stars>0 #!/usr/bin/env python # # This file is part of the Fun SDK (fsdk) project. The complete source code is # available at https://github.com/luigivieira/fsdk. # # Copyright (c) 2016-2017, <NAME> (http://www.luiz.vieira.nom.br) # # MIT License # # Permission is hereby granted, free of charge, to any person obtai...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Implement a controller in order to control the robot. Provides classes for directional position, button states, and full controller state, as well as a `Controller` class. The controller type is detected automatically, and can be used if its button mapping has been pr...
#!/usr/bin/python # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for cros_portage_upgrade.py.""" import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpa...
reviewed and " "released by an admin. Do not attempt to play additional games " "exceeding the threshold until this has been cleared." "").format(amount, chip_name, user.id)) logger.info("{}({}) won {} chips exceeding the threshold. Game " "details:\nPlayer Cup: {}\nPlayer Bet: {}\nGame " "Outcome: {}\n[END...
# get auto setting for max_features auto = int(np.sqrt(num_feats)) auto_1_2 = auto // 2 auto_to_max = num_feats - auto step_size = auto_to_max // 3 max_features = list(range(auto, num_feats + 1, step_size)) grid = ParameterGrid({ 'n_estimators': [500], 'random_state': [42], 'n_jobs': [-1], 'max_depth': [3, 7...
<reponame>maxwells8/Heptet from statsmodels.tsa.stattools import coint from sklearn.linear_model import LinearRegression import pandas as pd import numpy as np import sys import random from MAIN.Basics import Strategy import json from datetime import * from dateutil import parser import multiprocessing as mp from UTIL ...
# Copyright 2022 Huawei Technologies 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 agreed to...
import inspect from enum import Enum from typing import ( Any, AnyStr, ClassVar, Dict, List, Literal, Optional, Tuple, Type, Union, get_args, get_origin ) from typing_extensions import Annotated from ...errors import CommandSetupError from ...models import InteractionChannel, InteractionMember, InteractionUser from...
['box(boxPen, start=(width/2, median))'], ('uprightdnleftquadrant', '259E'): ['box(boxPen, end=(width*1/2, blockOrigin[1]+blockHeight*1/2))', 'box(boxPen, start=(width/2, median))'], ('uprightdnleftdnrightquadrant', '259F'): ['box(boxPen, start=(width/2, blockOrigin[1]))', 'box(boxPen, end=(width, blockOrigin[1...
########################################################################## # # Copyright (c) 2018, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of...
'validations': { }, 'allowed_values': { }, 'openapi_types': { 'project_id': (str,), 'location_id': (str,), 'journal_id': (str,), }, 'attribute_map': { 'project_id': 'projectId', 'location_id': 'locationId', 'journal_id': 'journalId', }, 'location_map': { 'project_id': 'path', 'location_id': 'path', ...
<gh_stars>0 import os import sys import datetime import logging import pytz import requests from requests.auth import HTTPBasicAuth logger = logging.getLogger("flightaware.client") BASE_URL = "http://flightxml.flightaware.com/json/FlightXML2/" MAX_RECORD_LENGTH = 15 EPOCH = datetime.datetime(1970, 1, 1, tzinfo=pytz....
<gh_stars>1-10 # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2019, <NAME> <<EMAIL>> # # Work based on: # - test_net.py # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. # - test_fit.py # Copyright (c) 2013, Google Inc. # # Test launching UEFI binaries from FIT images. """ Note: This test relies on bo...
#self.addAltGeometry() self.rend.GetActiveCamera().ParallelProjectionOn() self.rend.SetBackground(*self.background_color) self.rend.ResetCamera() self.set_style_as_trackball() self.build_lookup_table() text_size = 14 self.create_text([5, 50], 'Max ', text_size) # text actor 0 self.create_text([5, 35], 'Min ',...
*array-array-none* for max value + 1 - Array code %(typelabel)s. """ # This version is expected to pass. arrayfunc.%(funcname)s(self.inparray1amax, self.zeroarray) # This is the actual test. with self.assertRaises(%(errorflagexceptioncode)s): arrayfunc.%(funcname)s(self.inparray1bmax, self.incvaluearray) ...
= x_pix.reshape((len(x_pix),1)) #- center_pix # Taken from Riffel 2010 - profit: a new alternative for emission-line profile fitting w = (x_pix-center_pix)/sigma_pix alpha = 1.0/np.sqrt(2.0)*np.exp(-w**2/2.0) if hmoments is not None: mom = len(hmoments)+2 n = np.arange(3, mom + 1) nrm = np.sqrt(special.factor...
self._str(intro) self.stdout.write(intro_str+'\n') self.stop = False retval = None while not self.stop: if self.cmdqueue: argv = self.cmdqueue.pop(0) assert isinstance(argv, (list, tuple)), \ "item on 'cmdqueue' is not a sequence: %r" % argv else: if self.use_rawinput: try: line = raw_input(self._prompt_str...
import unittest import numpy from cqcpy.ov_blocks import one_e_blocks from cqcpy import test_utils from kelvin import ft_cc_energy from kelvin import ft_cc_equations from kelvin import quadrature def evalL(T1f, T1b, T1i, T2f, T2b, T2i, L1f, L1b, L1i, L2f, L2b, L2i, Ff, Fb, F, I, D1, D2, tir, tii, gr, gi, Gr, Gi, b...
drawing.add(shape) def __getitem__(self, pos): return self.center[pos] def __iter__(self): yield self.center[0] yield self.center[1] def getX(self): return self.center[0] def getY(self): return self.center[1] class Arc(Shape): def __init__(self, center=(0,0), radius=1, start=0, stop=0, **extras): super(...
# Copyright 2016 Google 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 writing, soft...
0x83, 0x89, 0xEB, 0xBF, 0x9C, 0xEC, 0xBC, 0x9C, 0xEC, 0x82, 0xBC, 0xEB, 0x8D, 0xA9, 0xEB, 0xB3, 0xBC, 0xEB, 0x92, 0xA4, 0xEB, 0x8D, 0xAE, 0xEC, 0x9B, 0x8C, 0xEC, 0x9B, 0xA8, 0xEC, 0xB6, 0x95, 0xEC, 0x95, 0x94, 0xEA, 0xBD, 0x83, 0xEC, 0xB6, 0xA4, 0xEC, 0xB6, 0x98, 0xEC, 0x8A, 0xA8, 0xEB, 0xB4, 0x89, 0xEB, 0x9E, 0x8C...
standard profile information for a user. Used to expose profile information returned by an identity provider. """ @property def uid(self): """Returns the user ID of this user.""" raise NotImplementedError @property def display_name(self): """Returns the display name of this user.""" raise NotImplementedErr...
logging violations. Fields: alt_subscriber_id: The name of AVP to be used as an alternate subscriber ID for fixed lines. alt_subscriber_id_regexp: A character string to control aspects of rewriting of the fields. alt_subscriber_id_subexpression: The subexpression indicates which subexpression to extract. If zer...
# pycrc -- parameterisable CRC calculation utility and C source code generator # # Copyright (c) 2017 <NAME> <<EMAIL>> # # 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, i...
name="make_output_warped_image", before_str=antsRegistration_workflow.atlas_id.lzout.out, filename=experiment_configuration[configkey].get( "output_warped_image_suffix" ), ) ) if environment_configuration["set_threads"]: # Set the number of threads to be used by ITK antsRegistration_task = Registration() ant...
<filename>experimentdatabase.py import math import re import sqlite3 import sys import unicodedata from collections import Iterable from requests.structures import CaseInsensitiveDict from sortedcontainers import SortedSet __author__ = '<NAME>' __version__ = '1.0.20180320' # This script requires sqlite3 module shipp...
<gh_stars>1-10 # FIXME[todo] # _LARGER_IMAGE: bool # now called upscaling in thesis # _IMAGE_SIZE_X: int # _IMAGE_SIZE_Y: int # # _JITTER: bool # _JITTER_STRENGTH: int # # _WRAP_AROUND: bool # FIXME[ideas]: # * not only run/stop but also step to inspect intermediate results """ This module offers a hub to select all ...
<gh_stars>1-10 ''' Created on 13.04.2018, updated on 24.02.2020 @author: <NAME>, ETH Zurich Comment: Helper Functions used in AGS_OPT_2D.py file ''' "################################################ IMPORTS ###################################################" import matplotlib.pyplot as plt from matplotlib.collectio...
<gh_stars>1-10 #!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Quildreen <http://www.mottaweb.com.br/> # # 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, ...
When queried, it returns a float. - clampupper : clu (float) [create,query,edit] Specifies the upper bound for the values. C: Default is 1.0. Q: When queried, it returns a float. - clear : clr (bool) [create,edit] Floods all cvs/vertices to the current value. - colorAlphaValue : cl1 (float) [] - colorRGBA...
g_var, loc) # dummy_var = call g_var(in1, in2, out) call_node = ir.Expr.call(g_var, [in1, in2, out], (), loc) calltypes[call_node] = func_typ.get_call_type( typing.Context(), [typemap[in1.name], typemap[in2.name], typemap[out.name]], {}) dummy_var = ir.Var(scope, mk_unique_var("$call_out_dummy"), loc) typemap[dum...
# noqa: D100 from typing import Optional import numpy as np import xarray from xclim.core.units import ( convert_units_to, declare_units, pint_multiply, rate2amount, units, units2pint, ) from xclim.core.utils import ensure_chunk_size from ._multivariate import ( daily_temperature_range, extreme_temperature_r...
#! /usr/bin/env python """ This file handles the command-line interface. It will parse the arguments given and call the broker and message classes as needed. run $ ddmq -h for more info. """ # if python2 from __future__ import print_function from __future__ import division try: FileNotFoundError except NameError: ...
no vm xml file %s or source_to_target.' % xmlfile) uuid = randomUUID().replace('-', '') vm_file = '/tmp/%s.xml' % uuid runCmd('cp %s %s' % (xmlfile, vm_file)) tree = ET.parse(vm_file) root = tree.getroot() # for child in root: # print(child.tag, "----", child.attrib) nameList = root.findall("name") for name i...