text
string
label_name
string
labels
int64
24(0x01C3, 0x3C) Sleep(100) OP_24(0x0079, 0x28) OP_24(0x01C3, 0x46) Sleep(100) OP_24(0x0079, 0x32) OP_24(0x01C3, 0x50) Sleep(100) OP_24(0x0079, 0x3C) OP_24(0x01C3, 0x5A) Sleep(100) OP_24(0x0079, 0x46) OP_24(0x01C3, 0x64) OP_0D() Sleep(500) ChrTalk( ...
Python
1
ffi::gpointer); } ptr::NonNull::dangling() } else { ptr::NonNull::new_unchecked(ptr) }, len, transfer: ContainerTransfer::Full, } } /// Borrows this slice as a `&[T]`. pub fn as_slice(&self) -> &[T] { ...
Rust
0
T } }; fn derive(ex: Execution) { ex.make_trait_impl(RUNTIME::generic::Generic, ex.target_type(), |block| { block.make_function(RUNTIME::generic::Generic::generic, |make_function| { make_function.unit() }); }); } let expected = quote! { ...
Rust
0
ree: u64, pub sb_fdblocks: u64, pub sb_frextents: u64, pub sb_uquotino: XfsIno, pub sb_gquotino: XfsIno, pub sb_qflags: u16, pub sb_flags: u8, pub sb_shared_vn: u8, pub sb_inoalignmt: XfsExtlen, pub sb_unit: u32, pub sb_width: u32, pub sb_dirblklog: u8, pub sb_logsectlog:...
Rust
0
variant as u8 != 0 } } #[doc = "Field `ADC0_ALRDY_HOLD_IRQ_EN` reader - ADC0 Already Hold Key Interrupt Enable"] pub type ADC0_ALRDY_HOLD_IRQ_EN_R = crate::BitReader<ADC0_ALRDY_HOLD_IRQ_EN_A>; impl ADC0_ALRDY_HOLD_IRQ_EN_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn varia...
Rust
0
sin(); (x, y) }) .collect::<Vec<_>>(); let point_cloud = PointCloud2::from_points("hamilton_cloud", scan_points) .with_color(Color::Red) .with_parent_frame_id("Robot") ...
Rust
0
import numpy as np import gymnasium from core.isn import InferenceServiceNet from core.request import IsnRequest from morl_baselines.multi_policy.envelope.envelope import Envelope from gymnasium.envs.registration import register from morl_baselines.common.weights import equally_spaced_weights import json # 注册环境...
Python
1
from distvae.modules.patch_utils import Patchify, DePatchify from distvae.modules.adapters.layers.norm_adapters import GroupNormAdapter from torch.nn import GroupNorm from distvae.utils import DistributedEnv import torch import random import argparse import torch.distributed as dist from torch import nn from torch.cud...
Python
1
, encoder: &mut Encoder<'_, '_>, offset: usize, recursion_depth: usize, ) -> Result<()> { (&mut **self).encode(encoder, offset, recursion_depth) } } #[cfg(test)] mod test { // Silence dead code errors from unused functions produced by macros like // `fidl_bits!`, `fidl_u...
Rust
0
from Py4GWCoreLib.enums import outpost_name_to_id, explorable_name_to_id # 1) IDs _4_sunspearsanctuary_to_jahaibluffs_ids = { "outpost_id": 387, } # 2) Outpost exit path _4_sunspearsanctuary_to_jahaibluffs_outpost_path = [ (-985, 263), (-950, 1298), (-839, 2328), (-641, 3346), (-534, 3703), ...
Python
1
oop that reads in events, processes them, and then waits for the next event. To provide an //! analogy, consider the following Rust program: //! //! ```no_run //! use std::{error::Error, io::{prelude::*, stdin, stdout}}; //! //! fn main() -> Result<(), Box<dyn Error>> { //! // hold a lock on Stdin and Stdout for co...
Rust
0
class_dump["name"].rstrip("`" + str(len(generics_type_names))) else: return class_dump["name"] def _type_name(self, type_name: str) -> str: if self.config.use_type_keywords: type_name = TypeNameCleaner.replace_known_types( type_name, self.BUILTIN_TYPE_TO_KEY...
Python
1
result = format!( "{}ns - {} ({}({}))", total_duration, parent_span.code_line.function_name, parent_span.code_line.file_name, parent_span.code_line.line ); for (child_span_index, child_total_duration) in sorted_spans.iter().rev() { ...
Rust
0
ime as election_multi_phase::Config>::Solution as sp_npos_elections::NposSolution >::LIMIT as u32; } /// The numbers configured here could always be more than the the maximum limits of staking pallet /// to ensure election snapshot will not run out of memory. For now, we set them to smaller values /// since the s...
Rust
0
let input = "a\rb\nc\r\nd嗨"; assert_eq!(unsafe { new(input, 0) }.line_of(), "a\rb"); assert_eq!(unsafe { new(input, 1) }.line_of(), "a\rb"); assert_eq!(unsafe { new(input, 2) }.line_of(), "a\rb"); assert_eq!(unsafe { new(input, 3) }.line_of(), "a\rb"); assert_eq!(unsafe { new(in...
Rust
0
let socket_path: String = Path::new(DEVICE_PLUGIN_PATH) .join(device_endpoint.clone()) .to_str() .unwrap() .to_string(); let (list_and_watch_message_sender, _) = broadcast::channel(LIST_AND_WATCH_MESSAGE_CHANNEL_CAPACITY); let (server_...
Rust
0
back.pop('results')) for key, value in traceback.items(): if isinstance(value, dict): results[key].update(value) continue for field in ('errors', 'warnings'): if field not in traceback: continue content = traceba...
Python
1
, None); } #[test] fn test_time_from_hms_micro() { assert_eq!( NaiveTime::from_hms_micro_opt(3, 5, 7, 0), Some(NaiveTime::from_hms_nano(3, 5, 7, 0)) ); assert_eq!( NaiveTime::from_hms_micro_opt(3, 5, 7, 333), Some(NaiveTime::from_hms_n...
Rust
0
, nn.utils.spectral_norm(nn.Conv2d(3, 16, kernel_size=(4, 4), stride=(2, 2))), nn.LeakyReLU(negative_slope=0.2, inplace=True), nn.ReflectionPad2d((1, 1, 1, 1)), nn.utils.spectral_norm(nn.Conv2d(16, 32, kernel_size=(4, 4), stride=(2, 2))), ...
Python
1
named, "custom_name"); ponf.wait_expect(Duration::from_millis(1000), "Ponger failed to register!"); poaf.wait_expect(Duration::from_millis(1000), "Ponger failed to register!"); remote_b.start(&ponger_named); // We give the connection plenty of time to re-establish and transfer it's old queue thread...
Rust
0
ify request object. It is also possible to /// to store extra attributes on request by using `Extensions` container, /// Extensions container available via `HttpRequest::extensions()` method. pub trait Filter { /// Check if request matches predicate fn check(&self, request: &HttpRequest) -> bool; } /// Return ...
Rust
0
flush_cache(user): if user.is_authenticated(): cache_key = 'nav_counts:%s' % (user.id) cache.delete(cache_key) class TimerThing: def __init__(self, name): self.times = [] self.add_time(name) def add_time(self, name): self.times.append([time.time(), name]) def...
Python
1
SPEC>) -> Self { R(reader) } } #[doc = "Field `SETUP` reader - Length of the Setup phase for this operation"] pub struct SETUP_R(crate::FieldReader<u8, u8>); impl SETUP_R { pub(crate) fn new(bits: u8) -> Self { SETUP_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for SETUP_R { ...
Rust
0
not in decoded or decoded_full[unicode_offset + decoded.index(replacement_char)] == replacement_char ): words.append(decoded) word_tokens.append(current_tokens) current_tokens = [] unicode_offset += len(decoded) ...
Python
1
def test_epoch_loop_recovery(tmpdir): from speechbrain.utils.checkpoints import Checkpointer from speechbrain.utils.epoch_loop import EpochCounter epoch_counter = EpochCounter(2) recoverer = Checkpointer(tmpdir, {"epoch": epoch_counter}) for epoch in epoch_counter: assert epoch == 1 ...
Python
1
"""helper functions for option testing.""" import os import tempfile from Bcfg2.Compat import wraps, ConfigParser from Bcfg2.Options import Parser, PathOption from testsuite.common import Bcfg2TestCase class make_config(object): # pylint: disable=invalid-name """decorator to create a temporary config file from...
Python
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 清理重复推文数据脚本 """ import json import os from datetime import datetime def clean_duplicate_tweets(file_path): """ 清理指定文件中的重复推文 :param file_path: JSON文件路径 :return: 清理的重复数量 """ if not os.path.exists(file_path): print(f"文件不存在: {file_path...
Python
1
it compiles without crashing. fn main() { let stack_struct = Struct { a:0, b: 1.0 }; let reference: &Trait = &stack_struct as &Trait; let unique: Box<Trait> = Box::new(Struct { a:2, b: 3.0 }) as Box<Trait>; } //! /// Internal impl crate::Repository { #[inline] pub(crate) fn free_buf(&self) -> Vec<...
Rust
0
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter class PaperCollectPipeline: def process_...
Python
1
let poly = Polynomial::readFromFile(&"data/test.txt".to_string()).unwrap(); let answer = Polynomial::readFromFile(&"data/test_answers.txt".to_string()).unwrap(); let (attempt, count) = poly.evaluateAtFFT(); compare_within_tolerance(&attempt, &answer); assert_eq!(count, 4); } #[test] fn test_check_204...
Rust
0
import logging import os import sys PROJECT_ROOT = os.path.abspath(os.path.split(os.path.split(__file__)[0])[0]) logging.disable(logging.CRITICAL) ROOT_URLCONF = 'urls' STATIC_URL = '/static/' STATIC_ROOT = f'{PROJECT_ROOT}/staticserve' STATICFILES_DIRS = ( ('global', f'{PROJECT_ROOT}/static'), ) UPLOADS_DIR_NA...
Python
1
anner.line() } pub fn column(&self) -> usize { self.scanner.column() } /* ** Return the id of the next token in input. */ fn get_token(&mut self, i: usize) -> Result<TokenType, Error> { let mut t = if let Some((token_type, _)) = self.lookahead.get(i) { *token_t...
Rust
0
class MovingExecutors(object): def __init__(self): # executor -> node self.moving_executors = {} # node -> set(executors) self.node_track = {} def __contains__(self, executor): return executor in self.moving_executors def __getitem__(self, executor): re...
Python
1
#!/usr/bin/env python3 import requests, optparse def get_options(): parser = optparse.OptionParser() parser.add_option("-d", "--domain", dest="domain", help="Specify a domain which you wish to discover subdomains on.") parser.add_option("-w", "--wordlist", dest="wordlist", help="Specify a wordlist path....
Python
1
= unsafe { CStr::from_ptr(gst_rtsp_server_sys::GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE) .to_str() .unwrap() }; pub static ref RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: &'static str = unsafe { CStr::from_ptr(gst_rtsp_server_sys::GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS) ...
Rust
0
full copyright and license information, please view the LICENSE file // that was distributed with this source code. // // spell-checker:ignore (ToDO) adFfmprt, kmerge #[macro_use] extern crate quick_error; use chrono::offset::Local; use chrono::DateTime; use clap::{App, AppSettings}; use getopts::Matches; use getopt...
Rust
0
th: The width of the image after preprocessing. is_training: `True` if we're preprocessing the image for training and `False` otherwise. resize_side_min: The lower bound for the smallest side of the image for aspect-preserving resizing. If `is_training` is `False`, then this value is...
Python
1
""" Copyright(C) 2024 Wojciech Graj This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope th...
Python
1
s[n-1], nums[0], nums[1], ..., nums[k-1]] (0-indexed). For example, [0,1,2,4,5,6,7] might be rotated at pivot index 3 and become [4,5,6,7,0,1,2]. * Given the array nums after the rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums. * * Example 1: * Input: nums =...
Rust
0
stop 0x01e1, 0x0551, // end of sqrt.f64x2 (I64) // 0007e4: x86_fmax.f64x2 (I64) // --> [DynRexMp2fa#55f] and stop 0x01d1, 0x055f, // end of x86_fmax.f64x2 (I64) // 0007e6: x86_fmin.f64x2 (I64) // --> [DynRexMp2fa#55d] and stop 0x01d1, 0x055d, // end of x86_fmin.f64x2 (I64) /...
Rust
0
crate::core::core::hash::Hashed; use crate::core::core::verifier_cache::VerifierCache; use crate::core::core::Committed; use crate::core::core::{Block, BlockHeader, BlockSums}; use crate::core::pow; use crate::error::{Error, ErrorKind}; use crate::store; use crate::txhashset; use crate::types::{Options, Tip}; use crat...
Rust
0
.new_issue(node, 'Remove node from feature view exceptions') num_feature_view_links = len(feature_view_links) if num_feature_view_links > 1: yield cls.new_issue( node, f'More than 1 example {RELATED} FeatureView link: ' + f'{num_feature_view_links}') ...
Python
1
, is_write }; for transaction_use in allocations { vertices .entry(transaction_use.shared_object) .or_insert(Default::default()) .insert(transaction.clone()); tx_to_objects .entry(transaction.clon...
Rust
0
import shutil import subprocess import sys import os def download_file(url: str, to_path: str): try: from pySmartDL import SmartDL except ImportError: subprocess.check_call([sys.executable, "-m", "pip", "install", "pySmartDL"]) from pySmartDL import SmartDL file_obj = SmartDL(url,...
Python
1
window.geometry("300x400") window.resizable(False, False) window["bg"] = "green" style = ttk.Style() ttk.Style().theme_use("classic") style.configure("TButton", font=("Comic Sans MS pixel rus eng", 20)) def open_second_window(): play_sound2() second_window = Toplevel(root) ...
Python
1
let mut object = $crate::model::Object::new(); object_internal!(@object object () ($($tt)+) ($($tt)+)); object } }; ($other:ident) => { $other }; // Any Serialize type: numbers, strings, struct literals, variables etc. // Must be below every othe...
Rust
0
n:<br> <textarea name="question" rows="4" cols="50">{{ question }}</textarea><br> Start Date: <input type="date" name="start_date"> Start Time: <input type="time" name="start_time"><br> End Date: <input type="date" name="end_date"> End Time: <input type="time"...
Python
1
['description'], style='GameDescription.TLabel', wraplength=200) desc.pack(pady=(5, 15)) # Play button play_btn = ttk.Button(card, text="Play Now", style='Modern.TButton', command...
Python
1
in range(n): # 找出当前节点的邻居 neighbors = set() for edge in edges: if edge[0] == node: neighbors.add(edge[1]) elif edge[1] == node: neighbors.add(edge[0]) # 计算邻居之间的边数 if len(neighbors) < 2: clustering_coeffs.append(...
Python
1
str. :param combination: combination of LibraryConfig objects associated with the GenerationConfig. Only support 1, 2 or 3. :return: an object of GenerationConfig """ if combination == 1: libraries = [library_1] elif combination == 2: libraries =...
Python
1
child stderr let child_errs = child_stderr.try_iter().collect::<Result<Vec<_>, std::io::Error>>()?; if !child_errs.is_empty() { // gracefully fail if there were lines in child stderr return Err(Box::new(ChildError::Stderr(child_errs))); } // collect chil...
Rust
0
n branch_total(&self) -> usize { self.file_coverages .iter() .fold(0, |sum, a| sum + a.branch_total()) } } pub trait CoverageReader { /// fetch the coverage information from the reader fn read<R: BufRead>(&self, reader: &mut R) -> Result<PackageCoverage, Error>; /// fet...
Rust
0
val_interval = max(n_images // args.n_eval, 1) avg_psnr = 0.0 avg_ssim = 0.0 avg_lpips = 0.0 n_images_gen = 0 frames = [] # if args.near_clip >= 0.0: grid.opt.near_clip = 0.0 #args.near_clip if args.width is None: args.width = dset.get_image_size(0)[1] if args.height is None...
Python
1
assert_eq; use std::io::prelude::*; use std::path::PathBuf; use tremor_common::{file, ids::OperatorIdGen}; use tremor_pipeline::query::Query; use tremor_pipeline::ExecutableGraph; use tremor_pipeline::FN_REGISTRY; use tremor_pipeline::{Event, EventId}; use tremor_pipeline::errors::{Error as PipelineError, ErrorKind a...
Rust
0
f let Some(created_by) = opts.created_by { props = props.set_created_by(created_by); } if let Some(size) = opts.max_statistics_size { props = props.set_max_statistics_size(size); } let mut writer = ArrowWriter::try_new(output, reader.schema(), Some(props.build()))?; for batch in r...
Rust
0
(&parent_inode), Error::<T>::IncorrectParentInode); // Check permissions for parent inode ensure!(Inodes::<T>::get(&parent_inode).check_permissions(&who), Error::<T>::NotEnoughPermissions); let parent_dir = Directories::<T>::get(&parent_inode...
Rust
0
#!/usr/bin/python3 import os import sys import subprocess import random # Get the parameters as command line arguments configuration_id = sys.argv[1] instance_id = sys.argv[2] seed = sys.argv[3] instance = ' '.join(sys.argv[4:7]) conf_params = ' '.join(sys.argv[7:]) # Create execution command fixed_params = '--max_it...
Python
1
li> <li> {"コンピュータビジョン"} <ul> <li>{"詳細画像識別"}</li> <li>{"不均衡データ"}</li> </ul> </li> <li> {"グラフコンボリューション"} </li> </ul> {...
Rust
0
config_check(pipeline_config_path) with open(pipeline_config_path, "r") as file: pipeline_config = yaml.safe_load(file) pipeline = pipeline_config["pipeline"] pipeline_name = pipeline["name"] modules = pipeline["modules"] if len(modules) > MAX_MODULES: ...
Python
1
): # For each exon (in that gene): #print len(gdict[gene][exon]) #print "i = "+str(i)+" len(gdict[gene][exon])"+ str(len(gdict[gene][exon])) sample_temp.append(gdict[gene][exon][i]) # collect the log ratio of that exon of that sample (of that gene) wholegene.write('\t'+str(ca...
Python
1
амоански', 'sr-Cyrl': 'самоански', 'sr-Latn': 'samoanski', 'sv': 'samoanska', 'sw': 'Kisamoa', 'ta': 'சமோவான்', 'te': 'సమోవన్', 'th': 'ซามัว', 'ti': 'ሳሞእኛ', 'tk': 'samoa dili', 'to': 'lea fakahaʻamoa', 'tr': 'Samoa dili', 'ug': 'ساموئاچە', 'uk': 'самоанська', 'ur': 'ساموآن', 'uz': 'samoa', 'uz-Latn': 'samoa', 'vec': 's...
Python
1
files, if num_bad_files == 1 { "" } else { "s" }, num_all_files, ); } else { println!("... Done (no bad files out of {} checked).", num_all_files); } Ok(()) } ...
Rust
0
ro_rules! Attacher { ($label:expr, $content:expr) => { RawToken::Attacher($label, $content) }; } #[test] fn can_lex() { test_attacher!(b"a: b", Attacher!(0..1, 3..4), 4); test_attacher!(b"cd: e", Attacher!(0..2, 5..6), 6); test_attacher!(b"f: g\n", Attacher!(0..1, 4..5), 5); test_attacher!(b"h: i j...
Rust
0
() .map(|line| { let (digits, num) = line.split(" | ").collect_tuple().unwrap(); let digits = digits .split_whitespace() .map(|n| parse_lights(n)) .collect::<Vec<_>>(); use permutator::heap_permutation; let mut rang...
Rust
0
(query) } } <reponame>dvc94ch/rust-gpu<filename>tests/ui/arch/workgroup_memory_barrier_with_group_sync.rs // build-pass // compile-flags: -C llvm-args=--disassemble-fn=workgroup_memory_barrier_with_group_sync::workgroup_memory_barrier_with_group_sync use spirv_std as _; unsafe fn workgroup_memory_barrier_with_gro...
Rust
0
)] pub struct _SECPPCINTCLR; #[doc = "`write(|w| ..)` method takes [secppcintclr::W](secppcintclr::W) writer structure"] impl crate::Writable for SECPPCINTCLR {} #[doc = "Secure PPC Interrupt Clear"] pub mod secppcintclr; #[doc = "Secure PPC Interrupt Enable\n\nThis register you can [`read`](crate::generic::Reg::read),...
Rust
0
ir(parents=True, exist_ok=True) material_conteudo = """# Princípios do Direito do Trabalho - CLT ## Princípios Fundamentais ### 1. Princípio da Proteção O direito do trabalho tem como finalidade proteger a parte mais fraca da relação de trabalho: o empregado. **Desdobramentos:** - In dubio pro operario - Ap...
Python
1
use_cnn_module: bool, # False macaron_style: bool, # False use_dynamic_chunk: bool, # False use_dynamic_left_chunk: bool, # False static_chunk_size: int, # 1 positionwise_conv_kernel_size: int = 1, activation_type: str = "swish", cnn_module_kernel: int = 15,...
Python
1
#!/usr/bin/python3 def list_division(my_list_1, my_list_2, list_length): new_list = [] for i in range(list_length): try: result = my_list_1[i] / my_list_2[i] except ZeroDivisionError: print("division by 0") result = 0 except TypeError: prin...
Python
1
, hypos, ids, nlls = load_text(args.path, beam_width=args.beam_width) weights = np.exp(-nlls) weights /= weights.sum(axis=1, keepdims=True) if args.ensemble: uncertainties = load_uncertainties(args.path, beam_width=args.beam_width, n_best=args.nbest) uncertainties = uncertainties[args.unce...
Python
1
0x85, test_rm16_r16, OpFlags::MODRM); // 0x86 : xchg_r8_rm8 setop!(0x87, xchg_r16_rm16, OpFlags::MODRM); // 0x88 : mov_rm8_r8 setop!(0x89, mov_rm16_r16, OpFlags::MODRM); // 0x8a : mov_r8_rm8 setop!(0x8b, mov_r16_rm16, OpFlags::MODRM); setop!(0x8c...
Rust
0
import random choices = ['камень', 'ножницы', 'бумага'] print("Добро пожаловать в игру 'Камень, ножницы, бумага'!") while True: computer_choice = random.choice(choices) player_choice = input("Пожалуйста, сделайте выбор (камень, ножницы, бумага): ").lower() if player_choice not in choices: print(...
Python
1
l. Only to be used through TI provided API."] #[inline] pub fn auxio7(self) -> &'a mut W { self.variant(ADCCOMPB_INW::AUXIO7) } #[doc = "Internal. Only to be used through TI provided API."] #[inline] pub fn nc(self) -> &'a mut W { self.variant(ADCCOMPB_INW::NC) } #[doc = ...
Rust
0
:param _Switch: WebSocket 超时配置开关, 开关为off时,平台仍支持WebSocket连接,此时超时时间默认为15秒,若需要调整超时时间,将开关置为on. * WebSocket 为内测功能,如需使用,请联系腾讯云工程师开白. :type Switch: str :param _Timeout: 设置超时时间,单位为秒,最大超时时间65秒。 注意:此字段可能返回 null,表示取不到有效值。 :type Timeout: int """ self._Switch = None self._Timeout =...
Python
1
s"; let val = ctx.value_from_str(val)?; assert!(val.is_str()); Ok(()) } #[test] fn test_constructs_a_value_as_an_array() -> Result<()> { let ctx = Context::default(); let val = ctx.array_value()?; assert!(val.is_array()); Ok(()) } #[test] ...
Rust
0
<HandshakeRsp>(&data); match resp { Response::Accept(_) => Ok(()), Response::Reject(rej) => Err(IgniteError::new(format!("Handshake failed with error: {}", rej.get_error()))), } } /// Receive response in a raw byte array form async fn receive_rsp_raw(read_end: &mut ...
Rust
0
n<f64>, } impl Mos1Model { pub(crate) fn resolve(specs: &proto::Mos1Model) -> Self { use consts::{KB, KB_OVER_Q, KELVIN_TO_C, Q, SIO2_PERMITTIVITY, TEMP_REF}; // Convert from Proto-encoded enum form let mos_type = if specs.mos_type == 1 { MosType::PMOS } else { MosType::NMOS }; // ...
Rust
0
(self.ed25519.sign::<Ed25519Digest>(data.as_ref())) } /// Creates a detached BLS signature share of `data` if the `self` holds a BLS keypair share. pub fn sign_using_bls<T: AsRef<[u8]>>(&self, data: T) -> Option<Signature> { self.bls .as_ref() .map(|bls_keys| Signature::BlsS...
Rust
0
pub const ZE_STRUCTURE_TYPE_FENCE_DESC: _ze_structure_type_t = _ze_structure_type_t(18); } impl _ze_structure_type_t { #[doc = "< ::ze_image_desc_t"] pub const ZE_STRUCTURE_TYPE_IMAGE_DESC: _ze_structure_type_t = _ze_structure_type_t(19); } impl _ze_structure_type_t { #[doc = "< ::ze_image_properties_t...
Rust
0
cmd } else if env_cargo.is_nightly() { env_cargo } else if default_cargo.is_nightly() { default_cargo } else if rustup_run_nightly.is_nightly() { rustup_run_nightly } else { // If no command before provided us with a nightly compiler, we try to search one // with rustup. If that fails as well, we return ...
Rust
0
anage, preset_dropdown, preset_name_delete, preset_flow_delete]) model_type.change(load_preset_cloud_model, inputs=model_type, outputs=model_name) preset_name_delete.change(load_preset, inputs=preset_name_delete, outputs=preset_flow_delete) reset_flow.click(reset_flow_func, outputs=preset_flow) reset_last.click(res...
Python
1
-download) HTML requests and send them to the single page app .service( web::resource(ANY) .guard(actix_web::guard::Method(Method::GET)) .guard(actix_web::guard::fn_guard(|guard_ctx| { content_types::get_accept(guard_ctx.head().headers()) ...
Rust
0
32f303xb", "stm32f303xc", "stm32f303xd", "stm32f303xe", "stm32f358", "stm32f398",],), AF11: (into_af11, af11, ["stm32f373", "stm32f378",],), ]), PA1: (pa1, 1, Input<Floating>, moder1, AFRL, afrl1, bs1, br1, odr1, idr1, pupdr1, ot1, [ AF1: (into_af1, af1,), ...
Rust
0
#!/usr/bin/env python3 # # This file is part of LiteEth # # Copyright (c) 2021-2023 Florent Kermarrec <florent@enjoy-digital.fr> # SPDX-License-Identifier: BSD-2-Clause # LiteEth UDP Streamer test utility. import socket import time import argparse import datetime # Leds Test ----------------------------------------...
Python
1
: Direction::Prime, }) } } else if re_double.is_match(token) { for cap in re_double.captures_iter(token) { let basemove = parse_base_move(&cap[1])?; parsed.push(MoveInstance { basemove, dir: Direction...
Rust
0
type directly. For dealing with `datetime`, /// use the `chrono` feature of this crate and its `NaiveDateTime` type. #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct DateTime { days: i32, seconds_fragments: u32, } impl DateTime { /// Construct a new `DateTime` instance. pub fn new(days: i32, se...
Rust
0
self.binder.reset(); self.pipeline.reset(); self.index.reset(); self.vertex.reset(); } } /// Error encountered when performing a render pass. #[derive(Clone, Debug, Error)] pub enum RenderPassErrorInner { #[error(transparent)] Encoder(#[from] CommandEncoderError), #[error...
Rust
0
g symmetry-invariant quantum # architectures, the symmetries could instead be incorporated into the training routine, such as # recently proposed by [#Wierichs23]_. Finally, symmetry-aware # models could be used to design quantum symmetry functions, which in turn could serve as # symmetry-invariant descriptors of the c...
Python
1
wait.unwrap(); let round = snapshot.round(); cluster.snapshots.insert( id.to_string(), PlaygroundSnapshot { node_id, resumable: false, snapshot, }, ); emit_event( &*cluster.listeners, SnapshotEvent { ...
Rust
0
from pyrep.robots.arms.jaco import Jaco from pyrep.robots.arms.mico import Mico from pyrep.robots.arms.panda import Panda from pyrep.robots.arms.sawyer import Sawyer from pyrep.robots.arms.ur5 import UR5 from pyrep.robots.end_effectors.baxter_gripper import BaxterGripper from pyrep.robots.end_effectors.jaco_gripper imp...
Python
1
2vsm @classmethod def get_word2vec_model(cls, *args, **kwargs): if "_w2v_cache" not in dir(cls): cls._w2v_cache = cls._get_word2vec_model(*args, **kwargs) return cls._w2v_cache def word2vec(self, modelfile="/auto/k8/huth/GoogleNews-vectors-negative300.bin", norm=False): ...
Python
1
Object::Float(x) => x, ref x => return type_error_int_float(env, "Beta(x,y)", "x", x), }; let y = match argv[1] { Object::Int(x) => float(x), Object::Float(x) => x, ref x => return type_error_int_float(env, "Beta(x,y)", "y", x), }; Ok(Object::Float(beta(x, y))) } pub fn ...
Rust
0
from __future__ import annotations import warnings from . import __version__ def deprecate( deprecated: str, when: int | None, replacement: str | None = None, *, action: str | None = None, plural: bool = False, ) -> None: """ Deprecations helper. :param deprecated: Name of thing...
Python
1
p1k_1.dispense(25, rxn_in_well[20 + well].bottom(z=5), rate=0.5) ctx.delay(seconds=1) d = rxn_in_well[20 + well].diameter diameter_20: float = d if d is not None else 6.86 p1k_1.move_to( rxn_in_well[20 + well] .top(...
Python
1
er: &mut H) { hasher.write_u8(unsafe { self.undifferentiated }) } } <gh_stars>1-10 // Copyright 2020 Contributors to the Parsec project. // SPDX-License-Identifier: Apache-2.0 use crate::tss2_esys::TPMS_PCR_SELECT; use crate::{Error, Result, WrapperErrorKind}; use enumflags2::BitFlags; use log::error; use num_deriv...
Rust
0
gpai[i] kedui_hongpai[i + 1] = kedui_hongpai[i + 1] + kedui_hongpai[i] for i in range(1, max_minute + 1): hongpaicha[i] = zhudui_hongpai[i] - kedui_hongpai[i] return [zhudui_hongpai, kedui_hongpai, hongpaicha] def get_mian(soup): race_name = soup.select('.dsBreadcrumbs > a')[-1].text.stri...
Python
1
PIN29_SEC_MASK_A::READABLE) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits...
Rust
0
())) .expect("alloc failure") }) .collect::<Vec<_>>(); let hashed = PoseidonFunction::hash_md(&data); let hashed_fr = Fr::from_repr_vartime(hashed.0).expect("from_repr failure"); let circuit_hashed = PoseidonFunction::hash_md_circuit(&mut cs, circuit...
Rust
0
import random import unittest class TreeNode: def __init__(self, value, left=None, right=None): self.value = value self.parent = None self.left = left self.right = right if left is not None: left.parent = self if right is not None: right.pare...
Python
1
_ => None, } } impl std::str::FromStr for EV_KEY { type Err = (); fn from_str(s: &str) -> Result<Self, Self::Err> { match s { "KEY_RESERVED" => Ok(EV_KEY::KEY_RESERVED), "KEY_ESC" => Ok(EV_KEY::KEY_ESC), "KEY_1" => Ok(EV_KEY::KEY_1), "KEY_2" =...
Rust
0