text string | label_name string | labels int64 |
|---|---|---|
v_draw_mask_add`"]
#[doc = " Return: the parameter of the removed mask."]
#[doc = " If more masks have `custom_id` ID then the last mask's parameter will be returned"]
pub fn lv_draw_mask_remove_id(id: i16) -> *mut ::cty::c_void;
}
#[lvgl_macros::safe_wrap(attr)] extern "C" {
#[doc = " Remove all mask w... | Rust | 0 |
name(desc_file)
file_dict['file_size'] = os.path.getsize(desc_file)
self.send_msg(client_socket, json.dumps(file_dict).encode())
dummy = self.recv_msg(client_socket)
with open(desc_file, 'rb') as f:
client_socket.sendall(f.read())
# get infer resu... | Python | 1 |
ring_alerts': [
'Fallback portfolio active - sector analysis unavailable',
'Consider upgrading news data sources for better analysis'
]
}
# Test and demonstration
if __name__ == "__main__":
engine = HybridRecommendationEngine()
print("🚀 Hybrid Investmen... | Python | 1 |
macro_rules! test_day {
($name: ident, $day: literal, $sol_a: literal, $sol_b: literal) => {
#[test]
fn $name() -> Result<(), std::io::Error> {
test_day($day, $sol_a, $sol_b)
}
};
}
test_day!(day01, 1, "3262356", "4890664");
test_day!(day02, 2, "3101844", "8478");
test_day!... | Rust | 0 |
"""The command for generating new tasks in the context of a time plan."""
from jupiter.core.domain.application.gen.service.gen_service import GenService
from jupiter.core.domain.core.adate import ADate
from jupiter.core.domain.core.recurring_task_period import RecurringTaskPeriod
from jupiter.core.domain.features impo... | Python | 1 |
ygon_mode:
current_shape.append((end_x, end_y))
else:
shapes.append((start_x, start_y, end_x, end_y))
current_shape = None
def on_mouse_move(event):
global start_x, start_y, current_shape, polygon_mode
if not polygon_mode and current_shape is not None... | Python | 1 |
;
let guard = block_on(store_handle.lock());
let (waker, wake_count) = new_count_waker();
let mut ctx = Context::from_waker(&waker);
let next_fut = stream_map.next();
fasync::pin_mut!(next_fut);
assert_eq!(next_fut.poll(&mut ctx), Poll::Pending);
assert_eq!(wake_count.get(), 0);
drop(... | Rust | 0 |
from django.urls import path
from .views import login_view, activate, logout_view, profile_view, update_user
app_name = 'user'
urlpatterns = [
path('login/', login_view, name='login'),
path('activate/', activate, name='activate'),
path('logout/', logout_view, name='logout'),
path('profile/', profile_v... | Python | 1 |
ntation.split('_')[1]
landscape_path = os.path.join(main.OUTPUT_DIR, f"{base_name}_landscape_{landscape_orientation}.png")
print(f"DEBUG: Ищем файл: {landscape_path}")
print(f"DEBUG: Файл существует: {os.path.exists(landscape_path)}")
if os.path.exists(lan... | Python | 1 |
Self {
let mut ctrl_desc_cnt = 0usize;
match self.send_buff.as_mut() {
Some(buff) => {
buff.reset_write();
let mut init_buff_len = 0usize;
match buff.get_ctrl_desc_mut() {
Some(ctrl_desc) => {
let ind_desc_lst = unsafe {
let size = core::mem::size_of::<Descriptor>();
core:... | Rust | 0 |
{
tx_info
.tx_log
.update_confirmation_ts(hdr_info.confirmed_time);
}
tx_info.updated = true;
if let Some(ref s) = status_send_channel {
let _ = s.send(StatusMessage::Info(format!(
"Changing transaction {} state to confirmed",
tx_info.tx_uuid.split('/').next().unw... | Rust | 0 |
#!/usr/bin/env python
# flake8: noqa: E402
"""
A simple load tester for IRRd.
Sends random !g queries.
"""
import argparse
import random
import socket
import time
def main(host, port, count):
queries = [b"!!\n"]
for i in range(count):
asn = random.randrange(1, 50000)
query = f"!gAS{asn}\n".en... | Python | 1 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Interfaces for ioLab Systems button boxes.
These are optional components that can be o... | Python | 1 |
_ => (),
}
}
}
}
}
impl Widget<LapceTabData> for FilePickerPwd {
fn event(
&mut self,
ctx: &mut EventCtx,
event: &Event,
data: &mut LapceTabData,
env: &Env,
) {
self.input.event(ctx, event, data, env)... | Rust | 0 |
("all")
fig.set_size_inches(6, 6)
# %%
# We see that again, the regression weights have been correctly estimated.
#
# Visualize the effect on raw data
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Once we have obtained robust regression weights, we can use them to apply the
# regression directly to raw, epoched, and evoked dat... | Python | 1 |
},
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<CMsgSteamDatagramSessionCryptInfo>(
"CMsgSteamDatagramSessionCryptInfo",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static CMsgSteamDat... | Rust | 0 |
from("9999999999999999999999999")).unwrap(),
u64::MAX,
Some(ERR_DATA_OUT_OF_RANGE),
),
(
Json::from_f64(2f64 * (u64::MAX as f64)).unwrap(),
u64::MAX,
Some(ERR_DATA_OUT_OF_RANGE),
),
];
fo... | Rust | 0 |
tch &cap[1] {
"hlf" => Op::Hlf(reg),
"tpl" => Op::Tpl(reg),
"inc" => Op::Inc(reg),
_ => panic!()
}
} else if let Some(cap) = jmp_re.captures(line) {
let offset = cap[1].parse().unwrap();
... | Rust | 0 |
from typing import Any, Optional
from flet.core.control import Control
from flet.core.ref import Ref
class HapticFeedback(Control):
"""
Allows access to the haptic feedback interface on the device.
It is non-visual and should be added to `page.overlay` list.
Example:
```
import flet as ft
... | Python | 1 |
clock 2 (ADC_ALTCLK2)"]
#[inline(always)]
pub fn _01(self) -> &'a mut W {
self.variant(ADICLK_A::_01)
}
#[doc = "Alternate clock 3 (ADC_ALTCLK3)"]
#[inline(always)]
pub fn _10(self) -> &'a mut W {
self.variant(ADICLK_A::_10)
}
#[doc = "Alternate clock 4 (ADC_ALTCLK4)"]
... | Rust | 0 |
", Some(b"bravo")),
];
assert_eq!(
verify_proof::<NoExtensionLayout, _, _, _>(&root, &proof, items.iter()),
Err(VerifyError::DuplicateKey(b"bravo".to_vec()))
);
}
#[test]
fn test_verify_extraneous_node() {
let (root, proof, _) = test_generate_proof::<NoExtensionLayout>(
test_entries(),
vec![b"br... | Rust | 0 |
ss="bg-background-900">
<div class="container px-6 py-4 space-x-4 flex justify-center text-primary-300">
<Link<Route> to={Route::Imprint}>{ "Imprint" }</Link<Route>>
<Link<Route> to={Route::Privacy}>{ "Privacy" }</Link<Route>>
</div>
</div>
}
}
<repona... | Rust | 0 |
from ccrawl.utils import struct_letters
from ccrawl.ext.ctypes_ import build
from ctypes import sizeof
__all__ = [
"cMacro_volatility",
"cFunc_volatility",
"cTypedef_volatility",
"cEnum_volatility",
"cStruct_volatility",
"cUnion_volatility",
]
# volatility VTypes formatters:
# ----------------... | Python | 1 |
2> {
// Rust 中的匹配是穷尽的(exhaustive):
// 必须穷举到最后的可能性来使代码有效
match x {
None => None,
Some(i) => Some(i + 1),
}
}
<gh_stars>0
use serde::{self, Serialize, Deserialize};
use crate::{
authorization::AcmeAuthorization,
directory::AcmeBoundDirectory,
error::Result,
identifier::Acme... | Rust | 0 |
3, 3, 2),
// the function should return 3. Rome has the number 3 on the map.
// From cities 1, 2 and 4, there is a direct road to city 3. From
// cities 0 and 5, the roads to city 3 go through city 2.
//
// 5 4
// \ /
// > <
// ... | Rust | 0 |
from datetime import date
from op_analytics.coreutils.threads import run_concurrently
from op_analytics.coreutils.time import now_date
from op_analytics.coreutils.logger import structlog
from .database import find_tokens
from .chaintokens import ChainTokens
log = structlog.get_logger()
def execute_pull(process_... | Python | 1 |
target instance
pull_result = misps_site_admin[target_index - 1].server_pull(server=server_id, event=event.id)
time.sleep(2) # Allow time for the pull to complete
check_response(pull_result)
# Verify that the event exists and is locked on the target instance
results = target_i... | Python | 1 |
parser.add_argument("--dp-size",
type=int,
default=2,
help="Data parallel size")
parser.add_argument("--tp-size",
type=int,
default=1,
help="Tensor parallel size")
par... | Python | 1 |
codecsList = (
'ascii',
'big5',
'big5hkscs',
'cp037',
'cp424',
'cp437',
'cp500',
'cp737',
'cp775',
'cp850',
'cp852',
'cp855',
'cp856',
'cp857',
'cp860',
'cp861',
'cp862',
'cp863',
'cp864',
'cp865',
'cp866',
'cp869',
'cp874',
... | Python | 1 |
obj)?,
is_last,
);
if !display_settings.display_font && &label == "Font" {
cursor.print_subitem(
EXPAND_INFO_STYLE
.paint("... (display with `display-font` flag)")
.to_string(),
true,
);
... | Rust | 0 |
, 4, 4, 5)),
list!(1, 2, 5)
);
assert_eq!(
Solution::delete_duplicates(list!(1, 1, 1, 2, 3)),
list!(2, 3)
);
}
}
<filename>src/bin/network-router.rs
// Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License"); you
// may n... | Rust | 0 |
#!/usr/bin/python3
import argparse
import re
class InvalidPRTitle(Exception):
def __init__(self, invalid_title):
self.invalid_title = invalid_title
def check_pr_title(pr_title: str):
print(pr_title)
# cover most common cases:
# package: foo
# package, otherpackage/subpackage: this is a ... | Python | 1 |
32, gp.acceleration, $right, epsilon = 0.001) {
panic!("assertion failed, Acceleration does not match, left: {:?}\n right: {:?}", $left, $right)
}
},
None => panic!("assertion failed, left: {:?}\n right: {:?}", $left, $right)
... | Rust | 0 |
eq!(
results[0].1.hash().0,
[
141, 3, 218, 9, 245, 129, 12, 99, 192, 12, 107, 216, 4, 191, 254, 93, 247, 103, 110,
204, 77, 126, 154, 187, 198, 139, 58, 24, 191, 179, 59, 125
]
);
assert_eq!(
results[1].1.hash().0,
[
254, 230, 153, 200,... | Rust | 0 |
match (output.pop_back(), output.pop_back()) {
(Some(expr2), Some(expr1)) => {
output.push_back(Expression::Operation(
oper,
Box::new(expr1),
Box::new(expr2),
... | Rust | 0 |
= 10 cm
/// 3 = 20 cm
/// 4 = 50 cm
/// 5 = 100 cm
/// 6 = 150 cm
/// 7 = 180 cm
///
/// - SX*# = Maximum soil temperature (tenths of degrees C)
/// where * corresponds to a code for ground cover
/// and # corresponds to a code for soil depth.
... | Rust | 0 |
# Copyright 2024 Huawei Technologies Co., Ltd
# Copyright 2024 The Qwen team, Alibaba Group and The HuggingFace Inc. team. 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... | Python | 1 |
# Saving model and LoRA adapter
model.save_pretrained("/content/drive/MyDrive/zephyr-finetuned-bankbot")
tokenizer.save_pretrained("/content/drive/MyDrive/zephyr-finetuned-bankbot")
adapter_path = "/content/drive/MyDrive/zephyr-bankbot-lora"
model.save_pretrained(adapter_path, safe_serialization=True)
import os
os.env... | Python | 1 |
* [`GL_COLOR_ATTACHMENT19`]
/// * [`GL_COLOR_ATTACHMENT2`]
/// * [`GL_COLOR_ATTACHMENT20`]
/// * [`GL_COLOR_ATTACHMENT21`]
/// * [`GL_COLOR_ATTACHMENT22`]
/// * [`GL_COLOR_ATTACHMENT23`]
/// * [`GL_COLOR_ATTACHMENT24`]
/// * [`GL_COLOR_ATTACHMENT25`]
/// * [`GL_COLOR_ATTACHMENT26`]
/// * [`GL_COLOR_ATTACHMENT27`]
/// ... | Rust | 0 |
from __future__ import annotations
import requests
from .base_provider import AsyncGeneratorProvider, ProviderModelMixin
from ..typing import AsyncResult, Messages
from ..requests import StreamSession, raise_for_status
from ..image import ImageResponse
class DeepInfraImage(AsyncGeneratorProvider, ProviderModelMixin)... | Python | 1 |
\
S\x96,A%\xc7\x98w.\xd4$\xf4\xc8\xf9ia\
\xf18\x5cR\x95:\xb5}\xc9E\xa8\xf38\xaf\xb3\xe7\
\xd1omt\xbd\xb6k\xe9#\x89\xc3\xe2h\xafiN\
\x9c\xa3V)7nk^\xcbT\xf6Z\xbb\xdb[\xf7\
<\xa7\xfe\x11\x89\xe6v1Cr\xaa\x8a\xdc>r\xa9\
\xbc*\xc9\xbb?0\x0c\x1br\x8f\xba\xbc\x902\x09\xcf\
\xbf\xf0\xed\xe5\xa4;\x9a%V\x89O;\x982\xae\x0b\
.$e\xd... | Python | 1 |
ues='Revenue',
title='Sunburst Chart by Region and Product'
)
st.plotly_chart(fig)
def main():
st.title('Top 10 Advanced Data Visualizations for FP&A')
df = generate_synthetic_data()
viz_options = [
'Waterfall Chart',
'Tornado Chart',
'Marimekko (Treemap)',
... | Python | 1 |
ile True:
self.ui.clear_screen()
submenu_options = [
"💰 Modifier les prix",
"➕ Ajouter des plats au menu",
"➖ Retirer des plats du menu",
"📊 Analyser la rentabilité par plat",
"🍽️ Créer un menu du jour",
... | Python | 1 |
_product_t::<G::Fr>(&f, &r1cs_circuit.CR);
let aO = vector_matrix_product_t::<G::Fr>(&f, &r1cs_circuit.CO);
let input = Assignment {
aL: aL,
aR: aR,
aO: aO,
s: r1_statement,
w: witness,
};
// create generators
// n_max... | Rust | 0 |
0
} else {
(*pi).y = ((*pi).y as libc::c_uint)
.wrapping_add((*pi).dy.wrapping_sub((*pi).y.wrapping_rem((*pi).dy)))
as OPJ_UINT32 as OPJ_UINT32;
current_block = 7245201122033322888;
break;
}
current_block = 980989089337379490;... | Rust | 0 |
signature_sha256 = headers.get('X-Hub-Signature-256', '').split('=')[1]
generated_sha1 = hmac.new(
app_secret_key.encode('utf-8'),
data,
hashlib.sha1
).hexdigest()
generated_sha256 = hmac.new(
app_secret_key.encode('utf-8'),
data,
hashlib.sha256
).hexdi... | Python | 1 |