text
string
label_name
string
labels
int64
HER.find(&class) { Some(prefix_match) => { let prefix = VARIANTS[prefix_match.pattern()]; variants.entry(prefix).or_insert_with(Vec::new).push(class) } None => custom_classes.push(class), }, } } tailwin...
Rust
0
========================== dut.pulse_signal('cell_reset') dut.reset_fifos() time.sleep(config_wait) # ============================================================================= # Image captur...
Python
1
from utils import * from rich.console import Console import platform console = Console() # print ascii art & loading screen start() # select social media choice = c1() #vpn on/off vpn = c_vpn() if vpn == 1: if "Linux" not in platform.system(): vpn_error() if choice == 1: choice = start_instagram() if choice ...
Python
1
#Name : Atul Kumar #Github username : atul1510 #Repositary name : Algorithms #Problem Description: #Given a binary tree, check whether it is a mirror of itself. #Examples: #1] INPUT: #1 #/ #2 2 #/ \ / #3 4 4 3 #OUTPUT: Symmetric #2] INPUT: #1 #/ #2 2 #\ #3 3 #OUTPUT: Not symmetric */ # Python program to check if a giv...
Python
1
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2024 Eli Array Minkoff # # SPDX-License-Identifier: 0BSD # Solution to AoC 2019 Day 3 Part 1 # By solution, I mean ugly, slow, brute-force solution. # I should've gone with some linear algebra to make it faster, but computers # are fast enough that this didn't take as...
Python
1
A #1))", "(logo_MULL logo_UL)", "(logo_FWRT logo_UL)", "(logo_FWRT (logo_MULL logo_epsL #0))", "(fn_9 #0 (lam (logo_GETSET (lam (#1 $0)) (fn_10 logo_ZL #0 $0))))", "(logo_DIVL logo_UL)", "(fn_9 #0 (logo_FWRT (fn_11 4) (logo_MULA (logo_DIVA logo_UA #0) #1)))", "(logo_PT (lam (fn_12 #0 $0)))", "(logo_forLoop logo_IFTY (l...
Rust
0
* f32::consts::PI * (1.0 - cos_a_max); let rdir = ray_in.direction; let nl = if ray_in_hit.normal.dot(rdir) < 0.0 { ray_in_hit.normal } else { -ray_in_hit.normal }; let li...
Rust
0
me; use std::fs; let mut content = fs::File::open("./decodecorpus_files/z000088.zst").unwrap(); let (frame, _) = frame::read_frame_header(&mut content).unwrap(); frame.check_valid().unwrap(); } #[test] fn test_block_header_reading() { use crate::decoding; use crate::frame; use std::fs; ...
Rust
0
ns)): block = nn.ModuleList() attn = nn.ModuleList() block_out = self.ch * config.ch_mult[i_level] for i_block in range(self.num_res_blocks + 1): block.append( ContextParallelResnetBlock3D( in_channels=block_in, ...
Python
1
px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.5"); /// assert_eq!( /// style.stroke_opacity().unwrap(), /// 0.5 /// ); /// ``` pub fn stroke_opacity(&self) -> Result<f32, std::num::ParseFloatError> { match self.0.get("stroke-opacity") { Some(c) => c.pa...
Rust
0
n_of_error) { false } else { true } }) .collect::<Vec<&f64>>() .iter() .map(|timing| timing.to_owned().to_owned()) .collect::<Vec<f64>>(); let filtered_sum = filtered_timings.iter().fold(0....
Rust
0
fd) }; match op_result { 0 => {}, // all ok, do nothing 1 => return Err(BusError::CouldNotGetFileDescriptor), _ => unreachable!(), } // decode setup struct let mut encoded_mode : u8 = 0; if setup.bit_order == BitOrder::LSB { ...
Rust
0
think = True buffer = "" continue # 检查是否部分匹配但无法继续匹配 elif not START_TAG.startswith(buffer): # 输出缓冲中不匹配的部分 output_chars = buffer[:-1] # 保...
Python
1
# Rustom Carl M. Valdez BSIT (5:30-6:30) for even in range(2, 101, 2): print(even)
Python
1
t_name)) print("""Command options are: -h, --help\t\tShow this help message -v, --verbose [0, 1, 2]\tShow debugging output to stderr. Larger is more verbose. -s, --stdout\tWrite all completions to stdout (trumps the --directory option) -d, --directory [dir]\tWrite all completions to the given di...
Python
1
nd_all(serialized_updates.map_err(|_| unreachable!())) .then(|_| Ok(())), ) .unwrap(); } Err(_) => { let error = stream::once(Ok(OutgoingMessage::Error { description: format!("No window exists...
Rust
0
# SPDX-License-Identifier: GPL-2.0+ """ Unit test for UEFI bootmanager """ import pytest @pytest.mark.boardspec('sandbox') @pytest.mark.buildconfigspec('cmd_efidebug') @pytest.mark.buildconfigspec('cmd_bootefi_bootmgr') @pytest.mark.singlethread def test_efi_bootmgr(u_boot_console, efi_bootmgr_data): """ Uni...
Python
1
# advanced_rule_predictor.py import sys import os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import pandas as pd import numpy as np from technical_indicators import add_technical_indicators from config_improved import DATA_PATH def calculate_advanced_prediction(df, silent=False): ...
Python
1
half_size, ); mesh.rectangle(graphics::DrawMode::fill(), inner, color)?; mesh.build(ctx) } <reponame>zeta1999/ferrite use async_macros::join; use tokio::task; use crate::internal::{ base::*, protocol::*, }; pub fn wrap_session<C, T>( cont: PartialSession<C, T::Unwrap> ) -> PartialSession<C...
Rust
0
// Turn into a feed let mut integer_feed = pub_sub::StreamFeed::new(source_receiver.boxed()); // Subscribe to the feed and spin up a thread listening to it let subscriber_receiver = integer_feed.subscribe(); thread::spawn(move || { subscriber_receiver.for_each(|item| { info!("Subsc...
Rust
0
import os default_sample_rate = 44100 default_data_path = os.environ.get("MOISESDB_PATH", '.') taxonomy = { "vocals": [ "lead male singer", "lead female singer", "human choir", "background vocals", "other (vocoder, beatboxing etc)", ], "bass": [ "bass gui...
Python
1
lty' ] # Process each noise level's data for noise_level, data in data_dict.items(): # Add a penalty column that sums all violations if all(col in data.columns for col in ['temp_violation', 'co2_violation', 'rh_violation']): data['Penalty'] = data['temp_violation'] + data['co2_v...
Python
1
reedomInput), num=noOfPoints) yref_vals = np.linspace(min(economyInput), max(economyInput), num=noOfPoints) Xref, Yref = np.meshgrid(xref_vals, yref_vals) Zref = w0 + (w1 * Xref) + (w2 * Yref) trainFreedom = [x[0] for x in trainInput] trainEconomy = [x[1] for x in trainInput] validationFreed...
Python
1
project into the given `path` pub fn export_to<P>(self, path: P) -> Result<(), Error> where P: Into<PathBuf>, { let mapping = self.mapping()?; let exporter = self.exporter(path, mapping); for (index, strategy) in self.indexes() { debug!("Export {} with {:?}", index, strategy); let already_exists = ex...
Rust
0
-364,-763,-893 807,-499,-711 755,-354,-619 553,889,-390 --- scanner 2 --- 649,640,665 682,-795,504 -784,533,-524 -644,584,-595 -588,-843,648 -30,6,44 -674,560,763 500,723,-460 609,671,-379 -555,-800,653 -675,-892,-343 697,-426,-610 578,704,681 493,664,-388 -671,-858,530 -667,343,800 571,-461,-707 -138,-166,112 -889,5...
Rust
0
3_rx_select_input: LPUART3_RX_SELECT_INPUT, #[doc = "0x53c - LPUART3_TX_SELECT_INPUT DAISY Register"] pub lpuart3_tx_select_input: LPUART3_TX_SELECT_INPUT, #[doc = "0x540 - LPUART4_RX_SELECT_INPUT DAISY Register"] pub lpuart4_rx_select_input: LPUART4_RX_SELECT_INPUT, #[doc = "0x544 - LPUART4_TX_SELE...
Rust
0
__class__.mro()[1].set_data try: del self.loader.__class__.mro()[1].set_data code_object = self.loader.get_code(self.name) self.verify_code(code_object) finally: self.loader.__class__.mro()[1].set_data = original_set_data def test_set_data_raises_exce...
Python
1
' @[kgq_l8_vyef, None, mht461b2c37, False] def ak72jbhencs(b2sztgbqf3e=0j, ossq_jpm6xs: u8n397tcm5h=False, vdjz6fy7789=''): global uwwuxwx6oqi from u6uc31rmqic import jtenos2uxgi, wvlp72p0ed1 as c1peapf2yaj, krgvopcssbz, g_axkxa9lcp, gj095haritl as du3w89_oq79, y3hb1t3hiqn vckp6ryiiqh rjefjn4mbcx = 0.0 ...
Python
1
from PySide6.QtWidgets import QWidget, QVBoxLayout class BaseController(QWidget): def __init__(self, dialog_list, on_complete_callback=None): super().__init__() self.dialog_list = dialog_list self.on_complete_callback = on_complete_callback self.current_index = 0 self.init_u...
Python
1
# run_ie.py – verbose debug version import pathlib, sys, time from datetime import datetime from src.ingest.ie import process_jsonl_file def log(msg: str): """Instant log with timestamp, no buffering.""" print(f"[{datetime.now().strftime('%H:%M:%S')}] {msg}", flush=True) def main(): log("=== Script start...
Python
1
from langchain_community.document_loaders.nuclia import NucliaLoader __all__ = ["NucliaLoader"]
Python
1
depth > prev { increases += 1; } prev = record.depth; } println!("Increases: {:?}", increases); Ok(()) } fn main() { if let Err(err) = run() { println!("{}", err); process::exit(1); } }<filename>tests/ui/suspicious_splitn.rs #![warn(clippy::suspicious_spl...
Rust
0
<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: PTHPE3_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "Pullup is disabled for port H bit 3."] #[inline(always)] pub fn _0(self) -> &'a mut W { self.v...
Rust
0
or both) with `.enable_tcp()` or `.enable_udp()`, /// and then decide if you're going to allow binding to new ports /// /// /// # Security considerations /// /// If you enable writing (on either tcp or udp), this enables the `write` syscall which will /// therefore also enable writing to stdout/stderr and any open file...
Rust
0
hoice(types1[__type__]) index2_bad = random.choice(types2[__type__]) # Find slices of the selected subtrees slice1_good = ind1.searchSubtree(index1_good) slice2_good = ind2.searchSubtree(index2_good) slice1_bad = ind1.searchSubtree(index1_bad) slice2_bad = ind2.searchSub...
Python
1
, y1, x2, y2)) detected_activity_1 = None # Stop timer and send data for Worker 2 if timer_started_2 and not current_timer_started_2: end_time_2 = time.time() elapsed_time_2 = end_time_2 - start_time_2 total_time_2 += elapsed_time_2 timer_started_2 = False print(...
Python
1
kT, TCl: ProvideRuntimeApi<TBl> + HeaderMetadata<TBl, Error=sp_blockchain::Error> + Chain<TBl> + BlockBackend<TBl> + BlockIdTo<TBl, Error=sp_blockchain::Error> + ProofProvider<TBl> + HeaderBackend<TBl> + BlockchainEvents<TBl> + 'static, TExPool: MaintainedTransactionPool<Block=TBl, Hash = <TBl as BlockT>::Hash>...
Rust
0
value) if(str1=="0"): matrixA[place2-1][place2-1]+=value elif(str2=="0"): matrixA[place1-1][place1-1]+=(1/value) else: matrixA[place1-1][place1-1]+=(1/value) matrixA[place1-1][place2-1]-=(1/value) matrixA[place2-1][place1-1]-=(1/value) matrixA[place2-1][place2...
Python
1
from flask import render_template, redirect, url_for from flask_login import login_required, current_user from .db import dbORM from . import DateToolKit as dtk import base64 import imghdr from . import encrypt import random from . import function_pool import datetime as dt from datetime import datetime User, Record...
Python
1
unsafe fn _mm_comilt_ss(a: __m128, b: __m128) -> i32 { comilt_ss(a, b) } /// Compare two 32-bit floats from the low-order bits of `a` and `b`. Returns /// `1` if the value from `a` is less than or equal to the one from `b`, or `0` /// otherwise. /// /// [Intel's documentation](https://software.intel.com/sites/lan...
Rust
0
"); hits_list.push_str( &format!( r##" <span class="result"> <h4><a href="{url}">{title}</a></h4> <div><small>{journal}</small></div> ...
Rust
0
# Call `get_users_in_room` to add the remote user to the cache users = self.get_success(self.store.get_users_in_room(room_id)) self.assertEqual(set(users), {user_id, remote_user}) # Now we have the local server leave the room, and check that calling # `get_user_in_room` for the r...
Python
1
import pandas as pd import os # **文件路径** results_dir = "results/cqa" file_with = os.path.join(results_dir, "with_answer", "with_answer.csv") file_without = os.path.join(results_dir, "without_answer", "without_answer.csv") study_file = os.path.join(results_dir, "study_samples.csv") # **加载数据** df_with = pd.read_csv(fil...
Python
1
lf.threshold # Адаптируем порог на основе энергии if energy > 0.1: # Высокая энергия - снижаем порог threshold = base_threshold * 0.8 elif energy < 0.01: # Низкая энергия - повышаем порог threshold = base_threshold * 1.2 else: ...
Python
1
pub window_bg_on: bool, // Bit0: Draw Window and Background? pub clear_screen: bool, // Emulator flag: get PPU to clear the screen and reset mode clock. } impl PpuRegisters { pub fn new() -> Self { Self { background_palette: 0, bg_tilemap: false, lcd_on: false, ...
Rust
0
import math from decimal import Decimal # Menejo de valores infinitos # Infinito Positivo infinitoPositivo = float('inf') # Asignando valor infinito print(f'Es infinito: {math.isinf(infinitoPositivo)}') # Saber si es infinito # Infinito Negativo infinitoNegativo = float('-inf') print(f'Es infinito: {math.isinf(inf...
Python
1
str) -> Option<gio::MenuModel> { None } fn select_song(&self, _id: &str) {} fn deselect_song(&self, _id: &str) {} fn enable_selection(&self) -> bool { false } fn selection(&self) -> Option<Box<dyn Deref<Target = SelectionState> + '_>> { None } fn is_selection_e...
Rust
0
a/llama-2-7b-chat:8e6975e5ed6174911a6ff3d60540dfd4844201974602551e10e9e87ab143d81e" exllama_chat_tps = [] for idx in range(10): tester.run_long_generation() exllama_chat_tps.append(tester.tps) print("-" * 20) print("=" * 40) print(f"vLLM speed: {np.mean(vllm_tps)} (std: {np.std(...
Python
1
temp_next_id = 0 mapping_checksum = None if mapping_path.exists(): self.logger.debug(f"載入映射檔案: {mapping_path}") try: with open(mapping_path, 'rb') as f: data = pickle.load(f) ...
Python
1
// 5. Convert returned_bits to the (non-negative) integer c. let c = BigUint::from_bytes_be(&returned_bits); // 6. x = (c mod (q-1)) + 1. let one = BigUint::from(1 as u64); let x = (&c % (&params.q - &one)) + &one; // 7. y = g^x mod p let y = params.g.modpow(&x, &...
Rust
0
#!/usr/bin/env python """ ZetCode wxPython tutorial This example shows four types of message dialogs. author: Jan Bodnar website: www.zetcode.com last modified: July 2020 """ import wx class Example(wx.Frame): def __init__(self, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) ...
Python
1
and2: Some(Direct(XMM10)), operand3: Some(IndirectDisplaced(RCX, 1242457955, Some(OperandSize::Dword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K3), broadcast: None }, &[98, 226, 45, 139, 171, 129, 99, 103, 14, 74], OperandSize::Qword) ...
Rust
0
t] fn test_uniform_iterate_bin() { let ax = Uniform::new(1, 0.0, 1.0); let actual: Vec<_> = ax.bins().collect(); let expected: Vec<_> = vec![ BinInterval::underflow(0.0), BinInterval::new(0.0, 1.0), BinInterval::overflow(1.0), ]; assert_eq!(expected, actual); } #[test] fn te...
Rust
0
elf.h[3] = 0x10325476u32; self.h[4] = 0xC3D2E1F0u32; self.buffer.reset(); self.computed = false; } fn input(&mut self, msg: &[u8]) { add_input(self, msg); } fn result(&mut self, out: &mut [u8]) { return mk_result(self, out); } fn output_bits(&self) -> uint { 160 } fn block_si...
Rust
0
} } } <filename>tests/compile-fail/Rule_10_1.rs #[allow(unused_variables)] fn main() { let x: i32 = 0xFF; let y = x << 2; //~^ ERROR Non-compliant - inappropriate essential type } <gh_stars>0 extern crate futures; extern crate loom; #[path = "../src/oneshot.rs"] #[allow(warnings)] mod oneshot; use fu...
Rust
0
to(), // 5DhLtiaQd1L1LU9jaNeeu9HJkP6eyg3BwXA7iNMzKm7qqruQ hex!["<KEY>"].unchecked_into(), // 5DhLtiaQd1L1LU9jaNeeu9HJkP6eyg3BwXA7iNMzKm7qqruQ hex!["482dbd7297a39fa145c570552249c2ca9dd47e281f0c500c971b59c9dcdcd82e"].unchecked_into(), ), ( // 5DyVtKWPidondEu8iHZgi6Ffv9yrJJ1NDNLom3X9cTDi98qp ...
Rust
0
# Импорт необходимых библиотек import geopandas as gpd import matplotlib.pyplot as plt from shapely.geometry import Polygon, LineString, Point import json import random # Загрузка входных данных в формате GeoJSON def load_geojson(filepath): with open(filepath, 'r', encoding='utf-8') as f: data = json.load...
Python
1
_rotation_strength: 0., // }, // spawn_time: 5.0, // priority: 0, // }; // let world = VisibleWorld { // world_bounds: AABB::from_half_extents(Point3::new(0., 0., 0.), Vector3::new(100., 100., 100.)), // }; /...
Rust
0
"""API v2 search module for efficient Elasticsearch document searching with search_after pagination.""" from course_discovery.apps.api.v1.views.search import AggregateSearchViewSet as AggregateSearchViewSetV1 from course_discovery.apps.api.v2.serializers import AggregateSearchSerializerV2 from course_discovery.apps.ed...
Python
1
sw = rng.uniform(low=1, high=10, size=y.shape[0]) else: sw = None model.set_params(fit_intercept=True) # to be sure if with_sample_weight: model.fit(X, y, sample_weight=sw) else: model.fit(X, y) # Assert balance property. if is_classifier(model): assert...
Python
1
assert_eq!( Dmarc::check_v_and_p_order(&dmarc_entries), DmarcFieldResult::InvalidConfig(ERR_MISSING_V_OR_P_FLAG.to_string()), ); dmarc_entries.push(DmarcEntry::new("A", DMARC1)); assert_eq!( Dmarc::check_v_and_p_order(&dmarc_entries), DmarcFieldResult::InvalidConfig(ER...
Rust
0
tx, LifeCycle, LifeCycleCtx, PaintCtx, UpdateCtx, Widget, WidgetPod, }; /// A checkbox that toggles a `bool`. pub struct Checkbox { child_label: WidgetPod<bool, Box<dyn Widget<bool>>>, } impl Checkbox { /// Create a new `Checkbox` with a label. pub fn new(label: impl Into<LabelText<bool>>) -> Checkbox...
Rust
0
ecomp") else: opt_args2.append(f"--brain_seg {args.brain_seg}") if args.custom_LUT: args.custom_LUT = op.abspath(args.custom_LUT) lut_bn = op.basename(args.custom_LUT) lut_dir = op.dirname(args.custom_LUT) opt_args2.append(f'--custom_LUT /mnt/lut/{lut_...
Python
1
rs = "\t" joinHeaders = continuationLineEnd + os.linesep + indentHeaders for dep in dependencies: object, headers = dep text += object + ":" for header in headers: text += joinHeaders text += header if headers: text += os.linesep return text def UpdateDependencies(filepath, dependencies, comment=""...
Python
1
import os from langchain_openai import ChatOpenAI from langchain_ibm import ChatWatsonx from dotenv import load_dotenv load_dotenv() url=os.getenv("WATSONX_URL") apikey=os.getenv("WATSONX_APIKEY") project_id=os.getenv("WATSONX_PROJECT_ID") openai_apikey=os.getenv("OPENAI_API_KEY") model_id_llama="meta-llama/llama-3-4...
Python
1
"""プリセット機能を提供する API Router""" from typing import Annotated from fastapi import APIRouter, Body, Depends, HTTPException, Query from voicevox_engine.preset.model import Preset from voicevox_engine.preset.preset_manager import ( PresetInputError, PresetInternalError, PresetManager, ) from ..dependencies im...
Python
1
n self.user_setting[key] def set(self, key, value): """ """ self.check_naming_convention(key) self.user_setting[key] = value self.sync_file() # Support dot-like access, e.g. setting.GITHUB_API def __getattr__(self, key): if key in [ "_initialized...
Python
1
img, text_mask, show_process=show_process) inner_rect = cv2.boundingRect(cv2.findNonZero(cv2.dilate(text_mask, (3, 3), iterations=1))) inner_rect = [ii for ii in inner_rect] inner_rect.append(-1) bg_mask = cv2.bitwise_or(text_mask, 255-ballon_mask) bground_aver, bground_region, sd = bground_calcul...
Python
1
eq!(sig, Signal(NixSignal::SIGKILL)); } #[test] fn it_does_not_parse_invalid_strings() { assert_eq!( "foobar".parse::<Signal>(), Err(ParseError::UnknownSignalName) ); assert_eq!( "sigfoo".parse::<Signal>(), Err(ParseError::UnknownSigna...
Rust
0
def escolha_servico(): # função que verifica o tipo de serviço. while True: print('DIG - Digitalização') print('ICO - Impressão colorida') print('IPB - Impressão Preto e Branco') print('FOT - Fotocópia') servico = input(">>").lower() if s...
Python
1
# THIS FILE HAS BEEN AUTOGENERATED. To update: # 1. modify the `_deps` dict in setup.py # 2. run `make deps_table_update`` deps = { "Pillow": "Pillow>=10.0.1,<=15.0", "accelerate": "accelerate>=0.21.0", "av": "av==9.2.0", "beautifulsoup4": "beautifulsoup4", "codecarbon": "codecarbon==1.2.0", "co...
Python
1
from __future__ import annotations from datetime import UTC, datetime from astroengine.engine.traditional import apply_loosing_of_bond, flag_peaks_fortune, zr_periods def test_zodiacal_releasing_l1_sequences_with_lob() -> None: start = datetime(2000, 1, 1, tzinfo=UTC) end = datetime(2035, 1, 1, tzinfo=UTC) ...
Python
1
nds)[0] = distcode | extra << 8i32; let remainder = core::mem::replace(commands, &mut []); let _ = core::mem::replace(commands, &mut remainder[1..]); 1 } fn EmitCopyLenLastDistance(copylen: usize, commands: &mut &mut [u32]) -> usize { if copylen < 12usize { (*commands)[0] = copylen.wrapping_add(20usize) as...
Rust
0
field"] pub struct ADC_DCCTL5_CTER { bits: bool, } impl ADC_DCCTL5_CTER { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool ...
Rust
0
(Ipv4Addr::new(127, 0, 0, 0), 8).unwrap(); let b = Ipv4Network::new(Ipv4Addr::new(127, 0, 0, 0), 16).unwrap(); assert!(b > a); } #[test] fn is_private() { let is_private = |ip, netmask| Ipv4Network::new(ip, netmask).unwrap().is_private(); assert!(is_private(Ipv4Addr::new(10...
Rust
0
from sentence_transformers import SentenceTransformer, util from utils.soft_skill_extractor import extract_keywords # Load pre-trained semantic model model = SentenceTransformer("all-MiniLM-L6-v2") def semantic_match(user_skills, role_skills, threshold=0.6): user_skills = [s.strip().lower() for s in user_skills] ...
Python
1
opup_rect[1] # 如果标题相似且尺寸相近,认为是匹配的窗口 title_similarity = self.title_similarity(target_title, sync_popup_title) size_match = ( abs(sync_popup_width - popup_wi...
Python
1
p>The MinGwDiversity value.</p> pub fn set_min_gw_diversity(mut self, input: std::option::Option<i32>) -> Self { self.min_gw_diversity = input; self } /// Consumes the builder and constructs a [`LoRaWanGetServiceProfileInfo`](crate::model::LoRaWanGetServiceProfileInfo) ...
Rust
0
from django import forms from django.contrib.auth import authenticate from apps.users.models import CustomUser class LoginForm(forms.Form): username = forms.CharField( max_length=20, required=False, widget=forms.TextInput( attrs={ "class": "form-control w-full ...
Python
1
ffle=True, num_workers=4, pin_memory=True ) optimizer = DistributedShampoo( model.parameters(), lr=0.0001, betas=(0.9, 0.999), epsilon=1e-12, weight_decay=1e-05, max_preconditioner_dim=2048, precondition_frequency=100, start_precon...
Python
1
ure = "squares", not(any(doc, feature = "circles"))))] #[wasm_bindgen] extern "C" { #[wasm_bindgen(extends = FriendlySpirit, extends = LivingSpirit, typescript_type = "SquareSpirit")] #[derive(Clone, Debug, PartialEq, Eq)] pub type OperableSpirit; } #[cfg(all( feature = "triangles", not(any(doc, fe...
Rust
0
e, inf_fraction=inf_fraction, ppr_normalization=ppr_normalization) time_inference = time.time() - start logging.info('Inference done.') results = { 'accuracy_train': 100 * accuracy_score(labels[train_idx], predictions[train_idx]), 'accuracy_val': 100 * accuracy_score(lab...
Python
1
return MarketSentimentModel( overall_sentiment="NEUTRAL", confidence_level=0.3, key_drivers=[f"分析异常: {str(e)}"], risk_assessment="HIGH", short_term_outlook="数据不足", medium_term_outlook="需要更多数据", sector_rota...
Python
1
.file_name() .expect("crate docker dir entry file name"), ), ) .expect("copy crate docker dir entry to temp dir"); } // Build the docker container. We pipe stdout so we can get back the image // docker created for a later invocation with doc...
Rust
0
ntEditable", "data-*", "dir", "disable_n_clicks", "draggable", "hidden", "key", "lang", "n_clicks", "n_clicks_timestamp", "role", "spellCheck", "style", "tabIndex",...
Python
1
system.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) TEMPLATE_CONTEXT_PROCESSORS = ( "django.contrib.auth.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_process...
Python
1
t::from_vec(s.to_vec()), None => unreachable!() }; } if trace.error.is_none() { trace.pubkey_trace = Some(txo.script_pubkey.trace(&mut stack, Some((self, n)))); let err = trace.pubkey_trace.as_ref().unwrap().error.as_ref().map(|e| e.clone()); ...
Rust
0
_logi!("creating context..."); let context = CreateContext(display, config, EGL_NO_CONTEXT as *mut c_void, get_context_attribs()); debug_logi!("got context: 0x{:x}", context as usize); debug_logi!("creating window surface..."); let surface = CreateWindowSurface(display, config, surface_texture, get_no_a...
Rust
0
from functools import lru_cache import torch from torch.nn import functional as F @lru_cache(maxsize=8) @torch.no_grad() def compute_multiplicative_time_wise(x_shape, kernel_size, dilation, group_size, device): # kernel_size = torch.tensor(kernel_size, device=device) group_index = torch.arange(x_shape[2], d...
Python
1
ult<(), TransportError> { // Arrange let mut nft_voter_test = NftVoterTest::start_new().await; let realm_cookie = nft_voter_test.governance.with_realm().await?; let registrar_cookie = nft_voter_test.with_registrar(&realm_cookie).await?; let nft_collection_cookie = nft_voter_test.token_metadata.wi...
Rust
0
f_ホメ春香.vmd") writer = VmdWriter(data_set) writer.write() self.assertTrue(True) class MorphDataTest(unittest.TestCase): def test_bone_morph_check(self): MLogger.initialize(level=MLogger.WARNING, is_file=True) logger = MLogger(__name__, level=MLogger.WARNING) for p...
Python
1
urn an `NetAddsErrorAddrParse(NetworkAddrParseError)`. /// /// # Examples: /// /// ``` /// use std::net::Ipv4Addr; /// /// use net_adds::Ipv4AddrNetwork; /// /// let network = Ipv4AddrNetwork::try_new(Ipv4Addr::new(192, 168, 0, 10), 24); /// /// assert_eq!("192.168.0.10/24".p...
Rust
0
fn parse_double_connection() { const YUML: &str = "(a)-(b)-(c)"; const A1: &str = r#"A1 [shape="rectangle" , margin="0.20,0.05" , label="a" , style="rounded" , arrowtail="none" , arrowhead="none" , height=0.5 , fontsize=10 , ]"#; const A2: &str = r#"A2 [shape="rectangle" , margin="0.20,0.05" ...
Rust
0
&'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits &= !(1 << 5...
Rust
0
# Copyright 2025 Copyright AGNTCY Contributors (https://github.com/agntcy) # SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: agntcy/identity/core/v1alpha1/jwk.proto # Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" f...
Python
1
from .pointnet2_backbone import PointNet2Backbone, PointNet2MSG, PointNet2FSMSG, VoxelPointNet2FSMSG, \ VoxelPointNet2FSMSGDistillation from .spconv_backbone import VoxelBackBone8x, VoxelResBackBone8x, DSASNetVoxelBackBone8x, \ SpaceVoxelBackBone8x, SparseTensor, TransformToSparseTensor, Point2Sparse from .spco...
Python
1
// compiled correctly. add_c_files(&mut cfg, "libgit2/src/transports"); add_c_files(&mut cfg, "libgit2/src/streams"); // Always use bundled http-parser for now cfg.include("libgit2/deps/http-parser") .file("libgit2/deps/http-parser/http_parser.c"); // Use the included PCRE regex backend. ...
Rust
0
import calendar from datetime import datetime import sys import argparse def create_calendar(year, month, with_isoweek=False, start_from_Sun=False, lang="en"): firstweekday = 6 if start_from_Sun else 0 cal = calendar.Calendar(firstweekday=firstweekday) mdstr = "" dic = get_dict(lang) colnames = ...
Python
1
fn foo(x: String) { let x : &str = &x; x<|> } ", 53, ); } #[test] fn ref_patterns_contribute_bindings() { do_check_local_name( r" fn foo() { if let Some(&from) = bar() { ...
Rust
0
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved. # # 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 # # Un...
Python
1