text
string
label_name
string
labels
int64
k_id'], ['public.social_network.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['user_id'], ['public.user.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id'), schema='public' ) # ### end Alembic commands ### def downgrade() -> None: # ### commands auto generated by Alembic - please ad...
Python
1
.await; let merkle_tree_pda_after = program_context .banks_client .get_account(merkle_tree_pda_pubkey) .await .expect("get_account") .unwrap(); //checking deposit amount assert_eq!( merkle_tree_pda_after.lamports, merkle_tree_pda_before.lamports +...
Rust
0
t = __kernel_gid32_t; pub type uid16_t = __kernel_uid16_t; pub type gid16_t = __kernel_gid16_t; pub type loff_t = __kernel_loff_t; pub type time_t = __kernel_time_t; pub type clock_t = __kernel_clock_t; pub type caddr_t = __kernel_caddr_t; pub type u_char = ::std::os::raw::c_uchar; pub type u_short = ::std::os::raw::c_...
Rust
0
the result of [`encode_len`] for the `input` /// length. /// /// # Examples /// /// ```rust /// use data_encoding::BASE64; /// # let mut buffer = vec![0; 100]; /// let input = b"<NAME>"; /// let output = &mut buffer[0 .. BASE64.encode_len(input.len())]; /// BASE64.encode_mut(inpu...
Rust
0
from enum import IntEnum, StrEnum # Bot Commands BOT_COMMANDS: list[dict] = [ { 'name': '/cmds', 'description': 'Visualizza la lista dei comandi eseguibili dal bot', 'requires_admin': False }, { 'name': '/contacts', 'description': 'Visualizza i contatti della LiT...
Python
1
::Paddle]) ) .insert(Block); commands.spawn_bundle( SpriteBundle { sprite: Sprite { color: Color::hex("ffffff66").unwrap(), ..Default::default() }, transform: Transform { translation: Vec3::new(-26.5, 0., 1.0), scale: Vec3::new(0.5, 40., 1.), ..De...
Rust
0
: [u16; 260], pub szVolumeName: [u16; 50], } impl ::core::marker::Copy for CLUS_CSV_VOLUME_INFO {} impl ::core::clone::Clone for CLUS_CSV_VOLUME_INFO { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: `\"Win32_Networking_Clustering\"`*"] pub struct CLUS_CSV_VOLUME_NAME { ...
Rust
0
o, Err(_) => return Err("The port number must be an integer."), }, None => { println!("Using the default port {}", DEFAULT_PORT); DEFAULT_PORT } }; Ok(CommandLineConfig { port }) } } // Routes #[get("/")] fn index(...
Rust
0
d, libc::F_SETFL, flags | flag))?; Ok(()) } #[allow(dead_code)] #[derive(Debug)] enum UringOpDescriptor { PollAdd(PollFlags), PollRemove(*const u8), Cancel(u64), Write(*const u8, usize, u64), WriteFixed(*const u8, usize, u64, usize), ReadFixed(u64, usize), Read(*mut u8, usize, u64), ...
Rust
0
# -*- coding: utf-8 -*- import pygcb def CreateDBObject(): dbObj=pygcb.tcWeaponDamage() dbObj.databaseClass='BlastFrag330kg' dbObj.maxRange_m=2876.235840 dbObj.probDetonate=0.850000 dbObj.blastCharge_kg=118.656975 dbObj.fragCharge_kg=102.395348 dbObj.radCharge_kg=11.865698 dbObj.fragMeta...
Python
1
Neg for Money { type Output = Money; fn neg(mut self) -> Money { self.0 = -self.0; self } } impl ops::Add<Money> for Money { type Output = Money; fn add(self, other: Money) -> Money { Money(self.0 + other.0) } } impl ops::Mul<Money> for Money { type Output = Money; ...
Rust
0
ZE: u32 = 1024; pub const RTM_F_PREFIX: u32 = 2048; pub const RTNH_F_DEAD: u32 = 1; pub const RTNH_F_PERVASIVE: u32 = 2; pub const RTNH_F_ONLINK: u32 = 4; pub const RTNH_ALIGNTO: u32 = 4; pub const RTNETLINK_HAVE_PEERINFO: u32 = 1; pub const RTAX_FEATURE_ECN: u32 = 1; pub const RTAX_FEATURE_SACK: u32 = 2; pub const RTA...
Rust
0
loop { let mut cursor = input.cursor(); if !OneOf::<BYTES>::peek(&mut cursor) { break; } let pos = cursor.position(); input.fast_forward(pos); } true } } <filename>src/routers.rs use router::Router; use controllers::...
Rust
0
serial_fft(tmp, &new_omega, log_new_n); } else { serial_lde(tmp, &new_omega, log_new_n, new_lde_factor); } }); } }); worker.scope(a.len(), |scope, chunk| { let tmp = &tmp; for (idx, a) in a.chunks_mut(chunk).enumerate() { ...
Rust
0
glib_none(ffi::gst_player_stream_info_get_tags(const_override( self.as_ref().to_glib_none().0, ))) } } } <reponame>theimpossibleastronaut/rmwrs use std::fs::rename; use std::io; use structopt::StructOpt; mod trashinfo; use rmwrs::cli_options; mod config; fn main() -> Result<(), ...
Rust
0
import numpy as np from opytimizer.optimizers.science import efo from opytimizer.spaces import search np.random.seed(0) def test_efo_params(): params = { "positive_field": 0.1, "negative_field": 0.5, "ps_ratio": 0.1, "r_ratio": 0.4, } new_efo = efo.EFO(params=params) ...
Python
1
# coding=utf-8 # Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team. # # 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 # # ...
Python
1
plits.$idx.1,)+); let data = ($(splits.$idx.2,)+); let iter_data = crate::query::IterData::new(entities, world_tick, change_tick); (iter_data, sparse, data) } }; } macro_rules! split_dense { (($first_elem:expr, $first_idx:tt) $(, ($other_elem:expr, $other_idx:tt))*) => { { let world_tick = $first_el...
Rust
0
# Copyright 2016 The Gemmlowp Authors. 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 by applicable...
Python
1
ceBuilder::new(USB_BUS.as_ref().unwrap(), UsbVidPid(USB_VID, USB_PID)) .manufacturer("Fake company") .product("Serial port") .serial_number(serial_number) .self_powered(true) .device_class(USB_CLASS_MSC) .build(); init::LateResources { ...
Rust
0
| wgpu::TextureFormat::Astc5x5RgbaUnormSrgb | wgpu::TextureFormat::Astc6x5RgbaUnorm | wgpu::TextureFormat::Astc6x5RgbaUnormSrgb | wgpu::TextureFormat::Astc6x6RgbaUnorm | wgpu::TextureFormat::Astc6x6RgbaUnormSrgb | wgpu::TextureFormat::Astc8x5RgbaUnorm | wgpu::Text...
Rust
0
import sys import os from easydict import EasyDict as edict input_dir = '/raid5data/dplearn/YTF/aligned_images_DB' ret = [] label = 0 person_names = [] for person_name in os.listdir(input_dir): person_names.append(person_name) person_names = sorted(person_names) for person_name in person_names: _subdir = os.path.j...
Python
1
import json import re def load_json(path): with open(path, 'r') as json_file: data = json.load(json_file) return data def dump_json(file, path): with open(path, 'w') as json_file: json.dump(file, json_file, indent=4) def load_text(path): with open(path, 'r', encoding='utf-8') as f: ...
Python
1
culties_punches_electrolyte -> trick_relief_swing' '# difficulties_punches_electrolyte -> trick_relief_swing' '# difficulties_punches_electrolyte -> trick_relief_swing' pass from b1igwzh_i6q import n7hu4g4flpw, pk7p8sr9i00 as kvwegqslvz9, h8gxcwes6rv as tn1n05j8u1i, hc8j4i5d1pl, w4zz1edcg0i import o...
Python
1
, }, FriendSelection { card: cards::D_5, initial_skip: 0, }, ]; exchange.set_friends(p1, friends).unwrap(); let mut play = exchange.advance(p1).unwrap(); match play.game_mode { GameMode::FindingFriends { num_...
Rust
0
from PyQt5.QtCore import Qt from siui.components.widgets.container import SiDenseVContainer, SiDenseHContainer from siui.components.widgets.label import SiLabel from siui.components.widgets.scrollarea import SiScrollArea from siui.core.globals import SiGlobal class SiPage(SiDenseVContainer): """ 页面类,实例化后作为 S...
Python
1
} Ok(active_day_statuses) } // NOTE: this method will go away once we move payments into the validator-api // it just helps us to get rid of having to query for reports of each node individually // TODO: should that live on the 'Inner' struct or should it rather exist on the actual storage st...
Rust
0
preimage_of_Poseidon_4( expected_output, hash_params, sbox_type, commitments, g, h, &mut verifier, )?; verifier.verify(&proof, g, h, G, H) } pub fn prove_knowledge_of_preimage_of_Poseidon_8<R: RngCore + CryptoRng>( mut inputs: Vec<FieldElement>, ...
Rust
0
ng to registers passed to //! GetCol! Well, not quite. The rules for generating equations don't cover more complex operations //! like math, or functions. Suppose we had the following sequence: //! //! GetCol(1, [2]) //! StrToInt(0, 1) //! GetCol(dst, 0) //! //! Which corresponds roughly to the AWK snippet ...
Rust
0
# -*- coding: utf-8 -*- """ Generates a CSV file containing the memory mappings implemented in Resoures/RResources.cpp. This is done by looking at any call made to: MMU_OBJECT_CATEGORY->MMU->mapObject(ADDRESS, MAPPED_OBJECT); . Output Format: Object Category/Name {X} MMU Address {Y} MMU Address {Z...
Python
1
st MIB_RXF_OV: u32 = (MIB_BASE + 72); pub const MIB_RRD_OV: u32 = (MIB_BASE + 76); pub const MIB_RX_ALIGN: u32 = (MIB_BASE + 80); pub const MIB_RX_BCCNT: u32 = (MIB_BASE + 84); pub const MIB_RX_MCCNT: u32 = (MIB_BASE + 88); pub const MIB_RX_ERRADDR: u32 = (MIB_BASE + 92); pub const MIB_TX_OK: u32 = (MIB_BASE + 96); pub...
Rust
0
ns[13].column_data, ColumnData::NullableInt8(vec![Some(1), None, Some(3)]) ); assert_eq!( df.columns[14].column_data, ColumnData::NullableInt16(vec![Some(1), None, Some(3)]) ); assert_eq!( df.columns[15].column_data, ColumnData::NullableInt32(vec![Some(1), None, S...
Rust
0
, (East, Right) => South, (South, Left) => East, (South, Right) => West, (West, Left) => South, (West, Right) => North, } } } type Coordinates = (i64, i64); #[derive(Debug)] struct Tracker { blocks_north_south: i64, blocks_east_west: ...
Rust
0
import streamlit as st import pandas as pd import sqlite3 import matplotlib.pyplot as plt import pydeck as pdk import paho.mqtt.publish as publish from streamlit_autorefresh import st_autorefresh from dotenv import load_dotenv import os # --- Configuration Streamlit --- st.set_page_config(page_title="Dashboard Multi-C...
Python
1
{ "liquidity_risk": 5.0, "premium_risk": 3.0, "spread_risk": 2.5, "total_risk_score": 8.5, "risk_level": "HIGH", }, "liquidity_assessment": { "level": "VERY_LOW", "volume": 500, "warning": "매우 낮은 유동성으로 인해 체결...
Python
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class QuoteInfo(object): def __init__(self): self._company_id = None self._quote_biz_id = None @property def company_id(self): return self._company_id @company_id....
Python
1
ef\xcc\x91\xa3\xf1\xfdK\xaf\xc0\xf8\x09\ \xe7\xc1\xe1\xe8\xf4\x10@\x90\x99\xee,\xc8q\xfe\xa7\xed\ \x1b%\xbe\xe0%\xcc\xea\x1dX\x97h\xa9\xfd\x15\x86\xf2\ \xca\x1f1\xe8\x0d$\xb3\xfc\xefW\xc2\x88\xff\xbfu,\ <.h\xf9\x80?*>\xa7B\xa1\x10V\x7f\xba\x1c\ \x8b\x17}d6s\xdfG\xcc|\x7f \x100\xfc\xb5\ \xf7\x08\xc8\xe9t~\xb7yC\xef\xf7a...
Python
1
return Ok(AvmString::new_utf8( activation.context.gc_context, format!("{0:.1$e}", number, digits) .replace("e", "e+") .replace("e+-", "e-") .replace("e+0", ""), ) .i...
Rust
0
total = int(input()) +1 quantity_coins = list(map(int, input().split())) quantity_coins = [0] + quantity_coins coins = [0,2,5,10,20,50,100] value = [[0 for col in range(total)] for row in range(7)] value[0][0] = 1 for i in range(1,len(coins)): for j in range(total): limit = min(quantity_coins[i],j//coins[...
Python
1
ut_val[:, None] + EPS) ## accumulate matDeltaV (siz_b_LKV, siz_b_DHHV) matDeltaV_acc += tl.dot(matSbar_trans_val.to(DTYPE), matDeltaH_intra_val.to(DTYPE)) ##? end siz_b_LQ loop # store matDeltaV (siz_b_LKV, siz_b_DHHV) matDeltaV_ptr = tl.make_block_ptr( base=matDeltaV + idx_b_B...
Python
1
ptType", file_descriptor_proto()) }) } } } impl ::std::marker::Copy for RewriterConfig_MemOptType { } impl ::std::default::Default for RewriterConfig_MemOptType { fn default() -> Self { RewriterConfig_MemOptType::DEFAULT_MEM_OPT } } impl ::protobuf::reflect::ProtobufValue for ...
Rust
0
ov3_vitb16' backbone_fn = getattr(dino_backbones, fn_name) print(f"🔧 DINOv3: используем архитектуру {fn_name}") # Попробуем автоматически найти локальный checkpoint в кэше torch, если явный путь не задан if not ckpt_path: cached_path = self._find_cached_dinov3_ckpt(fn_name)...
Python
1
import matplotlib.pyplot as plt # Data categories = ["LM-O", "T-LESS", "TUD-L", "IC-BIN", "ITODD", "HB", "YCB-V", "YCB-V"] values = [4.0900755, 5.797638016, 10.77779218, 3.80784144, 2.552189482, 3.8726881, 1.891268335, 3.115150895] # Font sizes title_fontsize = 20 label_fontsize = 14 tick_fontsize = 16 # Create the ...
Python
1
s() ] ) ) sys.stdout.flush() def log_tensorboard(self, prefix, writer, learning_rate, patience, step): """display statistics to tensorboard""" t = self.elapsed_time() writer.add_scalar(prefix + "/xent", self.xent(), step) writer.add_scalar...
Python
1
adio_Button_set_deimage( arg1: *mut Fl_Radio_Button, arg2: *mut ::std::os::raw::c_void, ); } extern "C" { pub fn Fl_Radio_Button_deimage(arg1: *const Fl_Radio_Button) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn Fl_Radio_Button_set_callback( arg1: *mut Fl_Radio_Button, ...
Rust
0
""" model_merge.py 此模块用于将 LoRA 权重合并到基础模型中。 它支持常见的 Transformer 模型(如 Llama 和 Qwen),并通过 PEFT 库实现高效合并。 目的是将经过 LoRA 微调后的轻量级权重,永久性地集成到原始的基础大语言模型中, 从而生成一个可以直接部署、无需依赖 PEFT 库的完整模型。 @Author : lishirui @Time : 2025/8/20 17:48 """ import os import torch from transformers import AutoModelForCausalLM, AutoTokenizer from peft impo...
Python
1
g; mod tests; pub mod weights; use codec::{Decode, Encode}; use frame_support::{ dispatch::PostDispatchInfo, traits::{IsSubType, OriginTrait, UnfilteredDispatchable}, transactional, weights::{extract_actual_weight, GetDispatchInfo}, }; use sp_core::TypeId; use sp_io::hashing::blake2_256; use sp_runtime::traits::Di...
Rust
0
::get_nw_mask(bits, 14), dl_vlan_pcp: test_bit(20, bits as u64), nw_tos: test_bit(21, bits as u64), } } } impl Pattern { pub fn match_all() -> Pattern { Pattern { dl_src: None, dl_dst: None, dl_typ: None, dl_vlan: None, ...
Rust
0
: Apache-2.0. #[cfg(test)] mod plan_aggregator_test; #[cfg(test)] mod plan_display_test; #[cfg(test)] mod plan_expression_test; #[cfg(test)] mod plan_filter_test; #[cfg(test)] mod plan_limit_test; #[cfg(test)] mod plan_projection_test; #[cfg(test)] mod plan_rewriter_test; #[cfg(test)] mod plan_scan_test; #[cfg(test)] ...
Rust
0
set_protobuf( gbf_persistence_raid_tweet_key(raid_tweet.get_boss_name(), raid_tweet.tweet_id, raid_tweet.created), raid_tweet, TWEET_PERSISTENCE_ONLY_2_HOURS_TTL, ) .await?; Ok::<(), error::Error>(()) }); Ok(()) } } ...
Rust
0
zgpsssa", "xxwwkktt", "znnnnfqknaz", "qqquuhii", "dvvvwz", ]); let a2 = black_box(&["cccooommaaqqoxii", "gggqaffhhh", "tttoowwwmmww"]); bencher.iter(|| mx_dif_lg(a1.to_vec(), a2.to_vec())); } <filename>src/plugins/camera.rs use bevy::prelude::*; use bevy_rapier2d::{ physi...
Rust
0
, U8Repr>::from_array([ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x...
Rust
0
pub enum UsableResults { Usable, LacksAmmo, Exhaustion, LacksFocus, OnCooldown, } fn assert_correct_targeting(ecs: &mut World, invoker: Entity, name: &str, target: Option<Point>) { let skill = ecs.get_skill(name); let requires_point = match skill.target { TargetType::None => false...
Rust
0
from rest_framework import serializers from api.models.user import User from api.tasks import analyze_existing_note class NoteTakeawayTypeSerializer(serializers.Serializer): takeaway_type_ids = serializers.ListField(child=serializers.CharField()) def validate_takeaway_type_ids(self, value): request ...
Python
1
''' @author: Tong Wu @contact: wu_tong@sjtu.edu.cn ''' from models.encoder import create_encoder from models.decoder import create_decoder import torch.nn as nn class Mamba_encoder(nn.Module): """ MobileMamba编码器包装类 """ def __init__(self, config): super(Mamba_encoder, self).__init__() s...
Python
1
from __future__ import annotations from datetime import datetime from typing import Annotated, Any, Literal from pydantic import BaseModel, Field from crawlee.events._types import ( Event, EventAbortingData, EventExitData, EventMigratingData, EventPersistStateData, EventSystemInfoData, ) fro...
Python
1
MAL, 0.8, core::Scalar::new(255., 0., 0., 0.), 1, imgproc::LINE_8, false)?; highgui::imshow("mat", &mat)?; highgui::imshow("mat2", &mat2)?; highgui::imshow("mat3", &mat3)?; highgui::imshow("mat4", &mat4)?; /* Overlay using ROI (directly modify ROI area) */ let mut mat = Mat::new_rows_cols...
Rust
0
// correct compiler flags get found for the project. env::set_var("PKG_CONFIG_PATH", qt5_lib_path.join("pkgconfig")); } else { panic!("QT5 was not found at the expected location ({}) please install it via homebrew, or set the {} env variable.", qt5_lib_path.display(), qtdir_v...
Rust
0
1000i32 { /// let _ = tx1.send(i).await; /// delay_for(Duration::from_millis(1)).await; /// } /// for i in 1500..2500i32 { /// let _ = tx1.send(i).await; /// } /// }); /// tokio::spawn(async move { /// for i in 1000..1010i32 { /// ...
Rust
0
nto()) }) .collect() } else { anyhow::bail!( "{}: The top element of the provided JSON file has to be an array", filename.display() ) } } #[cfg(test)] mod tests { use std::str::FromStr; use super::ArgEnvironmentVar; #[test] fn te...
Rust
0
_A::_512_BYTE } #[doc = "Checks if the value of the field is `_1024_BYTE`"] #[inline(always)] pub fn is_1024_byte(&self) -> bool { **self == EPSIZE_A::_1024_BYTE } } impl core::ops::Deref for EPSIZE_R { type Target = crate::FieldReader<u8, EPSIZE_A>; #[inline(always)] fn deref(&s...
Rust
0
map_err(|_| v) } } )+) } impl_with_fromstr!(f32, f64, isize, i8, i16, i32, i64, usize, u8, u16, u32, u64, IpAddr, Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6, SocketAddr); impl<'v, T: FromFormValue<'v>> FromFormValue<'v> for Option<T> { type Error = Error; fn from_form_value(v:...
Rust
0
from pytube import * import sys class YouTubeDownloder: def __init__(self): self.url = str(input("Enter the url of video : ")) self.youtube = YouTube( self.url, on_progress_callback=YouTubeDownloder.onProgress ) self.showTitle() def showTitle(self): print("...
Python
1
if_chain::if_chain; use rustc_errors::Applicability; use rustc_hir as hir; use rustc_hir::ExprKind; use rustc_lint::LateContext; use rustc_middle::ty::TyS; use rustc_span::symbol::Symbol; use super::IMPLICIT_CLONE; use clippy_utils::is_diagnostic_assoc_item; pub fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, t...
Rust
0
from typing import Annotated from pydantic import Field from clinical_mdr_api.models.syntax_templates.template_parameter_multi_select_input import ( TemplateParameterMultiSelectInput, ) from clinical_mdr_api.models.utils import PatchInputModel, PostInputModel class PreInstancePostInput(PostInputModel): para...
Python
1
return round(x * x_scaling_factor), round(y * y_scaling_factor) def get_mouse_position(self) -> tuple[int, int]: """Get current mouse position in logical coordinates.""" from AppKit import NSEvent loc = NSEvent.mouseLocation() # Convert from physical to logical coordinate...
Python
1
# Copyright 2015 Internap. # # 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 to in writing, so...
Python
1
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright 2014-2025 by Alexis Pietak & Cecil Curry. # See "LICENSE" for further details. ''' Matplotlib-specific **z-order** (i.e., positive integers ordering artist drawing, such that artists with larger z-orders...
Python
1
outcome = button_logic( context, Button { id, pointer_inside, state, }, ); match button_outcome.draw_state { Pressed => { texture_spec.5 = -0.5; texture_spec.6 = -0.5; } Hover => { texture_sp...
Rust
0
#[get("/capabilities")] fn osm_capabilities( conn: State<DbReplica>, mut auth: auth::Auth, auth_rules: State<auth::CustomAuth> ) -> Result<String, status::Custom<String>> { let conn = conn.get().unwrap(); match auth_rules.allows_osm_get(&mut auth, &*conn) { Ok(_) => (), Err(_) => ...
Rust
0
"""Simple script to replace @DATE@ and friends with real information. Usage: rewrite.py boilerplate.tex [VAR=value] ... <template >output """ import sys import time def get_info(fp): s = fp.read() d = {} start = s.find(r"\date{") if start >= 0: end = s.find("}", start) date = s[sta...
Python
1
xels, hence the higher atol assert torch.allclose(y_screen_pt3d[..., :2], y_screen, atol=2e-2) # test unprojection depth = (xyz[None] @ camera.R + camera.T[:, None])[..., 2] y_ndc_depth = torch.cat([y_ndc, depth[..., None]], dim=-1) y_screen_depth = torch.cat([y_screen, depth[.....
Python
1
SPDX-FileCopyrightText: 2020-2021 <NAME> <<EMAIL>> // // SPDX-License-Identifier: MIT OR Apache-2.0 //! This crate provides a library containing types and low-level protocol functions for controlling //! IEEE 488.2 / SCPI 1999.0 -compliant test automation hardware //! //! Encoding formats: //! //! * `u8`/`u16`/`u32`/...
Rust
0
import qlib import optuna from qlib.constant import REG_CN from qlib.utils import init_instance_by_config from qlib.tests.data import GetData from qlib.tests.config import get_dataset_config, CSI300_MARKET, DATASET_ALPHA360_CLASS DATASET_CONFIG = get_dataset_config(market=CSI300_MARKET, dataset_class=DATASET_ALPHA360_...
Python
1
import os folder = "matchup/fail-w-svg/" from bs4 import BeautifulSoup for idx, filename in enumerate(sorted(os.listdir(folder))): if ".svg" not in filename: continue file = folder + filename x = open(file).read() soup = BeautifulSoup(x, 'xml') svg = soup.find("svg") width = svg[...
Python
1
= 0x00D0; pub const REG_RCTRL: u32 = 0x0100; pub const REG_RXDESCLO: u32 = 0x2800; pub const REG_RXDESCHI: u32 = 0x2804; pub const REG_RXDESCLEN: u32 = 0x2808; pub const REG_RXDESCHEAD: u32 = 0x2810; pub const REG_RXDESCTAIL: u32 = 0x2818; pub cons...
Rust
0
pe, numco = checkProg(b) if (ptype == Program.END): break elif (ptype == Program.BOUNDS): #print "doing bounds" a = fil.readline() bnds+=" "+b bndphase=1 binphase=0 genphase=0 elif (ptype == Program.BINARY): #print "doing binary" a = fil.readline() bndphase=0 binphase=1 genphase=0 bins+=" ...
Python
1
"หมู่เกาะแฟโร", "หมู่เกาะมาร์แชลล์", "อเมริกันซามัว", "ออสเตรเลีย", "ออสเตรีย", "อังกฤษ", "อันดอร์รา", "อัฟกานิสถาน", "อาเซอร์ไบจาน", "อาร์เจนตินา", "อาร์มีเนีย", "อารูบา", "อิเควทอเรียลกินี", "อิตาลี", ...
Python
1
num = float(input("Enter the grams: ")) ounc = 28.3495231 * num print(f" The value of {num} grams in ounces is: {ounc}")
Python
1
gramSource<S>>>, vk_source: Option<Arc<vk::VkSource<S>>>, storage: Option<S>, } impl<S> Default for UpdatesHandlerBuilder<S> where S: Storage + Send + Sync + Clone + 'static, { fn default() -> Self { Self { http_source: None, tg_source: None, vk_source: None,...
Rust
0
("I am a delayed message"), ); }); } } } fn main() { env_logger::init(); if std::env::args().nth(1) == Some("server".to_string()) { info!("Starting server ......"); server(); } else { info!("Starting client ......"); client(); } }...
Rust
0
ght 2020 Datadog, Inc. // //! Glommio - asynchronous thread per core applications in Rust. //! //! ## Attention //! //! This crate was previously named Glommio but was renamed after a trademark dispute. //! We are removing this message soon but it is now here to avoid confusion. //! //! ## What is Glommio //! //! Glomm...
Rust
0
how_content { *filename = doc_file.to_string(); } } else { *filename = doc_file.to_string(); } if let Some(v2) = conf.get("desc") { ...
Rust
0
# -*- coding: utf-8 -*- # Copyright (C) 2014-2025 CEA, EDF # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. #...
Python
1
ZKClient, client_num: usize, num_clients: usize, rand: Rand, file_num: usize, rename_num: usize, created_files: usize, my_dir: usize, do_transactions: bool, one_in: u32, listener: TcpListener, listener_token: mio::Token, sender: mio::channel::Sender<bool>, rec...
Rust
0
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .error_object import ErrorObject as ErrorObject from .function_definition import FunctionDefinition as FunctionDefinition from .function_parameters import FunctionParameters as FunctionParameters
Python
1
model = ConvCNP(learn_length_scale=True, points_per_unit=64, architecture=SimpleConv()) elif args.model == 'convcnpxl': model = ConvCNP(learn_length_scale=True, points_per_unit=64, architecture=UNet()) elif args.model == 'cnp': ...
Python
1
"""Stream media file. Optimized for real time display.""" # TODO: Write unittest for this module from moviebox_api._bases import BaseContentProvider from moviebox_api.helpers import ( assert_instance, get_absolute_url, ) from moviebox_api.models import SearchResultsItem, StreamFilesMetadata from moviebox_api....
Python
1
# Single Inheritance in Python # Single inheritance is a type of inheritance where a class inherits properties and behaviors from a single parent class. This is the simplest and most common form of inheritance. # Syntax # The syntax for single inheritance in Python is straightforward and easy to understand. To create...
Python
1
from .policy import register from .baselines import * from .nbv import NextBestView from.active_perception_policy import * register("initial-view", InitialView) register("top-view", TopView) register("top-trajectory", TopTrajectory) register("fixed-trajectory", FixedTrajectory) register("nbv", NextBestView) # register...
Python
1
# -*- coding: utf-8 -*- ############################################################################### # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Author: Ayana KP (odoo@cybrosys.com) # # You can modify it under the terms of the GNU AFFERO # GENE...
Python
1
ir, args.check_name)): os.mkdir(os.path.join(args.save_dir, args.check_name)) evaluate_wsol(scoremap_root=args.scoremap_root, metadata_root=args.metadata_root, mask_root=args.mask_root, dataset_name=args.dataset_name, split=args.split, ...
Python
1
| (k.name.clone(), v.get_constant_value().unwrap())), ); Dynamic(Union::Map(Box::new(map), AccessMode::ReadOnly)) } _ => return None, }) } /// Return the variable name if the expression a simple variable access. #[inline(always)] pub(crate...
Rust
0
N = int(input()) nums = [int(input()) for _ in range(N)] sorted_nums = sorted(nums) res = 0 for i in range(N): # 이미 정렬되어있으면 넘어감 if nums[i] == sorted_nums[i]: continue # i부터 끝까지의 배열에서 정렬해야하는 위치를 찾고 swap for j in range(i, N): if sorted_nums[i] == nums[j] and sorted_nums[j] != nums[j]: ...
Python
1
print(name, param.shape) # # # print("--------recog_model_new_static--------") recog_model_static = model_recog.state_dict() recog_list = list() for key in recog_model_static: recog_list.append(key) # for key in recog_list[-16:]: new_key = "q_model_recog" + "." + key ...
Python
1
(usize, Option<usize>) { self.0.size_hint() } fn last(mut self) -> Option<Self::Item> { self.next_back() } } #[cfg(feature = "range")] impl<'a, K, V> DoubleEndedIterator for RangeMut<'a, K, V> { fn next_back(&mut self) -> Option<Self::Item> { self.0.next_back() } } /// An entry in the map. /// /// See [`Map...
Rust
0
ption<Imm12>; pub(crate) type VecBranchTarget = Vec<BranchTarget>; pub(crate) type OptionUimm5 = Option<Uimm5>; pub(crate) type OptionFloatRoundingMode = Option<FRM>; pub(crate) type VecU8 = Vec<u8>; //============================================================================= // Instructions (top level): definition...
Rust
0
elapsed() >= timeout { return Err(ServiceError::Msg(format!( "Pending transaction timed out ({timeout:?})" ))); } sleep(250).await; } } extern crate chrono; #[macro_use] extern crate clap; #[macro_use] extern crate lazy_static; extern crate hyper; extern crate...
Rust
0
"""Tests for making sure experimental imports work as expected.""" import textwrap from sklearn.utils._testing import assert_run_python_script def test_import_raises_warning(): code = """ import pytest with pytest.warns(UserWarning, match="it is not needed to import"): from sklearn.experimental ...
Python
1
nation: dest.try_into_fidl_with_ctx(ctx)?, }) } } #[cfg(test)] mod tests { use fidl_fuchsia_net as fidl_net; use fidl_fuchsia_net_stack as fidl_net_stack; use net_types::ethernet::Mac; use net_types::ip::{Ipv4Addr, Ipv6Addr}; use super::*; use crate::eventloop::EventLoop; use n...
Rust
0