text string | label_name string | labels int64 |
|---|---|---|
CueAction
:param quiet: If True `all_executed` is not emitted
:type quiet: bool
"""
for cue in self.cues():
cue.execute(action)
if not quiet:
self.all_executed.emit(action)
def stop_all(self):
if self.app.conf.get("layout.stopAllFade", False)... | Python | 1 |
index, self.len() + 1)?;
unsafe { cv_VectorOfPlatformInfo_insert(self.as_raw_mut_VectorOfPlatformInfo(), index, val.as_raw_mut_PlatformInfo()) }
Ok(())
}
#[inline]
fn set(&mut self, index: size_t, mut val: core::PlatformInfo) -> Result<()> {
extern "C" { fn cv_VectorOfPlatformInfo_set(instance: *mut c_... | Rust | 0 |
def maximumSegments(n, a, b, c):
dp = [-1] * (n + 10)
dp[0] = 0
for i in range(0, n):
if (dp[i] != -1):
if i + a <= n:
dp[i + a] = max(dp[i] + 1, dp[i + a])
if i + b <= n:
dp[i + b] = max(dp[i] + 1, dp[i + b])
if i + c <= n:
... | Python | 1 |
l {
if a == b {
return true;
}
let thresh = 0.1 / ((10i32.pow(cmp_decimals)) as f32);
let diff = (a - b).abs();
diff <= thresh
}
/// An in memory representation of a Weld vector.
#[derive(Clone, Debug)]
#[allow(dead_code)]
#[repr(C)]
struct WeldVec<T> {
data: *const T,
len: i64,
}
... | Rust | 0 |
# -*- coding: utf-8 -*-
"""
代理績效監控面板組件
此模組提供實時績效追蹤和可視化分析,包括:
- 實時績效指標監控
- 交互式圖表和可視化
- 代理排名和績效對比
- 歷史績效回測和分析
主要功能:
- 多維度績效指標
- 實時數據更新
- 交互式圖表
- 績效對比分析
- 風險收益分析
"""
import streamlit as st
import pandas as pd
import numpy as np
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import ma... | Python | 1 |
bv_from_u32(4, width);
let eight = state.bv_from_u32(8, width);
let sixteen = state.bv_from_u32(16, width);
// if x = 0 we'll eventually return `width`
let x_eq_0 = x._eq(&zero);
// n <- 0
let n = zero.clone();
match width {
32 => {
// if (x & 0x0000FFFF) = 0: n <- n + ... | Rust | 0 |
Ok(("", GoodToolsToken::DumpCode("h", Some("2"), Some("IR"), None, None, Some("ff"))))
);
assert_eq!(parse_dump_tag("h")("[hMF6]"),
Ok(("", GoodToolsToken::DumpCode("h", None, Some("MF"), None, None, Some("6"))))
);
assert_eq!(parse_dump_tag("h")("[h1+2C]"),
... | Rust | 0 |
GovQueryMsg>(x).unwrap() {
GovQueryMsg::Staker { address } => to_binary(&StakerResponse {
balance: match address.as_str() {
"tester_1" => Uint128::from(5u64),
"tester_2" => Uint128::from(15u64),
_ => Uint128::zero(),
... | Rust | 0 |
x0a\x00\x00\x00\x0dIHDR\x00\
\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\
\x00\x00\x00\x19tEXtSoftware\
\x00Adobe ImageRead\
yq\xc9e<\x00\x00\x03$iTXtXML\
:com.adobe.xmp\x00\x00\
\x00\x00\x00<?xpacket beg\
in=\x22\xef\xbb\xbf\x22 id=\x22W5M\
0MpCehiHzreSzNTc\
zkc9d\x22?> <x:xmpm\
eta xmlns:x=\x22ado\
be:ns:meta/\... | Python | 1 |
DEFAULT_ANALYSIS_WIDGETS = [
{
"id": 'AnalysisLayout',
"type": 'AnalysisLayout',
"metadata": {
"name": '布局组件',
},
"properties": {
"showFloatPanel": False,
"showSidePanel": False,
"showBottomPanel": False,
},
},
{... | Python | 1 |
fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d" and base58 "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" in westend network
const BOB: &[u8] = &[
142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147,
201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106,... | Rust | 0 |
Key};
use async_rustls::rustls::Certificate as RustlsCertificate;
use async_rustls::rustls::{ClientHello, PrivateKey, ResolvesServerCert};
use async_std::path::Path;
use async_std::task::sleep;
use chrono::Utc;
use futures::future::try_join_all;
use pem::PemError;
use rcgen::{CertificateParams, DistinguishedName, Rcgen... | Rust | 0 |
n is_mature(
&self,
tx: &transaction::Transaction,
head_header: &block::BlockHeader,
) -> Result<(), PoolError> {
if head_header.height < tx.lock_height() {
return Err(PoolError::ImmatureTransaction {
lock_height: tx.lock_height(),
});
}
Ok(())
}
}
#[cfg(test)]
mod tests {
use super::*;
use c... | Rust | 0 |
# -*- coding: utf-8 -*- #
# Copyright 2015 Google LLC. 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 requir... | Python | 1 |
eplace_user;
pub use create_collection::*;
pub use create_database::*;
pub use create_document::*;
pub use create_or_replace_attachment::*;
pub use create_or_replace_slug_attachment::*;
pub use create_or_replace_trigger::*;
pub use create_or_replace_user_defined_function::*;
pub use create_permission::*;
pub use creat... | Rust | 0 |
F_RECORD_NAMESPACES: perf_event_type = 16;
pub const perf_event_type_PERF_RECORD_MAX: perf_event_type = 17;
pub type perf_event_type = u32;
pub const perf_callchain_context_PERF_CONTEXT_HV: perf_callchain_context = 18446744073709551584;
pub const perf_callchain_context_PERF_CONTEXT_KERNEL: perf_callchain_context = 1844... | Rust | 0 |
a
d3 @ s d Z g dZddlZddlZddlZddlT ddlmZmZ ddlZdZ dZ
dZG dd d ejZ
dddddddddd
dZedddfddZeddfddZdS )aS Interface to the liblzma compression library.
This module provides a class for reading and writing compressed files... | Python | 1 |
DeviceFragmentShaderBarycentricFeaturesNV.html) · Structure"]
#[doc(alias = "VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV {
pub s_type: crate::vk1_0::StructureType,
pub p_next: *mut std::ffi::c_void,
pub... | Rust | 0 |
teRef::from_static(":review/book"))
//! .match_value(1)
//! .entity();
//! ```
use std::ops::Deref;
use crate::types::AttributeRef;
use crate::{soup::Encoded, Value, ValueRef};
/// A borrowing type alias for [`GenericNetwork`] using [`ValueRef`].
///
/// TODO this doesn't work for some reason. The compiler k... | Rust | 0 |
import pandas as pd
import numpy as np
import pyaf.ForecastEngine as autof
import pyaf.Bench.TS_datasets as tsds
#get_ipython().magic('matplotlib inline')
import datetime as dt
from dateutil.relativedelta import relativedelta
def addMinutes(iTime , iMinutes):
lTime = iTime
date_after_minutes = lTime + relati... | Python | 1 |
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import Table
from sqlalchemy.sql import text
from alembic import testing
from alembic.testing import eq_
from alembic.testing.fixtures import FutureEngineMixin
from alembic.testing.fixtures import TablesTest
class ImplTest(TablesTest):
... | Python | 1 |
from typing import Annotated
from nonebot import get_bot, on_command
from nonebot_plugin_apscheduler import scheduler
from nonebot.adapters.onebot.v11 import Bot, Message, MessageSegment
from src.provider.kv.utils import GetValue, get_value
@on_command("passnat").handle()
@scheduler.scheduled_job("cron", day="*", h... | Python | 1 |
x_repmax1 = [dt.datetime.strptime(d,"%Y-%m-%d").date() for d in repmax1_dates]
#x_repmax3 = [dt.datetime.fromtimestamp(d).date() for d in repmax3_dates]
x_repmax3 = [d for d in repmax3_dates]
x_repmax3 = x_repmax1
#x_barchart = [dt.datetime.fromtimestamp(d).date() for d in barchart_dates]
x_barchart = [d for d ... | Python | 1 |
import socket
import argparse
RED = "\033[91m"
GREEN = "\033[92m"
RESET = "\033[0m"
def conexão_ftp(ip):
try:
tcp = socket.socket((socket.AF_INET, socket.SOCK_STREAM))
tcp.connect(ip, 21)
#enviando conexão
print(f"{RED}Conectando ao servidor...{RESET}")
banner = tc... | Python | 1 |
norm();
return n3.nbits();
}
/* prepare for multi-pairing */
pub fn initmp() -> [FP48; rom::ATE_BITS] {
let r: [FP48; rom::ATE_BITS] = [FP48::new_int(1); rom::ATE_BITS];
return r
}
/* basic Miller loop */
pub fn miller(r:&[FP48]) -> FP48 {
let mut res=FP48::new_int(1);
for i in (1..rom::ATE_BITS).... | Rust | 0 |
import os.path
import sys
import traceback
import PIL.Image
import numpy as np
import torch
from basicsr.utils.download_util import load_file_from_url
import modules.upscaler
from modules import devices, modelloader
from scunet_model_arch import SCUNet as net
class UpscalerScuNET(modules.upscaler.Upscaler):
def... | Python | 1 |
from .utils import kconfig_contains
# Based on Linux Kernel 5.9
# arch/mips/Kconfig
# menu 'CPU selection'
_mips32_v1 = ['CPU_MIPS32_R1']
_mips32_v2 = ['CPU_MIPS32_R2']
_mips32_v5 = ['CPU_MIPS32_R5']
_mips32_v6 = ['CPU_MIPS32_R6']
_mips64_v1 = ['CPU_MIPS64_R1']
_mips64_v2 = ['CPU_MIPS64_R2']
_mips64_v5 = ['CPU_MIPS... | Python | 1 |
u16,
api_port: params.api_base_port + id_u16,
hbbft_pk: *netinf.public_key(&id).unwrap(),
};
(id, peer)
})
.collect::<BTreeMap<_, _>>();
let (wallet_server_cfg, wallet_client_cfg) =
WalletConfig::truste... | Rust | 0 |
to(Coord2(5.0, 1.0))
.line_to(Coord2(1.0, 1.0))
.build();
let rectangle2 = BezierPathBuilder::<SimpleBezierPath>::start(Coord2(11.0, 1.0))
.line_to(Coord2(11.0, 5.0))
.line_to(Coord2(15.0, 5.0))
.line_to(Coord2(15.0, 1.0))
.line_to(Coord2(11.0, 1.0))
.build();... | Rust | 0 |
"""
Module to store a str enum class representation of expire date.
"""
from enum import StrEnum
__all__ = ["Expire"]
class Expire(StrEnum):
"""
A str enum class that define valid expiration date.
Attributes:
NEVER (str): `"N"`, never expire
TEN_MINUTES (str): `"10M"`, expire after ten ... | Python | 1 |
many units
}
/// KeyboardReport describes a report and its companion descriptor that can be
/// used to send keyboard button presses to a host and receive the status of the
/// keyboard LEDs.
#[gen_hid_descriptor(
(collection = APPLICATION, usage_page = GENERIC_DESKTOP, usage = KEYBOARD) = {
(usage_page = ... | Rust | 0 |
16 | TextEncoding::UTF16BE => {
while let (Ok(b1), Ok(b2)) = (reader.read_u8(), reader.read_u8()) {
if b1 == 0 && b2 == 0 {
break;
}
text_bytes.push(b1);
text_bytes.push(b2)
}
},
}
(!text_bytes.is_empty()).then(|| text_bytes)
}
pub(crate) fn utf16_decode(reader: &[u8], endianness: fn([... | Rust | 0 |