text string | label_name string | labels int64 |
|---|---|---|
d, Seek, Write};
use crate::mp4box::*;
#[derive(Debug, Clone, PartialEq, Default, Serialize)]
pub struct TrunBox {
pub version: u8,
pub flags: u32,
pub sample_count: u32,
pub data_offset: Option<i32>,
pub first_sample_flags: Option<u32>,
#[serde(skip_serializing)]
pub sample_durations: Ve... | Rust | 0 |
}
}
}
}
macro_rules! impl_decodable_for_hash {
($name: ident, $size: expr) => {
impl Decodable for $name {
fn decode(rlp: &UntrustedRlp) -> Result<Self, DecoderError> {
rlp.decoder().decode_value(|bytes| match bytes.len().cmp(&$size) {
cmp::Ordering::Less => Err(DecoderError::RlpIsTooShort),
cmp... | Rust | 0 |
pub const MUTE_NO_SLEW_ALG_7MUTE: u16 = 884;
pub const MUTE_NO_SLEW_ALG_8MUTE: u16 = 885;
pub const GAIN_1940_ALG_NS9: u16 = 886;
pub const GAIN_1940_ALG_NS10: u16 = 887;
pub const MUTE_NO_SLEW_ALG_4MUTE: u16 = 888;
pub const GAIN_1940_ALG_NS4: u16 = 889;
pub const GAIN_1940_ALG_NS5: u16 = 89... | Rust | 0 |
)+
};
}
macro_rules! features {
($($feature:literal,)+) => {
&[
$(
#[cfg(target_feature = $feature)]
$feature,
)+
]
}
}
pub fn arch() -> &'static str {
value! {
target_arch,
"aarch64",
"arm",
"asmjs",
"avr",
"hexagon",
"le32",
"mips... | Rust | 0 |
#listas
listcpf=[]
listcnpj=[]
#classe pai
class Pessoa:
def __init__(self,nome,idade):
self.nome=nome
self.idade=idade
#classe filho cpf
class Pessoacpf(Pessoa):
def __init__(self, nome, idade,cpf):
super().__init__(nome, idade)
self.cpf=cpf
def __str__(self):
retu... | Python | 1 |
import os
import sys
from yaku.task_manager \
import \
extension, get_extension_hook
from yaku.task \
import \
task_factory
from yaku.compiled_fun \
import \
compile_fun
from yaku.utils \
import \
ensure_dir, find_program
import yaku.errors
@extension(".pyx")
def cython... | Python | 1 |
Speed::MTs(speed) => assert_eq!(speed, 2666),
MemorySpeed::Unknown => panic!("expected speed"),
MemorySpeed::SeeExtendedSpeed => panic!("expected speed"),
}
assert_eq!(test_struct.minimum_voltage(), Some(1200));
assert_eq!(test_struct.maximum_voltage(), Some(1200));
... | Rust | 0 |
x * r / z, y / z];
}
fn to_screen([x0, y0]: [f64; 2], w: f64, h: f64) -> [f64; 2] {
let half_w = w * 0.5;
let half_h = h * 0.5;
let x = x0 * half_w + half_w;
let y = y0 * half_h + half_h;
[x, y]
}
fn epic_rotate(p: [f64; 3], theta: f64) -> [f64; 3] {
let pq = Quaternion::from_v3(p);
let ro... | Rust | 0 |
# -*- coding: utf-8 -*-
# This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt)
# Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016
import numpy as np
import pandas as pd
import pytest
from tsfresh.feature_selection.selection import select_features
cl... | Python | 1 |
= 0.0, norm_layer=nn.InstanceNorm2d, num_experts=8,
noisy_gating=True, k=2, dim_reduction: float = 4, pregate: bool = False, **norm_kwargs):
super(MoEBottleNeckKAGNConv2DLayer, self).__init__(nn.Conv2d, conv2d, norm_layer,
input_dim, ou... | Python | 1 |
ec4::new(x as f32, y as f32, z as f32, w as f32))
}
declare_optional!(graphene::Vec4);
}
use iron::{Iron, IronResult, Listening, status};
use iron::error::HttpResult;
use iron::response::Response;
#[cfg(feature = "gzip")]
use iron::response::WriteBody;
use iron::request::Request;
use iron::middleware::Handler;... | Rust | 0 |
mplates, 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_use_modindex = False
# If false, no index is generated.
#html_use_index = True
... | Python | 1 |
"""Shows how to implement custom archetypes and components."""
from __future__ import annotations
import argparse
from typing import Any
import numpy as np
import numpy.typing as npt
import pyarrow as pa
import rerun as rr
class ConfidenceBatch(rr.ComponentBatchMixin):
"""A batch of confidence data."""
de... | Python | 1 |
Raises:
ValueError: If input dimensions do not match or if neither x and t nor xt are provided.
"""
if xt is not None:
if xt.shape[1] != self.dim + 1:
raise ValueError("Input dimension mismatch")
return xt
elif x is not None and t is not Non... | Python | 1 |
Vec::new();
if contains_extension(physical_device.extensions(), KhrPortabilitySubsetFn::name()) {
extension_names.push(KhrPortabilitySubsetFn::name());
}
let families = physical_device.queue_families();
let main_queue_family_index = match families
.iter()
... | Rust | 0 |
return;
}
NetlinkPayload::Error(_) | NetlinkPayload::Overrun(_) | _ => return,
}
offset += rx_packet.header.length as usize;
if offset == size || rx_packet.header.length == 0 {
offset = 0;
break;
}
}... | Rust | 0 |
yCode": "2",
"adminAreaCode": "山东;青岛;市北区",
"contactAddr": "",
"contactName": "",
"contactPhone": "",
"contactTel": "",
"creator": "李鸿宾",
"buyer": "李鸿宾",... | Python | 1 |
mits)
# pdp.fit(feat)
#
# # find the interaction index
# start = axis_limits[:, feat][0]
# stop = axis_limits[:, feat][1]
# x = np.linspace(start, stop, 21)
# x = 0.5 * (x[:-1] + x[1:])
# mu, std, stderr = pdp.eval(
# feature=feat, xs=x, uncertainty=Tr... | Python | 1 |
t}"
return user_prompt
def mix_evals_audio2text_process_results_freeform(doc, result):
pred = result[0]
ground_truth_str = doc["reference_answer"][0]
content = eval_prompt.format(model_response=pred, ground_truth=ground_truth_str)
eval_answer, model_name = get_eval(model_response=pred, ground_trut... | Python | 1 |
n = str(input('digite seu nome completo: ')).strip().split()
n1 = n[0]
nu = n[-1]
print(' o primeiro nome é {}.'.format(n1))
print(' o último nome é {}.'.format(nu))
#outro jeito
print('o último nome é {}.'.format(n[len(n)-1])) #len de nome mostra quantas posições tem o nome que já tá dividido em listas | Python | 1 |
gle_derivative,angle_sec_derivative,\
theta_r,theta_f0,theta_f1,\
M,m,mu,pho_air,A0,Cx,J,width,L,Wf,h,n_wheels):
#discretization lenght
deltatheta = 1/(M-1)
#midpoints discretization
discretization=np.linspace(deltatheta/2,1-deltatheta/2,num = M-1)
#Force matrix R t... | Python | 1 |
#########################################################################
## This file is part of the α,β-CROWN (alpha-beta-CROWN) verifier ##
## ##
## Copyright (C) 2021-2025 The α,β-CROWN Team ##
## Primary contacts: H... | Python | 1 |
rt" content="width=device-width, initial-scale=1">
<title>NetDash - داشبورد ترافیک شبکه</title>
<!-- 1) اول: config مربوط به Tailwind -->
<!-- Tailwind via CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: { extend: { fontFamily... | Python | 1 |
app. Does not return.
pub fn run(window: T) -> ! {
let app = Self {
phantom: PhantomData::default(),
};
Runtime::new(app).run(window.get_window_builder(), window)
}
}
<reponame>dgoodlad/crabdac
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x0... | Rust | 0 |
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.write_str(&self.scope.name)?;
f.write_char('/')?;
f.write_str(&self.stream.name)?;
Ok(())
}
}
impl Display for ScopedSegment {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.write_str(&NameUtils::get_qua... | Rust | 0 |
struct RecvParams {
msg_signature: String,
timestamp: u64,
nonce: u64,
}
async fn validate<T: App>(
info: web::Query<ValidateParams>,
server: web::Data<Server<T>>,
) -> HttpResponse {
info!("validate request: params: {:?}", info);
let crypto = &server.crypto;
let payload = match crypt... | Rust | 0 |
tln!("Master {} is running on port {}", pid, port);
task::block_on(async {
let mut app = tide::new();
app.with(After(|response: Response| async move {
let response = match response.status() {
StatusCode::NotFound => Response::builder(404).body("404 Not Found").build(),
... | Rust | 0 |
onst KECCAK_EMPTY: H256 = H256([
0xc5, 0xd2, 0x46, 0x01, 0x86, 0xf7, 0x23, 0x3c, 0x92, 0x7e, 0x7d, 0xb2, 0xdc, 0xc7, 0x03, 0xc0, 0xe5, 0x00, 0xb6,
0x53, 0xca, 0x82, 0x27, 0x3b, 0x7b, 0xfa, 0xd8, 0x04, 0x5d, 0x85, 0xa4, 0x70,
]);
/// The KECCAK of the RLP encoding of empty data.
pub const KECCAK_NULL_RLP: H256 = H256... | Rust | 0 |
"""A script for creating a S3 bucket."""
# Copyright (C) 2022-2025 Intel Corporation
# LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE
import logging
import os
import sys
import boto3
from botocore.exceptions import ClientError
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logger = logging.getLogger(__name_... | Python | 1 |
# USAGE
# python3.6 liveness_demo.py --model liveness.model --le le.pickle --detector face_detector
# import the necessary packages
from imutils.video import VideoStream
from keras.preprocessing.image import img_to_array
from keras.models import load_model
import numpy as np
import argparse
import imutils
import pickl... | Python | 1 |
ld fail
let deposit_amount = Uint256::from(DEPOSIT_AMOUNT);
let mut config = config::read(&deps.storage).unwrap();
config.deposit_config.total_cap = deposit_amount.div(Decimal256::from_str("2.0").unwrap());
config::store(&mut deps.storage, &config).unwrap();
let msg = ExecuteMsg::DepositInternal ... | Rust | 0 |
dictionary
EXCEPT, // throw exception
ALLOC, // allocate record
PUSHNIL, // push nil pointer
RESETC, // reset cell
PUSHPEG, // push pointer to external global
JUMPTBL, // jump table
CALLX, // call extension
SWAP, // swap two top stack elements
DROPN,... | Rust | 0 |
alid; qed")
.public()
}
/// The extensions for the [`ChainSpec`].
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
#[serde(deny_unknown_fields)]
pub struct Extensions {
/// The relay chain of the Parachain.
pub relay_chain: String,
/// The id of the Parachain.
pub pa... | Rust | 0 |
to-macros.html#some-more-gotchas
/// Assert that an expression returning a `Result` is a success. If it is,
/// return the value contained in the result, i.e. `expr.unwrap()`.
#[cfg(test)]
macro_rules! assert_success {
($e: expr) => {
{
let res = $e;
assert!(res.is_ok());
... | Rust | 0 |
# jobs/views.py
from django.views import View
from django.http import JsonResponse
from .models import Job
class JobList(View):
def get(self, request):
jobs = list(Job.objects.values()) # get all jobs as dicts
return JsonResponse(jobs, safe=False)
| Python | 1 |
if end_fraction > 0:
output_document.extend(
doc[int(end_fraction * num_words):])
print ("{0} {1}".format(query, " ".join(output_document)),
file=args.output_documents)
except Exception:
logger.e... | Python | 1 |
ing
* Contact: <EMAIL>
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InvasionAllOf {
#[serde(rename = "attacker", skip_serializing_if = "Option::is_none")]
pub attacker: Option<Box<serde_json::Value>>,
#[serde(rename =... | Rust | 0 |
pub fn other_branch(&mut self) -> &mut Block {
&mut self.other
}
/// formats the conditional
pub fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
write!(fmt, "if (")?;
self.cond.fmt(fmt)?;
writeln!(fmt, ") ")?;
fmt.block(|f| self.then.fmt(f))?;
if !sel... | Rust | 0 |
Chemical.XA1)
structural_class = Table4Dot3ConcreteStructuralClass(exposure_classes, 50, ConcreteMaterial(ConcreteStrengthClass("C20/25")), True, False)
c_min_dur = Table4Dot5nMinimumCoverDurabilityPrestressingSteel(
exposure_classes=exposure_classes,
structural_class=structura... | Python | 1 |
import numpy as np
from graph_rl.graph_rl.spaces import BoxSpace
from .box_subtask_spec_factory import BoxSubtaskSpecFactory
class UR5ReacherSubtaskSpecFactory(BoxSubtaskSpecFactory):
@classmethod
def bound_angle(cls, angle):
bounded_angle = np.absolute(angle) % (2*np.pi)
if angle < 0:
... | Python | 1 |
# Copyright 2025 Google LLC
#
# 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 applicable law or agreed to in writing, s... | Python | 1 |
)
def ReferenceTestingTask(agent, requirement):
return Task(
description="""Consider the Architecture Planning for the Flask Application.
Create a reference document that explains how to use the Flask application.
Here is the Technical ... | Python | 1 |
import streamlit as st
import pandas as pd
import matplotlib.pyplot as plt
# Page Configuration
st.set_page_config(page_title="Interactive Data Dashboard", layout="wide")
# Custom Styling
st.markdown(
"""
<style>
.main {
background-color: #f4f4f4;
}
h1 {
color: ... | Python | 1 |
begin());
let err = match result {
Ok((rest, t)) => {
if rest.eof() {
return Ok(t);
} else if rest == buf.begin() {
// parsed nothing
ParseError::new("failed to parse anything")
} else {
ParseError::new("fail... | Rust | 0 |