text
string
label_name
string
labels
int64
CodeOperandKind::zmm_rm | OpCodeOperandKind::cr_reg | OpCodeOperandKind::dr_reg | OpCodeOperandKind::tr_reg | OpCodeOperandKind::bnd_reg | OpCodeOperandKind::sibmem | OpCodeOperandKind::tmm_reg | OpCodeOperandKind::tmm_rm => return true, // GENERATOR-END: HasModRM _ => {} } ...
Rust
0
Owner<Self>> { Owner::from_raw((ptr as *mut Self).as_mut()?.init_user_data(user_data)) } } unsafe impl<U> UserData for PxBoxControllerDesc<U> { type UserData = U; fn user_data_ptr(&self) -> &*mut c_void { &self.obj.userData } fn user_data_ptr_mut(&mut self) -> &mut *mut c_void { ...
Rust
0
r = ( torch.arange(0, batch_size + 1, device=device, dtype=torch.int32) * page_num_per_batch ) kv_indices = page_table.flatten() q_nope = q_nope_pe[..., :head_dim_ckv] q_pe = q_nope_pe[..., head_dim_ckv:] ckv = ckv_kpe[..., :head_dim_ckv] kpe = ckv_kpe[..., head_dim_ckv:] #...
Python
1
from .lpips import LPIPS
Python
1
* cat face ⦿⽘⦿ ****************************** cat smile ≧◔◡◔≦ ****************************** cat2 龴ↀ◡ↀ龴 ****************************** cat4 (=^ェ^=) ****************************** catlenny ( ͡° ᴥ ͡°) ****************************** chair ╦╣ ****************************** chasing ''⌐(ಠ۾ಠ)¬'' *****************************...
Python
1
e default value for the implemented type. /// /// # Note /// /// Unlike the [`Default`] trait implementation the `DEFAULT` of implementations /// of this trait can be used in constant evaluation contexts. /// /// # Example /// /// ``` /// # #[cfg(feature = "std")] /// # const _: () = { /// # use const_default::ConstDef...
Rust
0
unwrap(); assert_eq!(contents, &["b"]); // Can't read the file assert_matches!( verify_contents(&pkg, subdir_proxy(&d, "packages/example/0")).await, Err(VerificationError::MissingFile { path }) if path == "a/b" ); drop(d); pkgfs.stop().await.expect("stopping pkgfs"); } #[fasy...
Rust
0
from im
Python
1
_str("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5") .or_else(|e| {Err(CryptoError::new(CryptoErrorKind::InnerErr, e))})?; let bit_size = 256; let name = String::from("P-256"); Ok( CurveParams { p, n, ...
Rust
0
eq2!( n2i(1.0, 1.5).pow(n2i(-0.1, 2.5)), n2i(0.960264500792218, 2.7556759606310757) ); assert_eq2!( n2i(1.0, 1.5).pow(n2i(-0.1, f64::INFINITY)), n2i(0.960264500792218, f64::INFINITY) ); assert_eq2!( n2i(1.0, 1.5).pow(n2i(-1.0, 0.1)), n2i(0.6666666666666666...
Rust
0
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, merge, publish, distribute, sublicense, // and/or sell copies of the Software...
Rust
0
self.bytes[2] } pub fn channel(&self) -> u8 { self.bytes[0] & 0x0F } } impl From<&[u8]> for LocalControl { fn from(raw_bytes: &[u8]) -> Self { LocalControl { bytes: [raw_bytes[0], raw_bytes[1], raw_bytes[2]], category: Category::ChannelMode, } ...
Rust
0
elf.point_pos = Some(point_pos); Box::new(self) } pub fn jitter(mut self, jitter: f64) -> Box<BoxPlot<Y, X>> { self.jitter = Some(jitter); Box::new(self) } pub fn x_calendar(mut self, x_calendar: Calendar) -> Box<BoxPlot<Y, X>> { self.x_calendar = Some(x_calendar); ...
Rust
0
Err(e) => { log::error!("Unable to deserialize record, error: {}", e); Ok(None) } }, None => Ok(None), } } } #![allow(dead_code)] use num::traits::Zero; use std::cmp::{Ord, Ordering, PartialEq, PartialOrd}; use std::collec...
Rust
0
# Copyright 2025 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
1
spellCheck: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, tabIndex: typing.Optional[typing.Union[str, NumberType]] = None, title: typing.Optional[str] = None, **kwargs ): self._prop_names = [ "children", "id", "a...
Python
1
000", server.into_channel()) .context("Failed to connect built-in service")?; Ok(proxy) } async fn get_max_brightness() -> Result<f32, Error> { let proxy = open_backlight()?; let connection_result = proxy.get_max_absolute_brightness().await; let max_brightness = connection_result.unwrap_or_else...
Rust
0
//! * we are allocating the whole heap, and initialize it all at once during startup. We //! should allow dynamic growth of heap (Issue #56) //! * pin/unpin operations is different from Mu spec (Issue #33) //! * we are using some utility C functions (heap/gc/clib_(architecture).c/.S) to help acquire //! some infor...
Rust
0
ort_by_key(|b| b.wing); trainings.push(TrainingInfo { training, signup_count, tier_info, bosses, }); } // Sort by custom names and dates trainings.sort_by(|a, b| title_sort_value(&b.training).cmp(&title_sor...
Rust
0
rate a new x25519 keypair in lair and get the pubkey back for general usage. fn create_x25519_keypair( &self, ) -> KeystoreApiFuture<holochain_zome_types::x_salsa20_poly1305::x25519::X25519PubKey>; /// If we have an X25519 pub key in lair use it to ECDH negotiate a shared key and then /// Salsa...
Rust
0
:?}", self.path()); tokio::fs::remove_dir_all(&self.path()).await?; return Ok(()); } } impl<'r> Bundle<'r, Inboxed> { pub async fn write_metadata(&self, metadata: &Metadata) -> Result<()> { let path = self.path().join(Kind::Metadata.filename()); info!("Writing metadata fragmen...
Rust
0
{ ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] #[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] pub struct CPublishedFile_SetPlaytimeForControllerConfigs_Request_ControllerConfigUsage { // message fields publishedfileid: ::std::option...
Rust
0
Draws some blocks around the identifier's characters.""" BaseLTOLabel.drawOn(self, canvas, x, y) canvas.saveState() canvas.setLineWidth(self.LINEWIDTH) canvas.setStrokeColorRGB(0, 0, 0) canvas.tra...
Python
1
return None; } None => EN::Name(n), } } PN::ModuleType(mname, sn) => match context.module_alias_get(&mname.0).cloned() { None => { context.error(vec![( mname.loc(), format!("Unb...
Rust
0
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
Python
1
rite_text(toml) # Ask pixi to compute the environment for shell activation via shell-hook --json out = verify_cli_command( [pixi, "shell-hook", "--manifest-path", manifest, "--json"], ) data = json.loads(out.stdout) env = data["environment_variables"] # activation.env overrides activa...
Python
1
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( float_or_none, merge_dicts, str_or_none, T, traverse_obj, url_or_none, ) class WhypIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?whyp\.it/tracks/(?P<id>\d+)' _TESTS =...
Python
1
# Copyright (c) 2022 PaddlePaddle 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 appli...
Python
1
# Generated by Django 5.0.1 on 2024-02-07 21:17 import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('denuncia', '0002_alter_denuncia_assedio_alter_denuncia_bullying_and_more'), ] operations = [ migrations.AddFiel...
Python
1
writableCommand}; use crate::{CopyCommand, ProcessedCommandParams}; #[test] fn valid() { let command = CopyCommand { term: Term::stdout(), }; let params = ProcessedCommandParams { source: Option::Some(PathBuf::new()), destination: Option::Some(Pat...
Rust
0
on: <https://docs.microsoft.com/en-us/typography/opentype/spec/eblc>. /// /// The `EBLC` provides embedded bitmap locators. It is used together with the /// `EBDT` table, which provides embedded, monochrome or grayscale bitmap /// glyph data, and the `EBSC` table, which provided embedded bitmap scaling /// information....
Rust
0
), Ok(Some(vec![1, 1, 0, 0, 0])) ); }) } #[test] fn test_boolean_and_hash() { t(|args: &mut Runtime| { let hash = [0; 32]; let mut res = true.encode(); res.append(&mut hash.to_vec()); assert_eq!( args.call( "test_boolean_and...
Rust
0
>, ) -> PartialVMResult<()> { let ty_layout = self.loader.type_to_type_layout(&ty)?; Ok(self.event_data.push((guid, seq_num, ty, ty_layout, val))) } } extern crate ipc; extern crate plugin; pub use ipc::cbor::Value; pub use ipc::*; pub use plugin::*; extern crate structopt; use std::path::PathBuf; use st...
Rust
0
ed(self.GetId())) def _change_memory_mapping(self, number, bank, present): mem = self._memory_cache[number] bank = self._bank_indexes[self._bank_index_order[bank]] if present: self._bankmodel.add_memory_to_mapping(mem, bank) else: self._bankmodel.remove_memor...
Python
1
fn get_elt_nonempty() { let mut tree: Tree<TextElement> = Tree::new(); insert(&mut tree, 104, "hello"); insert(&mut tree, 401, "world"); let (elt, offset) = tree.get_elt(0).expect("Not out of bounds!"); assert!(elt.text == "hello"); assert!(offset == 0); let ...
Rust
0
se: bpy.types.CyclesRender_PT_sampling.append(render_cycles_scene_samples) def unregister(): bpy.utils.unregister_class(AMTH_RENDER_OT_cycles_samples_percentage) bpy.utils.unregister_class(AMTH_RENDER_OT_cycles_samples_percentage_set) if utils.cycles_exists(): if bpy.app.version >= (2,...
Python
1
fruit=["apple", "orange","Coconut"] value=int(input("Enter the value: ")) print(fruit[value])
Python
1
Style = windows_sys::Win32::UI::WindowsAndMessaging::WS_SYSMENU; #[cfg(windows)] pub const WS_DISABLE_MAXIMIZE:WindowStyle = WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX; #[cfg(windows)] pub const WS_DISABLE_MAXIMIZE_MINIMIZE:windows_sys::Win32::UI::WindowsAndMessaging::WINDOW_STYLE = WS_CAPTION|WS_SYSMENU|WS...
Rust
0
cum_time += delta as f64; num_frames += 1.0 as f64; if cum_time > 2.0 { let fps = num_frames / cum_time; let cpums = 1000.0 * cum_updates_time / num_frames as f64; info!("Frame time: {:.2}ms ({:.2}ms cpu, FPS: {:.2})", ...
Rust
0
ig: &Config) -> Result<()> { // // ファイル読み込み // //let mut f = match File::open(config.filename) { // Ok(file) => file, // Err(e) => return Err(e), //}; // 上記のショートカット // 厳密にはエラー時に返す型がちょっと違うみたい // https://doc.rust-jp.rs/book-ja/ch09-02-recoverable-errors-with-result.html#%E3%82%A8%E3%83%A9%E3%83%BC%E5%A7%94%E8%...
Rust
0
D_0_PMS_3_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { DMA_APBPERI_UCHI0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_3_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for DMA_APBPERI_UCHI0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_3_R { type Target = crate::FieldReader<u8, u8>; #[inline(al...
Rust
0
#!/usr/bin/env python2 # -*- coding:utf-8 -*- from cgi import print_environ import time import rospy from sensor_msgs.msg import JointState from std_msgs.msg import Header from visualization_msgs.msg import Marker from pymycobot.mycobot import MyCobot def talker(): rospy.init_node("display", anonymous=True) ...
Python
1
ao_base_config=CodebookWeightOnlyConfig( dtype=dtype, block_size=block_size, ), filter_fn=filter_fn, ) quantization_recipe = QuantizationRecipe( quantizers=None, ao_quantization_configs=[config], ) lowe...
Python
1
from datetime import date, timedelta from fastapi import APIRouter from databases.models import User import requests from typing import List from schemas import ErrorOutput, DaySummaryOutput from os import getenv from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker engine = create_engine(geten...
Python
1
8, pub bInterfaceClass: u8, pub bInterfaceSubClass: u8, pub bInterfaceProtocol: u8, pub iInterface: u8, } impl ::core::marker::Copy for USB_INTERFACE_DESCRIPTOR {} impl ::core::clone::Clone for USB_INTERFACE_DESCRIPTOR { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'W...
Rust
0
cls_id = obj[obj.find('<Class_ID>')+10 : obj.find('</Class_ID>')] diffculty = obj[obj.find('<difficult>')+11 : obj.find('</difficult>')] if cls_id in ['100000027', '100000022'] : diffculty = '1' nt += 1 cx = (eval(obj[obj.find('<mbox_c...
Python
1
order_id: *mut c_char, // market: *mut c_char, // ) -> OpenLimitsResult { // let call = move|| -> Result<(), OpenlimitsSharpError> { // if client.is_null() { // return Err(OpenlimitsSharpError::InvalidArgument(String::from("client is null"))); // } // let id = c_str_to_string(order_id).map_err(...
Rust
0
ged" wave # R_B = q / np.tan(delta_v) # # Approximate correction factor # delta_R = np.arctan(n / R_B) # takeoff_init = takeoff_0 + delta_R # ray_p_init = np.sin(takeoff_init) / src_vel plt.figure() for z in layer_depths: plt.axhline(z) plt.plot(0, src_depth, 'o') plt.plot...
Python
1
f().to_glib_none().0) } } fn get_v_align(&self) -> Option<GString> { unsafe { from_glib_full(webkit2_webextension_sys::webkit_dom_html_table_row_element_get_v_align(self.as_ref().to_glib_none().0)) } } fn insert_cell(&self, index: libc::c_long) -> Result<DOMHTMLElem...
Rust
0
Info ) )); assert_eq! (unsafe { & ( * ( 0 as * const EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE ) ) . FrameBufferBase as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE ) , "::" , stringify ! ...
Rust
0
ease-unsigned", }; let apk_path = config.project_dir().join(format!( "app/build/outputs/apk/{}/{}/app-{}-{}.apk", flavor, build_ty, flavor, apk_suffix )); self.adb(env) .with_arg("install") .with_arg(apk_path) .run_and_wait() ...
Rust
0
KeyAgreement::EcdhP384 => &ring_agreement::ECDH_P384, } } } /// Opaque private key type. pub type AgreementPrivateKey = ring_agreement::EphemeralPrivateKey; /// Generates a new key pair as part of the exchange. /// /// Returns the opaque private key and the corresponding public key. pub fn generate_agr...
Rust
0
7) db.session.add(activity118) db.session.add(activity119) db.session.add(activity120) db.session.add(activity121) db.session.add(activity122) db.session.add(activity123) db.session.add(activity124) db.session.add(activity125) db.session.add(activity126) db.session.add(activity12...
Python
1
ICS spec implemented:: //! * ics-002-client-semantics //! * ics-003-connection-semantics //! * ics-004-channel-and-packet-semantics //! * ics-005-port-allocation //! * ics-010-grandpa-client //! * ics-018-relayer-algorithms //! * ics-025-handler-interface //! * ics-026-routing-module //! //! ### Terminology //! //! Pl...
Rust
0
s, vec!["a", "b", "c", "events", "doom", "y", "events2"] ); assert!(found.expressions.is_empty()); } #[test] fn word() { let found = find( r#" var a = load('a'); var b = load('b'); var c = load('c'); var abc = a...
Rust
0
builder.add_authority_check("check if 2020-12-04T09:46:41+00:00 > 2019-12-04T09:46:41+00:00"); //date less or equal builder.add_authority_check("check if 2019-12-04T09:46:41+00:00 <= 2020-12-04T09:46:41+00:00"); builder.add_authority_check("check if 2020-12-04T09:46:41+00:00 >= 2020-12-04T09:46:41+00:00"); ...
Rust
0
import torch import sys from scripts.data.data_module import DataLoading from scripts.experiments.experiment_utils import ExperimentLogger def get_train_mean_std(train_loader): # Initialize accumulators and pixel count channel_sum = torch.zeros(3) channel_sum_sq = torch.zeros(3) total_pixels = 0 # if l...
Python
1
188.25, 974.25, 0.25, 4.25, 73.25, 458.25, 2203.25, 27.25, 1], [ -13.25, 3.25, 8.25, -23.25, -20.25, -15.25, -5.25, 1.25, 8.25, 2]]) result = misc._array_to_table(arr, rownames, colnames, n_digits) desired = "alpha -1.7e6 625.25 1654.2 -437...
Python
1
> None: """Test to generate mapping from test IDs to actual Google Drive IDs. This test is skipped by default as it requires real Google Drive credentials and is primarily used to generate mappings for other tests. Run with: RUN_MANUAL_TESTS=true pytest -xvs tests/daily/connectors/google_drive/te...
Python
1
} #[test] #[allow(unused)] #[should_panic(expected = "")] fn test_compress_signature_zero_should_fail() { let n = BigUint::from_u8(77u8).unwrap(); let s = BigUint::from_u8(0u8).unwrap(); compress_signature(s, &n); } #[test] #[allow(unused)] #[should_panic(...
Rust
0
doc = " @param pBuffer audio data buffer."] #[doc = " @param bytesToWrite The length of pBuffer in bytes."] #[doc = " @param duration_100nanos The duration of the audio sample"] #[doc = " @param pContext A pointer to the application-defined callback context."] pub type AUDIO_ENCODER_ONENCODEDDATA = ::std::option::Optio...
Rust
0
_deps::Config::new() //! .add_build_internal("testlib", |lib, version| { //! // Actually build the library here //! system_deps::Library::from_internal_pkg_config("build/path-to-pc-file", lib, version) //! }) //! .probe() //! .unwrap(); //! } //! ``` //! //! This...
Rust
0
[changeset_options(treat_none_as_null = "true")] pub struct ErrorUpdateMetadata { pub status: UpdateStatus, pub error: String, pub finished_timestamp: DateTime<Utc>, } #[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, FromSqlRow, AsExpression)] #[sql_type = "Text"] pub enum SyntheticGroupType...
Rust
0
import sys sys.path.append('..') # os.environ["OMP_NUM_THREADS"] = str(1) import os # os.environ["CUDA_VISIBLE_DEVICES"]='0' import argparse import torch import torch.nn as nn import torch.backends.cudnn as cudnn # cudnn.benchmark = True from mdistiller.models import cifar_model_dict, imagenet_model_dict from m...
Python
1
""" Write a function to subtract two lists element-wise. assert sub_list([1, 2, 3],[4,5,6])==[-3,-3,-3] """ def sub_list(list1,list2): return [list1[i]-list2[i] for i in range(len(list1))] print(sub_list([1,2,3],[4,5,6])) /python/list/list_comprehension.py """ List comprehension is a way to create a list based on...
Python
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from libs.version import __version__ from sys import platform as _platform with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() req...
Python
1
# Atividade 07: # Tabuada com Condicional: # Faça um programa que solicite um número ao usuário e use # um laço while para exibir a tabuada desse número (de 1 a 10), # mas apenas para os resultados que forem múltiplos de 3. res = 0 n = 0 cont = 0 n = int(input('Numero da tabuada: ')) while cont < 11: cont += 1
Python
1
his part. source1 = "CUstream stream, CUdeviceptr out, CUdeviceptr Q, CUdeviceptr K, CUdeviceptr V, CUdeviceptr layout_csr_row_indices, CUdeviceptr layout_csr_col_indices, int32_t layout_csr_row_stride_h, int32_t layout_csr_col_stride_h, int32_t num_layout, float softmax_scale, int32_t stride_qb, int32_t stride_qh,...
Python
1
# boipoka_app/context_processors.py from .models import Notifications def unread_notifications(request): if request.user.is_authenticated: temp=Notifications.objects.filter(subscriber=request.user, is_read=False)#Fetch all notifications which are unread if temp.exists(): unread_count =...
Python
1
..2^32-1>; /// } UpdatePathNode; /// ``` #[derive(Debug, PartialEq, Clone, Serialize, Deserialize)] pub struct UpdatePathNode { pub public_key: HPKEPublicKey, pub encrypted_path_secret: Vec<HpkeCiphertext>, } /// 7.7. Update Paths /// /// ```text /// struct { /// KeyPackage leaf_key_package; /// Update...
Rust
0
types][mat] page, ABCI //! methods are split into four categories. Tendermint opens one ABCI connection //! for each category of messages. These categories are modeled by the //! [`MethodKind`] enum and by per-category request and response enums: //! //! * [`ConsensusRequest`] / [`ConsensusResponse`] for [`MethodKind...
Rust
0
let mut cpu: CPU = CPU::new(); cpu = cpu.set_hl(Register { value: 10 }); cpu = cpu.set_a(Register { value: 20 }); let hl = cpu.hl; let a = cpu.a; let memory_return = memory::write16(hl, a); assert_eq!(memory_return.value, 20); assert_eq!(memory_return.a...
Rust
0
import sys import os sys.path.append('..') from semantic_chunkers import StatisticalChunker,ConsecutiveChunker from semantic_router.encoders import OpenAIEncoder from abc import ABC, abstractmethod from src.data_structurer.test_data import arxiv import os from dotenv import load_dotenv load_dotenv() class Chunker(AB...
Python
1
error, url: x.2.clone(), }) }) .collect(); for (tile, tile_image) in tiles.iter().zip(tile_images) { let (x, y) = (tile.0, tile.1); let (x_px, y_px) = (bounds.x_to_px(x.into()), bounds.y_to_px(y.into(...
Rust
0
# SPDX-FileCopyrightText: © 2022-2025 Wojciech Trybus <wojtryb@gmail.com> # SPDX-License-Identifier: GPL-3.0-or-later from abc import ABC, abstractmethod from typing import Final, TypeVar, Generic from PyQt5.QtWidgets import QWidget from ..field import Field T = TypeVar("T") class ConfigBasedWidget(ABC, Generic[T...
Python
1
Bytes>(&mut self, _input: &I) -> Result<(), Error> { Ok(()) } } impl CmpLogRuntime { /// Create a new [`CmpLogRuntime`] #[must_use] pub fn new() -> CmpLogRuntime { Self { ops_save_register_and_blr_to_populate: None, ops_handle_tbz_masking: None, ops_h...
Rust
0
\x20known\ \n\n\x0e\n\x06\x05\0\x02\x9c\x02\x01\x12\x04\x9f\x03\x02\x14\n\x0e\n\x06\ \x05\0\x02\x9c\x02\x02\x12\x04\x9f\x03\x17\x1c\n\r\n\x05\x05\0\x02\x9d\ \x02\x12\x04\xa0\x03\x02\x1e\n\x0e\n\x06\x05\0\x02\x9d\x02\x01\x12\x04\ \xa0\x03\x02\x15\n\x0e\n\x06\x05\0\x02\x9d\x02\x02\x12\x04\xa0\x03\x18\ ...
Rust
0
hdr: *const c_void, flags: c_int) -> c_int; /// http://nanomsg.org/v0.4/nn_recvmsg.3.html pub fn nn_recvmsg(socket: c_int, msghdr: *mut c_void, flags: c_int) -> c_int; /// http://nanomsg.org/v0.4/nn_allocmsg.3.html pub fn nn_allocmsg(size: size_t, ty: c_int) -> *mut c_void; /// http://nanomsg.org...
Rust
0
import threading import time import sys print = sys.stdout.write forks = [threading.Lock() for _ in range(5)] def philosopher(phil_id, left_fork, right_fork): while True: print(f'Philosopher {phil_id} is thinking.\n') time.sleep(1) with left_fork: print(f'Philosopher {phil_id...
Python
1
""", """ SELECT 'XCP' AS asset, SUM(backward_quantity) AS total FROM ( SELECT backward_quantity, status, MAX(rowid) FROM bet_matches GROUP BY id ) WHERE status = 'pending' """, """ SELECT 'XCP' AS asset, SUM(wager) AS total FROM ...
Python
1
ize=None, rot=0, grid=True, figsize=None, layout=None, return_type=None, **kwds, ): import matplotlib.pyplot as plt ax = boxplot( self, column=column, by=by, ax=ax, fontsize=fontsize, grid=grid, rot=rot, figsize=figsize, ...
Python
1
(&poly_b); assert_eq!(q.coeffs(), coefficients![1f32, 2.0]); assert_eq!(r.coeffs(), coefficients![3f32, 0.0]); // (x³ + 2x² + 3x) / (x² + 1) = x + 2 | 2x - 2 let poly_b = Polynomial::new(coefficients![1f32, 0.0, 1.0]); let (q, r) = poly_a.div_rem(&poly_b); assert_eq!(q.coeffs(), coefficients![1f32, ...
Rust
0
class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: ans = [] for i in range(len(nums)): new_t = target - nums[i] if i+1 == len(nums)-1: return [i, i+1] if new_t in nums[i+1:]: return [i, nums[i+1:].index(new...
Python
1
# coding: utf-8 import sys from traitlets import default from .baseapp import NbGrader, nbgrader_aliases, nbgrader_flags from ..converters import BaseConverter, GenerateFeedback, NbGraderException aliases = {} aliases.update(nbgrader_aliases) aliases.update({ }) flags = {} flags.update(nbgrader_flags) flags.update...
Python
1
Return instance of filtered SonicDockerManager.ContainerList for index :param asic_index: Asic index """ if asic_index is None: return self return self.__class__(self.manager, filter(lambda docker: docker.asic_ind...
Python
1
t11WIDSAtkStasType": h3cDot11WIDSAtkStasType, "h3cDot11WIDSAtkStasCurCnt": h3cDot11WIDSAtkStasCurCnt, "h3cDot11WIDSAtkStasTotalCnt": h3cDot11WIDSAtkStasTotalCnt, "h3cDot11BlackListTable": h3cDot11BlackListTable, "h3cDot11BlackListEntry": h3cDot11BlackListEntry, "h3cDot11BlackListMAC":...
Python
1
0); bounding_box.max.x = fmax(bounding_box.max.x, point.x / 40.0); bounding_box.max.y = fmax(bounding_box.max.y, point.y / -40.0); bounding_box.max.z = fmax(bounding_box.max.z, point.z / 40.0); } } } let (vao, vertex_buffer_length) = gl.load_m...
Rust
0
(PlanNode::Remote(left), PlanNode::Remote(right), PlanNode::Remote(finalize)) => { assert_eq!(right.stream_id, "dummy"); assert_eq!(left.stream_id, "dummy_local"); assert_eq!(left.fetch_nodes, ["dummy_local", "dummy"]); assert_eq!(...
Rust
0
efactored root = tk.Tk() root.withdraw() # 创建应用 app = MainWindowRefactored(root) # 快速关闭 root.after(100, root.destroy) print("✅ GUI启动测试通过") return True except Exception as e: print(f"❌ GUI启动测试失败: {e}"...
Python
1
} Ok(Self(name)) } } impl NewStorage { pub fn new( name: StorageName, storage_type: StorageType, config: StorageConfig, ) -> Result<Self, StorageError> { match storage_type { StorageType::Local => { if config.host_id.is_none() { ...
Rust
0
::new(), }; const ALL_DMA: AllDma = AllDma { d1: DMA1, d2: DMA2 }; impl AllDma { /// Split the DMA registers into individual channels. /// /// This will enable clocks and reset the DMA1, DMA2, and DMAMUX peripherals. /// /// # Example /// /// ```no_run /// use stm32wlxx_hal::{dma::AllD...
Rust
0
# -*- coding: utf-8 -*- from __future__ import print_function '''Selection of entities inside a geometric object. Home made test.''' __author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AO_O)" __copyright__= "Copyright 2015, LCPT and AO_O" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@ciccp.es ana.or...
Python
1
er.metrics)) summary.append(dict(name=learner.__class__.__name__, **learner.summary)) return metrics, summary def test_learners_sin(): metrics, summary = run_experiment( simulator=Sin(parameters_range={"x": (0, 50.0)}, output_names=["y"]), seeds=[0], n_initial_samples=5, ...
Python
1
] .into_iter() .collect::<HashMap<String, (Vec<String>, cylinder::PublicKey)>>(); let node_a_event_client = node_a .admin_service_event_client_with_auth( &format!("test_circuit_{}", &circuit_id), None, auth.into(), ) .expect("Unable to get ev...
Rust
0
y) class ThreadedHTTPServer(ThreadingMixIn, HTTPServer): """Handle requests in a separate thread.""" pass if __name__ == "__main__": if os.environ.get("MULTITHREADING") == "1": server = ThreadedHTTPServer((QGIS_SERVER_HOST, QGIS_SERVER_PORT), Handler) else: server = HTTPServer((QGIS...
Python
1
ame) feature_list.append(feature) feature = get_guarantor_features(df, name) feature_list.append(feature) feature = get_guaranty_features(df, name) feature_list.append(feature) feature = get_interest_features(df, name) feature_list.append(feature) feature = get_couple_features(df, na...
Python
1
")] Cup, /// Cyprus Pound #[serde(rename = "CYP")] Cyp, /// Czech Koruna #[serde(rename = "CZK")] Czk, /// Dalasi #[serde(rename = "GMD")] Gmd, /// Danish Krone #[serde(rename = "DKK")] Dkk, /// Denar #[serde(rename = "MKD")] Mkd, /// Deutsche Mark #[serde(rename = "DEM")] Dem, /// Djibouti Franc #...
Rust
0
and callback to the downstream peer that initially sent this transaction submission request // is also successful (i.e. no timeout) // // Thus, a transaction submission response from the upstream peer that states that // the transaction was rejected by the upstream peer, would still be considered a ...
Rust
0
Self::Unsigned(Bits::Bit16, 0, core::u16::MAX as u128) } #[inline] pub fn u32() -> Self { Self::Unsigned(Bits::Bit32, 0, core::u32::MAX as u128) } #[inline] pub fn u64() -> Self { Self::Unsigned(Bits::Bit64, 0, core::u64::MAX as u128) } #[inline] pub fn u128() -> S...
Rust
0
Last rounds with full SBox end -------------------- Ok(input_vars) } pub fn Poseidon_permutation_gadget<'a, CS: ConstraintSystem>( cs: &mut CS, input: Vec<AllocatedScalar>, params: &'a PoseidonParams, sbox_type: &SboxType, output: &[Scalar] ) -> Result<(), R1CSError> { let width = params...
Rust
0