text
string
label_name
string
labels
int64
Ligue 1", "season_start": "Aug", "season_end": "May" }, "INT-World Cup": { "FBref": "FIFA World Cup", "WhoScored": "International - FIFA World Cup", }, "NED-Eredivisie": { "ClubElo": "NED_1", "MatchHistory": "N1", "SoFIFA": "[Netherlands] Eredivis...
Python
1
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from datetime import datetime as dt from openpyxl import load_workbook...
Python
1
ga::default()) /// # .task(|ctx| ctx.gen == 20) /// .adaptive(|ctx| ctx.gen as f64 / 20.) /// .solve(MyFunc::new()); /// ``` /// /// The adaptive function is also allow to change the external variable. /// /// ``` /// use metaheuristics_nature::{Rga, Solver}; /// # use ...
Rust
0
ns::VecDeque; use std::sync::Arc; pub struct SeriesReader { env: Arc<SeriesEnv>, } impl SeriesReader { pub fn create(env: Arc<SeriesEnv>) -> Result<SeriesReader, Error> { Ok(SeriesReader { env: env.clone() }) } pub fn iterator(&self, from_ts: i64) -> Result<SeriesIterator, Error> { le...
Rust
0
BatchNorm uses EMA in inference, which is sometimes suboptimal. This class computes the true average of statistics rather than the moving average, and put true averages to every BN layer in the given model. It is executed every ``period`` iterations and after the last iteration. """ def __init...
Python
1
th) view["img"] = view["img"].swapaxes(1, 2) assert view["valid_mask"].shape == (height, width) view["valid_mask"] = view["valid_mask"].swapaxes(0, 1) assert view["depthmap"].shape == (height, width) view["depthmap"] = view["depthmap"].swapaxes(0, 1) assert view["pts3d...
Python
1
ructor = Box::new(|| { ecc::Group::new(TEST_GROUP).map(|group| { Box::new(group) as Box< dyn FiniteCyclicGroup<Element = <ecc::Group as FiniteCyclicGroup>::Element>, > }) }); let fcg = (fcg_constructo...
Rust
0
import cv2 import numpy as np import modules.config faceRestoreHelper = None def align_warp_face(self, landmark, border_mode='constant'): affine_matrix = cv2.estimateAffinePartial2D(landmark, self.face_template, method=cv2.LMEDS)[0] self.affine_matrices.append(affine_matrix) if border_mode == 'constant'...
Python
1
import re def parse_php_file(file_path): functions = {} with open(file_path, 'r') as file: php_code = file.read() # Regular expression pattern for matching function definitions function_pattern = r'function\s+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*\((.*?)\)\s*{([^}]*)}' ...
Python
1
g to those terms. /// cryptor module use super::super::super::Cryptor; /// algorithm module use super::super::{ Algorithm, CryptoValue, Base64 }; /// enigma module use super::{ Router, Reflector, RouterManager, Plugboard }; pub struct Enigma { router_manager: RouterManager, plugboard: Plugboard, reflect...
Rust
0
#Programa.2.4 Programa que calcula los impuestos y dar un valor #Fecha de elaboración: 22/10/24 #Elaborado por: JOCELYN DE LUNA def calcular_impuesto(valor, tasa_impuesto): impuesto = valor * (tasa_impuesto / 100) return impuesto valor = float (input("Introduce el valor:")) tasa_impuesto = float(input("introduce...
Python
1
self.assertRaises(SyntaxError, eval, """ bu'' """) self.assertRaises(SyntaxError, eval, """ ub'' """) def check_encoding(self, encoding, extra=""): modname = "xx_" + encoding.replace("-", "_") fn = os.path.join(self.tmpdir, modname + ".py") f = open(fn, "w", encoding=encoding) ...
Python
1
from argparse import ArgumentParser import numpy as np import requests from mmdet.apis import inference_detector, init_detector, show_result_pyplot from mmdet.core import bbox2result def parse_args(): parser = ArgumentParser() parser.add_argument('img', help='Image file') parser.add_argument('config', h...
Python
1
} }, ); }); } /// 1 interested column, which is PK. One range is given, which contains 1000 rows. This case /// benches the performance when all records of this range are consumed. fn bench_table_scan_multi_rows(c: &mut Criterion) { use tikv::coprocessor::dag::executor::Table...
Rust
0
ni" in openai_all assert "mini" in openai_all assert "o3-mini" in openai_all assert "o3mini" in openai_all # All should be lowercase assert all(model == model.lower() for model in openai_all) def test_no_string_shorthand_in_supported_models(self): """Test that no pro...
Python
1
, cb: impl FnOnce()) { std::thread::sleep(std::time::Duration::from_secs(2)); cb() } futures::executor::block_on(once!(func(2 + 3, -> ()))); } #[test] fn test_once_blocked_postfix() { fn func(v: i32, cb: impl FnOnce(i32, i32) -> i32) { if cb(v, v ...
Rust
0
on the sequencer API side. /// /// Necessary until we move to mocking whatever the RPC api will call when the first release is ready. /// /// TODO remove this wrapper when retry::Retry is used in the sequencer::Client async fn client_request<'a, Out>( method: &str, params: Option<Pa...
Rust
0
from django_elasticsearch_dsl import Document, Index, fields from django_elasticsearch_dsl.registries import registry from shops.models import Shop product_index = Index('shops') @registry.register_document class ShopDocument(Document): name = fields.TextField( analyzer="standard", fields={ ...
Python
1
let value = value.to_i32(&mut context).unwrap(); assert_eq!(value, 255); } #[test] fn bitand_rational_and_rational() { let mut context = Context::new(); let value = forward_val(&mut context, "255.772 & 255.5").unwrap(); let value = value.to_i32(&mut context).unwrap(); assert_eq!(value, 255); }...
Rust
0
import time import torch from pytorch_model_summary import summary from anz.constants import VOCAB_SIZE, BLOCK_SIZE, BATCH_SIZE, DEVICE from anz.models import Transformer from anz.helpers import get_torch_model_size if __name__ == '__main__': print(f"VOCAB_SIZE={VOCAB_SIZE}\nBLOCK_SIZE={BLOCK_SIZE}\nBATCH_SIZE={B...
Python
1
Needed::Unknown); } let len = input[0] as usize; if input.len() >= len + 1 { Ok((&input[len + 1..], &input[1..len + 1])) } else { need_more(input, Needed::Size(1 + len)) } } /// Recognizes an unsigned 1 byte integer (equivalent to take!(1) #[inline] pub fn be_u8(i: &[u8]) -> IResult<&[u8], u8> { ...
Rust
0
(): formatted_parts.append(part.strip()) else: formatted_parts.append(msg.content.strip()) else: # Unknown message type formatted_parts.append("📄 Message:") formatted_parts.append(str(msg)) ...
Python
1
_SCANCODE_COMMA => Ok(Scancode::Comma), SDL_SCANCODE_COMPUTER => Ok(Scancode::Computer), SDL_SCANCODE_COPY => Ok(Scancode::Copy), SDL_SCANCODE_CRSEL => Ok(Scancode::CrSel), SDL_SCANCODE_CURRENCYSUBUNIT => Ok(Scancode::CurrencySubUnit), SDL_SCANCODE_CURRENCYUNIT => Ok(Scancode::CurrencyUnit...
Rust
0
sitor(self.lhs) && visitor(self.rhs); } } impl VisitValuesMut for BinaryFloatInstr { fn visit_values_mut<V>(&mut self, mut visitor: V) where V: FnMut(&mut Value) -> bool, { let _ = visitor(&mut self.lhs) && visitor(&mut self.rhs); } } <filename>src/types/output/output_mode.rs //! TO...
Rust
0
# Use param_sweep_folder here ) metrics['param_tag'] = param_tag metrics_results.append(metrics) except Exception as e: print(f"Error processing parameter set {idx+1}: {str(e)}") # Add dummy metrics to maintain the correct length of results metrics_results.append({ ...
Python
1
e cmp return cmp.reshape(elements.shape) @register_decomposition(aten.take) @out_wrapper() def take(self, index): flattened = self.reshape(-1) return flattened[index] @register_decomposition(aten.resize_as) def resize_as(self, other, memory_format=None): if memory_format is None: memory_...
Python
1
AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXE...
Rust
0
import sys input = sys.stdin.readline N,M = map(int, input().split()) visited = [False] * N answer = [] def back_track(index, N, M): if index == M: print(*answer) return for i in range(N): if not visited[i]: visited[i] =True answer.append(i+1) back_...
Python
1
# 사용자의 계정을 관리합니다 # db는 <project_name>/instance/site.db 에 생성됩니다 # 비밀번호는 sha:256으로 암호화 합니다 from flask import Blueprint, render_template, redirect, url_for, flash, request from . import db from .models import User from werkzeug.security import generate_password_hash, check_password_hash from flask_login import login_user,...
Python
1
vae=vae, transformer=transformer, controlnet=controlnet, text_encoder=text_encoder, torch_dtype=torch.bfloat16, ) progress(0.95, desc="完成初始化...") self.initialized = True free_memory...
Python
1
shards: (0..SHARD_COUNT).collect(), worker_threads: Self::default_worker_count(), migration_path: String::from("/hab/svc/builder-scheduler/pkgs"), log_path: PathBuf::from("/tmp"), routers: vec![RouterAddr::default()], datastore: datastore, } } } i...
Rust
0
ss, total_supply, metaverse_id, )); Ok(()) } fn transfer_from( currency_id: FungibleTokenId, from: &T::AccountId, to: &T::AccountId, amount: Balance, ) -> DispatchResult { if amount.is_zero() || from == to { return Err("Invalid request".into()); } T::MetaverseMultiCurrency::transfer(cur...
Rust
0
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import pytest from pyrit.prompt_converter import ConverterResult, SuperscriptConverter async def _check_conversion(converter, prompts, expected_outputs): for prompt, expected_output in zip(prompts, expected_outputs): result = await...
Python
1
FtpStatus = 257; pub const sfFtpStatus_sfFtpNeedPassword: sfFtpStatus = 331; pub const sfFtpStatus_sfFtpNeedAccountToLogIn: sfFtpStatus = 332; pub const sfFtpStatus_sfFtpNeedInformation: sfFtpStatus = 350; pub const sfFtpStatus_sfFtpServiceUnavailable: sfFtpStatus = 421; pub const sfFtpStatus_sfFtpDataConnectionUnavail...
Rust
0
")] impl ::core::clone::Clone for D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT { fn clone(&self) -> Self { *self } } #[doc = "*Required features: `\"Win32_Graphics_Direct3D11\"`*"] pub type D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE = i32; #[doc = "*Required features: `\"Win32_Graphics_Direct3D1...
Rust
0
imm8 0x0000_00D5,// Aad_imm8 0x0000_00D6,// Salc 0x0000_00D7,// Xlat_m8 0x8000_00D8,// Fadd_m32fp 0x8800_00D8,// Fmul_m32fp 0x9000_00D8,// Fcom_m32fp 0x9800_00D8,// Fcomp_m32fp 0xA000_00D8,// Fsub_m32fp 0xA800_00D8,// Fsubr_m32fp 0xB000_00D8,// Fdiv_m32fp 0xB800_00D8,// Fdivr_m32fp 0x0001_D8C0,// Fadd_st0_s...
Rust
0
""" OPDS v2 Progression Serializer. https://github.com/opds-community/drafts/discussions/67 """ from decimal import Decimal from rest_framework.fields import ( CharField, DateTimeField, DecimalField, IntegerField, ListField, ) from rest_framework.serializers import Serializer class OPDS2Progres...
Python
1
)) } } impl<T, E: Into<anyhow::Error>> OptionExt<T> for Result<T, E> { fn invalid_usage(self, command_options: &CommandOptions) -> Result<T, UserErr> { self.map_err(|_| UserErr::InvalidUsage(command_options.usage.unwrap_or(""))) } fn user_error(self, s: &str) -> Result<T, UserErr> { se...
Rust
0
# You are given an integer array nums consisting of n elements, and an integer k. # Find a contiguous subarray whose length is equal to k that has the maximum average value and return this value. Any answer with a calculation error less than 10-5 will be accepted. # Example 1: # Input: nums = [1,12,-5,-6,50,3], k...
Python
1
_set_threshold, sk_set::sk_set_public_keys, sk_set::sk_set_secret_key_share, sk_set::sk_set_random, // Signature API sig::sig_parity, sig::sig_cmp, sig::sig_serialize, sig::sig_deserialize, // Field Representation API fr::into_fr, f...
Rust
0
# -*- coding: utf-8 -*- # Автор: Гусев Илья # Описание: Набор внешних методов для работы с библиотекой. import os from typing import List, Tuple, Dict from rulm.language_model import LanguageModel from rupo.files.reader import FileType, Reader from rupo.files.writer import Writer from rupo.main.markup import Markup ...
Python
1
e.cn/open/oauth/pats") st.text_input("Coze Bot ID", value=config.get("coze_bot_id", ""), key="coze_bot_id",help="请输入Coze Bot ID,在coze平台获取 https://www.coze.cn/space/341****/bot/73428668*****") st.text_input("Coze Space ID", value=config.get("coze_space_id", ""), key="coze_space_id",help="Coze 工作空...
Python
1
hecks so need to add a check manually guild_doc = await db.REACTION_ROLES.find_one({"_id": payload.guild_id}) if guild_doc is not None and guild_doc["reaction_roles"] is not None: for i in guild_doc["reaction_roles"]: if payload.message_id == i.get("messageid") and str( ...
Python
1
ds.next(); let value: Option<isize> = words.next().map(str::parse).map(Result::unwrap); match command { Some("forward") => x += value.unwrap(), Some("up") => depth -= value.unwrap(), Some("down") => depth += value.unwrap(), _ => continue }; } ...
Rust
0
o_vec(value)?; if let Some((key, _)) = self.tree.iter().flatten() .find(|(_k, v)| v.eq(&value)) { Ok(Some(u64::from_be_bytes(array_ref!(key, 0, 8).to_owned()))) } else { Ok(None) } } /// combination of `get_key_by_value()` and `get_next_key()` ...
Rust
0
// TODO: add is_sorted assert to make sure this behavior is preserved for labels for (id, instr) in jump_instrs.0.into_iter().rev() { let mut done = false; while !done { // NOTE(hrust) looping is equivalent to recursing without consuming instr done = (...
Rust
0
pl Symbols { pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { input.expect_function_matching("symbols")?; input.parse_nested_block(|input| { let symbols_type = input.try_parse(|input| SymbolsType::parse(input)).ok(); let idents = parse_repeated(input, &mut |input| StringOrIm...
Rust
0
# -*- coding: utf-8 -*- # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Python
1
const SEMIVOICED_COMBI: &'static str = "\u{309A}"; const VOICED_WITH_SPACE: &'static str = "\u{20}\u{3099}"; const SEMIVOICED_WITH_SPACE: &'static str = "\u{20}\u{309A}"; const RE_VOICED_MARKS: &'static str = r"(?:\x20??\x{3099}|\x{309B}|\x{FF9E})"; const RE_SEMIVOICED_MARKS: &'static str = r"(?:\x20...
Rust
0
load manifest err {}", e), Ok(manifest) => { self.items.insert(manifest.name.clone(), manifest); } } } } pub fn start_all(&mut self, dispatcher: Dispatcher) { for (_, manifest) in self.items.clone().iter() { start_plugi...
Rust
0
) = group_to_be_saved.take() { let mut values = take(group_collector); values.sort_unstable_by_key(|&(i, _)| i); // TODO(CORRECTNESS): The level of defensiveness should be more consistent: why check for // duplicates here? if !CAN_HAVE_DUPLICATES { if let Some(&[(row...
Rust
0
2,}b\x8c\xbd\xb7\xa6\ \xacgd\x8c\xbd\x97f\xe9\x93P\xb6\xb2,\xcd)\x03\ \xa5\xd5k\xb7t2\xc0g\xe5\xec\xf1\xa6\xf0\xa0Y9\ {\x1cL\xdc\xd2I\xa5\xd5\xebc\x03k\xec6\x00\xe8\ \xbe~q\x19\xf8I\x13\xdd\xd7/N2)Q\xc9;\ \xe0\xe8\x96\x98C\xf3`u\xd3`8\xf8VJ\xe9z\ q\xef\xefML\xcc\xa1y\x10nY\xa2\x92wT\xd7\ \xf5u\x00P*y\xd9\xb6\xa1i\x9a\x...
Python
1
= String::from_utf8(a[..position].to_vec()) { return ExtractionLigne::Commande(s); } else { return ExtractionLigne::Erreur(Retour::creer_str(false, "chaîne invalide")); } } Some(Ok(n)) if position < TAILLE_LIGNE_MAX => a[po...
Rust
0
SIMPLE_CONNECTIVES = ['और', 'एवं', 'इसलिए', 'क्योंकि', 'जबकि', 'तथा', 'ताकि', 'मगर', 'लेकिन', 'किंतु', 'परंतु', 'फिर भी', 'या', 'तथापि', 'नहीं तो', 'व', 'चूंकि', 'चूँकि', 'वरना','अन्यथा', 'बशर्तें', 'हालाँकि', 'इसीलिये', 'इसीलिए' , 'इसलिए', 'अथवा', 'अतः', 'अर्थात्', 'जब', 'तो', 'परन्तु', 'कि','बल्...
Python
1
#!/usr/bin/python3 # # Copyright (C) 2020 Recep Aslantas # # 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 ...
Python
1
[0..1], IsProtectedProcess set_IsProtectedProcess[1..2], IsImageDynamicallyRelocated set_IsImageDynamicallyRelocated[2..3], SkipPatchingUser32Forwarders set_SkipPatchingUser32Forwarders[3..4], IsPackagedProcess set_IsPackagedProcess[4..5], IsAppContainer set_IsAppContainer[5..6], IsProtectedProc...
Rust
0
#[error("handshake send failed")] HandshakeSend( #[serde(skip_serializing)] #[source] IoError<io::Error>, ), /// Failed to receive handshake. #[error("handshake receive failed")] HandshakeRecv( #[serde(skip_serializing)] #[source] IoError<io::Erro...
Rust
0
_bindgen! { /// public interface [Opcodes](https://developer.android.com/reference/dalvik/bytecode/Opcodes.html) /// /// Required feature: dalvik-bytecode-Opcodes public interface Opcodes ("dalvik/bytecode/Opcodes") extends crate::java::lang::Object { /// public static final [OP_ADD_DOUBLE](htt...
Rust
0
[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Kind { /// A spacetime variable, either as a module's field or local to a process. Spacetime(Spacetime), /// A module variable: it is a Bonsai module, i.e. the product of heterogeneous spacetime variables. Product, /// A variable from the host language. H...
Rust
0
import json from fastapi import FastAPI, HTTPException, Request # Instância do FastAPI app = FastAPI(title="NetBox Webhook Receiver", version="1.0") @app.post("/webhook/netbox") async def receive_netbox_webhook(request: Request): """ Endpoint para receber webhooks do NetBox. Exemplo de payload esperado:...
Python
1
from attrs import define, field from iters.iters import iter from typing_aliases import Unary from typing_extensions import Self from gd.models_constants import HSV_SEPARATOR from gd.models_utils import bool_str, concat_hsv, float_str, int_bool, split_hsv from gd.robtop import RobTop __all__ = ("HSV",) S_MIN = 0.0 V...
Python
1
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
Python
1
4); // Test the deref here assert_eq!(auid2.tid(), auid3.tid()); } #[test] pub fn compare_taskish() { let tuid1 = TaskUid::new(1, 1); let tuid2 = TaskUid::new(0, 9); let tuid3 = TaskUid::new(0, 7); assert!(tuid1 > tuid2); assert!(tuid2 > tuid3); ...
Rust
0
# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
1
face_device(BootKeyboard, device_connection, reusable_buffer, extra, interface_number), HumanInterfaceDevice(Boot(Mouse)) => human_interface_device(BootMouse, device_connection, reusable_buffer, extra, interface_number), Printer(PrinterSubClass::Known(PrinterProtocol::InternetPrintingProtocolOverUsb)) => inte...
Rust
0
from ultralytics import YOLO from ultralytics.models.yolo.detect import DetectionPredictor import cv2 import time import psutil import numpy as np # Model yükleme model = YOLO("reading.pt") # veya "detection_updated.pt" eğer önceki adımda yeni bir model oluşturduysanız # Performans ölçüm değişkenleri fps_list = [] p...
Python
1
-9+ "#); assert_eq!( postfix, vec![ Number(0), Number(9), Dash, Plus, Text("."), Concat, Number(0), Number(9), Dash, Plus, ...
Rust
0
domain /// name alias. /// /// The CNAME type is defined in RFC 1035, section 3.3.1. dname_type!(Cname, Cname, cname); //------------ Hinfo -------------------------------------------------------- /// Hinfo record data. /// /// Hinfo records are used to acquire general information about a host, /// specifically the...
Rust
0
xfb\xa9\x9c\xbfy#'\ \x8f\x9e\xc87\xbf\xf3=M.\x1e\x8f\xcf\xe5\xf5\xf9K\ \x80\xa1\xa1$\xcd\x96\x9c\x9d} \x83\xf6#\x0c\xfb@\ ^_\x7f.\xa3\xe1H\xa6\x93\x178\xef\x14\xce\xa8\xa5\ \xce\xd7TU\xd8\x83\x08S\xb0fm\xf9\xdd\xc9\xd9\x0c\ F\xb0w\xf6\xec\x14\xfb\x0b\x0f:\xd2\x18\x92L\xf1&\ M\x83\xd052\x02c\xeb\xa4\x0fpv\xb6t\xf2\x10\ ...
Python
1
from tkinter import * window = Tk() b1=Button(window,text="Execute") b1.grid(row=0,column=0) e1=Entry(window,height=2,text="Put Your Text Here") e1.grid(row=0,column=1) t1=Text(window,height=2,width=20) t1.grid(row=0,column=2) window.mainloop()
Python
1
from typing import List def solve(grid: List[List[int]]) -> List[List[int]]: h, w = len(grid), len(grid[0]) pts = [(r, c) for r in range(h) for c in range(w) if grid[r][c] == 5] (r1, c1), (r2, c2) = pts[0], pts[1] dx, dy = c2 - c1, r2 - r1 path = set() th = 1 if abs(dx) < abs(dy): # ...
Python
1
# Part of Odoo. See LICENSE file for full copyright and licensing details. { "name": """Vietnam - E-invoicing""", 'icon': '/account/static/description/l10n.png', "version": "1.0", 'countries': ['vn'], "category": "Accounting/Localizations/EDI", 'website': 'https://www.odoo.com/documentation/mast...
Python
1
raft::StateRole; use pd::{PdClient, PdRunner, PdTask}; use raftstore::coprocessor::split_observer::SplitObserver; use raftstore::coprocessor::{CoprocessorHost, RegionChangeEvent}; use raftstore::store::util::{is_initial_msg, KeysInfoFormatter}; use raftstore::Result; use storage::{CF_DEFAULT, CF_LOCK, CF_RAFT, CF_WRI...
Rust
0
sert(ETH_CAD_d, "XETHZCAD.d"); m.insert(ETH_CAD, "XETHZCAD"); m.insert(ETH_EUR_d, "XETHZEUR.d"); m.insert(ETH_EUR, "XETHZEUR"); m.insert(ETH_GBP_d, "XETHZGBP.d"); m.insert(ETH_GBP, "XETHZGBP"); m.insert(ETH_JPY_d, "XETHZJPY.d"); m.insert(ETH_JPY, "XETHZJPY...
Rust
0
/master/COPYRIGHT. #[repr(C)] #[derive(Debug, Copy)] pub struct fi_ops_cntr { pub size: usize, pub read: Option<unsafe extern "C" fn(cntr: *mut fid_cntr) -> u64>, pub readerr: Option<unsafe extern "C" fn(cntr: *mut fid_cntr) -> u64>, pub add: Option<unsafe extern "C" fn(cntr: *mut fid_cntr, value: u64) -> c_int>,...
Rust
0
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. 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 requir...
Python
1
tracing::{debug, trace}; use which::which; #[derive(Deserialize, Clone, Debug)] pub struct Plugin { pub name: String, pub description: String, pub interpreter: String, #[serde(deserialize_with = "path_buf_from_string")] pub plan_script: PathBuf, #[serde(deserialize_with = "path_buf_from_stri...
Rust
0
import discord from discord.ext import commands import time import asyncio def setup_commands(bot): @bot.command() async def ping(ctx): """Affiche la latence du bot.""" start = time.perf_counter() msg = await ctx.send("🏓 Pong ?") end = time.perf_counter() latency = (end...
Python
1
DL_WriteU8(dst: *mut SDL_RWops, value: Uint8) -> usize; } extern "C" { pub fn SDL_WriteLE16(dst: *mut SDL_RWops, value: Uint16) -> usize; } extern "C" { pub fn SDL_WriteBE16(dst: *mut SDL_RWops, value: Uint16) -> usize; } extern "C" { pub fn SDL_WriteLE32(dst: *mut SDL_RWops, value: Uint32) -> usize; } exte...
Rust
0
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np import glob import sys fontsize = 17 marker ={ "CK" : "-" , "IK" : "." , "RK" : "-" } xlab = { "CK" : "X ( real/imaginary components )" , "IK" : "X ( integer-valued )" , "RK" : "X ( r...
Python
1
from enum import Enum from typing import Any from pydantic import RootModel class TSESector(Enum): FISHERY_AGRICULTURE_FORESTRY = "水産・農林業" FOODS = "食料品" MINING = "鉱業" OIL_COAL_PRODUCTS = "石油・石炭製品" CONSTRUCTION = "建設業" METAL_PRODUCTS = "金属製品" GLASS_CERAMICS_PRODUCTS = "ガラス・土石製品" TEXTIL...
Python
1
om remove operations. #[derive(Debug, Copy, Clone)] pub enum BufferRemoveError { InsufficientSize, } /// Trait used to help encode objects to buffers. pub trait Encodable: Sized { /// Gets the size of this encodable. fn size() -> usize; /// Encodes a whole slice. fn encode_slice(slice: &[Self], wr...
Rust
0
#*******************************************预测************************************************* # 训练模型 print('训练模型...') model_chooser.train(X_train, y_train) # 评估模型 print('评估模型...') # 现在结果以密文保存在spu中 spu_yhat = model_chooser.predict(X_test) # 转换为明文 yhat = reveal(spu_yhat) y_ = reveal(y_test.partitions[alice]) from...
Python
1
CommandExample( None, "Remove points from a user", chat="user:!editpoints pajlada -500\n" "bot>user:Successfully removed 500 points from pajlada.", description="This removes 500 points from pajlada. Users can go into negative points wit...
Python
1
))] STM32L011K3Ux, #[strum(props(target = "thumbv6m-none-eabi"))] STM32L011K4Tx, #[strum(props(target = "thumbv6m-none-eabi"))] STM32L011K4Ux, #[strum(props(target = "thumbv6m-none-eabi"))] STM32L021D4Px, #[strum(props(target = "thumbv6m-none-eabi"))] STM32L021F4Px, #[strum(props...
Rust
0
sible values of the field `EDGESEL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum EDGESELR { #[doc = "Falling edges"] FALLING_EDGES, #[doc = "Rising edges"] RISING_EDGES, #[doc = "Both edges"] BOTH_EDGES_1, #[doc = "Both edges"] BOTH_EDGES_2, } impl EDGESELR { #[doc = r" Value ...
Rust
0
exit(1) # Excavate until the soil 3 is reached. reactionCheckTolerance= 1e-5 pileWall.solve(excavationDepthIndex= 1, excavationSide= 'left', reactionCheckTolerance= reactionCheckTolerance, krylov= True, logDepth= False) # Get results. results= pileWall.getResultsDict() # Compute maximum bending moment and displace...
Python
1
- ``backend`` -- the backend to use to create the polytope EXAMPLES:: sage: four_cross = polytopes.cross_polytope(4) sage: four_cross.f_vector() (1, 8, 24, 32, 16, 1) sage: four_cross.is_simple() False TESTS:: sage: cp = pol...
Python
1
_type: EventType, key: Option<Key>, } #[wasm_bindgen] impl Event { pub fn key_down(key: Key) -> Event { Event { event_type: EventType::KeyDown, key: Some(key), } } pub fn key_up(key: Key) -> Event { Event { event_type: EventType::KeyUp, ...
Rust
0
and::new("/bin/sh") .arg("-c") .arg(command) .stdout(Stdio::piped()) .stderr(Stdio::piped()) .spawn() .and_then(|c| c.wait_with_output()) }; let doc_path = &format!("{}/target/doc", s...
Rust
0
"""Configuration settings for A2A MCP Contractor Automation.""" import os from pathlib import Path # Base directories BASE_DIR = Path(__file__).parent LOGS_DIR = BASE_DIR / "logs" DRAFTS_DIR = BASE_DIR / "drafts" SUMMARIES_DIR = BASE_DIR / "summaries" DATA_DIR = BASE_DIR / "data" OUTPUT_DIR = BASE_DIR / "output" # En...
Python
1
e_multiple_basic() { let expr = r#" if x then y else if z then w else 0 "#; assert_diff!(&format_expr(expr).unwrap(), expr, "\n", 0); } #[test] fn if_else_multiple_let_multiline_1() { let expr = r#" if x then f 123 483 else if z then "12312" else do x = 1 x "#; assert_diff!(&format_expr(expr).u...
Rust
0
oy = a.1; pge.fill_circle( ox * self.cell_size + (self.cell_size - self.border_width) / 2, oy * self.cell_size + (self.cell_size - self.border_width) / 2, 10, olc::YELLOW); } true } } fn main() { let app = PathFindingFlowFields::defa...
Rust
0
rate_uses_correct_pipeline(kokoro_backend): """Test that generate uses correct pipeline for language code.""" # Mock loaded state kokoro_backend._model = MagicMock() # Mock voice path handling with ( patch("api.src.core.paths.load_voice_tensor") as mock_load_voice, patch("api.src.co...
Python
1
)), Ok(Value::Bool(false))) => { Ok(Value::Bool(false)) }, (Err(e), _) | (_, Err(e)) => Err(e), (Ok(a), Ok(b)) => Err(Error::InvalidTypesForOperator(a.kind(), b.kind(), Op::Or)) } } fn and(a: EvalResult, b: EvalResult) -> EvalResult { match (a, b) { (Ok(Value::Bool(f...
Rust
0
Layout { size: size_of::<GtkVolumeButton>(), alignment: align_of::<GtkVolumeButton>(), }, ), ( "GtkWidget", Layout { size: size_of::<GtkWidget>(), alignment: align_of::<GtkWidget>(), }, ), ( "GtkWidgetClass", ...
Rust
0
import numpy as np from decimal import Decimal eps = 10e-20 def sweepMet(A, b): n = len(A) m = (n + 1) // 2 diagonalC = np.zeros(n) diagonalA = np.zeros(n) diagonalB = np.zeros(n) # np.set_printoptions(precision=25, suppress=True) for i in range(n): diagonalC[i] = A[i][i] for i ...
Python
1
pairing(self.g1card.punch_card, other.g2card.punch_card); //let pairing2 = Bls12::pairing(other.g1card.punch_card, self.g2card.punch_card); //serialize pairing outputs let mut pairing1_compressed = Vec::<u8>::new(); //let mut pairing2_compressed = Vec::<u8>::new(); pairing1.ser...
Rust
0
Matrix::sharp(&pc, &pg) { print!(" {:<3}", note.to_string()); } else { print!(" "); } } println!(); } println!(); } #[test] fn print_flats_matrix() { println!("Flat Key Matrix"); ...
Rust
0
f) -> IOSurfaceRef { self.obj } #[inline] unsafe fn wrap_under_get_rule(reference: IOSurfaceRef) -> IOSurface { let reference: IOSurfaceRef = mem::transmute(CFRetain(mem::transmute(reference))); TCFType::wrap_under_create_rule(reference) } #[inline] fn as_CFTypeRef(&sel...
Rust
0