text
string
label_name
string
labels
int64
import pixhawk as px import matplotlib.pyplot as plt import time sensors = px.Pixhawk() vx = [] vy = [] vz = [] dx = 0 dy = 0 dz = 0 cont = [] i = 0 while i < 100: t_i = time.time() sensors.update_data() # print(f"Vel: {sensors.get_vel()}") vx.append(sensors.get_vel()[0]) vy.append(sensors.get_...
Python
1
from pyrogram.filters import command from pyrogram.handlers import MessageHandler from bot import bot from bot.helper.ext_utils.bot_utils import ( new_task, sync_to_async, is_gdrive_link, get_readable_file_size, ) from bot.helper.telegram_helper.filters import CustomFilters from bot.helper.telegram_hel...
Python
1
b\xfd?\xd8\xff\x00\xc5=\xfb\xafu\ \xcbJ\xff\x00O\xf8\x8f\xf7\xaf~\xeb\xddqu\x00\x5c\ \x7f[{\xf7^\xeb\x1f\xbfu\xae\xbc\x08?\x9b\x7f\xb7\ \xff\x00\x88\xbf\xbd\xf5\xea\x8e\xbd\xa4\x9f\xa0\xbd\xbf\xa1\x07\ \xfe'\xde\x8b\x05\xe2zr1\x9dG\x87^\x0a\xc7\xf0\ ~\xb6\xfa\x1f\xf8\xa7\xd3\xdf\xb5/\xafN\xfe}eX\ \x1d\xb9\x04\x7f\x8d\x...
Python
1
s \\c 0 if success, else error code."] pub fn open_data_file(name: *mut ::std::os::raw::c_char) -> INT16; } extern "C" { #[doc = " Closes EDF file on tracker hard disk"] #[doc = "Closes any open EDF file."] #[doc = ""] #[doc = "@return Returns \\c 0 if success, else error code."] pub fn close_da...
Rust
0
rgs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ...
Python
1
str) -> None: """Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code].""" lang_token = self.get_lang_token(src_lang) self.cur_lang_id = self.lang_token_to_id[lang_token] self.prefix_tokens = [self.cur_lang_id] self.suffix_tokens = [self....
Python
1
let (real, _, _) = as_number_or_return!(x); KalkValue::from(!(real.round() as i32)) } pub fn bitand(x: KalkValue, y: KalkValue) -> KalkValue { let (real, _, _) = as_number_or_return!(x); let (real_rhs, _, _) = as_number_or_return!(y); KalkValue::from(real.round() as i32 & real...
Rust
0
..module.submodules.len() { let submodule = &module.submodules[submodule_idx]; // init submodule let submodule_init_fn_name = format!("{}_init", &submodule.module.name); let submodule_init_fn = cg.module.get_function(&submodule_init_fn_name).or_else(|| { let function_type = submodule.module.ir_typ...
Rust
0
when the selected TOAs are a subset of jumped TOAs with a particular jump. Parameters ---------- toa_flags: astropy.table.column.Column The TOA table which must be modified. In pintk (pulsar.py), this will be ``all_toas.table["flags"][selected]`` jump_num: int...
Python
1
ators). //! //! ## Variables //! For variables we can use strings that are not in the list of operators as shown in the following expression. //! Additionally, variables should consist only of letters, numbers, and underscores. More precisely, they need to fit the //! regular expression //! ```r"^[a-zA-Z_]+[a-zA-Z_0-9]...
Rust
0
Default, fmt::{self, Debug, Display}, str::FromStr, }; pub mod conduit; /// Sync mode #[derive(Debug, Copy, Clone, PartialEq)] pub enum SyncMode { /// Prefer the data from local storage KeepLocal, /// Prefer the data from the remote Palm OS device KeepDevice, /// Perform a merge of the local and remote datas...
Rust
0
'", memory_zone); return Err(Error::InvalidNumaConfig); } } } if let Some(cpus) = &config.cpus { node.cpus.extend(cpus); } if let Some(distances) = &config.distan...
Rust
0
nt_flurry_hashbrown", ); macro_rules! bench_iter { ($group:ident, $keydist:expr, $bench_id: expr) => { let map: HashMap<_, _> = HashMap::with_capacity(SIZE as usize); { // see bench_insert_erase for a comment on the local scope let guard = epoch::pin(); ($keydist...
Rust
0
_', '_', '_', '_', 'W'], // 1 ['W', '_', 'R', 'R', '_', '_', '_', '_', '_', '_', '_', '_', '_', 'R', 'R', '_', 'W'], // 2 ['W', '_', 'R', 'R', '_', 'R', '_', '_', '_', '_', '_', 'R', '_', 'R', 'R', '_', 'W'], // 3 ['W', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_...
Rust
0
iew(-1, 3).contiguous() rd = rd.view(-1, 3).contiguous() xyz, is_hit = utils_sdf_rt.sdf_grid_trace_surface( sdfgrid=pre_model.density.grid.data, rs=ro, rd=rd, stepsize=stepsize, xyz_min=pre_model.density.xyz_min, xyz_max=pre_model.density.xyz_max, world_si...
Python
1
from hotbit.parametrization import KSAllElectron from hotbit.parametrization.util import IP_EA from box.mix import Timer #import cgitb; cgitb.enable() import pylab as pl #IP=ionization_potential('C',remove='2p') IP, EA=IP_EA('O',remove_orb='2p',add_orb='2p',remove=1.0,add=0.5) print(IP,IP*27.2114,IP*27.2114/0.01036) p...
Python
1
) #overall distribution of verrückness # Count occurrences of each unique hallucinated label hallucinated_counts = {label: 0 for label in list_unique_hallucinations} for column in ['1st_Emotion_Pred']: for label in hallucinated_df[column]: if label in hallucinated_counts: hallucinated_counts[la...
Python
1
match_fasta(&e, &mut entries); }); assert_eq!(4, entries.len()); } #[test] fn match_fastq_test() { let input = vec!["test.fq", "test.fastq", "test.fq.gz", "test.fa.gz"]; let mut entries = Vec::new(); input.iter().for_each(|e| { match_fastq(...
Rust
0
stats_message += (f"Дата: {item['dimensions'][0]['name']}, " f"Посещения: {int(item['metrics'][0])}, " f"Просмотры страниц: {int(item['metrics'][1])}\n") visits += int(item['metrics'][0]) views += int(item['metrics']...
Python
1
embed_input, cat_embed_dropout=cat_embed_dropout, use_cat_bias=use_cat_bias, cat_embed_activation=cat_embed_activation, continuous_cols=continuous_cols, cont_norm_layer=cont_norm_layer, embed_continuous=embed_continuous, embed_continuou...
Python
1
import sys input = sys.stdin.read() input = [l.split(' ',1) for l in input.split('\n') if l] def set(xy,v,mem): x,y = xy.split(' ') if y.strip('-').isdigit(): mem[x] = int(y) elif mem.has_key(y): mem[x] = mem[y] return 1 def sub(xy,v,mem): global ys_last x,y = xy.split(' ') if not mem.has...
Python
1
"""`rag.config` configures the application from env variables. This module configures components based on the attributes of `Settings` and caches them for reuse. Environment variables are type-checked with pydantic settings to avoid misconfigurations at runtime. """ from functools import lru_cache from pydantic imp...
Python
1
2() { assert_with_config( include_str!("data/2/meson.build"), include_str!("data/2/config.toml"), ); } #![recursion_limit = "256"] mod api; mod app; mod components; mod external; // 为了使用`yew::start_app` use wasm_bindgen::prelude::*; // 通过`#[wasm_bindgen]`标注`WASM`的入口点 // *main.js* 文件将会指向这里 #[wa...
Rust
0
ation\"`*"] pub fn ugender_getListGender(genderinfo: *const UGenderInfo, genders: *const UGender, size: i32, status: *mut UErrorCode) -> UGender; #[doc = "*Required features: `\"Win32_Globalization\"`*"] pub fn uidna_close(idna: *mut UIDNA); #[doc = "*Required features: `\"Win32_Globalization\"`*"] ...
Rust
0
u16, u16, u16, u16), i: u16, (j, k, l, m, n, o, p, q): (u16, u16, u16, u16, u16, u16, u16, u16), r: u16, ) -> ProxyHeader { ProxyHeader::Version1 { addresses: ProxyAddresses::Ipv6 { source: SocketAddrV6::new(Ipv6Addr::new(a, b,...
Rust
0
# -*- coding: utf-8 -*- # pylint: disable=all # flake8: noqa # type: ignore # mypy: ignore-errors #!/usr/bin/env python3 """ Quick test script for Fresh Instagram DM Extractor """ import sys from pathlib import Path # Add src to path sys.path.append(str(Path(__file__).parent / 'src')) from utils import load_config, ...
Python
1
er_header = st.empty() # placeholder_tab2 = st.empty() # # create empty DataFrame in session state if not exists # if 'favorites_history' not in st.session_state: # st.session_state.favorites_history = pd.DataFrame(columns=['symbol', 'last', 'datetime']) # while True: # for m in ticke...
Python
1
")?; let optical_in: i32 = if mask_ideal_options.optical { 1 } else { 0 }; let optical_in_name = utils::new_c_string("optical")?; let vips_op_response = bindings::vips_mask_ideal( &mut out_out, width_in, height_in, frequency_cutoff_in, ...
Rust
0
mut self, event: u32) -> () { self.flag.store(true, Ordering::SeqCst); () } } #[test] fn test_marshall_from_pointer() { let flag = Arc::new(AtomicBool::new(false)); let v = Test{ flag: Arc::clone(&flag) }; let handler: Box<dyn E...
Rust
0
ssage { Get, Status(Status), } impl Message for GenericBatteryMessage { fn opcode(&self) -> Opcode { match self { Self::Get => GENERIC_BATTERY_GET, Self::Status(_) => GENERIC_BATTERY_STATUS, } } fn emit_parameters<const N: usize>( &self, xmit...
Rust
0
""" Search Module - performs text and image search using the Google Search API """ from lingu import log, Populatable from pydantic import Field from .logic import logic class SearchWorldWideWeb(Populatable): """ Retrieves real-time information about current events from the internet. Uses google search...
Python
1
from __future__ import annotations __all__ = [ "MSB_MODEL_IMPORTERS", ] from soulstruct.darksouls1ptde.maps.enums import MSBModelSubtype from soulstruct.darksouls1ptde.maps.models import * from soulstruct.darksouls1ptde.constants import CHARACTER_MODELS from soulstruct.blender.msb.types.base.models import * MS...
Python
1
from reportlab.pdfgen import canvas from reportlab.lib.styles import ParagraphStyle from reportlab.lib import colors from reportlab.lib.pagesizes import letter from reportlab.platypus import SimpleDocTemplate, Paragraph from conexion import * def Nuevos_exportar_a_pdf(): try: connec = Conexion.ConexionBase...
Python
1
9, e2: 6, e3: 6, e12: -3, e31: -21, e23: -15, e123: 15 }); let e3 = Se3(4); let re3 = e3 * &a; assert_eq!(re3, Multivector3 { e: -20, e1: 20, e2: -8, e3: 8, e12: -28, e31: 4, e23: -28, e123: -12 }); let e12 = Se12(1); let re12 = e12 * &a; a...
Rust
0
# _*_ coding: utf-8 _*_ """ python_oneline.py by xianhu """ # 首先来个python之禅 # python -c "import this" """ The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better t...
Python
1
)] pub struct __va_list_tag { pub gp_offset: std::os::raw::c_uint, pub fp_offset: std::os::raw::c_uint, pub overflow_arg_area: *mut std::os::raw::c_void, pub reg_save_area: *mut std::os::raw::c_void, } pub mod rcl; pub use rcl::*; pub mod rcl_yaml_param_parser; pub use rcl_yaml_param_parser::*; pub m...
Rust
0
e.declare_builtin_function( type_name.clone().concat(Identifier::from("println")), ItemType::Function { args: vec![ FuncArgType::Arg(stdout_type), FuncArgType::Variadic(None), ], return_type: unit_type, }, move |scope, a...
Rust
0
@@ -71,11 +71,8 @@ impl<'a> Alignment<'a> {  for (i, x_i) in self.x.iter().enumerate() { for (j, y_j) in self.y.iter().enumerate() { - let (left, diag, up) = ( - self.index(i, j + 1), - self.index(i,...
Rust
0
ocal_idx, text in enumerate(decoded): prediction = decoded[local_idx] prediction = self.tokenizer.decode(prediction, skip_special_tokens=True) suffixprediction = prediction[prompt_lens[local_idx]:] suffixprediction = cleanup_code(suffixprediction, self.lan...
Python
1
from . import schemas, models from sqlalchemy.orm import Session from fastapi import Depends, HTTPException, status, APIRouter, Response from sqlalchemy.exc import IntegrityError from .database import get_db router = APIRouter() @router.get('/') def get_notes(db: Session = Depends(get_db), limit: int = 10, page: int...
Python
1
""" Nova Act MCP Server Package This package provides a FastMCP server exposing tools for controlling web browsers using the Amazon Nova Act SDK. It allows AI assistants to perform browser automation tasks through JSON-RPC calls. """ from fastmcp import FastMCP # Initialize FastMCP server instance # This 'mcp' insta...
Python
1
ssec-openssl")] fn test_rsa_sha512() { generic_test( confg_toml(), "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA512, ); } #[test] #[cfg(feature = "dnssec-openssl")] fn test_ecdsa_p256() { generic_test( confg_toml(), ...
Rust
0
debug_fmt_opt(self.number_opt.as_ref(), "number", f)?; debug_fmt_opt(self.equal_opt.as_ref(), "=", f)?; Debug::fmt(&self.init, f)?; debug_fmt_opt(self.comma_opt.as_ref(), ",", f) } } #[derive(Debug)] #[must_use] pub(crate) struct PDefineStmt { pub(crate) hash: PToken, pub(c...
Rust
0
ef BETS_AFTER40:HashSet<Bets> = hashset!{ Banker,Player,Tie, BankerBlack, BankerRed, BankerLuckyPair, PlayerBlack, PlayerRed, PlayerLuckyPair, }; static ref BETS_AFTER60:HashSet<Bets> =hashset!{ Banker,Player,Tie }; } pub struct LuckyBaccaratGame; pub fn valid_bets(hands: usize) -> &'s...
Rust
0
Message(error.to_string()) } } macro_rules! _err { ($e:expr) => {$crate::Error::from($e)}; ($fmt:expr, $($arg:tt)+) => {$crate::errors::Error::from(format!($fmt, $($arg)+))} } pub(crate) use _err as err; macro_rules! _bail { ($($arg:tt)+) => {return Err($crate::errors::err!($($arg)+))} } pub(crate) us...
Rust
0
""" Utility functions for GoEmotions multi-label emotion classification. """ import matplotlib.pyplot as plt import pandas as pd import numpy as np from typing import List, Dict, Any import os def plot_emotion_distribution(emotion_counts: pd.Series, title: str = "Emotion Distribution", f...
Python
1
"); c.args(&["experimental-image-proxy"]); c.stdout(Stdio::null()).stderr(Stdio::piped()); c.stdin(Stdio::from(theirsock)); let mut c = tokio::process::Command::from(c); c.kill_on_drop(true); let mut proc = c.spawn().context("Failed to spawn skopeo")?; // Safety:...
Rust
0
atexit, printf}; type Exitfunc = extern "C" fn(); fn my_atexit(f: Exitfunc) -> std::io::Result<i32> { unsafe { atexit(f).check_not_negative() } } extern "C" fn my_exit1() { unsafe { printf(cstr!("first exit handler\n")) }; } extern "C" fn my_exit2() { unsafe { printf(cstr!("second exit handler\n")) }; }...
Rust
0
Module): """ input: query --- [N, T_q, query_dim] key --- [N, T_k, key_dim] output: out --- [N, T_q, num_units] """ def __init__(self, query_dim, key_dim, num_units, num_heads): super().__init__() self.num_units = num_units self.num_heads = num_heads...
Python
1
A_7C60, 0xD9FA_0E18), (r"textures\tx_book_pages_english_01.dds", 0x330A_7C60, 0xF8F9_1964), (r"textures\tx_c_skirt_common_3.dds", 0x3316_3C3E, 0xCB43_A065), (r"textures\tx_c_skirt_common_2.dds", 0x3316_3C3E, 0xCB43_A465), (r"textures\tx_c_skirt_common_5.dds", 0x3316_3C3E, 0xCB43_B865), (r"textu...
Rust
0
((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 12 - SPI Bridge Fast Mode Request"] #[inline] pub fn fast_mode(&self) -> FAST_MODER { FAST_MODER::_from({ const MASK: bool = true; const OFFSET: u8 = 12; ((self.bits >> OFFSET) & ...
Rust
0
Register<u8>, character_register1: Register<u8>, character_register2: Register<u8>, character_register3: Register<u8>, character_register4: Register<u8>, character_register5: Register<u8>, irq_counter: u8, irq_counter_reload: bool, irq_enabled: bool } impl MMC3Mapper { fn new(header: &RomHeader) ...
Rust
0
import webview import sys import threading class SettingsWindowApi(): def __init__(self): self._window = None def log(self, value): print(value) def killSettingsWindow(self): self._window.destroy() def setWindow(self,window): self._window = window def cre...
Python
1
address: &mut Address) -> Result<Pointer> { match address.pop_front() { Some(Slot::Name(name)) => match name.as_str() { $( stringify!($field) => self.$field.resolve(address), )* _ => ...
Rust
0
`FN_PREFIX` is a unique prefix for the generated function in case the macro is used more than once /// in a single file for generating more than one test file with a potentially different internal test /// logic. The prefix must be a specified string literal, leaving it empty will generate the normal /// test name. //...
Rust
0
* 16 + i] ^ enc[i]; out.push(b); } out } fn cfb_decrypt(&self, data: &[u8], iv: &[u8]) -> Vec<u8> { let block_num = data.len() / 16; let tail_len = data.len() - block_num * 16; let mut out: Vec<u8> = Vec::new(); let mut vec_buf: Vec<u8> = vec![0; 16...
Rust
0
rHint(QPainter.RenderHint.SmoothPixmapTransform) rect = self.rect().adjusted(1, 1, 0, 0) radius = rect.height() // 2 # 生成圆角矩形路径上的点 points = self.rounded_rect_points(rect, radius, num_points=240) total = len(points) # 左上高光 self.draw_highlight_with_fade(painter, po...
Python
1
from typing import Dict, List from django.db.models import QuerySet class RecommendationCalculator: """Serviço responsável por calcular scores das recomendações""" # Pesos para cada tipo de recomendação WEIGHTS = { 'history': 0.5, 'category': 0.3, 'similarity': 0.2 } def ...
Python
1
# Card Divisibility # https://open.kattis.com/problems/carddivisibility # TAGS: mathematics # CP4: 0, Not In List Yet # NOTES: """ Given L and R you have something like: L=3, R=10: 345678910 This is just in general a sum of the form: sigma_i { d_i * 10**i = sigma_i { d_i * (10**i - 1 + 1) = sigma_i { d_i * (10**i...
Python
1
ted {output.batch['responses'].shape=}") # log_gpu_memory_usage("After generating sequences", logger=None) output = rollout_sharding_manager.postprocess_data(output) print(f"postprocessed {output.batch['responses'].shape=}") sglang_output = output.to("cpu") sglang_response_tokens = ...
Python
1
row()] except: return None col = index.column() if role in (Qt.DisplayRole, Qt.EditRole): return plugin[0] elif role == Qt.CheckStateRole and col == 0: orig = Qt.Checked if plugin[1] else Qt.Unchecked return orig elif role == Qt.Us...
Python
1
/ out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] #[inline] pub fn fiat_secp256k1_scalar_subborrowx_u64( out1: &mut u64, out2: &mut fiat_secp256k1_scalar_u1, arg1: fiat_secp256k1_scalar_u1, arg2: u64, arg3: u64, ) -> () { let x1: i128 = (((arg2 as i128) - (arg1 as i128)) - (arg3 as ...
Rust
0
they can change what their content is based on their size. #[derive(Debug, Copy, Clone)] pub struct HidpiAdjustedBounds { logical_size: LogicalSize, hidpi_factor: f64, winit_hidpi_factor: f64, // TODO: Scroll state / focus state of this div! } impl HidpiAdjustedBounds { pub(crate) fn from_bounds(b...
Rust
0
#!/usr/bin/env python3 import muon import math from array import array f = open("sample.mu", "wb") muon = muon.Writer(f) muon.tag_muon() muon.add_lru_list(["string value 1", "string value 2"]) muon.add_lru_dynamic([ "string value 3", "string value 4" ]) muon.start_dict() if True: muon.add("strings").start...
Python
1
bindgen_union_field: u32, } #[repr(C)] #[derive(Debug, Copy)] pub struct _VADecPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1 { pub _bitfield_1: u32, } #[test] fn bindgen_test_layout__VADecPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1() { assert_eq!(::std::mem::size_of::<_VADecPictureParameterBu...
Rust
0
return if not message.content: return if not await self.bot.guild_has_feature(message.guild, Feature.PYTHON_DISCOURSE_AUTOLINK): return posts = self.extract_topic_urls(message.content) if not posts: return posts = list(dict.fro...
Python
1
Mode::None => { // fill? print!("None "); reader.get_bits(1)?; // error }, Mode::EOL => { if cfg!(debug_assertions) { print!("EOL "); } eol...
Rust
0
into(), None, )); } Ok(tmp_vec) } fn generate_url_string(&self) -> StackString { format!("{},file,{}", self.sport, self.date).into() } } async fn day_summary_report(pool: &PgPool, constr: &str) -> Result<Vec<DaySummaryReport>, Error> { let query = for...
Rust
0
te = context['logical_date'] week_number = int(logical_date.strftime('%U')) print(f"=== Weekly Processing - Week {week_number} ===") print(f"Date: {logical_date.strftime('%Y-%m-%d')}") if week_number % 2 == 0: print("Even week: Running full data refresh") else: print("Odd w...
Python
1
from fastapi import APIRouter, Query, HTTPException router = APIRouter() @router.get("") def convert_pressure( inhg: float = Query(None, description="Pressure in inches of mercury (inhg)"), hpa: float = Query(None, description="Pressure in hectopascals (hpa)"), pa: float = Query(None, description="Pressur...
Python
1
ion and at https://raw.githubusercontent.com/lemonrock/rust-extra/master/COPYRIGHT. #[macro_export] macro_rules! offsetOf { ($structType:ty, $field:ident) => { #[allow(trivial_casts)] unsafe { &(*(0 as *const $structType)).$field as *const _ as isize } } } <filename>src/kraken/payload/ticker/util/mod.rs...
Rust
0
from collections import defaultdict import numpy as np from parselmouth import Sound from parselmouth.praat import call from lingualabpy.tools.data import UnchangeableDict def measure_pitch(sound: Sound, f0min: str, f0max: str, unit: str) -> UnchangeableDict: """ This function measures duration, pitch, HNR, ...
Python
1
import asyncio import random import string from typing import Any, Awaitable, Protocol from iot.message import Message, MessageType def generate_id(length: int = 8): return "".join(random.choices(string.ascii_uppercase, k=length)) class Device(Protocol): async def connect(self) -> None: ... async def ...
Python
1
== "fid": fid_score(args) elif method.lower() == "clip-score": clip_score(args) else: detection_rate(args) if __name__ == "__main__": parser = argparse.ArgumentParser() # common settings parser.add_argument("method", type=str, choices=["fid", "clip-score", "det...
Python
1
name_in_debuginfo.push(codegen_unit_name); } debug!("compile_unit_metadata: {:?}", name_in_debuginfo); let rustc_producer = format!("rustc version {}", option_env!("CFG_VERSION").expect("CFG_VERSION"),); // FIXME(#41252) Remove "clang LLVM" if we can get GDB and LLVM to play nice. let produ...
Rust
0
from dissononce.extras.meta.modifier.factory import ModifierFactory from dissononce.extras.meta.hash.factory import HashFactory from dissononce.extras.meta.cipher.factory import CipherFactory from dissononce.extras.meta.dh.factory import DHFactory from dissononce.extras.meta.pattern.factory import PatternFactory from d...
Python
1
let m34 = m21 & m22; let m35 = m24 & m34; let m40 = m35 ^ m36; let m41 = m38 ^ m40; let m45 = m42 ^ m41; let m53 = m45 & t27; let p8 = m50 ^ m53; let p23 = p7 ^ p8; let m62 = m45 & t4; let p14 = m49 ^ m62; let s6 = p14 ^ p23; let m54 = m41 & t10; let p2 = m54 ^ m62; ...
Rust
0
class Person: def __init__(self,id, name, age, grade): self.id = id self.name = name self.age = age self.grade = grade def display(self): print(f"ID : {self.id}\nName: {self.name}\nAge: {self.age}\nGrade: {self.grade}") class Sports(Person): def __init__(self,id, na...
Python
1
''' @Project :pytest-solidity-api @File :transfer_test @Author :le @Date :2025/8/19 17:41 ''' from datetime import datetime, timedelta import os import random import time from concurrent.futures import ThreadPoolExecutor, as_completed from time import sleep import requests import schedule from dotenv impo...
Python
1
# Copyright 2018 The dm_control Authors. # # 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 i...
Python
1
deo {self.video_path}.") frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) else: raise Exception("Video is not opened yet.") return frame def get_all_frames(self): if self.all_frames is not None: return self.all_frames elif self.cap is not None: ...
Python
1
0000; let total_secs = (app.stats.total_time - (3_600_000 * total_hours) - (total_mins * 60000)) / 1000; let queue_info = [ Text::raw(format!("remaining: {} tracks", app.queue.tracks.len())), Text::raw(" | "), Text::raw(format!( "{} hour(s), {} min(s), {} sec(s)", ...
Rust
0
d_control=False) # noisy:[10,:,128,128] timestep:[10(batch_size)] x_noisy = x_noisy - noise_true noise_y = generated_noise() x_noisy = q_sample(x_start=x_noisy, t=t, noise=noise_y) model_output = self.diffusion_image_model(x=x_noisy, timesteps=t, control=control, ...
Python
1
Return, ), 'loc_1E73', ) Return() def _loc_1E73(): pass label('loc_1E73') If( ( (Expr.TestScenaFlags, ScenaFlag(0x0384, 4, 0x1C24)), Expr.Ez, (Expr.TestScenaFlags, ScenaFlag(0x0384, 7, 0x1C27)), Expr.Nez64, Expr....
Python
1
circles.add(Circle(radius=2).shift(UP * 1.8 + RIGHT * 0.5)) circles.add(Circle(radius=3).shift(RIGHT * 2 + DOWN * 0.5)) circles.add(Circle(radius=2).shift(DOWN * 1)) circles.add(Circle(radius=2.4).shift(LEFT * 1.2 + UP * 2.4)) for i in range(len(circles)): self.play(ShowC...
Python
1
# Import the library file we just created from gpiozero_tm1637 import TM1637 import time import datetime # Define the GPIO pins you are using (BCM numbering) CLK_PIN = 23 DIO_PIN = 24 # Initialize the display display = TM1637(clk=CLK_PIN, dio=DIO_PIN) print("Starting display test...") display.set_brightness(7) try...
Python
1
re you wrestling with to find clarity today?" } return philosopher_icebreakers[philosopher] def get_top_tools(nickname): mongo = mongo_client() users = mongo["credentials"]["users"] user = users.find_one({ "nickname":nickname }) tool_hits = { "dynamo": user["dynamo"], ...
Python
1
while True: try: str1 = input("Enter a number: ") num = int(str1) if (num < 0) raise ValueError() count = len(str1) break except ValueError: print("Error") new_num = 0 for c in str1: new_num += int(c) ** count if (num == new_num): print("Armst...
Python
1
from video_model_research.ai_models import VideoModel from transformers import AutoModelForCausalLM import torch from video_model_research.ovis.utils import load_video import inspect import os import logging logger = logging.getLogger(__name__) class Ovis(VideoModel): """An optimized video model implementation fo...
Python
1
AccountId, data_source: urls::DataSource, } pub mod crypto { use super::KEY_TYPE; use sp_runtime::{ app_crypto::{app_crypto, sr25519}, traits::Verify, MultiSignature, MultiSigner, }; use sp_core::sr25519::Signature as Sr25519Signature; app_crypto!(sr25519, KEY_TYPE); pub struct TestAuthId; ...
Rust
0
Reporter; use crate::util::slice::Slice; use crate::util::status::{Result, Status, WickErr}; use crate::version::version_edit::{FileMetaData, VersionEdit}; use crate::version::{LevelFileNumIterator, Version, FILE_META_LENGTH}; use crate::ReadOptions; use std::cmp::Ordering as CmpOrdering; use std::collections::vec_dequ...
Rust
0
graph_embeds1 = graph_embeds1.detach() graph_embeds1 = self.ln_graph(graph_embeds1, graph_masks1) #print(graph_embeds)应该是读出完之后的向量了 device = graph_embeds1.device graph_embeds2, graph_masks2 = self.graph_encoder(graphs2) if not self.tune_gnn: ...
Python
1
''' blackjack: regole: giocatre vs computer, vengono distribuite le carte (coperte) il giocatore continua a chiedere carte fino a quando o supera 21 (sballa) o si ferma il banco continua a chidere carte fino a quando non arriva a un punteggio >= 17 il punteggio maggiore vince ( ameno che uno dei due giocatori non abbia...
Python
1
ed', sa.Enum('Facebook', 'Instagram', 'Twitter', 'Youtube', 'Tiktok', name='sosial_media'), nullable=False), sa.Column('link', sa.String(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['id_tempat_wi...
Python
1
t!(wallet2_refreshed); assert_eq!(wallet2_info.last_confirmed_height, bh); assert_eq!(wallet2_info.total, 2 * reward); Ok(()) })?; // Now other types of exchange, for reference // Invoice transaction let (send_file, receive_file, final_file) = match use_bin { false => ( format!("{}/invoice_I1.slatepack"...
Rust
0
plicitFn': targetGenClassName = 'ExplicitFnGen' else: targetGenClassName = targetGen gen_dict = {'modelspec': reg_spec, 'target': targetGenClassName, 'algparams': alg_args} modelC = ModelConstructor(r.name, ...
Python
1
ph.progtype == elf::types::PT_LOAD && (ph.flags.0 & elf::types::PF_X.0) != 0 }) .expect("No executable LOAD header found in ELF file. Please report this!") .clone() } // struct to hold everything we know about the program pub struct ProgramInfo { pub...
Rust
0
from src.lm_ai import client def send_to_ai(content , max_token = 2000 , model="Lewdiculous/Eris_PrimeV4-Vision-32k-7B-GGUF-IQ-Imatrix"): try: response = client.chat.completions.create( model=model, messages = content , temperature=0.7, max_tokens=max_token...
Python
1
sh = *data_hash; StakedDataByAccountId::<T>::insert(data_staker, data_hash); StakedDataByOrderId::<T>::insert(order_id, data_hash); Ok(data_hash) } fn dna_sample_by_tracking_id(tracking_id: &DnaSampleTrackingId) -> Option<Self::DnaSample> { Self::dna_sample_by_tracking_id(tracking_id) } fn dna_test_resu...
Rust
0
array.fill", "es.typed-array.filter", "es.typed-array.find", "es.typed-array.find-index", "es.typed-array.for-each", "es.typed-array.includes", "es.typed-array.index-of", "es.typed-array.iterator", "es.typed-array.join", "es.typed-array.last-index-...
Rust
0