text string | label_name string | labels int64 |
|---|---|---|
def clear():
print("\033[H\033[J") # This works in Unix-based systems
| Python | 1 |
: {:?}", ext);
}
}
#[test]
fn test_are_extensions_sorted() {
use mime_types_src::MIME_TYPES;
for (&(ext, _), &(n_ext, _)) in MIME_TYPES.iter().zip(MIME_TYPES.iter().skip(1)) {
assert!(
ext <= n_ext,
"Extensions in src/mime_types should be... | Rust | 0 |
x7Fi32 as i8,
0x7Fi32 as i8,
0x7Fi32 as i8,
0x7Fi32 as i8,
];
static RANGE_MAX_TABLE: [i8; 16] = [
0x7Fi32 as i8,
0xbFi32 as i8,
0xbFi32 as i8,
0xbFi32 as i8,
0xbFi32 as i8,
0x9Fi32 as i8,
0xbFi32 as i8,
0x8Fi32 as i8,
0xF4i32 as i8,
0x80i32 as i8,
0x80i32 as i8,
... | Rust | 0 |
32_09_reg_jit, reg);
define_instruction_write_reg8!(gen_or8, instr_0A_mem_jit, instr_0A_reg_jit);
define_instruction_write_reg16!("or16", instr16_0B_mem_jit, instr16_0B_reg_jit);
define_instruction_write_reg32!(gen_or32, instr32_0B_mem_jit, instr32_0B_reg_jit);
pub fn instr_0C_jit(ctx: &mut JitContext, imm8: u32) { g... | Rust | 0 |
id: u64) {
let amount_msat = path.split_last().map(|(hop, _)| hop.fee_msat).unwrap_or(0);
let liquidity_offset_half_life = self.params.liquidity_offset_half_life;
let network_graph = self.network_graph.read_only();
for hop in path {
let target = NodeId::from_pubkey(&hop.pubkey);
let channel_directed_from_... | Rust | 0 |
import os
from jinja2 import Environment, FileSystemLoader
from besser.BUML.metamodel.structural import DomainModel
from besser.generators import GeneratorInterface
import itertools
class PydanticGenerator(GeneratorInterface):
"""
PydanticGenerator is a class that implements the GeneratorInterface and is respo... | Python | 1 |
k {
Continuation::Done(k_answer) => k_answer,
_ => panic!("No answer received"),
};
println!(
"ANSWER TO 2020 DAY 5 CHALLENGE 2 --------------------> {:?}",
answer,
);
}
}
<filename>dochy_diff/src/imp/structs_write.rs
use dochy_core::structs::... | Rust | 0 |
script code hash.
pub block_assembler_code_hash: Option<String>,
/// Block assembler lock script args.
pub block_assembler_args: Vec<String>,
/// Block assembler lock script hash type.
pub block_assembler_hash_type: ScriptHashType,
/// Block assembler cellbase transaction message.
pub block_... | Rust | 0 |
);
let _span_trace = tracing_error::SpanTrace::capture();
err
})?;
Ok(res.into_inner())
}
/// TODO: documentation
#[tracing::instrument(fields(otel.kind = "client"))]
pub async fn validate(&self, req: &RtValidateReq, sub: &str) -> Result<RtRes, Status> {
... | Rust | 0 |
#Многопоточность
import threading
#def f(name=None):
# a = 0
# while a < 10:
# a += 1
# print(f'{name} - {a}')
#print(threading.active_count())
#t1 = threading.Thread(name='Первый поток', target=f, kwargs={'name':'First'})
#t2 = threading.Thread(name='Второй поток', target=f, kwargs={'name':'Second... | Python | 1 |
mem::size_of::<*const c_void>();
}
let type_size = match v.type_name().as_str() {
"i8" => mem::size_of::<i8>(),
"&[u8]" | "u8" => mem::size_of::<u8>(),
"bool" => 1,
"i16" => mem::size_of::<i16>(),
"u16" => mem::size_of::<u16>(),
... | Rust | 0 |
pub fn empty() -> Self {
Pattern::new(Vec::new())
}
pub fn len(&self) -> usize {
self.0.len()
}
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
/// Appends each of the items in `iter` to the pattern separately, returning a vector of
/// patterns.
///
... | Rust | 0 |
"""
Pytest configuration file for CrawlStudio tests
"""
import pytest
def pytest_configure(config):
"""Configure custom markers"""
config.addinivalue_line(
"markers",
"essential: mark test as essential for CI pipeline"
)
| Python | 1 |
::std::os::raw::c_int,
arg2: ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>,
),
>;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct timeval {
pub tv_sec: __darwin_time_t,
pub tv_usec: __darwin_suseconds_t,
}
#[test]
fn bindgen_test_layout_timeval(... | Rust | 0 |
import bscscan
from bscscan.core.base import BaseClient
from bscscan.enums.fields_enum import FieldsEnum as fields
from bscscan.utils.parsing import ResponseParser as parser
from requests import Session
class SyncClient(BaseClient):
def _build(self):
for func, v in self._config.items():
if not... | Python | 1 |
ViT, after the convolution stem, accepts a 1x1 patch size and 14x14 image size.
This is NOT a B-cos model.
+---------+-------------------+
| Name | Value |
+=========+===================+
| Acc@1 | 77.866% |
+---------+-------------------+
| Acc@5 | 92.298% ... | Python | 1 |
entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True... | Python | 1 |
() || !rust::has_rustup() {
return Ok(());
}
if has_cargo_installed_rustfmt() {
cargo::cargo(&["uninstall", "rustfmt", "rustfmt-nightly", "rustfmt-preview"])?;
}
if !has_cargo_fmt() {
rust::rustup(&["component", "remove", "rustfmt-preview"])?;
rust::rustup(&["component", ... | Rust | 0 |
import pysnooper
@pysnooper.snoop(depth=2, color=False)
def factorial(x):
if x <= 1:
return 1
return mul(x, factorial(x - 1))
def mul(a, b):
return a * b
def main():
factorial(4)
expected_output = '''
Source path:... Whatever
Starting var:.. x = 4
09:31:32.691599 call 5 def factor... | Python | 1 |
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | Python | 1 |
\x9e\x5c\xa2\x8b19\xd2\xf7\x01\xb0\x82x\x7fQ\x8b\xb4\
\xf8\xb7\xc2\xef\x82)\xfc\x16g\xc0\x12\x96\xd9\x82*\x07\
\xd4\xda3\xf0A\xd3RM}z\xcd\xb2\xd31\xe1\xc9\
\x8esRV\xf4@\x0eH\x81@\x13\xe8\xad\xadQ*\
\xfb\x01\x0f8w\x17rI\xfdxQ.\x83;\xdd\xa6\
\xef4])u\xb36\xce\x0a\xd4q\xfd\xa9\xf0\xb1\x90\
\x0f\xb3>I\xc1y\x03\xe9\x972nr\x... | Python | 1 |
Ok(inner) => inner,
Err(_) => panic!("argument is not a binary"),
};
let theme: NifBinary = match theme_term.load(inner_env).decode() {
Ok(inner) => inner,
Err(_) => panic!("argument is not a binary"),
... | Rust | 0 |
ough the error persists).
//! assert!(tokens.next(&mut diagnostics));
//! assert!(diagnostics.is_err());
//!
//! let token = tokens.current().unwrap();
//! assert_eq!(token.kind, TokenKind::Identifier);
//! assert_eq!(token.span.as_str(), "y");
//! // Starts from zero
//! assert_eq!(token.sp... | Rust | 0 |
mac_txt_len(&self) -> u32 {
self.inner.get_add_mac_txt_len()
}
///
/// Get the size of the encrypt text in SgxSealedData.
///
pub fn get_encrypt_txt_len(&self) -> u32 {
self.inner.get_encrypt_txt_len()
}
}
<filename>src/template_engine/mod.rs
use crate::constants;
use crate::tem... | Rust | 0 |
offset(0),
b"StdVW\x00" as *const u8 as *const i8,
) != 0
{
let stemv = cff_dict_get(
*cffont.private.offset(0),
b"StdVW\x00" as *const u8 as *const i8,
0i32,
);
pdf_add_dict(descriptor, "StemV", pdf_new_number(stemv));
}
/*
... | Rust | 0 |
from docxtpl import DocxTemplate
import report_input
from helpers.context_helpers import df_to_table, image_to_figure, df_to_table_no_comma
from helpers.introduction.table2 import get_table2
from helpers.part_1.figure2 import get_figure2
from helpers.part_1.figure3 import get_figure3
from helpers.part_1.figure4 import... | Python | 1 |
2', '0.7376']
b1call (numeric, 7 distinct): ['2', '3', '4', '5', '6', '7', '8']
b1eff (numeric, 8181 distinct): ['0.8592', '1.556', '0.6619', '1.7799', '1.3106', '1.0423', '0.5342', '0.7817', '1.7223', '0.7934']
b2x (numeric, 8175 distinct): ['0.3772', '-0.438', '0.4919', '-0.213', '-0.8981', '-0.3861', '-0.9378', '0.3... | Python | 1 |
r q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
// CHECK: @NO_APP
check!(qreg_f32x4 f32x4 qreg "vmov");
// CHECK-LABEL: qreg_low8_i8x16:
// CHECK: @APP
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
// CHECK: @NO_APP
check!(qreg_low8_i8x16 i8x16 qreg_low8 "vmov");
// CHECK-LABEL: qreg_low8_i16x8:
// CHECK: @APP
// CHEC... | Rust | 0 |
oked
pub struct CallbackInfo<'a, 'b, T: 'a> {
/// Mutable access to the application state. Use this field to modify data in the `T` data model.
pub state: &'a mut AppState<T>,
/// UiState containing the necessary data for testing what
pub ui_state: &'a BTreeMap<DomId, UiState<T>>,
/// The callback c... | Rust | 0 |
a), ArithmeticKind::Sub, Box::new(b)) }
--
a:@ _ "*" _ b:(@) { Expr::Arithmetic(Box::new(a), ArithmeticKind::Mul, Box::new(b)) }
a:@ _ "/" _ b:(@) { Expr::Arithmetic(Box::new(a), ArithmeticKind::Div, Box::new(b)) }
--
a:@ _ "." _ b:identifier() { Expr::Dot(Box::new(a), b) }
... | Rust | 0 |
山县");
map.insert("420527", "湖北省秭归县");
map.insert("420528", "湖北省长阳土家族自治县");
map.insert("420529", "湖北省五峰土家族自治县");
map.insert("420581", "湖北省宜都市");
map.insert("420582", "湖北省当阳市");
map.insert("420583", "湖北省枝江市");
map.insert("420600", "湖北省襄樊市");
map.insert("4206... | Rust | 0 |
input", "matmul1.weight"], ["matmul1.output"], name="MatMul1"
)
# MatMul Layer 2
matmul2_weight = _random_float_tensor("matmul2.weight", 20, 1)
matmul2_output = onnx.helper.make_tensor_value_info(
"matmul2.output", TensorProto.FLOAT, [20, 1]
)
matmul2_node = onnx.helper.make_node(
... | Python | 1 |
num = 0
while num != 7:
num = num + 1
cont = cont + 1
print(num)
| Python | 1 |
let provider = yahoo::YahooConnector::new();
let response = tokio_test::block_on(provider.get_quote_range(\"AAPL\", \"1d\", \"1mo\")).unwrap();
let quotes = response.quotes().unwrap();
println!(\"Apple's quotes of the last month: {:?}\", quotes);
}
```
# Search for a ticker given a search string (e.g. comp... | Rust | 0 |
rencyLimitLayer::new(64))
.layer(AddExtensionLayer::new(Arc::new(
tailscale_client::Client::new(
waifud::APPLICATION_NAME.to_string(),
cfg.tailscale.api_key.clone(),
cfg.tailscale.tailnet.clone(),
)?,
)))
.layer(AddExtension... | Rust | 0 |
import logging
from interfaces.host import IHost
from var.global_var import g_root_path
class ContainernetHostAdapter(IHost):
def __init__(self, containernet_host):
self.containernet_host = containernet_host
def is_connected(self) -> bool:
return True
def cmd(self, command: str) -> str:
... | Python | 1 |
# This file is part of the NssMPClib project.
# Copyright (c) 2024 XDU NSS lab,
# Licensed under the MIT license. See LICENSE in the project root for license information.
import inspect
import os
from collections import OrderedDict
from NssMPC.application.neural_network.utils.model_compiler import sec_format
from ... | Python | 1 |
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software... | Python | 1 |
check_eq_zero(MIN_NORMAL);
check_eq_zero(MAX_NORMAL);
// below MIN_NORMAL is in subnormal tests
check_ne(MIN_NORMAL, next(MIN_NORMAL), 0.0);
check_eq(MIN_NORMAL, next(MIN_NORMAL), 1.0 * EPSILON);
check_ne(MIN_NORMAL, next_n(MIN_... | Rust | 0 |
r.info("⚠️ CRITICAL CHANGES:")
logger.info(" • Position size: 51% → 2% maximum")
logger.info(" • RL override: Strongly favors HOLD over risky trades")
logger.info(" • Exit strategy: Much tighter stop losses")
logger.info("")
# Show example usage
logger.info("💡 EXAMPLE USAGE:")
l... | Python | 1 |
import asyncio
from rstream import AMQPMessage, ConfirmationStatus, Producer
STREAM = "stream-offset-tracking-python"
MESSAGES = 100
# 2GB
STREAM_RETENTION = 2000000000
confirmed_messages = 0
all_confirmed_messages_cond = asyncio.Condition()
async def _on_publish_confirm_client(confirmation: ConfirmationStatus) -> ... | Python | 1 |
import streamlit as st
import pandas as pd
from service import rag_factory as rag_factory
import pages.support.app_sidebar as app_sidebar
from importlib import reload
#Window setup
st.title('Find Similar Clients')
#Fields on Sidebar
reload(app_sidebar)
#############
# Main UI
# pylint: disable=reportUndefinedVa... | Python | 1 |
impl<'a, K: Hash + Eq, V> IntoIterator for &'a MapBox<K, V> {
type Item = (&'a K, &'a V);
type IntoIter = Iter<'a, K, V>;
#[inline]
fn into_iter(self) -> Self::IntoIter {
self.iter()
}
}
impl<'a, K: Hash + Eq, V> IntoIterator for &'a mut MapBox<K, V> {
... | Rust | 0 |
# Ben Fisher, 2018
# MIT license
from place_imports_one_line import *
import re
def go(srcdirectory):
for f, short in files.recurseFiles(srcdirectory):
f = f.replace('\\', '/')
if short.endswith('.ts'):
goPerFile(f)
def goPerFile(f):
if '/bridge/' in f:
return
isTestC... | Python | 1 |
import os
import requests
endpoint = "https://whut.ai-augmented.com/api/jx-iresource/"
token = input("请输入 token: ") or os.environ.get("DEV_TOKEN") # 获取token
headers = {
"Authorization": f"Bearer {token}",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/1... | Python | 1 |
Img", os.path.basename(image_path))}"'
except:
pass
def write_to_main_py(self, mod_name, *args):
main_path = os.path.join(os.getcwd(), mod_name, "main.py")
save_text = ""
if self.prefix == "Cats":
save_text = f"BuyCat({self.entrys['moneys']}, '{self.entrys['... | Python | 1 |
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# 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 ... | Python | 1 |
disabled. 1 = The DMA for endpoint EPxx is enabled."]
#[inline(always)]
pub fn ep_dma_st11(&self) -> EP_DMA_ST11_R {
EP_DMA_ST11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Endpoint xx (2 <= xx <= 31) DMA enabled bit. 0 = The DMA for endpoint EPxx is disabled. 1 = The DMA for en... | Rust | 0 |
import os
import random
import shutil
random.seed(42)
images_folder = "path_to_images_folder"
labels_folder = "path_to_labels_folder"
train_folder = "path_to_train_folder"
validation_folder = "path_to_validation_folder"
test_folder = "path_to_test_folder"
os.makedirs(os.path.join(train_folder, 'images'), exist_ok=T... | Python | 1 |
"LGPL-2.1-or-later",
r#"GNU Lesser General Public License v2.1 or later"#,
IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU,
),
(
"LGPL-3.0",
r#"GNU Lesser General Public License v3.0 only"#,
IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU,
... | Rust | 0 |
ER: Mutex<Pic> = Mutex::new(Pic::new(0xA0));
pub fn init() {
// We need to add a delay between writes to our PICs, especially on
// older motherboards. But we don't necessarily have any kind of
// timers yet, because most of them require interrupts. Various
// older versions of Linux and other PC ope... | Rust | 0 |
r_parties: &Vec<Party>,
) -> Result<Patch> {
let old_trainer_parties = self.get_trainer_parties(trainer_id)?;
let old_trainer_parties_len = old_trainer_parties.len();
let old_trainer_parties_data: Vec<u8> = old_trainer_parties
.iter()
.map(|old_trainer_party| old_trai... | Rust | 0 |
dows_callback, windows_list)
wxwork_windows = [w for w in windows_list if w['pid'] == self.wxwork_pid]
selected_window = None
for w in wxwork_windows:
if w['hwnd'] == hwnd:
selected_window = w
... | Python | 1 |
::<T>::TokenIdOverflow)?;
domain.next_token_id = next_token_id;
Tokens::<T>::insert(domain_id, next_token_id, token);
Self::mint(creator.clone(), domain_id, next_token_id, total_supply)?;
Self::deposit_event(RawEvent::TokenCreated(creator, domain_id, next_token_id, total_supply));
Ok(())
})
}
... | Rust | 0 |
to send back successfully parsed messages.
pub sender: UnboundedSender<AppMention>,
}
/// Landing page with usage instructions.
pub fn index() -> impl warp::Reply {
warp::reply::html(INDEX_HTML)
}
/// Favicon in 16x16px.
pub fn favicon_16() -> impl warp::Reply {
Respon... | Rust | 0 |
inear_algebra::vector::DenseVector;
use crate::data::linear_algebra::vector::test::TestVector;
use crate::data::linear_program::elements::{Objective, RangedConstraintRelation, VariableType};
use crate::data::linear_program::general_form::{GeneralForm, OriginalVariable, Variable};
use crate::data::number... | Rust | 0 |
&mut [i32], b: &mut [Self], ldb: i32, info: &mut i32)
{
unsafe
{
$xgetrs('N' as u8, n, nrhs, a, lda, ipiv, b, ldb, info);
}
}
}
)
);
lapack_real!(f32,
lapack::sgehrd,
lapack::sorghr,
lapack::sgeev,
lapack::sgetrf,
lapac... | Rust | 0 |
Image or numpy.ndarray): List of images to be cropped
in format (h, w, c) in numpy.ndarray
Returns:
PIL.Image or numpy.ndarray: Cropped list of images
"""
angle = random.uniform(self.degrees[0], self.degrees[1])
if isinstance(clip[0], np.ndarray):
rotated = [s... | Python | 1 |
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_... | Rust | 0 |
import os
from os.path import dirname, abspath
from nltk.corpus import wordnet as wn
import mplnet.lib as lib
datasets_dir = dirname(dirname(abspath(__file__)))
IMAGENET_CLASS_NAMES = lib.load_json(os.path.join(datasets_dir, "files", "imagenet_class_index_clip.json"))
with open(os.path.join(datasets_dir, 'files',... | Python | 1 |
epts",
'embeddings': {
'hair_colors': [
"blue_hair", "red_hair", "blonde_hair", "pink_hair", "green_hair",
"purple_hair", "white_hair", "black_hair"
],
'eye_colors': [
"blu... | Python | 1 |
cof_price
if change < 0: # this is an unsuccessful payment
print("Sorry that's not enough money. Money refunded.")
else: # this is a successful payment
if change > 0:
prin... | Python | 1 |
/// Read-write values
pub mod RW {
/// 0b0: DPDM changes wake-up to be disabled only when VBUS is 0.
pub const WKUP_DPDM_EN_0: u32 = 0b0;
/// 0b1: (Default) DPDM changes wake-up to be enabled, it is for device only.
pub const WKUP_DPDM_EN_1: u32 = 0b1;
... | Rust | 0 |
"""Add feedback model
Revision ID: ddb46ecb8a1f
Revises: 1234567890ab
Create Date: 2025-04-07 14:00:19.930225
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'ddb46ecb8a1f'
down_revision: Union[str, None] = '1234567890ab... | Python | 1 |
@staticmethod
def chw2hwc(chw):
assert 3 == len(chw.shape)
if isinstance(chw, torch.Tensor):
hwc = torch.permute(chw, (1, 2, 0))
elif isinstance(chw, np.ndarray):
hwc = np.moveaxis(chw, 0, -1)
return hwc
| Python | 1 |
Point3> = Tile {
point: tile_point,
sprite_order: tile.sprite_order,
sprite_index: tile.sprite_index,
tint: tile.tint,
};
if let Some(tiles) = chunk_map.get_mut(&chunk_point) {
tiles.push(chunk_tile);
} e... | Rust | 0 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
# Load raw and interpolated data
raw_parquet_file = "processed_data/ppg_dalia_cleaned/raw_combined_ppg_dalia.parquet"
interpolated_parquet_file = "processed_data/ppg_dalia_cleaned/combined_ppg_dalia.parquet"
... | Python | 1 |
rip, 1);
*rip += 5;
(Opcode::Jmp, Operands{ operands: [Some(Operand::Immediate(immediate as i64)), None, None], ..Default::default() } )
}
0xEE => {
*rip += 1;
(Opcode::Out, Operands::default())
}
0xF6 => {
let modrm = memory.get_u8(*rip, 1);
let opcode = (modrm & 0b00111000) >... | Rust | 0 |
entry(type_id) {
Entry::Occupied(_) => panic!("EventAggregator: type already registered"),
Entry::Vacant(entry) => {
entry.insert(Mutex::new(Box::new(logging_sender)));
}
}
receiver
}
}
}
<reponame>InteractiveComput... | Rust | 0 |
_with_path<P, H, R>(path: P, handler: H) -> crate::Result<Middleware<B, E>>
where
P: Into<String>,
H: Fn(Request<hyper::Body>) -> R + Send + Sync + 'static,
R: Future<Output = Result<Request<hyper::Body>, E>> + Send + 'static,
{
Ok(Middleware::Pre(PreMiddleware::new(path, handler... | Rust | 0 |
, 1.7, 0.0));
let rfoot_anchor = Anchor::new(Some(rfoot), Pnt3::new(0.0, 1.7, 0.0));
let lfoot_anchor = Anchor::new(Some(lfoot), Pnt3::new(0.0, 1.7, 0.0));
let head_joint = BallInSocket::new(body_anchor_head, head_anchor);
let rarm_joint = BallInSocket::new(body_anchor_rarm, rarm_anchor... | Rust | 0 |
efresh avatar cache
self.logger.info(f"Refreshing UI avatar cache...")
if member['name'] in self.avatar_cache:
del self.avatar_cache[member['name']]
try:
img = Image.open(local_filename).resize((30, 30), Image.Resampling.LANCZOS)
... | Python | 1 |
mment_count(user.id, course_ids)
thread_count = Thread.get_user_threads_count(user.id, course_ids)
log.info(f"<<Bulk Delete>> {username} in {course_ids} - Count thread {thread_count}, comment {comment_count}")
if execute_task:
event_data = {
"triggered_by": request.u... | Python | 1 |
import requests
import datetime
import re
# 返回一个n*4的二维数组,分别是日期、剩余电量、总用电量、总购电量
def crawlData(client: str, room_name: str, room_id: str, interval: int = 7) -> list:
# 爬取网页,应该一般不会变动
url = 'http://192.168.84.3:9090/cgcSims/selectList.do'
# 计算今天与六天前
today = datetime.date.today()
days_before = str(toda... | Python | 1 |
User<'a> {
last_name: &'a str,
first_name: &'a str,
age: usize,
}
fn main() {
let n_user = NewUser {
first_name: "Joe",
last_name: "Blow",
age: 30,
};
let s_user: SavedUser = frunk::labelled_convert_from(n_user);
assert_eq!(s_user.first_name, "Joe");
assert_eq!... | Rust | 0 |
KEY, &msg)
.and_then(|(sender_verkey, mut msgs)| {
assert_eq!(1, msgs.len());
match msgs.remove(0) {
A2AMessage::Version1(A2AMessageV1::MessagesByConnections(messages)) => Ok((sender_verkey, messages.msgs)),
_ => Err(err_msg("Invalid message"))
... | Rust | 0 |
from autoslug import AutoSlugField
from django.db import models
from django.utils.translation import gettext_lazy as _
from django_ckeditor_5.fields import CKEditor5Field
from adhocracy4 import transforms as html_transforms
from adhocracy4.modules import models as module_models
class Activity(module_models.Item):
... | Python | 1 |
evel/lib/python2.7/dist-packages/geometry_msgs/msg/_Point32.pyt deserialize_numpyd s
(( t __name__t
__module__t _md5sumt _typet Falset _has_headert
_full_textt __slots__R R R
R R# R% R& |