text string | label_name string | labels int64 |
|---|---|---|
from azure.identity import AzureAuthorityHosts
AZURE_CHINA_CLOUD = "https://management.chinacloudapi.cn"
AZURE_US_GOV_CLOUD = "https://management.usgovcloudapi.net"
AZURE_GERMAN_CLOUD = "https://management.microsoftazure.de"
AZURE_GENERIC_CLOUD = "https://management.azure.com"
def get_regions_config(region):
all... | Python | 1 |
#
# Copyright (C) 2021 - 2024 Satoru SATOH <satoru.satoh gmail.com>
# SPDX-License-Identifier: MIT
#
# pylint: disable=missing-docstring, unused-import
"""Test cases for anyconfig.api.single_load to load primitive types."""
from __future__ import annotations
import typing
import pytest
import anyconfig.api._load as ... | Python | 1 |
y<Rc<FontTexture>> {
if persistent.is_none() {
let text_display = TextDisplay::new(text_system, font, text);
*persistent = Some(text_display);
}
return persistent.as_ref().unwrap();
}
pub fn draw_text<'a>(
persistent: &'a mut Option<TextDisplay<Rc<FontTexture>>>,
text_system: &TextS... | Rust | 0 |
from typing import Tuple
import gradio as gr
from .. import files
def create_output_column(disable_local_saving: bool = False) -> Tuple[gr.Column, dict]:
"""Create the output column with audio player and file list."""
with gr.Column(scale=1) as col:
gr.Markdown("### Latest Output")
audio_out... | Python | 1 |
let i: &[u8] = b"/http://user:pass@www.example.com:1234/path1/path2?a=b&c=d#frag";
assert!(!scheme()(i).is_ok());
}
#[test]
fn ParseCredentials_1() {
let i: &[u8] = b"//user:pass@www.example.com:1234/path1/path2?a=b&c=d#frag";
let o: &[u8] = b"www.example.com:1234/path1/path2?a=b&c=d#frag";
let u: &[... | Rust | 0 |
pub enum CHK_CHRG_B_A {
#[doc = "0: Check whether a charger (either a dedicated charger or a host charger) is connected to USB port."]
CHECK = 0,
#[doc = "1: Do not check whether a charger is connected to the USB port."]
NO_CHECK = 1,
}
impl From<CHK_CHRG_B_A> for bool {
#[inline(always)]
fn fr... | Rust | 0 |
from typing import List
import torch
def batch_to_multihot(label: List[List[int]], num_labels: int) -> torch.tensor:
"""Converts label to multihot format.
Args:
label: [batch size, *]
num_labels: total number of labels
Returns:
multihot: [batch size, num_labels]
"""
mult... | Python | 1 |