input
stringlengths
2.65k
237k
output
stringclasses
1 value
:ivar status: Status of the integration runtime node. Possible values include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', 'Initializing', 'InitializeFailed' :vartype status: str or ~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNodeStatus :ivar capabilities: The integration runtime ca...
# Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A factory test for the audio function. Description ----------- This test perform tests on audio plaback and recording devices. It supports 2 loopback ...
<reponame>lzanuz/django-watermark # -*- coding: utf-8 -*- import os import errno import hashlib import logging import pickle import traceback from PIL import Image from datetime import datetime try: from urllib.parse import unquote from urllib.request import url2pathname except ImportError: from urllib import unq...
<gh_stars>1-10 import os import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from sklearn.metrics import mean_absolute_error as MAE from datetime import datetime from fbprophet import Prophet from matplotlib.dates import ( MonthLocator, num2date, AutoDateLocator, AutoDateF...
# appearance flow params if_froze_pwc=False, app_occ_stop_gradient=True, app_loss_weight=0, app_distilation_weight=0, if_upsample_flow=False, if_upsample_flow_mask=False, if_upsample_flow_output=False, if_concat_multi_scale_feature=False, input_or_sp_input=1, ): super(PWCNet_unsup_irr_bi_v5_1, self).__init__...
= comment body['send_response'] = False if send_response is None else send_response return client.accept(user_id=user_id, event_id=event_id, event_id1=event_id1, body=body) def usersactions_user_calendar_view_exception_occurrence_cancel(client, user_id, event_id, event_id1, comment=None): body ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Author : 陈坤泽 # @Email : <EMAIL> # @Date : 2020/11/15 10:16 """ 几何、数学运算 specialist级别 """ import copy import numpy as np import cv2 from pyxllib.algo.intervals import Intervals ____base = """ """ def xywh2ltrb(p): return [p[0], p[1], p[0] + p[2], p[1] + p[3]] ...
number of data elements that were examined. returned: on success type: str sample: summary_example references: description: - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. returned: on success type: co...
import numpy as np HILL_KEY = [[21, 109, 119, 23, 88, 15, 116, 66], [22, 119, 70, 118, 111, 82, 121, 98], [79, 86, 2, 96, 90, 54, 95, 83], [22, 100, 113, 122, 92, 6, 52, 60], [1, 9, 9, 4, 112, 13, 26, 74], [3, 100, 92, 83, 51, 122, 102, 63], [71, 110, 92, 74, 26, 96, 92, 24], [30, 10, 85, 92, 47, 91, 114, 108]] HILL...
database, then add a webauthn credential to the test user, then get the state from the db and modify it as if the user had chosen extra security via the webauthn token, and finally send the necessary data to actually reset the password. :param data1: to control what email is sent to create the state and start the ...
[ { 'id': 'string', 'resourceName': 'string', 'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc', 'createdAt': datetime(2015, 1, 1), 'location': { 'availabilityZone': 'string', 'regionName': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-sout...
now contains the list of 'good' tilelocid #read in the big combined data file dz = Table.read(zf) #find the rows that satisfy the target type wtype = ((dz[desitarg] & bit) > 0) if notqso == 'notqso': print('removing QSO targets') wtype &= ((dz[desitarg] & qsobit) == 0) #find the rows that are 'good' tilelocid...
<filename>psychic/plots.py #encoding=utf-8 import matplotlib.pyplot as plt import numpy as np from .scalpplot import plot_scalp from .positions import POS_10_5 from .markers import markers_to_events import psychic import scipy import matplotlib import matplotlib.pyplot as plot import matplotlib.ticker as ticker from ma...
<gh_stars>1-10 """Bookmarks Converter, is a package that converts the webpage bookmarks from DB/HTML/JSON to DB/HTML/JSON. The DB files supported are custom (self made) sqlite database files, to see the exact format of the database you can check the .db file found in the data folder. The HTML files supported are Nets...
#!/usr/bin/env python # coding: utf-8 # # The Boundary Element Method (BEM) # # # You can run this code directly in your browser by clicking on the rocket logo ( <i class="fas fa-rocket"></i> ) at the top of the page, and clicking 'Binder'. This will open a Jupyter Notebook in a [Binder](https://mybinder.org/) envir...
unpause command (last try or retry) was successful (``True``) or not (``False`` meaning it had an error). Notes ----- The command sent to the drive is '!C'. See Also -------- pause : Pause the drive. """ return (not self.driver.command_error( self.driver.send_command('C', timeout=1.0, immediate=True, max...
reserved capacity. """ if reserved is None: self.reserved = zero_capacity() elif isinstance(reserved, int): assert reserved == 0 self.reserved = zero_capacity() elif isinstance(reserved, float): assert reserved == 0.0 self.reserved = zero_capacity() elif isinstance(reserved, list): assert len(reserved) == DI...
not apps: caller.msg("Application manager not found! Please inform the admins.") return char_ob = roster.get_character(char_name) if not char_ob: caller.msg("No such character on the roster.") return if char_ob.roster.roster.name != "Available": caller.msg("That character is not marked as available for applicat...
# -*- coding: utf-8 -*- """ Created on Wed Aug 4 2021, last edited 27 Oct 2021 Fiber flow emissions calculations module - class version Inputs: Excel file with old PPI market & emissions data ('FiberModelAll_Python_v3-yields.xlsx') Outputs: Dict of keys 'old','new','forest','trade' with emissions calcs (*testin...
auth_token self.product_instance_id = product_instance_id # 厂商名称 self.corp_name = corp_name # 数据模型id self.peripheral_data_model_id = peripheral_data_model_id # 外围设备ID self.peripheral_id = peripheral_id # 外围设备名称 self.peripheral_name = peripheral_name # 场景码 self.scene = scene # 设备类型编码,必填,对应资管平台中的设备类型 # # 枚...
<gh_stars>1-10 # Post processing tools for PyRFQ bunch data # <NAME> July 2019 import numpy as np from scipy import constants as const from scipy import stats import h5py import matplotlib.pyplot as plt from temp_particles import IonSpecies from dans_pymodules import FileDialog, ParticleDistribution from bunch_particl...
#! /usr/bin/python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # # FIXME: # # - command line method to discover installed capabiltiies; print # each's __doc__ # # - do not pass device--each function should gather it from target's # tags """ .. _pos_multiroot: Provisioning OS: pa...
str(tokens[pos]) pos += 1 (pos, rhs) = parse_assignment_expression(tokens, pos, ctx) if rhs: return (pos, BinaryOp(op, lhs, rhs)) pos = save_pos.pop() # conditional-expression (pos, expr) = parse_conditional_expression(tokens, pos, ctx) if expr: return (pos, expr) return (pos, None) def parse_expression(t...
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2009, <NAME>, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain...
<reponame>cogsys-tuebingen/uninas<gh_stars>10-100 from typing import Callable, Union import random import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from pymoo.util.nds.non_dominated_sorting import NonDominatedSorting from uninas.models.networks.abstract import AbstractNetwork from u...
<filename>geoscilabs/seismic/syntheticSeismogram.py import numpy as np import matplotlib.pyplot as plt import scipy.io from ipywidgets import interact, interactive, IntSlider, widget, FloatText, FloatSlider def getPlotLog(d, log, dmax=200): d = np.array(d, dtype=float) log = np.array(log, dtype=float) dplot = np....
save_dir self.save_RGBD_client.send_goal(goal) self.save_RGBD_client.wait_for_result() super_fast_speed = q = self.graspingParams["speed"]["super_fast"] self.moveHome(speed=super_fast_speed) def run_category_manipulation_pipeline(self): self._clear_cache() self.run_keypoint_detection() self.run_category_ma...
inputs = inputs[:, :max_length, :] # (num_layers * num_directions, batch, hidden_size): hs = [] for rnn in self.rnns: outputs, h1, h2 = rnn(inputs, mask=mask) h = tf.stack([h1, h2]) hs.append(h) inputs = outputs _, B, H = get_shape_as_list(h) h = tf.reshape(tf.stack(hs), [-1, B, H * 2]) return self.output_fn...
+ m.x835 >= -1) m.c2396 = Constraint(expr= - m.b16 - m.b375 + m.x836 >= -1) m.c2397 = Constraint(expr= - m.b16 - m.b376 + m.x837 >= -1) m.c2398 = Constraint(expr= - m.b16 - m.b377 + m.x838 >= -1) m.c2399 = Constraint(expr= - m.b16 - m.b378 + m.x839 >= -1) m.c2400 = Constraint(expr= - m.b16 - m.b379 + m.x840 >= -1)...
return {} # determine how many samples, starting from self._cursor, will fit into the requested minibatch size of num_samples begin = self._cursor end = self._cursor assert begin < self._num_samples actual_num_samples = { name: 0 for name in self._data.keys() } while end < self._num_samples: new_num_samples = {...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2021, kevin-dot-g-dot-stewart-at-gmail-dot-com # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Version: 1.0.1 #### Updates: #### 1.0.1 - added 9.0 support # - changed max version # - added "Client VLANs" traffic...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from model.layers import * from model.build import * import cv2 from model.utils import * def get_test_input(): img = cv2.imread("images/dog-cycle-car.png") img = cv2.resize(img, (416, 416)) # R...
0, 0, 0, 0], [1196, 101.213103, 0, 9999, -9999, 1.0, 100, 1, 160.697956, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1197, 62.33039, 0, 9999, -9999, 1.0, 100, 1, 90.592266, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1198, 5.408584, 0, 9999, -9999, 1.0, 100, 1, 39.819157, 0.0, 0, 0, 0, 0, 0,...
"loss became nan" status["training duration"] = formatDuration( time() - training_time_start) status["last epoch duration"] = formatDuration( time() - epoch_time_start) return status, run_id print() epoch_duration = time() - epoch_time_start print("Epoch {} ({}):".format(epoch + 1, formatDuration(epoch_d...
import errno import logging import os import uuid import biom import pandas as pd from Bio import SeqIO import shutil from installed_clients.DataFileUtilClient import DataFileUtil from GenericsAPI.Utils.AttributeUtils import AttributesUtil from GenericsAPI.Utils.SampleServiceUtil import SampleServiceUtil from Generics...
from collections import defaultdict from dataclasses import dataclass, replace from enum import Enum from functools import lru_cache from typing import ( AbstractSet, Any, Callable, Collection, Dict, List, Mapping, Optional, Pattern, Sequence, Set, Tuple, Type, TypeVar, overload, ) from apischema.aliase...
plugins) # 71 templateParams = TemplateParams( "Oncomine Myeloid Research Fusions for S5", S5, "AMPS_RNA" ) templateParams.update( { "applicationGroup": "DNA + RNA", "barcodeKitName": BARCODE_KIT_NAME, "categories": CATEGORIES_RNA_FUSIONS, "chipType": CHIP_NAME, "flows": FLOWS, "libraryKitName": LIB_KIT_NA...
or 'stopped'. The method assumes there is a database connection active. """ self.connect_db() sql_get = """ SELECT t_source FROM sch_chameleon.t_sources WHERE enm_status NOT IN ('ready','stopped') ; """ self.pgsql_cur.execute(sql_get) source_get = self.pgsql_cur.fetchall() self...
<reponame>UCLA-VAST/soda import functools import logging import operator from typing import List, TextIO import soda.tensor from haoda import ir, util from soda import core, grammar from soda import util as soda_util logger = logging.getLogger().getChild(__name__) STENCIL_DIM_FMT = util.MetaFmt('kStencilDim%s') TYPE...
fraction of vertical tail span where horizontal tail is mounted = 0. for body mounted (Default for transports with all engines on the wing and for fighters) = 1. for T tail (Default for transports with multiple engines on the fuselage)') nvert = Int(1, desc='Number of vertical tails') svt = Float(0.0, units='ft*ft', ...
see `Diagnostic Settings REST API <https://go.microsoft.com/fwlink/?linkid=2033207>`_ or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. :type is_azure_monitor_target_enabled: bool :param queue_delay_ms: Specifies the amount of time in milliseconds that can elapse before audit ...
should be most_matches = [] for row_index in range(num_header_merged_rows+1): matches = re.findall("[-.a-zA-Z0-9]+ ?[-.a-zA-Z0-9]* ?[-.a-zA-Z0-9]*", grid[row_index]) if len(matches) > len(most_matches): most_matches = matches # if there are too many headers, it should be fixed # NOTE: this only works for non-m...
See the tutorial for a worked example. The HDF5 library allows for the application of "filters" when writing data, which can provide moderate to significant levels of compression for the datasets in question. Testing has shown that for some typical cases of UVData objects (empty/sparse flag_array objects, and/or u...
file emsgs += '\n' + text['09-001-00021'].format(drsfile) # loop around keys in this drs_file for key in header_error: # get this iterations entry entry = header_error[key] # get the argname argname = entry[1] # construct error message eargs = [key, entry[3], entry[2]] if not entry[0]: emsgs += '\n' + text['...
# -*- coding:utf-8 -*- """ /*************************************************************************** Plugin Installer module ------------------- Date : May 2013 Copyright : (C) 2013 by <NAME> Email : info <EMAIL> This module is based on former plugin_installer plugin: Copyright (C) 2007-2008 <NAME> Copyrigh...
Argument. :type y: float32 :rtype: float32 """ def fadd_rn(x, y): """ See https://docs.nvidia.com/cuda/libdevice-users-guide/__nv_fadd_rn.html :param x: Argument. :type x: float32 :param y: Argument. :type y: float32 :rtype: float32 """ def fadd_ru(x, y): """ See https://docs.nvidia.com/cuda/libdevice-u...
default_pictures_path + default_profile_picture member = db.get_membership(current_user) if request.method == "GET": return render_template("group_settings.html", group_id=group.ID, user_id=current_user.ID, username=current_user.Login, img_src=profile_pic, **member, admin=admin, owner=owner, form=request.form) ...
<reponame>IngenuityEngine/ftrack-connect-foundry from FnAssetAPI.specifications import ShotSpecification, ImageSpecification from FnAssetAPI.ui.toolkit import QtCore, QtGui from PublishShotClipsSummaryWidget import PublishShotClipsSummaryWidget import FnAssetAPI.logging from .. import utils as cmdUtils class Publish...
# coding=utf-8 # coding=utf-8 # Copyright 2018 The Google AI Language Team 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 r...
#!/usr/bin/env python import os constants = { # physical units "kBoltz" : 1.38064852e-23, # Boltzmann constant, J/K "rho" : 1000., # water density, kg/m^3 "Ndumps" : 250, # dumber of dumps # numerical approximations "Cdt" : 0.25, # time step constraint coefficient: sonic and acceleration terms "Cdt_visc" : 0....
<reponame>MattFellows/cassandra-medusa # -*- coding: utf-8 -*- # Copyright 2020- Datastax, Inc. All rights reserved. # Copyright 2020 Spotify Inc. All rights reserved. # Copyright 2019 Spotify AB. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except...
<reponame>fox2mike/FlightDeck """ Views for the Jetpack application """ import commonware.log import os import shutil import codecs import tempfile import urllib2 from django.contrib import messages from django.core.urlresolvers import reverse from django.views.static import serve from django.shortcuts import get_obje...
self.gold = _get_annotations(self.tarsqidoc_gold.tags) self.system = _get_annotations(self.tarsqidoc_system.tags) self.events = EntityStatistics(self, EVENT, display_dir, display_choices) self.timexes = EntityStatistics(self, TIMEX, display_dir, display_choices) self.alinks = LinkStatistics(self.filename, ALINK, se...
to system transactions.", ) enable_team_auditing: Optional[bool] = Field( default=True, concourse_env_var="CONCOURSE_ENABLE_TEAM_AUDITING", description="Enable auditing for all api requests connected to teams.", ) enable_volume_auditing: Optional[bool] = Field( default=True, concourse_env_var="CONCOURSE_ENABLE...
elif api_version == '2018-08-01': from ..v2018_08_01.aio.operations_async import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2018-10-01': from ..v2018_10_01.aio.operations_async import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2018-11-01': from ...
"styles": [ # Examples of styles which are linear combinations of the available spectral bands. # { "name": "ramp", "title": "B3/B2 ", "abstract": "", "index_function": lambda data: data["Band_1"], "needed_bands": ["Band_1"], "color_ramp": [ { "value": 0.0, "color": "#8F3F20", "alpha": 0.0, "legend": { "...
""" Prime Developer Trial No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from multiprocessing.pool impo...
\ convInit=Layer.XavierInit, convPadding='SAME', \ bias=True, biasInit=Layer.ConstInit(0.0), \ #bn=True, step=network._step, ifTest=network._ifTest, epsilon=1e-8, \ # pool=True, poolSize=[2, 2], poolStride=[2, 2], poolType=Layer.MaxPool, poolPadding='SAME', \ activation=Layer.ReLU, \ name='Conv1a', dtype=tf.float...
# !/usr/bin/env python # -*- coding: utf-8 -*- """Dataverse data-types data model.""" from __future__ import absolute_import from pyDataverse.utils import dict_to_json from pyDataverse.utils import read_file_json from pyDataverse.utils import write_file_json """ Data-structure to work with data and metadata of Datave...
""" @package PyCUB Created by <NAME> Date : 21 FEV 2018 University of Kent, ECE paris jkobject.com PyCUB is a Project which goal is to understand the particular dynamics of the codon usage bias. you can find more about pycub here ../README.md if you find you need to add anything please contact me @jkobject or direc...
r in routine: system.__dict__[routine_cli[r.lower()]].run(**kwargs) else: logger.error("System is not set up. Routines cannot continue.") # Disable profiler and output results if profile: pr.disable() if system.files.no_output: nlines = 40 s = io.StringIO() ps = pstats.Stats(pr, stream=sys.stdout).sort_stat...
<gh_stars>1-10 """Soil water movement and content module. Model one-dimensional soil water movement (fluxes). Includes groundwater (assumes constant water table depth). @author <NAME> """ from collections import namedtuple import json import math # Soil water characteristics. # sat: saturation point # fc: field c...
'''create files contains estimated generalization errors for model INPUT FILE WORKING/transactions-subset2.pickle OUTPUT FILES WORKING/ege_week/YYYY-MM-DD/MODEL-TD/HP-FOLD.pickle dict all_results WORKING/ege_month/YYYY-MM-DD/MODEL-TD/HP-FOLD.pickle dict all_results ''' import collections import cPickle as pickle ...
== 2: kernel = gaussian(array.shape[1], reso) kernel /= np.sum(kernel) for i in range(array.shape[0]): array[i] = fftconvolve(array[i], kernel, mode='same') elif array.ndim == 1: kernel = gaussian(array.size, reso) kernel /= np.sum(kernel) array = fftconvolve(array, kernel, mode='same') else: my_logger.error(...
from __future__ import absolute_import from __future__ import print_function import math import functools from collections import OrderedDict import veriloggen.core.vtypes as vtypes import veriloggen.types.axi as axi from veriloggen.fsm.fsm import FSM from veriloggen.optimizer import try_optimize as optimize from .t...
<reponame>MrMao/allennlp from typing import List, Dict, Tuple, Set, Callable from copy import copy import numpy from nltk import ngrams from parsimonious.grammar import Grammar from parsimonious.expressions import Expression, OneOf, Sequence, Literal from allennlp.semparse.contexts.atis_tables import * # pylint: disa...
import sys, subprocess, os, re, time, getopt, shlex import lldb from functools import wraps from ctypes import c_ulonglong as uint64_t from ctypes import c_void_p as voidptr_t import code import core from core import caching from core.standard import * from core.configuration import * from core.kernelcore import * from...
self.filters.w K0, kernel_depth, kernel_h, kernel_w = self.filters.shape n, K1, out_nm_h, out_nm_w = top_grad.shape # Partial derivatives of filters: # A naive explanation: # for i in range(K1): # f = top_grad[:,i] # # convolute with inp: # # (n, oh, ow) conv (n, kd*kh*kw, oh, ow) => (K, kd, kh, kw): # for kw...
<reponame>mitchellmaler/pulumi-rancher2<gh_stars>0 # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import U...
%s was not entered correctly. Possible'\ +'material types include "iso", "trans_iso", or "ortho." In'\ +'addition, mat_constants must then be of length 3,6, or 10'\ +'respectively. Refer to documentation for more clarification.') # Store material constants such that: self.E1 = saved_mat_const[0] self.E2 = saved_m...
theta: m_tau1 m_tau2 c_tau m_delta1 m_delta2 c_delta :param lam: wavelength in angstrom :param flux_i: intrinsic flux of sed (units don't matter) :param logmstar: log M* of galaxies :param logsfr: log SFR of galaxies :param nebular: if True nebular flux has an attenuation that is scaled from the cont...
# -*- coding: utf-8 -*- from __future__ import print_function import logging import os import posixpath import xml.etree.ElementTree as ET import defcon from mutatorMath.objects.error import MutatorError from mutatorMath.objects.location import Location from mutatorMath.objects.mutator import Mutator from mutatorMath...
my favorite recipe.' assert len(r1.slugs) == len(r2.slugs) == 1 assert r1.slugs[0] != r2.slugs[0] assert r1.slugs[0].slug == r2.slugs[ 0].slug == 'rocky-mountain-river-ipa' def test_copy_multiple_slugs(self): r = model.Recipe( type='MASH', name='Rocky Mountain River IPA', gallons=5, boil_minutes=60, notes=...
<reponame>mike-sino/ns2.35-with-docker #!/usr/bin/python """This module contains objects that help generate wireless networks to be fed into ns2. It supports generating random topologies, shortest path routing via Dijkstra's algorithm and outputting the network data in ns2 format.""" import sys import math import ran...
#!/usr/bin/env python # coding: utf-8 import scipy import h5py from astropy.io import fits from astropy.coordinates import SkyCoord from astropy.coordinates import FK5 import astropy.units as u import healpy as hp import numpy as np from numpy import sin,cos,pi from scipy.integrate import quad import matplotlib.pyplo...
<reponame>mahyar-osn/mapclientplugins.lungmodelstep<filename>mapclientplugins/lungmodelstep/model/meshmodel.py import os, platform, time from scaffoldmaker.utils.zinc_utils import * from opencmiss.zinc.graphics import Graphics from opencmiss.zinc.field import Field from opencmiss.utils.maths import vectorops from ope...
axis ) except : logger.warning ( "Can't set attribute %s" % key ) key = 'LabelSize_%s' % axis try : if key in config : style.SetLabelSize ( float ( config [ key ] ) , axis ) except : logger.warning ( "Can't set attribute %s" % key ) key = 'TitleColor_%s' % axis try : if key in config : style.SetTitl...
<reponame>lerrytang/GymOthelloEnv """Othello environments for reinforcement learning.""" import gym from gym import spaces from gym.envs.classic_control import rendering import pyglet from pyglet import gl import numpy as np BLACK_DISK = -1 NO_DISK = 0 WHITE_DISK = 1 IMAGE_SIZE = 96 MAX_INT = (1 << 31) WINDOW_H = 4...
<reponame>kvmanohar22/gtsam<gh_stars>1000+ """Define the :class:`~geographiclib.geodesic.Geodesic` class The ellipsoid parameters are defined by the constructor. The direct and inverse geodesic problems are solved by * :meth:`~geographiclib.geodesic.Geodesic.Inverse` Solve the inverse geodesic problem * :meth:`~ge...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os import sys import logging import git import tempfile import requests import contextlib import re from .actions.check_for_spdx_license import check_for_spdx_license from .actions.check_for_download_hash import check_for_download_hash from .actions....
# # 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 License, Version 2.0 (the # "License"); you may not u...
= [MD5, SHA1] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @...
catalog path = A.link(B) ``` To link tables with more than one foreign key reference between them, use explicit `on` clause. ``` # let A.c1 be a column that is a simple foreign key to B.c1 that is a simple key in B path = A.link(B, on=(A.c1 == B.c1)) ``` To link tables with foreign keys on composite keys, us...
self._VertexCounter += 40 def _opVertexColNorm(self): # Opcode 69 newObject = dict() newObject['Datatype'] = "VertexColourWithNormal" newObject['ColourNameIdx'] = self._readUShort() newObject['Flags'] = self._readUShort() newObject['Coordinate'] = np.zeros((1, 3)) # For x, y and z for colIdx in range(3): ...
if not IsSourceFile(filename_cc): return (False, '') fileinfo_h = FileInfo(filename_h) if not IsHeaderFile(filename_h): return (False, '') filename_cc = filename_cc[:-(len(fileinfo_cc.Extension()))] filename_cc = filename_cc.replace('/public/', '/') filename_cc = filename_cc.replace('/internal/', '/') filen...
filter2_4_2_vale = ndarray.array(np.random.normal(0, 0.5, (192, 160, 1, 7)), executor_ctx) filter2_4_3_val = ndarray.array(np.random.normal(0, 0.5, (192, 768, 1, 1)), executor_ctx) # branch_0 incep2_4_0 = self.conv2dplusrelu(concat2_3, filter2_4_0, "NCHW", "SAME", 1, 1) # branch 1 incep2_4_1a = self.conv2dplusrel...
<reponame>omelnikov/nbgrader import os import glob import re import shutil import sqlalchemy import traceback import importlib from rapidfuzz import fuzz from traitlets.config import LoggingConfigurable, Config from traitlets import Bool, List, Dict, Integer, Instance, Type, Any from traitlets import default, validate...
<filename>aha/workflows/episodic_few_shot_workflow.py # Copyright (C) 2019 Project AGI # # 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 # # Unles...
<reponame>ACea15/pyNastran from __future__ import annotations from typing import Union, Callable import numpy as np import h5py from .h5_utils import get_tree, passer from pyNastran.bdf.bdf import BDF GeomCallable = Callable[[h5py._hl.dataset.Dataset, BDF], # inputs None] # output def read_grid(name: str, group: h5p...
<reponame>abdurakhimov/zhinst-toolkit<gh_stars>0 # Copyright (C) 2020 Zurich Instruments # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. import textwrap import attr import numpy as np from pathlib import Path import deprecation from .sequence_c...
= '' contig_info[contig_id]['molecule_type'] = 'chromosome' contig_info[contig_id]['mash_nearest_neighbor'] = '' contig_info[contig_id]['mash_neighbor_distance'] = '' contig_info[contig_id]['mash_neighbor_identification'] = '' return contig_info def get_reconstructed_cluster_dists(mash_db, mash_distance, cluste...
'0') self.assertEqual(demjson.encode(12345), '12345') self.assertEqual(demjson.encode(-12345), '-12345') # Floating point numbers must be "approximately" compared to # allow for slight changes due to rounding errors in the # least significant digits. self.assertMatchesRegex(demjson.encode(1.5), r'1.(' \ r'(5(00...
inside the environment. node_config (google.cloud.orchestration.airflow.service_v1beta1.types.NodeConfig): The configuration used for the Kubernetes Engine cluster. private_environment_config (google.cloud.orchestration.airflow.service_v1beta1.types.PrivateEnvironmentConfig): The configuration used for the Private...
<filename>Appointment/utils/utils.py # store some funcitons import requests as requests import json from Appointment import * import threading from Appointment.models import Participant, Room, Appoint, CardCheckInfo # 数据库模型 from django.contrib.auth.models import User from django.db import transaction # 原子化更改数据库 from d...
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 17 23:12:05 2021 @author: mlampert """ #Core imports import os import copy #Importing and setting up the FLAP environment import flap import flap_nstx flap_nstx.register() thisdir = os.path.dirname(os.path.realpath(__file__)) fn = os.p...
import math from numpy import imag from numpy import real from numpy import roots class motion: """ Класс профиля движения с ограничением рывка """ def __init__(self): pass def compute(self, p0, pf, v0, vf, V, A, D, J, t0=0.0): """ Вычисление траектории по указанным параметрам p0 - начальное положение; p...
(overlay_set_size, reg0, pos1), (str_clear, s0), (create_text_overlay, "$g_presentation_obj_show_players_1", s0, tf_scrollable_style_2), (position_set_x, pos1, 285), (position_set_y, pos1, 125), (overlay_set_position, "$g_presentation_obj_show_players_1", pos1), (position_set_x, pos1, 405), (position_se...
<reponame>gaxler/triton import ast import builtins import functools import inspect import struct import sys import textwrap import hashlib import os import pickle import subprocess import os from .tools.disasm import extract import torch import triton import triton._C.libtriton.triton as _triton from filelock import Fi...
self.detect(0, conf_preds, decoded_boxes, mask_data, use_fastnms=False) scores = box_pred[:, 1] boxes = box_pred[:, 2:6] classes = box_pred[:, 0] masks = fluid.layers.gather(masks, index) masks = fluid.layers.matmul(proto_data[0], masks, transpose_x=False, transpose_y=True) masks = fluid.layers.sigmoid(masks) m...
import logging from inflection import underscore from collections import OrderedDict as _o import gilda from indra.sources import trips from indra.ontology.standardize import \ standardize_agent_name from indra.statements.statements import * from indra.assemblers.english.assembler import _assemble_agent_str, \ Englis...