text
string
label_name
string
labels
int64
return Err("backup.num_threads cannot be 0".into()); } Ok(()) } } impl Default for BackupConfig { fn default() -> Self { let cpu_num = SysQuota::new().cpu_cores_quota(); Self { // use at most 75% of vCPU by default num_threads: (cpu_num * 0.7...
Rust
0
id(&id_4).is_some()); assert!(manager.get_tunnel_id(&id_5).is_none()); assert!(manager.get_tunnel_id(&id_6).is_some()); manager.tunnel_closure(1); assert!(manager.get_tunnel_id(&id_1).is_none()); assert!(manager.get_tunnel_id(&id_2).is_none()); assert!(manager.get_tunnel...
Rust
0
use tokio_postgres::{Client, NoTls, SimpleQueryMessage, SimpleQueryRow}; use tokio_stream::StreamExt; use tracing::*; use zenith_utils::lsn::Lsn; use zenith_utils::zid::ZTenantId; use zenith_utils::zid::ZTimelineId; // // We keep one WAL Receiver active per timeline. // struct WalReceiverEntry { wal_producer_conns...
Rust
0
_based_filter } pub const fn reliability(&self) -> Option<policy::Reliability> { self.reliability } pub const fn destination_order(&self) -> Option<policy::DestinationOrder> { self.destination_order } pub const fn history(&self) -> Option<policy::History> { self.history } pub const fn re...
Rust
0
# Copyright (C) 2018-2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import torch from e2e_tests.common.ref_collector.provider import ClassProvider from e2e_tests.test_utils.path_utils import resolve_file_path import numpy as np import logging as log import sys class PrecollectedRefs(ClassProvider): ...
Python
1
direction of the line at point `dst_pos` /// when we know that the line at the point `src_pos` has direction of `src_dir`. fn dir_when_moved_at_pos(src_pos: Self::Pos, src_dir: Self::Dir, dst_pos: Self::Pos) -> Self::Dir; // TODO: Replace `shift_(x,y,z)` with single function. //fn shift(pos: Self::Pos...
Rust
0
(BUFFER_HEIGHT - 1); self.column_position = 0; self.row_position = BUFFER_HEIGHT - 1; } pub fn set_color_code(&mut self, color_code: ColorCode) { self.color_code = color_code; } pub fn get_color_code(&self) -> ColorCode { self.color_code } } impl fmt::Write for Buf...
Rust
0
rsion fn git_version(&self) -> Result<(), GitError>; fn git_clone_mirror(&self, origin: &str, repo_dir: &Path) -> Result<(), GitError>; fn git_update_mirror(&self, origin: &str, repo_dir: &Path) -> Result<(), GitError>; fn git_push_mirror( &self, dest: &str, repo_dir: &Path, ...
Rust
0
from setuptools import find_packages, setup import os from glob import glob package_name = 'time_race' setup( name=package_name, version='0.0.0', packages=find_packages(exclude=['test']), data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ...
Python
1
b"003" => "RuMoRGB", //! ]; //! data fields: [ //! b"979", b" ", [ //! b'a' => "autoref", //! b'a' => "dlopen", //! ], //! ]; //! ))? //! .get_record()?; //! assert_eq!(record.as_ref(), b"00100nam 2200061 i 4500001001...
Rust
0
ircase", "Gkai00"), ("Gnbtaki", "Gnbtaki"), ("Gntakie", "Gntakie"), ("Gntakis", "Gntakis"), ("Gp1", "Gp1"), ("Gryw00", "Gryw00"), ("Water pouring down", "Gtaki"), ("GyCtrlB", "GyCtrlB"), ("Wind Platform", "Hami1"), ("Rotatable Wind Platform", "Hami2"), ("Vertical Rotatable Wind P...
Rust
0
ific boolean-based test what the DBMS may be """ retVal = False if conf.skipHeuristics: return retVal pushValue(kb.injection) kb.injection = injection for dbms in getPublicTypeMembers(DBMS, True): randStr1, randStr2 = randomStr(), randomStr() Backend.forceDbms(db...
Python
1
import pygame FPS = 60 pygame.init() screen = pygame.display.set_mode((800, 600)) pygame.display.set_caption("Schwarzes Fenster 1 - The Beginning Of The Void!") clock = pygame.time.Clock() frame_count = 0 # ---------------------------------------------------------------------------------------------------- running...
Python
1
i in 1..=5 { if let Some(tmp) = ft.get(&(ii, *ch)) { if ii < *l || ii > *h { vocab.remove(tmp); } else { keep_words.union(tmp); } } } } if keep_words.total() > 0 { vocab.preserve(&kee...
Rust
0
rd block for current block number. /// Return send if reward ended already. pub fn last_reward_block_applicable(&self, current_block_number: BlockNumber) -> BlockNumber { if current_block_number > self.period_finish { self.period_finish } else { current_block_number ...
Rust
0
str, ) -> Result<Vec<crate::types::HookDeliveryItem>> { let mut query_args: Vec<(String, String)> = Default::default(); if !cursor.is_empty() { query_args.push(("cursor".to_string(), cursor.to_string())); } if per_page > 0 { query_args.push(("per_page".to_stri...
Rust
0
_ODATAR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _ODATAR; #[doc = "`read()` method returns [odatar::R](odatar::R) reader structure"] impl crate::Readable for ODATAR {} #[doc = "Output Data Register"] pub mod odatar; #[doc = "Initialization Vector Register\n\nThis register you can [`write_with_zero`](crate::g...
Rust
0
.insert(pkcs11::CKA_WRAP, Attr::CK_FALSE); attrs.insert(pkcs11::CKA_LOCAL, Attr::CK_FALSE); attrs.insert(pkcs11::CKA_TOKEN, Attr::CK_TRUE); attrs.insert(pkcs11::CKA_EC_PARAMS, Attr::Bytes(info.params_x962)); attrs.insert(pkcs11::CKA_EC_POINT, Attr::Bytes(info.point_q_x962)); Self...
Rust
0
FDNAMES = {:?}", pid, fds, fdnames ); if unset_env { env::remove_var("LISTEN_PID"); env::remove_var("LISTEN_FDS"); env::remove_var("LISTEN_FDNAMES"); } let pid = pid .map_err(|e| format!("failed to get LISTEN_PID: {}", e))? .parse::<u32>(...
Rust
0
use nom::{IResult, Parser}; use std::num::NonZeroUsize; /// /// /// pub fn parse<'a, E: ParseError<Tokens<'a>> + ContextError<Tokens<'a>>>(input: Tokens<'a>) -> IResult<Tokens, Lit, E> { branch::alt(( comb::map(tag_token!(Token::Boolean), |t| Lit::Boolean(t.tok[0].as_bool())), comb::map(tag_token!(...
Rust
0
scalar_methods_square { [$ty:ty, qa=$qa:ident, QaL=$QaL:ident, QaM=$QaM:ident, qu=$qu:tt, QuL=$QuL:tt, QuM=$QuM:tt] => { paste::paste! { /// # SI prefixes constructors: `in_*` & converters `as_*` /// /// The units are square (10² for 1 step, 10⁶ for 3 steps) /...
Rust
0
q".to_string()]; match self.screen.select_line() { ScreenStatus::Error | ScreenStatus::Quit => println!("error"), ScreenStatus::Selected(ref c) if c == "a" => self.aws(), _ => process::exit(0), } } fn aws(&self) { let mut aws = awsController::new(); ...
Rust
0
l: None, method: None, response_logic: None } } pub fn url<S: Into<String>>(mut self, url: S) -> Self { self.url = Some(url.into()); self } pub fn method<S: Into<String>>(mut self, method: S) -> Self { self.method = Some(method.into()); sel...
Rust
0
nstead...') elif port.startswith('/dev/tty.') and sys.platform == 'darwin': port = port.replace('/dev/tty.', '/dev/cu.') warning_print('Serial ports accessed as /dev/tty.* will hang gdb if launched.') note_print(f'Using {port} instead...') serial_...
Python
1
// check-pass #![feature(label_break_value)] // Issue #21633: reject duplicate loop labels and block labels in function bodies. #[allow(unused_labels)] fn foo() { 'fl: for _ in 0..10 { break; } 'fl: loop { break; } //~ WARN label name `'fl` shadows a label name that is already in scope 'lf: lo...
Rust
0
t=None, type=click.Path(), help='Directory to save generated scripts (default: generated_scripts)') @click.option('--model', '-m', default=None, help='OpenRouter model to use for generation (default: claude-3.5-sonnet)') @click.option('--openrouter-key', '-k', default=None, ...
Python
1
to extract tokens in their base form=lemma, e.g. "are, is, being" -> "be" etc. This is a smarter version of stemming, taking word context into account. Only considers nouns, verbs, adjectives and adverbs by default (=all other lemmas are discarded). >>> lemmatize('Hello World! How is i...
Python
1
Error moving keys from {:?} to {:?}: {:?}", from, to, e); } } } fn upgrade_dir_location(source: &PathBuf, dest: &PathBuf) { if file_exists(&source) { if !file_exists(&dest) { let mut parent = dest.clone(); parent.pop(); if let Err(e) = fs::create_dir_all(&parent).and_then(|()| fs::rename(&source, &dest)...
Rust
0
ExistsError: return False failed_attempts = 0 mca_files = os.listdir("world/region") argv = sys.argv if len(argv) > 1: if (argv[1] == "fin"): for mca_file in mca_files: if mca_file.endswith(".mca"): p_dest = "world/region1/" + mca_file.replace(".mca", ".paimon") ...
Python
1
import os from time import sleep from typing import Optional, Union import docker import psycopg from pydantic import BaseModel, Field from bridge.console import log_task from bridge.service.docker import ContainerConfig, DockerService from bridge.utils.filesystem import resolve_dot_bridge class PostgresEnvironment...
Python
1
= torch.stack(real_B) style = torch.stack(style) real_A, real_B, style = real_A.to(cfg.device), real_B.to(cfg.device), style.to(cfg.device) fake_B = generator(real_A, style) image_tensor = torch.cat([real_A, real_B, style, ...
Python
1
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from dataclasses import dataclass, field from typing import Any, Dict, Optional from hydra.core.config_store import ConfigStore @dataclass class ScalarConfigSpec: """Representation of all the options to define a scalar. """ # low...
Python
1
simulationType": fc.sr_sim_type}, ) fc.sr_email_confirm(r) d = fc.sr_post( "listSimulations", {"simulationType": fc.sr_sim_type}, ) # Sims from guest and email present pkeq(["Scooby Doo", "email-sim", "guest-sim"], sorted([x.name for x in d])) def test_happy_path(auth_fc): ...
Python
1
lone, Debug)] pub struct FineTime2 { pub t_fine0: u8, pub t_fine1: u8, } impl FineTime2 { // default constructor pub fn new() -> FineTime2 { FineTime2 { t_fine0: 0, t_fine1: 0, } } // init constructor pub fn new_init( t_fine0: u8, t_fin...
Rust
0
Some(transmute(notify_text_content_trampoline::<Self, F> as usize)), Box_::into_raw(f)) } } } unsafe extern "C" fn notify_base_uri_trampoline<P, F: Fn(&P) + 'static>(this: *mut webkit2_webextension_sys::WebKitDOMNode, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA<DOMN...
Rust
0
let mut i_input = I8VecBitInput::new(i_vector); check_stuff_in_bit_input(&mut i_input); i_input.terminate(); } let mut i_output = I8VecBitOutput::with_capacity(10); put_stuff_in_bit_output(&mut i_output); i_output.terminate(); unsafe { ...
Rust
0
def viz_acc_n(df, plt, dataset, score, epss=None, y_title=None, x_label='', lw=3, ls='-', legend=None, ylim=None, ncol=3): if epss is None: epss = np.sort(df.eps.unique()) epss = epss[epss >= 0] metrics = {'score_dl1': '$\\hat{\\Delta}_1$', 'score_dl2': '$\\hat{\\Delta}_2$', 'score_d...
Python
1
55), 2) mask = Image.fromarray(mask) dr_cnt.bitmap((0, 0), mask.convert('L'), fill=(r, g, b, 256)) bg_img.paste(Image.alpha_composite(bg_img, cnt)) return bg_img def draw_floorplan(dwg, junctions, juncs_on, lines_on): # draw edges for k, l in lines_on: x1, y1 = np.arr...
Python
1
he orbit maps here are useful for finding efficient routes between, //! for example, you and Santa. //! You download a map of the local orbits (your puzzle input). //! //! Except for the universal Center of Mass (COM), //! every object in space is in orbit around exactly one other object. use std::str::FromStr; us...
Rust
0
(ref mut entry) = guard[token.uid] { action(entry); Ok(()) } else { Err("Already Disconnected") } } else { Err("Invalid Token") } } pub(crate) fn sent_chunk( &self, token: &Token, ) -> Result...
Rust
0
# Funções necessárias: # DefaultEquals: def defaultEquals(a, b): return a == b # Compare Elements: Compare = { "LESS_THAN": -1, "BIGGER_THAN": 1 } # defaultComapre: def defaultCompare(a, b): if (a == b): return 0 return Compare["LESS_THAN"] if a < b else Compare["BIGGER_THAN"] # Classes ...
Python
1
"""Test util for the homekit integration.""" from unittest.mock import patch from homeassistant.components.homekit.const import DOMAIN from homeassistant.const import CONF_NAME, CONF_PORT from homeassistant.core import HomeAssistant from tests.common import MockConfigEntry PATH_HOMEKIT = "homeassistant.components.h...
Python
1
#!/usr/bin/env python from glob import glob import time import os import sys sys.path.append('..') import ternip.formats ternip_time = time.clock() recogniser = ternip.recogniser() normaliser = ternip.normaliser() for file in glob(os.path.normpath('preprocessed/*.sgm')): with open(file) as fd: doc = tern...
Python
1
{ guarder: (&self).inner.clone() }); } else { //获取异步共享锁失败,则自旋后,再次尝试 spin(spin_len); continue; } } //尝试获取异步共享锁失败,则加入共享等待队列,并立即解锁等待队列的共享锁 (&self).inner.push_shared(cx.waker().cl...
Rust
0
(state_name) if not weather_result.get("success"): return weather_result weather_data = weather_result["weather_data"] # Simple correlation analysis correlations = [] for month, weather in weather_data.items(): if month in wine_s...
Python
1
modify, merge, // > publish, distribute, sublicense, and/or sell copies of // > the Software, and to permit persons to whom the Software // > is furnished to do so, subject to the following // > conditions: // > // > The above copyright notice and this permission notice // > shall be included in all copies or substant...
Rust
0
")) def create_header(num, size): head_frame = Frame(root, height=50, width=1200, bd=3, relief=SOLID) head_frame.pack(anchor=CENTER) head_lab = Label(root, text=f"Slide {num}", font=("Georgia", 27, 'bold'), padx=size, bg="#8fc7c5", pady=1, fg="#ff0548") he...
Python
1
import json import re def extract_title_and_content(json_file_path): encodings = ['utf-8', 'latin-1', 'ISO-8859-1'] # List of encodings to try for encoding in encodings: try: # Try to open and read the JSON file with the current encoding with open(json_file_path, 'r', encodi...
Python
1
eligible for retry """ if retry_period is None: retry_period = RETRY_PERIOD import multiprocessing def decorator(method): @wraps(method) def wrapper(*args, **kw): _retry_timeout = kw.pop("retry_timeout", retry_timeout) _retry_period = kw.pop("ret...
Python
1
.content, UTF_8), ListDocumentBlockResponse) response.raw = resp return response async def alist(self, request: ListDocumentBlockRequest, option: Optional[RequestOption] = None) -> ListDocumentBlockResponse: if option is None: option = RequestOption() ...
Python
1
d[User, Depends(get_current_user)] ) -> User: return current_user @app.post("/animals/", response_model=AnimalDetails) async def create_animal(animal: AnimalDetails, current_user: UserInDB = Depends(get_current_user)): # Animal object is automatically parsed and defaults handled by Pydantic model animal_di...
Python
1
}) } } impl W { #[doc = r" Reset value of the register"] #[inline] pub fn reset_value() -> W { W { bits: 0 } } #[doc = r" Writes raw bits to the register"] #[inline] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } #[doc = "...
Rust
0
Don't modify *func*'s signature, as boilerplate.py needs it. wrapper.__signature__ = signature.replace(parameters=[ param.replace(kind=KWO) if param.name in kwonly else param for param in signature.parameters.values()]) DECORATORS[wrapper] = decorator return wrapper def deprecate_method_ov...
Python
1
# Code generated by Lark OpenAPI. from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type from lark_oapi.core.construct import init from .common_filter import CommonFilter class BatchQueryAgencyRequestBody(object): _types = { "agency_supplier_id_list": List[str], "keyword": s...
Python
1
from subprocess import Popen import math import pygame """ The main "launcher" for all other games in Gester. """ # Each tuple should be: (Name, Path to .py runner, Path to gallery image) GAMES = [ ( "Box Stacker", "games/box-stacker/box_stacker.py", "games/assets/gallery-covers/box-stack...
Python
1
m/docs/api.htm?apiId=28892 :param adgroup_id_list: 单元ID列表 :param status: 状态,投放:1,暂停:0,结束:9 :param campaign_id: 单元计划ID """ return self._top_request( "taobao.zuanshi.banner.adgroup.status", { "adgroup_id_list": adgroup_id_list, ...
Python
1
trix HW = self.target_height * self.target_width target_coordinate = list( itertools.product( range(self.target_height), range(self.target_width))) target_coordinate = paddle.to_tensor(target_coordinate) # HW x 2 Y, X = paddle.split( target_coordi...
Python
1
ata.read().await; let pool = ctx_data.get::<DbKey>().unwrap(); let guild = get_active_guild(&ctx, pool.clone(), &reaction).await; if guild.rules_message_id as u64 != *reaction.message_id.as_u64() { return; }; let mut member = GuildId(guild.guild_id as u64) ...
Rust
0
Child(QDockWidget, 'Layers') toolbar = dockwidget.findChildren(QToolBar)[0] # TODO improve this, now remove last action toolbar.removeAction(toolbar.actions()[len(toolbar.actions()) - 1]) self.btn_add_layers = None def _close_open_dialogs(self): """ Close Gi...
Python
1
from .config import ( ConfigTypeAttributes, Int, Path, # String, # DEFAULT_TYPE_ATTRIBUTES, ) result = 1 # A simple comment result = ( 1, ) # Another one result = 1 # type: ignore result = 1# This comment is talking about type: ignore square = Square(4) # type: Optional[Square] def function(a:in...
Python
1
: __m256i, b: __m256i, c: __m256i, ) -> __m256i { let shf = _mm256_shrdv_epi16(a, b, c).as_i16x16(); let zero = _mm256_setzero_si256().as_i16x16(); transmute(simd_select_bitmask(k, shf, zero)) } /// Concatenate packed 16-bit integers in b and a producing an intermediate 32-bit result. Shift the res...
Rust
0
x => panic!("Expected PEER_CLOSED but got {:?}", x), } match remote2.as_ref().write(&[0; 1]) { Err(zx::Status::PEER_CLOSED) => {} x => panic!("Expected PEER_CLOSED but got {:?}", x), } // We expect to attempt to reconnect. // Advance time by ...
Rust
0
_ns::{Resolve, HostResolve}; use futures_cpupool::CpuPool; return Router::from_config(&Config::new() .set_fallthrough(ThreadedResolver::use_pool(CpuPool::new(1)) .null_service_resolver() .frozen_subscriber()) .done(), h) } pub fn options() -> Options { use argparse:...
Rust
0
ncy_resolution is too high for the given" "data size") elif len_segment is not None: if len_segment <= 0: raise ValueError("len_seg must be a positive number") if xdata.shape[axis] < len_segment: raise ValueError("len_seg must be shorter than the ...
Python
1
use ark_std::{test_rng, UniformRand, Zero}; // a helper function to check if a point is on the ed curve // of bls12-377 G1 fn is_on_bls12_377_ed_curve(p: &Point<Fq377>) -> bool { // Twisted Edwards curve 2: a * x² + y² = 1 + d * x² * y² let a = field_new!(Fq377, "-1"); let d = f...
Rust
0
= self .metrics_wt_sum .iter() .map(|&(wt, sum)| sum / wt) .collect(); write!(f, "{:?})", averaged) } } impl PerformanceReport { pub fn new(num_metrics: usize) -> Self { Self { metrics_wt_sum: vec![(0., 0.); num_metrics], } ...
Rust
0
li> 即时拨测只支持页面浏览,网络质量,文件下载 :type TaskType: int :param _Nodes: 拨测节点列表 :type Nodes: list of str :param _NodeIpType: 拨测任务所选的拨测点IP类型,0-不限,1-IPv4,2-IPv6 注意:此字段可能返回 null,表示取不到有效值。 :type NodeIpType: int :param _Interval: 拨测间隔 :type Interval: int :param _Parameter...
Python
1
be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070.""" city: Optional[str] = None r"""A city name. Required for payment methods `billie`, `in3`, `klarna` and `riverty`. """ region: Optional[str] = None r"""The top-level administrative subdivision of the ...
Python
1
(s2) + 1) result.str = "Range(%s,%s)" % (s1, s2) else: ranges = [] for i in range(0, len(s1), 2): ranges.append(CodeRange(ord(s1[i]), ord(s1[i + 1]) + 1)) result = Alt(*ranges) result.str = "Range(%s)" % repr(s1) return result def Opt(re): """ Opt(re...
Python
1
# Copyright 2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
Python
1
import pandas as pd import matplotlib.pyplot as plt CSV_PATH = "cards_scanned.csv" TARGET_COUNT = 1000 def load_data(path: str = CSV_PATH) -> pd.DataFrame: """Return contents of ``path`` as a DataFrame with missing values filled.""" df = pd.read_csv(path) df.fillna("Unknown", inplace=True) return df ...
Python
1
Logger.html /// [`Logger::default()`]: struct.Logger.html#impl-Default pub struct LoggerBuilder<W: Write + Send> { level: log::LevelFilter, out: Option<W>, flag: Flag, prefix: String, } impl<W: Write + Send> LoggerBuilder<W> { /// Set the allowed log level. pub fn set_level(mut self, level: log...
Rust
0
trics)) metrics_file[epoch] = {**metrics, **val_metrics} final_metrics[value] = metrics_file torch.save(model.state_dict(), DIR_EXPERIMENT + f'/model_{EPOCHS}_noise_{value}') with open(DIR_EXPERIMENT + '/different_noises_rotated.txt', 'w') as file: file.write(json.dumps(final_me...
Python
1
import eigen_dist_test import numpy as np from time import time import matplotlib.pyplot as plt # twomat_times = [] SIZE = 30 sizes = [] repl_times = [] repl_times2 = [] loop_openmp_times = [] loop_no_openmp_times = [] while SIZE < 400: # print(SIZE) t1 = time() x1 = eigen_dist_test.dist_loop_open...
Python
1
are here to make inspection // of the buffers cleaner. Can likely be removed. cmd_buf.clear_buffer(&self.tilegroup_buf); cmd_buf.clear_buffer(&self.ptcl_buf); cmd_buf.memory_barrier(); cmd_buf.image_barrier(&self.image_dev, ImageLayout::Undefined, ImageLayout::General); ...
Rust
0
import pytest from mitmproxy.tools.console import statusbar async def test_statusbar(console, monkeypatch): console.options.update( modify_headers=[":~q:foo:bar"], modify_body=[":~q:foo:bar"], ignore_hosts=["example.com", "example.org"], tcp_hosts=["example.tcp"], intercep...
Python
1
tion of abstraction, since it assumes // knowledge about what specific SIMD features are being used. let mut features = vec![]; if is_x86_feature_detected!("ssse3") { features.push("+SIMD"); } else { features.push("-SIMD"); } if is_x86_feature_detected!("avx2") { feature...
Rust
0
# MIT License # # Copyright (c) [2025] [c3rb3ru5d3d53c] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, ...
Python
1
chant = 1574, CrownoDevoursHisLunch = 1575, RareEnchantment = 1576, GloriousNight = 1577, SweetheartNecklace = 1578, FlurryBoots = 1579, DtownsHelmet = 1580, DtownsBreastplate = 1581, DtownsLeggings = 1582, DtownsWings = 1583, WillsWings = 1584, CrownosWings = 1585, CenxsWings = 1586, CenxsDre...
Rust
0
CK), "R to Remove an item you are using."); ctx.print_color_centered(17, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), "D to Drop an item from your inventory."); ctx.print_color_centered(18, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), "> to go down stairs, if you are standing on them."); ctx.print...
Rust
0
atari_entries = [ { 'env-title': 'atari-beam-rider', 'env-variant': 'No-op start', 'score': 8148.1, }, { 'env-title': 'atari-breakout', 'env-variant': 'No-op start', 'score': 581.6, }, { 'env-title': 'atari-pong', 'env-variant': 'No-op ...
Python
1
# ANSI color codes for terminal output RED = '\033[91m' GREEN = '\033[92m' YELLOW = '\033[93m' BLUE = '\033[94m' RESET = '\033[0m' # Configuration VERBOSE_OUTPUT = True # Print type information COLOR_OUTPUT = True # Use colored output
Python
1
img_pred = results['rgb_fine'].view(h, w, 3) depth_pred = results['depth_fine'] else: img_pred, depth_pred = interpolate(results, results_tp1, dt, dataset.Ks[sample['cam_ids']], sample['c2w...
Python
1
t_milestone = 0 for milestone in args.schedule: if cur_epoch > milestone: current_schdule += 1 init_lr *= 0.1 last_milestone = milestone else: cur_epoch -= last_milestone break if current_schdule < len(args.schedule): all_epochs...
Python
1
edad = 47 miedad = 47 mi_edad = 47 # mi edad = 47 # mi-edad = 47 edad2 = 47 e2dad = 47 #2edad = 47
Python
1
p = [10, 40] # Границы отрезока P в возврастающем порядке q = [5, 15] # Границы отрезока Q в возврастающем порядке r = [35, 50] points = p + q def f(x, A): P = p[0] <= x <= p[1] Q = q[0] <= x <= q[1] R = r[0] <= x <= r[1] return (A or P) or (Q <= R) answer = [] for a1 in points: for a2 in poin...
Python
1
WriteZMode: i32, VerticalFlag: i32, String: *const i8, StringLength: usize, ) -> i32; pub fn dx_ConvertMatrixFtoD(Out: *mut DMatrix, In: *const Matrix) -> i32; pub fn dx_ConvertMatrixDtoF(Out: *mut Matrix, In: *const DMatrix) -> i32; pub fn dx_CreateIdentityMatrix(Out: *mut Ma...
Rust
0
import sys def main(): # Read input from stdin v1, v2, t, d = map(int, input().split()) # Initialize a 2D array dp to store the maximum values for each time step and velocity dp = [[-1e17] * 1150 for _ in range(t - 1)] # Set the initial state for the first time step with the initial velocity ...
Python
1
s used to frontload potentially slow disk operations while we're stuck //! waiting for user input anyway, but not yet capable of decrypting. use std::collections::VecDeque; use std::io::{Error as IoError, ErrorKind, IoSliceMut, Read}; use anyhow::{Context, Result}; use log::{debug, info, warn}; use crate::hiberutil:...
Rust
0
from ultralytics import YOLOE import torch det_model = YOLOE("yoloe-v8l.yaml") state = torch.load("yoloe-v8l-seg.pt") det_model.load(state["model"]) det_model.save("yoloe-v8l-seg-det.pt") model = YOLOE("yoloe-v8l-seg-det.pt") print(model.args)
Python
1
from easydict import EasyDict qbert_dqn_config = dict( exp_name='qbert_dqn_seed0', env=dict( collector_env_num=8, evaluator_env_num=8, n_evaluator_episode=8, stop_value=30000, env_id='Qbert-v4', #'ALE/Qbert-v5' is available. But special setting is needed after gy...
Python
1
eTranscription($contentIds: [String!]) {subtitleTranscription(contentIds: $contentIds) {id status transcriptionType subtitleUrl lastUpdated visibility}}", "variables": {"contentIds": []}, } GRAPH_QUERY_UseHasCourseAccess = { "operationName": "UseHasCourseAccess", "variables": {}, "query": "query UseHas...
Python
1
#!/usr/bin/env python """ * ========================================================================= * This file is part of NITRO * ========================================================================= * * (C) Copyright 2004 - 2016, MDA Information Systems LLC * * NITRO is free software; you can redistribu...
Python
1
progress_mode_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_progress_mode_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::ClutterTimeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ...
Rust
0
shown layer at that index is to not be displayed."] #[doc = " Each layer header must be a part of a layer structure such as ovrLayerEyeFov or"] #[doc = " ovrLayerQuad, with Header.Type identifying its type. A NULL layerPtrList entry in the"] #[doc = " array indicates the absence of the ...
Rust
0
emory.append(buffer.pop(0)) curr_buffer_length = self.llm.get_num_tokens_from_messages(buffer) self.moving_summary_buffer = await self.apredict_new_summary( pruned_memory, self.moving_summary_buffer ) def clear(self) -> None: """Clear memory contents....
Python
1
W, X, Y, Z, /// The Escape key, next to F1. Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, /// `Insert`, next to Backspace. Insert, Home, Delete, End, PageDown, PageUp, Left, Up, Right, Down, /// The Backspace key, right o...
Rust
0
m.min_charge_multiple_per_day} "for m in charge_multiple_offending_missions]) limited_individual_mode_offending_missions = check_missions_limited_individual_mode(missions, consultant, month) if limited_individual_mode_offending_missions: return _("Charge cannot exceed forecast (%s)") %\ ", "...
Python
1
"Alba", "Aurora", "Zenit", "Poner del sol", "Crepusculo", ), "id": ("Prakiraan cuaca:", "", "", "", "", "", "", "", ""), "it": ( "Previsioni meteo:", "Tempo", "Fuso orario", "Ora", "Alba", "Sorgere del Sole", "Zenit...
Python
1
auth_token: kv.get(AUTH_TOKEN).to_owned(), client_cert, client_key, }, ); } } Ok(cfg) } fn ensure_cert_key(cert: &str, key: &str) -> anyhow::Result<()> { anyhow::ensure!( (cert.is_empty() && key.is_empty()) || (!ce...
Rust
0