text string | label_name string | labels int64 |
|---|---|---|
// Now we delete this file.
fs::remove_file(&test_file).expect("to be removed");
// Ensure the filesystem is up to date.
unsafe { libc::sync() };
// Signal the abort thread that we are ready.
tx.send(()).expect("to signal");
// It's fine to consume the stream later because it's reactive and... | Rust | 0 |
import json
import os
import logging
import time
import requests
import psutil
from sensors.base_sensor import SensorConfig
from sensors import VibrationSensor, TemperatureSensor, QualitySensor, SecuritySensor, ImageSecuritySensor
# UNIFIED LOGGING CONFIGURATION
LOG_FORMAT = '%(asctime)s - %(name)-15s - %(levelname)-8... | Python | 1 |
up_id}/roles',
'method': ['HEAD', 'GET'],
}
],
deprecated_rule=deprecated_list_system_grants_for_group,
),
policy.DocumentedRuleDefault(
name=base.IDENTITY % 'check_system_grant_for_group',
check_str=base.RULE_ADMIN_OR_SYSTEM_READER,
scope_type... | Python | 1 |
{
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match &self.cause {
Cause::CannotReadFile(err) => {
write!(f, "Cannot read '{}': {}", self.path.display(), err)
}
Cause::InvalidConfig(err) => write!(
f,
"Invalid confi... | Rust | 0 |
\ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged
* "onChannelMediaRelayStateChanged" callback. If the callback returns
* #RELAY_STATE_IDLE (0) and #RELAY_OK (0), the host successfully
* stops the relay.
*
* @note
* If the method call fails, the SDK triggers the
... | Rust | 0 |
# !/usr/bin/env python3
# ADHRIT is an open source tool for Android apk analysis
# to extract maximum amount of information from an apk
from colorama import Fore, Style
from adhrit.recons.manifest_analysis import man_analyzer
from adhrit.recons.dbaccess import dbconnection, insert_statustable
from adhrit.recons.clea... | Python | 1 |
u,
v: v,
w: w,
lens_radius: lens_radius,
origin: lookfrom,
horizontal: horizontal,
vertical: vertical,
lower_left_corner: lower_left_corner,
}
}
}
fn get_ray(cam: &Camera, s: f64, t: f64) -> Ray {
let rd = Vec3::random... | Rust | 0 |
Unit::MetricTons),
Unit::Mass(MassUnit::Pounds),
Unit::Mass(MassUnit::Ounces),
Unit::Mass(MassUnit::Stones),
Unit::Mass(MassUnit::Tons),
Unit::Mass(MassUnit::UKTons),
]
}
}
impl PowerUnit {
pub fn to_str(&self) -> &'static str {
match self {
PowerUnit::Watts => "W",
PowerUnit::Milliwatts => ... | Rust | 0 |
import pytest
from api.exceptions.notfound import NotFoundException
from api.neo4j import get_driver
from api.dao.favorites import FavoriteDAO
toy_story = '862'
goodfellas = '769'
user_id = '9f965bf6-7e32-4afb-893f-756f502b2c2a'
email = 'graphacademy.favorite@neo4j.com'
@pytest.fixture(autouse=True)
def before_all(a... | Python | 1 |
im.max_pool2d(net,kernel_size=[3,3],stride=2,scope='pool2')
net=slim.conv2d(net,64,3,scope='conv3')
net=slim.max_pool2d(net,kernel_size=[2,2],stride=2,padding='SAME',scope='pool3')
net=slim.conv2d(net,128,2,scope='conv4')
fc_flatten=slim.flatten(net)
fc1=slim.... | Python | 1 |
from typing import List, Text
from grag.components.multivec_retriever import Retriever
from grag.components.vectordb.deeplake_client import DeepLakeClient
from grag.rag.basic_rag import BasicRAG
client = DeepLakeClient(collection_name="ci_test", read_only=True)
retriever = Retriever(vectordb=client)
def test_rag_st... | Python | 1 |
hiteKing.position.y * Config.spotSize + Config.top_offset // 2
pygame.draw.rect(self.screen, (240, 111, 150), [x, y, Config.spotSize, Config.spotSize])
self.screen.blit(self.board.WhiteKing.sprite, (x, y))
# black king in check
elif self.board.checkBlackKing:
x = self... | Python | 1 |
e.is_empty() { None } else { Some(picvudb::data::TitleMarkdown::parse(form.title.clone())?) };
let notes = if form.notes.is_empty() { None } else { Some(picvudb::data::NotesMarkdown::parse(form.notes.clone())?) };
let rating = {
let num_stars = form.rating.parse().map_err(|_| picvudb::ParseError::new("... | Rust | 0 |
+ Copy,
P: Num + AddAssign + PartialOrd + Copy,
{
let mut new_nodes = HashSet::new();
for agent in spec.agents() {
// Determine agent budget
let agent_budget = assignment.agent_budget(agent);
if agent_budget == C::zero() {
continue;
};
// Determine all p... | Rust | 0 |
self) -> u8;
/// Pixel supply voltage ($K_{DD_0}$).
///
/// This is the voltage supplied to the device, and should be 3.3V for the MLX90640 and
/// MLX90641. The default implementation is hardcoded to return `3.3f32`, but if there's a
/// reason it needs to be overridden, it's possible.
fn v_dd... | Rust | 0 |
am_slice(StreamSliceConfig {
header_begin: 42,
header_end: Some(50),
messages_begin: 43,
message_count: 2,
signals_end: 33,
});
//
// The expected `CanisterState` has...
let expected_canister_state = new_canister_state(
... | Rust | 0 |
import requests
from allauth.socialaccount import app_settings
from allauth.socialaccount.providers.jupyterhub.provider import (
JupyterHubProvider,
)
from allauth.socialaccount.providers.oauth2.views import (
OAuth2Adapter,
OAuth2CallbackView,
OAuth2LoginView,
)
class JupyterHubAdapter(OAuth2Adapter... | Python | 1 |
self.running = False
continue
# デバッグログ(WASDキー専用)
if event.type == pygame.KEYDOWN and event.key in [pygame.K_w, pygame.K_a, pygame.K_s, pygame.K_d]:
logger.debug(f"MainLoopManager: key detected key={pygame.key.name(event.key)}")
... | Python | 1 |
num_bot = getAgentSize() - 1
if "_level_" not in globals():
global _level_
_level_ = level
init = True
else:
if _level_ != level:
_level_ = level
init = True
else:
init = False
if init:
global _list_per_level_
gl... | Python | 1 |
G$hc @ sb d Z d d d YZ d e f d YZ d d l Z e j j e d d
d YZ d S( sG A more or less complete user-defined wrapper around dictionary objects.t UserDictc B s e Z d Z d Z d Z d Z d Z d Z d Z d Z
d Z d Z d ... | Python | 1 |
er.rs
mod account_transaction_header;
mod path;
use hex;
use ledger::{ApduCommand, LedgerApp};
use base58check::*;
fn main() {
let transaction_kind = "03";
let mut amount = hex::decode("FFFFFFFFFFFFFFFF").unwrap();
let sender_address = "3C8N65hBwc2cNtJkGmVyGeWYxhZ6R3X77mLWTwAKsnAnyworTq";
let mut rec... | Rust | 0 |
################################################
# #
# Some Helper Functions #
# #
################################################
import numpy as np
from keras.models import model_from_json,Input,Model
#... | Python | 1 |
"""
==========================================================================
DORYTorusRouteUnitRTL_test.py
==========================================================================
Test for DORYTorusRouteUnitRTL
Author : Yanghui Ou
Date : June 28, 2019
"""
from itertools import product
import pytest
from pymtl3 ... | Python | 1 |
# Copyright (c) 2021 - present / Neuralmagic, Inc. 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 required b... | Python | 1 |
,
"bash" => Ok(Bash),
"c" => Ok(C),
"caml" => Ok(Caml),
"cpp" | "c++" | "cxx" | "cplusplus" => Ok(CPlusPlus),
"c#" | "csharp" => Ok(CSharp),
"clojure" => Ok(Clojure),
"dart" => Ok(Dart),
"elixir" => Ok(Elixir),
"... | Rust | 0 |
from animals import Animals
from dog import Dog
from cat import Cat
from hamster import Hamster
from horse import Horse
from donkey import Donkey
from camel import Camel
from zoo import Zoo
from menu import Menu
from datetime import datetime
from command import Commands
if __name__ == '__main__':
dog = Dog("Jack",... | Python | 1 |
rt VISION_TOWER_CHECKPOINT_NAMES
args.vision_tower_path = {name: Path(args.vision_tower_dir) / path for name, path in VISION_TOWER_CHECKPOINT_NAMES.items()}
# 256gb cpu memory is not enough for 8 gpus
# to use 6 gpus on 256gb cpu memory, use .half() to save memory
model = VisualRWKV(args).half()
if ... | Python | 1 |
match_filepath_noalias);
}
// Load the first 2K of file and parse as u8
// for batch processing like this
//
// TODO: Use cache to only get what we need to when we need to
// and then change code so that we keep calling this function
// when walking tree.
/*let f = match File::open... | Rust | 0 |
userid = getattr(context, '__anonymized_creator__', '')
return userid
def is_created_anonymized(context: object) -> bool:
"""Check if `context` was created anonymized."""
is_created_anonymized = bool(get_anonymized_creator(context))
return is_created_anonymized
def includeme(config): # pragma: no... | Python | 1 |
from setuptools import setup, find_packages
setup(
name='lightmetrica-py',
version='3.0.0',
description='A research-oriented renderer',
author='Hisanari Otsu',
author_email='hi2p.perim@gmail.com',
url='https://github.com/hi2p-perim/lightmetrica-v3',
packages=find_packages(),
include_pac... | Python | 1 |
r2.check_response(count=2, http_status=200)
assert r2.total_connects == 2
# download via https: proxy (no tunnel) using IP address
@pytest.mark.skipif(condition=not Env.curl_has_feature('HTTPS-proxy'),
reason='curl lacks HTTPS-proxy support')
@pytest.mark.skipif(condition... | Python | 1 |
evelFilter::MoreSevereEqual(Level::Warn),
);
assert_levels!(
"=eRror,*=waRn",
DEFAULT => unchanged,
UNNAMED => LevelFilter::MoreSevereEqual(Level::Error),
NAMED("name") => LevelFilter::MoreSevereEqual(Level::Warn),
);
assert_levels!(
... | Rust | 0 |
ulse = 4,
}
impl<T> LittleEndianWriter<Waveform> for T
where
T: WriteBytesExt,
{
fn write_val(&mut self, v: Waveform) -> Result<(), io::Error> {
self.write_u8(v as u8)
}
}
impl TryFrom<u8> for Waveform {
type Error = Error;
fn try_from(val: u8) -> Result<Waveform, Error> {
match val {
0 => Ok(Waveform::Sa... | Rust | 0 |
#!/usr/bin/env python3
"""新しいセンテンス分割処理のテスト"""
import sys
sys.path.append('/app/bungo-map-system-v4')
from extractors.fetch_work_content import WorkContentProcessor
def test_new_splitting():
# テスト用の文章
test_text = '私が先生と知り合いになったのは鎌倉である。その時私はまだ若々しい書生であった。暑中休暇を利用して海水浴に行った。これは本当に良い思い出だ!君は知っているか?'
processor =... | Python | 1 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-18 09:37
from __future__ import unicode_literals
from django.db import migrations
from django.utils import timezone
import django_extensions.db.fields
now = timezone.now()
class Migration(migrations.Migration):
dependencies = [
('registrat... | Python | 1 |
69561882670428252483600823257530420752963450
use euler::util::error::*;
use euler::util::problem::*;
const EXPECTED_RESULT: u64 = 40824;
#[cfg_attr(rustfmt, rustfmt_skip)]
const NUMBER_DIGITS: &'static [u64] =
&[7, 3, 1, 6, 7, 1, 7, 6, 5, 3, 1, 3, 3, 0, 6, 2, 4, 9, 1, 9, 2, 2, 5, 1, 1, 9, 6, 7, 4, 4, 2,
6,... | Rust | 0 |
from __future__ import annotations
import logging
import os
from configparser import ConfigParser
from pathlib import Path
from typing import ClassVar
from platformdirs import user_config_dir
from .convert import convert
class IniConfig:
VIRTUALENV_CONFIG_FILE_ENV_VAR: ClassVar[str] = "VIRTUALENV_CONFIG_FILE"
... | Python | 1 |
et_devices_configuration(central, device_serial)
"""
Originalne funkcije iz create_docx.py
(g) 5.3.2024
def get_central_data(central, apipath, apiparams={"offset": 0}):
apiPath = apipath
apiMethod = "GET"
apiParams = apiparams or " "
base_resp = central.command(
apiMethod=apiMethod, apiPath... | Python | 1 |
ua: 站点的ua
:param ua: 站点的请求头
:param proxy: 是否使用代理
:return: 种子属性,包含FREE 2XFREE HR PEER_COUNT等属性
"""
ret_attr = {
"free": False,
"2xfree": False,
"hr": False,
"peer_count": 0,
"pubdate": None
}
try:
... | Python | 1 |
})
.unwrap();
let expected = Buffer::with_lines(vec![
// The internal width is 8 so only 4 slots for double-width characters.
"┌────────┐",
"│aコンピ │", // Here we have 1 latin character so only 3 double-width ones can fit.
"│ュータ上│",
"│で文字を│",
"│扱う場合│"... | Rust | 0 |
_stack_height: self
.max_stack_height
.get()?
.ok_or("Unexpected none")?
.unwrap_or(default_vm_config.max_stack_height),
initial_memory_pages: self
.initial_memory_pages
.get()?
.ok_or("Unexpected none")?
.unwrap_or(default_vm_config.initial_memory_pages),
max_memory_pages: self
... | Rust | 0 |
# Generated by Django 3.2.11 on 2022-07-18 12:11
import uuid
from django.db import models, migrations
import django.db.models.deletion
NIL_UUID = "00000000-0000-0000-000000000000"
graph_models = (
"MSGraphMailScanner", "MSGraphFileScanner", "MSGraphCalendarScanner")
def copy_graph_tenants_to_grants(apps, ... | Python | 1 |
args.append(staged_files);
Ok(Command::new("git")
.args(&file_revs_args)
.stdout(Stdio::piped())
.spawn()?)
}
fn format_target(commit: &str, format: &str, source_format: &str) -> Result<String> {
let format = format.replace("%(smash:source)", source_format);
let format = format!("-... | Rust | 0 |
def sequential_search(n, target, array):
for i in range(n):
if array[i] == target:
return i + 1 # index가 0부터 시작
print("생성할 원소 개수를 입력한 다음 한 칸 띄고 찾을 문자열을 입력하세요.")
input_data = input().split()
n = int(input_data[0])
target = input_data[1]
print("앞서 적은 원소 개수만큼 문자열을 입력하세요. 구분은 띄어쓰기 한 칸으로 합니다.")
array = input().spli... | Python | 1 |
40]],
)
@pytest.mark.relu6
@pytest.mark.filterwarnings("ignore::UserWarning")
def test_relu6_12():
data = np.random.uniform(-4, 8, [16, 480, 22, 40]).astype("float32")
test12.run(feed=[data])
test13 = ApiBase(
func=paddle.nn.functional.relu6,
feed_names=["data"],
feed_shapes=[[16, 8, 352, 640]],... | Python | 1 |
get_feature = "neon"))] {
fn frsqrt(s: &f64x2) -> f64x2 {
#[cfg(target_arch = "aarch64")]
use stdsimd::arch::aarch64::*;
#[cfg(target_arch = "arm")]
use stdsimd::arch::arm::*;
let t: f32x2 = (*s).into();
let t: f32x2 = unsafe { vrsqrte_f32... | Rust | 0 |
// our php template or test files
"hack", // strict-mode files (Hack)
"hackpartial", // partial-mode files (Hack)
"hck", // open source hack: bikeshed entry
"hh", // open source hack: bikeshed entry
"hhi", // interface files only visible to the type checker
"xhp",... | Rust | 0 |
rent state of the control.
self.state = None
# When should the repeat occur?
self.repeat_time = 0
def event(self, state):
self.state = state
self.repeat_time = renpy.display.core.get_time() + renpy.config.controller_first_repeat
post_event(self.control, self.state... | Python | 1 |
# USAGE
# python gradient_descent.py
# import the necessary packages
import matplotlib.pyplot as plt
from sklearn.datasets.samples_generator import make_blobs
import numpy as np
import argparse
def sigmoid_activation(x):
return 1.0 / (1 + np.exp(-x))
def next_training_batch(X, y, batchSize):
for i in np.arange(... | Python | 1 |
ontents.set_validated_mint_config_txs(validated_mint_config_txs);
block_contents.set_mint_txs(mint_txs);
block_contents
}
}
impl TryFrom<&blockchain::BlockContents> for mc_transaction_core::BlockContents {
type Error = ConversionError;
fn try_from(source: &blockchain::BlockContents) -> Res... | Rust | 0 |
left: Box<Expr>,
op: BinaryOperator,
right: Box<Expr>,
},
/// Unary operation e.g. `NOT foo`
UnaryOp { op: UnaryOperator, expr: Box<Expr> },
/// CAST an expression to a different data type e.g. `CAST(foo AS VARCHAR(123))`
Cast {
expr: Box<Expr>,
data_type: Dat... | Rust | 0 |
$spinlock_name {}
impl Drop for $spinlock_name {
fn drop(&mut self) {
// Safety: At this point we should be the only one accessing this spinlock register
// so writing to this address is fine
let sio = unsafe { &*pac::SIO::ptr() };... | Rust | 0 |
intr_raw::GPIO_INTR_RAW_SPEC>,
#[doc = "0x08 - Indicators of interrupt trigger types"]
pub gpio_intr_type: crate::Reg<gpio_intr_type::GPIO_INTR_TYPE_SPEC>,
#[doc = "0x0c - Indicators of interrupt trigger polarities (will depend on the type of interrupt)"]
pub gpio_intr_pol: crate::Reg<gpio_intr_pol::GPI... | Rust | 0 |
try:
for paper in uploaded_files:
mongo_hook.update_one(
mongo_collection=f"{db_name}.{collection_name}",
filter_doc={"paper_id": paper["paper_id"]},
update_doc={"$set": paper},
upsert=True
)
print(f"✅ Stored in... | Python | 1 |
;
});
}
#[test]
fn sync_session() {
with_session(|session| {
let info = SessionSyncInfo::default()
.with_sync_viewport(true)
.with_cook_using_houdini_time(true);
session.set_sync_info(&info).unwrap();
session.cook().unwrap(... | Rust | 0 |
::option::Option::Some(Context::default());
}
self.context.as_mut().unwrap()
}
#[inline]
pub fn take_context(&mut self) -> Context {
self.context.take().unwrap_or_else(Context::default)
}
#[inline]
pub fn clear_safe_point(&mut self) {
self.safe_point = 0
}
... | Rust | 0 |
orePackageVersionForUserError::Generic { code }),
}
}
}
/// ---
///
/// # Restore package version for a user
///
/// Restores a specific package version for a user.
///
/// You can restore a deleted package under the following conditions:
/// - The package was... | Rust | 0 |
# Copyright (c) 2022-2024, The Isaac Lab Project Developers.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
import torch
from dataclasses import dataclass
@dataclass
class FrameTransformerData:
"""Data container for the frame transformer sensor."""
target_frame_names: list[str] = None
... | Python | 1 |
# Copyright 2024 Bytedance Ltd. and/or its affiliates
#
# 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 ... | Python | 1 |
delta_bit_pack!(delta_bit_pack_i32_1k_100, 1024, Int32Type, gen_100);
delta_bit_pack!(delta_bit_pack_i32_1k_1000, 1024, Int32Type, gen_1000);
delta_bit_pack!(delta_bit_pack_i32_1m_10, 1024 * 1024, Int32Type, gen_10);
delta_bit_pack!(delta_bit_pack_i32_1m_100, 1024 * 1024, Int32Type, gen_100);
delta_bit_pack!(delta_bit_... | Rust | 0 |
let window = video_subsystem.window("snesr", 800, 600)
.position_centered()
.build()
.unwrap();
let mut canvas = window.into_canvas().build().unwrap();
canvas.set_draw_color(Color::RGB(0, 255, 255));
canvas.clear();
canvas.present();
// initialize sdl2 event loop
let 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 |
__shadow_root_sample(__owner, __update_to) };
if __is_update {
None
} else {
Some(ret)
}
}
<gh_stars>0
use crate::program::CommandType;
use crate::program::Program;
pub fn parse_program(program_contents: &str) -> Result<Program, String> {
let lines = program_contents.lines();
let co... | Rust | 0 |
return result
def write_run_log(entries: List[Tuple[str, ModelResponse]]) -> None:
ensure_reports_dir()
path = REPORTS_DIR / "run_log.csv"
with path.open("w", encoding="utf-8", newline="") as f:
w = csv.writer(f)
w.writerow(["prompt", "output", "latency_ms", "tokens_in", "tokens_out"]... | Python | 1 |
_reply
#[derive(Copy, Clone, Debug)]
#[repr(C)]
pub struct xcb_xkb_get_indicator_map_cookie_t {
/// The sequence number of the request.
pub sequence: c_uint,
}
impl Default for xcb_xkb_get_indicator_map_cookie_t {
fn default() -> Self {
unsafe { std::mem::MaybeUninit::zeroed().assume_init() }
}... | Rust | 0 |
pes import InlineKeyboardMarkup as Ikm, InlineKeyboardButton as Ikb
u_id = msg.from_user.id
await msg.reply(
text=f"Questo webinar è stato registrato in inglese da me, apposta per voi, "
f"così che possiate informarvi in breve e senza "
f"giri di parole su quello che volete e d... | Python | 1 |
mber_of_dimensions}' does not "
f"match dimensions of given input array: {input_array}."
)
# If the resulting sub_array is dense, the sub_array should be a single number
elif not np.issubdtype(type(_sub_array), np.integer) and not isinstance(
_sub_array, (... | Python | 1 |
'mt': 'Ido', 'my': 'အီဒို', 'nb': 'ido', 'ne': 'इडो', 'nl': 'Ido', 'nn': 'ido', 'no': 'ido', 'or': 'ଇଡୋ', 'pa': 'ਇਡੂ', 'pa-Guru': 'ਇਡੂ', 'pcm': 'Idó Lángwej', 'pl': 'ido', 'ps': 'اڊو', 'pt': 'ido', 'qu': 'Ido Simi', 'rm': 'ido', 'ro': 'ido', 'ru': 'идо', 'sc': 'ido', 'sd': 'ادو', 'sd-Arab': 'ادو', 'si': 'ඉඩො', 'sk': 'i... | Python | 1 |
#this program will reverse a word
#user input
word = input("give a word: ")
#this is the program that will reverse the word
reversedword = word[::-1]
print(reversedword) | Python | 1 |
// the same reasons as above.
SetWindowLongA(tm(window.hwnd), GWL_EXSTYLE, tm(current_style));
// Reshow the window, since we hid it earlier.
ShowWindow(tm(window.hwnd), SW_SHOW);
},
_ => unreachable!(),
}
}
// PASS | select_... | Rust | 0 |
from dash import Dash, html, dcc
import dash_bootstrap_components as dbc
import pandas as pd
import plotly.express as px
app = Dash(external_stylesheets=[dbc.themes.DARKLY])
server = app.server
df = pd.read_excel('Vendas.xlsx', sheet_name="Sheet1")
vendas_por_categoria = df["Categoria"].value_counts().reset_index()
... | Python | 1 |
lf) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_v_align_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLTableCellElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer)
where P: IsA<DOMHTMLTableCellElement>
{
let f: &F = &*(... | Rust | 0 |
error!(
"Search by height in loose index found EBB. \
Found older available entry before EBB, but {}. \
This is an invalid state. (searching_for={}, loose_index_len={}, \
loose_index_tip={:?}, ebb_at_index={}, er... | Rust | 0 |
and labels
color_ranges = [
((0, 255, 0), "1-20"),
((255, 0, 0), "21-40"),
((0, 255, 255), "41-60"),
((0, 0, 255), "61+")
]
# Draw color boxes and labels
box_width = combined_frame.shape[1] // len(color_ranges)
for i, (color, label) in enumerate(color_ranges):
... | Python | 1 |
# -*- coding: utf-8 -*- #
# Copyright 2025 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 |
Location {
pin: usize,
name: &'static str,
expected_pin: usize,
},
#[error(".{suffix} is not allowed when this type of GAL is used")]
DisallowedControl { suffix: OutputSuffix },
#[error("use of .{suffix} is only allowed for registered outputs")]
InvalidControl { suffix: Outpu... | Rust | 0 |
def c(n):
res = ''
while n:
res += str(n%3)
n //= 3
return res[::-1]
ans = []
for n in range(1, 10000):
r = c(n)
suum = sum(map(int, r))
if suum%2==0:
r = '1' + r + '2'
else:
r = '2' + r + '0'
r = int(r, 3)
if r > 100:
ans.append(r)
print(min... | Python | 1 |
n = 0
soma = 0
while nt >= 0:
if nt >= 0:
soma + n
else:
print('Nota invalida!')
print(f'M') | Python | 1 |
,
_time: ::std::os::raw::c_uint,
) -> spwaterfallcf;
}
extern "C" {
pub fn spwaterfallcf_create_default(
_nfft: ::std::os::raw::c_uint,
_time: ::std::os::raw::c_uint,
) -> spwaterfallcf;
}
extern "C" {
pub fn spwaterfallcf_destroy(_q: spwaterfallcf);
}
extern "C" {
pub fn spw... | Rust | 0 |
{ request.get_module_loc_conf(&ngx_http_hello_world_module) as *mut LocConf };
let text = unsafe { &(*hlcf).text };
// Create body
let user_agent = request.user_agent();
let body = format!("Hello, {}!\n", if text.is_empty() { user_agent.to_string_lossy() } else { Cow::from(text) });
// Send header... | Rust | 0 |
.as_str().as_bytes());
login_params.password = <PASSWORD>;
login_params.password_type = PasswordType::<PASSWORD>;
} else {
warn!("nonce param missing!");
}
} else {
warn!("hello response params missin... | Rust | 0 |
from django.urls import path, re_path
from plants.views import *
urlpatterns = [
path('', index, name='index'),
path('about/', about, name='about'),
path('post/<slug:post_slug>', show_post, name='post'),
path('addpage/', addpage, name='addpage'),
path('contact/', contact, name='contact'),
path(... | Python | 1 |
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export map
# \date 2009-03-10 13:13GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export map
#
# NeL - MMORPG Framework <https://wiki.ryzom.dev/>
# Copyright (C) 2009-2014 by authors
#
# This program is free software: you can redistribut... | Python | 1 |
"), Some(&"my-rg".to_string()));
/// assert_eq!(context.tags().get("account_id"), Some(&"123-345-777".to_string()));
/// ```
#[derive(Debug, Clone)]
pub struct TelemetryContext {
/// An instrumentation key.
pub(crate) i_key: String,
// A collection of tags to attach to telemetry event.
pub(crate) tags:... | Rust | 0 |
import os
import numpy as np
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(ROOT_DIR, 'utils'))
import data_prep_util
import indoor3d_util
# Constants
data_dir = os.path.join(ROOT_DIR, 'data')
indoor3d_data_di... | Python | 1 |