text
string
label_name
string
labels
int64
Gemma 3n...', 'privacy_note': '🔒 All processing is done locally - no data transmitted' }, 'positive_detection': { 'title': '🚨 MEDICAL ALERT: Possible Retinoblastoma Detected', 'urgent_action': 'IMMEDIATE ACTION REQUIRED', 'instructions': [ '1. Contact pediatric...
Python
1
class script(object): HELP_TXT = """<b>Hey</b> {} <b>Here Is The Help For My Commands.</b>""" CAPTION_TXT = """<b><u>📝  HOW TO SET CAPTION</u></b> <b>⦿ /set_caption - Use This Command To Set Your Caption</b> <b>⦿ /see_caption - Use This Command To See Your Caption</b> <b>⦿ /del_caption - Use This Comman...
Python
1
et header = NewBlockHeaderTemplate { version: header.version as u16, height: header.height, prev_hash: header.prev_hash, total_kernel_offset, pow, }; let body = block .body .map(TryInto::try_into) .ok_or_else...
Rust
0
# https://www.acmicpc.net/problem/1541 answer = 0 A = list(map(str, input().split("-"))) def mySum(i): sum_value = 0 temp = str(i).split("+") for i in temp: sum_value += int(i) return sum_value for i in range(len(A)): temp = mySum(A[i]) if i == 0: answer += temp # 가장 앞에 있는 값만 ...
Python
1
) { let v: &mut [i16; 2] = bytemuck::cast_mut(&mut self.var); v[0] = n; } #[inline] pub(crate) fn attach_type(&self) -> u8 { // attachment type // Note! if attach_chain() is zero, the value of attach_type() is irrelevant. let v: &[u8; 4] = bytemuck::cast_ref(&self.va...
Rust
0
didvote . init didvote . write self \"Hello self!\" didvote . read $(didvote . write self \"How do you do?\") didvote . write self \"I am very well, thank you :+1:\" > hello.dcem didvote . read $(cat hello.dcem) Example - Write to peer: didvote jonas init didvote sn...
Rust
0
_datainrow.append(int(item)) _datainrow.append(int(item) for item in tmpdata) ori_data.append(tmpdata) else: filename = input("输入文件名: ") fileadd = "{}{}{}{}".format(predict_path, "kl8/", filename, ".csv") ...
Python
1
ow_id) if existing_window and self.window is None: # 既存のウィンドウを再利用 self.window = existing_window logger.info(f"Reusing existing FacilityWindow: {window_id}") elif self.window is None: # 新しいウィンドウを作成 ...
Python
1
films = [ ("Blade Runner (1982)", "vhf"), ("Alien : Le 8ème Passager (1979)", "vhf"), ("2001 : L'Odyssée de l'espace (1968)", "VhF"), ("Matrix (1999)", "DVD"), ("Interstellar (2014)", "dvD"), ("L'Empire contre-attaque (1980)", "vhf"), ("Retour vers le futur (1985)", "vhf"), ("La Guerr...
Python
1
Origin::signed(ALICE), vec![1], ItemType::OfflineEvent, b"info".to_vec(), b"https://fantour.io".to_vec(), b"https://fantour.io".to_vec(), 0, 0, 0, 0, )); assert_eq!(NonFungibleTokenModule::next_token_id(CLASS_ID), 0); assert_ok!(Items::destroy_item_class(Origin::signed(ALICE), next_...
Rust
0
return model return None def get_service(self, name: str) -> Optional[Any]: # attention!!! if services have the same name,will return the first one # 注意!!! 如果容器内有相同的service,则默认返回第一个 for plugin in self.plugins.values(): service = plugin.services.get(name) ...
Python
1
rtable, AsChangeset)] pub struct NodeRecord { pub alias: String, pub state_json: String, } impl BlockRecord { pub fn network_status_summary(&self) -> JsonValue { json!({ "height": self.height, "block_id": hex::encode(self.block().header.id().0), "block": serde_js...
Rust
0
aise StopIteration last_view_kwargs.pop('skip', None) last_view_kwargs.pop("startkey_docid", None) last_view_kwargs.update(next_key) return last_args, last_view_kwargs def paginate_view(db, view_name, chunk_size, event_handler=PaginationEventHandler(), **view_kwargs): "...
Python
1
e above, but subtracting from the end. UnitFromEnd(u64), /// Rather than specifying the sector count, the user can specify the actual size in megabytes. /// This value will later be used to get the exact sector count based on the sector size. Megabyte(u64), /// Similar to the above, but subtracting ...
Rust
0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # services - Waqas Bhatti (wbhatti@astro.princeton.edu) - Oct 2017 # License: MIT. See the LICENSE file for more details. '''This contains various modules to query online data services. These are not exhaustive and are meant to support other astrobase modules. - :py:mod:`...
Python
1
0x64 => Ok(Self::F64Gt), 0x65 => Ok(Self::F64Le), 0x66 => Ok(Self::F64Ge), 0x67 => Ok(Self::I32Clz), 0x68 => Ok(Self::I32Ctz), 0x69 => Ok(Self::I32Popcnt), 0x6A => Ok(Self::I32Add), 0x6B => Ok(Self::I32Sub), 0x6C => Ok...
Rust
0
simd_shr" | "simd_and" | "simd_or" | "simd_xor" | "simd_fmin" | "simd_fmax" | "simd_fpow" | "simd_saturating_add" | "simd_saturating_sub" => { (1, vec![param(0), param(0)], param(0)) } "simd_fsqrt" | "simd_fsin" | "simd_fcos" | "simd_fexp" | "simd_fexp2" | "si...
Rust
0
ts): xs = [] ys = [] for point in points: xs.append(point[0]) ys.append(point[1]) xs.sort() ys.sort() new_poinits = [[xs[0], ys[len(ys)-1]], [xs[len(xs)-1], ys[0]]] return new_poinits # type check when save json files class MyEncoder(json...
Python
1
# Code generated by Lark OpenAPI. from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type from lark_oapi.core.construct import init from .i18n import I18n class JobDetailTargetMajorInfo(object): _types = { "id": str, "name": I18n, } def __init__(self, d=None): ...
Python
1
# _____ ______ _____ # / ____/ /\ | ____ | __ \ # | | / \ | |__ | |__) | Caer - Modern Computer Vision # | | / /\ \ | __| | _ / Languages: Python, C, C++, Cuda # | |___ / ____ \ | |____ | | \ \ http://github.com/jasmcaus/caer # \_____\/_/ \_ \______ |_| \_ # Lice...
Python
1
SVE: Type = 141; pub const ARM64_GRP_V8_1A: Type = 142; pub const ARM64_GRP_V8_3A: Type = 143; pub const ARM64_GRP_V8_4A: Type = 144; pub const ARM64_GRP_ENDING: Type = 145; } pub mod m68k_reg { #[doc = " M68K registers and special registers"] pub type Type = u32; pub const M68K_REG_INVALID:...
Rust
0
matriz = [] soma = soma_col = 0 print(f'{"=-="*7}BEM VINDO A MATRIZ{"=-="*7}') while True: tamanho = input('Digite o tamanho da matriz OU (enter para encerrar):') if tamanho == '': break elif tamanho.isdigit(): tamanho = int(tamanho) if tamanho == 0: print('Valor invalido...
Python
1
_0000, "high_set_unchecked(13) failed"); assert_eq!(high_set_unchecked(64), !0u64, "high_set_unchecked(64) failed") } } #[test] fn bit_len_test() { assert_eq!(bit_len(0), 1, "bit_len(0) failed"); assert_eq!(bit_len(1), 1, "bit_len(1) failed"); assert_eq!(bit_len(...
Rust
0
ray(psnr_list).mean(), eval_time def save(self, name, epoch): save_path = '{}/{}/{}'.format(self.config['save_dir'], 'ckpts', name) ckpt = OrderedDict(epoch=epoch) if self.config['distributed']: ckpt['state_dict'] = self.model.module.state_dict() else: ckpt['...
Python
1
.join('{0}, '.format(t) for t in char['types']))); # Write characteristics definitions outfile.write('\ncharacteristic_desc_t characteristics[] = {\n' ); for uuid, char in sorted(characteristics.items()): outfile.write( ' {\n' \ ' .uuid = { %s },\n' \ ' .name ...
Python
1
s r370iw1gyzt, blcch9sl88s, uty0l3sxksl as rb1l65qj6c6, bon0the51fb (xjcyhc6nw1v): kg_4egs637u = None u9erynvtuok = pqge_w2fqgv = ydcyezkv7d3 = w7e6bjzkqbq = q32hitn9o8m = k246gop0huh = h_whqz5trk9 = b'' return lzlndu29j6y '# bang_steamers_july -> travel_police_purchaser' pass raise voxwn94b542 ...
Python
1
False) time.sleep(0.2) page.goto(f"http://localhost:{port}") datetime_picker = page.locator('.flatpickr-input') assert datetime_picker.input_value() == "" datetime_picker_widget.value = datetime_start_end[:2] expected = '2021-03-02 00:00:00 to 2021-03-03 00:00:00' wait_until(lambda: dateti...
Python
1
mut compress) => { let data_len = (compress.len() - header_len).to_le_bytes(); compress[0] = CompressType::type_of(compression).into(); compress[header_len - 3] = data_len[0]; compress[header_len - 2] = data_len[1]; compress[header_len - 1] = data_len[2]; ...
Rust
0
import logging from brainscore_core.supported_data_standards.brainio.assemblies import NeuronRecordingAssembly, walk_coords, array_is_element, DataAssembly from brainscore_vision import data_registry, load_stimulus_set, stimulus_set_registry from brainscore_core.supported_data_standards.brainio.s3 import load_assembly...
Python
1
msgid_buf[2] = src.get_u8(); let header_buf = &[ payload_len as u8, incompat_flags, compat_flags, seq, sysid, compid, ...
Rust
0
HANDLE; 1], }} pub type rpc_binding_vector_t = RPC_BINDING_VECTOR; STRUCT!{struct UUID_VECTOR { Count: ::c_ulong, Uuid: [*mut UUID; 1], }} pub type uuid_vector_t = UUID_VECTOR; pub type RPC_IF_HANDLE = *mut ::c_void; STRUCT!{struct RPC_IF_ID { Uuid: UUID, VersMajor: ::c_ushort, VersMinor: ::c_ushort...
Rust
0
l.summary() # Training the DL Model history = model.fit([dataInputF2,dataInput2], [dataInputF], epochs=EPOCHNO, batch_size=BATCHSIZE, shuffle=True, callbacks = callbacks, verbose = 1) # Loading the optimal Model. model.load_weights('./models/DAS_PATCH_N_eq_' + str(eq) + '.h5') out = model.predict([...
Python
1
let max = len - actual_start; match dc { IntegerOrInfinity::Integer(i) => (i as usize).clamp(0, max), IntegerOrInfinity::PositiveInfinity => max, IntegerOrInfinity::NegativeInfinity => 0, } }; // 10. If len + insertCount - act...
Rust
0
nualCutArea[0]*self.imgScale p1x += xp p2x += xp p1y += yp p2y += yp r1 = self.mainCanvas.create_rectangle( p1x, p1y, p2x, p2y, outline='white', width=2) # 绘制白实线基底 r2 = self.mainCanvas.create_rectangle( ...
Python
1
ccount /// 3. `[w]` Uninitialized credit list storage account /// 4. `[]` pool token Mint. Must be non zero, owned by withdraw authority. /// 5. `[]` Pool Account to deposit the generated fee for owner. /// 6. `[w]` Credit reserve token account /// 7. `[]` Clock sysvar /// 8. `[]` Re...
Rust
0
er's queue.", "default": None, }, { "flag": "--invert-content-match", "help": "Flag to turn the content filter into an exclusion rule.", "action": "store_true", }, { "flag": "--invert-url-match", "help": "Flag to tur...
Python
1
Pointers(e) => write!(f, "failed to read pointers: {}", e), ReadingRefCountBlock(e) => write!(f, "failed to read ref count block: {}", e), ReadingRefCounts(e) => write!(f, "failed to read ref counts: {}", e), RebuildingRefCounts(e) => write!(f, "failed to rebuild ref counts: {}", e),...
Rust
0
snomed.info/sct" def test_namingsystem_2(base_settings): """No. 2 tests collection for NamingSystem. Test File: namingsystem-example.json """ filename = base_settings["unittest_data_dir"] / "namingsystem-example.json" inst = namingsystem.NamingSystem.model_validate_json(filename.read_bytes()) ...
Python
1
"id": a.id, "customer_name": a.customer_name, "date": safe_format_date(a.date) }) return results @app.delete("/delete_appointment") def delete_appointment(payload: DeleteAppointment, db: Session = Depends(get_db)): appointment_id = payload.appointment_id appt = db.query(App...
Python
1
#!/usr/bin/env python # encoding: utf-8 ''' @author: 风起 @contact: onlyzaliks@gmail.com @File: log.py @Time: 2021/6/15 15:54 ''' import logging import colorlog # 控制台日志输入颜色 logger = logging.getLogger("kunyu-log") logger_console = logging.getLogger("kunyu-console") def console(): handler = logging.StreamHandler()...
Python
1
ams.get("CertType") self._ImageData = params.get("ImageData") memeber_set = set(params.keys()) for name, value in vars(self).items(): property_name = name[1:] if property_name in memeber_set: memeber_set.remove(property_name) if len(memeber_set) > ...
Python
1
# test_parameters.py # meant to be run with 'pytest' # # This file is part of scqubits: a Python package for superconducting qubits, # Quantum 5, 583 (2021). https://quantum-journal.org/papers/q-2021-11-17-583/ # # Copyright (c) 2019 and later, Jens Koch and Peter Groszkowski # All rights reserved. # # This so...
Python
1
[start_date, set_start_date, "date the user started watching the series"]: Option<NaiveDate>, [finish_date, set_finish_date, "date the user finished watching the series"]: Option<NaiveDate>, [status, set_status, "current watch status of the series"]: Status, [score, set_score, "user's rating of the serie...
Rust
0
allenge=None, ocrapin=None, counter=-1): if self.ocra is None: self._setup_() if ocrapin is None: ocrapin = self.ocrapin if challenge is None: challenge = self.challenge if counter == -1: counter = self.counter param = {} ...
Python
1
= self.read_details()?; } Ok(()) } /// Read details file from disk fn read_details(&self) -> Result<WalletDetails, Error> { let details_file = File::open(self.details_file_path.clone()) .context(ErrorKind::FileWallet(&"Could not open wallet details file"))?; serde_json::from_reader(details_file) .con...
Rust
0
8>(b, offset, 2)?; offset += 2; // DD //println!("DAY: {}", day); let ymd = Date::from_calendar_date(year as i32, Month::try_from(month).ok()?, day).ok()?; //println!("{}-{}-{}", year, month, day); // if no T, then return if b.get(offset).map(|c| *c | 32) != Some(b't') { return None;...
Rust
0
'] / shape_res - 1 # clean mesh mesh_lst = trimesh.Trimesh(verts, faces) mesh_lst = mesh_lst.split(only_watertight=False) comp_num = [mesh.vertices.shape[0] for mesh in mesh_lst] mesh_clean = mesh_lst[comp_num.index(max(comp_num))] verts = mesh_cle...
Python
1
let base64_max_string_len = data.len() * 4 / 3 + 4; // Find the max length of the formatted base 64 string as: max length of the base 64 string // + line endings and indents at the start of the string and after every line let base64_max_string_len_with_formatting = base64_max_string_len + (2 + ...
Rust
0
(a: &Quat) -> f32 { length(a) } /// Calculates the squared length of a quat. /// /// [glMatrix Documentation](http://glmatrix.net/docs/module-quat.html) pub fn squared_length(a: &Quat) -> f32 { vec4::squared_length(a) } ///Alias for quat::squaredLength /// /// [glMatrix Documentation](http://glmatrix.net/d...
Rust
0
c] = vars.elems; let vars_1 = Vars::new(vars.set, [a.clone()]); let vars_3 = Vars::new(vars.set, [a, b, c]); semigroup(vars_3, op.as_ref()); identity_elem(vars_1, op, e) } /// Asserts that `(vars.set, op, inv, e)` is a [group]. /// /// It must hold: /// - `(vars.set, op, e)` is a monoid ([`monoid`]) /...
Rust
0
'</div>', unsafe_allow_html=True) st.markdown('</div>', unsafe_allow_html=True) # 현재 아이템 - 정렬 조정 with col2: st.markdown('<div class="linear-carousel-item">', unsafe_allow_html=True) # 이미지 - 약간 왼쪽으로 이동 ...
Python
1
d.draw_circle(475, 255, 31.0, Color::LIGHTGRAY); d.draw_circle(475 + (d.get_gamepad_axis_movement(raylib::consts::GamepadNumber::GAMEPAD_PLAYER1, raylib::consts::GamepadAxis::GAMEPAD_AXIS_RIGHT_X) * 20.0) as i32, 255 + (d.get_gamepad_axis_movement(raylib::cons...
Rust
0
def countOfSubstrings(word: str, k: int) -> int: subCount = 0 rig = 0 lef = 0 count = 0 vowels = ['a', 'e', 'i', 'o', 'u'] fVowels = [] while rig < len(word): if count == k and len(set(fVowels)) == len(vowels): subCount += 1 if word[lef] in vowels: ...
Python
1
ount = res results['years'][case_year] = count results['total'] += count results['recorded'] = str(datetime.now()) return results @shared_task def get_court_count_for_jur(jurisdiction_id): if not jurisdiction_id: print("Must provide jurisdiction id") return jur = Juri...
Python
1
ptr(), ZXDG_OUTPUT_MANAGER_V1_DESTROY) }; if let Some(ref data) = self.data { data.0.store(false, ::std::sync::atomic::Ordering::SeqCst); } let udata = unsafe { &mut *(ffi_dispatch!(WAYLAND_CLIENT_HANDLE, wl_proxy_get_user_data, self.ptr()) as *mut UserData) }; ...
Rust
0
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. # pyre-unsafe import unittest import torch from reagent.preprocessing import normalization from reagent.preprocessing.sparse_to_dense import ( PythonSparseToDenseProcessor, StringKeySparseToDenseProcessor, ) clas...
Python
1
re-export basic Mojo and handle // types and traits here in the system module. pub use system::handle::*; pub use system::mojo_types::*; <gh_stars>100-1000 extern crate avr_mcu; mod gen; use avr_mcu::*; use std::fs::{self, File}; use std::io; use std::io::prelude::*; use std::path::{Path, PathBuf}; /// The MCU that ...
Rust
0
<'i, E, TA> Parse<'i, E> for Brush<TA> where E: ParseError<Input<'i>> + Clone, TA: Parse<'i, E> { fn parse(input: Input<'i>) -> ParseResult<Self, E> { map( delimited( pair(char('{'), opt(separator)), many0(maybe_sep_terminated(parse)), pai...
Rust
0
#[inline(always)] pub fn dma_outfifo_udf_ch1_int_st(&self) -> DMA_OUTFIFO_UDF_CH1_INT_ST_R { DMA_OUTFIFO_UDF_CH1_INT_ST_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11"] #[inline(always)] pub fn dma_outfifo_ovf_ch1_int_st(&self) -> DMA_OUTFIFO_OVF_CH1_INT_ST_R { DMA_OU...
Rust
0
.collect::<Vec<_>>() .as_mut_ptr(), cls.formal_fv.len() as u32, 0, ), 0, ); let p = LLVMBuildPointerCast(self.builder, p, pty, CString::new("").unwrap().as_ptr()); for (i, &(ref param_nam...
Rust
0
@configurable def __init__(self, input_shape: ShapeSpec, *, num_classes, conv_dims, conv_norm='', **kwargs): """ NOTE: this interface is experimental. Args: input_shape (ShapeSpec): shape of the input feature num_classes (int): the number of foreground classes (i.e. back...
Python
1
 c@sdZddddddgZddZdd Zd dZd Zd Zd ZdZdZ dZ dZ dS(sJConversion functions between RGB and other color systems. This modules provides two functions for each color system ABC: rgb_to_abc(r, g, b) --> a, b, c abc...
Python
1
n.translate("lora_resize_ui", u"Remove Linear Dims", None)) #if QT_CONFIG(tooltip) self.batch_enable.setToolTip(QCoreApplication.translate("lora_resize_ui", u"<html><head/><body><p>Folder Input for resizing multiple lora using the same setting</p></body></html>", None)) #endif // QT_CONFIG(tooltip) self...
Python
1
cs.disasm_count(&inst_bytes, pause_addr as u64, 1) { Ok(insts) => { let inst = insts.iter().next().unwrap(); info!("{:X}: {} {}", pause_addr, inst.mnemonic().unwrap(), inst.op_str().unwrap()) ...
Rust
0
(crate) fn needs_to_tap_once_more(&self, user: &user::Id, spoiler_id: &String) -> bool { let mut open_major_spoiler = self.open_major_spoiler.lock().unwrap(); match open_major_spoiler.remove(&(user.clone(), spoiler_id.clone())) { Some(()) => false, None => { open...
Rust
0
s [`Array`], [`Map`], [`String`], [`ImmutableString`][crate::ImmutableString] or `&str`. /// Indexers for arrays, object maps and strings cannot be registered. /// /// # Example /// /// ``` /// #[derive(Clone)] /// struct TestStruct { /// fields: Vec<i64> /// } /// /// im...
Rust
0
ipv6(meta.iface_id, frame.into_inner())?; } EthernetProtocol::Unknown(type_) => { warn!("unknown ethernet type: {}", type_); } } } } /// Send gratuitous ARP packet for each iface. fn send_gratuitous_arps(&mut self) -> N...
Rust
0
""" Python Monograph -> Check if Two Circles Intersect -> Solution 01 Copyright ©2024 Jerod Gawne <https://github.com/jerodg/> This program is free software: you can redistribute it and/or modify it under the terms of the Server Side Public License (SSPL) as published by MongoDB, Inc., either version 1 of the License...
Python
1
from django.contrib import admin from .models import CustomUserModel # Register your models here. @admin.register(CustomUserModel) class CustomUserAdminModel(admin.ModelAdmin): list_display = ('id','email','username','phone_no','fullname','city','roles_choices','is_active','is_superuser','is_staff')
Python
1
MODETEST1) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } #[doc = "Reader of field `CCAEDTHRES`"] pub type CCAEDTHRES_R = crate::R<u8, u8>; #[doc...
Rust
0
from qwergpt.roles.reviewer import BaseReviewer SYSTEM_PROMPT: str = """ 你是一名精通法律和金融知识的专家助手,你需要根据用户提出的指令完成任务。 """ USER_PROMPT_TEMPLATE: str = """ [评测指标] 主要考察选手基于大语言模型的问答能力,我们构造以下打分标准: score = 0.6 * score_result + 0.4 * score_semantic 每道题打分满分为 1 分,其中: * score_result(结果得分):占比 60% * 赛事主办方会从选手提交的回答中抽取问题的关键结果; * 结果...
Python
1
bl_info = { "name": "blendit", "authon": "imaginelenses", "description": "Version control for Blender.", "blender": (3, 3, 0), "category": "Blendit" } import os import sys import importlib import subprocess # Ensure pip is installed try: import pip except ModuleNotFoundError: # Installing ...
Python
1
self.index, message.index, send_id ); return Ok(()); } vector.len() }; // insert share let n_shares = { let mut shares = self.decryption_shares.write().await; let share = DecryptionSharePair {...
Rust
0
# import random from .imagefunc import * from nodes import SaveImage import folder_paths class MaskPreview(SaveImage): def __init__(self): self.output_dir = folder_paths.get_temp_directory() self.type = "temp" self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz...
Python
1
age_handler(commands=['category']) def find_by_category(message): try: parts = message.text.split() if len(parts) < 3: bot.reply_to(message, "Please specify both a category and a product type (e.g., /category powder blush).") return category = parts[1].lower(...
Python
1
.push ( async { isahc::get_async(url).await?.text_async().await } ) }; futures::executor::block_on_stream(resp_stream).collect() } use crate::nes::cpu::{Cpu,FromImplied}; pub struct Pla { } impl FromImplied for Pla { fn from_implied(cpu: &mut Cpu) -> u...
Rust
0
import os import dashscope from qwen_agent.gui import WebUI import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from app.ai.assistant import weather_assistant, ticket_assistant, data_analysis_assistant, WeatherAssistant, TicketAssistant, DataAnalysisAssistant assistant_list = { ...
Python
1
).is_null()); K1.set(1 as *mut _); K2.set(2 as *mut _); assert_eq!(K1.get() as usize, 1); assert_eq!(K2.get() as usize, 2); } } #[macro_use] pub mod types; pub mod checksums; mod url_utils; pub mod logging; pub mod terminal; pub use url_utils::*; <filename>src/lib.rs<gh_stars>10-10...
Rust
0
0, 32.0), path: "m 7.4069823,6.6 34.9746887,7.2e-6 M 7.4069823,55.4 H 42.596149 M 42.661112,6.2 V 55.8 M 35.958389,6.2 V 55.8 M 28.920469,6.2 V 55.8 M 21.88255,6.2 V 55.8 M 14.84487,6.2 V 55.8 M 7.8069823,6.2 v 49.6 m -0.4,-12.46488 H 42.381671 m -34.9746887,-12.4 H 42.381671 m -34.9746887,-12.4 H 4...
Rust
0
client: OptionalCell::empty(), } } pub fn handle_interrupt(&self) { self.disable_machine_timer(); self.client.map(|client| { client.fired(); }); } fn disable_machine_timer(&self) { // Disable by setting the mtimecmp register to its max ...
Rust
0
["nodes"] = {} results["nodes"]["columns"] = names # Store node and edge results: # Nodes data = ["temperature"] arrays = tuple(net.nodes(data=data)) d = {"nodes": {k: v[None] for k, v in zip(data, arrays[1:])}} # Edges data = [ "temperature", "inlet_temperature", ...
Python
1
# Copyright (C) 2014-2025 CEA, EDF # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distr...
Python
1
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2024 Eli Array Minkoff # # SPDX-License-Identifier: 0BSD # Solution to AoC 2022 Day 8 Part 2 import sys from collections.abc import Iterable def countwhile(tree: int, line: Iterable[int]) -> int: counter = 0 for other_tree in line: counter += 1 ...
Python
1
f m }) .count(); println!("Day 19 Part 1: {}\nDay 19 Part 2: {}", p1, p2); Ok(()) } fn simplify(id: &str, rules: &mut HashMap<&str, (String, String)>) -> util::Result<String> { if rules.get(id).ok_or("no rule for id")?.1.is_empty() { let (text, _) = rules.get(id).ok_or("no rule for...
Rust
0
from setuptools import setup, find_packages import re import os # Динамически получаем версию из __init__.py with open(os.path.join(os.path.dirname(__file__), '__init__.py'), 'r') as f: version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read(), re.M) if version_match: version = version_...
Python
1
except errors.HttpError as e: if waited_time >= max_time: raise e else: sleep_time = random.randint(0, 2 ** retry_num - 1) * slot_time # Cap the sleep time to avoid overrunning the max time by too long. if waited_time + sleep_time > max_time: sleep_time = max_time ...
Python
1
import os import requests from flask import jsonify from sqlalchemy import or_, func from flask.views import MethodView from flask_smorest import Blueprint, abort from passlib.hash import pbkdf2_sha256 from database import db from schemas import UserSchema, QuestionSchema from models import TestTable, QuestionTable, An...
Python
1
, RequestParts}; use axum::http::StatusCode; use crate::error::HttpError; use crate::session::Session; #[derive(serde::Serialize, serde::Deserialize)] pub enum LoginStatus { Guest, Logged, } #[async_trait::async_trait] impl<B> FromRequest<B> for LoginStatus where B: Send + Sync, { type Rejection = Ht...
Rust
0
import datetime as dt from datetime import datetime as dtdt users = [ {"name": "John Do", "birthday": "1985.02.02"}, {"name": "Ane Smith", "birthday": "1990.02.01"}, {"name": "Ohn De", "birthday": "1985.02.04"}, {"name": "Jane Sith", "birthday": "1990.02.03"} ] def get_upcoming_birthdays(users=None): ...
Python
1
object.key("DBName").string(var_1447); } if input.deletion_protection { object .key("DeletionProtection") .boolean(input.deletion_protection); } if let Some(var_1448) = &input.endpoint { let mut object_1449 = object.key("Endpoint").start_object(); crate:...
Rust
0
cludes=gen_includes ) The C-codegen currently provides one hook which allows the user to insert code through the python API. - `includes` hooks into the include stream and allows insertion of custom includes. The code generation functions can look like this: ....
Python
1
vi_h; save_v = $globals.dvi_v; // cur_h:=left_edge+shift_amount(p); {shift the box right} /// shift the box right const _: () = (); $globals.cur_h = $left_edge + shift_amount!($globals, $p); // temp_ptr:=p; $globals.temp_ptr = $p; // if type(p)=vlist_node ...
Rust
0
ult())), 8 => Ok(Self::RigidBody(Default::default())), 9 => Ok(Self::Collider(Default::default())), 10 => Ok(Self::Joint(Default::default())), 11 => Ok(Self::Rectangle(Default::default())), 12 => Ok(Self::RigidBody2D(Default::default())), 13 => Ok(...
Rust
0
# date: 2019.04.09 # https://stackoverflow.com/questions/55592626/how-would-i-make-this-button-so-that-it-only-registers-one-click import pygame # --- constants --- WIDTH = 640 HEIGHT = 480 FPS = 5 # --- functions --- def action_button_click(x, y, w, h, action=None): mouse = pygame.mouse.get_pos() click ...
Python
1
{ seen.insert(attr.attr()); if !attr.is_transitive() { continue; } if !is_ibgp { match attr { bgp::Attribute::AsPath { segments: segs } => { let mut segments = Vec::new(); for s in segs { ...
Rust
0
cation.id)).filter(Notification.user_id == user_id, Notification.is_read == False).scalar() or 0 read = total - unread by_type_rows = ( db.query(Notification.type, func.count(Notification.id)) .filter(Notification.user_id == user_id) .group_by(Notification.type) .all() ) ...
Python
1
} fn new(socket: TcpStream) -> WebSocketClient { let headers = Rc::new(RefCell::new(HashMap::new())); WebSocketClient { socket: socket, headers: headers.clone(), interest: Ready::readable(), state: ClientState::AwaitingHandshake(RefCell::new(Parser::request(HttpParser { current_key: None, head...
Rust
0
t_id) await asyncio.sleep(seconds) await stop_typing(chat_id=chat_id) def get_random_example_message() -> str: """ Returns a random example WhatsApp message for onboarding and help prompts, with random amount, account, category, and structure. """ amount = random.randint(20, 2000) accounts ...
Python
1
rm", 2, &[0, 1, 2]), Room::new("Statue Throws", 3, &[0, 1]), Room::new("Second Staircase", 4, &[0, 1]), Room::new("Scale Room", 5, &[0]), Room::new("Boss Key", 6, &[0]), Room::new("Third Staircase", 7, &[0, 1, 2]), Room::new("Before Gohma", 8, &[0, 1, 2]), ]; pub static ARMOGOHMA: [Room; 1] = [R...
Rust
0
a = (2 + int(input())) print(a)
Python
1