text string | label_name string | labels int64 |
|---|---|---|
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making ่้ฒธๆบไบPaaSๅนณๅฐ็คพๅบ็ (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in complia... | Python | 1 |
Debug)]
pub struct TP_WAIT {
dummy: *mut ::c_void,
}
pub type PTP_WAIT = *mut TP_WAIT;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct TP_WORK {
dummy: *mut ::c_void,
}
pub type PTP_WORK = *mut TP_WORK;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct ACTIVATION_CONTEXT {
dummy: *mut ::c_void,
}
#... | Rust | 0 |
"""
Write a function to find the volume of a cube given its side length.
assert volume_cube(3)==27
"""
def volume_cube(side_length):
"""
This function calculates the volume of a cube given its side length.
:param side_length: int or float, the side length of the cube
:return: int or float, the volume o... | Python | 1 |
# 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, software
# d... | Python | 1 |
_amt: usize){}
}
impl IoSeekTrait for Struct<'_>{
fn seek(&mut self, _: io::SeekFrom) -> io::Result<u64>{
Ok(0)
}
}
impl<'a> Trait<'a> for Struct<'a>{}
fn assert_bound<'a,T>(_:&T)
where
T:Trait<'a>
{}
fn test_constructible(){
use crate... | Rust | 0 |
version)
.ok_or_else(|| "Invalid version format".to_string())?;
Ok(Self {
major: v.get(1).unwrap().as_str().parse().unwrap(),
minor: v.get(2).unwrap().as_str().parse().unwrap(),
patch: v.get(3).unwrap().as_str().parse().unwrap(),
})
}
fn bump(&mut... | Rust | 0 |
"""Contains Versions class."""
from mitreattack.navlayers.core.exceptions import UNSETVALUE, BadInput, categoryChecker, typeChecker
defaults = dict(layer="4.5", navigator="5.0.0")
class Versions:
"""A Versions object."""
def __init__(self, layer=defaults["layer"], attack=UNSETVALUE, navigator=defaults["nav... | Python | 1 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\jaden\PycharmProjects\CSCI1620\Final\AutoGrader\ui\pyQT\success.ui'
#
# Created by: PyQt6 UI code generator 5.15.11
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file un... | Python | 1 |
Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use {
super::{AttributeHeader, Id},
crate::buffer_reader::BufferReader,
std::mem::size_of,
zerocopy::ByteSlice,
};
pub struct Reader<B>(Buff... | Rust | 0 |
import json
from django.shortcuts import render
from pathlib import Path
from datetime import datetime
def Home(request):
# Path to your JSON file within the static directory
json_file_path = Path('C:/Users/vinee/OneDrive/Desktop/Random-Quotes/random_quotes/quotes/static/data.json')
# Load JSON data ... | Python | 1 |
import reflex as rx
from Web_Practise.components.link_button import link_button
from Web_Practise.components.title import title
from Web_Practise.views import constants as cs
def links() -> rx.Component:
return rx.center(
rx.vstack(
# Primer VStack con los botones de redes sociales
... | Python | 1 |
tch PositionHandler::new_look_at_handler(
&details.address_offsets,
&details.arch,
&base_addr,
&handle,
) {
Some(h) => handlers.push(Box::new(h)),
None => {},
}
let (tx, rx) = mpsc::channel();
let hook = Hook::new().unwrap();
let key_groups = config
... | Rust | 0 |
graphics::prelude::*;
use crate::system::notification::Notification;
use crate::application::render_util::{DISPLAY_WIDTH, DISPLAY_HEIGHT};
const CHAR_WIDTH: i32 = 6;
const CHAR_HEIGHT: i32 = 12;
const LINE_WIDTH: i32 = DISPLAY_WIDTH / CHAR_WIDTH;
#[derive(Debug, Copy, Clone, PartialEq)]
/// The internal state of t... | Rust | 0 |
frag_len: u16 )
-> IResult<&[u8], DceRpcResponseRecord>
{
if frag_len < 24 {
return IResult::Error(error_code!(ErrorKind::Custom(128)));
}
do_parse!(i,
take!(8)
>> data:take!(frag_len - 24)
>> (DceRpcResponseRecord {
data:data,
... | Rust | 0 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 1 |
d_chunks': set()
}
# ๆถ้ๅ
ณ็ณปไฟกๆฏ
for u, v, data in mst.edges(data=True):
relation = data.get('relation', 'related_to')
context_info['relationships'].append({
'head': u,
'relation': relation,
'tail... | Python | 1 |
r'"(.*?)"',
]
for pattern in patterns:
scenario_code_string = re.search(pattern, reply_scenario, re.DOTALL)
if scenario_code_string is not None:
return scenario_code_string.group(1).strip()
... | Python | 1 |
[(char, char)] = &[
('\U00010450', '\U0001047f')
];
pub static Siddham_table: &'static [(char, char)] = &[
('\U00011580', '\U000115ae'), ('\U000115af', '\U000115b1'), ('\U000115b2', '\U000115b5'),
('\U000115b8', '\U000115bb'), ('\U000115bc', '\U000115bd'), ('\U000115be', '\U000115be'),... | Rust | 0 |
f`
pub fn abs<T>(f: T) -> T where T: Float{
f.abs()
}
/// # Acos
///
/// Returns the arc-cosine of `f` - the angle in radians whose cosine is `f`.
pub fn acos<T>(f: T) -> T where T: Float{
f.acos()
}
// Compares two floating point values if they are similar.
pub fn ... | Rust | 0 |
pk = root
.derive("m/44'/0'/0'")
.unwrap()
.deterministic_public_key();
assert_eq!(dpk.to_string(), "<KEY>");
let dsk = root.derive("m/44'/0'/0'").unwrap();
assert_eq!(dsk.to_string(), "<KEY>");
}
#[test]
fn from_xpub() {
let xpub = Bip... | Rust | 0 |
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | Python | 1 |
te: &String| -> usize {get_8_queens_fitness(&candidate, gene_set)};
let best = genetic::get_best(wrapped_get_fitness, wrapped_display, 8, 8*8*8*8, gene_set);
println!("Total time: {}", start.to(PreciseTime::now()));
assert_eq!(best.fitness, 8*8*8*8);
}
fn display_8_queens(candi... | Rust | 0 |
///
/// ```
/// use skiplist::SkipList;
/// use std::ops::Bound::{Included, Unbounded};
///
/// let mut skiplist = SkipList::new();
/// skiplist.extend(0..10);
/// for i in skiplist.range_mut(Included(3), Included(7)) {
/// println!("Value: {}", i);
/// }
/// assert_eq!(S... | Rust | 0 |
import os
os.system('cls')
print('-' * 90)
print('ESTUDO DE CONDICIONAIS 1.2')
print('=' * 90)
# declaracoes
x = 10
y = 30
resposta = ''
print()
print('CONDICIONAIS SIMPLES')
print('=' * 90)
# condicionais
if y > x:
resposta = f'{y} รฉ maior que {x}'
else:
resposta = f'{y} รฉ menor que {x}'
print(resposta)
... | Python | 1 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Title : Linux Pwn Exploit
# Author: Axura (@4xura) - https://4xura.com
#
# Description:
# ------------
# A Python exp for Linux binex interaction
#
# Usage:
# ------
# - Local mode : ./xpl.py
# - Remote mode : ./xpl.py [ <IP> <PORT> | <IP:PORT> ]
#
from pwnkit import... | Python | 1 |
ur_frame = 0
while cur_frame < frame_count:
_, frame = base_vcap.read()
im = frame.astype("float32")
other_frames = {videoname: vcap.read()[1]
for videoname, vcap in vcaps}
# overlay all other future box img of the x agent
if cur_frame >= frame_start:
# g... | Python | 1 |
n<Meter>,
/// Age of differential corrections
pub diff_age: Option<Second>,
/// ID of station providing differential corrections
pub diff_station: Option<u8>,
}
pub fn parse_gga(input: &str) -> IResult<&str, GGAMessage> {
let (
remaining,
(time, lat, ns, lon, ew, quality, num_sv, hd... | Rust | 0 |
# neighbour temps
for node in Nodes:
node.WriteTemps([n() for n in Nodes])
# update temps
for idx, node in enumerate(Nodes):
S = 1367 / (r_fcn(theta(t)) / astunit) ** 2
node.TemperatureChange(
timestep,
cp=node.cp,
... | Python | 1 |
_indices();
let graphics = queue_families_indices.graphics_index;
let present = queue_families_indices.present_index;
let families_indices = [graphics, present];
let create_info = {
let mut builder = vk::SwapchainCreateInfoKHR::builder()
.surface(context.surf... | Rust | 0 |
of account IDs affected by this operation.
pub fn get_updated_account_ids(&self) -> Vec<AccountId> {
match self {
ZkDposOp::Noop(op) => op.get_updated_account_ids(),
ZkDposOp::Deposit(op) => op.get_updated_account_ids(),
ZkDposOp::TransferToNew(op) => op.get_updated_accou... | Rust | 0 |
from pandas.core.arrays.sparse.accessor import (
SparseAccessor,
SparseFrameAccessor,
)
from pandas.core.arrays.sparse.array import (
BlockIndex,
IntIndex,
SparseArray,
make_sparse_index,
)
__all__ = [
"BlockIndex",
"IntIndex",
"make_sparse_index",
"SparseAccessor",
"SparseA... | Python | 1 |
from django.contrib.auth.base_user import BaseUserManager
from django.utils.translation import gettext_lazy as _
class UserManager(BaseUserManager):
def create_user(self, phone, password, **extra_fields):
if not phone:
raise ValueError(_('The phone number must be set'))
phone = phone
... | Python | 1 |
from flashrag.dataset.dataset import *
| Python | 1 |
st_imgs"
# if os.path.isdir(tmp_dir):
# delete_dir(tmp_dir)
# tmp_dir = create_dir(images_dir, 30, tmp_dir)
output_list = batch_processing(tmp_dir, 1) # Always use 1 for 7B model due to context limits
json_1 = "./retrieve_images/json_output/reason_before_fixing2.jsonl"
json_2 = "./retrieve_i... | Python | 1 |
(&self, fmt: &mut Formatter) -> fmt::Result {
write!(
fmt,
"Type {} requires {}-byte alignment: address ",
any::type_name::<T>(),
Self::ALIGN,
)?;
Pointer::fmt(&self.ptr, fmt)?;
write!(fmt, " must clear its least {} bits", Self::CTTZ)
}
}
unsafe impl<T> Send for MisalignError<T> {}
unsafe impl<T>... | Rust | 0 |
elf.env_buffers[env_id]
buf.append(experience_env) # We use tensor[env_id:env_id+1] to select the one elem corresponding
# fenรชtre pleine : pousse une transition n-step
if len(buf) == self.multi_step:
indices.append(
super().store(**self._aggrega... | Python | 1 |
![feature(type_alias_impl_trait)]
use defmt_rtt as _; // global logger
use panic_probe as _;
use embassy_lora::{sx127x::*, LoraTimer};
use embassy_stm32::{
exti::ExtiInput,
gpio::{Input, Level, Output, Pull, Speed},
rng::Rng,
spi,
time::U32Ext,
Peripherals,
};
use lorawan::default_crypto::Defa... | Rust | 0 |
)
# #stats test
# # popt, pcov = curve_fit(exp_func, x, y_hours)
# # a, b = popt
# # y_pred = exp_func(x, *popt)
# # ss_res = np.sum((y_hours - y_pred) ** 2)
# # ss_tot = np.sum((y_hours - np.mean(y_hours)) ** 2)
# # r_squared = 1 - (ss_res / ss_tot)
# # print(f"Fitte... | Python | 1 |
import hashlib, binascii
text = 'Hello, this is a hash.'
data = text.encode("utf8")
ripemd160 = hashlib.new('ripemd160', data).digest()
print("RIPEMD-160:", binascii.hexlify(ripemd160))
| Python | 1 |
# Copyright 2025 Ant Group Co., Ltd.
#
# 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 wri... | Python | 1 |
import os
import cv2
import numpy as np
import paddlehub as hub
__all__ = ['Processor']
class Processor():
def __init__(self, paths, images, batch_size, face_detection=True, scale=1):
# ๅพๅๅ่กจ
self.imgs = self.load_datas(paths, images)
# ่พๅ
ฅๆฐๆฎ
self.input_datas = self.preprocess(self... | Python | 1 |
b.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py
"""
from .express import histogram
skip = ["column", "by", "grid", "xlabelsize", "xrot", "ylabelsize", "yrot"]
skip += ["ax", "sharex", "sharey", "figsize", "layout", "bins", "legend"]
new_kwargs = {k: kwargs[k] for k in kwargs if k no... | Python | 1 |
let weighted_pp = score.pp.unwrap_or(0.0) * factor;
factor *= 0.95;
mapper.0 += 1;
mapper.1 += weighted_pp;
{
let mut mod_comb = mod_combs.entry(score.enabled_mods).or_insert((0, 0.0));
mod_comb.0 += 1;
mod_comb.1 += weighte... | Rust | 0 |
rhs)
}
}
impl std::ops::DivAssign<f64> for VectorN {
fn div_assign(&mut self, rhs: f64) {
*self = self.clone() / rhs;
}
}
impl std::ops::Neg for VectorN {
type Output = VectorN;
fn neg(self) -> VectorN {
self * -1.0
}
}
impl From<Vector> for VectorN {
fn from(vec: Vector) ->... | Rust | 0 |
def parse_remote_url(path):
match = re.match(storage_url_re, path)
if not match:
raise ValueError(f'Could not parse path `{path}`')
return match.groupdict()
| Python | 1 |
35_u32), Ok(65535_u16));
/// assert_eq!(u32_to_u16_res(65536_u32), Err(InvalidNumber(String::from("65536"))));
/// ```
pub fn u32_to_u16_res(a: u32)
-> ParseResultU16 {
let max = u16::max_value() as u32;
if a > max {
Err(ParseError::InvalidNumber(a.to_string()))
} else { Ok(a as u16) }
}
/// ... | Rust | 0 |
"""
The below code comes from the "leviathan" project by jaksi
https://github.com/jaksi/leviathan
"""
import usb.core
import helper
class Cooler:
COLOR_MODE_NORMAL = 1
COLOR_MODE_ALTERNATING = 2
COLOR_MODE_BLINKING = 3
COLOR_MODE_OFF = 4
COLOR_MODES = [COLOR_MODE_NORMAL, COLOR_MODE_ALTERN... | Python | 1 |
๏ผๅฆ็กฎๆ้่ฆ๏ผ่ฏทๅฎๆๅฎไธปไผ ไฝๅๅฆ่กๅฐ่ฏใ"
if XiuConfig().img:
msg = await pic_msg_format(msg, event)
pic = await get_msg_pic(msg)
await sect_out.finish(MessageSegment.image(pic))
else:
await sect_out.finish(msg, at_sender=True)
@sect_donate.handle()
async def _(bot: Bot,even... | Python | 1 |
d set and get.
pub trait ReducedParityFlagData {
/// Get the parity flag.
fn get_parity(&self) -> bool;
/// Set the parity flag.
fn set_parity(&mut self, val: bool);
}
impl<T> ParityFlagData for T
where T: ReducedParityFlagData
{
fn get_parity_u4(&self) -> bool { self.get_parity() }
fn ge... | Rust | 0 |
ValueExpr {
pub fn factory_null() -> Self {
Self::Constant(SqlValue::Null)
}
pub fn factory_colref(stream_name: &str, column_name: &str) -> Self {
let colref = ColumnReference::factory(stream_name, column_name);
Self::ColumnReference(colref)
}
pub fn factory_integer(intege... | Rust | 0 |
6 => vec![3, 5],
5 => vec![2, 4],
4 => vec![1, 3],
3 => vec![0, 2],
2 => vec![1, 6, 8],
1 => vec![0, 5, 7],
0 => vec![4, 6, 6, 8],
n => panic!("Fish with invalid number: {}", n),
}
}
/// Look-up table manua... | Rust | 0 |
mut std::fmt::Formatter<'_>) -> std::fmt::Result {
use self::Period::*;
let s = match *self {
Day => "d",
Week => "w",
Month => "m",
Year => "y",
};
f.write_str(s)?;
Ok(())
}
}
impl std::ops::Add<chrono::NaiveDate> for Perio... | Rust | 0 |
sion 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, software
// distributed under the License is distributed on an "A... | Rust | 0 |
gger = message[trigger_pos + len(trigger):].strip()
# Split into command and args
parts = after_trigger.split(maxsplit=1)
command = parts[0].lower() # Convert to lowercase
if len(parts) > 1:
args = parts[1]
else:
args = ""
return {
'command': command,
... | Python | 1 |
5 f = f)$Execute program (MS Windows version)"pass_fds not supported on Windows.$bytes args is not allowed on Windows0path-like args is not allowed when shell is trueNr r ?startupinfo.lpAttributeList['handle_list'] overriding close_fdsFComSpec
SystemRootrK System32cmd.exe:shell not found: neither ... | Python | 1 |
import re
from slither.formatters.exceptions import FormatImpossible
from slither.formatters.utils.patches import create_patch
# Indicates the recommended versions for replacement
REPLACEMENT_VERSIONS = ["^0.4.25", "^0.5.3"]
# group:
# 0: ^ > >= < <= (optional)
# 1: ' ' (optional)
# 2: version number
# 3: version nu... | Python | 1 |
match self.head.try_update_indirect(|head| {
let tail = self.tail.load(Ordering::Acquire);
// If not empty
if head % size2 != tail % size2 {
// Try updating cell at head position
Ok(&self.ring[head % size])
... | Rust | 0 |
# Copyright 2018 Alibaba Group. 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 applicable law o... | Python | 1 |
ut self, state: &mut save_state::SaveStateDeserializer) {
#(#deser_expr;)*
}
}
)
.into()
}
Err(err) => err.to_compile_error().into(),
}
}
#[proc_macro_derive(DefaultByNew)]
pub fn derive_default_by_new(input_struct:... | Rust | 0 |
code[2] as u32;
let weight = (1024 / (cur - prev) + 1024 / (next - cur)) << 16;
let i = (weight as usize).ilog();
let f = (weight >> (i - 8)) & 127;
let y = (if i & 1 != 0 { 32768 } else { 46214 }) >> ((32 - i) >> 1);
y + ((213 * f * y) >> 16)
}).col... | Rust | 0 |
_button_state = 1;
pub const LIBINPUT_BUTTON_STATE_RELEASED: libinput_button_state = 0;
pub type libinput_tablet_tool_type = libc::c_uint;
pub const LIBINPUT_TABLET_TOOL_TYPE_TOTEM: libinput_tablet_tool_type = 8;
pub const LIBINPUT_TABLET_TOOL_TYPE_LENS: libinput_tablet_tool_type = 7;
pub const LIBINPUT_TABLET_TOOL_TYP... | Rust | 0 |
Like `Handle`, but never `None`.
#[derive(Clone)]
struct HandlePriv {
inner: Weak<Inner>,
}
/// Return value from the `turn` method on `Reactor`.
///
/// Currently this value doesn't actually provide any functionality, but it may
/// in the future give insight into what happened during `turn`.
#[derive(Debug)]
pu... | Rust | 0 |
LSL = 0,
LSR = 1,
ASR = 2,
ROR = 3,
}
#[derive(Debug, PartialEq)]
pub enum ShiftedRegister {
ByAmount(u32, BarrelShiftOpCode),
ByRegister(usize, BarrelShiftOpCode),
}
impl From<u32> for ShiftedRegister {
fn from(v: u32) -> ShiftedRegister {
let typ = BarrelShiftOpCode::from_u8(v.bit_ra... | Rust | 0 |
import pyttsx3
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from time import sleep
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
def Speak_Os(Text):
Assistant = pyttsx3.init(... | Python | 1 |
()
.find(|c| c.id == dest_chain_id.parse().unwrap())
.ok_or_else(|| "missing destination chain configuration".to_string())?;
let src_chain_id = self
.src_chain_id
.clone()
.ok_or_else(|| "missing source chain identifier".to_string())?;
let sr... | Rust | 0 |
"""
Given a list paths of directory info, including the directory path, and all the files with contents in this directory, return all the duplicate files in the file system in terms of their paths. You may return the answer in any order.
A group of duplicate files consists of at least two files that have the same cont... | Python | 1 |
or_equal_predicate_func,
equal_string_predicate_func,
],
reader,
)
}
fn equal_number_predicate_func(reader: &mut Reader) -> ParseResult<PredicateFunc> {
try_literal("==", reader)?;
whitespace(reader);
let num = number(reader)?;
Ok(PredicateFunc::Equal(num))
}
fn greater... | Rust | 0 |
w_uvcoords.squeeze().cpu().numpy()
uvfaces = self.render.uvfaces.squeeze().cpu().numpy()
if Tpose:
vertices = opdict['Tpose_vertices'][k].cpu().numpy()
else:
vertices = opdict['vertices'][k].cpu().numpy()
# vertices = opdict['out_vertices'][k].cpu().numpy()
... | Python | 1 |
drop(&mut self) {
let _ = unsafe { libc::close(self.fd) };
}
}
impl AsRawFd for OwnedFd {
#[inline]
fn as_raw_fd(&self) -> RawFd {
self.fd
}
}
impl FromRawFd for OwnedFd {
#[inline]
unsafe fn from_raw_fd(fd: RawFd) -> Self {
Self { fd }
}
}
pub(crate) fn syscall2r... | Rust | 0 |
import argparse
import json
import pathlib
from tqdm import tqdm
import os
import math
# Prompt from stanford alpaca's training script
PROMPT_DICT = {
"prompt_input": (
"Below is an instruction that describes a task, paired with an input that provides further context. "
"Write a response that appro... | Python | 1 |
from .html_image_generator import HTMLImageGenerator
__all__ = ["HTMLImageGenerator"] | Python | 1 |
tup['qt-support'] = 'auto'
elif argv[i].startswith('--qt-support='):
qt_support = argv[i][len('--qt-support='):]
valid_modes = ('none', 'auto', 'pyqt5', 'pyqt4', 'pyside', 'pyside2')
if qt_support not in valid_modes:
raise ValueError("qt-s... | Python | 1 |
from django.apps import AppConfig
class EnvironmentalAnalysisConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'environmental_analysis'
| Python | 1 |
IS1NR::HIGH
}
}
#[doc = "Possible values of the field `OIS1`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OIS1R {
#[doc = "OC1=0 (after a dead-time if OC1N is implemented) when MOE=0"]
LOW,
#[doc = "OC1=1 (after a dead-time if OC1N is implemented) when MOE=0"]
HIGH,
}
impl OIS1R {
#[doc =... | Rust | 0 |
Notification| { &m.interfaces_created },
|m: &mut CClientMetrics_AppInterfaceStats_Notification| { &mut m.interfaces_created },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CClientMetrics_AppInterfaceMetho... | Rust | 0 |
else result["finetuned_model_response"]
)
table_data.append(
[
idx + 1,
prompt_display,
base_response,
ft_response,
result["base_model_length"],
result["finet... | Python | 1 |
"""
run.py
Simple entrypoint for running the Cloud Transformation Review pipeline.
"""
import sys
import json
import logging
from src.crew.orchestrator import ReviewOrchestrator
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s")
def main():
if len(sys.argv) < 3:
pr... | Python | 1 |
late(Re_w,Mc,Tc,xtl)
# correction for airfoils
cos_sweep = np.cos(sweep_w)
cos2 = cos_sweep*cos_sweep
ind = Mc <= 1.
k_w = np.ones_like(Mc)
k_w[ind] = 1. + ( 2.* C * (t_c_w * cos2) ) / ( np.sqrt(1.- Mc[ind]*Mc[ind] * cos2) ) \
+ ( C*C * cos2 * t_c_w*t_c_w * (1. ... | Python | 1 |
/// Configure initial storage state for FRAME modules.
fn gaki_testnet_genesis(
wasm_binary: &[u8],
initial_authorities: Vec<(AuraId, GrandpaId)>,
root_key: AccountId,
endowed_accounts: Vec<AccountId>,
_enable_println: bool,
) -> GenesisConfig {
// Pool config
const MAX_PLAYER: u32 = 1000;
let upfront_service... | Rust | 0 |
import numpy as np
import pandas as pd
import pandas._testing as tm
from pandas.tests.extension.array_with_attr import FloatAttrArray
def test_concat_with_all_na():
# https://github.com/pandas-dev/pandas/pull/47762
# ensure that attribute of the column array is preserved (when it gets
# preserved in rein... | Python | 1 |
kwargs
def _score_flattened(
self,
context_features: TensorDict,
example_features: TensorDict,
) -> tf.Tensor:
"""See `UnivariateScorer`."""
context_input_layer = [
tf.keras.layers.Flatten()(context_features[name])
for name in sorted(context_features)
]
example_inp... | Python | 1 |
v(include_str!("ascon128av12-KATs/AEAD_KAT-19.txt")));
}
#[test]
fn ascon128av12_tv_20() {
run_tv::<Parameters128a>(parse_tv(include_str!("ascon128av12-KATs/AEAD_KAT-20.txt")));
}
#[test]
fn ascon128av12_tv_21() {
run_tv::<Parameters128a>(parse_tv(include_str!("ascon128av12-KATs/AEAD_KAT-21.txt")));
}
#[test... | Rust | 0 |
file.write(&[10u8])?; // new line
self.init_age_millis = time_now;
self.cur_size = self.file_header.len() as u64 + 1;
}
// if we're showing the timestamp, print it
if self.show_timestamp {
let date = Local::now();
let formatted_ts = date.format("%Y-%m-%d %H:%M:%S");
self.file
.write(format!("[... | Rust | 0 |
import equinox as eqx
import jax.numpy as jnp
from jaxtyping import Array, Complex, Float
from ._spectral import (
build_derivative_operator,
build_laplace_operator,
fft,
ifft,
spatial_shape,
)
class Poisson(eqx.Module):
num_spatial_dims: int
domain_extent: float
num_points: int
d... | Python | 1 |
""
# Check file size
if document.file_size > self.settings.max_file_size:
raise DocumentError(
error_type="file_too_large",
message=f"File size {document.file_size} exceeds maximum {self.settings.max_file_size}",
)
# Check file ext... | Python | 1 |
orrect_recall_num / correct_pred_num
correct_recall = 0 if correct_recall_num == 0 else correct_recall_num / correct_ref_num
correct_f1 = f1(correct_precision, correct_recall)
return correct_precision, correct_recall, correct_f1
def ctc_comp_f1_token_level(src_texts, pred_texts, trg_texts):
"ๅญ็บงๅซ๏ผ่ดๆ ทๆฌ ... | Python | 1 |
::c_long,
_argp: *mut std::ffi::c_void,
) -> std::os::raw::c_int {
crate::ex_data::dup::<openssl_sys::RSA, crate::ex_data::KeyExData>(from_d, idx);
1
}
#[no_mangle]
#[allow(clippy::similar_names)]
unsafe extern "C" fn aziot_key_freef_rsa_ex_data(
_parent: *mut std::ffi::c_void,
ptr: *mut std::ffi::... | Rust | 0 |
;
if float <= as_cast(1e-5) || float >= as_cast(1e9) {
ftoa_exponent(
radix,
exponent_base,
exponent_radix,
bits_per_digit,
bytes,
format,
mantissa,
exp,
sci_exp,
)
} else {
// Don... | Rust | 0 |
#
# SPDX-License-Identifier: MIT
#
# Copyright (c) 2025 Carsten Igel.
#
# This file is part of simplepycons
# (see https://github.com/carstencodes/simplepycons).
#
# This file is published using the MIT license.
# Refer to LICENSE for more information
#
""""""
# pylint: disable=C0302
# Justification: Code is generated
... | Python | 1 |
from datetime import timedelta
from flask_jwt_extended import create_access_token
def generate_jwt_token(user, claims=None, exires_in_hours=1):
token_claims = {
'username' : user.username
}
# voir si j'ai d'autre claims ajoutรฉ lors de l'appel de la mรฉthode
if claims:
token_claims.update(cl... | Python | 1 |
get_env_var("ALLOWED_FILE_EXTENSIONS", ".py,.txt,.json,.csv,.md,.html").split(",")
MAX_FILE_SIZE_MB = int(get_env_var("MAX_FILE_SIZE_MB", "10"))
# Token settings
MAX_OUTPUT_TOKENS = int(get_env_var("MAX_OUTPUT_TOKENS", "64000"))
# Logging Settings
LOG_LEVEL = get_env_var("LOG_LEVEL", "INFO")
LOG_TO_FILE = get_env_var... | Python | 1 |
MatchSet {
type Output = std::result::Result<
crate::output::DeleteSqlInjectionMatchSetOutput,
crate::error::DeleteSqlInjectionMatchSetError,
>;
fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
if !response.status().is_success() && response.status().as_u16()... | Rust | 0 |
OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
... | Rust | 0 |
}
}
impl Clone for UniformValue {
fn clone(&self) -> UniformValue {
match *self {
UniformValue::I32(val) => UniformValue::I32(val),
UniformValue::F32(val) => UniformValue::F32(val),
UniformValue::I32Vector2(v) => UniformValue::I32Vector2(v),
U... | Rust | 0 |
32,
/// Resistencia tรฉrmica del aislamiento perimetral horizontal o vertical de la solera [m2K/W]
pub rn_perim_insulation: f32,
}
impl Default for Meta {
fn default() -> Self {
Meta {
name: "Nombre del proyecto".to_string(),
is_new_building: true,
is_dwelling: tr... | Rust | 0 |
def f1():
print("This is function 1")
def f2():
print("This is function 2")
name = "hardik" | Python | 1 |
ld(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
migrations.AlterField(
model_name='participationpreapproval',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
... | Python | 1 |
_response.and_then(|analysis_job_response| {
let analysis_id = analysis_job_response.analysis_id;
client.set_analysis_name(project_id, analysis_id, name)
.map(|_| {
println!("# Set analysis {}'s name to \"{}\"", analysis_id, name);
... | Rust | 0 |
from astrbot.api.event import filter, AstrMessageEvent, MessageEventResult
from astrbot.api.star import Context, Star, register, StarTools
from astrbot.api.message_components import *
from astrbot.api.event.filter import command, command_group
from astrbot.api import logger, AstrBotConfig
import os
from pathlib import ... | Python | 1 |
= self.relu(out)
return out
in_tensor = torch.randn((1, 3, 224, 224), device="cuda", dtype=torch.bfloat16)
mod = MyModule().to(torch.device("cuda")).to(torch.bfloat16)
exp_mod = torch.export.export(mod, (in_tensor,))
trt_mod = torch_tensorrt.dynamo.compile(
... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.