input
stringlengths
2.65k
237k
output
stringclasses
1 value
svn_ra_callbacks_invoke_open_tmp_file(self, *args) def __init__(self, *args): """__init__(self) -> svn_ra_callbacks_t""" this = apply(_ra.new_svn_ra_callbacks_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _ra.delete_svn_ra_callbacks_t __del__ = lambda self : None; svn_ra_call...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
import requests import os import logging import pylast as pyl from typing import List, Tuple, Optional, Dict, Union, Set, Generator from yaml import safe_load from fuzzywuzzy.fuzz import UWRatio from fuzzywuzzy.process import extractOne from .configuration import config from .state import GenreDataState log = loggin...
# Input Optimization Algorithm # ReverseLearning, 2017 # Import dependencies import tensorflow as tf import numpy as np from time import time import pandas # Suppress warnings from warnings import filterwarnings filterwarnings("ignore") class IOA: def __init__(self, model, ins, tensorBoardPath = None): # The model...
<gh_stars>1-10 import re import collections import collections.abc from copy import copy from pathlib import Path from numbers import Number from operator import truediv from itertools import chain, repeat, accumulate from typing import Any, Dict, List, Tuple, Optional, Sequence, Hashable, Iterator, Union, Type, Set, ...
string representation of my class (package.module.Class); normally this is adequate, but you may override this to change it. """ return reflect.qual(self.__class__).encode('utf-8') def getTypeToCopyFor(self, perspective): """Determine what type tag to send for me. By default, defer to self.L{getTypeToCopy}() ...
Ul, S, Sl = (None if U is None else U[valid_gene_checker, :]), \ (None if Ul is None else Ul[valid_gene_checker, :]), \ (None if S is None else S[valid_gene_checker, :]), \ (None if Sl is None else Sl[valid_gene_checker, :]) subset_adata = subset_adata[:, valid_gene_checker] adata.var[kin_param_pre + 'sanity_check...
""" Test functions used to create k8s objects """ from kubespawner.objects import make_pod, make_pvc, make_ingress from kubernetes.client import ApiClient api_client = ApiClient() def test_make_simplest_pod(): """ Test specification of the simplest possible pod specification """ assert api_client.sanitize_for_ser...
<reponame>saullocastro/structmanager import os import cPickle as pickle from pprint import pformat from collections import Iterable from .output_codes import OUTC, get_output_code from .cards_opt import * from .cards_solver import * class Genesis(object): """GENESIS optimization model This class corresponds to an...
<filename>fuzzy_modeling/tests/models/test_set_model.py<gh_stars>1-10 # -*- coding: utf-8 -*- import mock from django.test import TestCase from fuzzy_modeling.tests.utils import ResetMock from fuzzy_modeling.models.sets import SetModel from fuzzy.set.Set import Set from fuzzy.set.Polygon import Polygon from fuzzy....
# -*- coding: utf-8 -*- from common.base_test import BaseTest from project import TESTRPC_URL import lemoncheesecake.api as lcc import requests from lemoncheesecake.matching import ( check_that, equal_to, greater_than, has_length, is_false, is_integer, is_list, is_none, is_true, not_equal_to, require_that, require_...
import numpy as np import openmdao.api as om from openmdao.utils.general_utils import warn_deprecation from ..transcription_base import TranscriptionBase from .components import RungeKuttaStepsizeComp, RungeKuttaStateContinuityIterGroup, \ RungeKuttaTimeseriesOutputComp, RungeKuttaControlContinuityComp from ..common...
address_sorting, upb, ...] The result of the algorithm: end2end_tests -> [grpc_test_util] grpc_test_util -> [grpc] grpc -> [gpr, address_sorting, upb, ...] """ bazel_rule = bazel_rules[rule_name] direct_deps = _extract_deps(bazel_rule, bazel_rules) transitive_deps = set() collapsed_deps = set() exclude_deps ...
<filename>CHRLINE/services/ShopService.py # -*- coding: utf-8 -*- class ShopService(object): ShopService_REQ_TYPE = 3 ShopService_RES_TYPE = 3 def __init__(self): pass def getProduct(self, shopId, productId, language="zh-TW", country="TW"): sqrd = [128, 1, 0, 1, 0, 0, 0, 10, 103, 101, 116, 80, 114, 111, 100,...
one dataframe MAST_LIST = [] for SES, CSV in MAST: path = f"{self.DATA_DIR}/IMAGEN_RAW/2.7/{SES}/psytools/{CSV}" DF = pd.read_csv(path, low_memory=False) DF['ID'] = DF['User code'] if SES=='FU3' else DF['User code'].apply(lambda x : int(x[:12])) DF['Session'] = SES # Renmae the values DF['MAST total'] = DF['mas...
[0-9]+ hold" ) error_mapping = { "The patron does not have the book on hold" : NotOnHold, "The patron has no eBooks checked out" : NotCheckedOut, } def process_all(self, string): try: for i in super(ErrorParser, self).process_all( string, "//Error"): return i except Exception as e: # The server sent us an...
<gh_stars>0 # -*- coding: utf-8 -*- import numpy as np import time import hashlib import glob import os import progressbar import cv2 from auto_pose.renderer import renderer from .pysixd_stuff import transform from .pysixd_stuff import view_sampler from .utils import lazy_property class Dataset(object): def __ini...
True def hangup(self): """Close the connection. Returns True so it is suitable as an `~MockupDB.autoresponds` handler. """ if self._server: self._server._log('\t%d\thangup' % self.client_port) self._client.shutdown(socket.SHUT_RDWR) return True hangs_up = hangup """Synonym for `.hangup`.""" def _matches_...
import re import datetime import pkgutil import inspect import pathlib # catch block start # ex. Args:, Returns: _BLOCKSTART_LIST = re.compile( r"(Args:|Arg:|Arguments:|Parameters:|Kwargs:|Attributes:|Returns:|Yields:|Kwargs:|Raises:)", re.IGNORECASE, ) _BLOCKSTART_TEXT = re.compile(r"(Examples:|Example:|Todo:)", r...
<filename>counter_attack/cli/options.py<gh_stars>0 import datetime import functools import logging import sys import click import foolbox import numpy as np import torch from counter_attack import detectors, loaders, model_tools, rejectors, utils from counter_attack.cli import parsing, definitions logger = logging.g...
<filename>regression/module_NN_ens.py import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm import tensorflow as tf import datetime from scipy.special import erf import importlib import utils importlib.reload(utils) from utils import * class NN(): def __init__(self, activation_fn, x_di...
<filename>tests/unit/test_connection.py<gh_stars>0 # -*- coding: utf-8 -*- ### # (C) Copyright [2020] 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...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Stolen and slightly modified from https://github.com/Dinnerbone/mcstatus "TCP and UDP Connections, both asynchronous and not." # This version of mcstatus's connection module # has support for varlongs and has general text reformatting # and spaceing changes. Slight cha...
'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: pa...
Inverse * ARMIDO <NAME> and <NAME>, JR. * ACM Transactions on Mathematical Software, Vol. 12, No. 4, * December 1986, Pages 377-393. * * See equation 32. */ double s, t; double a[4] = {0.213623493715853, 4.28342155967104, 11.6616720288968, 3.31125922108741}; double b[5] = {0.3611708101884203e-1, 1.27364489782...
from unittest import mock, skipUnless from django.conf.global_settings import PASSWORD_HASHERS from django.contrib.auth.hashers import ( UNUSABLE_PASSWORD_PREFIX, UNUSABLE_PASSWORD_SUFFIX_LENGTH, BasePasswordHasher, BCryptPasswordHasher, BCryptSHA256PasswordHasher, MD5PasswordHasher, PBKDF2PasswordHasher, PBKDF2SHA...
:func:`cr_uid`, :func:`cr_uid_context`, :func:`cr_uid_id`, :func:`cr_uid_id_context`, :func:`cr_uid_ids`, :func:`cr_uid_ids_context` is applied on the method. Method calls are considered traditional style when their first parameter is a database cursor. """ if hasattr(method, '_api'): return method # introspe...
import json from math import atan2, pi, hypot from typing import Union, List import os from os.path import exists as _exists import subprocess import numpy as np import utm from osgeo import gdal, osr, ogr from wepppy.all_your_base import isfloat from wepppy.all_your_base.geo import get_utm_zone, utm_srid from .wep...
the median of ifg minus model # Only needed if reference phase correction has already been applied? if offset: offset_removal = nanmedian(np.ravel(fullres_phase - fullorb)) else: offset_removal = 0 orbital_correction = fullorb - offset_removal return orbital_correction def __orb_inversion(design_matrix, data):...
class=\"media-left\">\n", "<figure class=\"image is-48x48\">\n", "<img alt=\"Real Python Logo\" src=\"https://files.realpython.com/media/real-python-logo-thumbnail.7f0db70c2ed2.jpg?__no_cf_polish=1\"/>\n", "</figure>\n", "</div>\n", "<div class=\"media-content\">\n", "<h2 class=\"title is-5\">Counselling psycholo...
import keras from keras.models import load_model from keras import backend as K import math import sys import argparse import numpy as np import scipy.io as sio import os import glob import h5py import cv2 import gc ''' This code is based on <NAME>., <NAME>., & Arganda-Carreras, I. (2017). "Vision-Based Fall Detecti...
""" File Name: genome_domain_dataset.py Project: bioseq-learning File Description: This file contains functions and classes for the conserved domain dataset for genomes. Each eligible genome will be transformed into a sentence of words of conserved domains, along with some special words. TODO: what would be the targe...
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. """ Jobclass to execute python scripts and jupyter notebooks """ import os import shutil from pyiron_base.job.generic im...
work_data_list: validation_source_data = copy.deepcopy(work_data) validation_source_data = del_none(validation_source_data) # Adding schema valdation for Work validator = Core( source_data=validation_source_data, schema_files=["work_schema.yaml"]) validator.validate(raise_exception=True) try: if org is None: ...
a pinfo(2)/psearch call from a target name and the escape (i.e. ? or ??)""" method = 'pinfo2' if esc == '??' \ else 'psearch' if '*' in target \ else 'pinfo' arg = " ".join([method, target]) #Prepare arguments for get_ipython().run_line_magic(magic_name, magic_args) t_magic_name, _, t_magic_arg_s = arg.partition...
from MIDIInput import * from time import sleep from random import * class Urlinie_Old: def __init__(self): self.weight_1 = 0 self.weight_3 = 0 self.weight_5 = 0 self.weight_other = 0 self.weight_length = 3 self.slope = 10.0 self.variance = 0.0 self.loose_target_note = 64 # MIDI number ...
<gh_stars>1-10 from Nanovor import Nanovor from Attack import Attack from Player import Player #Nanovor: (self, name, health, armor, speed, strength, sv, family_class, attacks:list) #Attacks: (self, name, cost:int, description, damage=[False], hack=[False], override=[False], combo=[False], consumes=False, armorpiercin...
<filename>spark_auto_mapper_fhir/resources/document_reference.py from __future__ import annotations from typing import Optional, TYPE_CHECKING, Union # noinspection PyPackageRequirements from pyspark.sql.types import StructType, DataType from spark_auto_mapper_fhir.fhir_types.list import FhirList from spark_auto_mappe...
import base64 import re from collections import Counter from functools import reduce import pandas as pd from neanno.utils.dict import merge_dict_sum_numbers from neanno.utils.list import ensure_items_within_set, get_set_of_list_and_keep_sequence ANNOTATION_TYPES = [ "standalone_key_term", "parented_key_term", "s...
<filename>scripts/run_experiment.py # ~~~ # This file is part of the paper: # # " An Online Efficient Two-Scale Reduced Basis Approach # for the Localized Orthogonal Decomposition " # # https://github.com/TiKeil/Two-scale-RBLOD.git # # Copyright 2019-2021 all developers. All rights reserved. # License: Licensed as BSD ...
"""LREANNtf_algorithmLREANN_expRUANN.py # Author: <NAME> - Copyright (c) 2020-2022 Baxter AI (<EMAIL>) # License: MIT License # Installation: see LREANNtf_main.py # Usage: see LREANNtf_main.py # Description: LREANNtf algorithm LREANN expRUANN - define learning rule experiment artificial neural network with relaxat...
optimally #nz=find(hh~=0); # nz can be computed more optimally # np.nonzero() always returns a tuple, even if it contains 1 element since hh has only 1 dimension nz = np.nonzero(hh != 0)[0]; #if False: if common.MY_DEBUG_STDOUT: common.DebugPrint("multiscale_quad_retrieval(): " \ "nz = %s" % (str(nz))); common....
methods in your AWS account. :param bool tracing_enabled: Specifies whether active tracing with X-ray is enabled for this stage. :param Any variables: A map that defines the stage variables. Variable names must consist of alphanumeric characters, and the values must match the following regular expression: [A-Za-z0-9-...
<filename>gui/core/surface_browser.py from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar #from matplotlib.backends.backend_qt4 import FigureCanvasQT as FigureCanvas #from matplotlib.backends.backend_qt...
<gh_stars>1-10 import torch import torch.nn as nn import torch.nn.functional as F import torch.distributions as tdist import numpy as np """ import argparse # coding: utf-8 # Take length 50 snippets and record the cumulative return for each one. Then determine ground truth labels based on this. # In[1]: import sys...
<filename>cw/bassplayer.py #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import struct import ctypes import threading from ctypes import c_int, c_uint8, c_uint16, c_uint32, c_uint64, c_float, c_void_p, c_char_p import cw from cw.util import synclock # typedef を間違えないように... c_BYTE = ...
<gh_stars>1-10 """ Routines to estimate reconstruction efficiency: - :class:`MeshFFTCorrelation`: correlation - :class:`MeshFFTTransfer`: transfer - :class:`MeshFFTPropagator`: propagator This requires the following packages: - pmesh - pypower, see https://github.com/adematti/pypower """ import os import nump...
= Constraint(expr=-m.x2034*m.x1720 + m.x734 == 0) m.c753 = Constraint(expr=-m.x2035*m.x1720 + m.x735 == 0) m.c754 = Constraint(expr=-m.x2036*m.x1720 + m.x736 == 0) m.c755 = Constraint(expr=-m.x2034*m.x1721 + m.x737 == 0) m.c756 = Constraint(expr=-m.x2035*m.x1721 + m.x738 == 0) m.c757 = Constraint(expr=-m.x2036*m.x...
= float(value) except ValueError, exp: raise ValueError('Bad float/double attribute (Z): %s' % exp) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'OutlinePoints': obj_ = OutlinePointsType.factory() obj_.build(child_) self.OutlinePoints = obj_ obj_.original_tagnam...
cname in matplotlib.cm._cmap_registry: return matplotlib.cm.get_cmap(cname) cmap_file = os.path.join(CMAPSFILE_DIR, "ncar_ncl", "vegetation_modis.rgb") cmap = Colormap(self._coltbl(cmap_file), name=cname) matplotlib.cm.register_cmap(name=cname, cmap=cmap) return cmap @property def vegetation_modis_r(self): cna...
players in playerlist: p = bot.get_user(int(players[0])) # ユーザーID if not p: continue user = p if not user.id in kekka: if not user.id in rongaina: kekka[user.id] = [c + 1] c += 1 return kekka[user_id][0] @bot.command(name='inquiry', aliases=['inq'], pass_context=True, description='チャンネルのバトルの状態を確認する') async de...
the value rvkeys[rvals1_str].append(rvals2) # create a map of combined keys common_keys = {} for lvkey in lvkeys.keys(): if (lvkey in rvkeys.keys()): common_keys[lvkey] = 1 # for each type of join, merge the values new_header_fields = [] # create the keys for lkey in lkeys: new_header_fields.append(lkey) ...
<gh_stars>1-10 from __future__ import absolute_import """ API operations for Workflows """ import logging from sqlalchemy import desc from galaxy import util from galaxy import web from galaxy import model from galaxy.tools.parameters import visit_input_values, DataToolParameter, RuntimeValue from galaxy.web.base.con...
struct.s_snapshot_id = 0 struct.s_snapshot_r_blocks_count = 0 struct.s_snapshot_list = 0 struct.s_error_count = 0 struct.s_first_error_time = 0 struct.s_first_error_ino = 0 struct.s_first_error_block = 0 struct.s_first_error_func = 0 struct.s_first_error_line = 0 struct.s_last_error_time = 0 struct.s_last_err...
<gh_stars>1000+ #!/usr/bin/env python3 """ GTSAM Copyright 2010-2020, Georgia Tech Research Corporation, Atlanta, Georgia 30332-0415 All Rights Reserved See LICENSE for the license information Code generator for wrapping a C++ module with Pybind11 Author: <NAME>, <NAME>, <NAME>, <NAME>, and <NAME> """ # pylint: disa...
import itertools import math from . import vector_tile_pb2 # Constants ## Complex Value Type CV_TYPE_STRING = 0 CV_TYPE_FLOAT = 1 CV_TYPE_DOUBLE = 2 CV_TYPE_UINT = 3 CV_TYPE_SINT = 4 CV_TYPE_INLINE_UINT = 5 CV_TYPE_INLINE_SINT = 6 CV_TYPE_BOOL_NULL = 7 CV_TYPE_LIST = 8 CV_TYPE_MAP = 9 CV_TYPE_LIST_DOUBLE = 10 ## Com...
<filename>pydrive2/test/test_file.py # -*- coding: utf-8 -*- import filecmp import os import unittest import pytest import sys from io import BytesIO from tempfile import mkdtemp from time import time from six.moves import range import timeout_decorator from concurrent.futures import ThreadPoolExecutor, as_completed f...
Returns correctPercent as a float""" correctPercent = correctCountVar / self.iterationNum * 100 return correctPercent def updateScoreStrVar(self, scorePercent): """Takes a percent value and converts it to a string rounded to 2 decimal places. Accepts scorePercent as a float Returns tempScoreString as ...
#!/usr/bin/python import main from numpy import * from matplotlib import pyplot def smooth (x, radius, iters = 1): if iters == 0: return x ix = cumsum(x, 0) sx = (ix[radius:,:] - ix[:-radius]) / radius return smooth(sx, radius, iters - 1) #----( beat functions )--------------------------------------------------...
id's + the (complete) word of which we want to find the index # Output: the index of the first piece in the word piece. # Example for finding the indices of the relevant tokens: # word_to_find = 'broccoli' # tokens = "[CLS] ' mom ##will send you gifts bro ##cco ##li and will ##send you bro ##cco ##li fruits for th...
[u'q'] , u'籔' : [u's'] , u'衜' : [u'd'] , u'佞' : [u'n'] , u'珡' : [u'q'] , u'杮' : [u'b', u'f'] , u'韹' : [u'h'] , u'㙸' : [u'p', u'b'] , u'嫻' : [u'x'] , u'罾' : [u'z'] , u'讆' : [u'w'] , u'予' : [u'y'] , u'琏' : [u'l'] , u'耗' : [u'h', u'm'] , u'䜙' : [u'a'] , u'暘' : [u'y'] , u'頧' : [u'd'] , u'弩' : [u'n'] , u'纨' : [u'w'] , u'誰' ...
IPv6 address on the Internet. addr = makeIP6InterfaceAddress(nodePrefix, macAddr=interface.macAddress, prefixLen=128) # Record a global route that directs traffic for the delegated prefix to the node. self.ip6PrefixRoutes.append( IPRoute( dest = nodePrefix, interface = None, via = addr.ip ) ) # Return a ...
<reponame>nakedible/vpnease-l2tp # orm/dependency.py # Copyright (C) 2005, 2006, 2007 <NAME> <EMAIL> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Bridge the ``PropertyLoader`` (i.e. a ``relation()``) and the ``UOWTransaction`` tog...
<reponame>ronichoudhury-work/nci-nanoparticles-vm #!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance wit...
# Python import re # Metaparser from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Optional, Any class ShowVersionSchema(MetaParser): """Schema for show version""" schema = { 'os': str, 'version': str, Optional('platform'): str, Optional('model'): str, } class ShowVersio...
import matplotlib.image as mpimg import numpy as np import cv2 from skimage.feature import hog from scipy.ndimage.measurements import label # Define a function to return HOG features and visualization def get_hog_features(img, orient, pix_per_cell, cell_per_block, vis=False, feature_vec=True): # Call with two outpu...
# from keras.models import load_model #Keras import from keras.models import Sequential, Model from keras.layers import Conv2D, MaxPooling2D, UpSampling2D, MaxPooling3D, UpSampling3D, Conv3D, Conv2DTranspose, Conv1D, UpSampling1D from keras.layers import Activation, Dropout, Flatten, Dense, Input, Reshape, BatchNormali...
oute.oute == 0: depth1.append(moves) if re.match('b',Wboard.w2i)and Wboard.w6e==''\ and board.s3h+board.s4g+board.s5f=='': moves = '2i6e+' kaihimore(moves) if oute.oute == 0: depth1.append(moves) if re.match('b',Wboard.w2i)and Wboard.w7d==''\ and board.s3h+board.s4g+board.s5f+board.s6e=='': moves = '2i7d+' k...
Wboard.w5g)and Wboard.w7e==''\ and board.s6f=='': moves = '5g7e+' kaihimore(moves) if oute.oute == 0: depth1.append(moves) if re.match('b', Wboard.w5g)and Wboard.w8d==''\ and board.s6f+board.s7e=='': moves = '5g8d+' kaihimore(moves) if oute.oute == 0: depth1.append(moves) if re.match('b', Wboard.w5g)and Wbo...
get_value(..) but returns all values where the subexperiments match the additional kwargs arguments. if alpha=1.0, beta=0.01 is given, then only those experiment values are returned, as a list. """ subexps = self.get_exps(exp) tagvalues = ['%s%s'%(k, convert_param_to_dirname(kwargs[k])) for k in kwargs] value...
<filename>moldr/scan.py<gh_stars>0 """ drivers for coordinate scans """ import numpy import automol import elstruct import autofile import moldr from elstruct.reader._molpro2015.molecule import hess_geometry def hindered_rotor_scans( spc_info, thy_level, cnf_run_fs, cnf_save_fs, script_str, overwrite, scan_incremen...
<reponame>Craftint/CSF_TZ # Copyright (c) 2013, Aakvatech and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, erpnext from frappe import _, scrub from frappe.utils import getdate, nowdate, flt, cint, formatdate, cstr, now, time_diff_in_seconds from ...
@property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-l2vpn-cfg:bd-pseudowire-evpns' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return Tru...
import logging import math import random from pajbot.managers.db import DBManager from pajbot.managers.handler import HandlerManager from pajbot.models.command import Command from pajbot.models.command import CommandExample from pajbot.models.user import User from pajbot.modules import BaseModule from pajbot.modules i...
11, 29)), "DAU": pnp.Vendor("Daou Tech Inc", "DAU", datetime.date(1996, 11, 29)), "HCA": pnp.Vendor("DAT", "HCA", datetime.date(2001, 3, 15)), "DAX": pnp.Vendor("Data Apex Ltd", "DAX", datetime.date(1996, 11, 29)), "DDI": pnp.Vendor("Data Display AG", "DDI", datetime.date(2002, 7, 17)), "DXP": pnp.Vendor("Data Exp...
<filename>chandra_aca/aca_image.py<gh_stars>0 # Licensed under a 3-clause BSD style license - see LICENSE.rst import os from math import floor from itertools import count, chain from copy import deepcopy from pathlib import Path import six from six.moves import zip import numba import numpy as np from astropy.utils.c...
async_req bool :param int policy_id: The ID number of the policy. (required) :param int interface_type_id: The ID number of the interface type to describe. (required) :param str api_version: The version of the api being called. (required) :return: InterfaceType If the method is called asynchronously, return...
Constraint(expr= - m.x2045 + m.x2445 + m.x4292 == 70.268084) m.c2158 = Constraint(expr= - m.x2046 + m.x2446 + m.x4293 == 17.535931) m.c2159 = Constraint(expr= - m.x2047 + m.x2447 + m.x4237 == 75.702325) m.c2160 = Constraint(expr= - m.x2048 + m.x2448 == 68.860513) m.c2161 = Constraint(expr= - m.x2049 + m.x2449 + m.x...
import sys import re import os from ccp_util import _IPV6_REGEX_STR_COMPRESSED1, _IPV6_REGEX_STR_COMPRESSED2 from ccp_util import _IPV6_REGEX_STR_COMPRESSED3 from ccp_util import IPv4Obj, IPv6Obj from ccp_abc import BaseCfgLine ### HUGE UGLY WARNING: ### Anything in models_cisco.py could change at any time, until I r...
the volume.</ul> """ return self._status @status.setter def status(self, val): if val != None: self.validate('status', val) self._status = val _schedule = None @property def schedule(self): """ The schedule for sis operation on the volume. See sis-set-config for the format of the schedule. Attributes: ...
DFA81_eof = DFA.unpack( u"\152\uffff" ) DFA81_min = DFA.unpack( u"\1\5\1\171\4\uffff\1\0\12\uffff\2\0\127\uffff" ) DFA81_max = DFA.unpack( u"\1\u0087\1\u0085\4\uffff\1\0\12\uffff\2\0\127\uffff" ) DFA81_accept = DFA.unpack( u"\2\uffff\1\2\1\3\3\uffff\1\4\1\5\1\6\1\10\1\11\1\12\1\13\1\14" u"\1\15\1\16\27\uf...
""" /********************************************************************************/ /* */ /* Copyright (c) 2020 Analog Devices, Inc. All Rights Reserved. */ /* This software is proprietary to Analog Devices, Inc. and its licensors. */ /* */ /**************************************************************************...
False), _MetaInfoClassMember('flow-control-start-character', ATTRIBUTE, 'int' , None, None, [('-128', '127')], [], ''' Software flow control start char ''', 'flow_control_start_character', 'Cisco-IOS-XR-tty-server-oper', False), _MetaInfoClassMember('flow-control-stop-character', ATTRIBUTE, 'int' , None, None,...
# Compare the non-conformity score to the validation set non-conformity scores quantiles = self.val_scores.view(1, 1, -1) cdf = (scores.unsqueeze(-1) > quantiles).type(value.dtype).sum(dim=-1) # Compute the ranking of the value among all validation values. This value should be between [0, len(val_score)] # If cdf ...
p.replace('{INITRAMFS_OUTPUT}', initramfs_output) return p # Execute initramfs build_command execute_command(args, 'initramfs.build_command', config.initramfs.build_command, _replace_vars) if config.initramfs.build_output: cmd_output_file = _replace_vars(args, config.initramfs.build_output.value) try: # Move th...
# fmt: off import h5py import os import shutil import copy import h5py_cache import pickle as pkl import numpy as np import pandas as pd import ipywidgets as ipyw from nd2reader import ND2Reader from tifffile import imsave, imread from .utils import pandas_hdf5_handler,writedir from parse import compile class hdf5_fo...
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Tue Jan 23 16:18:37 2018 New version of the JointStory script, rewritten for the Harvard - Dartmouth connection. The earlier versions had a NAT traversal-related bug. For argument options, type $ python JointStory.py --help --------------------------------------...
an internal description instead of the normal description, if available. For example, the inside of a vehicle should have a different description than the outside. """ if from_inside and self.internal_description: return self.internal_description return self.description def get_appearance_name(self, invoker, ...
all higher pixels within rng back_my += my # running sum of my between pixel p and all higher pixels within rng if index < max_index: rng_ders2_[index] = (_p, _dx, fdy, _mx, fmy) elif y > min_coord: ders2_.append((_p, _dx, fdy, _mx, fmy)) # completed bilateral tuple is transferred from rng_ders2_ to ders2_ index ...
import os import numpy as np from discretize.utils import mkvc from discretize.utils.code_utils import deprecate_method import warnings try: from discretize.mixins.vtk_mod import InterfaceTensorread_vtk except ImportError: InterfaceTensorread_vtk = object class TensorMeshIO(InterfaceTensorread_vtk): """Class for...
None: """Deletes the entry for the given user in the account validity table, removing their expiration date and renewal token. Args: user_id: ID of the user to remove from the account validity table. """ await self.db_pool.simple_delete_one( table="account_validity", keyvalues={"user_id": user_id}, desc="dele...
# MINLP written by GAMS Convert at 04/21/18 13:52:22 # # Equation counts # Total E G L N X C B # 37 37 0 0 0 0 0 0 # # Variable counts # x b i s1s s2s sc si # Total cont binary integer sos1 sos2 scont sint # 109 1 108 0 0 0 0 0 # FX 0 0 0 0 0 0 0 0 # # Nonzero counts # Total const NL DLL # 217 109 108 0 # # Reformu...
""" pygame-menu https://github.com/ppizarror/pygame-menu UTILS Utility functions. License: ------------------------------------------------------------------------------- The MIT License (MIT) Copyright 2017-2021 <NAME>. @ppizarror Permission is hereby granted, free of charge, to any person obtaining a copy of this ...
<gh_stars>0 # -*- coding: utf-8 -*- """ pinner - get git info from need packages - create new version of git repository where script was run - create tag the same as version - set new revision in config file revision is appropriate to git HEAD in specific package - create or update change-log - commit change-log - co...
import argparse import numpy import numpy.random import mir3.data.linear_decomposition as ld import mir3.data.metadata as md import mir3.data.spectrogram as spectrogram import mir3.module # TODO: maybe split this into 2 modules to compute activation and # basis+activation class BetaNMF(mir3.module.Module): def get_...
= [] for node in nodes_list: inputs_list.append(ProActiveKernel.__extract_task_inputs_from_graph_data__(node, edges_list)) return inputs_list def __import_dot__(self, input_data): if os.path.isfile(input_data['path']): Gtmp = pgv.AGraph(input_data['path']) nodes = Gtmp.nodes() edges = Gtmp.edges() inputs_dat...
probabilities," or just "posteriors," which are the probabilities we are looking to compute using the "priors". # # Let us implement the Bayes Theorem from scratch using a simple example. Let's say we are trying to find the odds of an individual having diabetes, given that he or she was tested for it and got a positi...
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Tue Aug 3 21:37:40 2021 @author: <NAME> """ # Problem 7 - Regularized Linear Regression import numpy as np import matplotlib.pyplot as plt import pandas as pd import matplotlib.style as style style.use('bmh') train = pd.read_csv("D:\\AI\\lfd\\final\\features.train...
from __future__ import annotations import logging import os import uuid import pytest from dask.sizeof import sizeof from distributed.compatibility import WINDOWS from distributed.protocol import serialize_bytelist from distributed.spill import SpillBuffer, has_zict_210, has_zict_220 from distributed.utils_test imp...
<gh_stars>0 #!/usr/bin/env/python """ Usage: chem_tensorflow_sparse.py [options] Options: -h --help Show this screen. --config-file FILE Hyperparameter configuration file path (in JSON format). --config CONFIG Hyperparameter configuration dictionary (in JSON format). --log_dir DIR Log dir name. --data_dir DIR Da...