text
string
label_name
string
labels
int64
rve, amount); let b_required_hp = amount_hp .checked_mul(b_reserve_hp).ok_or(Overflow)? .checked_div(a_reserve_hp).ok_or(Overflow)?; to_balance!(b_required_hp) } pub fn calculate_liquidity_out( asset_a_reserve: Balance, asset_b_reserve: Balance, amount: Balance, total_liquidit...
Rust
0
| { BAR.with(|slot| { assert_eq!(slot.get(), 1); }); }); } #[test] fn scope_item_allowed() { assert!(!FOO.is_set()); FOO.set(&1, || { assert!(FOO.is_set()); FOO.with(|slot| { assert_eq!(*slot, 1); ...
Rust
0
= grid.get_mut(&neighbour_key); if let Some(EnergyLevel::Charging(i)) = neighbour { *neighbour.unwrap() = EnergyLevel::Charging(*i + 1) } } } } } fn count_flashing(grid: &Grid) -> usize { grid.iter() .filter(|(_, value)| **value =...
Rust
0
PROMPT = """请根据提供的问题和答案,提取出答案中的关键信息。关键信息应以一个或多个短句形式呈现,每个短句需是完整、清晰且独立的可验证信息。 ### 输入信息 - **问题**:{question} - **答案**:{answer} ### 输出要求 请返回一个 JSON 对象,格式如下: { "thought": "描述您的分析过程,明确如何从答案中提取关键信息,包括提取逻辑和步骤。", "keywords": ["关键信息1", "关键信息2", "..."] } ### 输出字段说明 1. **thought**: - 详细描述您的分析思路,包括如何从答案中提取出清晰的关键点。 -...
Python
1
(_) = &*remote_state.connection.lock("list_online_servers").await { active_remotes.push(remote_name.clone()); } } } mutable_player_state.connection.send_local(puzzleverse_core::ClientResponse::Servers(active_remotes)).await; false } ...
Rust
0
_API_TLS=4, TRANSPORT_PROTO_API_QUIC=5, } impl Default for TransportProto { fn default() -> Self { TransportProto::TRANSPORT_PROTO_API_TCP } } #[derive(Debug, Clone, Serialize_repr, Deserialize_repr)] #[repr(u32)] pub enum SessionRuleScope { SESSION_RULE_SCOPE_API_GLOBAL=0, SESSION_RULE_SCOPE_API_LOCAL=1,...
Rust
0
ToeCreateGameError::Database)?; let check_in_game_result: Option<(TicTacToePlayer, TicTacToePlayer)> = txn .prepare_cached(CHECK_IN_TIC_TAC_TOE_GAME_SQL) .context("failed to prepare query") .map_err(TicTacToeCreateGameError::Database)? .query_...
Rust
0
ck(pady=10) exit_button.bind("<Enter>", on_enter) exit_button.bind("<Leave>", on_leave) # Настройка стилей для кнопок style = ttk.Style() style.configure("TButton", font=("Arial", 12), padding=10) style.configure("Hover.TButton", background="#4CAF50", font=("Arial", 12), padding=10) # Стиль дл...
Python
1
esthetic_score, use_motion_strength, use_aesthetic_score, camera_motion, reference_image, refine_prompt, fps, num_loop, seed, sampling_steps, cfg_scale, ...
Python
1
points = self.pre_module[0](xyz) points = self.pre_module[1](xyz, points) xyz_list.append(xyz) points_list.append(points) for down in self.down_module: xyz, points = down(xyz, points) xyz_list.append(xyz) points_list.append(points) for ...
Python
1
be closed because bitcoind should use keep-alive by default # Check excessive request size conn = httplib.HTTPConnection(urlNode2.hostname, urlNode2.port) conn.connect() conn.request('GET', '/' + ('x'*1000), '', headers) out1 = conn.getresponse().read() assert_equal(out1...
Python
1
# -*- coding: utf-8 -*- # mypy: ignore-errors # # Copyright © 2025 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # This file is part of PyGlossary project, https://github.com/ilius/pyglossary # # This program is a free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
Python
1
eholderText(QCoreApplication.translate("Dialog_SetUp", u"\u5982hk", None)) self.checkBox_upos_host.setText(QCoreApplication.translate("Dialog_SetUp", u"UPOS\u4e3b\u673a", None)) self.lineEdit_upos_host.setPlaceholderText(QCoreApplication.translate("Dialog_SetUp", u"UPOS\u4e3b\u673a\u5730\u5740", None)) ...
Python
1
- tail_size; let mut end = pos + hor_size; let file_avgs_len = (file_avgs.len() as i32) - 1; if begin < 0 { begin = 0; } if end >= file_avgs_len { end = file_avgs_len; } let begin_pos = begin as usize; let end_pos = end as usize; let slice_top_pik_pos = (tail_size - 1)...
Rust
0
# 匯入 Airflow 核心模組 import airflow # 匯入自定義的常數設定,用於統一管理 DAG 參數與執行限制 from dataflow.constant import ( # 預設參數,例如 owner、start_date、retries 等 DEFAULT_ARGS, # 限制同一時間同一 DAG 最多允許幾個執行實例 MAX_ACTIVE_RUNS, ) # 匯入自定義的 DockerOperator 任務建立函式 from dataflow.etl.python_operator_etf import ( # 建立並回傳一個 DockerOperator 任務...
Python
1
pdir) def print_png(self, fname_or_fh, *args, **kwargs): """ Use LaTeX to compile a pgf figure to pdf and convert it to png. """ if kwargs.get("dryrun", False): self._print_pgf_to_fh(None, *args, **kwargs) return if isinstance(fname_or_fh, six.string...
Python
1
pub const NVML_FI_DEV_NVLINK_SPEED_MBPS_L5: u32 = 89; pub const NVML_FI_DEV_NVLINK_SPEED_MBPS_COMMON: u32 = 90; pub const NVML_FI_DEV_NVLINK_LINK_COUNT: u32 = 91; pub const NVML_FI_DEV_RETIRED_PENDING_SBE: u32 = 92; pub const NVML_FI_DEV_RETIRED_PENDING_DBE: u32 = 93; pub const NVML_FI_DEV_PCIE_...
Rust
0
enerated. pub const SYSTEM_ALERT: i32 = 0x0002; /// The foreground window has changed. /// The system sends this event even if the foreground window has changed to another window in the same thread. pub const SYSTEM_FOREGROUND: i32 = 0x0003; /// A menu item on the menu bar has been selected. /// The system sends this e...
Rust
0
ead::RenderThread; mod swapchain_resources; use swapchain_resources::SwapchainResources; mod render_frame_job; use render_frame_job::RenderFrameJob; //TODO: Find a way to not expose this mod swapchain_handling; pub use swapchain_handling::SwapchainLifetimeListener; use ash::version::DeviceV1_0; use crate::features::...
Rust
0
OutOfMemory2{ source: AllocError } = "Unable to allocate object" } pub struct VMXNet3 { pci: BarAccess, /// Number of transmit queues. ntxqsets: BoundedUSize<1, { VMXNET3_MAX_TX_QUEUES }>, /// Number of receive queues. nrxqsets: BoundedUSize<1, { VMXNET3_MAX_RX_QUEUES }>, vmx_flags: u...
Rust
0
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
Python
1
ts); ident.push_str(&format!("{}", ts)); } syn::GenericArgument::Constraint(c) => { ident.push_str(&c.ident.to_string()); ident.push_str(": "); let mut ts = TokenStream::new(); c.bounds.to_tokens(...
Rust
0
# Copyright © 2021 United States Government as represented by the Administrator of the # National Aeronautics and Space Administration. All Rights Reserved. import numpy as np # --------------------------- # Measurement Noise Functions # --------------------------- def uniform_measurement_noise(self, z): noise...
Python
1
# Other simple statements are contained in their own files. continue break if x: ... if True: pass 1; 2; pass 1; ...; a if b else c if c: B; del A else: C if x: yield x;
Python
1
bool { *self == MUX_RDY_A::MUX_RDY_7 } } #[doc = "Write proxy for field `MUX_RDY`"] pub struct MUX_RDY_W<'a> { w: &'a mut W, } impl<'a> MUX_RDY_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: MUX_RDY_A) -> &'a mut W { { s...
Rust
0
2 * i + 0] = ((a[i] >> 0) & 15) as i8; es[2 * i + 1] = ((a[i] >> 4) & 15) as i8; } /* each es[i] is between 0 and 15 */ /* es[63] is between 0 and 7 */ let mut carry: i8 = 0; for i in (0..63) { es[i] += carry; carry = es[i] + 8; carry >>= 4; es[i] -= carry <<...
Rust
0
algebra` instead, the example works analogously /// when importing `algebra::serialize::*`. pub trait CanonicalDeserialize: Sized { /// Reads `Self` from `reader`. fn deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>; /// Reads `Self` from `reader` without compression. #[inline] f...
Rust
0
rn "C" fn(arg: *mut ::cty::c_void, len: ::cty::c_int)>; #[doc = " SPI controller hardware settings"] #[repr(C)] #[derive(Default)] pub struct hal_spi_hw_settings { pub pin_sck: ::cty::c_int, pub pin_mosi: ::cty::c_int, pub pin_miso: ::cty::c_int, pub pin_ss: ::cty::c_int, } #[doc = " since one spi devic...
Rust
0
from pywave import pfwi import numpy as np import matplotlib.pyplot as plt import os from pyseistr import binread,smooth #pip install git+https://github.com/aaspip/pyseistr # DataPath #https://github.com/chenyk1990/cykd2/blob/master/various/cyksmall/marmvel.bin ## load velocity # marmvel=binread(os.getenv('HOME')+'/ch...
Python
1
_max.to_bits(), cost_k: cost_k.to_bits(), cost_b: cost_b.to_bits(), slash_rate: slash_rate.to_bits(), heartbeat_window: 10, }, } } } #[pallet::genesis_build] impl<T: Config> GenesisBuild<T> for GenesisConfig { fn build(&self) { TokenomicParameters::<T>::put(self.tokenomic_parameter...
Rust
0
tars>10-100 use batch; use failure::Error; use futures::{task, Async, Poll, Stream}; use lapin::channel; use lapin::message; use std::fmt; use crate::delivery::Delivery; use crate::stream; #[must_use = "streams do nothing unless polled"] pub struct Consumer { inner: Box<Stream<Item = message::Delivery, Error = Er...
Rust
0
.int_.__doc__) elif np.int64 is np.longlong: assert_("int64" in np.longlong.__doc__) @instantiate_parametrized_tests class TestScalarTypeNames(TestCase): # gh-9799 numeric_types = [ np.byte, np.short, np.intc, np.int_, # , np.longlong, NB: torch does not p...
Python
1
be hadoopX.X such as 'hadoop2.7' or 'without-hadoop'. hive_version : str Hive version. It should be hiveX.X such as 'hive2.3'. """ package_name = checked_package_name(spark_version, hadoop_version, hive_version) package_local_path = os.path.join(dest, "%s.tgz" % package_name) if "P...
Python
1
_level == 0 { return; } let params = Params::new(0, radix, raw_offset, max_level); ska_sort_rec(arr, params); } <gh_stars>1-10 mod choice; mod lazy; use choice::AtomicChoice; /// Current color state for a [`Stream`][crate::Stream] /// /// Note: if you hold onto this around calls to [`set`][crate...
Rust
0
s i32; let fx_pt_x2 = (v2.x + 0.5) as i32; let fx_pt_y0 = (v0.y + 0.5) as i32; let fx_pt_y1 = (v1.y + 0.5) as i32; let fx_pt_y2 = (v2.y + 0.5) as i32; let z0 = v0.z; let mut z1 = v1.z; let mut z2 = v2.z; // texture space let t0u = v0uv.x; ...
Rust
0
"text_model_dir"] attr_extractor = PromptAttributeExtractor2_5(model_dir=text_model_dir) # translate chn to eng if translation_services == "aliyun": # aliyun Translate_AK chn2eng = Chn2EngTranslation() chinese_prompt = chn2eng.translate_chn(text_prompt) elif translation_services ...
Python
1
Group<T> { pub fn new(inner: T) -> Self { ensure_updater(); Self { inner, last_flush_time: Cell::new(Instant::recent()), } } /// Flushes the inner metrics if at least 1 second is passed since last flush. pub fn may_flush_all(&self) -> bool { let r...
Rust
0
tree.push_front('b'); tree.push_back('c'); tree.insert(2, 'd'); tree.push_back('e'); tree.insert(3, 'f'); assert_eq!(tree.len(), 6); assert_eq!( tree.iter().copied().collect::<Vec<char>>(), ['b', 'a', 'd', 'f', 'c', 'e'].to_vec() ); ...
Rust
0
) { Some(tera) => tera, None => return None }, #[cfg(feature = "handlebars_templates")] handlebars: match inner::<Handlebars>(templates) { Some(hb) => hb, None => return None }, }) } pub(crat...
Rust
0
from .pmntr import PMNTR from .dbevnet import * from .maptr import *
Python
1
codegen mod parser_tests; mod syntax; use std::path::Path; use crate::{glue::fs2, Result}; pub use self::{parser_tests::generate_parser_tests, syntax::generate_syntax}; // const GRAMMAR_DIR: &str = "crates/ra_parser/src/grammar"; // const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/test_data/parser/inline/ok"; ...
Rust
0
[Hangul syllables][syllables]. /// /// Unicode Hangul Syllables is a Unicode block range from `U+AC00` to `U+D7AF`. Since [`char`][char] covers much larger range, /// there's a chance where char is not in a Hangul syllable. In that case, [`ParseSyllableError`](struct.ParseSyllableError.html) is returned. /// /// [syll...
Rust
0
y_downloaded): # d_file = ["1_M_IS_data.dat"] if already_downloaded else [] # if not already_downloaded: # monkeypatch.setattr(pd.Series, "to_csv", lambda *args, **kwargs: None) # monkeypatch.setattr(os, "listdir", lambda *args: d_file) # monkeypatch.setattr(pd, "read_csv", mock_read_csv_ubiq) #...
Python
1
// Constants representing the number of bytes in each instruction. const ABORT_BYTES: u32 = OP_BYTES; const COND_INST_BYTES: u32 = OP_BYTES + VALUE_BYTES + VALUE_BYTES; const UNCOND_JMP_BYTES: u32 = OP_BYTES + OFFSET_BYTES; const COND_JMP_BYTES: u32 = OP_BYTES + OFFSET_BYTES + VALUE_BYTES + VALUE_BYTES;...
Rust
0
{ return Err(ZxError::BUFFER_TOO_SMALL); } args.rd_bytes.write_array(rd_msg.data.as_slice())?; args.rd_handles .write_array(&proc.add_handles(rd_msg.handles))?; Ok(()) } pub fn sys_channel_call_finish( &self, deadline: Deadline, ...
Rust
0
"CD", "SD", "CD1", "ND1", "CD2", "OD1", "OD2", "ND2", "CE", "CE1", "NE1", "OE1", "NE2", "OE2", "NE", "CE2", "CE3", "NZ", "CZ", "CZ2", "CZ3", "CH2", "OH", "NH1", "NH2"] else: sidechain_atoms = ['N', 'CA', ...
Python
1
print('eval_text\n', eval_text[:5]) sample_image = images[:1] print('Use a sample: ', sess.run(output_eval_text_tensor, feed_dict={image_placeholder: sample_image})) print() print() total_loss = 0.0 if...
Python
1
if param_name.find("experts_fc1"+"."+str(i)) != -1: state_dict[prefix + param_name] = self.state_dict()[param_name.replace("experts_fc1"+"."+str(i), "fc1")] if param_name.find("experts_fc2"+"."+str(i)) != -1: state_dict[prefix + param...
Python
1
le as it streams). pub fn fetch(url: &str, cache_file: &Path) -> Result<Box<dyn Archive>, ArchiveError> { let (status, headers, response) = attohttpc::get(url).send()?.split(); if !status.is_success() { return Err(ArchiveError::HttpError(status)); } let compressed_size ...
Rust
0
# Copyright (c) 2014 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
Python
1
= Vec::new(); match self.command.search(search, "artist", &mut result) { Ok(_ok) => {} Err(error) => return Err(error), } let v: Value = serde_json::from_str(result.as_str()).unwrap(); let size = v["artists"]["items"].as_array().unwrap().len(); for x in 0...
Rust
0
tr: bool) -> Self { if rtr { Self(self.0 | (1 << Self::RTR_SHIFT)) } else { Self(self.0 & !Self::RTR_MASK) } } /// Returns the identifier. pub fn to_id(self) -> Id { if self.is_extended() { Id::Extended(unsafe { ExtendedId:...
Rust
0
iption') pub_date_elem = item.find('pubDate') if not title_elem or not link_elem: logger.warning("RSS条目缺少标题或链接") return None title = self.clean_text(title_elem.get_text()) url = link...
Python
1
emble:expr) => ( $crate::IResult::Done($i, $assemble()) ) ); /// `tuple!(I->IResult<I,A>, I->IResult<I,B>, ... I->IResult<I,X>) => I -> IResult<I, (A, B, ..., X)>` /// chains parsers and assemble the sub results in a tuple. /// /// The input type `I` must implement `nom::InputLength`. /// /// This combinator wi...
Rust
0
from odoo import models, fields, api class ResConfigSettiongsInhert(models.TransientModel): _inherit = "res.config.settings" pos_sh_pos_bag_charges = fields.Boolean( related="pos_config_id.sh_pos_bag_charges", readonly=False) pos_sh_carry_bag_category = fields.Many2one( related="pos_config...
Python
1
r => panic!("unexpected result: {:?}", r), } } #[test] fn all_devices() { assert_eq!( parse("all").unwrap(), vec![ Descriptor::Device { path: "/dev/ttyS0".into(), config: DEFAULT_CONFIG }, Descriptor::Device { path: "/dev/t...
Rust
0
usize], pub m_ulSteamIDOwner: uint64, } pub const RemoteStorageDownloadUGCResult_t_k_iCallback: RemoteStorageDownloadUGCResult_t__bindgen_ty_1 = RemoteStorageDownloadUGCResult_t__bindgen_ty_1::k_iCallback; #[repr(i32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum RemoteStorageDownloa...
Rust
0
[{ /// const $id1: bool = true; /// }] /// false = [{ /// const $id1: bool = false; /// }] /// } /// } /// } /// /// same_ident!(AN_IDENT, AN_IDENT); // Equal identifiers result in a true constant /// same_ident!(A_DIFFERENT_IDE...
Rust
0
# Problem: Hamming Distance - https://leetcode.com/problems/hamming-distance/ class Solution: def hammingDistance(self, x: int, y: int) -> int: z="0" a="" b="" count=0 while x>0: s=x%2 a+=str(s) x=x//2 print(a) while y>0:...
Python
1
# Copyright 2008-2024 pydicom authors. See LICENSE file for details. """Use pyjpegls <https://github.com/pydicom/pyjpegls> to decompress encoded *Pixel Data*. This module is not intended to be used directly. """ from typing import cast from pydicom import uid from pydicom.pixels.utils import _passes_version_check fro...
Python
1
def serialize(nodes): """Serialize nodes to CSS syntax. This should be used for :term:`component values` instead of just :meth:`tinycss2.ast.Node.serialize` on each node as it takes care of corner cases such as ``;`` between declarations, and consecutive identifiers that would otherwise parse b...
Python
1
ve_outputs: # qualitative # save the outputs and see the images for b in range(bs): save(out[b], os.path.join(SAVE_ROOT, f"out_{b}.jpg")) save(out_cv2[b], os.path.join(SAVE_ROOT, f"out_cv2_{b}.jpg")) save(out_scipy[b], os.path.join(SAVE_ROOT, f"out_scipy_{b}.j...
Python
1
ErkJggg==) """ '''Desenvolve um programa que recebe do usuário, o placar de um jogo de futebol (os gols de cada time) e informa se o resultado foi um empate, se a vitoria foi do primeiro ou do segundo time''' time1=input('Digite o nome do time 1') time2=input('Digite o nome do time 2') entradatime1=int(input(f'Digi...
Python
1
import numpy as np import matplotlib.pyplot as plt import bezier path = np.load('path.npy') num_point = len(path) path = path.T count = 0 curves = [] if num_point < 6: curves.append(bezier.Curve(path, degree=num_point-1)) else: # get the first curve count = 6 nodes = path[:, :count] curves.append(b...
Python
1
); Ok(()) })?; } self.frame_count = self.frame_count + 1; if self.frame_count == std::u64::MAX { self.frame_count = 1; } Ok(()) } fn handle_error(error: quicksilver::Error) { error!("Unhandled error: {:?}", error); ...
Rust
0
if kind.is_none() { item = unsafe { (*item).ifa_next }; continue; } let addr = nix_socketaddr_to_sockaddr(unsafe { (*item).ifa_addr }); let mask = nix_socketaddr_to_sockaddr(unsafe { (*item).ifa_netmask }); le...
Rust
0
; const CONTRIBUTE_AMOUNT: u128 = 20000000000000u128; const INITIAL_FEES: u128 = 1000000000000000u128; const INITIAL_AMOUNT: u128 = 1000000000000000u128; const LARGE_CAP: u128 = 1_000_000_000_000_000u128; const CAP: u128 = 1_000_000_000_000_000u128; const LEASE_START: u32 = 0; const LEASE_END: u32 = 7; const END_BLOCK:...
Rust
0
self) -> &str { "Confirm changes" } fn open_with<'ui, 'p>(&self, ui: &'ui Ui, modal: PopupModal<'ui, 'p>) -> PopupModal<'ui, 'p> { let modal = modal.always_auto_resize(true); let style = ui.clone_style(); let max_content_width = (ui.io().display_size[0] / 2.0) - 2.0 * (style.window_border_s...
Rust
0
\xe5\x03M\x8a\xf1\ d >N\x89e\x96Zn\xc9e\x97^~\x09f\ \x98NU\x19\xe5\x89W\x8a\xa9\x04\x99:\xa1\xc9f\x9b\ n\xbe\x09g\x9cr\xceIg\x9d\xa7XXf\x9e\x0e\ 0cg\x14\xe6\x09rf\x9f\x82\x0eJh\xa1\x86\x1e\ \x8ah\xa2\x8a\x8a\xa9\xa6\x9e\x9a-\xdaD\xa3\x81BJ\ i\xa5\x96^\x8ai\xa6\x9an\xca\xa9n\x8d:Z\xd7\ \xa4\x9d\xce\xb0\xe21\xa3\x9e\x8aj...
Python
1
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Field Service Reports - Sale', 'category': 'Services/Field Service', 'summary': 'Create Reports for Field service technicians', 'depends': ['industry_fsm_sale', 'industry_fsm_report'], 'data': [ 'views/pro...
Python
1
if there are outstanding events. #[must_use] pub fn has_events(&self) -> bool { self.events.has_events() } /// Get events that indicate state changes on the connection. This method /// correctly handles cases where handling one event can obsolete /// previously-queued events, or cause ...
Rust
0
#? Write a program to print terms in the Fibonacci sequence up to a maximum value. MAX_TERM_VALUE : int = 10000 def main() -> None: curr_term = 0 #? The 0th Fibonacci Number next_term = 1 #? The 1st Fibonacci Number while curr_term <= MAX_TERM_VALUE: print(curr_term) term_after_next: int...
Python
1
atch CUADRUPLOS.lock().unwrap().agregar_cuadruplo(&op, izq, der) { Ok(_) => (), Err(err) => { println!("{:?}", err); }, }; } use imtui; use imgui; use std::time::SystemTime; use std; fn main() { let mut imgui = imgui::Context::create(); imgui.set_ini_filename(None); let mut imtui = imt...
Rust
0
""" 模块加载器模块 """ import os import importlib import inspect from typing import List, Type, Dict, Any from app.log import logger from plugins.nexusinvitee.sites import _ISiteHandler class ModuleLoader: """ 模块加载器类 """ @staticmethod def load_site_handlers() -> List[Type[_ISiteHandler]]: "...
Python
1
t None: self._AttachedFlowGroup = [] for item in params.get("AttachedFlowGroup"): obj = DescribeFlowId() obj._deserialize(item) self._AttachedFlowGroup.append(obj) memeber_set = set(params.keys()) for name, value in vars(self).items...
Python
1
&&s[..l - 4]) { tokens.push(Word::Operator(Operations::AddressStore)); let peek = self.get_operator(&s[l - 3..]).unwrap(); tokens.push(peek); let operator = self.get_operator(&s[..l - 4]).unwrap(); tokens.push(operator); let...
Rust
0
61""#).is_err()); assert!(from_str(r#""2016-07-08T09:10:48,090""#).is_err()); assert!(from_str(r#""2016-07-08 09:10:48.090""#).is_err()); assert!(from_str(r#""2016-007-08T09:10:48.090""#).is_err()); assert!(from_str(r#""yyyy-mm-ddThh:mm:ss.fffffffff""#).is_err()); assert!(from_str(r#"20160708000000"...
Rust
0
34, 0x5E583F59E343D970), }, PointAffine { /* 5 */ x: GFp5::from_u64_reduce(0x0883BCD672D03A45, 0xBF9DA799E22B0280, 0x44844BD86742B4F4, 0x2A4187BE0A3291E4, 0x93EF3D4D5B9FEF68), u: GFp5::from_u64_reduce(0x9C628A98C225201A, 0xC3E274C30E326B21, 0xD20919EC01919CD1, 0x708BE53371B...
Rust
0
! { #[derive(Serialize, Deserialize)] pub struct ThemeMode: u32 { /// Product can choose a theme based on ambient cues. const AUTO = 0b00000001; } } #[derive(Debug, Clone, PartialEq, Copy, Serialize, Deserialize)] pub struct Theme { pub theme_type: Option<ThemeType>, pub theme_mode:...
Rust
0
one, Copy, Debug, PartialEq)] pub enum InitialClockState { NotSet, PreviouslySet, } /// The possible outcomes of an attempt to initialize and read the real time clock. #[derive(Clone, Copy, Debug, PartialEq)] pub enum InitializeRtcOutcome { NoDevices, MultipleDevices, ConnectionFailed, ReadNotA...
Rust
0
110.0390625, 110.083007812}}, {"6k3e7rk823cj", Box{-20.4825823568, -20.4825821891, -76.4916108549, -76.4916105196}}, {"kkv059k5v", Box{-18.2737398148, -18.2736968994, 18.4407663345, 18.4408092499}}, {"ep7x2t4t6x", Box{42.084068656, 42.0840740204, -40.0526118279, -40.052601099}}, {"43hh0", Box{-83.671875, -83.62792...
Rust
0
已修復問題 ({len(fixes_verified)}):") for fix in fixes_verified: print(f" {fix}") print(f"\n❌ 仍存在問題 ({len(issues_found)}):") for issue in issues_found: print(f" {issue}") total_checked = len(fixes_verified) + len(issues_found) success_rate = (len(fixes_verified) / total_check...
Python
1
lf.sample, ) except Exception: print(f"read_frames_av ERROR: {dataset_name}, {question_id}, {video_id}, {video_file}, {text_input}") pixel_values, frame_indices, fps, total_frame_num, duration = read_frames_decord( video_path = './experimen...
Python
1
成: {output_path}") return 0 except Exception as e: logger.error(f"搜索索引生成失败: {e}") return 1 def handle_tags_index(args) -> int: """处理 tags-index 命令。""" logger.info("开始生成标签索引") try: from ..generators.tags_index import TagsIndexGenerator generator = TagsIndexGene...
Python
1
_base_ = './retinanet_regnetx-3.2GF_fpn_1x_coco.py' model = dict( backbone=dict( type='RegNet', arch='regnetx_800mf', out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pytorch', init_cfg=dic...
Python
1
\ dummy_opaque_type3 as FileContextHandle ) ; }"; let file: syn::File = unwrap!(syn::parse_str(dummy_func_str)); for item in file.items { if let syn::Item::Fn(ref func) = item { let inputs: Vec<_> = func.decl.inputs.iter().cloned().collect();...
Rust
0
usize { let type_size = self.type_string().to_owned().write_size(version); type_size + match self { Self::Topic(s) => s.write_size(version), Self::CustomSpu(s) => s.write_size(version), Self::SpuGroup(s) => s.write_siz...
Rust
0
0x01 || salt; DB is an octet string of length // emLen - hLen - 1. db[em_len - s_len - h_len - 2] = 0x01; db[em_len - s_len - h_len - 1..].copy_from_slice(salt); // 9. Let dbMask = MGF(H, emLen - hLen - 1). // // 10. Let maskedDB = DB \xor dbMask. mgf1_xor(db, hash, &h); // 11. S...
Rust
0
fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } #[doc = "Edge A 0\n\nValue on r...
Rust
0
es.last_mut().unwrap(); last.true_positives += true_positive; last.false_positives += false_positive; } _ => { true_positives_false_positives.push(TruePositivesFalsePositivesPoint { probability: *probability, true_positives: true_positive, false_positives: false_positive, }...
Rust
0
S OR // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. use super::Result; use crate::store::SplitCheckTask; use configuration::{ConfigChange, ConfigManager, Configuration}; use EinsteinDB_util::config::Readable...
Rust
0
ols) if all_symbols: for s in all_symbols: value = all_symbols[s] print 'symbol', s, 'gets value', value u[name] = u[name].subs(s, value) u['exact'] = u['exact'].subs(s, value) print 'Numerical u_exact formula before plot:', u_exact comparison_plot(u, ...
Python
1
rtial(self.update_resource, self.utils[game], self.game_ui[game])) def show_game_detail(self,game_name): for game in self.GAME_LIST: if game == game_name: self.selected_game = game selected_game_widget = self.findChild(QWidget, "game_detail_"+game_na...
Python
1
print_result(result) except KeyboardInterrupt: print("\n🤖 Bye!") break # Example prompts to try out # Each prompt should ideally be solvable using the provided tools # You could adjust the tools summary to get more relevant results and # - consideration of the LLM tool selectio...
Python
1
import asyncio import os from typing import Callable from coagent.agents import ChatMessage, Model from coagent.agents.util import run_in_thread from coagent.core import ( AgentSpec, BaseAgent, Context, handler, new, init_logger, ) from coagent.runtimes import NATSRuntime from smolagents impor...
Python
1
m_rgba( 0xF0 as f32 / 255.0, 0x43 as f32 / 255.0, 0x59 as f32 / 255.0, 0.5f32, ); pub const WARNING: Color = Color::from_rgb(0xFF as f32 / 255.0, 0xa7 as f32 / 255.0, 0x0 as f32 / 255.0); pub const CANCEL: Color = Color::from_rgb( 0x34 as f32 / 255.0, 0x37 as f32 / 255.0, 0x3D as f32 /...
Rust
0
= 8.0; // set to 0.0 to turn off. pub struct NBodyBenchmark { time: usize, bodies: (Vec<Body>, Vec<Body>), } #[derive(Copy, Clone, Debug)] pub struct Body { pub position: Point3<f64>, pub velocity: Vector3<f64>, pub velocity2: Vector3<f64>, } impl NBodyBenchmark { pub fn new<R: Rng>(num_bodi...
Rust
0
SoftAsciiStr we can eliminate unessesary copies Shared(OwningRef<Arc<String>, str>) } impl InnerUtf8 { /// converts this container into on which uses underlying shared data /// /// if the data is already shared nothing is done. /// If not the owned data is converted into the underlying string buff...
Rust
0
""" Copyright 2020-2021 Mikhail Paulyshka 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 agre...
Python
1
# -*- coding: utf-8 -*- # Created on 2018-08-15 # author: 欧度智能,https://www.odooai.cn # email: 300883@qq.com # resource of odooai # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # Odoo在线中文用户手册(长期更新) # https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html # Odoo10离线中文用户手册下载 # https://www.odooa...
Python
1