input
stringlengths
2.65k
237k
output
stringclasses
1 value
cleanup_guardduty(root_credentials, security_credentials, root_region, security_account_name, all_stacks) cleanup_macie(root_credentials, security_credentials, root_region, security_account_name, all_stacks) cleanup_cwl(all_stacks) cleanup_parameter_store(all_stacks) def cleanup_macie(root_credentials, secur...
<filename>ichooseyou_sep.py import pandas import numpy #formats data from pmx gets relevant data def format_pmx_list(data): All_living_founder_list = [] Founders = [] Founder_contrib = [] founder_list = data["MyFounders"] for every_founder in founder_list: remove_format = every_founder.replace("|", ",").strip("[...
"""Representation of one chain (e.g. mainchain/sidechain).""" from __future__ import annotations import os from abc import ABC, abstractmethod from typing import Any, Dict, List, Optional, Set, Union, cast from xrpl.models import ( XRP, AccountInfo, AccountLines, Currency, GenericRequest, IssuedCurrency, Requ...
1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0...
0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1...
<filename>src/inference/analyzers.py<gh_stars>0 """ Class for the analysis of and to provide statistics about a single message. **Intra-Message Analysis** :author: <NAME> """ import numpy import pandas from bitarray import bitarray from typing import Dict, List, Tuple, Union, Type from scipy.ndimage.filters import g...
"1"' err_str = err_str.format(filename, bm_name, match2[1]) logging.error(err_str) json_results[key]['benchmarks'][idx]['filter_location'] =\ filter_location json_results[key]['benchmarks'][idx]['federate_count'] =\ federate_count # Core type json_results = _add_core( bm_name, filename, json_results, key, idx...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' from typing import List, Dict import requests import base64 requests.packages.urllib3.disable_warnings() """ Created on August 1, 2019 @author: <NAME> """ ''' GLOBAL VARS ''' AUTH_KEY = demisto.param...
'Amite': {'pop': 13131, 'tracts': 3}, 'Attala': {'pop': 19564, 'tracts': 6}, 'Benton': {'pop': 8729, 'tracts': 2}, 'Bolivar': {'pop': 34145, 'tracts': 8}, 'Calhoun': {'pop': 14962, 'tracts': 5}, 'Carroll': {'pop': 10597, 'tracts': 2}, 'Chickasaw': {'pop': 17392, 'tracts': 4}, 'Choctaw': {'pop': 8547, 'tra...
join_operations=None, min_area=1): """ Merge adjacent polygons with buffer and unary_union :return: GeoDataFrame """ uu = self.gdf.copy().buffer(tolerance, join_style=2, cap_style=2).unary_union.buffer(-tolerance, join_style=2, cap_style=2) if 'Multi' in uu.geom_type: gdf = gpd.GeoDataFrame({'geometry': [P...
COPval #return the end effector location in world coords and the constraint location in world coords def getCnstEffLocs(self): trackBodyPos = self.cnstrntBody.to_world(x=self.cnstrntOnBallLoc) #self.cnstrntBody.com() curEffPos = self.reachBody.to_world(x=self.reachBodyOffset) return trackBodyPos, curEffPos ...
# # Dream MCMC # # This file is part of PINTS. # Copyright (c) 2017-2019, University of Oxford. # For licensing information, see the LICENSE file distributed with the PINTS # software package. # from __future__ import absolute_import, division from __future__ import print_function, unicode_literals import pints import ...
token type embedding if encoder_history_states: assert img_feats is None, "Cannot take image features while using encoder history states" if img_feats is not None: if self.img_feature_type == 'dis_code': code_emb = self.code_embeddings(img_feats) img_embedding_output = self.img_embedding(code_emb) elif self.img...
#!/usr/bin/python # -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
<filename>pydmd/mosesdmd_grouped.py """ Derived module from dmdbase.py for higher order dmd. Reference: - <NAME>, <NAME>, Higher Order Dynamic Mode Decomposition. Journal on Applied Dynamical Systems, 16(2), 882-925, 2017. """ import numpy as np import scipy as sp from scipy.linalg import pinv2 from mosessvd...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of the bapsflib package, a Python toolkit for the # BaPSF group at UCLA. # # http://plasma.physics.ucla.edu/ # # Copyright 2017-2018 <NAME> and contributors # # License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full # license terms and co...
plot with the new index. self.ChangeFOV() def ChangeFOV(self): """ it changes the fov or channel according to the choice of the user and it updates the plot shown and it initializes the new fov/channel at t=0 by default. """ self.Tindex = 0 # load the image and mask for the current plot self.m.currpic...
and `val'. self._last_mutation = txn._mutations def _invalidate(self): if self._cur: _lib.mdb_cursor_close(self._cur) self.db._deps.discard(self) self.txn._deps.discard(self) self._cur = _invalid self._dbi = _invalid self._txn = _invalid def __del__(self): self._invalidate() def close(self): """Close th...
self.ax = None self.cursor = None self.navigation_toolbar = None self.isocenter = np.array([0, 0], dtype=float) self.cursor_position = np.array([0, 0]) self.image_title = "" self.image_type_names = {-1: "Optical Density", 0: "Dose (cGy)", 1: "Pixel Value", 2: 'Gamma Matrix'} self.image_type = '' self.colormap =...
<gh_stars>0 """ Contains functions relating to the connected non-Gaussian covariance approximation. """ import glob import os.path import time import numpy as np def get_avg_l(lmin, lmax, n_bandpower): """ Determine the weighted average l per bandpower. Args: lmin (int): Minimum l. lmax (int): Maximum l. n_b...
'death') killed_msg += "**, and **" + get_name(killed_players[1]) + "**, a **" + get_role(killed_players[1], 'death') + "**, were found. Those remaining mourn the tragedy." else: killed_msg += "The dead bodies of **" + "**, **".join([x + "**, a **" + get_role(x, 'death') for x in killed_players[:-1]]) + "**, and **"...
<reponame>bcwingnut/ROAR<gh_stars>1-10 from ROAR.utilities_module.utilities import dist_to_line_2d from abc import abstractmethod from collections import deque import logging from typing import Any from ROAR.agent_module.agent import Agent from ROAR.perception_module.detector import Detector import cv2 import math imp...
point. bd - Disable a breakpoint. be - Enable a breakpoint. bc - Clear (delete) a breakpoint. bl - List all breakpoints. load - Load session breakpoints. save - save session breakpoints. Misc: ----- thread - Display threads or switch to a particular thread. list - List source code. stack - Display stack trace. up - G...
*v); void glBindSampler(GLuint unit, GLuint sampler); void glLineWidth(GLfloat width); void glImageTransformParameterfvHP(GLenum target, GLenum pname, const GLfloat *params); void glBindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, GLintptr offset); void glVertexArrayEdgeFlagOffsetEXT(GLuint vaobj, GLuint...
GLCDFONT = [ [0x00, 0x00, 0x00, 0x00, 0x00], [0x3E, 0x5B, 0x4F, 0x5B, 0x3E], [0x3E, 0x6B, 0x4F, 0x6B, 0x3E], [0x1C, 0x3E, 0x7C, 0x3E, 0x1C], [0x18, 0x3C, 0x7E, 0x3C, 0x18], [0x1C, 0x57, 0x7D, 0x57, 0x1C], [0x1C, 0x5E, 0x7F, 0x5E, 0x1C], [0x00, 0x18, 0x3C, 0x18, 0x00], [0xFF, 0xE7, 0xC3, 0xE7, 0xFF], [0x00, 0x...
cmds.setAttr('%s.scaleX' % mirror_group, -1) deform.create_wrap(home, other_target_mesh_duplicate) cmds.blendShape(other_mesh_duplicate, home, foc = True, w = [0, 1]) cmds.delete(other_target_mesh_duplicate, ch = True) cmds.delete(mirror_group, other_mesh_duplicate) return other_target_mesh, othe...
# coding=utf-8 """ SPDX-license-identifier: Apache-2.0 Copyright (c) 2020 SmartMe.IO Authors: <NAME> <<EMAIL>> 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/LICEN...
cl.sendText(msg.to,"sudah dimatikan ô€œ ô€„‰👈") else: wait["protect"] = False if wait["lang"] == "JP": cl.sendText(msg.to,"already close") else: cl.sendText(msg.to,"It is already open ô€œ 👈") elif msg.text in ["Qrprotect off","qrprotect off"]: if wait["linkprotect"] == False: if wait["lang"] == "JP": cl.sen...
list(shear) if len(shear) == 1: shear = [shear[0], shear[0]] if len(shear) != 2: raise ValueError(f"`translate` must be a sequence of length 2. But got: {len(shear)}.") if isinstance(interpolation, int): interpolation = interpolation_mode_from_int(interpolation) if not isinstance(interpolation, InterpolationMo...
TODO think about better solution groups = {} def hnd(ix, key): key = tuple([ k for k in key if k not in ignore_fixs ]) if key not in groups: groups[key] = [] groups[key].append(ix) self._process_rows(ixs, hnd) return dict([ (tuple([ self._features[k] for k in ks ]), vs) for (ks, vs) in groups.items() ]) cla...
self.new_legs_1 = [] self.new_legs_2 = [] self.new_hypotenuses = [] construction_step(0) my_triangle = triangle( self.light_sources[0].get_source_point(), OBSERVER_POINT, self.light_sources[1].get_source_point() ) angle_sign1 = right_angle( self.light_sources[0].get_source_point(), OBSERVER_POINT, self.l...
""" return 'false' def _equality_symbol(self): """ Returns the equality symbol in Maxima. INPUT: none OUTPUT: string EXAMPLES:: sage: maxima._equality_symbol() '=' sage: var('x y') (x, y) sage: maxima(x == y) _SAGE_VAR_x=_SAGE_VAR_y """ return '=' def _inequality_symbol(self): """ Returns the in...
# ========================================================== # Artificial Intelligence. ETSII (University of Seville). # Course 2017-18 # Deliverable 02 # =========================================================== # Define, using Python, the functions asked in each exercise, using the blank # space below the statem...
from PyQt5.QtWidgets import * from PyQt5.QtCore import Qt, QRect, QObject, pyqtSignal, QThread, QMutex from PyQt5.QtGui import QPixmap, QFont, QIntValidator, QDoubleValidator from PyQt5.QtMultimedia import QSound import sentry_sdk from tutorial import Tutorial import time import yaml import pika import pika.exceptions ...
OrderedDict([]) self._child_list_classes = OrderedDict([]) self._leafs = OrderedDict([ ('unknown_packets', YLeaf(YType.uint32, 'unknown-packets')), ('zero_length_body_packets', YLeaf(YType.uint32, 'zero-length-body-packets')), ('start_control_connection_requests', YLeaf(YType.uint32, 'start-control-connection-requ...
key = 'weatherDewPoint' value = header.value elif header.key in ['fits:alt-obs']: key = 'observerAlt' value = header.value.split('/')[0].strip().strip("'").lower() elif header.key in ['fits:pierside']: key = 'pierSide' value = header.value.split('/')[0].strip().strip("'").lower() elif header.key in ['fits:fl...
<reponame>olmoulin/deer """ CRAR Neural network using Keras """ import numpy as np from tensorflow.keras import backend as K from tensorflow.keras.models import Model from tensorflow.keras.layers import Input, Layer, Dense, Flatten, Activation, Conv2D, MaxPooling2D, UpSampling2D, Reshape, Permute, Add, Subtract, Dot,...
j + 1] = False # To determine if point before i is a spike, need n-1 # valid points after j: k = min(y.size, j + n) count = k - (j + 1) # n-1 if away from end # shift good points backward in time to get rid of spikes: # <--- # ......ssss+++++ ==> ......+++++ # i j y[i : i + count] = y[j + 1 : k] # update onl...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: type_Result.py from types import * import array import array RESULT_PERSISTENCE_TYPE_SOTI = 1 RESULT_PERSISTENCE_TYPE_LAUNCHER = 2 RESULT_PERSISTENCE...
<filename>image_preprocessing.py """Fairly basic set of tools for real-time data augmentation on image data. Can easily be extended to include new transformations, new preprocessing methods, etc... """ from __future__ import absolute_import from __future__ import print_function import math import os import random impo...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
<filename>grsnp/hypergeom4.py<gh_stars>10-100 #!/usr/bin/env python2 from __future__ import division import argparse import collections import math import sys import logging from logging import FileHandler,StreamHandler #from bx.intervals.intersection import IntervalTree from scipy.stats import hypergeom import numpy a...
for treating a larger number of rays. """ indices = self.indices[:, start_index, end_index] num_points_sets = self.fermat_path.num_points_sets x = np.zeros(num_points_sets, s.FLOAT) y = np.zeros(num_points_sets, s.FLOAT) z = np.zeros(num_points_sets, s.FLOAT) for (i, (points, j)) in enumerate(zip(self.fermat_pa...
<filename>unionml/model.py """Model class for defining training, evaluation, and prediction.""" import inspect import os from collections import OrderedDict from dataclasses import asdict, dataclass, field, is_dataclass, make_dataclass from functools import partial from inspect import Parameter, signature from typing ...
"""CSC148 Assignment 2 === CSC148 Winter 2020 === Department of Computer Science, University of Toronto This code is provided solely for the personal and private use of students taking the CSC148 course at the University of Toronto. Copying for purposes other than this use is expressly prohibited. All forms ...
hippocampus - note: currently reverts back to reptile') hippocampus 5. Human hippocampus - note: pending status, some simple causal features') hippocampus 6. Superintelligence level 1 - note: currently reverts back to lower human level') hippocampus 7. Superintelligence level 2 - note: currently reverts back to l...
<reponame>hhu-stups/python_jvm # -*- coding: utf-8 -*- import new, sys, os, types, native, thread #import classfile, classloader, javaclasses from classloader import JClass, descriptor # eg. for putfield from helper import make_String, throw_NullPointerException, throw_ArithmeticException, throw_ArrayIndexOutOfBounds...
= node.diskUpdate(disks=update_disks) disks = get_update_disks(new_node.disks) assert disks[list(new_node.disks)[0]].tags == tags["disk"] new_node = set_node_tags(client, node, tags["node"]) assert new_node.tags == tags["node"] tag_mappings[node.id] = tags yield tag_mappings client = get_longhorn_api_client()...
<filename>azure-cis.py #!/usr/bin/python3 # @Author <NAME> # Version 1.1 import subprocess import sys import datetime import os from include import check1,check2,check3,check4,check5,check6,check7,check8,subscription from html.parser import HTMLParser ################ CSV EXPORT HELPERS #################...
%i", "pixel_samples %i %i", "auto_light %s", "auto_render_pass %s %s", "shadows %i", "mblur %i" ] #-------------------------------------------------------------------------- # enums #-------------------------------------------------------------------------- class kRenderer: PRMan = 1 Air = 2 ThreeDelight...
# import rekall from esper.rekall import * from rekall.video_interval_collection import VideoIntervalCollection from rekall.interval_list import Interval, IntervalList from rekall.temporal_predicates import * from rekall.spatial_predicates import * from rekall.parsers import in_array, bbox_payload_parser from rekall.me...
and expired url = '/api/notifications/expired/?listing=160' # ID 160 belongs to Stroke play response = APITestHelper.request(self, url, 'GET', username='jones', status_code=200) notification_list = self._format_notification_response(response) expected = ['160-listing-asimplelistingtest'] self.assertEqual(expected...
<gh_stars>0 from collections import OrderedDict, defaultdict import random """ Helper functions and classes involving graph structures. Copied from Daza & Cochez (2020). """ def _reverse_relation(relation): return (relation[-1], relation[1], relation[0]) def _reverse_edge(edge): return (edge[-1], _reverse_relation...
= Datagram.create([75757], 60, DBSERVER_OBJECT_GET_ALL) dg.add_uint32(3) # Context dg.add_doid(doid) self.conn.send(dg) # Retrieve object from the database # The values should be updated dg = Datagram.create([60], 75757, DBSERVER_OBJECT_GET_ALL_RESP) dg.add_uint32(3) # Context dg.add_uint8(SUCCESS) dg.add_uin...
<filename>toontown/estate/GardenDropGame.py import math, random, GameSprite, GardenGameGlobals from math import pi from direct.gui.DirectGui import * from direct.distributed.ClockDelta import * from toontown.toonbase import TTLocalizer LevelNumber = 1 class GardenDropGame: def __init__(self): self.inHelp = False ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "<NAME>" __copyright__ = "Copyright 2020, <NAME>, <NAME>, <NAME>, <NAME>" __credits__ = ["<NAME>", "<NAME>"] __license__ = "MIT" __version__ = "1.0" __status__ = "Development" import numpy as np import os import csv import cv2 from datetime i...
""" Filter and combine various peptide/MHC datasets to derive a composite training set, optionally including eluted peptides identified by mass-spec. """ import sys import argparse import os import json import collections from six.moves import StringIO import pandas from mhcflurry.common import normalize_allele_name ...
<filename>nsls2ptycho/ptycho_gui.py import sys import os import random from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QFileDialog, QAction from nsls2ptycho.ui import ui_ptycho from nsls2ptycho.core.utils import clean_shared_memory, get_mpi_num_processes, parse_range from nsls2ptycho.core.ptycho...
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. from collections import namedtuple from typing import Union import torch from pytorch3d import _C from torch.a...
"longitude": -87.56917349999999, "population": "95334", "rank": "313", "state": "Alabama", }, { "city": "Livonia", "growth_from_2000_to_2013": "-5.4%", "latitude": 42.36837, "longitude": -83.35270969999999, "population": "95208", "rank": "314", "state": "Michigan", }, { "city": "New Bedford", "growth_fr...
<filename>benchmark/run_1yr_fullchem_benchmark.py #!/usr/bin/env python """ run_1yr_fullchem_benchmark.py: Driver script for creating benchmark plots and testing gcpy 1-year full-chemistry benchmark capability. Run this script to generate benchmark comparisons between: (1) GCC (aka GEOS-Chem "Classic") vs. GCC (2...
of `str` list of strings to parse. The default is taken from `sys.argv`. Returns ------- `argparse.Namespace` namespace object containing processed given arguments and/or default options. """ description = "Produce perturbed files containing sampled parameters that " "represent the information\nstored in the ...
_cv.cvGetND(*args) def cvGetReal1D(*args): """cvGetReal1D(CvArr arr, int idx0) -> double""" return _cv.cvGetReal1D(*args) def cvGetReal2D(*args): """cvGetReal2D(CvArr arr, int idx0, int idx1) -> double""" return _cv.cvGetReal2D(*args) def cvGetReal3D(*args): """cvGetReal3D(CvArr arr, int idx0, int idx1, int idx...
# coding=utf-8 # Copyright 2021 The Google Research 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 required by applicable l...
<filename>acme/adders/reverb/transition.py<gh_stars>0 # python3 # Copyright 2018 DeepMind Technologies Limited. 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:/...
complete isolation, followed by secondary contact with 2 migration rates nu1: Size of population 1 after split. nu2: Size of population 2 after split. hrf: Hill-Robertson factor, i.e. the degree to which Ne is locally reduced due to the effects of background selection and selective sweep effects m12: Migration fro...
6000 N ! PARAMETER G(TEST,HE,C,F;2) 300 STR#; 6000 N ! PARAMETER G(TEST,HE,C,NE;0) 300 STR#; 6000 N ! PARAMETER G(TEST,HE,C,NE;1) 300 STR#; 6000 N ! PARAMETER G(TEST,HE,C,NE;2) 300 STR#; 6000 N ! PARAMETER G(TEST,HE,N,O;0) 300 STR#; 6000 N ! PARAMETER G(TEST,HE,N,O;1) 300 STR#; 6000 N ! PARAMETER G(TEST,HE,N,O;2) 300 S...
FuchsianSystem(object): @staticmethod def from_M(m, x, eps): # singular points xs = sorted(singularities(m, x).keys()) # residues in singular points rs = {} for xi in xs: rs[xi] = SystemResidue(matrix_residue(m, x, xi), eps) # TODO: check if system's residues have half-integer eigenvalues. # If yes, then info...
verbose=True) glove.add_dictionary(corpus_model.dictionary) time_elapsed = datetime.now() - start_time gloveModelFile = "trained/glove_fashion_epochs" + str(epochs) + "_d" + str(dimensionality) + "_c" + str( context) + "_vecs" + ".model" glove.save(gloveModelFile) notes = "Glove Fashion Data," + str(dimensionalit...
------------------------------------------------------------------------ Get a submatrix. Returns the sparsity of the submatrix, with a mapping such that submatrix[k] = originalmatrix[mapping[k]] """ return _casadi.Sparsity_sub(self, *args) def transpose(self, *args): """ Transpose the matrix and get t...
<reponame>a414351664/DuReader<filename>tensorflow/tfu.py # coding:utf-8 import tensorflow as tf import tensorflow.contrib as tfctr import numpy as np import re INF = 1e20 class OptimizerWrapper(object): def __init__(self, optimizer, grad_clip=None, decay=None, exclude=None): self._opt = optimizer self._grad_clip...
<reponame>radon-provenance/radon-web # Copyright 2021 # # 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 a...
from numpy import ndarray import numpy as np import operator from unit import dim as dims, conv, idim from unitparse import (eval_units as unit_parse, linadd as d_add, linsubtract as d_sub, linscale as d_scale) from utils import prec_round class UnknownUnitError(KeyError): def __init__(self,msg): KeyError.__in...
], [ '{0};'.format(_crc_init_function_def(self.opt, self.sym)), ]), '', '', Comment(self.opt, '', [ 'Update the crc value with new data.', '', '\\param[in] crc The current crc value.', Conditional(self.opt, '', not _use_cfg_in_crc_update(self.opt), [ '\\param[in] cfg A pointer to an initialised {cfg_t} structu...
index of the view to return (default ``0``). prefer_lut : bool When the VOI LUT Module contains both *Window Width*/*Window Center* and *VOI LUT Sequence*, if ``True`` (default) then apply the VOI LUT, otherwise apply the windowing operation. Returns ------- numpy.ndarray An array with applied VOI LUT or windo...
(prefix + "p58291433-p58454173.7z"), page_ids=range(58291433, 58454174), darus_id=93849, sha1="28ec6ece5639810ac14817d452f0f089faabb4ed", size=390949888, auto_download=auto_download, ), WikidatedV1_0EntityStreamsFile( archive_path=dataset_dir / (prefix + "p58454174-p58655598.7z"), page_ids=range(58454174, 5865...
<reponame>zyksir/NIKE # !/usr/bin/python3 from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import logging import numpy as np from torch.nn.init import xavier_normal_, xavier_normal import torch import torch.nn as nn import torch.nn.fun...
<gh_stars>1-10 """webapp om teksten in ReST formaat om te zetten naar HTML documenten presentation layer """ # import sys # import os import pathlib import datetime import cherrypy ## sys.path.append('.') import rst2html_functions as rhfn HERE = pathlib.Path(__file__).parent TEMPLATE = HERE / "rst2html.html" previewbu...
import numpy as np import tensorflow as tf import datetime import ctr_funcs as func import config_gme as cfg from time import time import os import shutil # whether to perform warm up warm_up_bool = cfg.warm_up_bool test_batch_size = cfg.test_batch_size meta_mode = cfg.meta_mode alpha = cfg.alpha gamma = cfg.gamma t...
+ c * x ** S(4)) ** (p + S(-1)) / (d + e * x ** S(2)), x), x, ) def With1255(a, b, c, d, e, x): q = Rt(-S(4) * a * c + b ** S(2), S(2)) return Dist( S(2) * sqrt(-c), Int( S(1) / ( (d + e * x ** S(2)) * sqrt(-b - S(2) * c * x ** S(2) + q) * sqrt(b + S(2) * c * x ** S(2) + q) ), x, ), x, ) def With125...
# Smoothed-particle hydrodynamics (SPH) is a computational method used for simulating the mechanics of continuum media, such as solid mechanics and fluid flows. # Here we utilize SPH to simulate a fountain, who tries to hit a target given by the user. # The SPH simulator here implemented using Taichi is differentiabl...
#!/usr/bin/env python #-*- coding:utf-8 -*- ## ## pb.py ## ## Created on: Mar 13, 2019 ## Author: <NAME> ## E-mail: <EMAIL> ## """ =============== List of classes =============== .. autosummary:: :nosignatures: EncType PBEnc ================== Module description ================== .. note:: Functional...
#!/usr/bin/env python3 import sys import os import json import pickle import traceback import numpy as np import time import datetime as dtime from progressbar import ProgressBar, ETA, Bar, Percentage from sklearn.base import clone from sklearn.preprocessing import MinMaxScaler from sklearn.cross_validation import KF...
when returning server files list""" # Check if it's an additional path as defined on startup if len(working_path) > 1: dir_name = Path(working_path).parts[1] if additional_folders and dir_name in additional_folders: return os.path.join(additional_folders[dir_name], working_path[len(dir_name) + 2:]) # Might be a ...
<filename>manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py # Copyright (c) 2015 <NAME>. 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....
overseeing overseen overseer overseers oversees overshadow overshadowed overshadowing overshadows overshoot overshooting overshoots overshot oversight oversights oversimplification oversleep oversleeping oversleeps overslept overstate overstated overstates overstating overstep overstepped overstepping oversteps overt o...
<filename>mesonbuild/compilers/mixins/gnu.py # Copyright 2019 The meson development 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 # # Unl...
<gh_stars>0 # -*- coding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. # Copyright 2011, Nexenta Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
<filename>pypsbuilder/psclasses.py """pypsbuilder classes used by builders. This module contains classes and tools providing API to THERMOCALC, parsing of outputs and storage of calculated invariant points and univariant lines. Todo: * Implement own class for divariant fields """ # author: <NAME> # website: petrol....
len(text) == 0) and \ isinstance(new_properties, str) and \ len(new_properties) > 0 and \ text != new_properties: self.set_section_data(section_name, new_properties) else: properties = self.get_section_properties(section_name) new_properties.update(properties) self.set_section_properties(section_name, new_prope...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END """ fogbench -- a Python script used to test FogLAMP. The objective is to simulate payloads for input, REST and other requests against one or more FogLAMP instances. This version of fogbench is meant ...
<reponame>m-ignatov/cloud-security-xsuaa-integration #!/usr/bin/env python3 # SPDX-FileCopyrightText: 2018-2021 SAP SE or an SAP affiliate company and Cloud Security Client Java contributors # SPDX-License-Identifier: Apache-2.0 import abc import distutils import http import ssl import subprocess import urllib.request ...
# -*- coding: utf-8 -*- # :Project: pglast -- Printer functions for SQL DML nodes # :Created: sab 05 ago 2017 16:34:08 CEST # :Author: <NAME> <<EMAIL>> # :License: GNU General Public License version 3 or later # :Copyright: © 2017, 2018, 2019, 2020, 2021 <NAME> # from .. import enums from ..node import Missing, List f...
<reponame>aflahelouneg/inverse_identification_soft_tissue ''' Human skin hyper-elastic model parameter identification. The fixed pad (right pad) is fixed at zero displacement; the moving pad (left pad) is subjected to incremental displacement. The reaction force is measured at the moving pad. The objective is to fit ...
to be greater or equal to the maximum length of an element of ``vectors``. value: a value used for padding Returns: an array of padded vectors """ result = [] for v in vectors: result.append(np.concatenate([v, np.full([length - v.shape[0]], value, dtype=v.dtype)])) return np.stack(result) class BertPunctuat...
check to user mex = 'This is your netlist:\n\n' with open(fname) as f: for line in f: mex += line context.bot.send_message(chat_id=update.message.chat_id, text=mex) # compute solution net, mex = get_solution(fname, update, context) # typing context.bot.send_chat_action(chat_id=update.message.chat_id, action=...
: "column", "moduleName" : "ZYXEL-ES2024A-MIB", "oid" : "1.3.6.1.4.1.890.172.16.17.32.32.2.1.4", "status" : "current", "syntax" : { "type" : { "basetype" : "Enumeration", "local_user0" : { "nodetype" : "namednumber", "number" : "0" }, "local_user1" : { "nodetype" : "namednumber", "number" : "1" }, "local...
0 despecklingdone = False for despecklepass in range(optiondict["despeckle_passes"]): LGR.info(f"\n\nCorrelation despeckling subpass {despecklepass + 1}") outmaparray *= 0.0 outmaparray[validvoxels] = eval("lagtimes")[:] medianlags = ndimage.median_filter( outmaparray.reshape(nativespaceshape), 3 ).reshape(nums...
<reponame>karttur/geoimagine02-postgresdb<gh_stars>0 ''' Created on 8 juni 2018 @author: thomasgumbricht ''' # Package application imports from geoimagine.postgresdb import PGsession from geoimagine.postgresdb.compositions import InsertCompDef, InsertCompProd, InsertLayer, SelectComp from geoimagine.support import...
<filename>KWsearch.pyw #-*- coding: utf-8 -*- """KWsearch v0.1 by <NAME> (<EMAIL>) Програма призначена для швидкого пошуку в каталозі за ключовими словами. Ключові слова вводяться в файлі class.pykb (кодування utf-8), який розташований цьому каталогі, і містить наприклад: kw("книга", "book", "python") Може працюв...