text
string
label_name
string
labels
int64
v_draw_mask_add`"] #[doc = " Return: the parameter of the removed mask."] #[doc = " If more masks have `custom_id` ID then the last mask's parameter will be returned"] pub fn lv_draw_mask_remove_id(id: i16) -> *mut ::cty::c_void; } #[lvgl_macros::safe_wrap(attr)] extern "C" { #[doc = " Remove all mask w...
Rust
0
name(desc_file) file_dict['file_size'] = os.path.getsize(desc_file) self.send_msg(client_socket, json.dumps(file_dict).encode()) dummy = self.recv_msg(client_socket) with open(desc_file, 'rb') as f: client_socket.sendall(f.read()) # get infer resu...
Python
1
ring_alerts': [ 'Fallback portfolio active - sector analysis unavailable', 'Consider upgrading news data sources for better analysis' ] } # Test and demonstration if __name__ == "__main__": engine = HybridRecommendationEngine() print("🚀 Hybrid Investmen...
Python
1
macro_rules! test_day { ($name: ident, $day: literal, $sol_a: literal, $sol_b: literal) => { #[test] fn $name() -> Result<(), std::io::Error> { test_day($day, $sol_a, $sol_b) } }; } test_day!(day01, 1, "3262356", "4890664"); test_day!(day02, 2, "3101844", "8478"); test_day!...
Rust
0
"""The command for generating new tasks in the context of a time plan.""" from jupiter.core.domain.application.gen.service.gen_service import GenService from jupiter.core.domain.core.adate import ADate from jupiter.core.domain.core.recurring_task_period import RecurringTaskPeriod from jupiter.core.domain.features impo...
Python
1
ygon_mode: current_shape.append((end_x, end_y)) else: shapes.append((start_x, start_y, end_x, end_y)) current_shape = None def on_mouse_move(event): global start_x, start_y, current_shape, polygon_mode if not polygon_mode and current_shape is not None...
Python
1
; let guard = block_on(store_handle.lock()); let (waker, wake_count) = new_count_waker(); let mut ctx = Context::from_waker(&waker); let next_fut = stream_map.next(); fasync::pin_mut!(next_fut); assert_eq!(next_fut.poll(&mut ctx), Poll::Pending); assert_eq!(wake_count.get(), 0); drop(...
Rust
0
from django.urls import path from .views import login_view, activate, logout_view, profile_view, update_user app_name = 'user' urlpatterns = [ path('login/', login_view, name='login'), path('activate/', activate, name='activate'), path('logout/', logout_view, name='logout'), path('profile/', profile_v...
Python
1
ntation.split('_')[1] landscape_path = os.path.join(main.OUTPUT_DIR, f"{base_name}_landscape_{landscape_orientation}.png") print(f"DEBUG: Ищем файл: {landscape_path}") print(f"DEBUG: Файл существует: {os.path.exists(landscape_path)}") if os.path.exists(lan...
Python
1
Self { let mut ctrl_desc_cnt = 0usize; match self.send_buff.as_mut() { Some(buff) => { buff.reset_write(); let mut init_buff_len = 0usize; match buff.get_ctrl_desc_mut() { Some(ctrl_desc) => { let ind_desc_lst = unsafe { let size = core::mem::size_of::<Descriptor>(); core:...
Rust
0
{ tx_info .tx_log .update_confirmation_ts(hdr_info.confirmed_time); } tx_info.updated = true; if let Some(ref s) = status_send_channel { let _ = s.send(StatusMessage::Info(format!( "Changing transaction {} state to confirmed", tx_info.tx_uuid.split('/').next().unw...
Rust
0
#!/usr/bin/env python # flake8: noqa: E402 """ A simple load tester for IRRd. Sends random !g queries. """ import argparse import random import socket import time def main(host, port, count): queries = [b"!!\n"] for i in range(count): asn = random.randrange(1, 50000) query = f"!gAS{asn}\n".en...
Python
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Interfaces for ioLab Systems button boxes. These are optional components that can be o...
Python
1
_ => (), } } } } } impl Widget<LapceTabData> for FilePickerPwd { fn event( &mut self, ctx: &mut EventCtx, event: &Event, data: &mut LapceTabData, env: &Env, ) { self.input.event(ctx, event, data, env)...
Rust
0
("all") fig.set_size_inches(6, 6) # %% # We see that again, the regression weights have been correctly estimated. # # Visualize the effect on raw data # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # Once we have obtained robust regression weights, we can use them to apply the # regression directly to raw, epoched, and evoked dat...
Python
1
}, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::<CMsgSteamDatagramSessionCryptInfo>( "CMsgSteamDatagramSessionCryptInfo", fields, file_descriptor_proto() ) }) } fn default_instance() -> &'static CMsgSteamDat...
Rust
0
from("9999999999999999999999999")).unwrap(), u64::MAX, Some(ERR_DATA_OUT_OF_RANGE), ), ( Json::from_f64(2f64 * (u64::MAX as f64)).unwrap(), u64::MAX, Some(ERR_DATA_OUT_OF_RANGE), ), ]; fo...
Rust
0
tch &cap[1] { "hlf" => Op::Hlf(reg), "tpl" => Op::Tpl(reg), "inc" => Op::Inc(reg), _ => panic!() } } else if let Some(cap) = jmp_re.captures(line) { let offset = cap[1].parse().unwrap(); ...
Rust
0
from typing import Any, Optional from flet.core.control import Control from flet.core.ref import Ref class HapticFeedback(Control): """ Allows access to the haptic feedback interface on the device. It is non-visual and should be added to `page.overlay` list. Example: ``` import flet as ft ...
Python
1
clock 2 (ADC_ALTCLK2)"] #[inline(always)] pub fn _01(self) -> &'a mut W { self.variant(ADICLK_A::_01) } #[doc = "Alternate clock 3 (ADC_ALTCLK3)"] #[inline(always)] pub fn _10(self) -> &'a mut W { self.variant(ADICLK_A::_10) } #[doc = "Alternate clock 4 (ADC_ALTCLK4)"] ...
Rust
0
", Some(b"bravo")), ]; assert_eq!( verify_proof::<NoExtensionLayout, _, _, _>(&root, &proof, items.iter()), Err(VerifyError::DuplicateKey(b"bravo".to_vec())) ); } #[test] fn test_verify_extraneous_node() { let (root, proof, _) = test_generate_proof::<NoExtensionLayout>( test_entries(), vec![b"br...
Rust
0
ss="bg-background-900"> <div class="container px-6 py-4 space-x-4 flex justify-center text-primary-300"> <Link<Route> to={Route::Imprint}>{ "Imprint" }</Link<Route>> <Link<Route> to={Route::Privacy}>{ "Privacy" }</Link<Route>> </div> </div> } } <repona...
Rust
0
from ccrawl.utils import struct_letters from ccrawl.ext.ctypes_ import build from ctypes import sizeof __all__ = [ "cMacro_volatility", "cFunc_volatility", "cTypedef_volatility", "cEnum_volatility", "cStruct_volatility", "cUnion_volatility", ] # volatility VTypes formatters: # ----------------...
Python
1
2> { // Rust 中的匹配是穷尽的(exhaustive): // 必须穷举到最后的可能性来使代码有效 match x { None => None, Some(i) => Some(i + 1), } } <gh_stars>0 use serde::{self, Serialize, Deserialize}; use crate::{ authorization::AcmeAuthorization, directory::AcmeBoundDirectory, error::Result, identifier::Acme...
Rust
0
3, 3, 2), // the function should return 3. Rome has the number 3 on the map. // From cities 1, 2 and 4, there is a direct road to city 3. From // cities 0 and 5, the roads to city 3 go through city 2. // // 5 4 // \ / // > < // ...
Rust
0
from datetime import date from op_analytics.coreutils.threads import run_concurrently from op_analytics.coreutils.time import now_date from op_analytics.coreutils.logger import structlog from .database import find_tokens from .chaintokens import ChainTokens log = structlog.get_logger() def execute_pull(process_...
Python
1
target instance pull_result = misps_site_admin[target_index - 1].server_pull(server=server_id, event=event.id) time.sleep(2) # Allow time for the pull to complete check_response(pull_result) # Verify that the event exists and is locked on the target instance results = target_i...
Python
1
parser.add_argument("--dp-size", type=int, default=2, help="Data parallel size") parser.add_argument("--tp-size", type=int, default=1, help="Tensor parallel size") par...
Python
1
codecsList = ( 'ascii', 'big5', 'big5hkscs', 'cp037', 'cp424', 'cp437', 'cp500', 'cp737', 'cp775', 'cp850', 'cp852', 'cp855', 'cp856', 'cp857', 'cp860', 'cp861', 'cp862', 'cp863', 'cp864', 'cp865', 'cp866', 'cp869', 'cp874', ...
Python
1
obj)?, is_last, ); if !display_settings.display_font && &label == "Font" { cursor.print_subitem( EXPAND_INFO_STYLE .paint("... (display with `display-font` flag)") .to_string(), true, ); ...
Rust
0
, 4, 4, 5)), list!(1, 2, 5) ); assert_eq!( Solution::delete_duplicates(list!(1, 1, 1, 2, 3)), list!(2, 3) ); } } <filename>src/bin/network-router.rs // Copyright 2019 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); you // may n...
Rust
0
#!/usr/bin/python3 import argparse import re class InvalidPRTitle(Exception): def __init__(self, invalid_title): self.invalid_title = invalid_title def check_pr_title(pr_title: str): print(pr_title) # cover most common cases: # package: foo # package, otherpackage/subpackage: this is a ...
Python
1
32, gp.acceleration, $right, epsilon = 0.001) { panic!("assertion failed, Acceleration does not match, left: {:?}\n right: {:?}", $left, $right) } }, None => panic!("assertion failed, left: {:?}\n right: {:?}", $left, $right) ...
Rust
0
eq!( results[0].1.hash().0, [ 141, 3, 218, 9, 245, 129, 12, 99, 192, 12, 107, 216, 4, 191, 254, 93, 247, 103, 110, 204, 77, 126, 154, 187, 198, 139, 58, 24, 191, 179, 59, 125 ] ); assert_eq!( results[1].1.hash().0, [ 254, 230, 153, 200,...
Rust
0
match (output.pop_back(), output.pop_back()) { (Some(expr2), Some(expr1)) => { output.push_back(Expression::Operation( oper, Box::new(expr1), Box::new(expr2), ...
Rust
0
= 10 cm /// 3 = 20 cm /// 4 = 50 cm /// 5 = 100 cm /// 6 = 150 cm /// 7 = 180 cm /// /// - SX*# = Maximum soil temperature (tenths of degrees C) /// where * corresponds to a code for ground cover /// and # corresponds to a code for soil depth. ...
Rust
0
# Copyright 2024 Huawei Technologies Co., Ltd # Copyright 2024 The Qwen team, Alibaba Group and The HuggingFace Inc. team. 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...
Python
1
# Saving model and LoRA adapter model.save_pretrained("/content/drive/MyDrive/zephyr-finetuned-bankbot") tokenizer.save_pretrained("/content/drive/MyDrive/zephyr-finetuned-bankbot") adapter_path = "/content/drive/MyDrive/zephyr-bankbot-lora" model.save_pretrained(adapter_path, safe_serialization=True) import os os.env...
Python
1
* [`GL_COLOR_ATTACHMENT19`] /// * [`GL_COLOR_ATTACHMENT2`] /// * [`GL_COLOR_ATTACHMENT20`] /// * [`GL_COLOR_ATTACHMENT21`] /// * [`GL_COLOR_ATTACHMENT22`] /// * [`GL_COLOR_ATTACHMENT23`] /// * [`GL_COLOR_ATTACHMENT24`] /// * [`GL_COLOR_ATTACHMENT25`] /// * [`GL_COLOR_ATTACHMENT26`] /// * [`GL_COLOR_ATTACHMENT27`] /// ...
Rust
0
from __future__ import annotations import requests from .base_provider import AsyncGeneratorProvider, ProviderModelMixin from ..typing import AsyncResult, Messages from ..requests import StreamSession, raise_for_status from ..image import ImageResponse class DeepInfraImage(AsyncGeneratorProvider, ProviderModelMixin)...
Python
1
\ S\x96,A%\xc7\x98w.\xd4$\xf4\xc8\xf9ia\ \xf18\x5cR\x95:\xb5}\xc9E\xa8\xf38\xaf\xb3\xe7\ \xd1omt\xbd\xb6k\xe9#\x89\xc3\xe2h\xafiN\ \x9c\xa3V)7nk^\xcbT\xf6Z\xbb\xdb[\xf7\ <\xa7\xfe\x11\x89\xe6v1Cr\xaa\x8a\xdc>r\xa9\ \xbc*\xc9\xbb?0\x0c\x1br\x8f\xba\xbc\x902\x09\xcf\ \xbf\xf0\xed\xe5\xa4;\x9a%V\x89O;\x982\xae\x0b\ .$e\xd...
Python
1
ues='Revenue', title='Sunburst Chart by Region and Product' ) st.plotly_chart(fig) def main(): st.title('Top 10 Advanced Data Visualizations for FP&A') df = generate_synthetic_data() viz_options = [ 'Waterfall Chart', 'Tornado Chart', 'Marimekko (Treemap)', ...
Python
1
ile True: self.ui.clear_screen() submenu_options = [ "💰 Modifier les prix", "➕ Ajouter des plats au menu", "➖ Retirer des plats du menu", "📊 Analyser la rentabilité par plat", "🍽️ Créer un menu du jour", ...
Python
1
_product_t::<G::Fr>(&f, &r1cs_circuit.CR); let aO = vector_matrix_product_t::<G::Fr>(&f, &r1cs_circuit.CO); let input = Assignment { aL: aL, aR: aR, aO: aO, s: r1_statement, w: witness, }; // create generators // n_max...
Rust
0
0 } else { (*pi).y = ((*pi).y as libc::c_uint) .wrapping_add((*pi).dy.wrapping_sub((*pi).y.wrapping_rem((*pi).dy))) as OPJ_UINT32 as OPJ_UINT32; current_block = 7245201122033322888; break; } current_block = 980989089337379490;...
Rust
0
signature_sha256 = headers.get('X-Hub-Signature-256', '').split('=')[1] generated_sha1 = hmac.new( app_secret_key.encode('utf-8'), data, hashlib.sha1 ).hexdigest() generated_sha256 = hmac.new( app_secret_key.encode('utf-8'), data, hashlib.sha256 ).hexdi...
Python
1
...
Python
1
import unittest import numpy as np import sys import matplotlib.pyplot as plt # IKPy imports from ikpy import chain from ikpy.utils import plot def test_chain(): fig, ax = plot.init_3d_figure() torso_right_arm = chain.Chain.from_urdf_file( "../resources/poppy_torso/poppy_torso.URDF", base_el...
Python
1
OB // ColumnType::MYSQL_TYPE_TINY_BLOB // ColumnType::MYSQL_TYPE_MEDIUM_BLOB // ColumnType::MYSQL_TYPE_LONG_BLOB // ColumnType::MYSQL_TYPE_SET // ColumnType::MYSQL_TYPE_ENUM // ColumnType::MYSQL_TYPE_DECIMAL ...
Rust
0
new_with_span(label, *span)]; labels.extend(correlated.labels()); labels }, } } } #[derive(Clone, Debug)] enum CompositeKind { Span(SourceSpan), Correlated { span: SourceSpan, correlated: CorrelatedSourceSpan, }, } #[derive(Clone, Deb...
Rust
0
assert_eq!(empty, ModOff::parse("")?); Ok(()) } #[test] fn parse_good() -> Result<()> { assert_eq!( vec![ModOff::new("foo.exe", 0x4141)], ModOff::parse("foo.exe+4141")? ); Ok(()) } #[test] fn parse_good_multiple_unix() -> Result<()> { ...
Rust
0
.inner.span() } } impl<'a> From<&KeyValueProp<'a>> for Node<'a> { fn from(node: &KeyValueProp<'a>) -> Node<'a> { let node = unsafe { mem::transmute::<&KeyValueProp<'a>, &'a KeyValueProp<'a>>(node) }; Node::KeyValueProp(node) } } impl<'a> NodeTrait<'a> for KeyValueProp<'a> { fn parent(&self) -> Option<...
Rust
0
"""Base url routes. This module also dynamically adds url routes to applications present in INSTALLED_APPS; see the comments below. URLs ---- / about/ add_project/ project/ """ from django.conf.urls import patterns, include, url from base import views project_slug = r'^projects/(?P<project_slug>[\w-]+)/' urlpat...
Python
1
}; let shell_data_z = shell_data.clone(); let xdg_shell_global = display.create_global( 3, Filter::new(move |(shell, _version), _, dispatch_data| { self::xdg_handlers::implement_wm_base(shell, &shell_data, dispatch_data); }), ); let zxdgv6_shell_global = displ...
Rust
0
(); println!("{:2}: {} (0x{:x})", min, msize, msize); } c::set_sim_flash_align(old_align); } use structopt::StructOpt; #[derive(Debug, StructOpt)] #[structopt( name = "Analog Clock", about = " Key bindings: 'q' : quit '-' : decrease clock width '='/'+' : increase clock width 'j'...
Rust
0
#!/usr/bin/python3 """ Module for FileStorage class """ import json from models.base_model import BaseModel from models.user import User from models.state import State from models.city import City from models.place import Place from models.amenity import Amenity from models.review import Review class FileStorage: ...
Python
1
patches"]["percentage"]:.2f}%)' ) print( f'Number of error lines: {result["errors"]["total"]} / {result["total_instances"]} ({result["errors"]["percentage"]:.2f}%)' ) print( f'Number of agent stuck in loop: {result["errors"]["stuck_in_loop"...
Python
1
able), context, )?; } gen.generate_empty_node(InsertionPointType::Append); if ast::opr::assoc(&this.operator) == Assoc::Right { gen.reverse_children(); } Ok(( Node { kind: if is_last { kind.clone() } else {...
Rust
0
import numpy as np class MsgPath: ''' Message class that defines a path 'line' paths are defined by airspeed line_origin line_direction 'orbit' paths are defined by orbit center orbit radius orbit direction plo...
Python
1
ce(str(input_path), str(output_path))) with open(curr_output / "completions.json", "w") as f: json.dump(data, f, indent=4) with open(curr_output / "metrics.json", "w") as f: json.dump(metrics, f, indent=4) if len(all_files) == 1: print(f"Saved classified co...
Python
1
108.0), City::new(2698, "Croatia", "Senj", 44.9894444, 14.9058332, 70.0), City::new(2699, "Croatia", "Ivanec", 46.2230556, 16.1200008, 233.0), City::new(2700, "Croatia", "Jastrebarsko", 45.6683333, 15.6486111, 150.0), City::new(2701, "Croatia", "Darda", 45.6280556, 18.6997223, 97.0), City::new(2702, "Croatia", "B...
Rust
0
#!/usr/local/bin/python3 from Crypto.Util.number import isPrime def RSAaaS(): try: print("Welcome to my RSA as a Service! ") print("Pass me two primes and I'll do the rest for you. ") print("Let's keep the primes at a 64 bit size, please. ") while True: p = input("Inp...
Python
1
:param team_pattern: Compiled regex pattern of team name/city :param team: Name of the team that is being searched for :param sport: Sport that is being searched for :return: List containing raw data of team """ team_url = None team_name = None for link in soup.find_all('a'): if ...
Python
1
ce { #[serde(flatten)] pub resource: Resource, #[doc = "Workspace properties."] #[serde(default, skip_serializing_if = "Option::is_none")] pub properties: Option<WorkspaceProperties>, #[doc = "The ETag of the workspace."] #[serde(rename = "eTag", default, skip_serializing_if = "Option::is_no...
Rust
0
a, b| a.max(b.clone())) } } /// A finite element representing quadratic basis functions on a triangle, in two dimensions. /// /// The reference element is chosen to be the triangle defined by the corners /// (-1, -1), (1, -1), (-1, 1). This perhaps unorthodox choice is due to the quadrature rules /// we employ. #[...
Rust
0
nd contrast == 0 and temperature == 0 and tint == 0 and saturation == 0: return img if exposure != 0: exposure_factor = 1 + (exposure / 100.0) enhancer = ImageEnhance.Brightness(img) img = enhancer.enhance(exposure_factor) if contrast != 0: c...
Python
1
import machine import time import uctypes # Define shift register input, reset, and clock pin numbers shift_register_input_pin_num = 9 shift_register_reset_pin_num = 8 shift_register_clock_pin_num = 7 DFRTP1_3_register_out_pin_num = 4 DFXTP1_1_register_out_pin_num = 3 # Initialize GPIO pins shift_register_input_pin =...
Python
1
join(data_folder, fname)) text_processor = TextPreprocessor( text_col=text_col, n_cpus=1, maxlen=10, max_vocab=50 ) X_text = text_processor.fit_transform(df) chunk_text_processor = ChunkTextPreprocessor( text_col=text_col, n_chunks=1, n_cpus=1, maxlen=10, max_vocab=50 ) chunk_te...
Python
1
# import sys # sys.stdin = open('sample_input (2).txt') dij = [[0,1],[1,1],[1,0],[1,-1],[0,-1],[-1,-1],[-1,0],[-1,1]] T = int(input()) for tc in range(1, T+1): N = int(input()) arr = [list(input()) for _ in range(N)] print(f'#{tc}', end=' ') ans = [] for i in range(N): for j in range(N): ...
Python
1
tion") st.markdown("Get accurate, detailed information about Palestine's history, current events, and humanitarian issues.") user_question = st.text_input("", placeholder="Type your question about Palestine here...") # Add a submit button for better UX submit_button = st.button("Get Answer") ...
Python
1
# When the turtle lifts up the pen, nothing is drawn on # the "ground" when the turtle moves around. # # This example is the same as the previous example, but # the pen is taken off the ground at various places. import turtle turtle.width(5) # Tell the turtle to turn left 5 degrees turtle.left(5) # Lift up the pe...
Python
1
write magic string FWFW // And then 32 bit unsigned version of the regressor output_bufwriter.write_all(REGRESSOR_HEADER_MAGIC_STRING)?; output_bufwriter.write_u32::<LittleEndian>(REGRESSOR_HEADER_VERSION)?; Ok(()) } fn load_regressor_without_weights(input_bufreader: &mut io::BufReader::<File>) ...
Rust
0
#[cfg(all( any(target_arch = "x86_64", target_arch = "x86"), target_feature = "sse2" ))] c.bench_function("memx_memcmp_sse2", |b| { b.iter(|| { let _r = process_memx_memcmp_sse2(black_box(&vv), black_box(&pat_string)); }) }); } criterion_group! { name = b...
Rust
0
doc = "Bit 0 - This restarts FFE code execution following a pause due to reaching a 'break point'."] #[inline(always)] pub fn ffe0_bp_cont(&mut self) -> FFE0_BP_CONT_W { FFE0_BP_CONT_W { w: self } } #[doc = "Bit 1 - This is a single, host controlled input toggle signal, Break Point Match Continu...
Rust
0
numOvls = self["header"]["arm9_overlay_size"].value // (8 * 4) for i in range(numOvls): yield Overlay(self, "arm9_overlay[]") # files if self["header"]["fat_size"].value > 0: for field in self["fat_content"]: if field["end"].value > f...
Python
1
mut messages); state.merge_bookmarks().unwrap(); let mut vec: Vec<u32> = dst.bookmarks.iter().map(|b| b.slot).collect(); vec.sort(); if !messages.is_empty() { Err(messages) } else { Ok(vec) } } assert...
Rust
0
E def _filter_unecessary( self, schema: Dict[str, Any], path: Sequence[str] ) -> Dict[str, Any]: return { key: value for key, value in schema.items() if not self._is_unecessary([*path, key]) } def _handle_simple_dict(self, value: dict, path: Sequ...
Python
1
fn target_record_stack_bounds(stack_lo: usize, stack_hi: usize) { // stack range is at TIB: %gs:0x08 (top) and %gs:0x10 (bottom) asm!("mov $0, %gs:0x08" :: "r"(stack_hi) :: "volatile"); asm!("mov $0, %gs:0x10" :: "r"(stack_lo) :: "volatile"); } } /// Records the cur...
Rust
0
` reader - DMA Destination Address Mode"] pub struct DMA_ADDR_MODE_R(crate::FieldReader<bool>); impl DMA_ADDR_MODE_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { DMA_ADDR_MODE_R(crate::FieldReader::new(bits)) } #[doc = r"Get enumerated values variant"] #[inline(always)] pu...
Rust
0
: *mut ::std::os::raw::c_int, all_inside: *mut ::std::os::raw::c_int, indx: *mut ::std::os::raw::c_int, ); } extern "C" { pub fn R_max_col( matrix: *mut f64, nr: *mut ::std::os::raw::c_int, nc: *mut ::std::os::raw::c_int, maxes: *mut ::std::os::raw::c_int, ...
Rust
0
invalid() { // Valid matrix: {"nrows":6,"ncols":3,"col_offsets":[0,2,2,5],"row_indices":[0,5,1,2,3],"values":[0,1,2,3,4]} assert!(serde_json::from_str::<CscMatrix<i32>>(r#"{"nrows":6,"ncols":3,"col_offsets":[0,2,2,5],"row_indices":[0,5,1,2,3],"values":[0,1,2,3,4]}"#).is_ok()); assert!(serde_json::from_str::...
Rust
0
ice> { let component_id = TypeId::of::<TComponent>(); let components_read_guard = self.components.read().await; let component = components_read_guard.get(&component_id); if component.is_none() { return Err(MapComponentError::ComponentNotFound{ type_info: TypeInfo::from_type...
Rust
0
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Python
1
/// Pre-Trading #[serde(rename = "1")] PreTrading, /// Opening or opening auction #[serde(rename = "2")] OpeningOrOpeningAuction, /// (Continuous) Trading #[serde(rename = "3")] Trading, /// Closing or closing auction #[serde(rename = "4")] ClosingOrClosingAuction, /// Post-Trading #[serde(rename = "5")]...
Rust
0
self as &mut ::std::any::Any } fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> ActivationMetadata { ActivationMetadata::new() ...
Rust
0
################################################## def DiT_XH(**kwargs): return DiT(depth=36, n_emb=1760, num_heads=32, **kwargs) def DiT_H(**kwargs): return DiT(depth=32, n_emb=1280, num_heads=16, **kwargs) def DiT_XL(**kwargs): return DiT(depth=28, n_emb=1152, num_heads=16, **kwargs) def DiT_L(**kwargs...
Python
1
EraseMode::Full = erase { self.flash_erase()?; } const SECTOR_SIZE_0: usize = 0x2000; const SECTOR_SIZE_1: usize = 0x10000; const SECTOR_SIZE_1_ADDR: usize = 0x10000; let n = info.rom_banks as usize * ROM_BANK_SIZE as usize; let mut pb = new_progress_bar(n a...
Rust
0
) - start)) # print(tabulate.tabulate(metrics, headers='keys', tablefmt="latex")) # # model = load_model('models/keras_1_step_lane_data_3002_3001.csv_sensor5.h5') print("Loading impute data") predict_data = load_data(file_path, EPS, use_datetime=True, load_from=datetime(2013, 4, ...
Python
1
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ upstream/apc/hubconf.py ] # Synopsis [ the apc torch hubconf ] # Author [ S3PRL ] # Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ] """******************...
Python
1
# Author: Jinwei Lin # Time: 06, Apirl, 2024 import bpy import pathlib import os import argparse def lessMeshes(): # Remove the default cude # ------------------------------------------------------------------------------- bpy.ops.object.delete(use_global=False, confirm=False) # Import the specif...
Python
1
install_prefix = "" if install_path: if not os.path.isabs(install_path): install_path = os.path.abspath(install_path) install_prefix = f"-DCMAKE_INSTALL_PREFIX={install_path}" # compile multithreaded -- how many threads? try: n_cpu = len(os...
Python
1
am> = "b_Lights", shadow: gfx::TextureSampler<f32> = "t_Shadow", out_color: gfx::RenderTarget<ColorFormat> = "Target0", out_depth: gfx::DepthTarget<DepthFormat> = gfx::preset::depth::LESS_EQUAL_WRITE, } pipeline shadow { vbuf: gfx::VertexBuffer<Vertex> = (), ...
Rust
0
_FROM_DIRECTORY_PROMPT, "args_schema": DirectoryPath, }, { "mode": "search_issues_and_prs", "name": "Search issues and pull requests", "description": SEARCH_ISSUES_AND_PRS_PROMPT, "args_schema": SearchIssuesAndPRs, ...
Python
1
.takes_value(true) .help("Sepcify which branch to checkout. If no brach is given the repo's `HEAD` branch is used."), Arg::with_name("source") .long("source").short("s") .takes_value(true) .default_value("github") .possible_values(&["gi...
Rust
0
variable. (Ok(ref val), Some(_), Some(default)) if val == "" => { default.as_str().to_owned() } // A set environment variable. (Ok(val), _, _) => val, // An unset environment with a default value provided. ...
Rust
0
("Nombre:", "entry_nombre"), ("Correo:", "entry_correo"), ("Contraseña:", "entry_pass"), ("Teléfono:", "entry_tel") ] entries = {} for i, (label, name) in enumerate(fields): ttk.Label(reg_form, text=label).grid(row=i, column=0, sticky=...
Python
1
ORE_FAST', 125) # Local variable number haslocal.append(125) def_op('DELETE_FAST', 126) # Local variable number haslocal.append(126) def_op('RAISE_VARARGS', 130) # Number of raise arguments (1, 2, or 3) def_op('CALL_FUNCTION', 131) # #args def_op('MAKE_FUNCTION', 132) # Flags def_op('BUILD_SLICE', ...
Python
1
type>", wp::SectionCode::Import => "<import>", wp::SectionCode::Function => "<function>", wp::SectionCode::Table => "<table>", wp::SectionCode::Memory => "<memory>", wp::SectionCode::Global => "<global>", wp::SectionCode::Export => "<export>", ...
Rust
0
ed. It /// receives the value of the radio and must produce a `Message`. /// /// [`Radio`]: struct.Radio.html pub fn new<F, V>(value: V, label: &str, selected: Option<V>, f: F) -> Self where V: Eq + Copy, F: 'static + Fn(V) -> Message, { Radio { is_selected:...
Rust
0
// Print offset print!("{:04X}: ", from); // Print hex bytes for n in from..from + bytes { match buf.get(n) { Some(x) => print!("{:02X} ", x), None => print!(" "), } } // Print ascii bytes print!(" "); for n in from..from + bytes { matc...
Rust
0