text string | label_name string | labels int64 |
|---|---|---|
y.pl8"),
("Armitems.256", "Trp_kn_b.pl8"),
("Armitems.256", "Trp_kn_k.pl8"),
("Armitems.256", "Trp_kn_p.pl8"),
("Armitems.256", "Trp_kn_r.pl8"),
("Armitems.256", "Trp_kn_y.pl8"),
("Armitems.256", "Trp_ma_b.pl8"),
("Armitems.256", "Trp_ma_k.pl8"),
("Armitems.256", "Trp_ma_p.pl8"),
("A... | Rust | 0 |
in a locked state, since the GlobalThreadList is assumed to be
// locked, whenever a Synch is created.
//
// Immediately after creation the Synch is added to the GlobalThreadList where it will
// be unlocked, when the list is unlocked.
lock,
}
}
... | Rust | 0 |
def get_img(self, bookid, page, jwtkey):
cur = self.db.cursor()
cur.execute('SELECT data FROM book_img WHERE bookid=? AND page=?',
(bookid, page))
res = cur.fetchone()
if res:
return res[0]
cur_time = time.time()
jwttoken = jwt.encode({
... | Python | 1 |
her};
use std::io::{Bytes, Error as IOError, Read};
use std::ops::Deref;
use std::rc::Rc;
use std::vec::Vec;
use indexmap::IndexMap;
use unicode_reader::CodePoints;
pub type Atom = String;
pub type Var = String;
pub type Specifier = u32;
pub const MAX_ARITY: usize = 1023;
pub const XFX: u32 = 0x0001;
pub const XF... | Rust | 0 |
# Examples of valid version strings
# __version__ = '1.2.3.dev1' # Development release 1
# __version__ = '1.2.3a1' # Alpha Release 1
# __version__ = '1.2.3b1' # Beta Release 1
# __version__ = '1.2.3rc1' # RC Release 1
# __version__ = '1.2.3' # Final Release
# __version__ = '1.2.3.post1' # Post Release... | Python | 1 |
;
let (tx, rx) = mpsc::unbounded_channel();
assert_ready_none!(map.poll_next());
assert!(map.insert("foo", rx).is_none());
assert!(map.contains_key("foo"));
assert!(!map.contains_key("bar"));
assert_eq!(map.len(), 1);
assert!(!map.is_empty());
assert_pending!(map.poll_next());
a... | Rust | 0 |
u_list"])):
edu = dialogue["edu_list"][i]
idx[edu["id"]] = i
for i, edu in enumerate(dialogue["edu_list"]):
print(i, edu["speaker"], ":", edu["text"])
print("===")
for relation in dialogue["relations"]:
def get_head(x):
if x in dialogue["edus"]: ... | Python | 1 |
= compss_wait_on(ev)
self.assertEqual(ev, 0)
def testFailedBinaryExitValue(self):
ev = failedBinary(123)
ev = compss_wait_on(ev)
self.assertEqual(ev, 123)
@unittest.skip("UNSUPPORTED WITH GAT")
def testFileManagementINOUT(self):
inoutfile = "src/inoutfile"
... | Python | 1 |
)?)?;
trace!(target: "wasm", " val: {:?}", endowment);
let salt: H256 = BigEndianHash::from_uint(&self.u256_at(args.nth_checked(1)?)?);
trace!(target: "wasm", " salt: {:?}", salt);
let code_ptr: u32 = args.nth_checked(2)?;
trace!(target: "wasm", " code_ptr: {:?}", code_ptr);
let code_len: u32 = ... | Rust | 0 |
let mut map = HASHMAP.write().unwrap();
map.insert(key,req_body);
HttpResponse::Ok().body("It is saved... in memory!")
}
#[delete("/{key}")]
pub async fn delete_value_for_key(web::Path(key): web::Path<String>) -> impl Responder {
let mut map = HASHMAP.write().unwrap();
map.remove(&key);
HttpRes... | Rust | 0 |
"""
Advent of Code 2024
Day: 11
Problem: 01
Author: Nathan Rand
Date: 12.11.24
"""
_INPUT_FILE_NAME = "input.txt"
_NUM_BLINKS = 25
def _get_pebble_after_blinking(pebble: int):
# Edge case when pebble is 0
if pebble == 0:
return [1]
# If it is not 0, we check if it has an even number of digits
... | Python | 1 |
BTC_USDT = 1
ETH_USDT = 2
TRX_USDT = 6
BNB_USDT = 11 | Python | 1 |
ATUS.lock()?;
let mut light_group = LIGHTGROUP.lock()?;
let lgt_duration = LIGHTDURATION.lock()?;
for (group_name, lgt_id_vec) in light_group.iter_mut() {
value_new = format!(r#"{}"{}":["#, value_new, group_name);
// 1. 取出group中的值,为每个灯的剩余时间减一
... | Rust | 0 |
ixel[0]}, {pixel[1]}, {pixel[2]})")
else:
self.pixel_value_var.set(f"像素值: {pixel}")
else:
self.pixel_value_var.set("像素值: -")
def on_mouse_wheel(self, event):
"""增强的鼠标滚轮事件 - 支持缩放和滚动"""
if self.original_image is None:
return
# 检... | Python | 1 |
od icr;
#[doc = "BDR register accessor: an alias for `Reg<BDR_SPEC>`"]
pub type BDR = crate::Reg<bdr::BDR_SPEC>;
#[doc = "Baudrate Divider register"]
pub mod bdr;
<filename>spec/src/lib.rs
#![allow(deprecated)]
#[cfg_attr(test, macro_use)] #[cfg(test)] extern crate serde_derive;
extern crate parity_wasm;
extern crate ... | Rust | 0 |
ResultList=resolveDNS(y)
#if len(tmpResultList)<1:
if y not in dnsList:
print y
dnsList.append(y)
else:
count=201
#sys.exit()
count+=1
tmpResultList1=[]
if options.r:
p = multiprocessing.Pool(processes=noOfThreads)
tmpResultList = p.map(resolveDNS,dn... | Python | 1 |
print("Operadores (Aritméticos, comparação, lógicos e de atribuição)")
inteiroA = 1
inteiroB = 2
# Operadores aritméticos
# Adição
print(inteiroA + inteiroB) # imprime
# Subtração
print(inteiroA - inteiroB) # imprime
# Multiplicação
print(inteiroA * inteiroB) # imprime
# Divisão
print(inteiroA / inteiroB) # imprime
... | Python | 1 |
_text} # Return the combined scraped text as the output
else:
# Web search is disabled, check if input contains URLs or list of URLs separated by commas
urls = [url.strip() for url in user_input.split(',') if url.strip()]
valid_urls = []
# Regular expression to... | Python | 1 |
::Uradora),
],
Limit::Haneman,
Points::Ron(12000),
);
}
// ---- 8 han
#[test]
fn score_8han_25fu_chiitoi_tsumo_riichi_4dora() {
let mut context = ct("4m", true);
context.is_riichi = true;
context.n_dora = 4;
let results = score(&tiles_from_string("11334m55p22s3355z"), &vec... | Rust | 0 |
..size {
for c in 0..size {
match self.cell_state(r,c) {
Some(&Occupied(_)) => draw_cell(rect_occupied, r, c),
Some(&Freespace) => draw_cell(rect_freespace, r, c),
_ => {}
}
}
}
}
}
impl Draw... | Rust | 0 |
import os
import dlib
import cv2
import numpy as np
from .error import FaceError
# Define the path to the trained model file
models_dir = "trained_models"
hog_face_rec_model_file_path = os.path.join(os.path.dirname(__file__), models_dir, "dlib_face_recognition_resnet_model_v1.dat")
cnn_face_rec_model_file_path = os.p... | Python | 1 |
ActionMode::Local,
)
.unwrap();
assert_eq!(actual, expected);
}
}
<filename>garnet/bin/setui/src/audio/audio_default_settings.rs
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE... | Rust | 0 |
(update_trail(args))
if command == "aws-cloudtrail-start-logging":
return_results(start_logging(args))
if command == "aws-cloudtrail-stop-logging":
return_results(stop_logging(args))
if command == "aws-cloudtrail-lookup-events":
return_results(lookup_events(ar... | Python | 1 |
upsert_stake_limit(&stash, T::Currency::minimum_balance() * STAKE_LIMIT_RATIO.into());
Staking::<T>::validate(RawOrigin::Signed(controller.clone()).into(), Default::default())?;
let max_additional = T::Currency::minimum_balance() * 10u32.into();
}: _(RawOrigin::Signed(stash), max_additional)
u... | Rust | 0 |
from datetime import timedelta
from uuid import uuid4
import json
from producers.paymentprocessor.utils import sources, destinations
from producers.utils import get_meta, JSON_HEADER
from producers.base import BaseProducer
class PaymentProcessorGetBillingProducer(BaseProducer):
emit_probability = 0.1
def g... | Python | 1 |
aud: None,
iss: None,
sub: None,
algorithms: vec![jwt::Algorithm::HS256],
};
Box::new(move |server_token| {
check_jwt_server_token(server_token, &secret_key, &validatio... | Rust | 0 |
{
() => {
"11"
};
}
}
}
// This approximately mirrors the logic in unwind.rs.
cfg_if::cfg_if! {
if #[cfg(feature = "asm-unwind")] {
macro_rules! asm_may_unwind {
($($asm:tt)*) => {
asm_clobbers!(
options(ma... | Rust | 0 |
not provided .. issue a warning and use 0
_outs += [numpy.zeros(seeds[j][0].shape)]
warning('Past value %d for output $d not given' \
%(j,tap_value))
else:
_outs += [seeds[j][k]]
... | Python | 1 |
M29)), operand3: Some(Indirect(RSI, Some(OperandSize::Qword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: Some(MaskReg::K2), broadcast: Some(BroadcastMode::Broadcast1To8) }, &[98, 242, 149, 82, 39, 46], OperandSize::Qword)
}
<reponame>lmy441900/wallet.rs
// Copyright 2... | Rust | 0 |
cli_args: Optional[List[str]]
namespace: Optional[str]
use_global_arguments: bool
enable_rosout: bool
start_parameter_services: bool
parameter_overrides: 'Optional[List[Parameter[Any]]]'
allow_undeclared_parameters: bool
automatically_declare_parameters_from_overrides: bool
enable_l... | Python | 1 |
str1, arr_l, cnt_l),
}
<filename>src/barnsley.rs
// Copyright © 2019 <NAME>, <NAME>
// Generate Barnsley's fern saved as an image
// Inspired by http://rosettacode.org/wiki/Barnsley_fern
// Barnsley's IFS: https://en.wikipedia.org/wiki/Barnsley_fern#Construction
//! Barnsley's Fern implementation.
use crate::util::*;... | Rust | 0 |
import base64
from io import BytesIO
from typing import Union
from PIL import Image
from vllm.connections import global_http_connection
from vllm.envs import VLLM_IMAGE_FETCH_TIMEOUT
from vllm.multimodal.base import MultiModalDataDict
def _load_image_from_bytes(b: bytes):
image = Image.open(BytesIO(b))
imag... | Python | 1 |
me_type(TxType::H_DCT, frame_type),
)
}
fn print_prediction_modes_summary(&self) {
info!("----------");
self.print_luma_prediction_mode_summary_by_frame_type(FrameType::KEY, 'I');
self
.print_chroma_prediction_mode_summary_by_frame_type(FrameType::KEY, 'I');
info!("----------");
self
... | Rust | 0 |
# Mở file1 để đọc
with open("C:\\Users\ADMIN\\Repo\\Data_processing\\raw_data.txt", mode="r", encoding="utf8") as file1:
# Mở file2 để ghi
with open("C:\\Users\ADMIN\\Repo\\Data_processing\\scores_data_900k_row.txt", mode="a", encoding="utf8") as file2:
# Lặp lại 12 lần
for i in range(12):
... | Python | 1 |
with_capacity(self.attributes.len());
for (k, v) in &self.attributes {
attributes.push(Attribute {
name: Name::local(k),
value: v,
});
}
let namespace = Namespace::empty();
writer.write(XmlEvent::StartElement {
name,
... | Rust | 0 |
assert_eq!(str::from_utf8(key).expect("key"), "你好,遊客");
assert_eq!(val, Value::Str("米克規則"));
assert!(iter.next().is_none());
// Iterators don't loop. Once one returns None, additional calls
// to its next() method will always return None.
assert!(iter.next().is_none());
// Reader.iter_fr... | Rust | 0 |
tic):")
print(" • Strong bias (decision score mean: -0.560)")
print(" • Poor label handling (Christian samples: 0, Secular: 0)")
print(" • Constant features (duration, sample_rate)")
print(" • No class balancing")
print(" • Accuracy: ~85% but biased")
print("\nImproved Model Resul... | Python | 1 |
self.is_open_by_index(left_index) && !self.is_full_by_index(left_index) {
self.fullness.insert(left_index, true);
self.fill_neighbors(left_index);
}
}
if self.has_bottom_neighbor(index) {
let diff = index & self.mask;
let bottom_index ... | Rust | 0 |
from rcph.utils.launcher import getInfo, setInfo, checkExistenceProblem
from rcph.utils.tools.color import colored_text
from rcph.config.constant import *
def problemCheck(problem):
if not checkExistenceProblem(problem):
raise Exception(f'problem {problem} does not exist!')
def setStatus(problem):
inf... | Python | 1 |
use driver;
use driver::interner::Ident;
// --- List of tokens -----------------------------------------------------------
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum Token {
Bang,
Dollar,
Percent,
At,
Zero,
Equal,
Plus,
Minus,
Asterisk,
Dot,
DoubleDot,
... | Rust | 0 |
n write_plain_chunk(
writer: Arc<Mutex<RefAsyncWriter<'_>>>,
chunk: Vec<u8>,
) -> anyhow::Result<()>;
async fn write_encrypted_chunk(
writer: Arc<Mutex<RefAsyncWriter<'_>>>,
chunk: Vec<u8>,
) -> anyhow::Result<()>;
async fn write_encrypted_b64_chunk(
writer: Arc... | Rust | 0 |
Values: u32,
),
>;
pub const enThresholdDirection_ABOVE: enThresholdDirection = 0;
pub const enThresholdDirection_BELOW: enThresholdDirection = 1;
pub const enThresholdDirection_RISING: enThresholdDirection = 2;
pub const enThresholdDirection_FALLING: enThresholdDirection = 3;
pub const enThresholdDirection_RISING_... | Rust | 0 |
rview
CekAjaYuk adalah sistem deteksi iklan lowongan kerja palsu menggunakan Machine Learning dan Deep Learning.
## Features
- Analisis gambar poster menggunakan Random Forest dan CNN
- Ekstraksi teks menggunakan Tesseract OCR (Indonesia & English)
- Analisis teks untuk deteksi pola mencurigakan
- Interface web yang u... | Python | 1 |
# coding:utf-8
'''
@author = super_fazai
@File : 常用短信验证码curl接口.py
@Time : 2017/4/25 10:33
@connect : superonesfazai@gmail.com
'''
"""
直接curl xxxx
"""
CURL_LIST = [
r'curl "http://member.1688.com//member/ajax/send_identity_code_by_mobile.do?callback=jQuery172007067019236274064_1376100939244&mobile=${PHONE_NU... | Python | 1 |
address_data: Vec::new(),
excess_data: Vec::new(),
};
let mut msghash = hash_to_message!(&Sha256dHash::hash(&unsigned_announcement.encode()[..])[..]);
let valid_announcement = NodeAnnouncement {
signature: secp_ctx.sign(&msghash, node_1_privkey),
contents: unsigned_announcement.clone()
};
match net_... | Rust | 0 |
itemgetter inconsistency (useful in some cases) of not returning
a tuple if len(items) == 1: always returns an n-tuple where n = len(items)
"""
if len(items) == 0:
return lambda a: ()
if len(items) == 1:
return lambda gettable: (gettable[items[0]],)
return operator.itemgetter(*items... | Python | 1 |
number_of_people = 0
def increase_user():
number_of_people = +1
def create_user(name, age, address):
increase_user()
user_info = {'name': name, 'age': age, 'address': address}
print(f'{name}님 환영합니다!')
name = ['김시습', '허균', '남영로', '임제', '박지원']
age = [20, 16, 52, 36, 60]
address = ['서울... | Python | 1 |
te::Normal,
self.pos, self.dim, maybe_frame, color);
// If there's a label, draw it.
let val_string_color = self.maybe_label_color.unwrap_or(uic.theme.label_color);
if self.maybe_label.is_some() {
uic.draw_text(graphics, label_pos, font_size, val_string_color... | Rust | 0 |
Debug)]
pub enum GitGlobalError {
BadSubcommand(String),
Generic,
}
/// Our `Result` alias with `GitGlobalError` as the error type.
pub type Result<T> = result::Result<T, GitGlobalError>;
impl fmt::Display for GitGlobalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use GitGlobalErr... | Rust | 0 |
= load_dataset(script_args.dataset_name, name=script_args.dataset_config)
accelerator = Accelerator()
embedding_model = AutoModel.from_pretrained(
"nomic-ai/nomic-embed-text-v1.5",
trust_remote_code=model_args.trust_remote_code,
safe_serialization=True,
torch_dtype=torch.bfloat... | Python | 1 |
import matplotlib.pyplot as plt
import numpy as np
import sys
import mousedata_add, ImportData
import Cal, CFD, KF_v2, zero_phase_filter
# MAIN
if __name__ == "__main__":
# Constant
SamplingTime = 0.001
CPI = 1600
## 木盤半徑12.5 壓克力盤半徑12.53
wood = 12.5
plastic = 11.945 #11.62 #11.14 # 12.53
... | Python | 1 |
ue = BlockQueue::<Client>::new(config, engine, IoChannel::disconnected(), true);
let num_cpus = ::num_cpus::get();
assert_eq!(queue.num_verifiers(), num_cpus);
}
#[test]
fn worker_threads_scaling_with_specifed_num_of_workers() {
let num_cpus = ::num_cpus::get();
// only run the test with at least 2 ... | Rust | 0 |
# Copyright (C) 2024-present Naver Corporation. All rights reserved.
# Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
#
# --------------------------------------------------------
# Dataloader for preprocessed WildRGB-D
# dataset at https://github.com/wildrgbd/wildrgbd/
# See datasets_preprocess/preprocess_wi... | Python | 1 |
struct AssignmentPatternList {
pub nodes: (ApostropheBrace<List<Symbol, Expression>>,),
}
#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternStructure {
pub nodes: (ApostropheBrace<List<Symbol, (StructurePatternKey, Symbol, Expression)>>,),
}
#[derive(Clone, Debug, PartialEq, Node)]
pub str... | Rust | 0 |
70, 0xe4, 0x4e, 0xd5, 0x50, 0xa1, 0x63, 0x8d, 0x70, 0xa0, 0xea, 0xd6, 0xa4, 0x32,
0x53, 0x2e, 0xdd, 0x11, 0xe8, 0xc4, 0xcd, 0xb1, 0xba, 0x3, 0x30, 0x34, 0x6a, 0xf2, 0x45,
0x20, 0xee,
]);
let nonce = Nonce::from_public_slice(&[
0x4d, 0x7b, 0x9e, 0x2c, 0x38, 0x1d, 0x43, 0xfd, 0x21, 0x61, 0... | Rust | 0 |