text
string
label_name
string
labels
int64
0 clear register"] pub out2_clr: OUT_CLR, #[doc = "0x518 - SCT output 0 set register"] pub out3_set: OUT_SET, #[doc = "0x51c - SCT output 0 clear register"] pub out3_clr: OUT_CLR, #[doc = "0x520 - SCT output 0 set register"] pub out4_set: OUT_SET, #[doc = "0x524 - SCT output 0 clear regi...
Rust
0
= 128, /// Broadcast 2 x `bfloat16` to 128-bits Broadcast128_2xBFloat16 = 129, /// Broadcast `i16` to 256-bits Broadcast256_Int16 = 130, /// Broadcast `u16` to 256-bits Broadcast256_UInt16 = 131, /// Broadcast `u32` to 256-bits Broadcast256_UInt32 = 132, /// Broadcast `i32` to 256-bits Broadcast256_Int32 = 1...
Rust
0
*m_i) for all i in I let b = params.b( messages .iter() .enumerate() .collect::<BTreeMap<usize, &E::Fr>>(), &signature.s, )?; // A' = A * r1 let A_prime = signature.A.mul(r1.into_repr()); let A_prime_affine ...
Rust
0
ody) def get(self, key, default=None): return self._body.get(key, default) class EncodedMHMessage(MHMessage): """ The EncodedMHMessage class provides a message that provides RFC821-like headers like this: HeaderName: HeaderValue This variation encodes/decodes the body of the message ...
Python
1
}; if dot(intersection.normal, direction) < 0.0 { continue; // Ignore lights that are on the other side of the surface. } let distance = direction.magnitude(); let direction = direction / distance; // Normalize the direction. // We off...
Rust
0
} ("Weights", "double") => { let decoded_input: u32 = match Decode::decode(&mut input.clone()) { Ok(dec) => dec, Err(_) => { return Err(DispatchError::Other( "Can't decode input for Weights::stor...
Rust
0
""" Miscellaneous tests for plugins & related functionality """ import copy import sys import requests import os import pytest # Many sites inside the external pool do not let multiple requests from travis, # making the test frequently have false negative failures. @pytest.mark.skip() def test_testserver(logger): ...
Python
1
StateKey<'a, T>, StatefulParams<T>>::new(); tensors .into_iter() .map(|var| { // let var = var.as_ref(); if let Some(var_arr) = var.get_persistent_array() { match var2state.entry(super::StateKey(var)) { Entry::Va...
Rust
0
_PRECISION_FLOAT = 1 [DEFAULT] /// `Approximate` -> VIPS_PRECISION_APPROXIMATE = 2 /// `Last` -> VIPS_PRECISION_LAST = 3 pub precision: Precision, /// layers: `i32` -> Use this many layers in approximation /// min: 1, max: 1000, default: 5 pub layers: i32, /// cluster: `i32` -> Cluster lin...
Rust
0
lue<'m>, RawValue<'m>)>, } #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct SeriesGet<'m> { id: PropertyId, x: Option<(RawValue<'m>, RawValue<'m>)>, } #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct SeriesStatus<'m, const NUM_COLUMNS: usize> { id: PropertyId, values: V...
Rust
0
_2) as usize]; Some(Hist3d { axes: (axis_0, axis_1, axis_2), counts, }) } _ => None, } } pub fn with_counts( bins_0: u32, min_0: f64, max_0: f64, bins_1: u32, min_1: f...
Rust
0
from datetime import datetime as dt from pydantic import BaseModel from squadmanager.crew import squadmanager from squadmanager.memory import MemoryManager # Stub Flow et start decorator par défaut class Flow: """Stub Flow si CrewAI Flows absent""" pass def start(fn): """Stub decorator start""" return...
Python
1
>(e: E) -> Done<Result<T, E>> { Done(Some(Err(e))) } use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Debug, Serialize, Deserialize)] pub struct Installation { pub id: Uuid, pub account_id: Option<i64>, pub nonce: Option<Vec<u8>>, pub private_key: Option<Vec<u8>>, } use indoc::indoc; u...
Rust
0
pub const VAL_0x05: u32 = 0x5; /// Reserved. pub const VAL_0x06: u32 = 0x6; /// Reserved. pub const VAL_0x07: u32 = 0x7; } /// `ENUM_LB` value group #[allow(non_upper_case_globals)] pub mod enum_lb { /// Further programming and verification disabled. pub const PROG_VER_DISABLED: u32 = 0x0; ///...
Rust
0
Reset, // Controller enabled, detached from bus // (We may go to this state when the Host // controller suspends the bus.) Idle(Mode), // Controller enabled, attached to bus Active(Mode), } #[derive(Copy, Clone, Debug)] pub enum Mode { Host, Device { speed: Speed, c...
Rust
0
( '有时间还是让博士他\n', '到外面走走散散心比较好吧。', TxtCtl.Enter, ), ) CloseMessageWindow() def _loc_2124(): pass label('loc_2124') Jump('loc_21E1') def _loc_2127(): pass label('loc_2127') If( ( (Expr.TestScenaFlags, ScenaFlag(0...
Python
1
value() { None } else { buffer.get(*self.start()..self.end() + 1) } } unsafe fn get_unchecked(self, buffer: &Buffer<[T]>) -> BufferView<Self::Output> { buffer.get_unchecked(*self.start()..self.end() + 1) } } impl<T> BufferSliceIndex<T> for RangeFrom<usize> {...
Rust
0
lator with a budget of 1000" # output = orchestrator.get_response(text, chat_history, params) # chat_history.append({"role": ChatRole.USER, "content": text}) # chat_history.append({"role": ChatRole.ASSISTANT, "content": output["answer"]}) # params = output["parameters"] # post_calls = [ # c...
Python
1
/// ```rust /// # extern crate onig; use onig::Regex; /// # use onig::Captures; fn main() { /// let re = Regex::new(r"([^,\s]+),\s+(\S+)").unwrap(); /// let result = re.replace("<NAME>", |caps: &Captures| { /// format!("{} {}", caps.at(2).unwrap_or(""), caps.at(1).unwrap_or("")) /// }); ...
Rust
0
it)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] //[full_tait]~^ WARN incomplete fn main() {} // don't reveal the concrete type type NoReveal = impl std::fmt::Debug; fn define_no_reveal() -> NoReveal { "" } fn no_reveal(x: NoReveal) { let _: &'static str = x; //~ mismatched types let _ = x a...
Rust
0
total * mult, stdsort_total * mult ); } fn main() { let start = 32; let end = 65536; let iterations = 100; println!("Radix sort u32 key ({} iterations)", iterations); println!(" size radix8 radix11 introsort stdsort"); let mut i = start; while i <= end { perf_t...
Rust
0
pub fn ethmode(&self) -> ETHMODER { ETHMODER::_from({ const MASK: u8 = 7; const OFFSET: u8 = 0; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bit 4 - Selects the functionality of the SCT outputs."] #[inline] pub fn ctoutctrl(&self) -> ...
Rust
0
servingSize of a Food protein, "protein", /// `protestant percentage`: protestantPercentage, "protestantPercentage", /// `prove code`: provCode, "provCode", /// `provides`: provides, "provides", /// `province`: province, "province", /// `iso code of a province`: provinc...
Rust
0
.map(|loc| loc.parse::<Coord>().unwrap()) .collect::<Vec<_>>(); assert_eq!(solve(&locs), (10, 2208)); } } // 33. Search in Rotated Sorted Array // https://leetcode.com/problems/search-in-rotated-sorted-array/ struct Solution {} impl Solution { pub fn search(nums: Vec<i32>, target: i32...
Rust
0
dd_inv(batch_matched_odd.contiguous()).squeeze().detach() #### build hyperspectral cube img_pred_even = np.transpose(img_pred_even.cpu(),(1,2,0)).to(device) img_pred_odd = np.transpose(img_pred_odd.cpu(),(1,2,0)).to(device) cube_pred = torch.zeros((1024,1024,62)).to(device) cube...
Python
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hwt.code import SwitchLogic from hwt.synthesizer.unit import Unit from hwt.interfaces.std import Signal from hwt.hdl.types.bits import Bits from hwt.interfaces.utils import addClkRstn class SwitchLogicIf(Unit): def _declr(self): self.a = Signal(Bit...
Python
1
-> Value<'ctx> { Value::from_val(self.as_val()) } fn as_type(&self) -> Result<Type<'ctx>> { unsafe { Type::from_raw(LLVMTypeOf(self.as_mut_ptr())) } } fn kind(&self) -> Result<TypeKind> { Ok(self.as_type()?.kind()) } fn name<'a>(&'a self) -> Option<Result<&'a str>> { ...
Rust
0
OCIEnv, raw: *const OCIRaw ) -> u32; } extern "C" { // https://docs.oracle.com/en/database/oracle/oracle-database/19/lnoci/oci-date-datetime-and-interval-functions.html#GUID-3B02C8CC-F35C-422F-B35C-47765C998E57 fn OCIDateTimeAssign ( hndl: *const c_void, err: *c...
Rust
0
relevance uniformly over its receptive field. 'ww' or 'w^2' only considers the square weights w_ij^2 as qantities to distribute relevances with. param : double the respective parameter for the lrp method of choice Returns ------- R : numpy.ndarray ...
Python
1
ExportGaussianSplat.write_ply(str(filename), count, map_to_tensors) Commands = tyro.conf.FlagConversionOff[ Union[ Annotated[ExportPointCloud, tyro.conf.subcommand(name="pointcloud")], Annotated[ExportTSDFMesh, tyro.conf.subcommand(name="tsdf")], Annotated[ExportPoissonMesh, tyro...
Python
1
squares:list[int] = [] for value in range(1, 11): squares.append(value**2) print(squares)
Python
1
// } // } /// public static final [SCREEN_TIMEOUT_LONG](https://developer.android.com/reference/android/app/Notification.WearableExtender.html#SCREEN_TIMEOUT_LONG) #[deprecated] pub const SCREEN_TIMEOUT_LONG : i32 = -1; /// public static final [SCREEN_TIMEOUT_SHORT](https:...
Rust
0
(self.out_dim, nb_classes).to(self._device) fc = self.generate_fc(self.feature_dim, nb_classes).to(self._device) fc.reset_parameters_to_zero() if self.fc is not None: old_nb_classes = self.fc.out_features weight = copy.deepcopy(self.fc.weight.data) ...
Python
1
nc def cancel_add_sub(client, callback_query): await callback_query.message.edit_text("✅ تم إلغاء عملية الإضافة") @bot.on_message(filters.command("حذف قناة الاشتراك 🗑", "") & filters.private, group=1242112456) async def del_sub(client, message): if message.from_user.id not in DEVS: return await messag...
Python
1
novable,dispositivo_limit) VALUES (?,?,?,?,?,?,?,?) """, (producto,email,password,perfil,pin,instrucciones,renovable,dispositivo_limit)) db.commit() flash("Cuenta agregada correctamente", "success") return redirect(url_for("admin_panel")) # ----------------- PANEL DE ADMIN: MODIFICAR PRECIOS EN...
Python
1
ut = assert_watch!(intl::command(intl_service, None, None, vec![], None, false)); assert_eq!( output, format!( "{:#?}", IntlSettings { locales: Some(vec![LocaleId { id: TEST_LOCALE.into() }]), temperature_unit: Some(TEST_TEMPERATURE_UNIT), ...
Rust
0
) = self.pull_request_user { match github.make_genesis_pull_request(&config.repository_owner, &config.repository, &user) { Ok(_) => Ok("created pull request to genesis repo".to_string()), Err(e) => Err(Error::StorageWriteError( ...
Rust
0
> { self.push_str(value.to_string()).transmute() } } <filename>src/lib.rs extern crate clap; extern crate directories; extern crate kuchiki; extern crate lazycell; extern crate num_cpus; extern crate pipeliner; mod cli; mod cmd; mod collection; mod document; mod errors; #[cfg(test)] mod test; pub use cli...
Rust
0
task::SpawnExt, }; use rand::{thread_rng, RngCore}; #[test] fn limited_read() { let mut pool = LocalPool::new(); let sp = pool.spawner(); let limiter = Limiter::<ManualClock>::new(512.0); let clock = limiter.clock(); sp.spawn({ let limiter = lim...
Rust
0
from bandtool.io_utils import find_ken_values, split_kE, get_kpoint_labels from bandtool.energy_utils import norm_energies from bandtool.plotting import plot_bands from bandtool.output_utils import build_band_extrema_list, build_total_results, write_summary_to_file, create_output_folder, get_band_results def main(): ...
Python
1
"eval", "factorize", "get_dummies", "from_dummies", "get_option", "infer_freq", "interval_range", "io", "isna", "isnull", "json_normalize", "lreshape", "melt", "merge", "merge_asof", "merge_ordered", "notna", "notnull", "offsets", "option_c...
Python
1
result } } // submission codes end #[cfg(test)] mod tests { use super::*; #[test] fn test_0113_example_1() { let root = tree![5, 4, 8, 11, null, 13, 4, 7, 2, null, null, 5, 1]; let target_sum = 22; let result = vec![vec![5, 4, 11, 2], vec![5, 8, 4, 5]]; asser...
Rust
0
ive(Debug, Clone, PartialEq)] pub enum Color { Auto, Always, Never, } #[derive(Debug, Clone, PartialEq)] pub enum LogFormat { Text, Json, } impl std::str::FromStr for Color { type Err = String; fn from_str(s: &str) -> Result<Self, Self::Err> { match s { "auto" => Ok(Co...
Rust
0
.finish() } } impl<T: UserEvent> GlobalShortcutManager for GlobalShortcutManagerHandle<T> { fn is_registered(&self, accelerator: &str) -> Result<bool> { let (tx, rx) = channel(); getter!( self, rx, Message::GlobalShortcut(GlobalShortcutMessage::IsRegistered( accelerator.parse().ex...
Rust
0
sts auto-converted from "sass-spec/spec/non_conformant/errors/import/url/loop" mod each; mod test_for; mod test_while; use std::sync::Arc; use super::{catalog_schema, SplittableTable}; use crate::datasource::{HBeeTableDesc, S3ParquetTable}; use crate::error::Result; use crate::models::SizedFile; use arrow::array::*...
Rust
0
le, predicted_spans in patch_info[ "predicted_window_labels" ].items(): for pred_span in predicted_spans: pred_span = tuple(pred_span) curr_title = span2title.get(pred_span) if curr_title is None or curr_title == NME...
Python
1
"""balance sheet update Revision ID: 35ae881792ee Revises: 903d5d0706c5 Create Date: 2024-09-08 19:35:46.220108 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '35ae881792ee' down_revision = '903d5d0706c5' branch_labels = None depends_on = None def upgrade():...
Python
1
page_number if not UtilClient.is_unset(request.page_size): query['PageSize'] = request.page_size req = open_api_models.OpenApiRequest( query=OpenApiUtilClient.query(query) ) params = open_api_models.Params( action='QueryTraceM3u8Job', versi...
Python
1
document. /// Thus, any fields not present in the new document are kept and remained unchanged. /// /// To completely overwrite a document, check out the [Index::add_or_replace] documents method. /// /// # Example /// /// ``` /// use serde::{Serialize, Deserialize}; /// /// # us...
Rust
0
cx, nav(class="navbar is-black is-fixed-top") { NavbarBrand(props.is_expanded) div(class=menu_class) { NavbarStart {} NavbarEnd {} } } } } /// The brand and hamburger menu. #[component] fn NavbarBrand<'a, G: Html>(cx: Scope<'a>, i...
Rust
0
import os import json from typing import Dict, Iterable, List from .parsers import autodetect_and_parse from .rules import Rule, load_rules_from_json class LogAnalyzer: def __init__(self, rules_path: str, default_encoding: str = "utf-8") -> None: self.rules: List[Rule] = load_rules_from_json(rules_path) ...
Python
1
True fcset_write(scoreXml, "fcset-chord", html_fname, xml_fname, description=f"{k}{ctype.value} {voicing.name} voicing in {keysig}") if not found: os.rmdir(htmldir) os.rmdir(xmldir) if __name__ == "__main__": import web # Generate a ...
Python
1
: {A_rain_chance} mm/h", True, BLACK) A_w_desc_text = font.render(f"{A_w_desc}", True, BLACK) B_temperature_text = font.render(f"Temp: {B_temperature_celsius:.2f} °C", True, BLACK) B_feels_like_text = font.render(f"Feels Like: {B_feels_like_celsius:.2f} °C", True, BLACK) B_wind_speed_te...
Python
1
("mod", ebpf::BPF_MOD), ("xor", ebpf::BPF_XOR), ("mov", ebpf::BPF_MOV), ("arsh", ebpf::BPF_ARSH), ]; let mem_sizes = [ ("w", ebpf::BPF_W), ("h", ebpf::BPF_H), ("b", ebpf::BPF_B), ("dw", ebpf::BPF_DW), ]; let jump_conditions = [ ("jeq", eb...
Rust
0
'ChordText', 'waterfall_chord_mode_1_x') waterfall_chord_mode_1_y = config2.getint('ChordText', 'waterfall_chord_mode_1_y') waterfall_bass_treble_mode_1_x = config2.getint('ChordText', 'waterfall_bass_treble_mode_1_x') waterfall_bass_treble_mode_1_y = config2.getint('ChordText', 'waterfall_bass_treble_mode_1_y') waterf...
Python
1
# -*- coding: utf-8 -*- SYSTEM_PROMPT = """# 角色 您是专业的阿里巴巴云数据库运营助手,具备丰富的 MySQL 数据库知识,熟练掌握各种 SQL 语法,通过理解用户问题,结合资料,生成可执行的 SELECT 语句,并汇总结果。 ## 技能 ### 技能 1:数据分析,根据用户的需求,合理规划流程,一步步执行操作,帮助用户获取并汇总数据查询结果。 - 按照以下流程进行任务规划: 1. **理解需求**:根据用户提供的信息,理解清楚用户的要求,包括但不限于:需要的数据库表、查询数据的条件、数据结果的处理方式。 2. **查询表结构**:根据所需的数据库表改写查询关键词,然后多次调用...
Python
1
for res in call.output_res.iter() { if ty.id == res.id { ctors.insert(*call); } } } consumers.shrink_to_fit(); ctors.shrink_to_fit(); desc.consumers = consumers; desc.ctors...
Rust
0
# SPDX-FileCopyrightText: 2024 Ferenc Nandor Janky <ferenj@effective-range.com> # SPDX-FileCopyrightText: 2024 Attila Gombos <attila.gombos@effective-range.com> # SPDX-License-Identifier: MIT from typing import Optional, Any import netifaces from context_logger import get_logger from example import INetifacesWrapper...
Python
1
56p.set_sensitive(True) self.c_256c_512p.set_sensitive(True) #32-bit 4.2 billion colors RGBA self.c_32b_16p.set_sensitive(True) self.c_32b_24p.set_sensitive(True) self.c_32b_32p.set_sensitive(True) self.c_32b_48p.set_sensitive(True) sel...
Python
1
import os import pytest import allure from allure_commons.types import AttachmentType from frontendtesting.src.pages.application import Application # Ensure the import path is correct import subprocess # Define the base directory for reports relative to this file's location base_dir = os.path.abspath(os.path.dirname(...
Python
1
governing permissions and // limitations under the License. // Contributed by <NAME> <<EMAIL>> on behalf of the // ARC Training Centre for CubeSats, UAVs & Their Applications (CUAVA) team (www.cuava.com.au) // at the University of Sydney use crate::eps::*; use crate::ffi; /// EPS system configuration structure #[der...
Rust
0
the outgoing msg. /// Returns false if the answer expired hence not added. fn add_answer_at_time(&mut self, answer: Box<dyn DnsRecordExt>, now: u64) -> bool { debug!("Check for add_answer_at_time"); if now == 0 || !answer.get_record().is_expired(now) { debug!("add_answer push: {:?}"...
Rust
0
datum::VAR_UINT_FLAG => Ok(Some(raw_datum.read_datum_payload_var_u64()? as i64)), _ => Err(Error::InvalidDataType(format!( "Unsupported datum flag {} for Int vector", flag ))), } } #[allow(clippy::cast_lossless)] pub fn decode_real_datum(mut raw_datum: &[u8], field_ty...
Rust
0
import reflex as rx config = rx.Config( app_name="plantilla_web", )
Python
1
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
Python
1
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class SaleOrder(models.Model): _inherit = 'sale.order' def _should_be_locked(self): self.ensure_one() if self.env.context.get('fsm_create_sale_order'): return False return s...
Python
1
_SUPPORTED", "3"), ("(gint) PK_ERROR_ENUM_NO_CACHE", "18"), ("(gint) PK_ERROR_ENUM_NO_DISTRO_UPGRADE_DATA", "44"), ("(gint) PK_ERROR_ENUM_NO_LICENSE_AGREEMENT", "34"), ("(gint) PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY", "43"), ("(gint) PK_ERROR_ENUM_NO_NETWORK", "2"), ("(gint) PK_ERROR_ENUM_NO_PACKA...
Rust
0
help("Output verbose log"), ) .arg( Arg::new("http-user-agent") .long("http-user-agent") .takes_value(true) .help("Set user agent for http request"), ) .arg( Arg::new("no-proxy") .long("no-p...
Rust
0
import pytest from tests.conftest import _clean_stdout from tests.fixtures import RunSemgrep @pytest.mark.kinda_slow def test_regex_rule__nosemgrep(run_semgrep_in_tmp: RunSemgrep, snapshot): snapshot.assert_match( run_semgrep_in_tmp( "rules/regex/regex-nosemgrep.yaml", target_name="basic/regex...
Python
1
} self.p = p } Ok(()) } fn parse(mut self) -> Result<ComponentSequence, CompileError> { while !self.p.is_empty() { self.main(self.p)?; } if let Some(seq) = self.sequences.last() { return Err(CompileError::new( Er...
Rust
0
from inspect import getsourcelines, signature from functools import wraps from typing import get_origin, get_args from sanic.exceptions import SanicException, NotFound def execute(func): sig = signature(func) src = getsourcelines(func) auto_exec = src[0][-1].strip() in ("...", "pass") model = sig.retu...
Python
1
is_active = is_active await self.save() @property def chat_type(self) -> ChatType: """获取聊天频道类型""" try: return ChatType(self.channel_type) except ValueError as e: logger.error(f"获取聊天频道类型失败: {e!s}") return ChatType.UNKNOWN async def get_pre...
Python
1
tate): while True: # Until a successful route within limited steps s_index = np.zeros(state_action_shape) G_t = np.zeros(state_action_shape) current_state = start_state route = [current_state] for step in range(max_step_per_episode): ...
Python
1
import pytest import numpy as np import open3d as o3d import Assign01 as A01 files_to_test = [ "./data/assign01/BunnyXYZ.pcd", "./data/assign01/BunnyXYZN.pcd", "./data/assign01/BunnyXYZRGB.pcd", "./data/assign01/BunnyXYZNRGB.pcd" ] class Test_Assign01: @pytest.mark.parametrize("filename...
Python
1
Paren => format!("Closing parenthesis missing a match."), /// Unrecognized escape sequence. e.g., `\q`. regex_syntax::ErrorKind::UnrecognizedEscape(c) => format!("Unrecognized escape sequence: \"{}\".",c), /// Unrecognized flag. e.g., `(?a)`. ...
Rust
0
class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: m, n = len(matrix), len(matrix[0]) l, r = 0, m*n-1 while l <= r: mid = l + ((r-l)//2) row = mid//n col = mid%n if matrix[row][col] == target: ...
Python
1
} /// Build the [`ObjectDescription`] with all specified settings /// # Errors /// If a non-optional member has not specified while building /// an error is returned, containing flags specifying which /// setting has been omitted /// # Examples /// ``` /// use myelin_engine::prelude::*;...
Rust
0
"""Core MCP Creator components.""" from .config import Settings from .server_generator import ServerGenerator, ServerSpec from .template_manager import Template, TemplateManager __all__ = [ "Settings", "TemplateManager", "Template", "ServerGenerator", "ServerSpec", ]
Python
1
while i < vec1.len() && j < vec2.len() { if vec1[i] < vec2[j] { ans.push(vec1[i]); i += 1; } else { ans.push(vec2[j]); j += 1; } } // vec1 have more elements while i < vec1.len() { ans.push(vec1[i]); i += 1; } ...
Rust
0
} let signers_offset: usize = (self.signers_count.0 as usize) / 8; let signers_last_byte = match self.signers_bitset.read_with::<u8>(&mut signers_offset.clone(), LE) { Ok(data) => data, Err(_err) => 0 }; let signers_mask = if signers_offset > 0 && signers_offse...
Rust
0
ovz_derive::chain::evaluate_polynomial_at_index(split_coefficient_set[5].clone(), self.next_x.clone())); let decoded_message = base64::decode(&message).unwrap(); let decry...
Rust
0
} } } } } } #[derive(Debug)] enum StopReason<U> { WWatch(U), RWatch(U), AWatch(U), SwBreak, HwBreak, // TODO: add more stop reasons } // enum SignalMetadata { // Register(u8, Vec<u8>), // Thread { tid: isize }, // Core(us...
Rust
0
oof4.verify()); // now add a few more elements to the PMMR to build a larger merkle proof for x in 4..1000 { pmmr.push(TestElem([0, 0, 0, x])).unwrap(); } let proof = pmmr.merkle_proof(1).unwrap(); assert_eq!(proof.peaks.len(), 8); assert_eq!(proof.path.len(), 9); assert!(proof.verify()); } #[test]...
Rust
0
\r\n\tSTREAMING\x10\0\x1a\x02\x10\0\"e\n\nSalePeriod\x12%\ \n\x0brestriction\x18\x01\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\ \x18\n\x05start\x18\x02\x20\x01(\x0b2\x05.DateB\x02\x18\0\x12\x16\n\x03e\ nd\x18\x03\x20\x01(\x0b2\x05.DateB\x02\x18\0\"-\n\nExternalId\x12\x0f\n\ \x03typ\x18\x01\x20\x01(\t...
Rust
0
4\ \xd1\xb9\x11\xe0*\x1bU\xc7\x8b\xa5'\xc3\xa8\xe0\x7fJ\ \xba\x10\x0a]\xab\xe9F\xf6\xba,\xaaI\x14{\x81\xff\ \x00\x81OX\x94\x0eG\xe9V\xf0=\x059a\xdc2\ \x00\xa3\xc8\xdfc\x16\x9d2\x9e\x0f\xa7\xe9J\x11\x88\xc8\ \x15s\xe1\xcf\xa5H\x90\x1d\xbd*\x1c\xd2\x18\xb4\xe9\x15\ \x02\xee\xe0\xd2\xf7d|\xa3\x8a\xb6m\xc9\xf2\xa7\xc7n\ B\...
Python
1
.with(opentelemetry) .with(ErrorLayer::default()); tracing::subscriber::set_global_default(subscriber).map_err(|err| { tracing::error!("{:?}", err); anyhow::anyhow!(err) }) } } <gh_stars>10-100 #![deny(warnings)] use ucx_sys::ucs_status_ptr_t; use uc...
Rust
0
ry=None", t) shape = cell.shapes(LayerDevRecN).insert(text) shape.text_size = length / 100 t = pya.Trans(pya.Trans.R0, length / 10, w1 / 4) text = pya.Text("Component=racetrack_bezier", t) shape = cell.shapes(LayerDevRecN).insert(text) shape.text_size = length / 100 ...
Python
1
6MHz clock for Frequency Measure module."] pub struct FRO_HF_FREQM_ENA_R(crate::FieldReader<bool, FRO_HF_FREQM_ENA_A>); impl FRO_HF_FREQM_ENA_R { pub(crate) fn new(bits: bool) -> Self { FRO_HF_FREQM_ENA_R(crate::FieldReader::new(bits)) } #[doc = r"Get enumerated values variant"] #[inline(always)...
Rust
0
a = int(input()) b = int(input()) print(b-int(b/a)*a)
Python
1
""" You are given two 0-indexed strings source and target, both of length n and consisting of lowercase English letters. You are also given two 0-indexed character arrays original and changed, and an integer array cost, where cost[i] represents the cost of changing the character original[i] to the character changed[i]....
Python
1
account = client .get_account(&config.keypair.pubkey()) .context("unable to get payer account")?; info!("payer account: {:?}", account); Ok(client) } pub fn get_program_instance_account( client: &RpcClient, payer_account: &Keypair, program_keypair: &Keypair, seed: &str, ) -> ...
Rust
0
距離になるので、距離の最大値などが簡単に求められます """ res_x = x - y res_y = x + y return res_x, res_y def chebyshev_dis(x1: int, y1: int, x2: int, y2: int) -> int: """ チェビシェフ距離を計算します """ return max(abs(x1 - x2), abs(y1 - y2)) # 便利変数 INF = 1 << 63 lowerlist = list("abcdefghijklmnopqrstuvwxyz") upperlist ...
Python
1
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from pyspark.sql import Column from typing_extensions import Self from narwhals._spark_like.expr import SparkLikeExpr class SparkLikeExprStructNamespace: def __init__(self: Self, expr: SparkLikeExpr) -> None: ...
Python
1
Map, VecDeque}, fmt, hash::Hash, time::{Duration, Instant}, }; use tokio::timer::Delay; pub trait Partition<K> { fn partition(&self) -> K; } // TODO: Make this a concrete type type LingerDelay<K> = Box<dyn Future<Item = LingerState<K>, Error = ()> + Send + 'static>; pub struct PartitionedBatchSink<B,...
Rust
0
(self) -> Result<BoundedVec<u8, S>, ()> { core::convert::TryFrom::try_from(self.to_vec()) } fn into_bounded(self) -> BoundedVec<u8, S> { core::convert::TryFrom::try_from(self.to_vec()).unwrap() } } #[extend::ext] impl<'a> &'a str { fn hex_to_address(self) -> ExternalAddress { hex::decode(self.trim_start_matc...
Rust
0
_stars>10-100 fn main() {} #[no_mangle] pub fn add(x: i32, y: i32) -> i32 { return x + y; } use crate::utils::terminate; #[derive(Debug, Clone)] pub enum ParseStrtabError { Broken, } #[derive(Debug, Clone, Copy)] pub struct Strtab<'a> { strings: &'a [u8], } impl<'a> Strtab<'a> { pub fn parse(content...
Rust
0
import socket import time import telnetlib import struct TARGET=('alegria.asis-ctf.ir', 8282) WAIT=0.5 USER='kitctf' PW='asdasd' s=socket.create_connection(TARGET) def ru(st): buf='' while not st in buf: c=s.recv(1) assert c buf += c return buf def interact(): t = telnetlib.Te...
Python
1
import flet as ft from flet_route import Params, Basket, Routing, path from views.login_view2 import LoginView from views.dashboard import Dashboard from views.loadingscreen import LoadingScreen from views.facerecogntionwindow import Facerecognitionscreen from views.loginloadingscreen import LoginLoadingScreen from vie...
Python
1
::Status> { let req: GetReplicasRequest = request.into_inner(); let filter: Filter = match req.filter { Some(filter) => Filter::try_from(filter)?, None => Filter::None, }; match self.service.get(filter, None).await { Ok(replicas) => Ok(Response::new(Ge...
Rust
0
.frame .as_ref() .expect("should only be called for owned windows"); match msg { WM_SIZE => { let size = get_window_size(hwnd); webview .controller .0 .SetBounds(Rect { X: 0f32, ...
Rust
0