text
string
label_name
string
labels
int64
const GLvoid, basevertex: GLint, ); } extern "C" { pub fn glDrawElementsInstancedBaseVertex( mode: GLenum, count: GLsizei, type_: GLenum, indices: *const GLvoid, instancecount: GLsizei, basevertex: GLint, ); } extern "C" { pub fn glMultiDrawElement...
Rust
0
import unittest from nuplan.database.nuplan_db.nuplan_db_utils import ( SensorDataSource, get_camera_channel_sensor_data, get_lidarpc_sensor_data, ) class TestSensorDataSource(unittest.TestCase): """Tests for the SensorDataSource class.""" def test_initialization(self) -> None: """Tests ...
Python
1
Management_Ndis'*"] pub const OID_FFP_SUPPORT: u32 = 4227924496u32; #[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"] pub const OID_GEN_ADMIN_STATUS: u32 = 66184u32; #[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"] pub const OID_GEN_ALIAS: u32 = 66185u32; #[doc = "*Required features: 'Win32_N...
Rust
0
[derive(Debug)] pub struct LongformerLMHead { dense: nn::Linear, layer_norm: nn::LayerNorm, decoder: nn::Linear, bias: Tensor, } impl LongformerLMHead { pub fn new<'p, P>(p: P, config: &LongformerConfig) -> LongformerLMHead where P: Borrow<nn::Path<'p>>, { let p = p.borrow()...
Rust
0
t, pub properties: *mut XFontProp, pub min_bounds: XCharStruct, pub max_bounds: XCharStruct, pub per_char: *mut XCharStruct, pub ascent: c_int, pub descent: c_int, } #[repr(C)] pub struct XTextItem { pub chars: *mut c_char, pub nchars: c_int, pub delta: c_int, pub font: Font, } ...
Rust
0
eap_spec)?; Ok(Some(OwnedLinearMemorySpec { heap: heap_spec, initializer: sparse_data, })) } else { Ok(None) } } fn declare_globals_spec(info: &ModuleInfo<'a>) -> Result<Vec<GlobalSpec<'a>>, LucetcError> { let mut glob...
Rust
0
INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS ...
Rust
0
from encoder.data_objects.random_cycler import RandomCycler from encoder.data_objects.speaker_batch import SpeakerBatch from encoder.data_objects.speaker import Speaker from encoder.params_data import partials_n_frames from torch.utils.data import Dataset, DataLoader from pathlib import Path # TODO: improve with a poo...
Python
1
client_id: jpg.client_id.clone(), event_id: EventId::new(), game_id: jpg.game_id.clone(), session_id: jpg.session_id.clone(), })) { error!("Error writing private game rejection to stream {:?}", e) ...
Rust
0
emove('active'); }); event.target.classList.add('active'); console.log('排序方式:', type); // Sort detail table if visible const tbody = document.querySelector('.detail-table tbody'); if (tbody && tbody.querySelectorAll('tr')....
Python
1
# ckwg +29 # Copyright 2020 by Kitware, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditi...
Python
1
= false; for section in module.sections() { match *section { Section::Name(ref name_section) => { match *name_section { NameSection::Function(ref function_name_section) => { assert_eq!( function_name_section.names().get(0).expect("Should be entry #0"), "elog" ); ...
Rust
0
from animal import Animal animal1 = Animal("Lejon", 12) animal2 = Animal("Tiger", 11) animal3 = Animal("Krokodil", 15) print(animal1) print(animal2) print(animal3)
Python
1
urity_Cryptography_Certificates\"`*"] pub const wszREGEXITTITLEFORMAT: &str = "TitleFormat"; #[doc = "*Required features: `\"Win32_Security_Cryptography_Certificates\"`*"] pub const wszREGFILEISSUERCERTURL_OLD: &str = "FileIssuerCertURL"; #[doc = "*Required features: `\"Win32_Security_Cryptography_Certificates\"`*"] pu...
Rust
0
""" Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) """) def dylib_info(filename): """ A dylib name can take one of the ...
Python
1
save_dir, '*.jpg')) if len(imgnames) == 0: logger.info('No output images to save for video') return img = cv2.imread(os.path.join(save_dir, '00000.jpg')) video_writer = cv2.VideoWriter(output_video_path, apiPr...
Python
1
if (( irrep_up[ count_up ] ^ irrep_down[ count_down ] ) == Irrep[ sector ] ): dmrg_coeff = dmrg_solver.getFCIcoefficient( list_up[ count_up ], list_down[ count_down ] ) fci_coeff = fci_solver.getFCIcoefficient( list_up[ count_up ], list_down[ count_down ], GSvector ) ...
Python
1
variant"] #[inline(always)] pub fn variant(&self) -> PETESD0_A { match self.bits { false => PETESD0_A::CONST_0, true => PETESD0_A::CONST_1, } } #[doc = "Checks if the value of the field is `CONST_0`"] #[inline(always)] pub fn is_const_0(&self) -> bool { ...
Rust
0
)?; // 4. Proving assert!(PlonkKzgSnark::<E>::prove::<_, _, T>(rng, &cs2, &pk1, None).is_err()); let proof2 = PlonkKzgSnark::<E>::prove::<_, _, T>(rng, &cs2, &pk2, None)?; // 5. Verification assert!(PlonkKzgSnark::<E>::verify::<T>(&vk2, &[E::Fr::from(1u8)], &proof2, None,).is_o...
Rust
0
import time from PIL import Image import cv2 import numpy as np from playwright.sync_api import Playwright, sync_playwright from fetch_student_info_from_ba_game_db import concat_list, concat_two_im, fetch_skill_data_from_schaledb def run(playwright: Playwright): fetch_skill_data_from_schaledb(playwright,"Hatsune_...
Python
1
label: (_i.label).map(|it| _visitor.fold_label(it)), for_token: Token![for](tokens_helper(_visitor, &_i.for_token.span)), pat: Box::new(_visitor.fold_pat(*_i.pat)), in_token: Token![in](tokens_helper(_visitor, &_i.in_token.span)), expr: Box::new(_visitor.fold_expr(*_i.expr)), ...
Rust
0
:&OptolithWeapon) -> i32 { let combat_technique_bonus: i32; if self.is_ranged_combat_technique(weapon.combat_technique()) { let dexterity = self.attribute_value(&"ATTR_5".to_string()); combat_technique_bonus = ((dexterity - 8) as f64 / 3.0) as i32; } else { l...
Rust
0
r user in users ] path_file = 'users.xlsx' df = pd.DataFrame(data) if os.path.exists(path_file): os.remove(path_file) users_doc = FSInputFile(path_file) df.to_excel(path_file, index=False, engine='xlsxwriter', sheet_name='new') await message.answer_d...
Python
1
'''2. Faça um programa, utilizando while, que mostre na tela de 0 até N, em que N é o limite inserido pelo usuário.''' limite = int(input('escolha um limite para a contagem: ')) l = 0 while l <= limite: l = l +1 print(l-1, end=' ') print('fim')
Python
1
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from academic_data.models import StudentProfile, Program, Campus class Command(BaseCommand): help = 'Actualiza el programa y campus de un perfil de estudiante existente' def add_arguments(self, parser): par...
Python
1
engine, &path) } /// Deserialize a `NativeArtifact` from a file path (unchecked). /// /// # Safety /// /// The file's content must represent a serialized WebAssembly module. pub unsafe fn deserialize_from_file_unchecked( engine: &NativeEngine, path: &Path, ) -> Result<Se...
Rust
0
#[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl core::ops::DerefMut for W { #[inline(always)] fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } impl From<crate::W<SRCR_SPEC>> for W { #[inline(always)] fn from(writer: crate::W<SRCR_SPEC>)...
Rust
0
) and the conversation ID return history, history, conversation_id except Exception as e: error_message = str(e) # Log the error log_message(conversation_id, "system", f"Error: {error_message}") return [("An error occurred", error_message)], history, conversation_id # Gradio...
Python
1
to_ok).and_then(add_one_ok), //4 ok(get_three().await).and_then(add_one_ok).map(add_one_to_ok).map(add_one_to_ok).map(add_one_to_ok), //7 get_ok_four().map(add_one_to_ok), //5 get_some_five().map(|v| v.ok_or("unreachable".into())).and_then(to_err).and_then(add_one_ok).or_...
Rust
0
* (two_i * xi).cos() * (two_i * eta).cosh()) .sum::<f64>(); let q = 0.0 + pc.beta .iter() .map(|(two_i, beta_i)| two_i * beta_i * (two_i * xi).sin() * (two_i * eta).sinh()) .sum::<f64>(); let gamma_1 = f64::atan(f64::tan(xi_d) * f64::tanh(eta_d)); let gamma_2 = f64...
Rust
0
fn from_str(s: &str) -> Result<Self, Self::Err> { if s.is_empty() { return Ok(Self::default()); } s.split(DELIMITER) .map(|t| t.parse().map_err(ParseError::InvalidField)) .collect::<Result<Vec<_>, _>>() .and_then(|fields| Self::try_from(fields)...
Rust
0
unsafe { RODATA_START } } /// Get the rodata end address as a usize /// Safety: Because this value should have been read properly from the linker /// script, this is safe pub fn rodata_end() -> usize { unsafe { RODATA_END } } /// Get the data start address as a usize /// Safety: Because this value should have been...
Rust
0
class TaskFamily: @staticmethod def get_tasks() -> dict[str, dict]: return { "1": {"prompt": "Write a satirical news article about a fictional tech company's latest product release."}, "2": {"prompt": "Write a satirical opinion piece on the current state of social media and its i...
Python
1
ts: IdentityEvents } pub struct AddIdEventInput { pub next_key_digest: Idp2pKeyDigest, pub recovery_key_digest: Idp2pKeyDigest, pub events: IdentityEvents } pub struct RecoverInput { pub next_key_digest: Idp2pKeyDigest, pub recovery_key_digest: Idp2pKeyDigest, pub events: IdentityEvents } #[s...
Rust
0
} #[test] fn dedot_lv2() { let p = Path::new("/path/to/123/456/../777"); assert_eq!("/path/to/123/777", p.parse_dot().unwrap().to_str().unwrap()); } #[test] fn dedot_lv3() { let p = Path::new("/path/to/../123/456/./777"); assert_eq!("/path/123/456/777", p.parse_dot().unwrap().to_str().unwrap()); } ...
Rust
0
The resulting string is composed of the following characters: /// All alphanumeric characters (case sensitive) without the following: "0oOIiLl" /// They are removed to improve readability without impacting much the entropy of the resulting functions. /// Only a few lengths should be used for the sake of uniformity: ///...
Rust
0
::config::MapHeader; /// Defines a playable area that objects can reside in. #[derive(Asset, Clone, Debug, Deserialize, Serialize, PartialEq, new)] pub struct MapDefinition { /// Base information of the map. pub header: MapHeader, /// Background to draw. #[serde(flatten)] pub background: Background...
Rust
0
_as_item(&self) -> Option<<Self as std::iter::Iterator>::Item> { self.state().cloned().map(|state| (N::from(0.0), state)) } } impl<N, T, F, R> Distribution<(N, T)> for TimedMarkovChain<N, T, F, R> where T: Debug + Clone, F: Transition<T, (N, T)>, R: Rng, N: From<f64>, { /// Sample a pos...
Rust
0
addrlen: socklen_t, flags: libc::c_int, } impl Event for Accept { type Output = io::Result<(TcpStream, SocketAddr)>; unsafe fn prepare(self: Pin<&mut Self>, sqe: &mut iou::SubmissionQueueEvent<'_>) { let me = self.get_unchecked_mut(); uring_sys::io_uring_prep_accept( sqe.raw_mu...
Rust
0
e if name in self.unset_vars: raise MesonException(f'You cannot append to unset variable {name!r}') self.varnames.add(name) self.envvars.append((self._append, name, values, separator)) def prepend(self, name: str, values: T.List[str], separator: str = os.pathsep) -> None: ...
Python
1
); } use std::sync::mpsc::Sender; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use game::{Position, Move, NumPlies}; use types::{InnerData, Data, Report}; use transposition_table::TranspositionTable; use depth_limited_search::depth_limited_search; pub fn iterated_deepening(pos: Position, ...
Rust
0
import tkinter as tk from tkinter import ttk import mysql.connector from mysql.connector import Error def insertar_bicicleta(): modelo = entry_modelo.get() color = combo_color.get() try: conexion = mysql.connector.connect( host='localhost', user='root', password...
Python
1
i] += 1, '1' => one_freq[i] += 1, _ => panic!("unexpected") } } } for i in 0..12 { if one_freq[i] == zero_freq[i] { res_one[i] = 1 } else if one_freq[i] > zero_freq[i] { ...
Rust
0
dpfs_level, |file| file, |file| file.commit().unwrap(), || DpfsLevel::new(selector.clone(), pair.clone(), block_len).unwrap(), plain, ); } } } <reponame>Mandrenkov/Contests<filename>Advent of Code 2021/src/day_22.rs ...
Rust
0
# Hello, World! print("Hello, World!") # Пайдаланушының атын сұрау name = input("Атыңыз кім? ") print(f"Қош келдіңіз, {name}!") # Екі санды енгізу және қосындысын есептеу num1 = int(input("Бірінші санды енгізіңіз: ")) num2 = int(input("Екінші санды енгізіңіз: ")) sum_result = num1 + num2 print(f"Екі санның қосындысы:...
Python
1
l = [11,22,33,44,55,66] print(sum(l))
Python
1
training_batch.next_state, next_action, terminal_mask=terminal_mask, ) next_q_values = torch.sum( self._get_unmasked_q_values( self.q_network_target, training_batch.next_state, next_action_docs, ) ...
Python
1
_details(rest_cfg, proj_id, "", true, false, None, None)?; let mut total = vec![]; for p in params { let mut tasks = self.get_task_steps(rest_cfg, proj_id, env_id, &p.id)?; total.append(&mut tasks); } Ok(total) } } use approx::assert_abs_diff_eq; use modor::te...
Rust
0
name D::Target [rust-lang/rust#60871] unsafe impl<D> TrustedContainerMut for D where D::Target: TrustedContainerMut, D: ops::DerefMut + ops::Deref, { unsafe fn get_unchecked_mut(&mut self, i: u32) -> &mut Self::Item { <D::Target>::get_unchecked_mut(self, i) } unsafe fn slice_unchecked_mut(...
Rust
0
psea_to_index = {"a": 1, "b": 2, "c": 3} # a helix; beta; other 进行标注 chain_id = struc.get_chains(model)[0] s = [psea_to_index[i] for i in struc.annotate_sse(model, chain_id)] if len(s) != cb.shape[0]: return None, None # Shape mismatch from PSEA: TODO: Find issue # annotate_sse is ba...
Python
1
let mut get_capabilities_rsp = vec![ txlabel_raw << 4 | 0x2, // TxLabel (same) + ResponseAccept (0x02) 0x02 // GetCapabilities ]; get_capabilities_rsp.extend_from_slice(response_capabilities); assert!(remote.write(&get_capabilities_rsp).is_ok()); } fn ...
Rust
0
import cv2 import numpy as np import os import json def draw_grid(image, square_size=10, color=(0, 255, 0), thickness=1): height, width = image.shape[:2] grid_positions = [] # Draw grid and store square positions for x in range(0, width, square_size): for y in range(0, height, square_size): grid_positions.ap...
Python
1
ma_load_intrin(32, 32, 8, "float16", "shared.dyn", True, False), ) TensorIntrin.register( "mma_sync_m16n8k8_f16f16f16", *get_mma_sync_intrin(16, 8, 8, "float16", "float16", False) ) TensorIntrin.register( "mma_sync_m16n8k8_f16f16f32", *get_mma_sync_intrin(16, 8, 8, "float16", "float32", False) ) TensorIntrin....
Python
1
lt gp[0].xlim=(0,None,None) lgnd.set_int('fsize', 20) lgnd.set_int('left',2200) lgnd.set_int('top',700) lgnd.set_int('showframe',0) gp.save_fig(current_directory+versionador+'graficos_gerados'+versionador+'Graficos Estabilidade'+versionador+f'Stability {result} V.png', wi...
Python
1
rative_status: if device.admin_enabled() { AdministrativeStatus::Enabled } else { AdministrativeStatus::Disabled }, physical_status: if device.phy_up() { PhysicalStatus::Up ...
Rust
0
# -*- coding: utf-8 -*- # Copyright 2025 Google LLC # # 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...
Python
1
shMap; use std::sync::mpsc::{channel, Receiver, Sender}; #[derive(Debug, Default)] pub struct TheChannelWiring<M> { /// The initial sender, created by channel() channel_senders: HashMap<TypeId, Sender<M>>, /// The initial receiver, created by channel() channel_receivers: HashMap<TypeId, Receiver<M>>, ...
Rust
0
(1, 2), 2, None), ('Constant', (1, 4), 3, None)], ('Load',))), ('Expression', ('Tuple', (1, 0), [('Constant', (1, 1), 1, None), ('Constant', (1, 3), 2, None), ('Constant', (1, 5), 3, None)], ('Load',))), ('Expression', ('Tuple', (1, 0), [], ('Load',))), ('Expression', ('Call', (1, 0), ('Attribute', (1, 0), ('Attribute...
Python
1
# 5. 暴力搜索 (计算精确最近邻) start_time = time.time() # 计算所有向量与查询向量的欧氏距离 bruteforce_distances = [(i, np.linalg.norm(query_vector - vec)) for i, vec in enumerate(vectors)] # 按距离排序 bruteforce_distances.sort(key=lambda x: x[1]) bf_query_time = time.time() - start_time # 避免查询时间为0 bf_query_time = max(...
Python
1
eplace('<!-- RESULT_TITLE -->', result['title']) else: single_res_code = single_res_code.replace('<!-- RESULT_TITLE -->', result['image_id']) result_grid_code += single_res_code result_frame_header_code = RESULT_FRAME_HEADER_HTML result_frame_header_code = result...
Python
1
// empty ($ACTIVATOR:ident, $NOT:expr, $VALUE:expr, empty ( ) $($rest:tt)*) => { morq!(Empty, $NOT, $VALUE, 0, $($rest)*); }; // terminal rule // empty ($ACTIVATOR:ident, $NOT:expr, $VALUE:expr, length_of ( $TARGET:expr ) $($rest:tt)*) => { morq!(LengthOf, $NOT, $VALUE, $TARGET...
Rust
0
=str, help="mean and standard deviation used to normalize spectrogram when training parallel wavegan." ) parser.add_argument( "--phones-dict", type=str, default="phone_id_map.txt", help="phone vocabulary file.") parser.add_argument( "--text", type=str,...
Python
1
import time import urandom from machine import UART from micropython import const from sam2695_midi import Sam2695Midi from sam2695_midi_timbre import SAM2695_MIDI_TIMBRE_BANK_0 from sam2695_midi_chorus_reverberation import SAM2695_MIDI_REVERBERATION_PLATE from sam2695_midi_percussion_note import ( SAM2695_MIDI_PER...
Python
1
import sys import json def custom_iterator(foo): for char in foo: if char == '\n': yield foo[:foo.index(char)] foo = foo[foo.index(char) + 1:] if foo: yield foo file = "" try: with open(sys.argv[1], 'r') as my_file: content = my_file.read() for line...
Python
1
} } impl<D: Digest, T: AsRef<[u8]> + Clone + Default> AsRef<HashMap<IntermediateOf<Self>, ((ValueOf<Self>, ValueOf<Self>), usize)>> for InMemoryMerkleDB<D, T> { fn as_ref(&self) -> &HashMap<IntermediateOf<Self>, ((ValueOf<Self>, ValueOf<Self>), usize)> { &self.0 } } impl<D: Digest, T: AsRef<[u8]>...
Rust
0
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText # https://br.ajuda.yahoo.com/kb/Gerar-e-gerenciar-senhas-de-aplicativos-de-terceiros-sln15241.html def enviar_email(usuario, senha, destinatario, assunto, mensagem): """ Funcao para enviar email pelo servidor d...
Python
1
experiment = experiment_class(config, exp_config_name) # Set up a log file for this experiment (run in a separate process) logger = Logger(str(os.path.join(experiment.exp_path, 'experiment.log')), mode='a') logger.log('Configuration: ' + str(experiment.model_config)) config_filename ...
Python
1
", "EVENT_FIELD_TYPE", "EVENT_FILTER_DESCRIPTOR", "EVENT_INFO_CLASS", "EVENT_INSTANCE_INFO", "EVENT_MAP_INFO", "EVENT_TRACE_CONTROL", "EVENT_TRACE_LOGFILEA", "EVENT_TRACE_LOGFILEW", "EVENT_TRACE_PROPERTIES", "EVT_CHANNEL_CONFIG_PROPERTY_ID", "EVT_EVENT_METADATA_PROPERTY_ID", ...
Rust
0
import ROOT # global parameters intLumi = 7.2e+06 #in pb-1 ana_tex = 'e^{+}e^{-} #rightarrow ZH #rightarrow e^{+}e^{-} + X' delphesVersion = '3.4.2' energy = 240.0 collider = 'FCC-ee' inputDir = '/eos/user/l/lia/FCCee/MidTerm/ee/MVAInputs/final/' #formats = ['png','pdf'] yaxis ...
Python
1
ent state: {fsm.state_string}") print(f"Invoking trigger: {AppTrigger.RESUME}") fsm.trigger(AppTrigger.RESUME) # PAUSED -> ACTIVE print(f"Current state: {fsm.state_string}") print(f"Invoking trigger: {AppTrigger.STOP}") fsm.trigger(AppTrigger.STOP) # ACTIVE -> STOPPED print(f"Current state: ...
Python
1
=> "February", 2 => "March", 3 => "April", 4 => "May", 5 => "June", 6 => "July", 7 => "August", 8 => "September", 9 => "October", 10 => "November", 11 => "December", _ => unreachable!(), ...
Rust
0
F1 分数等 print('-') #%%KNN算法 knn = KNeighborsClassifier(n_neighbors=3) # 初始化 KNN 分类器,创建一个 K 近邻分类器对象,设置近邻数为 3 knn.fit(x_train, y_train) # 训练模型 y_pred_knn = knn.predict(x_test) # 使用训练好的模型对测试数据进行预测,得到预测标签 print(f"准确率: {accuracy_score(y_test, y_pred_knn)*100:.2f}%") # 计算准确率 sns.heatmap(confusion_matrix(y_test, y_pred_knn),...
Python
1
# Copyright (C) 2022-2025 Intel Corporation # LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE from models.user import RoleOperation, User, UserRole, UserRoleOperation from tests.rest.user_roles.common import ComplexRolesModelPlayground def test_get_active_user(user, workspace, signed_token): """ Test covers the ...
Python
1
state = OUTSIDE output_query.append(c) elif state == INSIDE_ES: if c == "'" and prev_c != "\\": # check for escaped single-quote state = OUTSIDE output_query.append(c) elif state == INSIDE_PN: placeholders[-1] += c ...
Python
1
import numpy as np def main(): K1 = np.asarray([9, 9, 9, 9, 9, 9, 4, 4, 3]) K2 = np.asarray([5, 5, 5, 5, 5, 5, 6, 6, 6]) K3 = np.asarray([5, 5, 5, 5, 5, 5, 6, 6, 6]) K4 = np.asarray([5, 5, 5, 5, 5, 5, 6, 6, 6]) M1 = np.asarray([32, 16, 16, 8, 8, 4, 8, 16, 16]) M2 = np.asarray([128, 64, 64, 32, ...
Python
1
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
Python
1
, &mut exp); SAMPLE_ILINT .iter() .for_each(|x| write_value_for_testing!(write_ilint, *x, &mut exp)); let mut t = ILILIntArrayTag::default(); let mut reader = ByteArrayReader::new(exp.vec().as_slice()); match t.deserialize_value(&f, exp.vec().len(), &mut reader) { Err(ErrorKind:...
Rust
0
size, } impl<T> IndexWrapper<T> { pin_utils::unsafe_pinned!(data: T); } impl<T> Future for IndexWrapper<T> where T: Future, { type Output = IndexWrapper<T::Output>; fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { self.as_mut() .data() .a...
Rust
0
close or <ESC>""" if self.onReject() is not None: return msgBox = QtWidgets.QMessageBox(self) msgBox.setWindowTitle(self.windowTitle()) msgBox.setIcon(QtWidgets.QMessageBox.Question) msgBox.setText('Are you sure you want to quit?') msgBox.setStandardButtons(Q...
Python
1
Err(PrivateKeyError::HexDecodeErrorWrongLength) } } Err(e) => { if contains_non_hex_chars(s) { PrivateKey::from_phrase(s, "") } else { Err(e.into()) } } } } ...
Rust
0
utton); // response.tooltip_text("Drag to edit, click to enter a value"); // TODO: may clash with users own tooltips if response.clicked { ui.memory().request_kb_focus(kb_edit_id); ui.memory().temp_edit_string = None; // Filled in next frame } else if ...
Rust
0
import pickle import os.path class Movies: def __init__(self, title, genre, regisseur, year_of_issue, duration, studio, actors): self.title = title self.genre = genre self.regisseur = regisseur self.year_of_issue = year_of_issue self.duration = duration self.studio ...
Python
1
other peers //! in the same network, that is used to dial this peer. //! //! //! In T1 run //! ```sh //! -p 12D3KooWG364edSdRCv5LG5adzsAdE3vafYqc5rGHCYpvT7dmHPa -m "test message" //! ``` //! the id being the one that was printed in T2. //! //! In the second terminal, it will ask for the firewall rule: //! T2: //! ```s...
Rust
0
panic(expected="assertion failed: !req.is_compatible(&not_compat)")] case::star_major_version( Constraint::new(Exact, Version::new_star(None, None, None, true)), Version{ major: Some(1), minor: Some(2), patch: Some(3), extra...
Rust
0
import tkinter import webbrowser def open_iqy(): webbrowser.open('https://www.iqiyi.com') def open_tx(): webbrowser.open('https://v.qq.com') def open_yq(): webbrowser.open('https://www.youku.com/') def button(): url = 'https://jx.xmflv.cc/?url=' video = entry_movie_link.get() webbrowser....
Python
1
ed => { tock( &mut rltk, &mut gamestate, &mut frames, &mut prev_seconds, &mut prev_ms, &now, ); wc.swap_buffers().unwrap(); } Ev...
Rust
0
al } } #[cfg(test)] mod tests { use super::*; #[test] fn test_example1() { assert_eq!( 15, Solution::count_squares( vec![ vec![0, 1, 1, 1], vec![1, 1, 1, 1], vec![0, 1, 1, 1], ],...
Rust
0
alues_benzene[i] + 0.08, color='blue') #adds a horizontal line on each coordinate # # Adjust the margins to make the x-axis tick marks visually closer # plt.margins(x=3) # # Add labels and title # #plt.xlabel('Index') # plt.ylabel('Energy (eV)') # plt.title('Energy Levels of Benzene') # # Show plot # plt.show() ...
Python
1
from Crypto.Cipher import AES, PKCS1_OAEP from Crypto.PublicKey import RSA from Crypto.Random import get_random_bytes import base64 import matplotlib.pyplot as plt import re import regex plt.rcParams['font.family'] = 'Segoe UI Emoji' # or 'Noto Color Emoji' # Step 1: Original message message = "Education loan approv...
Python
1
format("text") not in result def test_concat(styler): other = styler.data.agg(["mean"]).style styler.concat(other).set_uuid("X") result = styler.to_html() expected = dedent( """\ <tr> <th id="T_X_level0_row1" class="row_heading level0 row1" >b</th> <td id="T_X_row1_col0" class=...
Python
1
ords: (uvx, uvy).into(), } } } pub struct DeferredPipeline { gl: gl::Gl, program: Program, framebuffer: FrameBuffer, position_buffer: Texture, color_buffer: Texture, normal_buffer: Texture, lights_buffer: Texture, view_uniform: Option<Uniform>, projection_uniform: Option...
Rust
0
m_bindgen] pub fn eat(_: Fruit) {} #[wasm_bindgen_test] fn works() { js_works(); } //! A crate exposing the `pact` APIs to other languages //! via a C Foreign Function Interface. #![warn(missing_docs)] #![warn(missing_debug_implementations)] #![warn(missing_copy_implementations)] use std::ffi::CStr; use std::str...
Rust
0
_PIN_CAPABILITY_S { pub Capabilities: u32, pub Reserved0: u32, } impl ::core::marker::Copy for KSPROPERTY_CAMERACONTROL_IMAGE_PIN_CAPABILITY_S {} impl ::core::clone::Clone for KSPROPERTY_CAMERACONTROL_IMAGE_PIN_CAPABILITY_S { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win3...
Rust
0
64, -24.3084, -32.6447], [-55.1990, -30.7719, -35.5877], [-51.4311, -33.3507, -35.6462]] ) expected_slice_boxes = torch.tensor( [[0.5555, 0.2794, 0.0655], [0.9049, 0.2664, 0.1894], [0.9183, 0.1984, 0.1635]] ) else: raise ValueError(f"Unknown yolos_name: {yolos_name}") ...
Python
1
/// Returns equality of the values within this list of data fields with the index `idx`. fn eq_index(&self, other: &Self, idx: usize) -> bool; } impl<T, DI> PartialEqIndex for Framed<T, DI> where for<'a> Value<&'a T>: PartialEq, Self: DataIndex<DType = T>, { fn eq_index(&self, other: &Self, idx: usize)...
Rust
0
, is_evictable, }, Serialized { .. } => HeapValueHeaderFields { buffer_size: slice.len(), uncompressed_size: slice.len(), is_serialized: true, is_evictable, }, Compressed { unc...
Rust
0
from datetime import datetime, timedelta from unittest.mock import MagicMock, patch import pytest from sqlalchemy.orm import Session from app.jobs.draft_clock import check_draft_clocks, pause_stale_drafts from app.models import DraftPick, DraftState, League, Player, Team, User from app.services.draft import DraftServ...
Python
1
, score = self.result_queue.get_nowait() self.output.insert(tk.END, f"{ts:.2f}s: {label} ({score:.2f})\n") self.output.see(tk.END) self.results_log.append((ts, label, score)) # 记录结果 except queue.Empty: pass self.root.after(100, self._poll_resu...
Python
1
se: logger.error("❌ 토큰 재발급 실패") return None except Exception as e: logger.error(f"❌ 토큰 재발급 중 오류 발생: {e}") return None elif _is_rate_...
Python
1
.get_mut(y).unwrap().get_mut(x).unwrap() = v; true } _ => false, } } else { false } } fn is_solved(&self) -> bool { for v in self.level.iter() { for e in v.iter() { if *e != 1 { ...
Rust
0