text string | label_name string | labels int64 |
|---|---|---|
import random
import pandas as pd
import csv
import SimpleITK as sitk
import scipy.ndimage
import torch
import torch.utils.data as data_utils
import numpy as np
import os
from PIL import Image, ImageDraw
import cv2
#from xpinyin import Pinyin
import copy
import re
import skimage
from torchvision import transforms
# 定义... | Python | 1 |
of
channels, which should be 1, 3, or 4.
max_outputs: Optional `int`. At most this many images will be
emitted. If more than this many images are provided, the first
`max_outputs` many images will be used and the rest silently
discarded.
display_name: Optional name for this summary in T... | Python | 1 |
.dist_traveled, None);
}
<filename>src/serde_impls.rs<gh_stars>10-100
//! Serialization and Deserialization for syntax trees.
use crate::{
interning::{IntoResolver, Resolver},
GreenNodeBuilder, Language, NodeOrToken, ResolvedNode, SyntaxKind, SyntaxNode, WalkEvent,
};
use serde::{
de::{Error, SeqAccess, Vi... | Rust | 0 |
in a single proof validation tx
///
/// # Arguments
///
/// * `proof_mask_max` - The largest proof mask across all accounts intended for submission
///
pub fn validation_account_limit(proof_mask_max: usize) -> u64 {
let (ratio, bytes) = get_ratios();
// account_meta_count * (ratio + proof_mask_max) = bytes
... | 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 logging
from typing import Any, Dict, List
import torchvision.transforms as pth_transforms
from classy_vision.dataset.transforms import... | Python | 1 |
number_expression<'ast, Z: ZVisitorMut<'ast>>(
visitor: &mut Z,
u64e: &mut ast::U64NumberExpression<'ast>,
) -> ZVisitorResult {
visitor.visit_span(&mut u64e.span)
}
pub fn walk_underscore<'ast, Z: ZVisitorMut<'ast>>(
visitor: &mut Z,
u: &mut ast::Underscore<'ast>,
) -> ZVisitorResult {
visitor... | Rust | 0 |
Decimal,
#[serde(default)] pub pending_aust: Uint128,
#[serde(default)] pub pools: Vec<BalancePool>,
}
pub const SEC_IN_DAY: u64 = 24u64 * 60u64 * 60u64;
impl BalancePool {
pub fn add_share(&mut self, time: u64, share: Uint128, time_burned: u64) {
let new_share = self.share + share;
let re... | Rust | 0 |
import os
import openai
import yaml
import re
import json
import re
from utils import generate_sequence_explanation_prompt
from utils import generate_fine_motion_control_prompt
from utils import generate_sequence_explanation_prompt_json
from .llm_config import llm
def analyze_fine_moton_control_txt(action):
# Ste... | Python | 1 |
ray([colors_dict[symbol] for symbol in atoms.get_chemical_symbols()])
atom_colors[:,:3] += (1 - atom_colors[:,:3])*0.5
atom_colors[1,:3] = aoi_color
atoms_rep = atoms.repeat((4,4,1))
atom_colors_rep = np.vstack([atom_colors]*16)
povray_figure(atoms_rep,'CN7','-75x,-15y,-3z',[-5,5,45,30],atom_colors_rep)
# CN5
db =... | Python | 1 |
!("PAGE {:2}: ", i);
for j in 0..PAGE_SIZE {
if i >= DATA_PAGES && (i - DATA_PAGES) * PAGE_SIZE + j < commands.len() {
let word = format!("{: >4}", commands[(i - DATA_PAGES) * PAGE_SIZE + j]);
for b in word.chars() {
print!("{: ... | Rust | 0 |
rmation about avaliable fields see [wr_data](wr_data) module"]
pub type WR_DATA = crate::Reg<u32, _WR_DATA>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _WR_DATA;
#[doc = "`write(|w| ..)` method takes [wr_data::W](wr_data::W) writer structure"]
impl crate::Writable for WR_DATA {}
#[doc = "CRC data register"]
pub m... | Rust | 0 |
))
def copy_to_clipboard(self, e: ft.ControlEvent):
"""It copies the tooltip object/instance to the clipboard."""
o = f", opacity={self.bar_opacity}"
s = f", scale={self.bar_scale}"
off = f", offset={self.bar_offset}"
t = f", tooltip='{self.bar_tooltip}'"
bg= f", bgc... | Python | 1 |
lueError:
index = self.ASCII.get('?', 0) # Use '?' or null for invalid data
# Find character, default to '?' if not found or invalid index
char = next((k for k, v in self.ASCII.items() if v == index), '?')
# Handle specific non-printable chars if need... | Python | 1 |
< |