text
string
label_name
string
labels
int64
DB67P2DB c35UyDBhAY2DBzhMzDByLJ2DBcSxyDB6mN2DB cMd8xDBLyg2DBtdMyDBqGb2DB35EyDBDXe2DB cv0rxDBO0l2DBEt1xDBmui2DBrcnxDBjXk2DB cHvwyDBy2q2DBPfEyDB67t2DBOJbyDBBrv2DB cwKfzDBpwg2DByLAzDBoan2DB0iOzDB8nc2DB cyLK0DBZ7v2DBNzqzDB/pj2DBPK5zDB99r2DB cwf00DBdos2DBnvb0DBCB02DBv0y0DBktw2DB c6750DBZ7U2DB...
Rust
0
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2012, Yujin Robot # 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 r...
Python
1
.capture_image(img_name="testy_mac_testface.tif") # define output folder scAnt.outputFolder = Path.cwd() if not os.path.exists(scAnt.outputFolder): os.makedirs(scAnt.outputFolder) print("made folder!") # run example scan print("\nRunning Demo Scan!") scAnt.scan_stepSize = [200,...
Python
1
before the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_pre_files = [] # HTML files shat should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_post_files = [] # A list of files that should not be pa...
Python
1
self.total_seeders = self.total_seeders.saturating_sub(seeders_cleared); self.total_leechers = self.total_leechers.saturating_sub(leechers_cleared); } } // This is a separate struct that will be returned through // the statistics handler. It looks mostly the same as // GlobalStatistics but the structs wi...
Rust
0
#[inline(always)] pub fn variant(self, variant: M_START_DET_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "START_DET interrupt is masked"] #[inline(always)] pub fn enabled(self) -> &'a mut W { self.variant(M_START_DET_A::ENABLED) } #[doc = "STAR...
Rust
0
.4f}, 成交量倍数: {latest['volume_ratio']:.2f}") self.last_signal = signal return signal except Exception as e: logger.error(f"生成交易信号时出错: {e}") return SignalType.HOLD def calculate_stop_loss_take_profit(self, entry_price: float, signa...
Python
1
::CONS) => ast::Value::CONS, Some(lexer::Token::DIV) => ast::Value::DIV, Some(lexer::Token::EQ) => ast::Value::EQ, Some(lexer::Token::I) => ast::Value::I, Some(lexer::Token::ISNIL) => ast::Value::ISNIL, Some(lexer::Token::LT) => ast::Value::LT, Some(lexer::Token::MUL) => ...
Rust
0
_targets(self, p, targets): # number of anchors一般是3, nt是这个bs中所有的gt box数量 na, nt = self.na, targets.shape[0] # 存放类别,xywh,?,? tcls, tbox, ep, indices, anch = [], [], [], [], [] # gain的作用就是把gt的xywh转换到格点下的坐标,除了最后一位,前面都对应targets的维度 gain = torch.ones(11, device=self.device) ...
Python
1
ble", python=True) match_type2 = SelectField("Processing", choices=match_choices) match2 = StringField(match_label, widget=TextArea(), render_kw={"rows": 5}) operation2 = SelectField("Operation", choices=operation_choices) variable3 = StringField("Variable Name") query3 = StringField("Variable", pyt...
Python
1
expression. Activate { file: String }, /// Deactivate an expression. Deactivate { file: String }, } #[derive(StructOpt, Debug, Clone)] pub struct Tint { /// Enable `jeb_` (rainbow) mode. #[structopt(long, alias = "jeb_")] pub rainbow: bool, /// Mix with scene lighting color value (between ...
Rust
0
# Copyright 2025 Pasteur Labs. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import importlib import sys from pathlib import Path # Recursive import of the whole package to ensure all deps are present try: for path in Path(__file__).parent.glob("**/*.py"): if path.stem == "__init__": ...
Python
1
"cubic inch" | "cubic inches" => tokens.push(Token::Unit(CubicInch)), "cubic foot" | "cubic feet" => tokens.push(Token::Unit(CubicFoot)), "cubic yard" | "cubic yards" => tokens.push(Token::Unit(CubicYard)), "cubic mile" | "cubic miles" => tokens.push(Token::Unit(CubicMil...
Rust
0
"""Add call session Revision ID: d573eaf54158 Revises: e3364844936d Create Date: 2025-06-19 01:57:15.178940 """ from typing import Sequence, Union import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision: str = "d573eaf54158" down_revision: Union[str, None] = "e3364844936d" ...
Python
1
} } } if !added { panic!("Element was not added to octree!"); } self.faces.push(face); return index; } pub fn get_hits<'c: 'a>(&'a self, ray: &'c RayTraceRay) -> Box<Iterator<Item = RayTraceOctreeItem<'a>> + 'a> { let mut heap = BinaryHeap::new(); heap.push(RayTraceHitHeapEntry::new(0.0, &self...
Rust
0
idl::endpoints::create_proxy; use fidl_fuchsia_input_report as hid_input_report; use fuchsia_async::{self as fasync, Time, TimeoutExt}; use fuchsia_vfs_watcher as vfs_watcher; use fuchsia_zircon::{self as zx, Duration}; use futures::{TryFutureExt, TryStreamExt}; use io_util::{open_directory_in_namespace, OPEN_RIGHT_REA...
Rust
0
descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( "status_code", |m: &DumpJemallocHeapProfileResponse| { &m.status_code }...
Rust
0
""" Parse link destination """ from ..common.utils import charCodeAt, unescapeAll class _Result: __slots__ = ("ok", "pos", "lines", "str") def __init__(self) -> None: self.ok = False self.pos = 0 self.lines = 0 self.str = "" def parseLinkDestination(string: str, pos: int, m...
Python
1
riginal, then DUP2 it back so it doesn't get closed by the implicit exec at the end of posix_spawn's file actions. """ self.assertEqual( _getFileActions([(0, True)], {0: 0}, CLOSE, DUP2), [(DUP2, 0, 1), (DUP2, 1, 0), (CLOSE, 1)], ) def test_inheritabl...
Python
1
"There are two distinct receptors" ) ) def test_training_set(self): evaluator = self.engine ke = evaluator.extractor training_set = list(evaluator.create_training_set(100)) t = dict(base_model="gpt-4o", template=ke.template, examples=training_set) ...
Python
1
\0", "writeChars\0", "(Ljava/lang/String;)V\0"); __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } /// [writeUTF](https://developer.android.com/reference/java/io/ObjectOutputStream.html#writeUTF(java.lang.String)) /// /// Requ...
Rust
0
if lowest: print(f" 最低分:{lowest[0]} {lowest[1]}分") print(f" 及格科目:{student.count_passing_subjects()}门") print(f" 不及格科目:{student.count_failing_subjects()}门") print(f" 优秀学生:{'是' if student.is_excellent_student() else '否'}") # 显示不及格科目 failing = stude...
Python
1
y_http::operation::SerializationError> { if let Some(var_707) = &input.failure_type { object.key("failureType").string(var_707.as_str()); } if let Some(var_708) = &input.number_of_retries { object.key("numberOfRetries").number( #[allow(clippy::useless_conversion)] aws...
Rust
0
) fields["kwargs"] = dumps(fields.get("kwargs") or {}) fields["queue"] = options.get("queue") fields["exchange"] = options.get("exchange") fields["routing_key"] = options.get("routing_key") obj, _ = DjCeleryPeriodicTask._default_manager.update_or_create(name=name, defaults=fields...
Python
1
println!("Graph ({}) and count ({}) had different amount of nodes.", gr.node_count(), order.len()); return false; } // check all the edges of the graph for edge in gr.raw_edges() { let a = edge.source(); let b = edge.target(); let ai = order.iter().position(|x| *x == a).unwra...
Rust
0
QKBNR w - - 0 1"; assert_eq!(0, Game::from_fen(&mut fen.split_ascii_whitespace()).unwrap().castling_rights); let fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w Kk - 0 1"; assert_eq!(BLACK_KINGSIDE | WHITE_KINGSIDE, Game::from_fen(&mut fen.split_ascii_whitespace()).unwrap().castling_rights); let fe...
Rust
0
the hazards to allow garbage collection. available_hazards_free_before: usize, } impl State { /// Get the number of hazards in the cache which are not in state "free". fn non_free_hazards(&self) -> usize { self.available_hazards.len() - self.available_hazards_free_before } /// See `get_ha...
Rust
0
d be present here? piet-gpu and swash have // different expectations let _transform = Transform { xx: glyph.transform[0], xy: glyph.transform[1], yx: glyph.transform[2], yy: glyph.transform[3], x: glyph.transform[4], y: glyph.transf...
Rust
0
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn.functional as F from fairseq.criterions import register_criterion from fairseq.criterions.sentence_prediction imp...
Python
1
was started by origin! 🎯)\n", ); } //! Signing API requests without effort. //! //! # Example //! //! ```rust //! use reqsign::services::aws::v4::Signer; //! use reqwest::{Client, Request, Url}; //! use anyhow::Result; //! //! #[tokio::main] //! async fn main() -> Result<()>{ //! // Signer can load region and...
Rust
0
p of the peripheral. /// No prior actions like `stop()` are performed by this function. pub fn free() -> cortex_m::peripheral::SYST { unsafe { SYSTICK.take().unwrap() } } /// Starts the counter. /// /// Initialisation must be done before calling this function. /// Use `stop()` to halt the counter again. pub fn sta...
Rust
0
e of flashing" dict_vars['message'] += msg self.logger.error(msg) return dict_vars dict_vars['message'] += f" Star flashing LED {led_number} the color {led_color} of Controller with ID {controller_id} ({this_function.name})." ...
Python
1
from(s: StrongBuf<Ctx>) -> Cow<'a, Strong<Ctx>> { Cow::Owned(s) } } impl<Ctx> From<StrongBuf<Ctx>> for Arc<Strong<Ctx>> where Ctx: Validator { #[inline] fn from(s: StrongBuf<Ctx>) -> Self { let a: Arc<str> = Arc::from(s.into_string()); let rw = Arc::into...
Rust
0
"" n = int(n) na = np.nan dtype = arr.dtype is_timedelta = False if needs_i8_conversion(arr): dtype = np.float64 arr = arr.view('i8') na = iNaT is_timedelta = True elif is_bool_dtype(dtype): dtype = np.object_ elif is_integer_dtype(dtype): ...
Python
1
if diagonals2.contains_key(&diagonal2) { continue; } queens[row] = i as isize; columns.insert(i, true); diagonals1.insert(diagonal1, true); diagonals2.insert(diagonal2, true); Self::backtrack(queens, n, row + 1, colum...
Rust
0
available. /// /// These methods should have a smaller code size footprint than the normal /// `Option::unwrap` and `Option::expect` methods, but they are specific to /// working with wasm and JS. /// /// On non-wasm32 targets, defaults to the normal unwrap/expect calls. /// /// # Example /// /// ``` /// use wasm_bindg...
Rust
0
OutUserId: 外部用户ID :type OutUserId: str """ self._SummaryId = None self._PayeeId = None self._Name = None self._IncomeType = None self._SummaryAmount = None self._SummaryTime = None self._SummaryCount = None self._OutUserId = None @prop...
Python
1
req: &'a Request<'r>, } impl<'a, 'r> Context<'a, 'r> { pub fn header<T: Into<String>>(&self, s: T) -> String { self.req.headers().get(s.into().as_str()).collect() } } impl<'a, 'r> FromRequest<'a, 'r> for Context<'a, 'r> { type Error = !; fn from_request(request: &'a Request<'r>) -> request::Ou...
Rust
0
let mut acc = HashMap::new(); sc.extends .iter() .for_each(|ty| self.decl_class_type(stack, &mut acc, ty)); acc } fn get_implements( &self, parents: &HashMap<Symbol, Rc<FoldedClass<R>>>, ty: &DeclTy<R>, inst: &mut HashMap<Symbol, D...
Rust
0
#Juego ahorcado import random #importamos biblioteca random para que el codigo pueda elegir variables de forma aleatoria def GetRandomWord(): words = ["computador","teclado","lapiz","botella","pantalla","guitarra","celular","comida","hogar","parangaricutirimicuaro"] #definimos variable "words" insertando pal...
Python
1
.optflag( "R", "recursive", "(with \"list\" command or \"copy\" command) process recursively", ) .optflag( "M", "mirror", "(with \"copy\" command) delete files that do not exist in the source. implies -R.", ) ....
Rust
0
#[doc = "Bit 0 - Automatic baud-rate detect enable"] #[inline(always)] pub fn ucabden(&self) -> UCABDEN_R { UCABDEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 2 - Break time out error"] #[inline(always)] pub fn ucbtoe(&self) -> UCBTOE_R { UCBTOE_R::new(((self.bits >> 2) & 0x0...
Rust
0
""" Write a function to find the minimum product from the pairs of tuples within a given list. assert min_product_tuple([(2, 7), (2, 6), (1, 8), (4, 9)] )==8 """ def min_product_tuple(lst): return min(lst, key=lambda x: x[0]*x[1])[0]*min(lst, key=lambda x: x[0]*x[1])[1] print(min_product_tuple([(2, 7), (2, 6), (1...
Python
1
from dotenv import load_dotenv import os from PIL import Image, ImageOps import requests import threading from twilio.rest import Client load_dotenv(os.path.join(os.path.abspath(os.path.dirname(__file__)), '.env')) latestImgUrl = "" class inky_display: HEIGHT = 104 WIDTH = 212 WHITE = (255,255,255) BL...
Python
1
class TaskFamily: @staticmethod def get_tasks() -> dict[str, dict]: return { "1": {"prompt": "Create a fictional language based on the following constraints: The language must have at least 10 unique words, a simple grammar rule for forming past tense verbs, and a basic sentence structure fo...
Python
1
(*mem.offset(cur_list.eTeX_aux as isize)).b32.s1 = cur_list.aux.b32.s1; (*mem.offset(cur_list.aux.b32.s1 as isize)).b32.s1 = p } } else { (*mem.offset(cur_list.tail as isize)).b32.s1 = p; q = (*mem.offset(cur_list.head as isize)).b32.s1 } pop_nest(); q } #[no_mang...
Rust
0
from typing import Annotated from fastapi import APIRouter, Depends, HTTPException, Path, status from fastapi_pagination import Page from sqlalchemy.ext.asyncio.session import AsyncSession from futuramaapi.repositories import INT32 from futuramaapi.repositories.session import get_async_session from futuramaapi.router...
Python
1
velocity[i], moon.position[i]); } } for i in 0..3 { self.position[i] += self.velocity[i]; } } fn energy(&self) -> i32 { self.position.iter().map(|c| c.abs()).sum::<i32>() * self.velocity.iter().map(|v| v.abs()).sum::<i32>() } } fn simula...
Rust
0
derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)] #[cfg_attr(feature = "std", derive(scale_info::TypeInfo))] pub enum OwnableError { CallerIsNotOwner, NewOwnerIsZero, }<filename>tests/tests.rs use lapin::ConnectionProperties; use r2d2_lapin::prelude::*; use std::sync::Arc; use tokio_amqp::LapinTokioEx...
Rust
0
# init.py """ D3Q19 LBM模擬初始化模組 使用Taichi GPU加速和高性能並行計算 """ import taichi as ti import config import time # 全域變數追蹤初始化狀態 _taichi_initialized = False def initialize_taichi_once(): """統一的Taichi初始化函數 - 智能後端選擇與避免重複初始化""" global _taichi_initialized if _taichi_initialized: print("✓ Taichi已初始化,跳過重複初始化...
Python
1
import hashlib import requests import json headers = { "accept": "application/json, text/plain, */*", "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", "baggage": "sentry-environment=production,sentry-release=global-sso%401.0.56,sentry-public_key=3ed0768cf835395f20e8c3bca4499ed8,sentry...
Python
1
); println!("starting the progress"); for i in 0..TOTAL { bar.replace(i); print!( "{}{}", termion::cursor::Left(bar.get_last_width() as u16), bar.to_string() ); sleep(Duration::from_millis(10)); } println!("\ndone with progress"); } #...
Rust
0
lxm9h8z3k2e72q4k9hcz7vpggkg4j", "Invalid or unsupported Segwit (Bech32) or Base58 encoding.", # tb1, Non-zero padding in 8-to-5 conversion [], ), ("bc1gmk9yu", "Empty Bech32 data section", []), ] VALID_DATA = [ # BIP 350 ( "BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4", "0...
Python
1
ngify!(__xmm_reg) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct __darwin_ymm_reg { pub __ymm_reg: [::std::os::raw::c_char; 32usize], } #[test] fn bindgen_test_layout___darwin_ymm_reg() { assert_eq!( ::std::mem::size_of::<__darwin_ymm_reg>(), 32usize, con...
Rust
0
lf, fd: &FileData, ns: ExtAttrNamespace, name: &OsStr) -> Result<(), i32>; fn inactive(&self, fd: FileData); fn fsync(&self, fd: &FileData) -> Result<(), i32>; fn getattr(&self, fd: &FileData) -> Result<GetAttr, i32>; fn getextattr(&self, fd: &FileData, ns: ExtAttrNamespace, ...
Rust
0
: True}, "content": [ { "component": "thead", "content": [ { "component": "th", ...
Python
1
} else { SimpleDirection::SouthWest } } else { if x.abs() > y.abs() { if x >= 0.0 { SimpleDirection::East } else { SimpleDirection::West } } else { if y >= 0.0 { SimpleDirection::North } else { SimpleDir...
Rust
0
""" AuraRender 智能编排器 负责: 1. 理解用户需求 2. 选择视频类型 3. 匹配风格系统 4. 规划资源使用 5. 生成执行脚本 """ import json from typing import Dict, Any, Optional, List from datetime import datetime import sys import os # 添加项目根目录到sys.path current_dir = os.path.dirname(os.path.abspath(__file__)) project_root = os.path.abspath(os.path.join(current_di...
Python
1
r: Self) -> Self { FixedPoint32::wrap(self.inner.wrapping_mul(other.inner) >> 8) } } impl std::ops::MulAssign for FixedPoint32 { #[inline] fn mul_assign(&mut self, other: Self) { self.inner = self.inner.wrapping_mul(other.inner) >> 8; } } impl std::ops::Div for FixedPoint32 { type ...
Rust
0
unsafe { *delta }).clone(), sg: (unsafe { *sg }).clone(), }, w_comm: (unsafe { &*w_comm }).clone(), za_comm: (unsafe { &*za_comm }).clone(), zb_comm: (unsafe { &*zb_comm }).clone(), h1_comm: (unsafe { &*h1_comm }).clone(), g1_comm: (unsafe { &*g1_comm }).clone...
Rust
0
().call( /// management::install_code(canister_id, wasm_module) /// .with_mode(management::InstallMode::Reinstall) /// .with_memory_allocation(1000) /// ); /// /// // Upgrade a canister with custom callbacks /// wasm().call( /// management::install_code(canister_id, wasm_module) /// .with_mode(manage...
Rust
0
form data", ); }; match update_result { Ok(0) | Err(_) => rocket::response::Flash::error( rocket::response::Redirect::to("/devices"), "Failed to update device", ), _ => rocket::response::Flash::success( rocket::response::Redirect::to("/devices...
Rust
0
(ScatterRecordstatic { specular_ray: Ray::new2(&rec.p, &reflected, r_in.time), is_specular: true, attenuation: Vec3::new(1.0, 1.0, 1.0), pdf_ptr: pdf_ptr_, }); } let reflect_prob = schlick(cos_theta, etai); if random_do...
Rust
0
import os class Config: # 基础配置 DEBUG = False TESTING = False # OpenAI配置 OPENAI_API_KEY = os.getenv('OPENAI_API_KEY') OPENAI_MODEL = 'gpt-3.5-turbo' OPENAI_MAX_TOKENS = 1000 OPENAI_MAX_CONCURRENT_REQUESTS = 10 # 图片生成配置 STABLE_DIFFUSION_API_KEY = os.getenv('STABLE_DIFFUSION_API_...
Python
1
---------------------------------") print(f"List of devices:--------- {devices}") LenDevices = 0 for device in devices: print(f"{device['ip']}\t\t{device['mac']}") OBJWidget = QtWidgets.QWidget() objWidget = Ui_Form() o...
Python
1
)) .send() .map_err(|err| InternalError::from_source(err.into()))?; if !response.status().is_success() { match response.status() { StatusCode::UNAUTHORIZED => return Ok(None), status_code => { return Err(InternalError::with...
Rust
0
, bound regions are not supposed to exist "in the wild" /// outside their binder, e.g. in types passed to type inference, and /// should first be substituted (by skolemized regions, free regions, /// or region variables). /// /// ## Skolemized and Free Regions /// /// One often wants to work with bound regions without ...
Rust
0
Ramp.argtypes = [ctypes.POINTER(SDL_Window), ctypes.POINTER(ctypes.c_ushort), ctypes.POINTER(ctypes.c_ushort), ctypes.POINTER(ctypes.c_ushort)] def SDL_SetWindowGammaRamp(window, red, green, blue): """ Args: window: ctypes.POINTER(SDL_Window). red: ctypes.POINTER(ctypes.c_ushort). green: ctypes.POINTER(ctypes....
Python
1
st.dataframe(df8) with col2: st.subheader('Domains Involved in') df9=df[df['startup'].str.contains(startupss)]['subvertical'].drop_duplicates(keep='first').dropna() st.dataframe(df9) with col3: st.subheader('Cities started in') df10 = df[df['startup'].str.contains(sta...
Python
1
from tkinter import * YELLOW = "#f7f5dd" def miles_to_km(miles): return miles*1.609344 window = Tk() window.title("Miles to Km Converter") window.minsize(width=100,height=200) window.config(padx=50,pady=50) miles_label= Label(text ="Miles",font=("Arial",12)) miles_label.grid(column=2,row=0) miles_label.config(...
Python
1
from woningwaardering.vera.bvg.generated import Referentiedata from woningwaardering.vera.referentiedatasoort import Referentiedatasoort class ZaakrolReferentiedata(Referentiedata): pass class Zaakrol(Referentiedatasoort): adviseur = ZaakrolReferentiedata( code="ADV", naam="Adviseur", ) ...
Python
1
s"] // #[doc = "! @param[in] callback the callback reporting statements"] // #[doc = "! @param[in] callback_data user data for the callback"] // #[doc = "! @param[in] logger callback to report messages during parsing"] // #[doc = "! @param[in] logger_data user data for the logger"] // #[doc = "! @pa...
Rust
0
let max_lit = match args.get(1) { Some(syn::NestedMeta::Lit(syn::Lit::Str(ref lit))) => Some(lit), None => None, _ => return quote_spanned! {args[1].span() => compile_error!("the argument must be a string literal");}.into() }; match parse_args(&min_lit.value()) { Ok(req_min_ve...
Rust
0
#import torch import cv2 import numpy as np import types from numpy import random import cvtools def intersect(box_a, box_b): max_xy = np.minimum(box_a[:, 2:], box_b[2:]) min_xy = np.maximum(box_a[:, :2], box_b[:2]) inter = np.clip((max_xy - min_xy), a_min=0, a_max=np.inf) return inter[:, 0] * inter[...
Python
1
from data.modules import PrepData from utils import logger logger = logger() def remove_bio_prefixes(label: str) -> str: if len(label) < 2 or label[1] != '-': return label if label[0] not in ['B', 'I', 'O']: raise ValueError(f"Haven't seen {label}") return label[2:] class CoNLL2012(PrepDa...
Python
1
oblemStats { pub total_runs: u32, /// How many runs are accepted. If one party made two accepted runs, both are counted. pub accepted_runs: u32, /// Max party score gained on this problem. /// /// Note: if `merge_subtasks` mode is enabled, it is possible that e.g. max_score is 100 /// but ev...
Rust
0
al_dir=non_anal_dir, min_freq=min_freq, max_freq=max_freq, num=num, relative=relative, units=units, pol_in=pol_in, pol_out=pol_out) f.plot(ax=ax, **kwargs) if plot_phfreqs: if non_anal...
Python
1
2, 0), -1.0, 0.0, 0, 255) img_ = img_.astype("uint8") processed_image_list.append(img_) return processed_image_list def generate(model_file, num_samples, output_path, save_images: bool): """This function generates synthetic images of mammography regions of interest""" try: device ...
Python
1
ionSet, { #[inline] fn isa_ids() -> BTreeSet<&'static str> { let mut set = BTreeSet::new(); set.insert(constants::ISA_ID_ALU); set.extend(DigestOp::isa_ids()); set.extend(Secp256k1Op::isa_ids()); set.extend(Curve25519Op::isa_ids()); set } #[inline] fn...
Rust
0
elif basic_choice == '3': phone = input("Введите номер телефона: ") toolkit.phone_lookup(phone) input(f"\n{Colors.YELLOW}Нажмите Enter для продолжения...{Colors.END}") elif osint_choice...
Python
1
::from_bytes(string))) } pub(crate) fn os_str_to_bytes(os_string: &OsStr) -> Cow<'_, [u8]> { Cow::Borrowed(OsStrExt::as_bytes(os_string)) } #[allow(renamed_and_removed_lints)] #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::unnecessary_wraps)] pub(crate) fn os_string_from_vec(string: Vec<u8>) -> Result<OsS...
Rust
0
METHOD, read: unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int, ) -> c_int; #[cfg(any(ossl110, libressl273))] pub fn BIO_meth_set_ctrl( biom: *mut BIO_METHOD, read: unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long, ) -> c_int; #[cfg(any(ossl110, libr...
Rust
0
#!/usr/bin/python3 """ module that holds a function look up that implements the use of dir () """ def lookup(obj): """ lookup retrun the list of available attrubutes and methods of an object """ list_obj = [] list_obj = dir(obj) return list_obj
Python
1
"System ID"), assigned_number!(0x2A24, "Model Number String"), assigned_number!(0x2A25, "Serial Number String"), assigned_number!(0x2A26, "Firmware Revision String"), assigned_number!(0x2A27, "Hardware Revision String"), assigned_number!(0x2A28, "Software Revision String"), assigned_number!(0x2...
Rust
0
05, 0.2)) vsini = numpyro.sample("vsini", dist.Uniform(15.0, 25.0)) g = 2478.57730044555 * Mp / Rp**2 # gravity u1 = 0.0 u2 = 0.0 # T-P model// Tarr = T0 * (Parr / Pref) ** alpha # line computation CO mu = frun(Tarr, MMR_CO, Mp, Rp, u1, u2, RV, vsini) numpyro.sample("y1", dist.Norma...
Python
1
NEXT_MON_TUE) self._add_observed(self._add_holiday_oct_2(name), rule=SAT_SUN_TO_NEXT_MON_TUE) # https://en.wikipedia.org/wiki/King's_Official_Birthday#Tuvalu if self._year <= 2022: # Heir to the Throne's Birthday. self._add_holiday_2nd_mon_of_nov(tr("Aso fanau o te sui o...
Python
1
assert!(matches!(event, GatewayEvent::Dispatch(42, _))); } #[test] fn test_guild_2() { let input = r#"{ "d": { "afk_channel_id": null, "afk_timeout": 300, "application_id": null, "banner": null, "default_message_notifications": 0, "description": null, "discover...
Rust
0
import argparse from vllm import EngineArgs, LLMEngine, SamplingParams def main(args: argparse.Namespace): # Parse the CLI argument and initialize the engine. engine_args = EngineArgs.from_cli_args(args) engine = LLMEngine.from_engine_args(engine_args) # Test the following prompts. test_prompts ...
Python
1
= u8::from(tmp1.1); let tmp2 = r11.overflowing_add(rbx); let of1_a = u8::from(tmp2.1); r11 = tmp2.0; r10 = _mulx_u64(N[1], rdx, &mut rbx); let cf1_b = _addcarryx_u64(cf1_a, r11, r10, &mut r10); let of1_b = _addcarryx_u64(of1_a, r12, rbx, &mut r12); r11 = _mulx_u64...
Rust
0
et who = ensure_signed(origin)?; T::TEECurrency::transfer(&who, &Self::account_id(), amount, AllowDeath) .map_err(|_| Error::<T>::CannotDeposit)?; Self::deposit_event(RawEvent::TransferToTee(who, amount)); Ok(()) } #[weight = T::WeightInfo::transfer_to_chain()] fn transfer_to_chain(origin, data: Vec...
Rust
0
import os import numpy as np import joblib from sklearn.metrics import ( accuracy_score, classification_report, confusion_matrix, roc_curve, auc, precision_recall_curve ) import matplotlib.pyplot as plt import seaborn as sns import pandas as pd # ====== 📂 Load features from directory ====== de...
Python
1
SmallMap::with_capacity(keys.len()); for (k, v) in keys.iter().zip(values) { let prev = dict.insert_hashed(*k, *v); debug_assert!(prev.is_none()); } Ok(eval.heap().alloc(Dict::new(coerce(dict)))) } } impl InstrNoFlowImpl for InstrListNewImpl { type Pop<'v> = ();...
Rust
0
ub fn new() -> Context { Context { rules: HashMap::new(), children: Vec::new(), } } } pub trait Component { fn context(&mut self) -> &mut Context; fn add_rule(&mut self, key: &'static str, value: Box<Fn() -> Box<std::any::Any>>) { self.context().rules.insert...
Rust
0
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board import busio from adafruit_icm20x import ICM20649, AccelRange, GyroRange def printNewMax(value, current_max, axis): if value > current_max: current_max = value print(axis, "Max:"...
Python
1
def bfs(box, ripe_tomatoes, M, N): directions = [(-1, 0), (1, 0), (0, -1), (0, 1)] queue = ripe_tomatoes[:] days = 0 while queue: new_queue = [] for x, y in queue: for dx, dy in directions: nx, ny = x + dx, y + dy if 0 <= nx < N and 0 <= ny < ...
Python
1
nce(si._current, pd.DataFrame) pd.testing.assert_series_equal(si._current.A, series + w.value) assert si._obj is series assert "dim('*').pd+<param.Number object" in repr(si._transform) assert si._depth == 2 assert si._method is None assert len(si._params) == 1 assert si._params[0] is w.para...
Python
1
es: `\"Win32_Graphics_Printing\"`*"] pub const IDS_CPSUI_PERCENT: u32 = 64711u32; #[doc = "*Required features: `\"Win32_Graphics_Printing\"`*"] pub const IDS_CPSUI_PLOT: u32 = 64836u32; #[doc = "*Required features: `\"Win32_Graphics_Printing\"`*"] pub const IDS_CPSUI_PORTRAIT: u32 = 64753u32; #[doc = "*Required feature...
Rust
0
#!/usr/bin/env python from __future__ import annotations from typing import Any from .by_plugin import AuthByPlugin, AuthType class AuthNoAuth(AuthByPlugin): """No-auth Authentication. It is a dummy auth that requires no extra connection establishment. """ @property def type_(self) -> AuthType...
Python
1
# So we will always try to recover the job if it is finished or failed. recover_states = [JobState.FAILED, JobState.NOT_FOUND, JobState.COMPLETED] if isinstance(e, JobException): recover_this = ( e.reason in recover_states and run_id < config.recover.ret...
Python
1
!!$''Aw$r()c) AdV#:;<'3D &E1XFFB'C# ab #/$++D1'+$))$/2aQROOKK&&t,t^$$++E2t^"ZZ_F|))00%?))00%&/5RSCV1WXt^$$++E2t^**11$7t^MM((/t^$$++E2t^,,33E:X%'*'?'?$Z''*':':...
Python
1