text string | label_name string | labels int64 |
|---|---|---|
# data module
from micropython import const
import time
wifi_is_ready = False
utc_offset = 2
year = 0
month =0
day = 0
wd = 0
hour = 0
minute = 0
second = 0
last_second = 0
mqtt_subs = [
{'feed':'infrapale/feeds/villaastrid.ruuvi-e6', 'label':'MH1','value': 0.0, 'updated': False},
{'feed':'infrapale/feeds/... | Python | 1 |
nd;
pub use self::device::Device;
pub use self::info::{Info, PlatformName, Version};
mod command;
mod device;
mod info;
mod native;
mod pool;
mod shade;
mod state;
mod tex;
pub type Buffer = gl::types::GLuint;
pub type ArrayBuffer = gl::types::GLuint;
pub type Shader = gl::types::GLuint;
pub type ... | Rust | 0 |
const IA32_FEATURE_CONTROL: u32 = 0x3a;
const IA32_VMX_BASIC: u32 = 0x480;
const VMX_LOCK_BIT: u64 = 1 << 0;
const VMXON_OUTSIDE_SMX: u64 = 1 << 2;
/// Bits that must be set to 0 in CR0 when doing a VMXON
const IA32_VMX_CR0_FIXED0: u32 = 0x486;
/// Bits that must ... | Rust | 0 |
Other {
query: OtherQuery,
},
}
impl Query {
fn filters(&self) -> &[Filter] {
match self {
Query::Grouped { ref filters, .. } => filters,
Query::Normal { ref filters, .. } => filters,
Query::Other { .. } => &[],
}
}
}
impl Query {
pub fn... | Rust | 0 |
188 - DAC DRC Linear Slope Low Setting Register"]
pub ac_dac_drc_lkn: crate::Reg<ac_dac_drc_lkn::AC_DAC_DRC_LKN_SPEC>,
#[doc = "0x18c - DAC DRC Smooth filter Gain High Attack Time Coef Register"]
pub ac_dac_drc_sfhat: crate::Reg<ac_dac_drc_sfhat::AC_DAC_DRC_SFHAT_SPEC>,
#[doc = "0x190 - DAC DRC Smooth f... | Rust | 0 |
hash: MessageDigest,
key: &mut [u8],
) -> Result<(), ErrorStack> {
unsafe {
assert!(pass.len() <= c_int::max_value() as usize);
assert!(salt.len() <= c_int::max_value() as usize);
assert!(key.len() <= c_int::max_value() as usize);
ffi::init();
cvt(ffi::PKCS5_PBKDF2_HMAC(... | Rust | 0 |
>,
/// Decides whether arithmetic or logical instructions that have the VF register as one of the
/// operands should set the resulting flag in the VF flag register before or after the value:
/// * False: The resulting flags are discarded, and the result is placed in the VF register
/// * True: The resu... | Rust | 0 |
wned()),
},
LineChartSeries {
color: PRODUCTION_COLOR.to_owned(),
data: self
.intervals
.iter()
.enumerate()
.map(|(index, interval)| LineChartPoint {
x: Finite::new(index.to_f64().unwrap()).unwrap(),
y: interval
.precision
.production
.and_then(|precis... | Rust | 0 |
r waiting, yeild to it
lh.reader_count = -1;
lh.writer_queue.wake_one();
// - Woken writer takes logical ownership of the write handle
}
else {
// Fully released!
if trace_type!(T) {
log_trace!("Read<{}>::drop({:p}) - RELEASED", type_name!(T), self._lock);
}
}
}
}
impl<'a, T: Send+Sync> ops... | Rust | 0 |
crate failure;
extern crate futures;
extern crate hex;
extern crate lazy_static;
#[macro_use]
extern crate log;
extern crate multihash;
extern crate serde;
extern crate serde_derive;
extern crate serde_json;
extern crate url;
extern crate url_serde;
extern crate git_lfs_ipfs_lib;
#[cfg(test)]
#[macro_use]
extern cra... | Rust | 0 |
a = int(input())
if a >= 0:
print("positive")
else:
print("negative")
| Python | 1 |
move_char_to_category(self, src_cat: str, dest_cat: str, char: RoaEntry) -> None:
self.app.log(f"Moving {char} from {src_cat} to {dest_cat}")
self.app.nested_state[src_cat].remove(char)
self.app.nested_state[dest_cat].append(char)
self.app.is_dirty = True
self.load_gui_from_sta... | Python | 1 |
w value, in seconds. This is the time after which a past sample"]
#[doc = "\t\t\t will be weighted by 1/2 in the exponential smoothing window."]
#[doc = " @return The error code: if nonzero, can be #lsl_argument_error if an unknown flag was passed in."]
pub fn lsl_smoothing_halftime(in_: lsl_inlet, value:... | Rust | 0 |
o_use]
extern crate nonzero_ext;
use std::num::NonZeroIsize;
fn main() {
let _a: NonZeroIsize = nonzero!(20isize);
}
<reponame>LucasVChaves/MelbOs<filename>src/task/executor.rs
use super::{Task, TaskId};
use alloc::{collections::BTreeMap, sync::Arc, task::Wake};
use core::task::{Context, Poll, Waker};
use crossbe... | Rust | 0 |
to be sent, must include 2–10 items
pub fn new<C: Into<ChatId>>(chat_id: C, media: Vec<MediaGroupItem>) -> Self {
SendMediaGroup {
chat_id: chat_id.into(),
media,
disable_notification: None,
reply_to_message_id: None,
}
}
/// Sends the messag... | Rust | 0 |
")
.with_wait_for(images::generic::WaitFor::message_on_stdout("Creating API v2 with WebPath:")),
);
(node.get_host_port(1025).unwrap(), node)
}
#[tokio::test]
async fn should_start_the_mailserver() {
// Arrange
let docker = clients::Cli::default();
let server = new_mail_server(&docker)... | Rust | 0 |
=ax.transAxes,
bbox=dict(facecolor="white", alpha=0.85, boxstyle="square,pad=0.2"),
)
compress_and_save(
COMOUT + "/uh25_" + dom + "_f" + fhour + ".png"
)
t2 = time.perf_counter()
t3 = round(t2 -... | Python | 1 |
"1: Interrupt generated"]
FINETGTIMINTMSK_1 = 1,
}
impl From<FINETGTIMINTMSK_A> for bool {
#[inline(always)]
fn from(variant: FINETGTIMINTMSK_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `FINETGTIMINTMSK`"]
pub type FINETGTIMINTMSK_R = crate::R<bool, FINETGTIMINTMSK_A>;
impl FIN... | Rust | 0 |
(9999), roxmltree::TextPos::new(2, 5));
/// ```
pub fn text_pos_from(&self, pos: usize) -> TextPos {
xmlparser::Stream::from(self.text).gen_text_pos_from(pos)
}
}
impl<'d> fmt::Debug for Document<'d> {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
if !self.root().has... | Rust | 0 |
"""
Single-panel bubble plot — English & Chinese versions
-----------------------------------------------------
• 画布 2.5 × 4 inch
• 图例水平右移 0.05
• 字体、色彩、数值偏移等均与已调试版一致
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# ── 数据表 ────────────────────────────────────────────────────
df = pd.DataFra... | Python | 1 |
ettings,
};
let mut servers = HashMap::new();
servers.insert("1".to_string(), server_config);
let console_settings = ConsoleSettings {
listen: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), 3030)),
};
librumqttd::Config {
id: 0,
router: router_config,
... | Rust | 0 |
83a336ab645d336f7b47c67d8456'],
['train_data_batch_2', 'b9b1f5ad237638a41e80944fc03b42af'],
['train_data_batch_3', 'e33306a0f4234b5c5812a32845bfbd04'],
['train_data_batch_4', '4db6d81c460a5170a03ef03e1ddd21dd'],
['train_data_batch_5', 'baa0f1d06099f55e5fe50d43fca4d334'],
['train_... | Python | 1 |
oviderType(pub i32);
impl EasEncryptionProviderType {
pub const NotEvaluated: Self = Self(0i32);
pub const WindowsEncryption: Self = Self(1i32);
pub const OtherEncryption: Self = Self(2i32);
}
impl ::core::marker::Copy for EasEncryptionProviderType {}
impl ::core::clone::Clone for EasEncryptionProviderType ... | Rust | 0 |
#
# Copyright (c) 2025, NVIDIA CORPORATION.
#
# 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 ... | Python | 1 |
iste</a></li><li class="color2"><a href="https://chireads.com/tag/administrateur-de-systeme/">Administrateur de système</a></li><li class="color3"><a href="https://chireads.com/tag/de-faible-a-fort/">De faible à fort</a></li></ul>
</div>
</div>
<div class="tiper pd55"><div class="label font-color-black3"><s... | Python | 1 |
toggle(im_str!("Background"), &mut windows.background);
toggle(im_str!("Music"), &mut windows.music);
toggle(im_str!("Sound FX"), &mut windows.sounds);
toggle(im_str!("Fonts"), &mut windows.fonts);
toggle(im_str!("Help"), &mut windows.help);
toggle(im_str!("Demo Window"),... | Rust | 0 |
import numpy as np
import torch
def transform(history, trajectory):
full_trajectory = torch.cat([history, trajectory], dim=1)
deltas = torch.diff(full_trajectory, dim=1)[:,:-1]
pred_trajectory = full_trajectory[:,1:-1] + deltas
residuals = full_trajectory[:,2:] - pred_trajectory
return residuals
... | Python | 1 |
import numpy as np
import bct
import netplotbrain
import matplotlib.pyplot as plt
# Setup back end
plt.matplotlib.use('Qt5Agg')
# load data
run_1 = np.load(r'C:\Users\em17531\Desktop\OPM_MEG\Graph_output\Alpha_run_1\master_adj_matrix_alpha_run_1.npy')
run_2 = np.load(r'C:\Users\em17531\Desktop\OPM_MEG\Graph_output\Al... | Python | 1 |
utures::{stream, StreamExt},
};
const DEFAULT_BUFFER_LEN: usize = 65536;
/// Players are configured and accept media frames, which are sent to the
/// media subsystem.
pub struct Player {
buffer: zx::Vmo,
buffer_len: usize,
codec: String,
current_offset: usize,
stream_source: SimpleStreamSinkProxy... | Rust | 0 |
}
}
result
}
fn neighbours(pos: &Point) -> Vec<Point>
{
let mut result = Vec::new();
result.push(Point::new(pos.x + 2, pos.y));
result.push(Point::new(pos.x - 2, pos.y));
result.push(Point::new(pos.x + 1, pos.y + 1));
result.push(Point::new(pos.x - 1, pos.y + 1));
result.push(Point::ne... | Rust | 0 |
:**
El mapa de calor muestra la relación entre departamentos y rendimiento académico:
- Colores más cálidos (rojos) indican mejor rendimiento.
- Colores más fríos (azules) indican peor rendimiento.
- Este mapa permite identificar rápidamente qué departamentos tienen mejor o peor... | Python | 1 |
)>) -> Result<([usize;5], [usize;5]), ResolutionError> {
let mut vars = ProblemVariables::new();
// VARIABLES
let team1_bools = vars.add_vector(variable().binary(), num_players);
let team2_bools = vars.add_vector(variable().binary(), num_players);
let x: Expression = (0..num_players).map(|i: usi... | Rust | 0 |
get_entry_data(&id, &state) {
Ok(x) => x,
Err(e) => {
let err_kind = match e.kind() {
io::ErrorKind::NotFound => Status::NotFound,
_ => Status::InternalServerError,
};
let map = json!({
"version": VERSION,
... | Rust | 0 |
lone(&self, _arena: ArenaRef<'_, 'ast, Id>) -> Self {
self.clone()
}
}
impl<'ast, Id, T, P> AstClone<'ast, Id> for Spanned<T, P>
where
T: AstClone<'ast, Id>,
P: Clone,
{
fn ast_clone(&self, arena: ArenaRef<'_, 'ast, Id>) -> Self {
pos::spanned(self.span.clone(), self.value.ast_clone(are... | Rust | 0 |
import re
from urllib.parse import urlparse
def is_valid_youtube_url(url: str) -> bool:
"""Validate if the URL is a valid YouTube URL"""
if not url:
return False
# Parse the URL
parsed = urlparse(url)
# Check if it's a valid URL
if not parsed.scheme or not parsed.netloc:
retu... | Python | 1 |
(Debug)]
#[pest_ast(rule(Rule::augment))]
pub struct Augment<'src> {
pub name: StringContent<'src>,
}
#[derive(Derivative, FromPest, Clone, PartialEq)]
#[derivative(Debug)]
#[pest_ast(rule(Rule::virtual_modifiers))]
pub struct VirtualModifiers<'src> {
pub name: Vec<KeyCombo<'src>>,
}
#[derive(Derivative, From... | Rust | 0 |
VALID = 0,
ALPM_SIGSTATUS_KEY_EXPIRED = 1,
ALPM_SIGSTATUS_SIG_EXPIRED = 2,
ALPM_SIGSTATUS_KEY_UNKNOWN = 3,
ALPM_SIGSTATUS_KEY_DISABLED = 4,
ALPM_SIGSTATUS_INVALID = 5,
}
/// PGP signature verification status return codes
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum alpm_... | Rust | 0 |
Cons, Extend, Nil};
///
#[cfg_attr(docsrs, doc(cfg(feature = "nightly")))]
pub trait Flatten {
type Output;
fn flatten(self) -> Self::Output;
}
impl<H, T> Flatten for Cons<H, T>
where
private::Is<H>: private::NotHList,
T: Flatten,
{
type Output = Cons<H, T::Output>;
fn flatten(self) -> Self:... | Rust | 0 |
"Bearer {token}"}
# Mock the get_current_admin_user dependency to return a regular user
async def mock_get_current_admin_user():
# Return a regular user instead of admin to test permission denial
return user # Regular user, not admin
app.dependency_overrides[get_curren... | Python | 1 |
enum conversion
let mut to_arms = Vec::with_capacity(llvm_enum_type.variants.len());
for variant in llvm_enum_type.variants.iter() {
let src_variant = variant.rust_variant.clone();
// Filter out doc comments or else rustc will warn about docs on match arms in newer versions.
let src_att... | Rust | 0 |
import torch
from torch.nn import functional as F
def calc_mean_std(feat, eps=1e-5):
"""Calculate mean and std for adaptive_instance_normalization.
Args:
feat (Tensor): 4D tensor.
eps (float): A small value added to the variance to avoid
divide-by-zero. Default: 1e-5.
"""
size = feat.size()
assert len(siz... | Python | 1 |
ýa‐", "ynd", "lyk", "aýy", "e a", "ünd",
"ge ", " go", "egi", "ilm", "sy ", "ni ", "etm", "em‐", "lme", "m‐d", "aly", "any",
" be", "tle", "syn", "rin", "y b", "let", "mak", "a w", "a ý", "den", "äge", "ra ",
" äh", "mäg", " du", "n e", "bol", "meg", "ele", "ň h", " et", "igi", "ň w"... | Rust | 0 |
/docs/symbol_files.md#stack-win-records
///
/// ... or a STACK CFI record
/// Syntax: "STACK CFI INIT address size register1: expression1 register2: expression2 ..."
/// Example: "STACK CFI INIT 804c4b0 40 .cfa: $esp 4 + $eip: .cfa 4 - ^"
/// see https://github.com/google/breakpad/blob/master/docs/symbol_files.md#stack... | Rust | 0 |
class ListeCustom(list):
pass
liste = ListeCustom()
list.append(5) | Python | 1 |
hal::bsp_pins!(
/// GPIO 0 supports following functions:
///
/// | Function | Alias with applied function |
/// |--------------|-----------------------------|
/// | `SPI0 RX` | [crate::Gp0Spi0Rx] |
/// | `UART0 TX` | [crate::Gp0Uart0Tx] |
/// | `I2C0 SDA` | [crate... | Rust | 0 |
# -*- coding:utf-8 -*-
from os.path import exists
from os import sep, makedirs
from re import search
from configparser import RawConfigParser
from xml.etree.ElementTree import parse, ParseError
from shutil import copyfile
# 功能:得到有码车牌
# 参数:被大写后的视频文件名,素人车牌list
# 返回:发现的车牌
# 辅助:re.search
def find_num_lib(file_temp, list_... | Python | 1 |
import numpy as np
from sklearn.metrics import precision_score
def get_events(y_test, outlier=1, normal=0):
events = dict()
label_prev = normal
event = 0 # corresponds to no event
event_start = 0
for tim, label in enumerate(y_test):
if label == outlier:
if label_prev == normal... | Python | 1 |
<Identifier>>,
},
DoubleVec {
components: VecSize,
vtype: Option<Id<VecType>>,
space: Option<Id<Identifier>>,
},
FloatMat {
cols: VecSize,
rows: VecSize,
transform: Option<(Id<Identifier>, Id<Identifier>)>,
},
DoubleMat {
cols: VecSize,
... | Rust | 0 |
q,
Expr.Return,
),
'loc_CE1',
)
ChrTalk(
0x0105,
(
'#0060490380V#040F站着说话不太好吧,\n',
'不先找地方坐下吗?',
TxtCtl.Enter,
TxtCtl.Clear,
'#0060490381V这么多人\n',
'会给店里添麻烦的……',
TxtCtl.Enter,
)... | Python | 1 |
,
(current_beats.fract() * 100.) as u32,
current_seconds as u32 / 60,
current_seconds as u32 % 60,
(current_seconds.fract() * 100.) as u32,
);
igSameLine(0., 0.);
igSetCursorPosX(window_size.... | Rust | 0 |
sk_id: task_id.to_owned(),
task_result_file_id: task_result_file_id.map(|s| (*s).to_string()),
output_files: output_files
.iter()
.map(|&task_file| task_file.clone())
.collect(),
status: status.copied(),
};
TaskRequest::... | Rust | 0 |
"""
Plugin for ResolveURL
Copyright (C) 2021 gujal
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | Python | 1 |
}")]
InvalidArguments { name: &'static str },
#[cfg(feature = "python")]
#[error("Length of bytearray argument should be 3*ledCount")]
InvalidByteArray,
#[error("Effect aborted")]
EffectAborted,
#[error(transparent)]
InvalidImageData(#[from] RawImageError),
}
impl<T> From<tokio::sync::m... | Rust | 0 |
"""
Train a diffusion model on images.
"""
import argparse
from .core import dist_util, logger
from .core.image_datasets import load_data_celeba
from .core.resample import create_named_schedule_sampler
from .core.script_util import (
model_and_diffusion_defaults,
create_model_and_diffusion,
args_to_dict,
... | Python | 1 |
Face.Face()
face.ReadFromFile(srcRoot + "/scintilla/include/Scintilla.iface")
menuIDs = ReadMenuIDs(srcRoot + "/scite/src/SciTE.h")
idsInOrder = idsFromDocumentation(srcRoot + "/scintilla/doc/ScintillaDoc.html")
FileGenerator.Regenerate(srcRoot + "/scite/src/IFaceTable.cxx", "//", printIFaceTableCXXFile([face, fac... | Python | 1 |
e(-75),
tx_power: Some(127),
connected: true,
bonded: false,
service_uuids: vec![],
};
assert_eq!(peer.identifier, identifier);
}
}
use crate::empty::Empty;
use crate::semigroup::Semigroup;
pub trait Monoid<M>: Empty<M> + Semigroup<M> {}
use nom::numb... | Rust | 0 |
照段落分隔符分割开,生成带有段落标签的HTML代码。
- markdown_convertion: 用多种方式组合,将markdown转化为好看的html
- format_io: 接管gradio默认的markdown处理方式
- on_file_uploaded: 处理文件的上传(自动解压)
- on_report_generated: 将生成的报告自动投射到文件上传区
- clip_history: 当历史上下文过长时,自动截断
- get_conf: 获取设... | Python | 1 |
raceback.preserve_node_meta():
return checkpoint(Interpreter(gmod).run, *args, **kwargs)
else:
gmod = self.tag_nodes(gmod, is_sac=False)
# Using interpreter allows preservation of metadata through torch.compile stack.
# TODO: We want to use the same `checkpoin... | Python | 1 |
#
# Using the background style properties
#
style = lv.style_t()
style.init()
style.set_radius(5)
# Make a gradient
style.set_bg_opa(lv.OPA.COVER)
style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1))
style.set_bg_grad_color(lv.palette_main(lv.PALETTE.BLUE))
style.set_bg_grad_dir(lv.GRAD_DIR.VER)
# Shift the gra... | Python | 1 |
FUNCTION_ALREADY_DECLARED: ErrorCode = "E2301";
pub static INVALID_ASSIGNMENT_TARGET: ErrorCode = "E2400";
pub static VARIABLE_NOT_DECLARED: ErrorCode = "E2401";
pub static VARIABLE_NOT_INITIALIZED: ErrorCode = "E2402";
pub static CANNOT_REASSIGN_IMMUTABLE_VARIABLE: ErrorCode = "E2403";
pub static INVALID_RETURN_USA... | Rust | 0 |
pll_output_gate(&self) -> PLL_OUTPUT_GATE_R {
PLL_OUTPUT_GATE_R::new(((self.bits >> 27) & 1) != 0)
}
#[doc = "Bits 24:26 - PLL Lock Time"]
#[inline(always)]
pub fn pll_lock_time(&self) -> PLL_LOCK_TIME_R {
PLL_LOCK_TIME_R::new(((self.bits >> 24) & 7) as u8)
}
#[doc = "Bits 8:15 ... | Rust | 0 |
hash_found) => self.read_node(&hash_found)?,
None => Node::default(),
};
// update children
let child_hash = self.do_put(key, value, index - 1, &mut newbranch)?;
parent.children[flag] = Some(child_hash.to_vec());
let hash = self.write_node(&par... | Rust | 0 |
{
assert!(dev < MAX_DEV);
assert!(fcn < MAX_FUNC);
((bus_id as u16) << 8) | ((dev as u16) << 3) | (fcn as u16)
}
fn read_word(bus_addr: u16, wordidx: u8) -> u32
{
let addr = ((bus_addr as u32) << 8) | ((wordidx as u32) << 2);
//log_trace!("read_word(bus_addr={:x},idx={}) addr={:#x}", bus_addr, wordidx, addr);
:... | Rust | 0 |
"""Helper functions for modifying GameObject Stats.
"""
from __future__ import annotations
from neighborly.components.stats import Stat, Stats
from neighborly.ecs import GameObject
def add_stat(
gameobject: GameObject,
stat_id: str,
stat: Stat,
) -> Stat:
"""Add a new stat to the gameobject.
P... | Python | 1 |
# Field classes
from hachoir_core.field.field import Field, FieldError, MissingField, joinPath
from hachoir_core.field.bit_field import Bit, Bits, RawBits
from hachoir_core.field.byte_field import Bytes, RawBytes
from hachoir_core.field.sub_file import SubFile, CompressedField
from hachoir_core.field.character import C... | Python | 1 |
np.random.normal(0, 0.04, len(iterative_vals))
x_linear = 2 * np.ones(len(linear_vals)) + np.random.normal(0, 0.04, len(linear_vals))
ax.scatter(x_iter, iterative_vals, color='darkred', alpha=0.6, s=50)
ax.scatter(x_linear, linear_vals, color='darkblue', alpha=0.6, s=50... | Python | 1 |
eId;
use crate::{archetype::Archetype, proof::Skip};
use super::{Access, Fetch, ImmutableQuery, NonTrackingQuery, Query};
impl Fetch<'_> for Skip {
type Item = Skip;
#[inline]
fn dangling() -> Self {
Skip
}
#[inline]
unsafe fn skip_chunk(&self, _: usize) -> bool {
false
... | Rust | 0 |
e.add_text_arg("0", &self.tooltip);
let (x, y) = {
let state = &widget.borrow().state;
(state.position().x + state.size().width, state.position().y)
};
Widget::set_mouse_over_widget(widget, tooltip, x, y);
true
}
fn layout(&mut self, widget: &mut Widge... | Rust | 0 |
from PIL import Image
import os
# List of JPG files to be converted
jpg_files = ["image1.jpg", "image2.jpg", "image3.jpg","image4.jpg"]
# Create a new PDF file with PIL
pdf_file = Image.open(jpg_files[0])
pdf_file.save("images.pdf", save_all=True, append_images=[Image.open(jpg) for jpg in jpg_files[1:]])
# Print con... | Python | 1 |
s/1606.04797
"""
def __init__(self, elu=True, in_channels=1, classes=4,
init_features_maps=16): # input channels: the four modalities
super(VNet, self).__init__()
self.classes = classes
self.in_channels = in_channels
self.in_tr = InputTransition(in_channels, i... | Python | 1 |
Result<Project, Error>;
/// Retrieves the list of the projects.
async fn list_projects(&self) -> Result<Vec<Project>, Error>;
/// Retrieves the list of the removed projects,
/// which can be [unremoved](#tymethod.unremove_project)
/// or [purged](#tymethod.purge_project).
async fn list_remove... | Rust | 0 |
'6-O-(beta-D-glucuronide)(2-)',
'reason': 'Does not contain exactly one '
'deprotonated carboxyl group'},
{ 'smiles': 'C1[C@@]2([C@]3(CC[C@]4([C@]([C@@]3(CC[C@@]... | Python | 1 |
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
import insightconnect_plugin_runtime
import json
class Component:
DESCRIPTION = "This action resets password for Okta user and transitions user status to PASSWORD_EXPIRED, so that the user is required to change their password at their next login"
class Input:
TEMP... | Python | 1 |
(x1, y1-50,32, " " + self.labels[det_box[0]] + " " + str(round(det_box[1], 2)), color=(255, 0, 255, 0))
else:
pl.osd_img.clear() # 如果没有检测结果,清空屏幕
if __name__=="__main__":
# 添加显示模式,默认hdmi,可选hdmi/lcd/lt9611/st7701/hx8399/nt35516,其中hdmi默认置为lt9611,分辨率1920*1080;lcd默认置为st7701,分辨率800*480
d... | Python | 1 |
Printed in one line
else:
x_message = f'\nThe corresponding X is:\n{x}'
if is_constrained and present(constr):
if np.size(constr) <= 2:
constr_message = f'\nThe constraint value is: {constr}' # Printed in one line
else:
constr_message = f'\nThe constraint value... | Python | 1 |
&self) -> bool {
self.dwrite_font.is_monospace().unwrap_or(false)
}
/// Returns the values of various font properties, corresponding to those defined in CSS.
pub fn properties(&self) -> Properties {
let dwrite_font = &self.dwrite_font;
Properties {
style: style_for_dwrit... | Rust | 0 |
or<'file>;
type Section = WasmSection<'file>;
type SectionIterator = WasmSectionIterator<'file>;
type SymbolIterator = WasmSymbolIterator<'file>;
fn machine(&self) -> Machine {
Machine::Other
}
fn segments(&'file self) -> Self::SegmentIterator {
WasmSegmentIterator {
... | Rust | 0 |
_mouse_interaction > mouse_interaction {
mouse_interaction = new_mouse_interaction;
}
primitives.push(tab_content_primitive);
}
(Primitive::Group { primitives }, mouse_interaction)
}
}
#[macro_export]
macro_rules! anyhowize {
($e:expr) => {
Error... | Rust | 0 |
hasher.input(tweak);
Hmac::from_engine(hasher).into_inner()
};
let mut tweak_key = pub_key.key;
tweak_key
.add_exp_assign(self.secp, &hashed_tweak)
.expect("tweaking failed");
CompressedPublicKey { key: tweak_key }
... | Rust | 0 |
: u32 = 33554432u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Rras'*"]
pub const RASEO2_DisableClassBasedStaticRoute: u32 = 524288u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Rras'*"]
pub const RASEO2_DisableIKENameEkuCheck: u32 = 262144u32;
#[doc = "*Required features: 'Win32_NetworkManageme... | Rust | 0 |
from polars.io.ipc.functions import read_ipc, read_ipc_schema, read_ipc_stream, scan_ipc
__all__ = [
"read_ipc",
"read_ipc_schema",
"read_ipc_stream",
"scan_ipc",
]
| Python | 1 |
en = ImageDataGenerator(rotation_range=8, width_shift_range=0.08, shear_range=0.3,
height_shift_range=0.08, zoom_range=0.08)
test_gen = ImageDataGenerator()
# Train the model.
# Horovod: the training will randomly sample 1 / N batches of training data and
# 3 / N batches of validation da... | Python | 1 |
s & FUNC_SLAVE) > 0
}
/// Indicates whether 10-bit addresses are supported.
pub fn addr_10bit(self) -> bool {
(self.funcs & FUNC_10BIT_ADDR) > 0
}
/// Indicates whether I2C Block Read is supported.
pub fn i2c_block_read(self) -> bool {
(self.funcs & FUNC_SMBUS_READ_I2C_BLOCK) >... | Rust | 0 |
{
Regular(String),
Quoted(String),
Distinct(String),
Skolem(usize),
Definition(usize),
}
pub(crate) struct Symbol {
pub(crate) arity: u32,
pub(crate) name: Name,
#[cfg(feature = "smt")]
pub(crate) is_predicate: bool,
}
impl Symbol {
pub(crate) fn is_distinct_object(&self) -> b... | Rust | 0 |
from .transducer import TransducerJoint
from .transducer import TransducerLoss | Python | 1 |
# Copyright 2022-present, Lorenzo Bonicelli, Pietro Buzzega, Matteo Boschini, Angelo Porrello, Simone Calderara.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import torch
from datasets import get_dataset
from models impo... | Python | 1 |
python3 scripts/run_bandwidth_probe.py config/bandwidth_probe.yaml
| Python | 1 |
SAFE_JOIN_OPPORTUNITY,
method_arg_span,
"join of a non-constant path",
None,
&format!(
"{}change this to `safe_join({})?`",
import_msg, arg_snippet
),
);
... | Rust | 0 |
onfig(&self) -> Option<IPConfig> {
unsafe {
from_glib_none(nm_sys::nm_device_get_ip6_config(
self.as_ref().to_glib_none().0,
))
}
}
fn get_ip_iface(&self) -> Option<GString> {
unsafe {
from_glib_none(nm_sys::nm_device_get_ip_iface(
... | Rust | 0 |
de(rename = "SRG")]
Srg,
/// Swedish Krona
#[serde(rename = "SEK")]
Sek,
/// Swiss Franc
#[serde(rename = "CHF")]
Chf,
/// <NAME>
#[serde(rename = "SYP")]
Syp,
/// <NAME>
#[serde(rename = "TJR")]
Tjr,
/// Taka
#[serde(rename = "BDT")]
Bdt,
/// Tala
#[serde(rename = "WST")]
Wst,
/// Tanzanian Shillin... | Rust | 0 |
"
"Se for de manhã entre 8:00 e 12:00, pergunte ao usuário se ele quer saber sobre os e-mails não lidos. "
),
#response_format="text",
)
# ====== CHATBOT STREAMING ======
def chatbot(user_input, thread_id):
config = {"configurable": {"thread_id": thread_id, "session_timeout": 3600}}
... | Python | 1 |
ocess gas limit.
type ProcessGasLimit: Get<Gas>;
}
decl_storage! {
trait Store for Module<T: Trait> as Actors {
/// Current cost schedule for contracts.
CurrentSchedule get(fn current_schedule) config(): Schedule = Schedule::default();
/// A mapping from an original code hash to the original code, untouched by... | Rust | 0 |
_fast_processor()
print()
self.test_api_endpoints()
print()
self.test_processing_speed()
print()
self.test_timeout_handling()
print()
# Mostrar resultados
self.show_test_results()
return self.tes... | Python | 1 |
one)]
pub struct fr_proto_pvc {
pub dlci: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct fr_proto_pvc_info {
pub dlci: ::std::os::raw::c_uint,
pub master: [::std::os::raw::c_char; 16usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct cisco_proto {
... | Rust | 0 |
from django.contrib import admin
from .models import Book
from django.contrib.auth.admin import UserAdmin
from .models import CustomUser
class BookAdmin(admin.ModelAdmin):
list_display = ('title', 'author', 'publication_year') # columns to show
search_fields = ('title', 'author') # searcha... | Python | 1 |
}
impl InitableImpl for InitableTestType {
fn init(
&self,
_initable: &Self::Type,
_cancellable: Option<&Cancellable>,
) -> Result<(), glib::Error> {
self.0.set(0x123456789abcdef);
Ok(())
... | Rust | 0 |
z")) |
value!(Domain::HybridH, tag_no_case!("h")) |
value!(Domain::HybridG, tag_no_case!("g"))
) >>
(v)
))) >>
format: opt!(complete!(do_parse!(
many1!(space) >>
v: alt!(
... | Rust | 0 |
"""
Generates a quintic polynomial trajectory.
Author: Daniel Ingram (daniel-s-ingram)
"""
import numpy as np
class TrajectoryGenerator():
def __init__(self, start_pos, des_pos, T, start_vel=[0,0,0], des_vel=[0,0,0], start_acc=[0,0,0], des_acc=[0,0,0]):
self.start_x = start_pos[0]
self.start_y = ... | Python | 1 |
())
}
}
pub fn into_kind(self) -> Result<BlockType> {
match self {
AnyValue::BlockType(value) => Ok(value),
_ => Err(invalid_type())
}
}
pub fn into_channel_list(self) -> Result<ChannelList> {
match self {
AnyValue::ChannelList(value)... | Rust | 0 |
fn test_chown_file_notexisting() {
// test chown username not_existing
let scene = TestScenario::new(util_name!());
let result = scene.cmd("whoami").run();
if skipping_test_is_okay(&result, "whoami: cannot find name for user ID") {
return;
}
let user_name = String::from(result.stdout_... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.