input
stringlengths
2.65k
237k
output
stringclasses
1 value
= plt.figure() ax = fig.add_subplot(111, projection='3d') ax.set_aspect('equal') # save a list of min. and max. X, Y, Z coordinates x_min, y_min, z_min = [1e10] * 3 x_max, y_max, z_max = [0] * 3 # plot the surface: for (surf3d_idx, s) in enumerate(self.models[model_type].surface_3d): verts = s['verts'] centr...
<reponame>joakimzhang/python-electron<gh_stars>0 #!/usr/bin/env python ''' map display module <NAME> June 2012 ''' import sys, os, math import functools import time from MAVProxy.modules.mavproxy_map import mp_elevation from MAVProxy.modules.lib import mp_util from MAVProxy.modules.lib import mp_settings from MAVProxy...
path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='https://rmt.verizon.com/bnc-filtered-alarms', defining_module='bnc-filtered-alarms', yang_type='string', is_config=True)""", }) self.__partition = t if hasattr(self, '_set'): self._set() def _unset_partition(self): self....
handshake returns True if it succeeded if not (await self.handshake()): return try: await self.handler(self) except BaseException as err: await self.loop.render_exc_async( err, before=[ 'Unhandled exception occurred at', self.__class__.__name__, '.lifetime_handler meanwhile running: ', repr(self.handler), ...
from typing import Optional, List, NoReturn import copy from easydict import EasyDict from ding.utils import find_free_port, find_free_port_slurm, node_to_partition, node_to_host, pretty_print, \ DEFAULT_K8S_COLLECTOR_PORT, DEFAULT_K8S_LEARNER_PORT, DEFAULT_K8S_COORDINATOR_PORT from dizoo.classic_control.cartpole.con...
self.distance_all_pairs() for u in self: for v in self: if d[u].get(v, Infinity) in distances: D.add_edge(u, v) return D def girth(self, certificate=False): """ Return the girth of the graph. The girth is the length of the shortest cycle in the graph (directed cycle if the graph is directed). Graphs without...
<filename>ExtinctionRecallTask/ExtinctionRecallAndVasTask.py #!/usr/bin/env python2 """ ExtinctioRecallAndVasTask.py Display images from a specified folder and present them to the subject, rating the images on given scales. Also have rest and "dummy" runs and present mood ratings to the subject in between. Created 8/2...
], 'Cisco-IOS-XR-clns-isis-cfg', 'mpls-ldp-global', _yang_ns._namespaces['Cisco-IOS-XR-clns-isis-cfg'], 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_clns_isis_cfg' ), }, 'Isis.Instances.Instance.Afs.Af.TopologyName.Mpls.RouterId' : { 'meta_info' : _MetaInfoClass('Isis.Instances.Instance.Afs.Af.TopologyName.Mpls.Router...
fdmnulllist=[] for i in range(numperm): allflowvec=flowveclist1copy+flowveclist2copy flowgrp=common.randgroup(allflowvec,2) for flow in flowgrp[0]: if sum(flow)<0.96: flow[0]=0.95 flow[-1]=0.0 for flow in flowgrp[1]: if sum(flow)<0.96: flow[0]=0.0 flow[-1]=0.95 flowgrp1=self._flowveclist2flowvec(flowgrp[...
import cv2 from PIL import Image import numpy as np from skimage import measure from PIL.ExifTags import TAGS, GPSTAGS def close_contour(contour): if not np.array_equal(contour[0], contour[-1]): contour = np.vstack((contour, contour[0])) return contour def binary_mask_to_polygon(binary_mask, tolerance=2): """Conv...
perna, parte não especificada'), ('S82.0', 'Fratura da rótula [patela]'), ('S82.1', 'Fratura da extremidade proximal da tíbia'), ('S82.2', 'Fratura da diáfise da tíbia'), ('S82.3', 'Fratura da extremidade distal da tíbia'), ('S82.4', 'Fratura do perônio [fíbula]'), ('S82.5', 'Fratura do maléolo medial'), ('S82.6...
Returns the value of the `qoss` property. """ return self._qoss @qoss.setter def qoss(self, value): """ Sets the value of the `qoss` property. """ self._qoss = value @property def mac_pool(self): """ Returns the value of the `mac_pool` property. """ return self._mac_pool @mac_pool.setter def mac_pool...
'https://i.imgur.com/s5AExEM.jpg'], ['繪師: カツラギ-pixiv', 'https://i.imgur.com/3NOjwK5.jpg'], ['繪師: ぴてぃ-pixiv', 'https://i.imgur.com/4TWI8Ht.jpg'], ['繪師: HIROKAZU-pixiv', 'https://i.imgur.com/jPLoOYo.jpg'], ] line_bot_api.reply_message(event.reply_token,[TextSendMessage(text= value_i[i% len(value_i)][0]),ImageMessage...
from typing import overload from UdonPie import System from UdonPie import UnityEngine from UdonPie.Undefined import * class ConfigurableJoint: def __new__(cls, arg1=None): ''' :returns: ConfigurableJoint :rtype: UnityEngine.ConfigurableJoint ''' pass @staticmethod def op_Implicit(arg1): ''' :param arg1: ...
<filename>gamemaker.py<gh_stars>0 from Interface.models import HuntUser, Landmark, Penalty, Game from django.utils import timezone from datetime import datetime class GameMaker: def __init__(self): pass def add_landmark(self, input): # input: List of length 4 if len(input) != 4: return "Invalid input!" name =...
# -*- coding: utf-8 -*- #============================================================ # # Deep Learning BLW Filtering # Main # # author: <NAME> # email: <EMAIL> # github id: fperdigon # #=========================================================== import _pickle as pickle from datetime import datetime import time impo...
# Standard library imports import os import warnings # Third party imports import numpy as np import astropy.units as u from astropy.io import fits from astropy import constants from galpy.orbit import Orbit from galpy.util.bovy_conversion import time_in_Gyr from scipy.integrate import solve_ivp from scipy.interpolate...
meta data self._backup_remote_meta_info() # Backup `virsh dumpxml` output self._backup_remote_xml() # Backup logical volume snapshot to disk image file using `dd` self._backup_remote_lv() def _backup_remote_directory(self): ''' Verify the remote directory exists. If not, attempt to create it. ''' command =...
a standard bit of pyparsing, and an Or. print("\nUse ignore expression (2)") comment = ";;" + restOfLine teststring = """ (let ((greeting "Hello, )world!")) ;;(foo bar (display greeting)) """ expected = [ [ "let", [["greeting", '"Hello, )world!"']], ";;", "(foo bar", ["display", "greeting"], ] ] expr ...
"""Various VR utilities.""" import queue import threading import time from asyncio.streams import StreamReader from typing import Sequence, Dict import struct import numpy as np import serial.threaded from pykalman import KalmanFilter from copy import copy try: import cv2 from displayarray import read_updates fro...
import argparse from collections import defaultdict from itertools import izip import numpy as np import os import pandas as pd from scipy.interpolate import interp1d from scipy.stats import linregress, spearmanr from base.io_util import write_json # from builds.flu.scores import select_nodes_in_season from frequencie...
db_dx J[('boundary_constraint','turbineY')] = db_dy return J class SpacingComp(Component): """ Calculates inter-turbine spacing for all turbine pairs """ def __init__(self, nTurbines): super(SpacingComp, self).__init__() # set finite difference options (fd used for testing only) self.deriv_options['check_...
def test_sync_child_tickets(self): """ Test to ensure that a ticket will sync related objects, in its case schedule, note, and time entries """ fixture_utils.init_schedule_entries() fixture_utils.init_service_notes() synchronizer = self.sync_class() ticket = models.Ticket.objects.get(id=self.ticket_fixture['id...
from os import path import glob from updater import get_updater from filter import get_filter from cache import get_cache from merge import (FileHunk, MemoryHunk, apply_filters, merge, make_url, merge_filters) __all__ = ('Bundle', 'BundleError',) class BundleError(Exception): pass class BuildError(BundleError):...
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under t...
""" All the data sources are scattered around the D drive, this script organizes it and consolidates it into the "Data" subfolder in the "Chapter 2 Dune Aspect Ratio" folder. <NAME>, 5/6/2020 """ import shutil as sh import pandas as pd import numpy as np import os # Set the data directory to save files ...
<reponame>victoriarspada/woudc-data-registry # ================================================================= # # Terms and Conditions of Use # # Unless otherwise noted, computer program source code of this # distribution is covered under Crown Copyright, Government of # Canada, and is distributed under the MIT Lice...
example. So, even though `_Subterm` (the analogue of one of my # tuples of CategoricalCodings) is set based, it's possible that this is # used to recover the original order. # TODO: Would it be clearer or more efficient to use OrderedSet rather # than tuple here? I'm not sure. def absorb(t1, t2): assert type(t1) == ...
[ basestring, 'None' ], False ], 'max_transfer_rate': [ max_transfer_rate, 'max-transfer-rate', [ int, 'None' ], False ], 'clean_up_failure': [ clean_up_failure, 'clean-up-failure', [ bool, 'None' ], False ], 'destination_cluster': [ destination_cluster, 'destination-cluster', [ basestring, 'None' ], False ], }, { ...
and os is None): return 0, 1 elif (ss is None and os is not None): return 1, 0 s0, s1, o0, o1 = s[0], s[1], o[0], o[1] s1d, o1d = s1.isdigit(), o1.isdigit() if 'H' == s0 == o0: if (s1 == o1) or (s1d and o1d): return s, o elif s1d: return 0, 1 elif o1d: return 1, 0 else: return (self._greek_sort_keys[s1], ...
<reponame>LanceaKing/kaldi<filename>egs/wsj/s5/steps/nnet3/dot/nnet3_to_dot.py #!/usr/bin/env python # Copyright 2015 Johns Hopkins University (Author: <NAME>) # Apache 2.0 # script to convert nnet3-am-info output to a dot graph # we're using python 3.x style print but want it to work in python 2.x, from __future__...
/ 5, (1 - 0) / 1] }, { 'x_scaled': [-1., .2, float('nan'), float('nan')] # [(-1 - 0) / 1, (4 - 3) / 5] } ] expected_metadata = tft_unit.metadata_from_feature_spec( {'x_scaled': tf.io.FixedLenFeature([4], tf.float32)}) self.assertAnalyzeAndTransformResults(input_data, input_metadata, preprocessing_fn, expecte...
<filename>funcs2run_bat_tools.py import os import subprocess import sys sys.path.append('/storage/work/jjd330/local/bat_data/BatML/HeasoftTools') from gen_tools import run_ftool from bat_tool_funcs import ev2dpi, mk_pc_img, mk_sky_img, run_batcelldetect import time import numpy as np import multiprocessing as mp import...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.0513108, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.10198, '...
a request is made to return ``maxResults`` number of items, ``NextToken`` allows you to return more items in your list starting at the location pointed to by the next token. :type NextToken: string :param NextToken: The next item following a partial list of returned items. For example, if a request is made to return...
return [True, None] def get_views_list(self): res = requests.get(self.url + '/api/defaultDashboards', headers=self.hdrs, verify=self.ssl_verify) if not self._checkResponse(res): return [False, self.lasterr] return [True, res.json()] def get_view(self, name): gvres = self.get_views_list() if gvres[0] is False...
[1] Nucci et al., The problem of synthetically generating IP traffic matrices: initial recommendations, ACM SIGCOMM Computer Communication Review, 35(3), 2005 """ try: mean = float(mean) stddev = float(stddev) except ValueError: raise ValueError('mean and stddev must be of type float') if mean < 0 or stddev < ...
#!/usr/bin/env python # encoding: utf-8 """ turbine.py Created by <NAME> and <NAME> on 2014-01-13. Copyright (c) NREL. All rights reserved. """ from openmdao.main.api import Assembly, Component from openmdao.main.datatypes.api import Float, Array, Enum, Bool, Int from openmdao.lib.drivers.api import FixedPointIterato...
<filename>archive/pose_graph.py #!/usr/bin/env python """ Data Collection Module for recording data streamed from a phone to construct a pose graph of phone and landmarks positions at multiple time steps. by <NAME>, 2018 Last Modified August, 2018 This script will: - Communicate with Frames class defined in frames....
"""Utilities to support packages.""" z functools zaimportuj singledispatch jako simplegeneric zaimportuj importlib zaimportuj importlib.util zaimportuj importlib.machinery zaimportuj os zaimportuj os.path zaimportuj sys z types zaimportuj ModuleType zaimportuj warnings __all__ = [ 'get_importer', 'iter_importers', '...
object_bounding_boxes, placements ): break placement_trial_count += 1 if placement_trial_count > max_placement_trial_count_per_object: return np.zeros((n_objects, len(placement))), False placements.append(placement) return np.array(placements), True def place_objects_in_grid( object_bounding_boxes: np.nda...
# # Blue Haze # 19 Oct 2020 # # <NAME> - <EMAIL> # <NAME> - <EMAIL> # # todo: stop / terminate the hardware when the app closes from PySide2.QtMultimedia import * from PySide2.QtMultimediaWidgets import QCameraViewfinder from PySide2.QtGui import QFont from PySide2.QtCore import Qt, QDir from glob import glob from re...
# -*- coding: utf-8 -*- """ Created on Wed Aug 21 17:49:21 2013 @author: <NAME> Minor edits by <NAME> """ import numpy as np from matplotlib import pyplot as plt #from mpl_toolkits.mplot3d import Axes3D #import mpl_toolkits.mplot3d.art3d as art3d from matplotlib.patches import Ellipse from matplotlib i...
<reponame>opcode-eu-org/opcode-blog # -*- coding: utf-8 -*- # Copyright (c) 2012-2018 <NAME> # # 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 without limitati...
import os import yaml import jsonschema import numpy as np import math import json import copy import time as ttime from .xrf_utils import split_compound_mass, generate_eline_list from .utils import normalize_data_by_scaler, convert_time_to_nexus_string import logging logger = logging.getLogger() # ===================...
# flake8: noqa I201 from Child import Child from Node import Node DECL_NODES = [ # type-assignment -> '=' type Node('TypeInitializerClause', kind='Syntax', children=[ Child('Equal', kind='EqualToken'), Child('Value', kind='Type'), ]), # typealias-declaration -> attributes? access-level-modifier? 'typealias' ...
region_l = 0.0 region_r = 1.0 u_true, f, A_eps, u_left, u_right = MS_LaplaceEqs.get_infos2pLaplace_1D_2( in_dim=input_dim, out_dim=out_dim, intervalL=region_l, intervalR=region_r, index2p=p_index, eps1=epsilon1, eps2=epsilon2) elif R['PDE_type'] == 'Possion_Boltzmann': # 求解如下方程, A_eps(x) 震荡的比较厉害,具有多个尺度 # ...
""" Tests for the algorithms.spectral submodule """ import numpy as np import scipy from scipy import fftpack import numpy.testing as npt import numpy.testing.decorators as dec import nose.tools as nt import nitime.algorithms as tsa import nitime.utils as utils def test_get_spectra(): """ Testing spectral estim...
This is retrieved from one of following three URLs (which are stored in nussl.constants): NUSSL_EFZ_AUDIO_METADATA_URL, NUSSL_EFZ_BENCHMARK_METADATA_URL, or NUSSL_EFZ_MODEL_METADATA_URL. Args: url (str): URL for the EFZ server that has metadata. One of these three: NUSSL_EFZ_AUDIO_METADATA_URL, NUSSL_EFZ_BENCHMAR...
<gh_stars>0 from http import HTTPStatus from unittest.mock import MagicMock import jwt from pytest import fixture from app import app from api.errors import INVALID_ARGUMENT from tests.unit.payloads_for_tests import PRIVATE_KEY @fixture(scope='session') def client(): app.rsa_private_key = PRIVATE_KEY app.testing...
'SAME' or 'VALID' data_format : string An optional string from "NWC", "NCW". Defaults to "NWC", the data is stored in the order of [batch, in_width, in_channels]. The "NCW" format stores data as [batch, in_channels, in_width]. dilations : int or list An int or list of ints that has length 1 or 3 which defaults to ...
<reponame>domenic/test262 #!/usr/bin/python # Copyright 2009 the Sputnik authors. All rights reserved. # This code is governed by the BSD license found in the LICENSE file. import logging import optparse import os from os import path import platform import re import subprocess import sys import tempfile import time ...
<reponame>derezin/DPPy # coding: utf8 """ Implementation of finite DPP exact samplers derived from: - the raw **projection** correlation :math:`K` kernel (no need for eigendecomposition) - the eigendecomposition of the correlation :math:`K` kernel .. seealso: `Documentation on ReadTheDocs <https://dppy.readthedocs....
except ValueError: showwarning("An unknown error occured") return 0 def apply(self): # Build list of tiles in this group tile_out = [] tile_list = list(App.tile_ids.items()) del tile_list[0] for i in self.tile_value_list: t_id = tile_list[i.get()][0] # If the current value was not previously (here defaulti...
#!python3 import os import sys import struct import argparse import yaml import asyncio import traceback from signal import SIGINT, SIGTERM from bleak import BleakClient, BleakError, BleakScanner import atexit import pickle from pickle import UnpicklingError from aiohttp import web import ssl import json import logging...
from cuda.upfirdn_2d import * from cuda.fused_bias_act import fused_bias_act ################################################################################## # Layers ################################################################################## class Conv2D(tf.keras.layers.Layer): def __init__(self, fmaps, ke...
<reponame>etjoa003/gpt import torch import torch.nn as nn import torch.optim as optim import torchvision import os, time, PIL import numpy as np import matplotlib.pyplot as plt from . import utils device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") def entry(args): print('pipeline.entry() mode...
# Copyright (c) Facebook, Inc. and its affiliates. from __future__ import annotations import enum from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Any, Callable, List, Tuple if TYPE_CHECKING: from minihack import MiniHack from nle.nethack import Command, CompassDirection Y_cmd = CompassDirecti...
from django import template from django.utils.safestring import mark_safe from django.contrib.staticfiles.templatetags.staticfiles import static from django.conf import settings register = template.Library() # read setting file try: import_by_developer = not bool(settings.C3_IMPORT) except AttributeError: import_by...
I11i % II111iiii % O0 . i1IIi / I1Ii111 if 100 - 100: I1ii11iIi11i * i11iIiiIii % oO0o / Oo0Ooo / ooOoO0o + I1ii11iIi11i if 59 - 59: I1Ii111 - IiII if 14 - 14: iIii1I11I1II1 - iIii1I11I1II1 if 5 - 5: IiII if ( os . path . exists ( "lisp.py" ) and os . path . exists ( "lisp.pyo" ) == False ) : lisp . lprint ( "In ...
from numpy import zeros from numpy.linalg import eigvals import time import numpy as np import scipy as sp import scipy.signal as signal import scipy.sparse as sparse import osqp import matplotlib.pyplot as plt import matplotlib.cm as cm from .controller import Controller from ..learning.edmd import Edmd class MP...
import filecmp import os import base64 import copy import logging import time import jinja2 import pykube import docker import requests from toscaparser.tosca_template import ToscaTemplate from submitter.abstracts import base_adaptor as abco from submitter.abstracts.exceptions import AdaptorCritical from submitter im...
@property def back_side_beamdiffuse_visible_solar_reflectance(self): """field `Back Side Beam-Diffuse Visible Solar Reflectance` | Used only when Optical Data Type = SpectralAverage | Back Side is side closest to zone air | Units: dimensionless | value <= 1.0 Args: value (float): value for IDD Field `Back Sid...
:param val_c_UnitID: If op_UnitID is specified, this value will be compared to the value in UnitID using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_UnitID must be specified if op_UnitID is specified. :type val_c_UnitID: String | ``api ver...
<gh_stars>0 #---Graph plotting script is written inline in data processing function #——Author: <NAME> import re, calendar, csv, datetime #re is for regex import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as mpatches #for matching colour of legend and dict...
return True return False class Text(Control): """Display some text in the UI.""" def __init__(self, value, **kwargs): super().__init__(**kwargs) self.value = value self.can_focus = False @property def text(self): return self.value def render(self, app): return Display(self.value, fg=self.fg, bg=self.bg)...
# -*- coding: utf-8 -*- """ This enables to parameterize the contributivity measurements to be performed. """ from __future__ import print_function import bisect import datetime from itertools import combinations from math import factorial from timeit import default_timer as timer import numpy as np from loguru impo...
interaction", u"detector: fabrication", u"gravitation: spinor", u"vector meson: decay modes", u"velocity: expansion", u"pi: density", u"gauge field theory: higher-dimensional", u"p p", u"chargino: exchange", u"B-: rare decay", u"nonpolynomial", u"n nucleus: elastic scattering", u"space-time: complex", u"Gr...
means sigma h = torch.mul(o, torch.tanh(c)) + torch.mul(o_c, torch.tanh(self.W_c_b(sememe_h))) return (c, h) def forward(self, sent, sent_len, sememe_data): # hx: (child_c, child_h) sememe_h = self.sememe_sum(sememe_data) sent_len_sorted, idx_sort = np.sort(sent_len)[::-1], np.argsort(-sent_len) sent_len_sorted...
obj['canFillWithLiquid'] and not obj['isFilledWithLiquid']: empty_objects.add(obj['objectId']) empty_object_types.add(obj['objectType']) # # for ot in empty_object_types: # env.controller.step(action='SetObjectStates', SetObjectStates={ # 'objectType': ot, # 'stateChange': 'canFillWithLiquid', # 'isFilledWithLi...
# general libraries import warnings import numpy as np # image processing libraries from scipy import ndimage from skimage.transform import radon from skimage.measure.fit import _dynamic_max_trials from ..generic.test_tools import \ construct_phase_plane, cross_spectrum_to_coordinate_list from ..generic.data_tools i...
field is not specified, it is assumed to be PREMIUM. Possible values are `PREMIUM` and `STANDARD`. :param pulumi.Input[str] port_range: This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable onl...
!= set(self.get_permissions(user)): self.set_permissions(user, permissions, save=False) permissions_changed[user._id] = permissions self.set_visible(user, user_dict['visible'], auth=auth) users.append(user) user_ids.append(user_dict['id']) for user in self.contributors: if user._id in user_ids: to_retain.appen...
<reponame>tvorogme/dataops #!/usr/bin/env ambari-python-wrap """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache ...
<reponame>thirtywang/OpenPNM<filename>OpenPNM/Network/__DelaunayVoronoiDual__.py """ =============================================================================== DelaunayVoronoiDual: Generate a random network with complementary Delaunay and Voronoi networks, including connectings between them =======================...
datetime.strptime(data['1_day_back'], pattern) assert delta < timedelta(days=3) delta = datetime.strptime(data['1_day_forward'], pattern) - utcnow assert delta > timedelta(seconds=82800) delta = utcnow - datetime.strptime(data['1_hour_back'], pattern) assert delta < timedelta(seconds=3700) delta = datetime.strpti...
<filename>open_cp/gui/predictors/stscan.py """ stscan ~~~~~~ Uses the "space/time scan statistic" method of prediction. Things we can vary: - How far back in time to look - The bandwidth/cutoff rules for clusters - Quantise space and/or time? - Expand clusters to their maximum size? Pending further work, we shal...
import ctypes import numpy import sys import os import os.path from numpy.compat import asbytes, asstr def _generate_candidate_libs(): # look for likely library files in the following dirs: lib_dirs = [os.path.dirname(__file__), '/lib', '/usr/lib', '/usr/local/lib', '/opt/local/lib', os.path.join(sys.prefix, '...
name="MLST", dtype=ChannelType.LONG, doc="Last Val Monitored", read_only=True, ) prev_simulation_mode = pvproperty( name="OLDSIMM", dtype=ChannelType.ENUM, enum_strings=menus.menuSimm.get_string_tuple(), doc="Prev. Simulation Mode", read_only=True, ) output_mode_select = pvproperty( name="OMSL", dtype=Cha...
<reponame>brucepro/micropsi2 __author__ = 'rvuine' import json import os import warnings from micropsi_core.nodenet import monitor from micropsi_core.nodenet.node import Nodetype from micropsi_core.nodenet.nodenet import Nodenet, NODENET_VERSION, NodenetLockException from .dict_stepoperators import DictPropagate, Dic...
hbox_main.addLayout(vbox_apps) # Vertical separation line vertical_sep_01 = QtWidgets.QLabel('', window) vertical_sep_01.setFrameStyle(QtWidgets.QFrame.VLine | QtWidgets.QFrame.Plain) vertical_sep_01.setStyleSheet('QFrame {color: #444444}') hbox_main.addWidget(vertical_sep_01) paneTabs.setLayout(hbox_main) pa...
"shr": "Shi", "shs": "Shuswap", "sht": "Shasta", "shu": "Chadian Arabic", "shv": "Shehri", "shw": "Shwai", "shx": "She", "shy": "Tachawit", "shz": "<NAME>", "si": "Sinhalese", "si-med": "<NAME>", "sia": "<NAME>", "sib": "Sebop", "sid": "Sidamo", "sie": "Simaa", "sif": "Siamou", "sig": "Paasaal", "sih":...
from pathlib import Path from typing import IO, TYPE_CHECKING, Dict, Set, Tuple, Union import ele import numpy as np from openff.units import unit from openff.interchange.components.mdtraj import ( _iterate_angles, _iterate_impropers, _iterate_pairs, _iterate_propers, _store_bond_partners, ) from openff.intercha...
from __future__ import print_function import copy from math import * from instruction_list import * from parse_code import * from values import get_storage_value,get_params,set_params,print_params,is_params from values import create_configuration,add_configuration,configuration_exist,seen_configuration,print_configurat...
def type(self) -> str: return pulumi.get(self, "type") @property @pulumi.getter def value(self) -> int: return pulumi.get(self, "value") @pulumi.output_type class EndpointConfigAsyncInferenceClientConfig(dict): @staticmethod def __key_warning(key: str): suggest = None if key == "maxConcurrentInvocationsPerI...
# Document.name => Document self._df = {} # Cache of document frequency per word. self._similarity = {} # Cache of ((D1.id,D2.id), weight)-items (cosine similarity). self._divergence = {} # Cache of Kullback-leibler divergence per (word1, word2). self._ig = {} # Cache of (word, information gain)-items. self._vecto...
invalid caracter for the host. ie maya didnt support object name starting with number, and automatically rename the object. In order to retrieve the object use this functon. If a invalid caracter is found, the caracter is removed. This function can be change in the features, as it currently only look for number....
<gh_stars>10-100 del_items(0x80138AF4) SetType(0x80138AF4, "void GameOnlyTestRoutine__Fv()") del_items(0x80138AFC) SetType(0x80138AFC, "int vecleny__Fii(int a, int b)") del_items(0x80138B20) SetType(0x80138B20, "int veclenx__Fii(int a, int b)") del_items(0x80138B4C) SetType(0x80138B4C, "void GetDamageAmt__FiPiT1(int i,...
== None for a in newdata]): print("No graphing data") else: if None in newdata: print("Warning: Some data to be graphed was nil; ignoring") newdata.remove(None) graph = chooseGraph(graph) graph.data.extend(regularizeData(newdata, color)) graph.data = FillInColors(graph.data) computeLimitsFromData(graph) graph...
<reponame>isaaclegred/universality """a module for custom (Gaussian) kernel density estimation (KDE) """ __author__ = "<NAME> (<EMAIL>)" #------------------------------------------------- import numpy as np from scipy.special import erf import multiprocessing as mp from universality import stats from universality.u...
# coding: utf-8 """ NEF_Emulator No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # ...
object in the workspace @id ws KBaseGenomeAnnotations.Assembly), parameter "quality" of type "Genome_quality_measure" (@optional frameshift_error_rate sequence_error_rate) -> structure: parameter "frameshift_error_rate" of Double, parameter "sequence_error_rate" of Double, parameter "close_genomes" of list of type...
import tensorflow as tf import numpy as np import time from copy import deepcopy from tensorflow.python.ops.parallel_for import gradients from tensorflow.contrib import rnn class ALPaCA: def __init__(self, config, sess, graph=None, preprocess=None, f_nom=None): self.config = deepcopy(config) self.lr = config['lr']...
CFUNCTYPE(GLboolean, GLuint) # GL/glext.h:3680 PFNGLBUFFERDATAPROC = CFUNCTYPE(None, GLenum, GLsizeiptr, POINTER(GLvoid), GLenum) # GL/glext.h:3681 PFNGLBUFFERSUBDATAPROC = CFUNCTYPE(None, GLenum, GLintptr, GLsizeiptr, POINTER(GLvoid)) # GL/glext.h:3682 PFNGLGETBUFFERSUBDATAPROC = CFUNCTYPE(None, GLenum, GLintptr, G...
import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils as nn_utils import torch.backends.cudnn as cudnn from torch.nn import SyncBatchNorm import torch.optim.lr_scheduler as lr_scheduler from torch.nn.parallel import DistributedDataParallel import utils f...
import inspect import collections from django.utils.html import html_safe,conditional_escape,mark_safe from django.core.exceptions import ValidationError from django.utils import six from django import forms from django.db import models from django.utils import safestring from . import widgets from . import fields i...
= \ scatter.get_xs(nuclides=nuclide, xs_type=xs_type, moment=moment, subdomains=subdomain) else: self._scatter_matrix[i] = \ scatter.get_xs(nuclides=nuclide, xs_type=xs_type, subdomains=subdomain) def set_multiplicity_matrix_mgxs(self, nuscatter, scatter=None, temperature=294., nuclide='total', xs_type='macro...
<gh_stars>1-10 """ Class description goes here. """ import logging import time import uuid import datetime from dataclay.communication.grpc.messages.common.common_messages_pb2 import LANG_PYTHON from dataclay.exceptions.exceptions import DataClayException from dataclay.commonruntime.DataClayRuntime import DataClayRunt...
= list(np.copy(x1)) resY = list(np.copy(y1)) # print('resX = {}, resY = {}'.format(resX, resY)) # print('x2 = {}, y2 = {}'.format(x2, y2)) for i in range(len(x2)): flag = False for j in range(len(resX)): if (floatEqual(x2[i], resX[j])): resY[j] += y2[i] flag = True if (not flag): resX.append(x2[i]) resY.a...