text string | label_name string | labels int64 |
|---|---|---|
(0x00000000, 'loc_3EA2'),
(0x00000001, 'loc_4047'),
(0x00000002, 'loc_408A'),
(0x00000003, 'loc_41AB'),
(0x00000004, 'loc_430E'),
(0x00000005, 'loc_4984'),
(0x00000006, 'loc_4B7D'),
(0x00000007, 'loc_4C12'),
(-1, 'loc_4C76'),
)
def _loc_3EA2(): ... | Python | 1 |
# %%
"""
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Image/get_image_id.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" ... | Python | 1 |
_Input, P1_Input, P3_Input, P2_Input,
P3_Input,
] {
let _ = ingress
.send(Instruction::Data(InputMessage {
sender: Default::default(),
body: msg_type,
}))
.await;
log::trace!("message sent... | Rust | 0 |
c.space())
.append(lhs.to_doc(alloc, interner))
.append(alloc.text(","))
.append(alloc.space())
.append(rhs.to_doc(alloc, interner)),
Self::Div(lhs, rhs) => alloc
.text("div")
.append(alloc.space())
... | Rust | 0 |
.aabb, self.num_dim, dim=-1)
positions = (positions - aabb_min) / (aabb_max - aabb_min)
selector = ((positions > 0.0) & (positions < 1.0)).all(dim=-1)
density_before_activation = (
self.mlp_base(positions.view(-1, self.num_dim), **kwargs)
.view(list(positions.shape[:... | Python | 1 |
x.mul_assign(&self.beta_g1);
debug_assert!(E::G1Affine::from_xy_checked(x, y).is_ok());
E::G1Affine::from_xy_unchecked(x, y)
}
}
pub fn bn254_endomorphism_parameters() -> EndomorphismParameters<crate::bellman::pairing::bn256::Bn256> {
let empty_fr_repr = crate::bellman::pairing::bn256::Fr... | Rust | 0 |
b"key1".to_vec(), b"foo".to_vec())],
);
store.put(Context::default(), vec![(b"k".to_vec(), b"box".to_vec())]);
store.commit();
assert_eq!(
store.export(),
vec![
(b"k".to_vec(), b"box".to_vec()),
(b"key1".to_vec(), b"foo".to_vec()),... | Rust | 0 |
# Content:
# def lib2_func():
def lib2_func():
"""_summary_."""
print("lib2_func")
def lib20_func():
"""_summary_."""
print("lib20_func")
| Python | 1 |
for _ in 0..to_remove {
if n_first > n_second {
n_first -= 1;
} else {
n_second -= 1;
}
}
encoding.truncate(n_first, params.stride);
if let Some(encoding) = pair_encoding.as_mut() {
... | 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 |
config(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::InputDataConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
if let Some(var_238) = &input.dataset_group_arn {
object.key("DatasetGroupArn").string(var_238.as_str());
}
if let Some(... | Rust | 0 |
icon_url: Option<Cow<'a, str>>,
}
impl <'a> EmbedAuthor<'a> {
pub fn new(name: impl Into<Cow<'a, str>>) -> Self {
EmbedAuthor::default().name(name)
}
}
new_from_str!(EmbedAuthor);
/// An field in a message embed.
#[derive(Serialize, Deserialize, Clone, PartialOrd, Ord, Eq, PartialEq, Debug, Hash)]
#[derive(Setters... | Rust | 0 |
목")
# 3. 배치별 처리
total_success = 0
total_news = 0
total_failed = 0
for idx, (stock_code, company_name) in enumerate(all_stocks):
try:
# 간단한 진행률 표시 (매 종목마다 출력하지 않음)
if idx % 50 == 0 or idx < 10:
progr... | Python | 1 |
s2);
assert_eq!("Mismatched types: String and Float",
match op.apply() {
Err(e) => e.to_string(),
_ => unreachable!()
}
);
}
#[test]
fn floats_and_string_error(string1 in ".*", f in prop::num::f64::ANY) {
let s2 =... | Rust | 0 |
false
}
}
/// The values of a voxel.
///
/// Most values are only intermediate value set during the
/// voxelization process. The only values output after the
/// voxelization is complete are `PrimitiveOutsideSurface`,
/// `PrimitiveInsideSurface`, and `PrimitiveOnSurface`.
#[derive(Copy, Clone, Debug, Pa... | Rust | 0 |
engine_stats["total_time"] += processing_time
engine_stats["total_confidence"] += confidence
if success:
engine_stats["success"] += 1
if language not in self.stats["by_language"]:
self.stats["by_language"][language] = {"count": 0, "success": 0}
lang_stats = ... | Python | 1 |
//! ```rust
//! use kafka_protocol::messages::{RequestHeader, ApiVersionsRequest, ApiKey, RequestKind};
//! use kafka_protocol::protocol::{Encodable, Decodable, StrBytes};
//! use bytes::{BytesMut, Buf};
//! use std::convert::TryFrom;
//! use kafka_protocol::protocol::buf::ByteBuf;
//! # let mut buf = BytesMut::new();
... | Rust | 0 |
_buttons.rs
use crate::api;
use crate::components::atoms::bb_button::BBButton;
use crate::components::atoms::bb_link::{BBLink, LinkType};
use crate::router::Route;
use crate::store::{remove_task_by_id, StoreType};
use serde::{Deserialize, Serialize};
use stylist::yew::styled_component;
use yew::prelude::*;
use yew_rout... | Rust | 0 |
10.3847/1538-3881/abd414. '
'Accessed via JPL Solar System Dynamics, https://ssd.jpl.nasa.gov, '
'solution date: 2021-May-24 17:55:05')
orbit_eccentricity = _Constant(
abbrev='orbit_eccentricity_eros',
name='Eccentricity of the orbit of (433) Eros about the Sun',
value=0.2227966940876033,
unit=... | Python | 1 |
# Copyright (c) Saga Inc.
# Distributed under the terms of the GNU Affero General Public License v3.0 License.
from evals.eval_types import DebugPromptGenerator, NotebookState
__all__ = ["prod_prompt_v1_generator"]
class _ProdPromptV1Generator(DebugPromptGenerator):
prompt_name = "prod_prompt_v1"
def get_pr... | Python | 1 |
relationship_instance.__dict__))
else:
logger.info(
'Existing AdvanceFilter + country relationship updated: {0}'.format(
relationship_instance.__dict__))
if options.get('r... | Python | 1 |
yVault_P',
'/Game/Maps/Zone_1/Monastery/Monastery_P',
'/Game/Maps/Zone_1/OrbitalPlatform/OrbitalPlatform_P',
'/Game/Maps/Zone_1/Outskirts/Outskirts_P',
'/Game/Maps/Zone_1/Towers/Towers_P',
'/Game/Maps/Zone_2/Mansion/Mansion_P',
'/Game/Maps/Zone_2/MarshFields/MarshFields_P... | Python | 1 |
ftueqkx4zy, b'', '', csp13vz0hb6=m9mq3785omc, x22vo2__c5o=False, l3074oi052q=n4ce3b3tt10)
def wsiu5rmbfc9(kgej4f6ip9g: xv3v6cbnk54=0j, wjv_6gwo8l_=None, hw5868zuv2n: rajpb_mfmtq='', nex02wbfuzz: e7x8fuxc60n=0.0, x8wguv36tgm=0):
global nknoc0tir5l
'# difficulties_punches_electrolyte -> trick_relief_swing'
ra... | Python | 1 |
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_NV_ENC_MAP_INPUT_RESOURCE>())).subResourceIndex as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_NV_E... | Rust | 0 |
import sublime
import sublime_plugin
class bookmarkWatcher(sublime_plugin.EventListener):
def on_activated_async(self, view):
sublime.active_window().run_command("sublime_bookmark",
{"type": "mark_buffer"})
sublime.active_window().run_command("sublime_b... | Python | 1 |
sxValidator",
"._name.NameValidator",
"._metasrc.MetasrcValidator",
"._meta.MetaValidator",
"._marker.MarkerValidator",
"._line.LineValidator",
"._legendwidth.LegendwidthValidator",
"._legendrank.LegendrankValidator",
"._leg... | Python | 1 |
from lc import *
class Solution:
def subarraysDivByK(self, nums: List[int], k: int) -> int:
r=p=0
c = [1] + [0] * k
for x in nums:
p = (p + x) % k
r += c[p]
c[p] += 1
return r
class Solution:
def subarraysDivByK(self, nums: List[int], k: int)... | Python | 1 |
ps. Only supports PyTorch.
Args:
outputs ([`BeitForSemanticSegmentation`]):
Raw outputs of the model.
target_sizes (`List[Tuple]` of length `batch_size`, *optional*):
List of tuples corresponding to the requested final size (height, width) of each predict... | Python | 1 |
[linkage="external"]
extern fn __modsi3(n: i32, d: i32) -> i32 {
__aeabi_idivmod(n, d).rem
}
#[no_mangle]
#[linkage="external"]
extern fn __mulodi4(_a: i32, _b: i32, _of: &mut i32) -> i32 {
panic!("");
}
}
use iced::{Command, Element, Subscription};
mod app_config;
mod main;
mod streams;
pub use app_co... | Rust | 0 |
> = HashMap::new();
let mut name_to_max_position: HashMap<Name, usize> = HashMap::new();
for scc in sccs.iter().rev() {
let pos = scc
.iter()
.flat_map(|&n| colimit.neighbors_directed(n, petgraph::EdgeDirection::Incoming))
.filter_map(|s| name_to_min_position.get(&co... | Rust | 0 |
pl_trait!(BBO, GateLinearSwapWSClient, subscribe_bbo, "futures.book_ticker", to_raw_channel);
#[rustfmt::skip]
impl_trait!(Ticker, GateLinearSwapWSClient, subscribe_ticker, "futures.tickers", to_raw_channel);
fn to_candlestick_raw_channel(pair: &str, interval: usize) -> String {
to_candlestick_raw_channel_shared("... | Rust | 0 |
in result
assert "please make sure that the URI begins with a schema:" not in result
def test_no_redundant_fo_message(self) -> None:
result = self.check_domain("redundant-fo.dmarc." + TEST_DOMAIN)
assert not re.search(INCORRECT_CONFIG_REGEX, result)
assert re.search(CORRECT_CONFIG_R... | Python | 1 |
finally:
self.assertEqual(called, run.called)
return resources
def test_enrich_and_finalize_inventory(self):
self.plugin['install'] = True
self._inventory_cert()['data'] = {'cert': 'cert-old', 'key': 'key-old'}
self._procedure_cert()['data'] = {'cert': 'cer... | Python | 1 |
)|°"#)?,
|a, _| {
Ok(TemperatureValue {
value: a.value().value,
unit: Some("degree"),
latent: false,
})
});
b.rule_2("<temp> Celsius",
temperature_check!(),
b.reg(r#"c... | Rust | 0 |
t_acc_block += tl.dot(
values_block, dense_block, allow_tf32=allow_tf32, out_dtype=acc_dtype
)
# move val/col_index ptrs to the next block in the row
values_block_ptrs += values_nnz_stride
col_index_nnz_ptr += col_indices_stride
if not alpha_is_o... | Python | 1 |
from __future__ import annotations
from ...typing import Messages
from ...requests import StreamSession
from ..base_provider import AsyncProvider, format_prompt
class ChatgptDuo(AsyncProvider):
url = "https://chatgptduo.com"
supports_gpt_35_turbo = True
working = False
... | Python | 1 |
zb8k
nonlocal awi8e92_9rb
'# hospitals_repairs_hoses -> difficulties_rain_pitches'
'# hospitals_repairs_hoses -> difficulties_rain_pitches'
from ou0i4puh4q4 import tran_a6h47q, hm4h1vk8i4i as nvkctut5mim, zqsf3utumbp as mmakrzzoe86, rsm4q96lbq1, mfpzax1a4vl, po5tuzsq4ew as qdd3622dmuz, h5___me5dhc as x3... | Python | 1 |
f part2 {
match rules.len() >= 12 {
true => {
rules[8] = Rule::Multi(vec![vec![42], vec![42, 8]]);
rules[11] = Rule::Multi(vec![vec![42, 31], vec![42, 11, 31]])
}
false => bail!("Invalid input"),
}
}
let rules = rules;
// ... | Rust | 0 |
msg_indent_amount = 2 * NUM_INDENT.fetch_add(0, Ordering::Relaxed) + 2;
let msg_indent = compute_indent_whitespace(msg_indent_amount);
let mut final_message = "\n".to_string();
for line in $msg().lines() {
final_message += &format!("{}{}\n", msg_indent, line,);
... | Rust | 0 |
::from_str(&yaml_data)?;
Ok(pipeline)
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PipelineDef {
pub name: String,
pub globals: LinkedHashMap<String, String>,
pub stages: Vec<StageDef>,
#[serde(default = "default_steps")]
pub steps: Vec<PipelineStepDef>,
#[serde(default =... | Rust | 0 |
VaSCript:alert(9) autofocus'
360, // '<script>alert(12)</script>'
564, // '<IMG SRC="jav ascript:alert('214');">'
569, // '<IMG SRC="  javascript:alert('219');">'
729, // 'Powerلُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ冗'
730, // '🏳0🌈️'
731, // 'జ్ఞా'
737, // 'گچپژ'
];
// #[tokio::test]
// asyn... | Rust | 0 |
sh the fullscreen management when implementing layout management.
/// Container that wraps a `visualization::Instance` for rendering and interaction in the GUI.
///
/// The API to interact with the visualization is exposed through the `Frp`.
#[derive(Clone, CloneRef, Debug, Derivative, Shrinkwrap)]
#[allow(missing_doc... | Rust | 0 |
lone, Copy, Debug)]
pub struct AST_STR {
start: usize,
end: usize
}
/// AST object of es6 schema
#[allow(missing_docs)]
#[derive(Debug)]
pub enum JS_AST {
empty,
method { name: AST_STR, args: Vec<JS_AST> },
object { properties: Vec<(AST_STR, JS_AST)> },
bool { state: bool },
string { add... | Rust | 0 |
import re
import matplotlib.pyplot as plt
def extract_rtt_values_final_pattern(filename):
with open(filename, "r") as file:
content = file.readlines()
# Final regular expression to extract RTT, SRTT, and RTTVAR values with parentheses
pattern = re.compile(r"Updating RTT \((\d+) ms\), SRTT \((\d+)... | Python | 1 |
import requests
from bs4 import BeautifulSoup
from flask import Flask, request
from utils import *
from utils import *
def obtener_imagen_calle(lat, lon, calle):
print(f"{datetime.datetime.now().strftime('%H:%M:%S')}: Foto google")
url=f"https://www.google.com/maps?t=k&q={lat},{lon}"
response = request... | Python | 1 |
# Copyright 2009-2017 Ram Rachum.
# This program is distributed under the MIT license.
import uuid
import pickle
import itertools
import collections
from python_toolbox import cute_iter_tools
from python_toolbox import sequence_tools
from python_toolbox import cute_testing
from python_toolbox.nifty_collections impo... | Python | 1 |
from typing import Sequence, Tuple
import pytest
from canarytokens.tokens import Canarytoken
from canarytokens.wireguard import (
AEAD,
HMAC1,
HMAC2,
KDF1,
KDF2,
clientConfig,
deleteCanarytokenPrivateKey,
generateCanarytokenPrivateKey,
getDevices,
hash,
mixhash,
mixKey,... | Python | 1 |
tim_params(cfg: dict, model: nn.Module):
"""
E.g.:
^(?=.*a)(?=.*b).*$ means including a and b
^(?=.*(?:a|b)).*$ means including a or b
^(?=.*a)(?!.*b).*$ means including a, but not b
"""
assert 'type' in cfg, ''
cfg = copy.deepcopy(cfg)
... | Python | 1 |
t {
let _u = record(Stat::GetFpu);
let this = &mut *this;
let fpu = from_raw_parts_mut(fpu as *mut u8, size_of::<kvm_fpu>());
let ret = this.get_state(VcpuRequest_StateSet::FPU, fpu);
to_crosvm_rc(ret)
}
#[no_mangle]
pub unsafe extern "C" fn crosvm_vcpu_set_fpu(this: *mut crosvm_vcpu, fpu: *const k... | Rust | 0 |
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from source_strava.run import run
if __name__ == "__main__":
run()
| Python | 1 |
) = <u16>::from_bytes(&bytes[index..])?;
index += sz;
let (context, sz): (Pcontext, usize) = <Pcontext>::from_bytes(&bytes[index..])?;
index += sz;
let (cancel, sz): (bool, usize) = <bool>::from_bytes(&bytes[index..])?;
index += sz;
Some((
NotifyEvent {
... | Rust | 0 |
roAssembler, args: &[BuiltinType], offset_args: i32) {
let mut reg_idx = 0;
let mut freg_idx = 0;
let mut idx = 0;
for &ty in args {
let mode = ty.mode();
let is_float = mode.is_float();
let offset = offset_args + idx as i32 * 8;
if is_float && freg_idx < FREG_PARAMS.le... | Rust | 0 |
ait for other threads to finish.
while GLOBAL_THREAD_COUNT.load(Ordering::SeqCst) != 0 {
thread::sleep(Duration::from_millis(1));
}
// Give some time for writes to finish otherwise, it would close the app without writing to stdout.
thread::sleep(Duration::from_millis(1000));
}
pub fn insert_fi... | Rust | 0 |
}
}
/** LossyFrom `u16` to `u8` */
impl LossyFrom<u16> for u8 {
fn lossy_from(val: u16) -> u8 {
val as u8
}
}
/** LossyFrom `u16` to `u32` */
impl LossyFrom<u16> for u32 {
fn lossy_from(val: u16) -> u32 {
u32::from(val)
}
}
/** LossyFrom `u16` to `u64` */
impl LossyFrom<u16> for u6... | Rust | 0 |
ot_dir=res_path)
for seq in tqdm(list(self.dataset.get_sequences())):
all_gt_masks, all_void_masks, all_masks_id = self.dataset.get_all_masks(seq, True)
if self.task == 'semi-supervised':
all_gt_masks, all_masks_id = all_gt_masks[:, 1:-1, :, :], all_masks_id[1:-1]
... | Python | 1 |
{
if self.votes_for.len() >= threshold as usize {
self.status = ProposalStatus::Approved;
ProposalStatus::Approved
} else if total >= threshold && self.votes_against.len() as u32 + threshold > total {
self.status = ProposalStatus::Rejected;
ProposalStatus::Rejected
} else {
ProposalStatus::Initiat... | Rust | 0 |
ion', education_selected)
)
tipo_grafico = st.radio('Tipo de gráfico' , ('Barras' , 'Pizza'))
submit_buton = st.form_submit_button(label = 'Aplicar')
st.write('## Após os filtros')
st.write(df_copy.head())
df_xlsx = to_excel(df_copy)
st.dow... | Python | 1 |
n't exceed max command length
filelist = ' '.join(fs)
r.git.filter_branch('--index-filter',
'git rm --cached --ignore-unmatch %s' % filelist,
'--prune-empty',
'HEAD')
def tidy_up(r):
'''Tidy up by expiring reflog, aggresively GCing repo and repacking. Should
recover... | Python | 1 |
_whitelist(out: &Path, crashes: &HashSet<String>) -> anyhow::Result<()> {
use std::io::Write;
let f = out.join("whitelist");
let f = OpenOptions::new()
.create(true)
.write(true)
.truncate(true)
.open(&f)
.with_context(|| format!("failed to open: {}", f.display()))?;... | Rust | 0 |
_species['family'])
df_species['Genus'] = df_species['Entities_Grouped'].apply(
lambda x: ', '.join([s.strip().split()[0] for s in x.split(',')])
)
df_species['Genus'] = df_species['Genus'].apply(
lambda x: ', '.join([g.strip().capitalize() for g in x.split(',')])
)
df_species.to_csv('Banco_Dados_Filtrado0... | Python | 1 |
tr,w,h,angle]
"""
bboxps = np.array(poly).reshape((4, 2))
rbbox = cv2.minAreaRect(bboxps)
x, y, w, h, a = rbbox[0][0], rbbox[0][1], rbbox[1][0], rbbox[1][1], rbbox[
2]
if w < 2 or h < 2:
return
a = a / 180 * np.pi
if w < h:
w, h = h, w
a += np.pi / 2
while... | Python | 1 |
s = [], []
total_files = len(pdf_files)
progress_callback(0, total_files)
with ProcessPoolExecutor(max_workers=num_workers) as executor:
future_to_pdf = {executor.submit(
PDFPageCounterApp.count_pages_in_pdf, pdf): pdf for pdf in pdf_files}
for i, future i... | Python | 1 |
/! #### Allocation
//!
//! ObjectPool | Duration in Monothreading (us) | Duration Multithreading (us)
//! ------------| :----------------------------: | :--------------------------:
//! [`NoneObjectPool`]|1.2848|0.62509
//! [`MutexObjectPool`]|1.3107|1.5178
//! [`SpinLockObjectPool`]|1.3106|1.3684
//! [`LinearObjectPoo... | Rust | 0 |
pub fn lao_yin() -> Self {
Self {
up: LiangYi::Yin,
down: LiangYi::Yin,
}
}
}
impl From<&SiXiang> for u32 {
fn from(item: &SiXiang) -> Self {
let i = 0x268C;
match item.down {
LiangYi::Yang => match item.up {
LiangYi::Yan... | Rust | 0 |
"""
The abstract Task
Authors
* Leo 2022
"""
import abc
from collections import defaultdict
from typing import List
import torch
__all__ = ["Task"]
class Task(torch.nn.Module):
def __init__(self) -> None:
super().__init__()
def get_state(self):
# self.model will be separately saved, do ... | Python | 1 |
input: &Vec<(&str, i32)>) -> i32 {
let (mut pos_x, mut pos_y) = (0, 0);
let mut aim_x = 0;
for (instr, num) in input {
match *instr {
"down" => aim_x += num,
"up" => aim_x -= num,
"forward" => {
pos_x += num;
pos_y += aim_x * num;
... | Rust | 0 |
from enum import Enum
class Labels(Enum):
NULL = {'id': 0, 'name': "null"}
STILL = {'id': 1, 'name': "still"}
WALKING = {'id': 2, 'name': "walking"}
RUN = {'id': 3, 'name': "run"}
BIKE = {'id': 4, 'name': "bike"}
CAR = {'id': 5, 'name': "car"}
BUS = {'id': 6, 'name': "bus"}
TRAIN = {'id... | Python | 1 |
import FWCore.ParameterSet.Config as cms
# AlCaReco for track based alignment using WMuNu events
OutALCARECOTkAlWMuNu_noDrop = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOTkAlWMuNu')
),
outputCommands = cms.untracked.vstring(
'keep recoTracks_ALCAREC... | Python | 1 |
arams[1])),
//public transactional extFun not(num1:.U32):(res:.U32);
12 => just_gas_and_mem(13, 0,OpCode::Not(Kind::U32,params[0])),
//public extFun toData(num:.U32):(res:Data.Data4);
13 => just_gas_and_mem(18, 4, OpCode::ToData(Kind::U32,params[0])),
//p... | Rust | 0 |
peer_port: pkt.src_port(),
};
push_packet(self.cid, rx, &self.rxq_stream, queue, mem);
}
}
pub(crate) fn send_stream_pkt(&mut self, pkt: &VsockPacket) -> super::Result<()> {
debug!(
"vsock: send_pkt: src_port={} dst_port={}, op={}",
... | Rust | 0 |
), W, W, 0.05, 1)
SaveAsTextFile("[~] Has Public Story : "+str(Data), FileName)
except :
BeforeFlush("Has Public Story")
Flush("None", W, W, 0.05, 1)
SaveAsTextFile("[~] Has Public Story : "+"None", FileName)
print ("")
def isLiveNow(Data, FileName):
try :
BeforeFlush("is Live Now")
Flush(str(Data), W,... | Python | 1 |
=> ErrorKind::AddrNotAvailable,
syscall::EADDRINUSE => ErrorKind::AddrInUse,
syscall::ENOENT => ErrorKind::NotFound,
syscall::EINTR => ErrorKind::Interrupted,
syscall::EINVAL => ErrorKind::InvalidInput,
syscall::ETIMEDOUT => ErrorKind::TimedOut,
syscall::EEXIST => ErrorKi... | Rust | 0 |
# 452. Minimum Number of Arrows to Burst Balloons
from typing import List
class Solution:
def findMinArrowShots(self, points: List[List[int]]) -> int:
points = sorted(points, key=lambda x: x[1])
k, r = 0, -float("inf")
for l, h in points:
if l > r:
k += 1
... | Python | 1 |
)
)
continue
# check for stuck state
if current_steps >= self.max_steps:
self.state = AgentState.STUCK
if last_valid_response:
# Prepend max steps context for jud... | Python | 1 |
= core::ptr::addr_of_mut!(proc.context);
unsafe {
let sched_ctx = core::ptr::addr_of_mut!(SCHEDULER_CONTEXT);
switch(curr_ctx, sched_ctx);
}
}
fn write_current(ptr: *mut Process) {
let addr = ptr as usize;
unsafe {
asm!("msr CONTEXTIDR_EL1, {}", in(reg) addr);
}
}
fn clear... | Rust | 0 |
ng = rand::thread_rng();
let idx: usize = rng.gen_range(0, self.lines.len());
self.lines[idx].as_str()
}
TextLinesBehavior::Sequence {
does_loop,
line_idx,
} => {
let cur_idx = *line_idx;
... | Rust | 0 |
,
object_size_final=object_size_final,
object_size_oz=object_size_oz,
object_size_reduction=object_size_oz / max(object_size_final, 1),
runtimes_init=runtimes_init,
runtimes_final=runtimes_final,
runtimes_o3=runtimes_o3,
runtime_reducti... | Python | 1 |
import jax.numpy as jnp
import numpy as np
from jaxlayerlumos import utils_materials
def verify_values(frequencies, values):
unique_frequencies, indices = jnp.unique(frequencies, return_index=True)
unique_values = values[indices]
print(frequencies[0], frequencies[-1])
print(unique_frequencies[0], un... | Python | 1 |
// stop sorting
// otherwise updating rows will trigger a sort making iterating over all rows difficult
store.set_unsorted();
let searchbar_text = searchbar.get_text().to_owned();
// score each script using search text
let script_to_score = scripts
.read()... | Rust | 0 |
place.
/// The image is represented as instances of ImageView.
#[pyo3(text_signature = "($self, image)")]
fn divide_alpha_inplace(&self, py: Python, image: &mut ImageView) -> PyResult<()> {
let mul_div_mutex = self.mul_div.clone();
py.allow_threads(move || {
let mut dst_image_vie... | Rust | 0 |
CLK_HXTFSEL_SPEC>;
#[doc = "HXT Filter Select Control Register"]
pub mod clk_hxtfsel;
use crate::{
core::pool::Handle,
resource::fbx::document::{FbxNode, FbxNodeContainer},
};
use std::path::PathBuf;
pub struct FbxTexture {
filename: PathBuf,
}
impl FbxTexture {
pub(in crate::resource::fbx) fn read(
... | Rust | 0 |
"failed to parse template");
tera
});
#[derive(Serialize)]
pub enum Language {
// The string is used in html lang attribute, as per BCP47.
#[serde(rename = "ja")]
Japanese,
#[serde(rename = "en")]
English,
}
#[allow(clippy::unnecessary_wraps)]
fn kyoku_to_string_ja(args: &HashMap<String, Valu... | Rust | 0 |
.shcore.GetScaleFactorForDevice(0)
return scale_factor / 100.0
except Exception:
logging.exception("Failed to get Windows scaling factor")
return 1.0 # Fallback to no scaling
queue: multiprocessing.JoinableQueue = variables.WINDOW_QUEUE
def set_on_top(state: bool):
q... | Python | 1 |
import unittest
from tests.recipes.recipe_lib_test import BaseTestForMakeRecipe
class TestLibBz2Recipe(BaseTestForMakeRecipe, unittest.TestCase):
"""TestCase for recipe :mod:`~pythonforandroid.recipes.libbz2`."""
recipe_name = "libbz2"
sh_command_calls = []
def test_get_library_includes(self):
... | Python | 1 |
).unwrap();
if let Some(cap_cm) = rx.captures(passport["hgt"]) {
if let Ok(cms) = cap_cm[1].parse::<u16>() {
if cms >= 150 && cms <= 193 {
hgt_bool = true;
}
}
} else {
let rx = Regex::new(r"^([0-9]{2})in$").unwrap();
if let Some(cap_in) = ... | Rust | 0 |
# Code generated by Lark OpenAPI.
import lark_oapi as lark
from lark_oapi.api.corehr.v1 import *
def main():
# 创建client
client = lark.Client.builder() \
.app_id(lark.APP_ID) \
.app_secret(lark.APP_SECRET) \
.log_level(lark.LogLevel.DEBUG) \
.build()
# 构造请求对象
request: ... | Python | 1 |
_path") and not os.path.isdir(self.model.config._name_or_path):
base_model = self.model.config._name_or_path
else:
base_model = None
tags = tags or []
if isinstance(tags, str):
tags = [tags]
if hasattr(self.model.config, "unsloth_version"):
... | Python | 1 |
PhantomData<&'a A>,
}
pub enum TimerMessage<'m, A: Actor + 'm> {
Delay(time::Duration),
Schedule(time::Duration, Address<'m, A>, Option<A::Message<'m>>),
}
impl<'m, A: Actor + 'm> TimerMessage<'m, A> {
pub fn delay(duration: time::Duration) -> Self {
TimerMessage::Delay(duration)
}
pub fn... | Rust | 0 |
db_session):
"""
測試情境 C (邊界條件): 當天無比賽,且資料庫無未來比賽也無目標球隊歷史比賽。
預期: 回傳 DashboardNoGamesResponse,所有可選欄位均為 None。
"""
db = db_session
# 資料庫中只有一場無關的舊比賽
other_game = models.GameResultDB(
cpbl_game_id="OTHER",
game_date=datetime.date(2025, 8, 1),
status="已完成",
home_team... | Python | 1 |
struct DOMHTMLBaseFontElement(Object<webkit2_webextension_sys::WebKitDOMHTMLBaseFontElement, webkit2_webextension_sys::WebKitDOMHTMLBaseFontElementClass, DOMHTMLBaseFontElementClass>) @extends DOMHTMLElement, DOMElement, DOMNode, DOMObject, @implements DOMEventTarget;
match fn {
get_type => || webkit2_web... | Rust | 0 |
events",
&["db", "cf", "type"]
).unwrap();
pub static ref STORE_ENGINE_COMPRESSION_RATIO_VEC: GaugeVec = register_gauge_vec!(
"tikv_engine_compression_ratio",
"Compression ratio at different levels",
&["db", "cf", "level"]
).unwrap();
pub static ref STORE_ENGINE_NUM_SNAPS... | Rust | 0 |
yncEngine): The SQLAlchemy async engine instance.
user_id (str): The UUID of the user to check.
Returns:
bool: True if the user exists, False otherwise.
"""
async with AsyncSession(pg_engine) as session:
stmt = select(User).where(and_(User.id == user_id))
result = await sess... | Python | 1 |
new(bits: bool) -> Self {
ADC_HI_LIMIT_IE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ADC_HI_LIMIT_IE_R {
type Target = crate::FieldReader<bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `adc_hi_limit_ie` writer - ADC Hi Limi... | Rust | 0 |
pub rs2: usize
}
pub fn parse_format_r(word: u32) -> FormatR {
FormatR {
rd: ((word >> 7) & 0x1f) as usize, // [11:7]
rs1: ((word >> 15) & 0x1f) as usize, // [19:15]
rs2: ((word >> 20) & 0x1f) as usize // [24:20]
}
}
#[derive(Debug)]
pub struct FormatU {
pub rd: usize,
pub imm:... | Rust | 0 |
, 960),
pos = (3.5, 0.0, 2.5),
lookat = (0, 0, 0.5),
fov = 30,
GUI = False
)
plane = scene.add_entity(gs.morphs.Plane())
num = 100
inverted_pendulum = InvertedPendulum(scene, num_envs=num)
inverted_pendulum.create()
scene.build(n_envs=num, env_spacing=... | Python | 1 |
weight = input("Masukkan berat badan anda (KG): ")
tinggi = input("Masukkan tinggi anda (cm): ")
tinggi_meter = int(tinggi) / 100
IMT = float(weight) / (float(tinggi_meter) * float(tinggi_meter))
float(IMT)
if IMT < 18.5:
print("You are underweight!")
elif IMT < 24.9:
print("You're Normal! Keep it up!")
elif IM... | Python | 1 |
Ok(cookie) => {
cookies.insert(
cookie.name().to_string(),
Annotated::new(cookie.value().to_string()),
);
}
Err(err) => {
... | Rust | 0 |
from ultralytics import YOLO
# load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt")
# Train the model
results = model.train(data="./data", epochs=20, imgsz=64)
| Python | 1 |
import speech_recognition as sr
recognizer = sr.Recognizer()
word_list = ['imdat', 'yardım', 'burdayım', 'kimse yok mu', 'acil', 'yardıma ihtiyacım var', 'sesimi duyan var mı', 'yardım edin',
'kurtarın', 'beni kurtarın', 'canım yanıyor', 'acil yardım gerekiyor', 'hemen gelin', 'lütfen yardım edin',
... | Python | 1 |
.is_err()
{
thread::sleep(Duration::from_millis(100));
}
ready_tx.send(()).expect("to send");
stop_rx.recv().expect("to receive");
child.kill().expect("to finish");
});
ready_rx.recv().expect("server to be ready");
must_recognize(bind_addr, i... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.