text string | label_name string | labels int64 |
|---|---|---|
Result,
) -> *const SpvReflectDescriptorBinding;
}
extern "C" {
#[doc = " @fn spvReflectGetDescriptorSet"]
#[doc = ""]
#[doc = "@param p_module Pointer to an instance of SpvReflectShaderModule."]
#[doc = "@param set_number The \"set\" value of the requested descriptor set."]
#[doc = "@para... | Rust | 0 |
e_hflip'], self.opt['use_rot'])
# BGR to RGB, HWC to CHW, numpy to tensor
img_gt, img_lq = img2tensor([img_gt, img_lq], bgr2rgb=True, float32=True)
# normalize
if self.mean is not None or self.std is not None:
normalize(img_lq, self.mean, self.std, inplace=True)
... | Python | 1 |
fn function_data() {
fn check_ok(name: &str, count: u64) {
check_parse_ok(
&format!("FNDA:{},{}", count, name),
&FunctionData {
name: name.into(),
count,
},
);
}
check_ok("hogehoge", 12345);
check_ok("hoge,hoge", 98765)... | Rust | 0 |
memory=True)
test_loader = DataLoader(test_dataset, shuffle=False, **loader_args)
return {"test_loader": test_loader,
"test_Datset": test_dataset}
if __name__ == '__main__':
import numpy as np
loader = build_loaders(cfg='../config/example.yaml', mode='train')
mean = [0.48... | Python | 1 |
the bitmap is at least one bit per page.
let ret = unsafe { ioctl_with_ref(self, KVM_GET_DIRTY_LOG(), &dirtylog) };
if ret == 0 {
Ok(bitmap)
} else {
Err(errno::Error::last())
}
}
/// Registers an event that will, when signaled, trigger the `gsi` IRQ.
... | Rust | 0 |
as mp;
use crate::core::{
BookInformation, FontID, MouseInformation, ResultReport, SavableData, SuzuContext,
TileBatchTextureID,
};
use crate::flush_delay_event;
use crate::flush_delay_event_and_redraw_check;
use crate::object::effect_object;
use crate::object::map_object::*;
use crate::object::notify;
use crat... | Rust | 0 |
Params()) }.into_result()?;
let ret = unsafe { core::Ptr::<dyn crate::tracking::TrackerCSRT>::opencv_from_extern(ret) };
Ok(ret)
}
}
pub trait TrackerCSRT_ParamsTraitConst {
fn as_raw_TrackerCSRT_Params(&self) -> *const c_void;
#[inline]
fn use_hog(&self) -> bool {
let ret = unsafe { sys::cv_tracking_Track... | Rust | 0 |
NALING {
fn clone(&self) -> Self {
*self
}
}
#[doc = "*Required features: 'Win32_Media_MediaFoundation'*"]
pub type OPM_ACP_PROTECTION_LEVEL = i32;
#[doc = "*Required features: 'Win32_Media_MediaFoundation'*"]
pub const OPM_ACP_OFF: OPM_ACP_PROTECTION_LEVEL = 0i32;
#[doc = "*Required features: 'Win32_Me... | Rust | 0 |
lues(fields)
if not idsAndValues['Name'].strip():
dom.alert("The name field can not be empty!")
return
if board.contactId == None or board.contactId >= len(contacts):
contacts.append(idsAndValues)
displayContact(None,dom)
else:
contacts[board.contactId] = idsAndValues
atlastk.broadcastAct... | Python | 1 |
_word(data: &[u16]) -> Result<Self, IcedError> {
if data.len().wrapping_sub(1) > 8 - 1 {
return Err(IcedError::new("Invalid slice length"));
}
let mut instruction = Self::default();
instruction.set_code(Code::DeclareWord);
instruction_internal::internal_set_declare_data_len(&mut instruction, data.len() as... | Rust | 0 |
total: i32
}
impl OrganizedTestResults {
/**
Constructor
*/
pub fn new() -> OrganizedTestResults {
let success : TestSetCollection = TestSetCollection::new();
let failed : TestSetCollection = TestSetCollection::new();
let skipped : TestSetCollection = TestSetCollection::new... | Rust | 0 |
self,
renderer: &mut Renderer<D>,
build_options: BuildOptions,
executor: E)
-> Vec<RenderCommand>
where D: Device, E: Executor {
let com... | Rust | 0 |
"/static",
fs::StaticFiles::with_config("./web/dist", StaticFileConfig).unwrap(),
)
.resource("/", |r| r.get().with(view::home))
.resource("/about", |r| r.get().with(view::about))
.resource("/movies", |r| {
r.name("all_movies");
r.get().with(view::all... | Rust | 0 |
from fastapi import APIRouter, Depends, HTTPException, Query
from sqlmodel.ext.asyncio.session import AsyncSession
from sqlmodel import select
from database import get_session
import models.Alumno as Alumno
router = APIRouter(prefix="/alumnos")
# Endpoint para agregar un alumno
@router.post("/", response_model=Alumno... | Python | 1 |
import tensorflow as tf
import math
import numpy as np
from agents.replay_priorities import ProportionalPriorities
from .mock import Mock
class ReplayPrioritiesTest(tf.test.TestCase):
def test_proportional_priority(self):
config = Mock(
replay_capacity=12, replay_alpha=1, replay_beta=1, num_steps=100)
... | Python | 1 |
page_x, ZeroPageX),
0x8D => STA(absolute, Absolute),
0x9D => STA(absolute_x, AbsoluteX),
0x99 => STA(absolute_y, AbsoluteY),
0x81 => STA(indirect_indexed, IndirectIndexed),
0x91 => STA(indexed_indirect, IndexedIndirect),
// STX
0x86 => STX(zero_page, ZeroPage),
0x96 => STX(zero_page_y, ... | Rust | 0 |
# Copyright 2016 The TensorFlow 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 appl... | Python | 1 |
"""
multilingual universal sentence encoder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"""
from textattack.constraints.semantics.sentence_encoders import SentenceEncoder
from textattack.shared.utils import LazyLoader
hub = LazyLoader("tensorflow_hub", globals(), "tensorflow_hub")
tensorflow_text = LazyLoader("tensorflo... | Python | 1 |
#!/usr/bin/env python3
''' Description: Create a measure_time function with integers n and
max_delay as arguments that measures the total execution
time for wait_n(n, max_delay), and returns total_time / n.
Your function should return a float.
Arguments: n: int, ma... | Python | 1 |
the this mode is `Lexical`.
pub fn is_lexical(&self) -> bool {
matches!(self, Self::Lexical)
}
/// Returns `true` if the this mode is `Strict`.
pub fn is_strict(&self) -> bool {
matches!(self, Self::Strict)
}
/// Returns `true` if the this mode is `Global`.
pub fn is_globa... | Rust | 0 |
xtInput(attrs={'class': 'form-control', 'placeholder': 'Add any relevant notes'}),
}
def __init__(self, *args, **kwargs):
user = kwargs.pop('user', None)
course_slug = kwargs.pop('course_slug', None)
super().__init__(*args, **kwargs)
# If a course is provided, hide the cour... | Python | 1 |