text
string
label_name
string
labels
int64
n="left">%s</td>""" % al.host) out.append(""" <td align="center"><span class="sortkey">%s </span>%s</td>""" % (al.sortipnum,al.ipnum)) out.append(""" <td align="left">%s</td>""" % htmlentities(al.info)) out.append(""" <td align="center">%s</td>""" % al.locktype) out.append(""" <td align="right">...
Python
1
from django.contrib import admin from .models import Company, Share, Data, Portfolio, Composed_of admin.site.register(Company) admin.site.register(Share) admin.site.register(Data) admin.site.register(Portfolio) admin.site.register(Composed_of)
Python
1
_configurations.as_deref() } /// <p>The self-managed Apache Kafka cluster for your event source.</p> pub fn self_managed_event_source( &self, ) -> std::option::Option<&crate::model::SelfManagedEventSource> { self.self_managed_event_source.as_ref() } /// <p>(Streams only) Discard ...
Rust
0
class ShippingMethodType: PRICE_BASED = "price" WEIGHT_BASED = "weight" CHOICES = [ (PRICE_BASED, "Price based shipping"), (WEIGHT_BASED, "Weight based shipping"), ] class PostalCodeRuleInclusionType: INCLUDE = "include" EXCLUDE = "exclude" CHOICES = [ (INCLUDE, "...
Python
1
# Copyright 2025 Matheus Vilano # SPDX-License-Identifier: Apache-2.0 from pywwise.descriptors import WwiseProperty from pywwise.enums import EColour, EFadeShape, EMarkerInputMode, ESpeakerBitMask from pywwise.objects.abc import WwiseObject from pywwise.objects.types.conversion import Conversion from pywwise.objects.t...
Python
1
return super().add_targets(targetName, targets) else: static_config = self.get_config(static_name, targets) return static_config.add_targets(targetName, targets) def get_fully_qualified_dep(self, dep): if isinstance(dep, tuple): ...
Python
1
# app.py import streamlit as st import requests from bs4 import BeautifulSoup import pandas as pd st.set_page_config(page_title="AI Web Scraper", layout="wide") st.title("🕷️ AI Web Scraper") st.markdown("Enter a URL and extract all paragraph text from it.") url = st.text_input("🔗 Enter URL", "https://example.com")...
Python
1
#[derive(Debug)] pub struct Max { name: String, data_type: DataType, nullable: bool, expr: Arc<dyn PhysicalExpr>, } impl Max { /// Create a new MAX aggregate function pub fn new(expr: Arc<dyn PhysicalExpr>, name: String, data_type: DataType) -> Self { Self { name, ...
Rust
0
lambda: f32x4, pub local_wi: Vec3, pub point: Point3, pub normal: Vec3, pub uv: (f32, f32), pub material_id: MaterialId, pub outer_medium_id: usize, pub inner_medium_id: usize, pub instance_id: usize, pub throughput: HeroEnergy, pub pdf_forward: f32x4, pub pdf_backward: f32x...
Rust
0
} if let Some(offset_time) = self.offset_time { let unit = match offset_time.unit.to_lowercase().as_str() { "t" => TimeUnit::Ticks, "f" => TimeUnit::Frames, "ms" => TimeUnit::Milliseconds, "s" => TimeUnit::Seconds, "m" => TimeUnit::Minutes, "h" => TimeUnit::Ho...
Rust
0
from enum import StrEnum class SessionType(StrEnum): onnxruntime = "OnnxRuntime" simulator = "Simulator" dxruntime = "DxRuntime" class EvaluationType(StrEnum): image_classification = "ImageClassification" coco = "ObjectDection" segmentation = "ImageSegmentation" voc = "ObjectDetection" ...
Python
1
ream provider for camera instance""" self.stream_provider = stream_provider url = self.stream_provider.value if self.stream_provider == StreamProvider.RTSP: if self.is_rtsp_enabled is False: if self.is_rtsp_supported is False: raise CameraRTSPStre...
Python
1
ement_WindowsFilteringPlatform\"`*"] pub const FWP_CONDITION_FLAG_IS_REASSEMBLED: u32 = 1024u32; #[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFilteringPlatform\"`*"] pub const FWP_CONDITION_FLAG_IS_REAUTHORIZE: u32 = 4u32; #[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFilteringPlatfor...
Rust
0
logger.logkv("eval/normalized_episode_reward", norm_ep_rew_mean) logger.logkv("eval/normalized_episode_reward_std", norm_ep_rew_std) logger.logkv("eval/episode_length", ep_length_mean) logger.logkv("eval/episode_length_std", ...
Python
1
n; } else { match (map.get(&(row + 1, col)), map.get(&(row, col + 1))) { (Some(&x), Some(&y)) => { map.insert((row, col), x + y); }, (None, Some(&y)) => { map.insert((row, col), y); }, (Some(&x), None) => { map.insert((row, col), x); }, (None, None) => panic!(), _ => {} } col -=...
Rust
0
#!/usr/bin/env python3 # coding: utf-8 # File: sim_simhash.py # Author: lhy<lhy_in_blcu@126.com,https://huangyong.github.io> # Date: 18-4-27 from simhash import Simhash import jieba.posseg as pseg class SimHaming: '''利用64位数,计算海明距离''' def haming_distance(self, code_s1, code_s2): x = (code_s1 ^ code_s2)...
Python
1
('𥘫', "hē"), ('𥘬', "fú"), ('𥘮', "jū"), ('𥙀', "zuǒ"), ('𥙁', "yí"), ('𥙆', "xiàn,zhī"), ('𥙇', "yí"), ('𥙉', "sì,tái"), ('𥙋', "chuì"), ('𥙎', "mò"), ('𥙡', "zhān"), ('𥙣', "xún"), ('𥙦', "rú"), ('𥙨', "huò"), ('𥙬', "shāo"), ('𥙰', "shòu"), ('𥙾',...
Rust
0
ts) # Write information about SDRAM spec.reserve_memory_region( region=self.REGIONS.SDRAM_EDGE_PARAMS, size=SDRAM_PARAMS_SIZE, label="SDRAM Params") spec.switch_write_focus(self.REGIONS.SDRAM_EDGE_PARAMS) spec.write_value( self.__sdram_partition.get_s...
Python
1
# Save arbitrary variables so that values can be kept across restarts. # # Copyright (C) 2020 Dushyant Ahuja <dusht.ahuja@gmail.com> # Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. import os, logging, ast, configparser class Save...
Python
1
from .ai_processor import AIProcessor from .lm_studio_client import LMStudioClient __all__ = ['AIProcessor', 'LMStudioClient']
Python
1
optional*, defaults to `True`): If set to `True`, only the difference between the config instance and the default `BitsAndBytesConfig()` is serialized to JSON file. """ with open(json_file_path, "w", encoding="utf-8") as writer: config_dict = self.to_dict() ...
Python
1
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2018 by Ihor E. Novikov # # 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, either version 3 of the License, or # (at your option) any later ver...
Python
1
}, ] } _switch_uci = """package network config switch 'switch0' option enable_vlan '1' option name 'switch0' option reset '1' config switch_vlan 'switch0_vlan1' option device 'switch0' option ports '0t 2 3 4 5' option vid '1' option vlan '1' config switch_vlan 'switch0_vla...
Python
1
ame, model_getter, recommended_tasks, unsupported_tasks in MODELS: if args.model_filter and name not in args.model_filter: continue tasks = ALL_TASKS if args.run_slow_tasks else recommended_tasks for task in tasks: if task in unsupported_tasks: continue ...
Python
1
try: from methods.regular.regular_api import * except: from default.methods.regular.regular_api import * from shared.database.permissions.roles import Role @routes.route('/api/v1/project/<string:project_string_id>/roles', methods = ['GET']) @Project_permissions.user_has_project(Roles = ["admin", "Editor", "Vi...
Python
1
napi_uint16_array: napi_typedarray_type = 4; pub const napi_typedarray_type_napi_int32_array: napi_typedarray_type = 5; pub const napi_typedarray_type_napi_uint32_array: napi_typedarray_type = 6; pub const napi_typedarray_type_napi_float32_array: napi_typedarray_type = 7; pub const napi_typedarray_type_napi_float64_arr...
Rust
0
=> atoms::nob().encode(env), IsoCode639_3(lingua::IsoCode639_3::BOS) => atoms::bos().encode(env), IsoCode639_3(lingua::IsoCode639_3::BUL) => atoms::bul().encode(env), IsoCode639_3(lingua::IsoCode639_3::CAT) => atoms::cat().encode(env), IsoCode639_3(lingua::IsoCode639_3::...
Rust
0
= False raise RuntimeError( ('Sequences from BAM and preprocessed inputs do not ' 'agree for sample {}. {}').format( sample, diff_exit(diff_output) ) ) # Check consist...
Python
1
/// # /// # Ok(()) /// # } /// ``` /// /// # Errors /// /// ## Outer Error /// /// an [`IoError`] is returned if the filesystem cannot be read or written /// to. /// /// ## Inner Error /// /// This function will return [`NotFoundError`] if the crate or the...
Rust
0
import json import matplotlib.pyplot as plt import torch from torchvision import transforms import cv2 import sys import argparse import os from PIL import Image import numpy as np import glob import time import shutil from tqdm import tqdm from models.network import vgg16 IMG_FORMATS = ['bmp', 'jpg', 'jpeg', 'png'...
Python
1
s: List[dict]: 每个元素是一个时间切片的字典,包含: - timestamp: 时间戳 - time_offset_from_scenario_start: 相对场景开始时间的偏移 - satellites: 该时间戳下所有卫星的信息列表 - inter_satellite_connectivity: 该时间戳下所有卫星间连接关系 - target_visibility: 该时间戳下所有卫星-目标观测关系 """ # 加载原始数据 data = json.loads(file_path.read_te...
Python
1
#!/usr/bin/python3 if __name__ == "__main__": """Handle basic arithmetic operations.""" from calculator_1 import add, sub, mul, div import sys if len(sys.argv) - 1 != 3: print("Usage: ./100-my_calculator.py <a> <operator> <b>") sys.exit(1) ops = {"+": add, "-": sub, "*": mul, "/":...
Python
1
SynthesisError::AssignmentMissing); } // do some heuristics here // we proceed chunks of all points, and all workers do the same work over // some scalar width, so to have expected number of additions into buckets to 1 // we have to take log2 from the expected chunk(!) length let c = if exponen...
Rust
0
#[cfg(feature = "cos2-envelope-in-3d")] fn contains(&self, r: FourVector) -> bool { let phase: f64 = self.wavevector * r; phase < consts::PI * self.duration } #[cfg(not(feature = "cos2-envelope-in-3d"))] fn contains(&self, r: FourVector) -> bool { let phase: f64 = self.wavev...
Rust
0
# Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 # DeepSpeed Team import os import math import torch from transformers import ( AutoConfig, AutoModel, ) from transformers.deepspeed import HfDeepSpeedConfig from .reward_model import RewardModel def create_hf_model(model_class, ...
Python
1
def __init__(self, context: 'MCPStoreContext', provider_type: str): self._context = context self._provider_type = provider_type self._config: Dict[str, Any] = {} def set_client_credentials(self, client_id: str, client_secret: str) -> 'AuthProviderBuilder': """设置客户端凭据"...
Python
1
from matplotlib import pyplot pyplot.rcParams['font.sans-serif'] = ['Arial Unicode MS', 'simhei'] name = ['王者荣耀', '香肠派对', '我的世界', '第五人格', '和平精英'] data = [97978, 22961, 50868, 14556, 55671] pyplot.bar(name, data) print('柱状图绘制中...') pyplot.show()
Python
1
# https://leetcode.com/problems/subarrays-distinct-element-sum-of-squares-i/ class Solution: def sumCounts(self, nums: List[int]) -> int: n = len(nums) base = 1 while base < n: base <<= 1 seg = [[0, 0, 0] for _ in range(base << 1)] def lazyfix(node, L, R): ...
Python
1
ebb(); bx.switch_to_block(ebb); let val = bx.ins().iconst(types::I8, 0); let mut switch = Switch::new(); $( let ebb = bx.create_ebb(); switch.set_entry($index, ebb); )* switch.emit(&mu...
Rust
0
expected_output = { "chassis": "C9500-32QC", "slot": { "1": { "name": "C9500-32QC", "state": "ok", "insert_time": "1d18h", "slot": "1", "cpld_ver": "19061022", "fw_ver": "17.1.1[FC2]", ...
Python
1
device, ema, ) ### Testing logging.info("Computing metrics for training, validation, and test sets") epoch, _ = load_checkpoint(model, optimizer, scheduler, args.output_dir, device) logging.info(f"Loaded model from epoch {epoch}") table = PrettyTable() table.field...
Python
1
alize, Serialize}; use serde_json::value::RawValue as JsonRawValue; use serde_json::Value as JsonValue; // <https://www.postgresql.org/docs/12/datatype-json.html> // In general, most applications should prefer to store JSON data as jsonb, // unless there are quite specialized needs, such as legacy assumptions // abou...
Rust
0
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from datetime import datetime def send_mail(mail_mail, subject, msg): print("Sending Mail", mail_mail, subject, msg) # Email configuration sender_email = "studentdesknnrg@gmail.com" receiver_email =...
Python
1
x, s: f64, tau: f64, i: usize, j: usize, k: usize, l: usize) { let g = a[(i, j)]; let h = a[(k, l)]; a[(i, j)] = g - s * (h + g * tau); a[(k, l)] = h + s * (g - h * tau); } /// Given eigenvalue & eigenvector, sorts thod eigenvalues into descending order /// /// * Reference : Press, <NAME>., and <NAME>....
Rust
0
get(); self.register.set(f(&R { bits }, &mut W { bits }).bits); } #[doc = r"Reads the contents of the register"] #[inline(always)] pub fn read(&self) -> R { R { bits: self.register.get(), } } #[doc = r"Writes to the register"] #[inline(always)] pub fn ...
Rust
0
#coding:utf-8 import numpy as np import pandas as pd import csv #全局变量 global x_mat #数据归一化 def MinmaxNormalization(x, n): print(len(x)) i = 0 while i<len(x): x_mat[i][n] = (x[i] - np.min(x)) / (np.max(x)-np.min(x)) #if x_mat[i][n]>0: # print(x_mat[i][n]) i = i + 1 pri...
Python
1
} Ok(val) => assert_eq!(val, 0 as u32), } // Add a few writes and then fsync let buf = [0u8; 4096]; let mut pending = std::collections::BTreeSet::new(); unsafe { uring .add_write(buf.as_ptr(), buf.len(), f.as_raw_fd(), 0, 67) ...
Rust
0
nv1(x) x = self.bn1(x) x = self.relu(x) if self.maxpool_flag: x = self.maxpool(x) bs = x.shape[0] // s x = x.view(bs, x.shape[0] // bs, x.shape[1], x.shape[2], x.shape[3]) x = x.permute(0, 2, 1, 3, 4) x = self.layer1(x) x = self.layer2(x) ...
Python
1
(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PDENW::DISABLED => false, PDENW::ENABLED => true, } } } #[doc = r" Proxy"] pub struct _PDENW<'a> { w: &'a mut W, } impl<'a> _PDENW<'a> { #[doc = r" Writes `variant` to the...
Rust
0
_cfg_mode_none(&self) -> bool { *self == EPI_CFG_MODER::EPI_CFG_MODE_NONE } #[doc = "Checks if the value of the field is `EPI_CFG_MODE_SDRAM`"] #[inline(always)] pub fn is_epi_cfg_mode_sdram(&self) -> bool { *self == EPI_CFG_MODER::EPI_CFG_MODE_SDRAM } #[doc = "Checks if the valu...
Rust
0
unwrap(); let buf = unsafe { internal.get_unchecked(..len) }; writer.write_all(buf).unwrap(); } } } } pub fn copy<W>( input: &[u8], output: W, reading_chunk_len: usize, calculator: Calculator, ) -> io::Result<()> where W: Write + Send + 'stati...
Rust
0
Ok(stream.read_float_unchecked::<f32>(end)) } #[inline] fn bit_size() -> Option<usize> { Some(32) } } impl<E: Endianness> BitRead<'_, E> for f64 { #[inline] fn read(stream: &mut BitReadStream<E>) -> Result<f64> { stream.read_float::<f64>() } #[inline] unsafe fn rea...
Rust
0
import pvporcupine import pyaudio import struct import os # Your Porcupine Access Key ACCESS_KEY = "tdVTsJgIH+Iz+LkBzU0dupqCUEPY4BOQeSxox+xBapjt7GQC/Hi9pg==" # Path to your custom wake word .ppn file WAKE_WORD_PATH = "hey_shadow.ppn" # Initialize Porcupine with custom keyword porcupine = pvporcupine.create( acce...
Python
1
"\u{30d3}", "\u{3072}\u{3099}", // 'ひ' + '゛' "\u{3072}\u{309b}", // 'ひ' + '゛' "\u{3072}\u{ff9e}", // 'ひ' + '゙' "\u{30d2}\u{3099}", // '匕' + '゛' "\u{30d2}\u{309b}", // '匕' + '゛' "\u{30d2}\u{ff9e}", // '匕' + '゙' ], // "び", "ビ" [ "\u{3076}", "\u{...
Rust
0
, input)) } /// Checks if the address is valid #[cfg_attr(feature = "cargo-clippy", allow(needless_pass_by_value))] //because clap allways passes a String fn is_valid_address(input: String) -> Result<(), String> { if let Ok(mut socket_iter) = input.to_socket_addrs() { if socket_iter.next().is_some() { ...
Rust
0
from agents.models import Agent, AgentHistory from channels.db import database_sync_to_async from channels.generic.websocket import AsyncJsonWebsocketConsumer from django.contrib.auth.models import AnonymousUser from django.shortcuts import get_object_or_404 from tacticalrmm.constants import AGENT_DEFER, AgentHistoryTy...
Python
1
from sqlalchemy import Column, PrimaryKeyConstraint, func from sqlalchemy.dialects.postgresql import BIGINT, BOOLEAN, BYTEA, TIMESTAMP from common.models import HemeraModel, general_converter from indexer.modules.custom.merchant_moe.domains.merchant_moe import MerchantMoePoolRecord class FeatureMerchantMoePoolRecord...
Python
1
.expect(concat!("Could not open dynamic \ library `", stringify!($struct_name), "`")) } /// Try loading the static symbols linked to this library. ...
Rust
0
from datetime import datetime from flask import Blueprint, request from flask_jwt_extended import jwt_required, get_jwt_identity from utils.limiter import limiter from Handler.Handler import record_history, cloudflare_worker_required from MicrosoftGraphAPI.Auth import getAppAccessToken, return_url, get_drive_id, get_...
Python
1
String[k][1] for k in range(len(LineString))], ), (pnew1, None, 1, 1), # multiple geometry types ], ) def test_viewer2range(p, timeRange, lats, lons): if timeRange is not None: t, y, x = viewer2range(p) assert x == lons assert y == lats assert t == timeRange ...
Python
1
# Copyright 2013 Google 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 # # Unless required by applicable law or ag...
Python
1
s,)] # """ # nuc_prob: ArrayLike = get_nuclear_density(psi_R, dR) # normalization: ArrayLike = np.sum(nuc_prob, axis=0) # mask: ArrayLike = normalization < 1e-10 # # ngrid, nstates = psi_R.shape # # psi_ij: ArrayLike = np.zeros((nstates, ), dtype=np.complex128) # expval_E: ArrayLi...
Python
1
ous-v0", epochs=1000, steps_per_epoch=5000, replay_size=100000, random_exploration_steps=1000, max_ep_len=1000, num_workers=4, num_learners=1, worker_update_freq=500, ): config = { "env": env, "epochs": epochs, "steps_per_epoch": steps_per_epoch, "max_...
Python
1
r: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'separator', 'domain_of': ['Variant_label']} }) parts: Optional[List[DataDescriptorId]] = Field(default_factory=list, json_schema_extra = { "linkml_meta": {'alias': 'parts', 'domain_of': ['Variant_label']} }) description: Optional[str...
Python
1
arent)) => Ok(Origin::root()), (_, origin) => Err(origin), } } } pub struct ChildSystemParachainAsSuperuser<ParaId, Origin>(PhantomData<(ParaId, Origin)>); impl< ParaId: IsSystem + From<u32>, Origin: OriginTrait, > ConvertOrigin<Origin> for ChildSystemParachainAsSuperuser<ParaId, Origin> { fn convert_orig...
Rust
0
r {marker_id} aligned.'}) reset_movement_state() # Reset the movement behavior to smooth after aligning @socketio.on('move_to_distance') def move_to_distance(data): global stop_near_marker marker_id = data['marker_id'] target_distance = data['distance'] stop_near_marker = False # Reset stop f...
Python
1
0x88, 0x56, 0x8b, 0xbb, 0x05, 0xeb, ]; let seed = [ 0xd4, 0x64, 0x0e, 0x12, 0xe4, 0xbc, 0xdb, 0xfb, 0x43, 0x7f, 0x03, 0xe6, 0xae, 0x41, 0x8e, 0xe5, ]; let label = [ 0x74, 0x65, 0x73, 0x74, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, ]; let mut okm = vec![0u8; 196]; ...
Rust
0
t mut ledger = LedgerDB::open(&PathBuf::from("../../target/sample_data/ledger")) .expect("Failed opening local LedgerDB"); _make_ledger_long(&mut ledger); return; } std::fs::copy( "../../target/sample_data/ledger/data.mdb", format!("{}/data.mdb", ledger_path_str), ...
Rust
0
Expr.Return, ), 'loc_3F6F', ) SetScenaFlags(ScenaFlag(0x0000, 4, 0x4)) If( ( (Expr.Eval, "OP_42(0x0006)"), (Expr.PushLong, 0x1), Expr.Neg, Expr.Equ, Expr.Return, ), 'loc_3E55', ) ChrTalk( ...
Python
1
import json import pandas as pd from flask import Blueprint, request from lexos.managers import utility from lexos.views.base import render bubbleviz_blueprint = Blueprint("bubbleviz", __name__) @bubbleviz_blueprint.route("/bubbleviz", methods=["GET"]) def viz(): """ Gets the bubbleviz page. :return: The bub...
Python
1
""" In a string S of lowercase letters, these letters form consecutive groups of the same character. For example, a string like S = "abbxxxxzyy" has the groups "a", "bb", "xxxx", "z" and "yy". Call a group large if it has 3 or more characters. We would like the starting and ending positions of every large group. Th...
Python
1
Curve<Vec3A> for CompressedFloat32x3Curve { fn duration(&self) -> f32 { self.x.len() as f32 * self.frame_rate } fn time_offset(&self) -> f32 { self.time_offset } fn keyframe_count(&self) -> usize { self.x.len() } fn sample(&self, time: f32) -> Vec3A { let ...
Rust
0
more shared folder links (overrides --config)", ) parser.add_argument( "--output", default="output", help="Directory to write generated Markdown files", ) parser.add_argument( "--timeout", type=int, default=DEFAULT_TIMEOUT_SEC, help="HTTP timeout ...
Python
1
&KeyLocation, data: Vec<u8>) -> Result<Signature> { // Obtain read access to the vaults. let vaults: RwLockReadGuard<'_, _> = self.vaults.read()?; // Lookup the vault for the given DID. let vault: &MemVault = vaults.get(did).ok_or(Error::KeyVaultNotFound)?; // Lookup the key pair within the vault. ...
Rust
0
from fastapi import APIRouter, Query, HTTPException, BackgroundTasks from typing import Literal, Optional import traceback from app.database.group_document_builder import build_group_document from app.database.user_document_builder import build_user_document from app.database.synthetic_document_builder import build_sy...
Python
1
te_static( context: &RewriteContext<'_>, static_parts: &StaticParts<'_>, offset: Indent, ) -> Option<String> { let colon = colon_spaces(context.config); let mut prefix = format!( "{}{}{} {}{}{}", format_visibility(context, static_parts.vis), static_parts.defaultness.map_or(""...
Rust
0
# 1a) Animals = [None for _ in range(10)] # b) Animals = [ "horse", "lion", "rabbit", "mouse", "bird", "deer", "whale", "elephant", "kangaroo", "tiger" ] # c) def SortDescending(): ArrayLength = len(Animals) for X in range(ArrayLength): for Y in range(ArrayLe...
Python
1
stopped_time) } field ant_2_active() -> FieldResult<bool> { Ok(self.0.deploy_status.ant_2_active) } field ant_3_not_deployed() -> FieldResult<bool> { Ok(self.0.deploy_status.ant_3_not_deployed) } field ant_3_stopped_time() -> FieldResult<bool> { Ok(self.0.deploy_status...
Rust
0
def is_power_of_three(n): if n == 1: return True if n <= 0 or n % 3 != 0: return False return is_power_of_three(n // 3) print(is_power_of_three(1)) print(is_power_of_three(3)) print(is_power_of_three(9)) print(is_power_of_three(27)) print(is_power_of_three(10)) print(is_pow...
Python
1
command completion signal from CE-ATA device. If the command expects Command Completion Signal (CCS) from the CE-ATA device, the software should set this control bit. SD/MMC sets Data Transfer Over (DTO) bit in RINTSTS register and generates interrupt to host if Data Transfer Over interrupt is not masked."] #[inli...
Rust
0
"The Kokoro TTS model is missing!\n\nWould you like to download it now?", QMessageBox.Yes | QMessageBox.No, QMessageBox.Yes ) if ret == QMessageBox.Yes: def on_kokoro_download_complete(success, message): if success:...
Python
1
elow you can see two plots. The left hand plot shows the regret over time: the observations (crosses and dots), the current best (orange line), and the start of the optimization loop (blue line). The right hand plot is a two-dimensional search space that shows where in the search space initial points were located (cros...
Python
1
push(Block::Image(ImageBlock{ path: path.to_string() })) } _ => (), } if let Some(_) = tag_style(&tag) { add_chunk(&mut chunks, &mut stack, &mut last_chunk, cur_text.len()); stack.pop(); } ...
Rust
0
ecision) recall_scores.append(recall) except Exception as e: logger.warning(f"Error evaluating cold start user {user_idx}: {e}") continue results = { 'cold_start_precision': float(np.mean(precision_scores))...
Python
1
w(&url).scrape() { Ok(contents) => { let links = contents .iter() .filter(|item| !link.contains(item.as_str())) .map(|link| { parent_path .join(link) ...
Rust
0
制进粘贴板,请在houdini中的python source editor中运行") ################ debug 输出窗口 ##################### debugText = tk.Text(mainWindow,width=120,height=30,state='normal') debugText.grid(row=10,column=0,columnspan=10,sticky='ws') def DebugButton(string): #在string处输入你想要输出的文字即可,这个text...
Python
1
and_register(|| BigPongerAct::new_eager(buf_cfg.clone())); let poaf = remote.register_by_alias(&ponger_named, "custom_name"); let _ = ponf.wait_expect(Duration::from_millis(1000), "Ponger failed to register!"); let mut ponger_named_path = poaf.wait_expect(Duration::from_millis(1000), "Ponger failed ...
Rust
0
Ok(Bytes::from(body_result.unwrap())) ), extension, get_file_max_size(), ) .then(|r| { match r { Ok((name, size)) => Ok(ImageOutputItem { original: match original_name_option { ...
Rust
0
import asyncio import os from graia.saya import Saya from graia.broadcast import Broadcast from graia.saya.builtins.broadcast import BroadcastBehaviour from graia.application import GraiaMiraiApplication, Session from utils import load_config loop = asyncio.get_event_loop() bcc = Broadcast(loop=loop) saya = Saya(bcc...
Python
1
lltime_limit) for i in range(self._number_drones): drone = drone_type(identifier=i, misc_data=misc_data) self._drones.append(drone) playground.add(drone, self._drones_pos[i]) return playground if __name__ == '__main__': my_map = MyMapIntermediate02() my_pla...
Python
1
x >= *y x not in *y *x < y *x is not y
Python
1
MAX_SIZE) .map(|num| -> Result<_, _> { Url::parse_with_params( base_url.as_ref(), &[ ("linked_partitioning", "1"), ("limit", &format!("{}", PAGE_MAX_SIZE)), ("offset", &format!("{}...
Rust
0
data } fn outb(port: u16, data: u8) { unsafe { asm!("outb %al, %dx" : : "{dx}" (port as u16), "{al}" (data)); } } // Serial logger must be configured before calling this method. See full serial // logger for details. impl fmt::Write for SerialLogger { fn write_str(&mut self, s: &str) -> Resul...
Rust
0
target.name, damage), WHITE); target.take_damage(damage, game); } else { game.messages.add(format!("{} attacks {} but it has no effect", self.name, target.name), WHITE); } } } ...
Rust
0
# Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
Python
1
ING_INT_ENABLED, } } #[doc = "Checks if the value of the field is `RX_WARNING_INT_DISABLED`"] #[inline(always)] pub fn is_rx_warning_int_disabled(&self) -> bool { **self == RWRNMSK_A::RX_WARNING_INT_DISABLED } #[doc = "Checks if the value of the field is `RX_WARNING_INT_ENABLED`"...
Rust
0
intln!("DEBUG: affine: output: {:?}", &out_buf[ .. self.cfg.out_dim]); self.watch.lap(); //println!("DEBUG: affine: fwd: {:.6}", self.watch.elapsed()); } fn _backward(&mut self) { self.watch.lap(); let batch_size = self.out.batch_sz.get(); self.act_kern.backward(batch_size, &self.out.buf.bor...
Rust
0
UR[5(a`[URR5UR5n[ UR 5Vs/sHn[XU5PM nnOPURU5(aURU5...
Python
1
olon_token: None, bounds: Punctuated::new(), }) }), ), gt_token: Some(Gt::default()), where_clause: None, } } fn visit_opt_lifetime(&mut self, lifetime: &mut Option<Lifetime>) { match lif...
Rust
0
7, [0, ir1], [1, ir2], [2, ir3], [3, ir4], [4, ir5], [5, ir6]); let ir8 = take_or_place!(data, 7, T8, [0, ir1], [1, ir2], [2, ir3], [3, ir4], [4, ir5], [5, ir6], [6, ir7]); let ir9 = take_or_place!(data, 8, T9, [0, ir1], [1, ir2], [2, ir3], [3, ir4], [4, ir5], [5, ir6], [6, ir7], [7, ir8]); let ...
Rust
0