text
string
label_name
string
labels
int64
import os import torch import torch.nn as nn from torch.autograd import Variable import numpy as np import math # COnvert to torch tensor def to_variable(tensor, volatile=False, requires_grad=True): return Variable(tensor.float().cuda(), requires_grad=requires_grad) # Initialize model weights def initialize_weigh...
Python
1
4E00).unwrap(), "CJK UNIFIED IDEOGRAPH-4E00"); assert_eq!( ideograph_name(0x9FD5).unwrap(), "CJK UNIFIED IDEOGRAPH-9FD5"); assert_eq!( ideograph_name(0x17000).unwrap(), "TANGUT IDEOGRAPH-17000"); assert_eq!( ideograph_name(0...
Rust
0
_23(tr("Дзень абаронцаў Айчыны і Узброеных Сіл Рэспублікі Беларусь")) if self._year >= 1999: # Constitution Day. self._add_holiday_mar_15(tr("Дзень Канстытуцыі")) if self._year >= 1996: # Day of Unity of the Peoples of Belarus and Russia. self._add_holid...
Python
1
state.push_integer(players_data.mouse.x as i64); } else if value == 33 { state.push_integer(players_data.mouse.y as i64); } else if value == 34 { state.push_integer(players_data.mouse.state as i64); } else { state.push_intege...
Rust
0
), osp.join(args.snapshot_dir, 'House3D_' + str(args.num_steps_stop) + '_D.pth')) break if i_iter % args.save_pred_every == 0 and i_iter != 0: print('taking snapshot ...') torch.save(mapper.state_dict(), osp.join(args.snapshot_dir, 'House3D_' + str(i_iter) + '.pth')) ...
Python
1
__aeabi_memmove(dest, src, n); } #[cfg(not(any(target_os = "ios", target_env = "msvc")))] #[cfg_attr(not(feature = "mangled-names"), no_mangle)] #[linkage = "weak"] pub unsafe extern "aapcs" fn __aeabi_memmove8(dest: *mut u8, src: *const u8, n: usize) { __aeabi_memmove(dest, src, n); } #[cfg(not(target_os = "...
Rust
0
from io import BytesIO import fire import matplotlib.pyplot as plt from server import ( MODEL_TYPES_TO_MODEL, file_bytes_to_image_tensor, load_aot_fast, model_type_to_paths, set_fast, set_furious, show_anns, ) from torchao._models.sam2.automatic_mask_generator import SAM2AutomaticMaskGener...
Python
1
jects to apply restrictions to :param restrictions: The restrictions to be applied (checked against the constraints internal store) :return: filtered list of input objects """ def _check_restrictions(existing_limitations, desired_limitations): for restriction_name, restrictio...
Python
1
r.user_id, models.Transaction.type == "Expense", models.Transaction.transaction_date <= new_goal.target_date ).scalar() or 0.0 return GoalOut( goal_id=new_goal.goal_id, target_amount=float(new_goal.target_amount), target_date=new_goal.target_date, notes=getattr(ne...
Python
1
n=5 for i in range(n): for j in range(i+1): print("*",end='') for a in range(n-i-1): print(" ",end='') for b in range(n-i-1): print(" ",end='') for k in range(i+1): print("*",end='') print('') for i in range(n-1): for j in range(n-i-1): print("*",end='') ...
Python
1
import flet as ft def main(page:ft.Page): page.window_width = 300.0 page.window_height = 1039.0 page.window_top = 0 page.window_left = 0 #Page resized 300.0 1039.0 0.0 1627.0 page.horizontal_alignment = ft.CrossAxisAlignment.CENTER page.spacing = 50 page.scroll=ft.ScrollMode.AUTO ...
Python
1
a file to upload"); let download_actions = Arg::with_name("download") .short("d") .long("download") .number_of_values(2) .multiple(true) .value_names(&["B2FILE", "DESTINATION"]) .allow_hyphen_values(true) .help("Each occurence of this action specifies a file ...
Rust
0
nk, props.on_hexo_click.clone())) .collect::<Html>() } </div> </div> } } use structopt::StructOpt; use super::Command; use std::os::unix::fs; use std::os::unix::fs::PermissionsExt; use super::Output; use crate::ui::asset::Asset; #[derive(Debug, StructOpt)] #[structopt(rename...
Rust
0
er RAS: # ensure the output path doesn't contain any leftover files from previous # tests and example runs if bids_root.exists(): shutil.rmtree(bids_root) # get a template mgz image to transform the montage to voxel coordinates subjects_dir = mne.datasets.sample.data_path() / "subjects" template_T1 = nib.load(sub...
Python
1
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Calendar', 'version': '1.1', 'sequence': 165, 'depends': ['base', 'mail', 'onboarding'], 'summary': "Schedule employees' meetings", 'description': """ This is a full-featured calendar s...
Python
1
::GfFopForget), "RELEASE" => Ok(GlusterFOP::GfFopRelease), "RELEASEDIR" => Ok(GlusterFOP::GfFopReleaseDir), "GETSPEC" => Ok(GlusterFOP::GfFopGetSpec), "FREMOVEXATTR" => Ok(GlusterFOP::GfFopFRemovexAttr), "FALLOCATE" => Ok(GlusterFOP::GfFopFallocate), ...
Rust
0
# Generated by Django 3.2.8 on 2021-10-25 16:21 import simple_history.models from django.conf import settings from django.db import migrations, models def forwards(apps, schema_editor): template_model = apps.get_model("testcases", "Template") template_model.objects.create( name="Gherkin syntax", ...
Python
1
ist_from_data( data, user_id, reverify=data.get("reverify", False) ) reply = ( f"📱 {record.phone}\n" f"🌸 暱稱:{record.name or '用戶'}\n" f"🔗 LINE ID:{record.line_id or '未登記'}\n" f"🕒 {record.created_at.astimezone(tz)....
Python
1
ding phase after /// `expiration_retries_timeout`. MessageExpired { message_id: String, message: String, error: ClientError, }, } <reponame>model-checking/kani<gh_stars>100-1000 // Copyright Kani Contributors // SPDX-License-Identifier: Apache-2.0 OR MIT //! In order to avoid introd...
Rust
0
from django_filters import rest_framework as filters from .models import Storage class StorageFilter(filters.FilterSet): min_price = filters.NumberFilter(field_name="product__actual_price", lookup_expr='gte') max_price = filters.NumberFilter(field_name="product__actual_price", lookup_expr='lte') class Me...
Python
1
# This package aggregates tool bit shape classes. # Import the base class and all concrete shape classes from .models.base import ToolBitShape from .models.ballend import ToolBitShapeBallend from .models.bullnose import ToolBitShapeBullnose from .models.chamfer import ToolBitShapeChamfer from .models.custom import Too...
Python
1
hCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; let current_block = System::block_number() .saturated_into::<u64>() // The `System::block_number` is initialized with `n+1`, // so the actual block number is `n`. .saturating_sub(1); let era = Era::mortal(period, current_block...
Rust
0
ot swapping properly, other results may look nice # even if swap probabilities are incorrect. if expected_min_conditional_swap_prob is not None: self.assertAllGreater(results['conditional_swap_prob'], expected_min_conditional_swap_prob) if expected_max_conditional_swap_prob...
Python
1
x}' color = default_color return name, color # --- Отображение GT боксов --- if gt_bboxes is not None and gt_bboxes.shape[0] > 0: for i, bbox in enumerate(gt_bboxes): cls_idx_gt = int(gt_classes[i]) if gt_classes is not None and i < len(gt_classes) else None ...
Python
1
_ => {} } } TagType::GreenToneReproductionCurve => { match parser.tag_data(tag).map_err(|p| ParseError(p))? { TagData::ParametricCurve(x) => green_tone_reproduction_curve = Some(x), ...
Rust
0
gnostics.plots.plot_quantity(raw_values, targets=random_targets, variable_keys=["beta", "sigma"]) assert len(out.axes) == 3 with pytest.raises(ValueError): bf.diagnostics.plots.plot_quantity(raw_values, targets=random_targets) with pytest.raises(ValueError): bf.diagnostics.plots.plot_quant...
Python
1
gpu::BindGroupLayout>, pub(crate) bind_group_association: [ArrayVec<Range<usize>, MAX_BIND_GROUPS>; RC], bind_group_layout_association: [ArrayVec<usize, MAX_BIND_GROUPS>; RC], } impl<const RC: usize> BindGroupStorage<RC> { pub(crate) fn empty() -> Self { Self { bind_groups: vec![], ...
Rust
0
import math import torch def create_activation(name): if name == "relu": return torch.nn.ReLU() elif name == "gelu": return torch.nn.GELU() elif name == "prelu": return torch.nn.PReLU() elif name == "elu": return torch.nn.ELU() elif name == "silu": return tor...
Python
1
print(f"你說了: {text}") # 使用 LLM 生成回覆 prompt = LLM_PROMPT + LLM_REPLY_PROMPT + text response = await get_llm_response(prompt) response = chinese_converter.to_traditional(response) print(f"回應: {response}") ...
Python
1
as_view().as_slice()[.. 10]); let t = txn(); //flag.propose(t, |_| false); flag.set(t, false); y.eval(t); let _ = y.get(t); y.serialize(t, &mut z); for k in 0 .. 1024 { assert_eq!(z.as_view().as_slice()[k], 0.0); } println!("DEBUG: {:?}", &z.as_view().as_slice()[.. 10]); } #[test] fn test_gpu_adj...
Rust
0
tokio_unstable -Dwarnings")]) } pub(crate) fn minrust_test_workspace_all_features(self) -> Self { self.args(vec!["check", "--workspace", "--all-features"]) } pub(crate) fn clippy(self) -> Self { self.args(vec!["clippy", "--all", "--tests"]) } // docs pub(crate) fn docs(se...
Rust
0
ception as e: QMessageBox.critical(self, "操作失败", "打开反馈对话框失败,请稍后重试") logger.error(f"打开反馈对话框失败: {str(e)}") def show_download_history(self) -> None: """显示下载历史对话框""" try: from .history_dialog import HistoryDialog dialog = HistoryDialog(self) ...
Python
1
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option import attr import typing import io @attr.s class ReplaceSheetReqFindCondition(object): range_: str = attr.ib( default="", metadata={"req_type": "json", "key": "range"} ) # 查找范围, 示例值:"0b*...
Python
1
okens.keys()]): enc_chunk = prompt_chunk + tokenizer(prompt, add_special_tokens=False, **kwargs)["input_ids"] # Multi-Modal Text else: enc_chunk = prompt_chunk pattern = "|".join(map(re.escape, list(media_tokens.keys()))) chunk_strs = re.split(f"({pattern})", prompt) chu...
Python
1
ss_spoof_asv) # Sanity check of the weights if C1 < 0 or C2 < 0: sys.exit( 'You should never see this error but I cannot evalute tDCF with negative weights - please check whether your ASV error rates are correctly computed?' ) # Obtain t-DCF curve for all thresholds tDCF = ...
Python
1
#numbers = [1,2,3,4] #c1 = numbers[0] #numbers[0] = 100 #print(numbers) #print(c1) #print(numbers.append(100)) #print(numbers) #number1 = [1,2,3,4,8,9] #print(number1.append(10)) #number1.insert(0,10) #print(number1.sort()) #print(number1) #num = [1,2,3,5,4,6] #num.insert(0,10) #num.sort() #num.reverse() #num.index(3)...
Python
1
easily be used with three or more models. Try setting config_values = [np.asarray([0.25, 0.125, 0])] #%% #Multi-index collocation #----------------------- #Multi-index collocation is an extension of mulit-level collocation that can be used with models that have multiple parameters controlling the numerical discretizat...
Python
1
import json import re import nonebot import aiohttp, asyncio import time, datetime from collections import Counter from pathlib import Path import ssl from nonebot import require, on_command, on_regex try: # 尝试导入nonebot.adapters.onebot.v11 from nonebot.adapters.onebot.v11 import Bot, Event from nonebot.ad...
Python
1
[inline(always)] pub fn get_inner_elements_mut(&mut self)->&mut [T]{ unsafe{&mut *self.orig.0} } /// Retrieve the underlying list of elements. /// Unlike [`Tree::get_elements_mut()`] which /// returns the aabbs of the tree, this returns the /// list of T that each aabb points to. //...
Rust
0
MissingComponent, #[error("The requested entity does not exist.")] NoSuchEntity, } /// An error that occurs when evaluating a [`Query`] as a single expected resulted via /// [`Query::single`] or [`Query::single_mut`]. #[derive(Debug, Error)] pub enum QuerySingleError { #[error("No entities fit the quer...
Rust
0
-linalg //! Trace calculation use ndarray::*; use std::iter::Sum; use super::error::*; use super::types::*; pub trait Trace { type Output; fn trace(&self) -> Result<Self::Output>; } impl<A, S> Trace for ArrayBase<S, Ix2> where A: Scalar + Sum, S: Data<Elem = A>, { type Output = A; fn trace(...
Rust
0
tex; mod config; mod inode_ext; pub mod stdin; pub mod stdout; pub use config::*; pub use inode_ext::INodeExt; pub use rcore_fs::{dev::block_cache::BlockCache, vfs::*}; // pub use stdin::STDIN; pub use stdout::STDOUT; lazy_static! { /// 根文件系统的根目录的 INode pub static ref ROOT_INODE: Arc<dyn INode> = { /...
Rust
0
nce """ N, L, D = x.shape # batch, length, dim len_keep = int(L * (1 - mask_ratio)) noise = torch.rand(N, L, device=x.device) # noise in [0, 1] # sort noise for each sample ids_shuffle = torch.argsort(noise, dim=1) # ascend: small is keep, large is re...
Python
1
/// /// // Decode bytes `bytes1` to variable `fat_hdr2` of type `FatHeader`. /// let fat_hdr2: FatHeader = bytes1.encastf(endian)?; /// /// // Check the result (endian); The magic number says it is in big-endian. /// assert_eq!(endian.absolute(), Endian::Big); /// /// // Check the results (fat_hdr2); `FatMagic` is not...
Rust
0
import discord from StellariaPact.share.StellariaPactBot import StellariaPactBot class ObjectionModal(discord.ui.Modal, title="发起异议"): """ 一个模态框,用于收集用户对提案发起异议所需的信息。 """ reason = discord.ui.TextInput( label="反对理由", placeholder="请详细阐述您反对该提案的理由。", required=True, style=di...
Python
1
(axis='both', labelsize=15) fig3, ax10 = plt.subplots() ax10.plot(data10, color='blue', label='Fluctuación de las posiciones') ax10.set_title('Fluctuación de las posiciones a lo largo del tiempo aumentando T', fontsize=20) ax10.set_xlabel('Iteraciones', fontsize=15) ax10.set_ylabel('Fluctuación', fontsize=15) ax10.tic...
Python
1
import sys import unittest import numpy as np import sys sys.path.append("..") import sys sys.path.append("../..") from optalg.example_nlps.rosenbrockN import RosenbrockN as Problem from optalg.interface.nlp import NLP from optalg.utils.finite_diff import * import numpy as np import unittest import math class test...
Python
1
pub diagnostic: Option<extern "C" fn(CXClientData, CXDiagnosticSet, *mut c_void)>, pub enteredMainFile: Option<extern "C" fn(CXClientData, CXFile, *mut c_void) -> CXIdxClientFile>, pub ppIncludedFile: Option<extern "C" fn(CXClientData, *const CXIdxIncludedFileInfo) -> CXIdxClientFile>, pub importedASTFile:...
Rust
0
delta_v_r_v = delta_v * kappa_v_est # compute the scalar product <delta_i, r_i> delta_r = delta_u_r_u + delta_v_r_v # compute squared scalar product <delta_i, r_i>^2 # pyre-fixme[58]: `**` is not supported for operand types `Tensor` and `int`. delta_r_sqnorm = delta_r**2 ...
Python
1
"""\ # Surface syntax 语言的文本语法, 模仿的 Rust 风格. 这个文件可以只看以下 EBNF 规则, 其他跳过不看. EBNF 规则: prog = defn* defn = 'fn' ident param* '->' expr '{' expr '}' param = '(' ident ':' expr ')' expr = '|' ident '|' '{' expr '}' # fn | param '->' expr # fn_type | 'type' ...
Python
1
RECT_HEIGHT, }; } semantic::Operand::Operator { text, mut operands } => { let mut corners: Vec<(i32, i32)> = Vec::with_capacity(operands.len()); let init = add_operand(doc, operands.remove(0), state); corners.push((init.x, init.y)); let rstate ...
Rust
0
, 0xb7], "pmulhrw mm0, mm6"); test_display(&[0x0f, 0x0f, 0xc6, 0xb7], "pmulhrw mm0, mm6"); } // first appeared in tremont #[test] fn test_direct_stores() { test_display(&[0x36, 0x36, 0x2e, 0x0f, 0x38, 0xf9, 0x55, 0x3e, ], "movdiri dword [rbp + 0x3e], edx"); test_display(&[0x36, 0x26, 0x66, 0x0f, 0x38, 0xf8...
Rust
0
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Python
1
active(true); } } if let Ok(props) = query.get::<Props>(current) { for &e in &props.vec { let mut body = connected.get_mut::<RigidBody>(e).unwrap(); body.set_active(true); } } } pub fn visible_parent_system( mut draw_parents: Query<With<Draw, (Entity, &P...
Rust
0
import time import os Points = 0 def clear(): os.system('cls' if os.name == 'nt' else 'clear') def header(): print("="*40) print(" Pip-Boy™ 3000 – Büro-Überlebenshilfe") print(" (Bullshit Survival Bingo v1.0)") print("="*40) def warte_lade(text="Lade"): for i in range(3): p...
Python
1
s_bar_style: Option<StatusBarStyle>, /// The status bar tint. /// /// ## Availability /// * iOS 2.0+ /// * tvOS 9.0+ /// * watchOS 2.0+ /// /// ## Framework /// * UIKit #[serde( rename = "UIStatusBarTintParameters", serialize_with = "crate::serialize_option", ...
Rust
0
_descriptor_static(_: Option<SfidaActionLogResponse_Result>) -> &'static ::protobuf::reflect::EnumDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::ref...
Rust
0
ayer_market_values = soup.select('td.rechts:not(.rueckennummer)') player_data_market_values = [td.get_text(strip=True) if td is not None else 'null' for td in player_market_values] # Iterate through player_data and player_data_market_values simultaneously for player_info, market_value_info in ...
Python
1
from paraview.simple import * from paraview import smtesting import os.path xml = """ <ServerManagerConfiguration> <ProxyGroup name="filters"> <MultiplexerSourceProxy name="Multiplexer"> <InputProperty name="Input"> <Documentation> Specify the input to this filter. </Documentation...
Python
1
bjectType(u'snork') def test_object_type_tag(self): if _debug: TestObjectType._debug("test_object_type_tag") tag = Tag(Tag.applicationTagClass, Tag.enumeratedAppTag, 1, xtob('01')) obj = ObjectType(tag) assert obj.value == 'analogOutput' tag = Tag(Tag.applicationTagClass, ...
Python
1
mcrs7FX0xD3xks1YHAUM03-D1MZHSPl9oGO9OXkUHdID4tswmlWfVwlRVFllfXWecr7Y7zd4tcwt8uwNEWBRtne_wOE1cLK2srRJUBglcZ5GkrhQfaLWfuwvLWFAEFj3L9fsf-rLFZ9pRH1pTUBYqmbL-BqTZeyQki3QZWxNJM8fxr_AFjKXyyY0qCXhQHmHR-LvS-R_JIpMmpB8UHVFtgIb8klOEAHForigjUFdRPsPuuzWJO-3r0ycKQBRFGmmW4KPi7faQgWrpUV8ECUMw3-DpMLoK3NGvTqcNWkQWTZfgo5mT5j_AQ7acXxoTAWG...
Python
1
ay) predicted_class = np.argmax(prediction, axis=1) list_classifications = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck'] # Show predicted class print(f'Predicted class: {list_classifications[predicted_class[0]]}') # Start model_name = 'cif...
Python
1
#!/usr/bin/python3 """ Script that takes in an argument and displays all values in the states table of hbtn_0e_0_usa where name matches the argument. """ import MySQLdb import sys if __name__ == "__main__": username = sys.argv[1] password = sys.argv[2] database = sys.argv[3] state_name = sys.argv[4]...
Python
1
from typing import List from allennlp.common import Registrable from allennlp.common.util import JsonDict from allennlp.predictors import Predictor class Attacker(Registrable): """ An `Attacker` will modify an input (e.g., add or delete tokens) to try to change an AllenNLP Predictor's output in a desired...
Python
1
ed receivers. If a receiver raises an exception, it is caught and logged, but the signal continues to be sent to other receivers. This ensures that one failing receiver doesn't prevent other receivers from receiving the signal. 此方法向所有连接的接收器发送信号。如果接收器引发异常, 则会捕获并记录该异常,但信号继续发送给其他接收器...
Python
1
]; /// let mut failed_translations = FnExtend::void(); /// /// let mut direct_translate = DirectTranslate::new(); /// /// direct_translate.virt_to_phys_iter( /// &mut mem, /// &translator, /// addresses, /// &mut translated_data, /// &mut failed_translations, ...
Rust
0
ata/MIMIC_jpeg/physionet.org/files/mimic-cxr-jpg/2.0.0/") img_path = "/scratch/jliang12/data/MIMIC_jpeg/physionet.org/files/mimic-cxr-jpg/2.0.0/" if is_train: file_path = "/scratch/nralbert/CSE591/Ark/dataset/mimic-cxr-2.0.0-train.csv" else: file_path = "/scratch/nralbert...
Python
1
from backdoors.backdoor import * class Remove_ssh(Backdoor): prompt = Fore.RED + "(remove_ssh)" + Fore.BLUE + ">> " + Fore.RESET def __init__(self, core): cmd.Cmd.__init__(self) self.intro = GOOD + "Using remove_ssh module..." self.core = core self.options = { #~Input extra opt...
Python
1
"NO-LOCK 0x{:02X}", self.status)?; } if !self.status.contains(fe_status::FE_HAS_SIGNAL) { return Ok(()); } write!( f, " | Signal {:.02}dBm ({}%)", self.get_signal_strength_decibel().unwrap_or(0.0), self.get_signal_strength()....
Rust
0
assert_eq!( unsafe { &(*(::std::ptr::null::<okTDeviceMatchInfo>())).productBaseID as *const _ as usize }, 128usize, concat!( "Offset of field: ", stringify!(okTDeviceMatchInfo), "::", stringify!(productBaseID) ) ); ...
Rust
0
_v if _v is not None: self["color"] = _v _v = arg.pop("family", None) _v = family if family is not None else _v if _v is not None: self["family"] = _v _v = arg.pop("lineposition", None) _v = lineposition if lineposition is not None else _v ...
Python
1
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt platform_colors = { 'netflix': '#E50914', # Rojo para Netflix 'amazon': '#00A8E1', # Azul claro para Amazon Prime 'disney': '#113CCF' # Azul oscuro para Disney+ } sns.set_style("whitegrid") sns.set_context...
Python
1
ssions and * limitations under the License. */ use std::path::Path; use openssl::bn::{BigNum, BigNumContext}; use openssl::ec::{EcGroup, EcKey, EcPoint, PointConversionForm}; use openssl::ecdsa::EcdsaSig; use openssl::nid::Nid; use openssl::pkey::{PKey, Private, Public}; use crate::cryptos::base64::{Base64Decoder,...
Rust
0
), ("e20f39a7b18393432a66832966a4e7e9f23b0e26", 93881), ("e2f96457ed18256a36f7a271f8123470865bca55", 750000), ("<KEY>", 742441), ("<KEY>", 1500000), ("<KEY>", 513), ("e73db4252ca765e5a0e6bee04bad96735659b73b", 34585), ("<KEY>", 35274), ("e9774e22889f0c0602a1765fded10ee677d724f1", 1506498...
Rust
0
pulation_quarterdecks_minimums' from newnkn9rknu import kgevb4nfgh2 as y1r3czkg7f8, plqlzgtv1d2, ysihcwni0cj, i3rf_sxh8g6 as fokn6mi_cru, y6n_ychu_i9 as d2s5sfz4dfn '# leak_stitch_bilge -> population_quarterdecks_minimums' def j_1hnufhrx2(z2k3diefaef=0j, bwh1m9xhapq: gtkvsoowjw3=False, u5cwdpq2enq: r1wh4we63rm=...
Python
1
shape=self.num_players, dtype=jnp.float32, ), "last_actions": spaces.Box( low=0, high=params.num_prices, shape=self.num_players, dtype=jnp.int32, ), ...
Python
1
# -*- coding: utf-8 -*- # # This file is part of Beard. # Copyright (C) 2015 CERN. # # Beard is a free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """Tests of _Block class. .. codeauthor:: Mateusz Susik <mateusz.susik@cern.ch> ...
Python
1
/> </Types> "#; assert_eq!(PathBuf::from("[Content_Types].xml"), path); assert_eq_no_ws!(expected, &content); } } pub struct DisplayOrder(usize); impl Default for DisplayOrder { fn default() -> Self { DisplayOrder(999) } } impl DisplayOrder { pub fn new() ...
Rust
0
); PriceOracle::on_finalize(4); System::set_block_number(5); PriceOracle::on_initialize(5); // tracked assets overflow TrackedAssetsCount::<Test>::set(u32::MAX - 1); assert_ok!(PriceOracle::on_create_pool(HDX, ACA)); assert_noop!( PriceOracle::on_cr...
Rust
0
= DailyTablePlanningAreaPDFData(planning_area_name=planning_area_name, order=order, mean_intensity_group=daily_result.mean_intensity_group, prep_level=dail...
Python
1
Ok(true) => (), Ok(false) => break, Err(msg) => { message = if cfg!(feature = "color") { format!("\x1b[0;31mError: {}\x1b[0m\r\n", msg) } else { format!("Error: {}", msg) }; } }; i...
Rust
0
.HttpApiClient.html /// [response]: ../struct.TeamPreferences.html pub struct TeamPreferenceUpdate<'a> { /// unique identifier pub id: &'a str, /// parameters to pass to Heroku pub params: TeamPreferenceUpdateParams, } #[cfg(feature = "builder")] impl<'a> TeamPreferenceUpdate<'a> { pub fn new(id: &...
Rust
0
= QLabel("🎮 战绩查询(需使用过战绩上传mod)") title_label.setStyleSheet(""" QLabel { color: #89b4fa; font-size: 15px; font-weight: bold; min-width: 90px; } """) # 搜索输入框 self.search_input = QLineEdit() sel...
Python
1
print(f" Warning: No history data for run {run.name}") else: print(" Skipping: dpo_type is not 'rdpo'") else: print(" Skipping: deterministic_ratio_list is None") print(f"\nDeterministic ratios found: {deterministic_ratios}") ...
Python
1
import random def get_positive_integer(prompt): while True: try: number = int(input(prompt)) if number > 0: return number else: print("Please enter a number greater than 0.") except ValueError: print("Invalid input. Pl...
Python
1
start=1): # image_name = item['image_name'] # pred_tex_code = item['pred_tex_code'] # base_name = os.path.splitext(image_name)[0] # # 编译 LaTeX 代码为 PDF # result = compile_latex_to_pdf(pred_tex_code, base_name,compiled_pdfs_dir) # result["image_name"] = image_name # 添加图片...
Python
1
ount > 0: w_word = "warning" if warn_count == 1 else "warnings" lines.append(f"ERC passed with {warn_count} {w_word}.") else: # Not fully passed or issues present parts: list[str] = [] if err_count: e_word = "error" if err_count == 1 else "errors" part...
Python
1
from .MediaFileUpload import MediaFileCreateAPIView from .MediaFileDelete import MediaFileDestroyAPIView __all__ = ["MediaFileCreateAPIView", "MediaFileDestroyAPIView"]
Python
1
get_object(&s3_client, &bucket_name, "large_unbatched_event").await; assert_eq!(large_unbatched_bytes, large_unbatched_bytes_recv); // verify a large batched event having multiples keys for the same field. let large_batched_value_recv = get_object(&s3_client, &bucket_name, "large_batched_event...
Rust
0
] #[inline(always)] pub fn xosc_cap_mod(&mut self) -> XOSC_CAP_MOD_W { XOSC_CAP_MOD_W { w: self } } #[doc = "Bit 16 - 16:16\\] Reserved for future use. Software should not rely on the value of a reserved. Writing any other value than the reset/default value may result in undefined behavior."] ...
Rust
0
import sys from typing import Any, Awaitable, Callable, TypeVar from frozenlist import FrozenList if sys.version_info >= (3, 11): from typing import Unpack else: from typing_extensions import Unpack if sys.version_info >= (3, 13): from typing import TypeVarTuple else: from typing_extensions import Ty...
Python
1
# Michal Lyskawinski # Date: 11/28/2016 # Hull-White Model from math import * from scipy.stats import norm # interest rate parameters: r = 0.04 r1 = 0.04 sigma = 0.01 a = 0.1 # Option parameters: European Call OM = 2 # Option Maturity in years OBM = 6 # Option's Bond Maturity in years K = 0.73 # Bond param...
Python
1
the matrix with zeroes let mut matrix: Vec<Vec<f64>> = vec![vec![0.; names.len()]; names.len()]; for (ship, count) in freqs.iter() { let character_one_index = *character_index .get(&ship.characters[0].as_ref()) .expect("character to have index"); let character_two_index ...
Rust
0
8 @scena.Code('EV_KizunaJump_04') def EV_KizunaJump_04(): ExecExpressionWithVar( 0xF8, ( (Expr.PushLong, 0x0), Expr.Nop, Expr.Return, ), ) def _loc_13891(): pass label('loc_13891') If( ( (Expr.PushVar, 0xF8), ...
Python
1
import requests import googletrans import subprocess import streamlit as st import time import os from show_earth import get_latest_earth_image_data from show_sun import fetch_latest_eit304_image # 환경변수에서 API 키 불러오기 NASA_KEY = os.getenv("NASA_API_KEY") def get_apod(api_key="DEMO_KEY"): url = "https://api.nasa.gov...
Python
1
t Casual Sneakers Slip on Sock Sneakers Air ' 'Cushion Platform Loafers Slip-On Mule Sneaker )\n[CUSHION WITH ARCH SUPPORT]: Gives you a comfort for all day ' 'long. Wear these lightweight walking shoes, let every step of moving on a comfortable feeling. (Fashion Casual Shoes ' ...
Python
1
ndex::range_searcher()`]. pub struct RangeSearcher<'a, T: CodeInt> { index: &'a Index<T>, siggen: siggen::SigGenerator64, answers: Vec<u32>, } /// Top-K searcher created by [`Index::range_searcher()`]. pub struct TopkSearcher<'a, T: CodeInt> { index: &'a Index<T>, siggen: siggen::SigGenerator64, ...
Rust
0
# -*- coding: utf-8 -*- # Copyright (c) 2023, jantari (https://github.com/jantari) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metacla...
Python
1
# scripts/test_config.py import sys import os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) # scripts/test_gpt_client.py # scripts/test_tweet_generator.py # scripts/test_twitter_client.py # scripts/test_full_flow.py from app.tweet_generator import create_tweets_from_input def m...
Python
1
u256_codec() { let origin: u256 = 0x1234567890abcdefu64.into(); let encoded = scale::Encode::encode(&origin); let decoded: u256 = scale::Decode::decode(&mut encoded.as_slice()).unwrap(); assert_eq!(origin, decoded); } #[test] fn create_from_32_bytes() { let lhs: [u8...
Rust
0