text string | label_name string | labels int64 |
|---|---|---|
ိသော', 'nb': 'språk uten skrift', 'ne': 'नलेखिएको', 'nl': 'ongeschreven', 'nn': 'språk utan skrift', 'no': 'språk uten skrift', 'nqo': 'ߛߓߍߓߊߟߌ', 'or': 'ଅଲିଖିତ', 'os': 'Нӕфысгӕ', 'pa': 'ਅਲਿਖਤ', 'pa-Guru': 'ਅਲਿਖਤ', 'pcm': 'Wétín Dẹm Nó Rait', 'pl': 'język bez systemu pisma', 'ps': 'ناليکلی', 'pt': 'ágrafo', 'qu': 'Mana ... | Python | 1 |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.10 (default, Feb 6 2017, 23:53:20)
# [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
# Embedded file name: audit.py
ERR_AUDIT_SUCCESS = 0
ERR_AUDIT_DISABLE_FAILED = 1
ERR_AUDIT_ENABLE_FAILED = 2
ERR_AUDIT_UNKNOWN_TYPE = 3... | Python | 1 |
self.next = cast_pointer(val['Next'])
self.sentinel = sentinel
def children(self):
if self.sentinel:
yield 'sentinel', 'yes'
yield 'prev', self.prev
yield 'next', self.next
class IlistPrinter:
"""Print an llvm::simple_ilist or llvm::iplist object."""
def __init__(self, val):
self.nod... | Python | 1 |
<usize, Token<'input>, ParserError>>,
validator: &'v mut VariableValidator<'input>,
(_, _, _): (usize, Token<'input>, usize),
(_, _, _): (usize, Token<'input>, usize),
(_, l, _): (usize, Box<Instruction<'input>>, usize),
(_, r, _): (usize, Box<Instruction<'input>>, usize),
(_, _, _): (usize, Tok... | Rust | 0 |
nvmlEccCounterType_enum_NVML_VOLATILE_ECC: nvmlEccCounterType_enum = 0;
#[doc = "!< Aggregate counts persist across reboots (i.e. for the lifetime of the device)"]
pub const nvmlEccCounterType_enum_NVML_AGGREGATE_ECC: nvmlEccCounterType_enum = 1;
#[doc = "!< Count of memory counter types"]
pub const nvmlEccCounterType_... | Rust | 0 |
from typing import Optional
from ..autograd import NDArray
from ..autograd import Op, Tensor, Value, TensorOp
from ..autograd import TensorTuple, TensorTupleOp
from .ops_mathematic import *
from ..backend_selection import array_api, BACKEND
class LogSoftmax(TensorOp):
def compute(self, Z):
### BEGIN YOU... | Python | 1 |
_fitted_pipeline/")
print("Loading fitted pipeline from disk")
loaded_fitted_pipeline = KamaeSparkPipelineModel.load(
"./output/test_fitted_pipeline/"
)
print("Building keras model from fit pipeline")
# Create input schema for keras model. A list of tf.TypeSpec objects.
tf_input_schema... | Python | 1 |
BAR_STYLE: &str = "[{elapsed_precise}] {spinner} {bar:50.cyan/blue} {pos:>7}/{len:7} {msg}";
// Trait that must be implemented by all subcommands
pub trait CommandTrait: Sync {
fn evaluate(&self, args: &ArgMatches) -> Result<()>;
}
// All sub-commands are defined in the below modules
pub mod keypair;
pub mod list;
p... | Rust | 0 |
{i: min_weight for i in range(num_assets)},
}
# 生成數據
expected_returns, cov_matrix, asset_names = self._generate_asset_data(
num_assets
)
if st.button("🔄 執行優化"):
# 執行優化
result = self.analytics.optimize_portfolio(
expected_ret... | Python | 1 |
32(),
self.filled as i32,
)
.ensure_zero()
}
}
}
#[derive(Debug, Clone, Copy, SmartDefault)]
pub struct Sphere3D {
pub pos: Vector3<f32>,
#[default = 1.0]
pub radius: f32,
#[default = 32]
pub resolution: u32,
#[default(_code = "Color::red()")]... | Rust | 0 |
tp_version = (2, 6, 1)
# progress report
requesting = "Requesting torrent info:"
done = 'Done'
fail = 'Fail'
no_torfolder = 'Torrent has no folder'
uploading = 'Uploading to'
upl_success = 'Upload successful:'
upl_fail = 'Upload failed:'
bad_bitr = 'bitrate too low for RED'
split_warn = 'Split -> Unknown. Please edit o... | Python | 1 |
import re
if __name__ == "__main__":
with open("input.txt", "r") as input_file:
program = input_file.read()
matches = re.finditer('mul\((\d+),(\d+)\)', program)
result = 0
for match in matches:
val1, val2 = match.groups()
result += int(val1) * int(val2)
print(f"Part 1: {... | Python | 1 |
t: *const HrtfApoInit, xapo: *mut IXAPO) -> ::windows_sys::core::HRESULT;
#[doc = "*Required features: `\"Win32_Media_Audio_XAudio2\"`*"]
pub fn XAudio2CreateWithVersionInfo(ppxaudio2: *mut IXAudio2, flags: u32, xaudio2processor: u32, ntddiversion: u32) -> ::windows_sys::core::HRESULT;
}
pub const AudioReverb: ... | Rust | 0 |
c();
///
/// // repair
/// raid7::repair(&mut datas, &mut parity1, &mut parity2, &mut parity3, &[1, 2, 3]);
/// assert_eq!(&data, b"Hello World!");
/// ```
///
pub fn repair<B: AsMut<[__u]>>(
blocks: &mut [B],
#[cfg(__if(__parity >= 1))] p: &mut [__u],
#[cfg(__if(__parity >= 2))] q: &mut [__u],
#[cfg(__... | Rust | 0 |
}
}
struct TestS;
#[async_trait]
impl Component for TestS {
type Output = ();
async fn handle(&self) -> Self::Output {
()
}
}
impl From<TestE> for TestS {
fn from(_: TestE) -> Self {
TestS
}
}
impl From<TestS> for TestE ... | Rust | 0 |
count, &self.operator, &self.count);
Ok(result)
}
}
impl serde::Serialize for EmployeesCount {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(format!("{} {}", self.operator.to_string(), self.count,).as_str(... | Rust | 0 |
to determine if a value indicates that it
/// represents a control key modifier
trait ControlModifier {
/// Returns true if self should be represented as a control only modifier.
fn is_control_only(&self) -> bool;
}
impl ControlModifier for u32 {
fn is_control_only(&self) -> bool {
self & input::M... | Rust | 0 |
cfg_file = File::open(cfg_pos)?;
let mut config = String::new();
cfg_file.read_to_string(&mut config)?;
let mut cfg = toml::from_str::<Config>(&config)?;
fill_missing_val!(
cfg,
default_cfg,
overlay_background,
theme,
lib_pos,
... | Rust | 0 |
perror(L: *mut lua_State, narg: libc::c_int, tname: *const libc::c_char) -> !;
pub fn luaL_unref(L: *mut lua_State, t: libc::c_int, ref_: libc::c_int);
pub fn luaL_where(L: *mut lua_State, lvl: libc::c_int);
}
// //////////////////////////////////////////// //
// Macros (represented as inline functions) /... | Rust | 0 |
#!/usr/bin/env python3
"""
Script to add red highlights and arrows to radio buttons in Okta setup images
"""
from PIL import Image, ImageDraw, ImageFont
import os
def add_radio_button_highlights(image_path, output_path, radio_positions):
"""
Add red highlights to radio button positions
"""
# Open the ... | Python | 1 |
oche, BurroSkin::Mexico),
(BurroSkin::Morir, BurroSkin::Medianoche),
(BurroSkin::Gators, BurroSkin::Morir),
(BurroSkin::Aguas, BurroSkin::Gators),
(BurroSkin::Pinata, BurroSkin::Aguas),
]);
let mut attempt_to_start_game = false;
let mut player_hasnt_picked = false;
for ... | Rust | 0 |
Sock`s, an
/// `IpSockUpdate` is emitted, and clients are responsible for applying this
/// update to all `IpSock`s that they are responsible for.
pub struct IpSockUpdate<I: IpExt> {
// Currently, `IpSockUpdate`s only represent a single type of update: that
// the forwarding table or assignment of IP addresses ... | Rust | 0 |
urveyor: SPSend, SPRecv <> Respondent;
/// Respondent socket
///
/// A socket which can respond to surveys from a Surveyor socket.
///
/// # See Also
/// * [nn_survey(7)](http://nanomsg.org/v1.1.2/nn_survey.html)
/// * [`Surveyor`](../struct.Surveyor.html)
struct Respondent: SPSend, SPRe... | Rust | 0 |
bool,
}
#[derive(Debug, Default)]
pub struct SimulationResult {
pub winnings: RunningStats,
pub hand_stats: HandStats,
pub winning_distrib: BTreeMap<i32, u64>,
}
impl AddAssign for SimulationResult {
fn add_assign(&mut self, rhs: Self) {
self.winnings += rhs.winnings;
self.hand_stats +... | Rust | 0 |
context: &mut InitContext) -> Self {
A320BrakingForce {
brake_left_force_factor_id: context
.get_identifier("BRAKE LEFT FORCE FACTOR".to_owned()),
brake_right_force_factor_id: context
.get_identifier("BRAKE RIGHT FORCE FACTOR".to_owned()),
trai... | Rust | 0 |
e)).expect_one()
elif len(node.args) == 2:
start = state.lower(node.args[0]).expect_one()
stop = state.lower(node.args[1]).expect_one()
step = state.lower(ast.Constant(None)).expect_one()
elif len(node.args) == 3:
start = state.lower(node.args[0]).expect_one()
stop = stat... | Python | 1 |
# label_idx_map[f] = (i, j)
# else:
# label_idx_map[f] = (i, i+1)
feature_idx_map, label_idx_map = util.load_feat_label_idx_maps(data_config)
# Initialize the model
model = LISAModel(hparams, model_config, layer_task_config, layer_attention_config, feature_idx_map, label_idx_map,
voca... | Python | 1 |
raits_zero__Is_nothrow_invocable = std_false_type;
pub type std__Invoke_traits_zero__Is_invocable_r = std_false_type;
pub type std__Invoke_traits_zero__Is_nothrow_invocable_r = std_false_type;
pub type std__Decltype_invoke_zero<_Callable> = _Callable;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct std__Invoke_trai... | Rust | 0 |
array)
});
}
})
}
pub fn generate_noise_chunks3(
pool: &TaskPool,
chunks_extent: ChunkUnits<Extent3i>,
chunk_shape: Point3i,
freq: f32,
scale: f32,
seed: i32,
octaves: u8,
subsurface_only: bool,
) -> Vec<(Point3i, Array3x1<f32>)> {
pool.scope(|s| {
f... | Rust | 0 |
nel_with_params(cls):
# NB: Add new members to kernel class
cls.id = op_cls.id
cls.outMeta = op_cls.outMeta
return cls
return kernel_with_params
# FIXME: On the c++ side every class is placed in cv2 module.
cv.gapi.wip.draw.Rect = cv.gapi_wip_draw_Rect
cv.gapi.wip.draw.Text =... | Python | 1 |
)
);
assert_eq!(
VariantKinds::Tuple(1, 2).as_tuple_unchecked_mut(),
(&mut 1usize, &mut 2usize)
);
assert_eq!(VariantKinds::Single(2).as_single_unchecked_mut(), &mut 2i32);
}
}
#[should_panic]
#[test]
fn panics_on_invalid_kind() {
unsafe {
Variant... | Rust | 0 |
38763486325,
825695092163721671,
3055436360940615263,
1492572876028562170,
17854804685161712323,
13963312285969121334,
1022428655137937057,
17304775861198439126,
14488691714775008885,
3559022074931400028,
9803967563486540149,
5840733631497687280,
17464660925899346648,
... | Rust | 0 |
events));
let (_dir, _proxy) = fs.clone().make_connection(OPEN_RIGHT_READABLE | OPEN_RIGHT_WRITABLE);
fs.scope.shutdown();
fs.scope.wait().await;
let events = events.0.lock().unwrap();
assert_eq!(*events, vec![MutableDirectoryAction::Close]);
}
}
use crate::math::{Isometry,... | Rust | 0 |
_sizemax_size rQ c s t jt jt ddd| dS N )rj r rh r[ listsr` n)primesr r rZ s z&st_comp_with_com_fac.<locals>.<lambda>c s g | ]}t tj|d qS r r operatormulr nums)com_facr r r ... | Python | 1 |
ialize_structure_crate_input_update_project_data_delivery_input(
&mut object,
input,
)?;
object.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
<filename>src/interaction/help.rs
use twilight_interactions::command::{CommandModel, CreateCommand};
use twilight_model::{channel::message... | Rust | 0 |
#!/usr/bin/env python
#coding=utf-8
import random
class RequestModel(object):
UserAgent_List = [
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/4... | Python | 1 |
leaf.borrow_mut().father = Some(Rc::downgrade(&node));
}
if let LinkType::Leaf(leaf) = &new_top.borrow_mut().ids[1].link {
leaf.borrow_mut().father = Some(Rc::downgrade(&node));
}
// 新的next
if let LinkType::Leaf(leaf) = &node.borrow().ids[pos - 1].link {
... | Rust | 0 |
Type::TYPE_2D)
.format(vk::Format::B8G8R8A8_UNORM)
.subresource_range(*subresource_range);
unsafe { device.create_image_view(&imageview_create_info, None) }.unwrap()
})
.collect::<Vec<_>>();
Ok((
swapchain_loader,
swapchain,
swapcha... | Rust | 0 |
import win32gui
import win32con
import ctypes
import time
from src.logger import logger
from src.config import MuMuEmulatorConfig as config
__all__ = ["HANDLE"]
class WindowNotFoundException(Exception):
"""Exception raised when the game window is not found."""
pass
# Global variables
PARENT_HANDLE: int = wi... | Python | 1 |
json_data() {
const JSON: &'static str = r#"{"Schedule":{},"ScheduleStatus":{"Last":"0001-01-01T00:00:00","Next":"2018-07-24T23:24:00-07:00","LastUpdated":"0001-01-01T00:00:00"},"IsPastDue":true}"#;
let mut data = protocol::TypedData::new();
data.set_json(JSON.to_string());
let info: T... | Rust | 0 |
run(f"test --catalog-file {abs_catalog} .", cwd=directory)
def test_catalog_file_with_wrong_algorithm_extension(directory, run):
wrong_catalog = directory / "wrong.md5"
run(f"sign -a sha256 --catalog-file {wrong_catalog} .", cwd=directory)
with pytest.raises(subprocess.CalledProcessError):
r... | Python | 1 |
)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Reader of ... | Rust | 0 |
R::ADC_DCCTL2_CIM_ONCE => 1,
ADC_DCCTL2_CIMR::ADC_DCCTL2_CIM_HALWAYS => 2,
ADC_DCCTL2_CIMR::ADC_DCCTL2_CIM_HONCE => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: u8) -> ADC_DCCTL2_CIMR {
match value {
0 => ADC_D... | Rust | 0 |
_is_x: Default::default(),
}
}
}
impl<Rounds: Unsigned + Default> ChaChaAny<U24, Rounds, X> {
fn new(key: &GenericArray<u8, U32>, nonce: &GenericArray<u8, U24>) -> Self {
ChaChaAny {
state: Buffer {
state: init_chacha_x(key, nonce, Rounds::U32),
out: ... | Rust | 0 |
len: size_t, to: *mut Struct_sockaddr,
tolen: socklen_t, ppid: uint32_t, flags: uint32_t,
stream_no: uint16_t, timetolive: uint32_t,
context: uint32_t) -> ::libc::c_int;
/* This library function assist the user with sending a... | Rust | 0 |
,
accelerator,
save_path,
)
if args.push_to_hub:
save_model_card(
repo_id,
image_logs=image_logs,
base_model=args.pretrained_model_name_or_path,
repo_folder=args.output_dir,
)
... | Python | 1 |
ries_equal(res.dtypes, exp)
exp = pd.pivot_table(
df, index="A", columns="B", values="C", aggfunc="count", observed=False
).astype(np.float64)
assert_eq(res, exp)
def test_pivot_table_index_dtype():
df = pd.DataFrame(
{
"A": pd.date_range(start="2019-08-01", periods=3, fr... | Python | 1 |
orce_delete_without_backup
if not UtilClient.is_unset(request.kms_instance_id):
query['KmsInstanceId'] = request.kms_instance_id
req = open_api_models.OpenApiRequest(
query=OpenApiUtilClient.query(query)
)
params = open_api_models.Params(
action='Relea... | Python | 1 |
/// Removes an element from the vector and returns it.
///
/// The removed element is replaced by the last element of the vector.
///
/// This does not preserve ordering, but is O(1).
///
/// # Panics
///
/// Panics if `index` is out of bounds.
///
/// # Examples
///
/// ... | Rust | 0 |
from pathlib import Path
import os
import plotly.express as px
from ray_runner import grid_online
def plot_alibaba():
"""
Typical runtime: ~15 min per group of [Dpack, DPF, FCFS], most of the time spent in DPack
"""
fig_dir = Path(__file__).parent.joinpath("figures")
rdf = grid_online(
... | Python | 1 |
break
# 如果任务不存在,也清理其日志
if not task_found:
tasks_to_remove.append(task_order)
# 删除标记的日志
for task_order in tasks_to_remove:
if task_order in app.task_logs:
del app.task_logs[task_o... | Python | 1 |
from requests import post
url = 'http://127.0.0.1:8080/inadimplencia'
dict_json = {
'year':2019,
'loan_limit':1,
'Gender':1,
'approv_in_adv':1,
'loan_type':2,
'loan_purpose':1,
'Credit_Worthiness':1,
'open_credit':1,
'business_or_commercial':1,
'loan_amount':500000,
'r... | Python | 1 |
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestModelOrigin(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.record = cls.env... | Python | 1 |
msg_id1, 0, *seq_no - 1)));
}
}
// TODO: Turn it into iterator.
pub fn gen_next_msg_ids(&self, branching: bool) -> Vec<(ed25519::PublicKey, Cursor<Link>)> {
let mut ids = Vec::new();
// TODO: Do the same for self.sig_kp.public
for pk_info in self.pk_store.iter() {
... | Rust | 0 |
# Copyright (c) 2024 ONERA
# Authors: Susanne Claus
# This file is part of CutFEMx
#
# SPDX-License-Identifier: MIT
import pytest
from mpi4py import MPI
import numpy as np
from cutfemx.level_set import locate_entities, locate_entities_part
from dolfinx import fem, mesh
def test_locate_entities():
N = 3
msh = ... | Python | 1 |
import os
import ecdsa
def generate_key_pair():
"""Generate a new ECDSA key pair."""
# Generate a new private key
private_key = ecdsa.SigningKey.generate(curve=ecdsa.SECP256k1)
public_key = private_key.get_verifying_key()
return private_key, public_key
def sign_message(private_key, message):
... | Python | 1 |
1 so we don't have to convert between isize.
for (row, col, block) in iter {
assert!(row + 1 >= prev_row); // We assume that rows are monotonically increasing.
if row + 1 != prev_row {
prev_row = row + 1;
offsets.push(cols.len());
}
... | Rust | 0 |
import pandas as pd
import numpy as np
import os
# Charger les données d'origine
df = pd.read_csv("donnees/creditcard.csv")
# Séparer les classes
fraudes = df[df["Class"] == 1]
non_fraudes = df[df["Class"] == 0]
# Nombre total souhaité pour obtenir 40% de fraudes
total_cible = len(df)
n_fraudes_voulues = int(0.4 * t... | Python | 1 |
#!/bin/python
# works w/Jython also
import xml.dom.minidom as dom
input_xml = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd"
>
<command>
... | Python | 1 |
b: f64, integrand: F) -> f64
where
F: Fn(f64) -> f64,
{
let result: f64 = self
.nodes
.iter()
.zip(self.weights.iter())
.map(|(&x_val, w_val)| {
integrand(
GaussLegendre::argument_transformation(x_val, a, b,)
... | Rust | 0 |
class Solution:
def reverseBits(self, n: int) -> int:
bin_rep = bin(n)[2:]
print(f"bin 1 = {bin_rep}")
bin_rep = bin_rep.zfill(32)
print(f"bin 2 = {bin_rep}")
rev_bin =bin_rep[::-1]
print(f"bin 3 = {rev_bin}")
return int(rev_bin,2)
if __name__ ... | Python | 1 |
ush_str("Hello "),
Msg::WriteName(name) => model.title.push_str(&name),
Msg::WriteExclamationMarks => model.title.push_str("!!! "),
Msg::WriteEmoticon(emoticon) => model.title.push_str(&emoticon),
}
}
async fn write_exclamation_marks_after_delay() -> Msg {
TimeoutFuture::new(1_000).awai... | Rust | 0 |
d_: int):
def put(self, id_):
"""
Libérer un identifiant.
Cette méthode retire l'identifiant spécifié de l'ensemble des identifiants gérés par
cette classe, le rendant disponible pour une réutilisation future.
Ajoute un ID au set s'il est valide (c'est-à-dire s'il est supér... | Python | 1 |
_func(output, global_target)
alpha_loss = self.kl_loss_func(output, distill_output)
loss = gamma_loss * self.gamma + alpha_loss * self.alpha
acc = accuracy(output, global_target)
return output, acc, loss
def set_forward_adaptation(self, support_feat, support_target):
class... | Python | 1 |
pub const HEIGHT_SCALE: f32 = 1.0;
pub const XZ_SCALE: f32 = 100.0;
/*
impl Release for PxCooking {
unsafe fn release(pointer: &mut Self) {
PxCooking_release_mut(pointer)
}
}
impl PxCooking {
pub fn new(
physx_version: u32,
foundation: &mut impl Foundation,
cook_params: PxCo... | Rust | 0 |
# Support for the Creative Commons licensing extensions
# Copyright 2010-2023 Kurt McKee <contactme@kurtmckee.org>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
# This file is a part of feedparser.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provide... | Python | 1 |
"""
UI configuration settings.
"""
UI_CONFIG = {
'page': {
'title': 'Resume Parser',
'layout': 'wide',
'initial_sidebar_state': 'expanded'
},
'columns': {
'input': 0.6,
'output': 0.4
},
'max_file_size': 5 * 1024 * 1024, # 5MB
'supported_file_types': ['do... | Python | 1 |
import torch
from keras_core import ops
from keras_core import optimizers
from keras_core.backend.torch.optimizers import torch_parallel_optimizer
class Lion(torch_parallel_optimizer.TorchParallelOptimizer, optimizers.Lion):
def _parallel_update_step(
self,
grads,
variables,
learn... | Python | 1 |
'''/*
* Escribe un programa que reciba un texto y transforme lenguaje natural a
* "lenguaje hacker" (conocido realmente como "leet" o "1337"). Este lenguaje
* se caracteriza por sustituir caracteres alfanuméricos.
* - Utiliza esta tabla (https://www.gamehouse.com/blog/leet-speak-cheat-sheet/)
* con el alfabeto... | Python | 1 |
# We reference the code in https://github.com/nerfstudio-project/nerfstudio/blob/a8e6f8fa3fd6c0ad2f3e681dcf1519e74ad2230f/nerfstudio/field_components/embedding.py
# Thanks to their great work!
import torch
from abc import abstractmethod
from typing import Optional
from jaxtyping import Shaped
from torch import Tensor,... | Python | 1 |
&[(&MOCK_CONTRACT_ADDR.to_string(), &total_amount)],
)]);
let non_vault_amount = stake_amount + stake_amount_2 + warchest_amount + burnvault_amount;
let warchest_amount = warchest_amount + reward.multiply_ratio(warchest_amount, non_vault_amount);
let burnvault_amount = burnvault_amount + reward... | Rust | 0 |
itle': 'UCQvWX73GQygcwXOTSf_VDVg - Let\'s play',
'tags': [],
},
'playlist_mincount': 8,
}, {
# Home tab id is literally home. Not to get mistaken with featured
'url': 'https://www.youtube.com/channel/UCQvWX73GQygcwXOTSf_VDVg/home',
'info_dict': {
'id':... | Python | 1 |
import asyncio
from dataclasses import dataclass
import aiogram.exceptions as exc
from aiogram import Bot
from bot.crud.user import user_crud
from bot.enums.setting_enums import FieldLength, SendTelegramError
from db.core import async_session
from db.models.models import UserProfile
from logs.config import worker_log... | Python | 1 |
import os
import shutil
import requests
from concurrent.futures import ThreadPoolExecutor
from urllib.parse import urlparse, urljoin
from bs4 import BeautifulSoup
from pathlib import Path
import sys
# Función para descargar un archivo
def download_file(url, dest_folder,nivel_actual):
try:
# Crear la carpet... | Python | 1 |
,
"invalid coordinate system: expected 0 or 1, got {}",
self.0
)
}
}
impl TryFrom<u16> for CoordinateSystem {
type Error = TryFromIntError;
fn try_from(n: u16) -> Result<Self, Self::Error> {
match n {
0 => Ok(Self::Gff),
1 => Ok(Self::Bed),
... | Rust | 0 |
Config {
owner: deps.api.addr_validate(&msg.owner)?,
token_code_id: msg.token_code_id,
fee_address: None,
generator_address: None,
};
if let Some(generator_address) = msg.generator_address {
config.generator_address = Some(addr_validate_to_lower(
deps.api,
... | Rust | 0 |
d: ",
stringify!(rte_flow_item_raw),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rte_flow_item_raw>())).pattern as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rte_... | Rust | 0 |
_bytes as usize }
}
/// Convert this to an owned version of `Progress`.
pub fn to_owned(&self) -> Progress<'static> {
Progress {
raw: ProgressState::Owned(unsafe { *self.raw() }),
_marker: marker::PhantomData,
}
}
}
impl<'a> Binding for Progress<'a> {
type R... | Rust | 0 |
ert!(ds.create().is_err());
assert!(ds.exists());
assert!(base_path.exists());
assert!(!test_file.exists());
assert_eq!(ds.insert_symbol(&tag, &symbol, &csv).unwrap(), 3);
assert!(test_file.exists());
assert!(ds.delete().is_ok());
assert!(ds.delete().is_err());
... | Rust | 0 |
#User function Template for python3
class Solution:
def isDivisible(self, s):
# code here
st=int(s,2)
if st%3==0:
return True
else:
return False
| Python | 1 |
mplies(Or(m, a), j), Implies(Not(m), a), Implies(a, Not(j)))
# Compute a list of the valid attendance scenarios using a call to
# satisfying_assignments(expr)
valid_scenarios = list(satisfying_assignments(party_constraints))
# Write your answer to the question in the assignment
puzzle_2_question = """
The Valid Solut... | Python | 1 |
/www.yujn.cn/api/xjj.php',
'http://www.yujn.cn/api/zzxjj.php',
'http://api.yujn.cn/api/juhexjj.php?type=video',
'https://api.cenguigui.cn/api/mp4/MP4_xiaojiejie.php',
'https://api.kuleu.com/api/MP4_xiaojiejie?type=video',
'https://api.peark... | Python | 1 |
ication(
self,
event: SystemEvent,
user_id: Optional[str] = None
) -> None:
"""
發送系統通知
Args:
event: 系統事件
user_id: 用戶ID (可選)
"""
if not self._notification_service or not user_id:
return
try:
... | Python | 1 |
,
user_email_opt_out=True
)
request_user_email(args)
mock_update_system_conf_file.assert_called_once_with({'user_email': '', 'user_email_opt_out': True})
@patch('sys.stdin.isatty')
@patch('cravat.admin_util.get_system_conf')
@patch('cravat.admin_util.update_system_conf_f... | Python | 1 |
::Kind::SuburbanRailway)
|| kinds.contains(&line::Kind::UrbanRailway)
{
Self::Interchange
} else if kinds.contains(&line::Kind::Tram) {
Self::TramStop
} else if kinds.contains(&line::Kind::Bus) {
Self::BusStop
} else if kinds.contains(&line... | Rust | 0 |
from os.path import join
from pythonforandroid.recipe import PythonRecipe
class ZBarRecipe(PythonRecipe):
version = '0.10'
# For some reason the version 0.10 on PyPI is not the same as the ones
# in sourceforge and GitHub. The one in PyPI has a setup.py.
# url = 'https://github.com/ZBar/ZBar/archive... | Python | 1 |
"""Container para injeção de dependências."""
from dependency_injector import containers, providers
from aiohttp import ClientSession
from src.config import settings
from src.infra.database.connection import DatabaseConnection
from src.infra.database.repositories.all_editais_repository import AllEditaisRepository
fr... | Python | 1 |
_window(&id);
}
_ => (),
}
})
}
}
impl Application<Winit> {
pub fn run(self) -> ! {
self.run_common()
}
}
impl Default for Application<Winit> {
fn default() -> Self {
let window_handler = Winit::default();
Self::new(window_han... | Rust | 0 |
plt.scatter(-veh_c_s_world[1,0],veh_c_s_world[0,0],c='b',marker='o')
# plt.scatter(-inf_c_s_world[1,0],inf_c_s_world[0,0],c='c',marker='^')
for i in range(label.shape[0]):
x3 = label[i,[0,4,7,3,0],0]
y3 = label[i,[0,4,7,3,0],1]
plt.plot(-y3,x3,'g')
... | Python | 1 |
anz
let env = mock_env("Max", &coins(2, "token"));
let delegate : HumanAddr = HumanAddr("John".to_string());
let msg = HandleMsg{ vote : None, delegate: Some(delegate)};
let _res = handle(&mut deps, env, msg).unwrap();
// John can vote and his vote is thus worth 2
let en... | Rust | 0 |
ength = len(call_256verify_bytecode) + len(input_data)
create_contract = (
Op.CALLDATACOPY(offset=0, size=total_bytecode_length)
+ opcode(offset=0, size=total_bytecode_length)
+ Op.STOP
)
factory_contract_address = pre.deploy_contract(code=create_contract)
contract_address = co... | Python | 1 |
monic::Vpshuflw,// EVEX_Vpshuflw_ymm_k1z_ymmm256_imm8
Mnemonic::Vpshuflw,// EVEX_Vpshuflw_zmm_k1z_zmmm512_imm8
Mnemonic::Psrlw,// Psrlw_mm_imm8
Mnemonic::Psrlw,// Psrlw_xmm_imm8
Mnemonic::Vpsrlw,// VEX_Vpsrlw_xmm_xmm_imm8
Mnemonic::Vpsrlw,// VEX_Vpsrlw_ymm_ymm_imm8
Mnemonic::Vpsrlw,// EVEX_Vpsrlw_xmm_k1z_xmmm128_... | Rust | 0 |
paytext * 6,
paytext * 6,
paytext * 2,
paytext * 2,
paytext * 2,
paytext * 2,
paytext * 2,
)
else:
pay = "╭━━━╮\n┃╭━━╯\n┃╰━━╮\n┃╭━━╯\n┃┃\n╰╯\n"
await eor(event, pay)
@dominator_cmd(pattern="cat$")
async def hmm(dom... | Python | 1 |
n with internally computed banded Jacobian.
Side effects: If either self.mu or self.ml is not None and the other is None,
then the one that is None is set to 0.
Nr r r>
r r rB rA )r! r
jac_is_bandedmitermfs r" _determine_mf_and_set_bands vode._determine_mf_and_set_b... | Python | 1 |
indices[0]
}
fn is_zero(&self, len: usize) -> bool {
self.hash.iter().take(len).all(|v| *v == 0)
}
}
/// An Equihash solution failed to verify.
#[derive(Debug)]
pub struct Error(Kind);
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "... | Rust | 0 |
letes: usize,
pub num_updates: usize,
pub gen: u64,
// assigned by BufferedUpdatesStream once pushed
// set to true iff this frozen packet represents a segment private delete.
// in that case is should only have queries
is_segment_private: bool,
}
impl<C: Codec> fmt::Display for FrozenBufferedU... | Rust | 0 |
from django.urls import path
from . import views
from .views import chatgpt_response
from django.contrib.auth.views import LogoutView
urlpatterns = [
path('', views.login_view, name='login_page'),
path('chatgpt-page/', views.chat_gpt_page, name='chatgpt_page'),
path('chatgpt-response/', chatgpt_response, n... | Python | 1 |
number=6,
message=timestamp_pb2.Timestamp,
)
update_time: timestamp_pb2.Timestamp = proto.Field(
proto.MESSAGE,
number=7,
message=timestamp_pb2.Timestamp,
)
health_state: HealthState = proto.Field(
proto.ENUM,
number=8,
enum=HealthState,
)
... | Python | 1 |
, with the given options, that a buffer of bytes
/// contains a `Feature` and returns it.
/// Note that verification is still experimental and may not
/// catch every error, or be maximally performant. For the
/// previous, unchecked, behavior use
/// `root_as_feature_unchecked`.
pub fn root_as_feature_with_opts<'b, 'o... | Rust | 0 |
import os
import numpy as np
from langchain_chroma import Chroma
from agent_system.setup_api import setup_embeddings, setup_llm
embedding_model = setup_embeddings(model="models/text-embedding-004")
generate_response = setup_llm(model="models/gemini-2.0-flash", max_tokens=1000, temperature=0.3)
vector_store = Chroma(... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.