text
string
label_name
string
labels
int64
'ˇ', '𓂭', '⁄', '┌', 'Ǚ', '\u{11cb5}', 'ꦱ', 'Ṳ', '𐬭', '𘥑', '🍕', 'ה', '𛱲', 'ꮤ', 'ꮦ', 'ᄀ', '𝙎', '𔕂', 'ᦉ', '𘡌', '𝅐', 'Գ', '𑗗', '𛄓', '𐩤', '𐡁', '𐆋', '𐿨', '𖥫', 'ṑ', '⋂', '⦨', '虜', '\u{8fd}', '𞸕', '𒔄', '💐', 'ᵬ', '👡', '𐩨', '𔐸', '𐲕', '𔑀', 'ᙼ', '✎', '𞸘', '🂶', 'ᓱ', '\u{a8e4}', '易', '꒼', 'ꘆ...
Rust
0
window = WindowDesc::new(build_widget).title( LocalizedString::new("invalidate-demo-window-title").with_placeholder("Invalidate demo"), ); let state = AppState { label: "My label".into(), circles: Vector::new(), }; AppLauncher::with_window(window) .use_simple_logger() ...
Rust
0
ze) -> Self { self.blockchain .set_block_content_max_size(block_content_max_size); self } pub fn committee<S: Into<NodeAlias>>(mut self, alias: S) -> Self { self.blockchain.add_committee(alias); self } pub fn consensus(mut self, consensus: ConsensusVersion) ...
Rust
0
use crate::geom::Cell; use crate::geom::Point; use crate::geom::PointCloud; pub fn cast_rays<NaD>( origin: &Point<NaD>, point_cloud: &PointCloud<NaD>, bounds: &Bounds<NaD>, resolution: f32, max_len: f32, ) -> ( std::collections::HashSet<Cell<NaD>>, std::collections::HashSet<Cell<NaD>>, ) wh...
Rust
0
from io import StringIO from textwrap import dedent from django.test import SimpleTestCase from corehq.apps.es.tests.utils import es_test from corehq.apps.es.utils import mapping_sort_key from ..utils import print_formatted @es_test class TestMappingUtils(SimpleTestCase): maxDiff = 1024 NULL = "__null__"...
Python
1
::new_ethernet(0); let frame_dst = FrameDestination::Unicast; // Update PMTU from None but with an MTU too low. let new_mtu1 = u32::from(I::MINIMUM_LINK_MTU) - 1; // Create ICMP IP buf let packet_buf = create_packet_too_big_buf( dummy_config.remote_ip.get(), ...
Rust
0
unwrap().starts_with(".") { continue; } if file.metadata().unwrap().is_file() { files.push(file.path()); } } files } } use bitflags::bitflags; use core::fmt; bitflags! { /// Display RAM data address. pub struct DisplayDataA...
Rust
0
re.IGNORECASE ): workspace_id = uri_segments[0] elif "admin/" in uri.lower(): return url else: # For Fabric APIs, extract from workspaces/{workspace-id}/... pattern match = re.search(FABRIC_WORKSPACE_URI_PATTERN, uri, re.IGNORECASE) if match: works...
Python
1
} } } impl<E> FromIterator<E> for Builder where E: Into<Error>, { fn from_iter<I>(iter: I) -> Self where I: IntoIterator<Item = E>, { let mut builder = Self::new(); builder.extend(iter); builder } } /// An extension trait for types implementing [`Iterat...
Rust
0
256i::from([3_i8, 11, 2, 13, 4, 15, 6, 17, 8, 19, 20, 21, 22, 23, 24, 127, 7, 11, 2, 13, 4, 15, 6, 17, 8, 19, 20, 21, 22, 23, 24, 127]); /// let b = m256i::from([-1_i8, -1, 0, 2, 2, 3, 0, 5, 6, 6, -7, 8, 8, 0, 0, 10, 10, -11, 11, 12, 12, 13, 13, 12, 11, -10, 9, 8, 7, 6, 5, -4]); /// let c: [i8; 32] = unpack_high_i8_m25...
Rust
0
rocessed, y_preprocessed) # Apply preprocessing gradients gradients = self._apply_preprocessing_gradient(x, gradients) return gradients def _loss_gradient_per_batch(self, x: np.ndarray, y: np.ndarray) -> np.ndarray: """ Compute the gradient of the loss function w.r.t. `x` p...
Python
1
from funcs import table, type_col, str_col table( "marker", {"pipeline": ["marker"], "power": ["marker"], "marker": ["__any__"]}, "point", columns=[type_col], ) table( "pipeline", {"man_made": ["pipeline"], "construction:man_made": ["pipeline"]}, "linestring", columns=[ str_col...
Python
1
class Solution: def removeStars(self, s: str) -> str: stk = [] for c in s: if c == "*" and stk: stk.pop() else: stk.append(c) return "".join(map(str, stk))
Python
1
+ &i1, 8); //! ``` mod assignment; mod binary; mod unary; <filename>piet/src/samples/picture_6.rs //! Gradients. use crate::kurbo::{Circle, Point, Rect, RoundedRect, Size, Vec2}; use crate::{ Color, Error, FixedGradient, FixedLinearGradient, FixedRadialGradient, GradientStop, LineCap, LineJoin, RenderContext,...
Rust
0
fset_of!(Cx, cr3)), off_rflags = const(offset_of!(Cx, rflags)), off_loadable = const(offset_of!(Cx, loadable)), off_rbx = const(offset_of!(Cx, rbx)), off_r12 = const(offset_of!(Cx, r12)), off_r13 = const(offset_of!(Cx, r13)), off_r14 = const(offset_of!(Cx, r14)), ...
Rust
0
_str.as_str()) { Ok(x) => x, Err(r) => { return r; } }; /* parse search ticket */ let (s_kwd_list, s_tag_list, s_year_list, s_user, s_r18, s_fav) = match serde_json::from_str::<(Vec<(u8, String)>, Vec<(u8, String)>, Vec<(Option<u16>, Option<u16>)>, Option<String>, u8, u8)>(query_str.as_str()) { Ok(x) => x, ...
Rust
0
) @pytest.mark.asyncio async def test_metadata_inclusion(self, temp_storage): """Test that metadata is properly included in stored files.""" roaster_id = "metadata_test" platform = "shopify" response_data = {"products": [{"id": 1, "title": "Test"}]} m...
Python
1
or x in entities], threshold, ) for entities in output ] return pd.Series(converted_output, index=data.index) def _model_type(model: str) -> ColumnType: return _models.get(model, (ColumnType.Unknown, None, None))[0] _models: Dict[str, Tuple[ColumnType, List[str], Callable[......
Python
1
mbers()); assert_eq!(&btreeset! {2}, m1_2.all_learners()); assert!(m1_2.is_learner(&2)); assert_eq!(btreeset! {1}, m1_23.all_members()); assert_eq!(&btreeset! {2,3}, m1_23.all_learners()); assert!(m1_23.is_learner(&2)); assert!(m1_23.is_learner(&3)); // Adding a...
Rust
0
import streamlit as st import os from dotenv import load_dotenv from supabase import create_client from assets import MODELS_USED load_dotenv() def get_api_key(model): """ Returns an API key for a given model by: 1) Looking up the environment var name in MODELS_USED[model]. (We assume there's ex...
Python
1
server = self.watchers[index]['observer'] observer.stop() observer.join() except KeyError: print("Observer is niet beschikbaar of al inactief") def show_notification(self, message): # Gebruik plyer om een notificatie naar het Mac-systeem te sturen notific...
Python
1
hosts = [] hosts = target.read().splitlines() for host in hosts: if poc(host) != 0: with open("success.txt", "a+") as f: f.write(host + "\n") elif len(sys.argv) == 5: if se...
Python
1
from enum import Enum from typing import Iterable from chatpdb.chat.prompts import get_system_prompt class LLMBackend(Enum): OPENAI = "openai" def prompt(prompt_input: str, backend: LLMBackend = LLMBackend.OPENAI) -> str: if backend == LLMBackend.OPENAI: from chatpdb.chat.llm.openai import prompt a...
Python
1
able ' '`sentences` does not have type ' '`list[str]`.') sent_list: list[str] = [str(s) for s in sentences] sentences = [' '.join(sentence.split()) for sentence in sent_list] empty_indices = [] for i, sentence in e...
Python
1
from netCDF4 import Dataset import fluidfoam import numpy as np case = "3DChannel560" basepath = "../LES/" sol = basepath + case + "/" # # Reading SedFoam results # tread = "8" print("########## Writing averaged data file ##########") # Read vertical coordinates x, y, z = fluidfoam.readmesh(sol, structured=True, pr...
Python
1
import numpy as np import pandas as pd import pytest import pastas as ps def test_frequency_is_supported() -> None: ps.ts._frequency_is_supported("D") ps.ts._frequency_is_supported("7D") with pytest.raises(Exception): ps.ts._frequency_is_supported("SMS") def test_get_stress_dt() -> None: as...
Python
1
pub type VarArgsKind = i32; #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] pub const VarArgsNone: VarArgsKind = 0i32; #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] pub const VarArgsCStyle: VarArgsKind = 1i32; #[repr(C)] #[doc = "*Required features: `\"Win32_System_Diagnostic...
Rust
0
self.capacity as Index); while last_read.load_count(Relaxed) != self.head.load_count(Relaxed) { unsafe { let cur_pos = last_read.load_transaction(Relaxed); let (cur_ind, _) = cur_pos.get(); ptr::drop_in_place(&mut (*self.data.offse...
Rust
0
import bisect import copy import heapq import math import random from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right from collections import Counter, defaultdict, deque from dataclasses import dataclass from functools import cmp_to_key, reduce from itertools import zip_longest from m...
Python
1
import streamlit as st import pandas as pd import plotly.express as px import numpy as np # --------------------- CONFIGURAÇÃO DA PÁGINA --------------------- st.set_page_config( page_title="Rapidinho - Amanda Veloso", page_icon="🏃🏻‍♂️", layout="wide", initial_sidebar_state="auto" ) # --------------...
Python
1
number fmask.lightgbm_cloud.ntrees = ntrees fmask.lightgbm_cloud.max_depth = max_depth fmask.lightgbm_cloud.num_leaves = num_leaves fmask.lightgbm_cloud.min_data_in_leaf = min_data_in_leaf fmask.lightgbm_cloud.sample.select() # select the training samples based on the test setup...
Python
1
dev=simB3['ifname'], maps=["idx 0 id %d" % (mapB)], fail=False) fail(ret != 0, "couldn't reuse a map on the same ASIC") rm("/sys/fs/bpf/nsimB_") ret, _, err = bpftool_prog_load("sample_map_ret0.bpf.o", "/sys/fs/bpf/nsimA_", ...
Python
1
from flask import Flask, request, make_response from datetime import datetime, timedelta app = Flask(__name__) # Route to set a cookie @app.route('/set_cookie') def set_cookie(): resp = make_response("Cookie is being set") # Set a simple cookie (name: username, value: JohnDoe) resp.set_cookie('username', ...
Python
1
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from tensorflow.python.keras.utils.np_utils import to_categorical from keras.optimizers import RMSprop from keras import models, layers import matplotlib.pyplot as plt import tensorflow as tf f...
Python
1
import os import numpy as np # import pcl import open3d as o3d def bin2txt(bin_file, target): # points = np.fromfile(bin_file + ".bin", dtype=np.int32).reshape(-1, 4) points = np.fromfile(bin_file, dtype=np.float32).reshape(-1, 4) np.savetxt(target + ".txt", points, fmt='%s', delimiter=' ') """ Python-p...
Python
1
atic, { let drainer = LogDispatcher::new(normal, slow); init_log( drainer, config.log_level, true, true, vec![], duration_to_ms(config.slow_log_threshold), ) .unwrap_or_else(|e| { fatal!("failed to initialize log: {}", e); }); } /// a lot of ...
Rust
0
um_crashes], hole=.5, textinfo='label+percent')]) percentage_fig.update_traces(textposition='inside', textinfo='percent') percentage_fig.update_layout(title='Percentage of Overall Crashes🥧', title_x=0.2, annotations=[ dict(text=f'{num_crashes / len(df) * 100:...
Python
1
> = vec![warning]; let skip_checks: Vec<&str> = Vec::new(); assert_eq!(expected, run(&lines, &skip_checks)); } #[test] fn only_simple_comment() { let line = line_entry(1, 1, "# Simple comment"); let warning = Warning::new( line.clone(), "EndingBlankL...
Rust
0
{"7p", Box{-5.625, 0.0, -45.0, -33.75}}, {"mgsvj", Box{-24.43359375, -24.3896484375, 85.6494140625, 85.693359375}}, {"k70", Box{-28.125, -26.71875, 11.25, 12.65625}}, {"pxjr5g", Box{-49.3780517578, -49.3725585938, 165.047607422, 165.05859375}}, {"3", Box{-45.0, 0.0, -135.0, -90.0}}, {"81pv", Box{6.50390625, 6.67...
Rust
0
(&sorted_numbers[mid]).unwrap_or(&0) } } } #[cfg(test)] mod tests { use super::*; #[test] fn test_stat_builder_1() { let mut builder = SampleStatBuilder::new(); builder.add(1); assert_eq!(builder.build(), SampleStat { count: 1, mean: 1.0, ...
Rust
0
} } //--- Blanket impls impl<'a, T: PrimitiveContent> PrimitiveContent for &'a T { const TAG: Tag = T::TAG; fn encoded_len(&self, mode: Mode) -> usize { (*self).encoded_len(mode) } fn write_encoded<W: io::Write>( &self, mode: Mode, target: &mut W ) -> Result<(), i...
Rust
0
During testing, this should never be exceeded. #[allow(unused)] pub const MAX_SPACE_AMPLIFICATION: f64 = 30.; pub(crate) const META_PID: PageId = 0; pub(crate) const COUNTER_PID: PageId = 1; pub(crate) const BATCH_MANIFEST_PID: PageId = PageId::max_value() - 666; pub(crate) const PAGE_CONSOLIDATION_THRESHOLD: usize =...
Rust
0
ructopt(short, long)] input: Option<String>, // Print runtime #[structopt(short, long)] timing: bool, } fn main() { let start = Instant::now(); let opt = Opt::from_args(); let day = opt.day.clone(); if day == "all" { if let Some(days) = aoc::days(&opt.year) { for d...
Rust
0
fields=["sbom", "created_at"], name="vulnerabili_sbom_id_c02ac9_idx" ), ), migrations.AddIndex( model_name="vulnerabilityscanresult", index=models.Index( fields=["provider", "created_at"], name="vulnerabili_provide_585a54_idx" ), ...
Python
1
) # Reshape (P,F*SH_coeffs) to (P, F, SH_coeffs except DC) features_extra = features_extra.reshape((features_extra.shape[0], 3, (3 + 1) ** 2 - 1)) scale_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("scale_")] scale_names = sorted(scale_names, key = lambda...
Python
1
_model(); let parent = Arc::clone(&rf); Some(ReadQueryBuilder::ReadRelatedRecordsBuilder( ReadRelatedRecordsBuilder::new(model, parent, selected_field), )) } } }) .collect::<Vec<ReadQueryBuil...
Rust
0
import ctypes import ctypes.wintypes import struct import process_utils from memory_utils import read_memory_until_null, read_memory from process_utils import get_base_address # 加载必要的Windows API kernel32 = ctypes.windll.kernel32 ReadProcessMemory = kernel32.ReadProcessMemory CloseHandle = kernel32.CloseHandle # 定义常量...
Python
1
userInput = None srchBy = None
Python
1
lize, Deserialize)] struct AddParams { x: i32, y: i32, } impl add { fn new(x: i32, y: i32) -> Signature<Self> { Signature::<Self>::new(AddParams { x, y }) } } #[async_trait] impl Task for add { const NAME: &'static str = "add"; const ARGS: &'static [&'static str] = &["x", "y"]; ty...
Rust
0
<_, ::protobuf::types::ProtobufTypeString>( "kind", Key_PathElement::get_kind_for_reflect, Key_PathElement::mut_kind_for_reflect, )); fields.push(::protobuf::reflect::accessor::make_singular_i64_accessor::<_>( ...
Rust
0
of {int(bytes_per_row)} byte(s) exceeds max chunk size of {max_chunk_size_bytes} byte(s)" ) max_num_rows = int( max_chunk_size_bytes / bytes_per_row ) # how many rows fit into the chunk start = 0 while start < batch.num_rows: i = max_num_rows # in case chunk size is exc...
Python
1
8; 3usize] = b"RO\0"; pub const SIO_INTERP1_PEEK_FULL_OFFSET: u32 = 232; pub const SIO_INTERP1_PEEK_FULL_BITS: u32 = 4294967295; pub const SIO_INTERP1_PEEK_FULL_RESET: u32 = 0; pub const SIO_INTERP1_PEEK_FULL_MSB: u32 = 31; pub const SIO_INTERP1_PEEK_FULL_LSB: u32 = 0; pub const SIO_INTERP1_PEEK_FULL_ACCESS: &'static [...
Rust
0
project(&mut account_1, ctx.chain_info().rest_api()))?; helper.codegen_project(&account_1)?; Ok(helper) } /* * Asana * * This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asa...
Rust
0
802.11-2016, 172.16.17.32 // IEEE Std 802.11-2016, 172.16.58.3 & 172.16.58.3 // Authenticator requires acknowledgement of all its sent frames. if rx_frame.key_info.key_ack() { // Authenticator only sends 1st and 3rd message of the handshake. // IEEE Std 802.11-2016, 12.7.2 b.4) // T...
Rust
0
, pub dwMaximum: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for MIXERCONTROLA_0_1 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for MIXERCONTROLA_0_1 { fn clone(&self) -> Self { *self } } #[repr(C, packed(1))] #[doc = "*Required features: 'Win32_Media_A...
Rust
0
ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CA...
Rust
0
receiver: CanisterId, method: impl ToString, method_payload: Vec<u8>, ) -> Result<WasmResult, UserError> { self.query_handler.query( UserQuery { receiver, source: UserId::from(PrincipalId::new_anonymous()), method_name: method.to...
Rust
0
rrent_lease_period.saturating_add( T::BlockNumber::from(2u32) .saturating_mul(T::PermanentSlotLeasePeriodLength::get().into()) ) ), Error::<T>::OngoingLeaseExists ); ensure!( PermanentSlotCount::<T>::get() < T::MaxPermanentSlots::get(), Error::<T>::MaxPermanentSlotsExceeded )...
Rust
0
"""Test Flex Stacker open latch command implementation.""" import pytest from decoy import Decoy from opentrons.hardware_control.modules import FlexStacker from opentrons.protocol_engine.resources import ModelUtils from opentrons.protocol_engine.state.state import StateView from opentrons.protocol_engine.state.module...
Python
1
import time from functools import wraps from loguru import logger def timer(func_name: str = None, is_debug=True): def decorate(func): @wraps(func) def wrap(*args, **kwargs): s = time.time() res = func(*args, **kwargs) e = time.time() txt = f"{func_...
Python
1
DriverResult<()> { self.cmd(Command::MinimizeWindow).map(|_| ()) } /// Make the current window fullscreen. /// /// # Example: /// ```rust /// # use thirtyfour_sync::prelude::*; /// # /// # fn main() -> WebDriverResult<()> { /// # let caps = DesiredCapabilities::chrome();...
Rust
0
avg_per_step_reward * args.reward_scale, np.mean([cr[0] for cr in all_cum_reward]), reset_prob, np.mean(all_num_finished_jobs), np.mean(all_reset_hit), np.mean(all_avg_job_duration), entropy_...
Python
1
g optimization results including best_config, best_score, best_pipeline, and study statistics """ setup_rich_logging(log_config.log_level, log_config.log_file) # Create evaluator based on config if options_config.evaluation_config.type == "custom": module_path, class_name = options_...
Python
1
import torch import torch.nn as nn from torchvision import models from torch.nn import functional as F import sys sys.path.append('./models/') import ReCU from ReCU.imagenet.models_imagenet.resnet_ import resnet34_1w1a class GeM(nn.Module): # GeM zhedong zheng def __init__(self, dim = 2048, p=3, eps=1e-6): ...
Python
1
from(capi::pa_channel_position_t::TopRearRight)); assert_eq!(Position::TopRearCenter, Position::from(capi::pa_channel_position_t::TopRearCenter)); } impl From<Position> for capi::pa_channel_position_t { #[inline] fn from(p: Position) -> Self { unsafe { std::mem::transmute(p) } } } impl Fro...
Rust
0
_event_code( ScanResultsReceivedMetricDimensionSavedNetworksCount::TwoToFour .as_event_code() ) .as_event() ) ); // One saved networks that was discovered via active scan assert_eq!( ...
Rust
0
(|e| { crate::error::Error::Other(OtherError { throw_site: throw_site!(), message: Some(format!("Unable to save file '{}'", path.as_ref().display())), source: Some(Box::new(e)), }) }) } /// Create an index of the elements in this d...
Rust
0
_debug { ( $xc: expr, $( $x:tt )+ ) => { { use $crate::LogLevel; use $crate::log_msg; if cfg!(debug_assertions) { log_msg!($xc, LogLevel::Debug, $( $x )*); } } } } #[cfg(test)] mod tests { use super::*; use crate::mm::BumpA...
Rust
0
dr.port, svm_reserved1: 0, svm_zero: [0u8; 4], }; let mut rc = unsafe { libc::bind( fd, &mut sa as *mut _ as *mut libc::sockaddr, size_of::<libc::sockaddr_vm>() as u32, ) }; if rc < 0 { ...
Rust
0
File; pub use font::Font; pub use glyph_definition::GlyphDefinition; pub use glyph_positioning::GlyphPositioning; pub use glyph_substitution::GlyphSubstitution; pub use table::Table; <reponame>shravanrn/wasmtime_sandbox_compiler<filename>crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs use std::mem::MaybeUn...
Rust
0
ap_name, b"%s-UTF16\x00" as *const u8 as *const i8, cmap_base, ); let mut tounicode = pdf_read_ToUnicode_file(cmap_name); if tounicode.is_null() { sprintf( cmap_name, b"%s-UCS2\x00" as *const u8 as *const i8, cmap_base, ); tounicode...
Rust
0
""" @Time : 2020/3/14 11:00 @Author : 郭家兴 @Email : 302802003@qq.com @File : CaseForm.py @Desc : """ import time from lin.forms import Form from wtforms import StringField, FieldList, IntegerField, DateTimeField, Field from wtforms.validators import DataRequired, length, Optional class CaseGroupForm(Form)...
Python
1
: 'chuuk', 'fy': 'Chuukeesk', 'ga': 'Siúicísis', 'gd': 'Cànan Chuuk', 'gl': 'chuuk', 'gsw': 'Trukesisch', 'gu': 'ચૂકીસ', 'ha': 'Chuukese', 'he': 'צ׳וקסה', 'hi': 'चूकीस', 'hi-Latn': 'Chuukese', 'hr': 'chuukese', 'hsb': 'chuukezišćina', 'hu': 'csukéz', 'hy': 'տրուկերեն', 'ia': 'chuukese', 'id': 'Chuuke', 'ig': 'Chukisị',...
Python
1
internet2-org/aluvm-spec> // // Designed & written in 2021 by // Dr. <NAME> <<EMAIL>> // This work is donated to LNP/BP Standards Association by Pandora Core AG // // This software is licensed under the terms of MIT License. // You should have received a copy of the MIT License along with this software. // If not, ...
Rust
0
assert_eq!( result.unwrap_err(), KeyValidationError { error: "invalid DKG dealing encryption key: Internal conversion failed".to_string(), } ); } #[test] fn should_fail_if_dkg_dealing_encryption_key_is_invalid() { let (keys, node_id) = { let (mut keys, node_id) =...
Rust
0
f}%') print(f'Context Modality TXT: {len(sqa_results["TXT"])}, Correct: {sum(sqa_results["TXT"])}, Accuracy: {np.mean(sqa_results["TXT"]) * 100:.2f}%') print(f'Context Modality IMG: {len(sqa_results["IMG"])}, Correct: {sum(sqa_results["IMG"])}, Accuracy: {np.mean(sqa_results["IMG"]) * 100:.2f}%') print(f'C...
Python
1
from woningwaardering.vera.bvg.generated import Referentiedata from woningwaardering.vera.referentiedatasoort import Referentiedatasoort class EenheidstatusReferentiedata(Referentiedata): pass class Eenheidstatus(Referentiedatasoort): administratief = EenheidstatusReferentiedata( code="ADM", ...
Python
1
o_d, RoleD, 4 | send_mpst_j_to_e, RoleE, 5 | send_mpst_j_to_f, RoleF, 6 | send_mpst_j_to_g, RoleG, 7 | send_mpst_j_to_h, RoleH, 8 | send_mpst_j_to_i, RoleI, 9 | send_mpst_j_to_k, RoleK, 10 | send_mpst_j_to_l, RoleL, 11 | send_mpst_j_to_m, RoleM, 12 | send_mpst_j_to_n, RoleN, 13 | ...
Rust
0
tainment: Video Games", "question": "Minecraft can be played with a virtual reality headset.", "correct_answer": "True", "incorrect_answers": [ "False" ] }, { "type": "boolean", "difficulty": "easy", "category": "Entertainment: Video Games", "question": "&quot;Resident Evil 7&quot; is the first first-person Resident Ev...
Python
1
access to this item const ALLOW_WHEN_BLOCKED_BY_ACTIVE_ITEM = sys::ImGuiHoveredFlags_AllowWhenBlockedByActiveItem; /// Return true even if the position is obstructed or overlapped by another window const ALLOW_WHEN_OVERLAPPED = sys::ImGuiHoveredFlags_AllowWhenOverlapped; /// Return true...
Rust
0
ADME.md file. The README.md should be //! updated before every release. use bevy::prelude::*; use bevy_prototype_lyon::prelude::*; fn main() { App::build() .add_plugins(DefaultPlugins) .add_plugin(ShapePlugin) .add_startup_system(setup.system()) .run(); } fn setup(commands: &mut C...
Rust
0
pub struct Flatten; use crate::utils::types; use std::fmt::{Debug, Formatter, Result}; #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub enum HookType { AfterAll, AfterEach, BeforeAll, BeforeEach, } pub struct Hook { pub f: Box<dyn Fn() -> () + 'static>, pub kind: HookType, pub name: &'static ...
Rust
0
from email.mime import image from PIL import Image from sys import argv from os import path as file def resize_image(image_path: str = "dragon_32x32px.png"): if not file.exists(image_path): raise FileNotFoundError(f"Image file '{image_path}' not found.") img = Image.open(image_path) (width, height...
Python
1
Cap api_request_count += 1 if data: sheet[f'E{idx}'] = data.get('price', 'N/A') # CMC PRICE, default to 'N/A' if not found # Convert last_updated to WIB and write to Excel if 'last_updated' in data: ...
Python
1
ize> { self.inner.execute(query) } #[doc(hidden)] #[instrument(fields(db.system="sqlite", otel.kind="client"), skip(self, source), err)] fn query_by_index<T, U>(&self, source: T) -> QueryResult<Vec<U>> where T: AsQuery, T::Query: QueryFragment<Sqlite> + QueryId, Sqli...
Rust
0
coder = xorurl_encoder_into_repr_c(xor_url_encoder)?; o_cb(user_data.0, FFI_RESULT_OK, &ffi_encoder); Ok(()) }) } use na::{self, RealField, Vector3}; use crate::math::{Isometry, Point}; use crate::query::{Ray, RayCast, RayIntersection}; use crate::shape::{FeatureId, Triangle}; impl<N: RealField + ...
Rust
0
import itertools import numpy as np def generate_simplex_grid(n: int, m: int): """ Generate a uniform grid of points on the n-dimensional simplex. Examples: >>> generate_simplex_grid(3,2) array([[0., 0., 1.], [0., 1., 0.], [1., 0., 0.]], dtype=float32) ...
Python
1
import pandas as pd from sklearn.metrics.pairwise import cosine_similarity # Mock data: user-item ratings with realistic usernames and movie titles data = { 'User': ['Alice', 'Alice', 'Alice', 'Bob', 'Bob', 'Charlie', 'Charlie', 'David', 'David', 'David'], 'Item': ['Inception', 'The Matrix', 'Titanic', 'Incept...
Python
1
let dist = end - start; let dist_mag = dist.mag(); let segment_count = (dist_mag / rope.spacing).round() as usize; let particle_count = segment_count + 1; rope.spacing = dist_mag / segment_count as f64; let dir = dist / dist_mag; let step = rope.spacing * dir; let body_proto = Body { ...
Rust
0
# Copyright (c) 2015-2024 EPFL/Blue Brain Project # All rights reserved. Do not distribute without permission. # # Responsible Author: adrien.fleury@epfl.ch # # This file is part of Brayns <https://github.com/BlueBrain/Brayns> # # This library is free software; you can redistribute it and/or modify it under # the terms...
Python
1
�)한다. /// /// 현재 채널에 구독 중인 구독자 수를 반환한다. 이 모든 구독자가 실제로 메시지를 /// 수신했음을 보장하지 않는다. 구독자는 언제든 연결을 끊을 수 있다. /// /// # Examples /// /// 기본적인 사용 예시. /// /// ```no_run /// use mini_redis::client; /// /// #[tokio::main] /// async fn main() { /// let mut client = cl...
Rust
0
"Temp", "c_Thot", "c_Tcold"] assert len(ehex1) == 11 ehex1_data = [ [1000, 1.35, 1.431295, 1.2955644], [11000, 1.3794051, 1.692299, 1.0515688], ] assert_allclose(ehex1.iloc[[0, -1]], ehex1_data) # ehex run #3 assert list(ehex2.columns) == ["Step",...
Python
1
case # for the RLOAD1 entry having SID = 35. However, for # demonstration purposes, the RLOAD1 entry having SID = 36 # references DELAY and DPHASE bulk entries. Both approaches # define a delay of 0.2 and a phase angle of 5.0 for the # corresponding dynamic load. ...
Python
1
::TryFrom; let fraction = value_to_float(interp, fraction)?; let exponent = exponent.implicitly_convert_to_int().or_else(|err| { if let Ok(exponent) = exponent.try_into::<Float>() { if exponent.is_nan() { Err(Exception::from(RangeError::new( interp, ...
Rust
0
; self.tiles.push(false); self.tiles.push(true); self.tiles.push(false); self.tiles.push(false); self.tiles.push(false); self.tiles.push(false); self.tiles.push(false); } } } pu...
Rust
0
astables) tinputs = list(map(code, inputs)) toutputs = list(map(code, outputs)) #fix constant expressions as variables toutputs = [output if isinstance(output, theano.Variable) else tt.as_tensor_variable(output) for output in toutputs] if len(toutputs) == 1: toutputs = toutputs[0] # C...
Python
1
SphericalVel( ... ) """ return vconvert(target, current, space["length"]) @dispatch def vconvert( target: type[AbstractAcc], current: AbstractAcc, space: KinematicSpace, / ) -> AbstractAcc: """Convert an acceleration to the target type, with a Space context. Examples -------- >>> impo...
Python
1
eros_like(start_state_pos)), dim=-1) goal_state = torch.cat((goal_state_pos, torch.zeros_like(goal_state_pos)), dim=-1) else: start_state = start_state_pos goal_state = goal_state_pos if normalize: start_state = self.normalizer.normalize(start_state, key=...
Python
1
A binary response with content type `application/octet-stream`. /// /// - **Json&lt;T: Type>** /// /// A JSON response with content type `application/json`. /// /// - **PlainText&lt;T: Type>** /// /// A utf8 string response with content type `text/plain`. /// /// - **Attachment&lt;T: Type>** /// /// A fil...
Rust
0
index_map[0] > -1] = normal[ depth_index_map[depth_index_map > -1].long() ].permute(1, 0) results = { "render": rendered_image, "depth": rendered_depth, "normal": render_normal, "color_index_map": color_index_map, "depth_in...
Python
1