text
string
label_name
string
labels
int64
self, output: &mut [u8], data: u32) { let output = array_mut_ref![output, 0, Record::NO_REF_LEN + Reference::U32_LEN]; #[allow(clippy::ptr_offset_with_cast)] let (counter_out, tag_out, name_out, reference_out) = mut_array_refs![output, 2, 2, 64, Reference::U32_LEN]; *counter_...
Rust
0
# Generated by Django 4.2.4 on 2024-02-16 04:57 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('User', '0003_userprofile_following_alter_userprofile_followers'), ] operations = [ migrations.AddField( ...
Python
1
"): show_saldo(data) with st.expander("Show Loans"): show_loans(data) with st.expander("Income Breakdown"): show_breakdown(income=True) with st.expander("Expense Breakdown"): show_breakdown(expense=True) # Use st.expander to hide sections with st.expander("Change ...
Python
1
{0x727e5360ad6509d6, "f9z56s5edn4x", 55.437646016, -57.541490887}, {0x8918ac9b2ac51b1d, "j4dbt6tbsnej", -75.8357548, 49.105972725}, {0x4a039b45f13e827c, "981tqjgj7u17", 0.955360555, -110.122670401}, {0x727f49edf574b4db, "f9znmvgpfkue", 55.975324948, -57.399341693}, {0x3d08eee88d...
Rust
0
lf, node: &IdxNode) -> Result<u32> { let node_offset = node.get_ref().downs_get(0); let mut mx = if !node_offset.is_zero() { let node1 = self.read_node(node_offset)?; self.height(&node1)? } else { 0 }; for i in 1..node.get_ref().downs_len() { ...
Rust
0
import openai import pandas as pd import time import logging # Your API key openai.api_key = "sk-" openai.base_url = "https://api.gpt.ge/v1/" openai.default_headers = {"x-foo": "true"} #assign experts for target target_role_map = { "萝卜快跑": "自动驾驶与交通分析专家", "预制菜": "食品科学家", "iphone15": "科技分析师", "不婚主义": ...
Python
1
keyword in the PeriodArray constructor is deprecated" with tm.assert_produces_warning(FutureWarning, match=msg): res = PeriodArray(data, freq="M") expected = PeriodArray(data, dtype="period[M]") tm.assert_equal(res, expected) def test_period_array_from_datetime64(): arr = np.array( [...
Python
1
# Copyright (C) 2022-2025 Intel Corporation # LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE import io from iai_core.adapters.binary_interpreters import NumpyBinaryInterpreter, RAWBinaryInterpreter class TestBinaryInterpreters: def test_raw_binary_interpreter(self) -> None: """ <b>Description:</b> ...
Python
1
{ /// The tag of the request pub tag: ReqTag, /// The rpc context carried in the request pub context: kvrpcpb::Context, /// The first range of the request pub first_range: Option<coppb::KeyRange>, /// The length of the range pub ranges_len: usize, /// The deadline of the request...
Rust
0
# Copyright 2023 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 wri...
Python
1
h pub commit_author: String, } impl Git { fn git2_time_to_datetime(time: git2::Time) -> DateTime<Local> { Utc.timestamp(time.seconds(), 0).with_timezone(&Local) } fn get_commit_diff<'a>(repo: &'a Repository, c: &Commit) -> Option<git2::Diff<'a>> { if c.parent_count() > 1 { ...
Rust
0
domain=domain, ) print(f"Generating manifests: {src_lang}-{tgt_lang}...") aud_manifest_fn = os.path.join( args.proc_epst_dir, "aud_manifests", f"{src_lang}-{tgt_lang}", f"test_{domain}_{src_lang}_{tgt_lang}...
Python
1
eakable Formation (RNA) 29 4 Legion's Landing (XLN) 22 1 Island "; let total = 100000; let input = Input { code: code.to_string(), runs: total, on_the_play: true, mulligan_down_to: 5, mulligan_on_lands: vec![0, 1, 6, 7]....
Rust
0
1: i32) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> { // class.path == "javax/crypto/KeyAgreement", java.flags == PUBLIC | FINAL, .name == "generateSecret", .descriptor == "([BI)I" unsafe { let __jni_args = [__jni_bindgen::...
Rust
0
TocEntryType = -1; pub const GST_TOC_ENTRY_TYPE_INVALID: GstTocEntryType = 0; pub const GST_TOC_ENTRY_TYPE_TITLE: GstTocEntryType = 1; pub const GST_TOC_ENTRY_TYPE_TRACK: GstTocEntryType = 2; pub const GST_TOC_ENTRY_TYPE_CHAPTER: GstTocEntryType = 3; pub type GstTocLoopType = c_int; pub const GST_TOC_LOOP_NONE: GstToc...
Rust
0
f64 - dist_percent) + 1.0; let circle1 = Circle::new(V2::new(x1, y1), r1).expect("Should succeed"); let circle2 = Circle::new(V2::new(x2, y2), r2).expect("Should succeed"); prop_assert!(circle_circle_test(&circle1, &circle2), "{:?} {:?}", circle1, circle2); } } propt...
Rust
0
-label"))); ..set_margin_end(6); }; let check = cascade! { Button::with_label(&fl!("check-label")); ..style_context().add_class(&STYLE_CLASS_SUGGESTED_ACTION); ..set_sensitive(false); }; let hash_label_clone = hash_label.clone(); ...
Rust
0
", ">=1.2.0 <3.5.0-0"], single_sided_only_major => ["1", ">=1.0.0 <2.0.0-0"], single_sided_lower_equals_bound => [">=1.0.0", ">=1.0.0"], single_sided_lower_equals_bound_2 => [">=0.1.97", ">=0.1.97"], single_sided_lower_bound => [">1.0.0", ">1.0.0"], single_sided_upper_equals_bou...
Rust
0
from langchain_core.tools import tool import datetime as dt import streamlit as st import yfinance as yf import tickers as ti import pandas as pd #Tool for langchain_core : had problems parsing the date @tool def tool_analyze_idb_rs_rating(tool_start_date : dt.date, tool_end_date : dt.date): '''This tool allows...
Python
1
-iNEqQZZ-sjKn-W-N1F-pzy\ c-xP5eWz-LmsCiCcZ", "ih-DlPR-PE", "Krf-362", "WzaD", "EPaOnB-gHHn", "XYta", "NZ-RgOO-tR", "at-FE", "Tpc-693", "YFp", "gRQrQULo", "pVomZ-585", "laSu-ZcAq-338", "gCW", "PydSwHRI-TYfF", "zKmWDD", "X-bCrL5RL", "HK", "YMKGcLY", "GDJ-nHYa-bw-X-ke-rohH5GfS-LdJK...
Rust
0
- Matrix is not positive definite. // #[deprecated] // pub fn cholesky(&self) -> Result<Matrix<T>, Error> { // assert!(self.rows == self.cols, // "Matrix must be square for Cholesky decomposition."); // let mut new_data = Vec::<T>::with_capacity(self.rows() * self.cols()); // ...
Rust
0
r::NulError(path.to_owned()))?; let newpeer = ngm_mkpeer::from((nodetype, ourhook, peerhook)); let pnewpeer: *const ngm_mkpeer = &newpeer; // send the makepeer command unsafe { ng_send_msg(csock, &cpath, NGM_GENERIC_COOKIE as c_int, NGM_MKPEER as c_int, pnewpeer as *const c_void, size_of::<ngm_mkpeer>(...
Rust
0
# aggressive_mix 전략 조합 configs 패키지 from .aggressive_mix_config import AGGRESSIVE_MIX_CONFIG, AggressiveMixConfig
Python
1
cancel: Arc<AtomicBool>, } impl Explorer { pub fn new(config: ExplorerConfig, cancel: Arc<AtomicBool>) -> Self { Self { border_tiles: Vec::new(), tile_pos_path: VecDeque::new(), find_path_layer: None, border_tiles_layer: None, config, ...
Rust
0
# coding: utf-8 """ SendinBlue API SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h...
Python
1
import cv2 import numpy as np import pyautogui import keyboard import time import socket from tkinter import Tk, Canvas # 设置超时时间和最大重试次数 timeout = 1000 max_retries = 3 # 热键 hotkey = 'F12' # # TCP # tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # tcp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDB...
Python
1
e_distribution(transactions) with cols[1 % len(cols)]: # 交易時間分佈圖 TradingComponents._render_time_distribution(transactions) @staticmethod def _render_volume_distribution(transactions: List[Dict[str, Any]]) -> None: """渲染交易量分佈圖""" # 提取交易量數據 volumes = [t.ge...
Python
1
` reader - State of OUT Endpoint 2."] pub struct OUT_EP2_STATE_R(crate::FieldReader<u8, u8>); impl OUT_EP2_STATE_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { OUT_EP2_STATE_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for OUT_EP2_STATE_R { type Target = crate::FieldRe...
Rust
0
# Copyright (c) 2024, Alibaba Group; # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, ...
Python
1
MAIN_KEY_SALT), &seed.0)?; Ok(Self { main: Main::from(&hkdf_extract[..32]), }) } /// Getter for Main pub fn main(&self) -> &[u8] { &self.main.0[..] } /// Derive a particular PrivateKey at a certain ChildNumber /// /// Note that the function below adher...
Rust
0
self, request_url=None, http_method=None, params=None): """ Process the authenticated query by summarizing the required attributes of the header and signature based on the secret key :param request_url: URL of the endpoint :param http_method: HTTP method required :param p...
Python
1
("bookmarkBBBB", Bookmark) }), ("toolbar_____", Folder[needs_merge = true, age = 5], { ("bookmarkDDDD", Bookmark), ("bookmarkEEEE", Bookmark), ("bookmarkFFFF", Bookmark), ("bookmarkGGGG", Bookmark[needs_merge = true]), ("bookmarkHHHH", Bookmark...
Rust
0
if trainer.global_step % 100 == 0: # for name, p in pl_module.named_parameters(): # if 'backbone' in name: # self.writer.add_histogram(name, p.clone().detach().cpu().numpy(), trainer.global_step) # if p.grad is None: # ...
Python
1
and do not output any other words. The following are some examples.\n\n{context}\n\n{input}", "samsum": "Summarize the dialogue into a few short sentences. The following are some examples.\n\n{context}\n\n{input}", "lsht": "请判断给定新闻的类别,下面是一些例子。\n\n{context}\n{input}", "passage_count": "There are some paragra...
Python
1
; trace!( "backend processed get, /{:.3}ms/", sw.elapsed().as_secs_f64() * 1000.0 ); if result.is_err() { counter!(CLIENT_GET_ERROR_COUNT_COUNTER, 1); } timing!(CLIENT_GET_TIMER, time.elapsed().as_nanos() as f64...
Rust
0
from rest_framework import permissions from rest_framework.request import Request from rest_framework.views import View class IsAccountExecutive(permissions.BasePermission): def has_permission(self, request: Request, view: View) -> bool: is_authenticated = request.user.is_authenticated has_role_at...
Python
1
nner="y",le="+Inf"} 3255 gitlab_runner_job_duration_seconds_sum{runner="y"} 381111.7498891335 gitlab_runner_job_duration_seconds_count{runner="y"} 3255 "##; assert_eq!( parse(exp), Ok(vec![ Metric { name: "gitlab_runner...
Rust
0
/1000, linestyle='dashed', color='#56B4E9') ax['b'].plot(pers, VoL_t2_invbs/1000, linestyle='dashed', color='#009E73') ax['b'].set_ylabel("Additional cost of uncertainty\n(Trillions of \$)") ax['b'].set_xlabel("Year information is revealed") right = ['a', 'b'] for label in right: # label physical distance in and ...
Python
1
binding variables at 0x02XX // these are used for both ZX_PROTOCOL_USB and ZX_PROTOCOL_USB_FUNCTION keys.push(("BIND_USB_VID".to_string(), 0x0200)); keys.push(("BIND_USB_PID".to_string(), 0x0201)); keys.push(("BIND_USB_CLASS".to_string(), 0x0202)); keys.push(("BIND_USB_SUBCLASS".to_string(), 0x0203...
Rust
0
CT!{struct NMDATETIMECHANGE { nmhdr: NMHDR, dwFlags: DWORD, st: SYSTEMTIME, }} pub type LPNMDATETIMECHANGE = *mut NMDATETIMECHANGE; pub const DTN_USERSTRINGA: UINT = DTN_FIRST2 - 5; pub const DTN_USERSTRINGW: UINT = DTN_FIRST - 5; STRUCT!{struct NMDATETIMESTRINGA { nmhdr: NMHDR, pszUserString: LPCST...
Rust
0
# Copyright (C) 2006-2011 Canonical Ltd # Written by Robert Collins <robert.collins@canonical.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at you...
Python
1
import ray from ray.rllib.utils.annotations import DeveloperAPI @DeveloperAPI class FilterManager: """Manages filters and coordination across remote evaluators that expose `get_filters` and `sync_filters`. """ @staticmethod @DeveloperAPI def synchronize(local_filters, remotes, update_remo...
Python
1
, n_temporal def cross_KxK_heter(mem_shape, K): """ Parameters ---------- mem_shape K Returns ------- cuboid_hw shift_hw strategy n_temporal """ T_mem, H, W, _ = mem_shape K = min(K, H, W) cuboid_hw = [(K, K), (K, K), (K, K)] shift_hw = [(0, 0), (0, 0)...
Python
1
)] impl ::core::marker::Copy for DebugStackFrameDescriptor64 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DebugStackFrameDescriptor64 { fn clone(&self) -> Self { *self } } pub const DefaultDebugSessionProvider: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 22020...
Rust
0
@param {&str} text * @param {FancyRegex} regexp * @param {Vec<Container>} containers * @return {Vec<Match>} */ pub fn match_str (text: &str, regexp: FancyRegex, containers: Vec<Container>) -> Vec<Match> { let mut matches: Vec<Match> = vec![]; if !regexp.is_match(text).unwrap() { return matches; ...
Rust
0
# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn from mmcv.cnn.bricks import ConvModule from mmcv.runner import BaseModule from ..backbones.resnet import Bottleneck, ResLayer from ..builder import NECKS @NECKS.register_module() class HRFuseScales(BaseModule): """Fuse feature map of multiple ...
Python
1
import sys from struct import unpack from binascii import unhexlify, hexlify def getLongLE(d, a): return unpack('<L',(d)[a:a+4])[0] #600d 1.0.1 0xff800000 base offset = 0x10f7ac offset3 = 0x1ed720 #60d 1.0.9 ? 0xff800000 base #offset = 0x209c4 #offset3 = 0xa611c #550d 1.0.8 0xff000000 base offset = 0x6ca90c of...
Python
1
m mat4 model; void main() { gl_Position = camera*model*vec4(position,1.0); o_normal = normal; o_uv = uv; } "#, fragment_shader: r#"#version 300 es precision highp float; out vec4 color; in vec2 o_uv; in vec3 o_normal; ...
Rust
0
))(&binary[..]) .or_else(|_| bail!("could not parse private key"))?; let (_, mut pubparts) = terminated(ssh_record, eof)(pubblob) .or_else(|_| bail!("could not parse public part of private key"))?; let mut secrets = enciphered.to_owned(); let blocksize = if cipher_params.is_some() { 16 } e...
Rust
0
into() }) } } impl ops::Deref for Identifier { type Target = str; fn deref(&self) -> &str { &self.value } } impl PartialEq for Identifier { fn eq(&self, other: &Identifier) -> bool { identifier_eq(&self.value, &other.value) } } impl fmt::Display for Identifier { fn fmt(&self, fmt:...
Rust
0
type="int", default=10) (options, args) = parser.parse_args() # # if (options.outfile is not None): sys.stdout = open(options.outfile, 'w') # #global p_value #global error_rate #global least_cov #global dynamicP # # # ====================== glob...
Python
1
let func_output = assets_data_dir(); assert!(func_output.is_ok()); assert_eq!(func_output.unwrap().into_os_string().is_empty(), false); } #[test] fn logs_dir_macos_works() { assert_eq!(logs_dir().into_os_string().is_empty(), false); } } <gh_stars>0 //! Trait exposing functio...
Rust
0
URRSSUR55nSU;aUR US5US'U$)KReturn information about the options for positioning this widget in a grid.rrHrr)rdrs r grid_infoGrid.grid_info rrr,Nrirj...
Python
1
spawn(|_| { vec.push(future.rayon_wait().unwrap()); }); // just because }); assert_eq!(vec![44], vec); } /// Test what happens when the thread-pool is dropped but there are /// still active asynchronous tasks. We expect the thread-pool to stay /// alive and executing until those threads ar...
Rust
0
ard, terminal, info = self.eval_env.step(action.flatten()) episode_reward += reward episode_cost += info.get('cost', 0) cost_state -= info.get('cost', 0) cost_state = max(cost_state, 0.0) episode_length += 1 obs = next_obs if terminal...
Python
1
e(()); let scheduler = components::sched::round_robin::RoundRobinComponent::new(&PROCESSES) .finalize(components::rr_component_helper!(NUM_PROCS)); let platform = Platform { button, ble_radio, ieee802154_radio, pconsole, console, led, gpio, ...
Rust
0
if let Ok(mut cache) = self.mutex.lock() { cache.insert(key.clone(), result.clone()); } } result } } impl<K, T> Cache<K, T> where T: Clone, K: Hash + Eq + Clone, { pub fn set(&self, key: K, value: T) { self.mutex .lock() ...
Rust
0
from datetime import datetime from app import db class Depense(db.Model): """Modèle représentant une dépense liée à un bien immobilier. Ces dépenses sont généralement imputées au bailleur. """ __tablename__ = 'depenses' id = db.Column(db.Integer, primary_key=True) agence_id = db.Column(db.Inte...
Python
1
.human.save(os.path.join(path,name)) if format == "OBJ": mhapi.exports.exportAsOBJ(name + ".obj") if format == "DAE": mhapi.exports.exportAsDAE(name + ".dae") if format == "FBX": mhapi.exports.exportAsFBX(name + ".fbx") if f...
Python
1
line_start_idx: 0, peeked: None } } #[inline] pub const fn location(&self) -> Location { Location { line: self.line, column: self.idx.saturating_sub(self.line_start_idx) + 1 } } pub fn peek_token(&mut self) -> Option<Result<&Token...
Rust
0
import bpy from bpy.props import IntProperty, FloatProperty, StringProperty, EnumProperty, BoolProperty from sverchok.node_tree import SverchCustomTreeNode from sverchok.data_structure import updateNode import topologic from topologic import Vertex, Edge, Wire, Face, Shell, Cell, CellComplex, Cluster, Topology, Dictio...
Python
1
ER_U8 => { bytes.push(value | VAR_UINT_END); } _ => { bytes.push((value >> 7) & VAR_UINT_CONTINUE); bytes.push(value | VAR_UINT_END); } } } pub(crate) fn append_var_uint_u16(bytes: &mut Vec<u8>, value: u16) { // Serialization of VarUInts with reasonab...
Rust
0
ngle] pub unsafe extern "C" fn strnlen(s: *const c_char, size: size_t) -> size_t { let mut i = 0; while i < size { if *s.add(i) == 0 { break; } i += 1; } i as size_t } #[no_mangle] pub unsafe extern "C" fn strnlen_s(s: *const c_char, size: size_t) -> size_t { if ...
Rust
0
nks: &'static [Hyperlink], header: &'static CvHeader, img_dim: usize, } impl Default for IndexTemplate { fn default() -> Self { Self { links: &NAV, header: &CVDATA.header, img_dim: 32, } } } #[derive(Template)] #[template(path = "blog.html")] pub str...
Rust
0
) ] ), bytes((0x00, 0b11110100, 0x00, 0xFF)), ), ( AcControlMessage( ac_control=[ AcControlData( ac_number=0, power=AcPowerControl.UNCHANGED, ...
Python
1
ugeValue { /// Sets the value of the gauge to this value. Absolute(f64), /// Increments the value of the gauge by this much. Increment(f64), /// Decrements the value of the gauge by this much. Decrement(f64), } impl GaugeValue { /// Updates an input value based on this gauge value. pub ...
Rust
0
io_device .lock() .expect("Poisoned lock") .as_mut_any() .downcast_mut::<Balloon>() .unwrap() .update_stats_polling_interval(stats_polling_interval_s)?; } Ok(()) } else...
Rust
0
normalized to gridspace gain ai = torch.arange(na, device=targets.device).float().view(na, 1).repeat(1, nt) # same as .repeat_interleave(nt) targets = torch.cat((targets.repeat(na, 1, 1), ai[:, :, None]), 2) # append anchor indices g = 0.5 # bias off = torch.tensor([[0, 0], ...
Python
1
e Hash = <node_runtime::Runtime as srml_system::Trait>::Hash; type Hashing = <node_runtime::Runtime as srml_system::Trait>::Hashing; type AccountId = <node_runtime::Runtime as srml_system::Trait>::AccountId; type Lookup = <node_runtime::Runtime as srml_system::Trait>::Lookup; type Header = <node_runtime...
Rust
0
s that contours will result in closed polygons let grid = point_cloud( model.grid, model.grid, win.left() * 1.25, win.right() * 1.25, win.bottom() * 1.25, win.top() * 1.25, ); let elevation_fn = ridged_elevation_fn(&model.topo_opts); let triangles = calc_triangles(elevation_fn, grid); ...
Rust
0
{ #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: ALTOUTPADEN_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Alternate Output 0"] #[inline(always)] pub fn out0(self) -> &'a mut W { self.variant(ALTOUTPADEN_A::OUT0)...
Rust
0
rid if num_processes == 1: run_block(grid, out_dir, dataset, model, seed) else: run_exps(num_processes, grid, out_dir, dataset, model, seed) if __name__ == '__main__': out_file = sys.argv[1] out_dir = sys.argv[2] num_processes = int(sys.argv[3]) dataset_name = sys.argv[4] mo...
Python
1
ew Roman') for label in labels] # axes_2.plot( # step[0, :], step[1, :], # linestyle=linestyle[k], # color=colors[opt_name], # linewidth=2) # axes_2.set_xlim([0.85, 1.25]) # axes_2.set_ylim([0.85, 1.5]) # axes_2.tick_params(labelsize=fonts...
Python
1
turn self.value class ChromosomeLocation(Enum): MACRONUCLEAR = "macronuclear" NUCLEOMORPH = "nucleomorph" MITOCHONDRION = "mitochondrion" KINETOPLAST = "kinetoplast" CHLOROPLAST = "chloroplast" CHROMOPLAST = "chromoplast" PLASTID = "plastid" VIRION = "virion" PHAGE = "phage" PR...
Python
1
et{Type}ArrayRegion to set the contents of the java array from \[start .. start + elements.len()) fn set_region(&self, start: usize, elements: &[T]); /// Uses env.New{Type}Array + Set{Type}ArrayRegion to create a new java array containing a copy of "elements". fn from<'env>(env: &'env Env, elements: &[T]) ...
Rust
0
. pub n: u8, /// PLL output divisor. pub divisor: u8, } /// MCU clock configuration. #[derive(Copy)] pub struct Clock { /// Clocking source. pub source: ClockSource, /// PLL configuration. pub pll: Option<PLL0>, } // TODO(farcaller): move to peripheral_clock? static mut SystemClock: u32 = 0; /// Return...
Rust
0
&mut ptr, ); &*ptr } } pub fn get_mixer_source_paired_balance(&self, mixer: usize) -> &[u8; 20] { unsafe { let mut ptr = std::ptr::null_mut() as *const [u8; 20]; hinawa_sys::hinawa_snd_motu_register_dsp_parameter_get_mixer_source_paired_balance( ...
Rust
0
num_steps = 6000 dt = 0.01 positions, delta_energy = system.integrate(dt, num_steps,save_positions=True) class Canvas: def __init__(self): self.canvasX = 0 self.canvasY = 0 def move(self, dx, dy): self.canvasX += dx self.canvasY += dy ...
Python
1
"""added player stats Revision ID: 6191c665b885 Revises: ef76950d6c07 Create Date: 2024-05-20 15:33:29.729492 """ from alembic import op import sqlalchemy as sa from src.model.player import Player from src.model.player_stats import PlayerStats # revision identifiers, used by Alembic. revision = '6191c665b885' down_...
Python
1
], Length::from(0x80u8).encode_to_slice(&mut buffer).unwrap() ); assert_eq!( &[0x81, 0xFF], Length::from(0xFFu8).encode_to_slice(&mut buffer).unwrap() ); assert_eq!( &[0x82, 0x01, 0x00], Length::from(0x100u16).encode_to_slice(...
Rust
0
import json import pandas as pd import requests from flask import Blueprint, redirect, render_template, request from .auth_admin import admin_login_required from .config import CONFIG_FILE, get_csv_file_path, get_spreadsheet_link from .send_emails import send_email_to_everyone, send_email_to_selected bp = Blueprint(...
Python
1
12: "Mixed Attack" } return methods.get(method, "Unknown") def launch_master_node(self): print(f"\n{Colors.GREEN}🚀 Запуск Master Node (Командный центр)...{Colors.END}") print(f"{Colors.YELLOW}Master Node будет управлять всеми подключенными ботами{Colors.END}") ...
Python
1
s = 131072; pub const VmaAllocationCreateFlagBits_VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT: VmaAllocationCreateFlagBits = 65536; pub const VmaAllocationCreateFlagBits_VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT: VmaAllocationCreateFlagBits = 131072; pub const VmaAllocationCreateFlagBits_VMA_ALLOCATION_CREAT...
Rust
0
569e-06, 0.14293577249119244, 2794.531827932675, 93528671.31952812, 6215821967224.52, -1.174086323572049e-05, 0.1429501325944908, 3139.4804810720925, 118031680.16618933, -6466892421886.174, -2.1188265307407812e-05, 0.1477108290912869, 3644.1133424610953, 153900132.623...
Python
1
mod tests { use crate::{ lm_ots::parameters::LmotsAlgorithm, lms::{ definitions::InMemoryLmsPublicKey, keygen::{generate_private_key, generate_public_key}, parameters::LmsAlgorithm, signing::{InMemoryLmsSignature, LmsSignature}, SeedAndLms...
Rust
0
"""The models subpackage contains definitions for the following model architectures: - `ResNeXt` for CIFAR10 CIFAR100 You can construct a model with random weights by calling its constructor: .. code:: python import models resnext29_16_64 = models.ResNeXt29_16_64(num_classes) resnext29_8_64 = models.ResNeX...
Python
1
und(sb_dbg, 4), # "pos": round(pos_dbg, 4), # "tiny": round(tiny_dbg, 4), # "TOTAL(anchor_score期待値)": round(total, 4), # }) # ===== ◎候補抽出(既存ロジック維持) cand_sorted = sorted(active_cars, key=lambda n: anchor_score(n), reverse=True) C = cand_sorted[:min(3, len(cand_sorted))] ratings_sorted2 = ...
Python
1
import itertools # {{{ b1, b2, b3 = True, False, True print(b1 and b2 or (not b3)) for b1, b2, b3 in itertools.product([False, True], repeat=3): if b1 and b2 or (not b3): print(f"b1={b1}, b2={b2}, b3={b3} == True") # }}} # {{{ import z3 b1, b2, b3 = z3.Bools("b1 b2 b3") fmla = z3.And(z3.Or(b1, b2), z3....
Python
1
the future. For example, //! loading an image over a network is a future: the web browser doesn't have the image downloaded //! *yet* but it will (or it will produce an error.) //! //! This asset system is probably temporary, as async / await promise to be much more ergonomic //! methods of dealing with futures. Howev...
Rust
0
orage:')[1].split('Sound Card:')[0].strip() min_requisitos_dict["Sound Card"] = componentes[1].split('Sound Card:')[1].strip() min_requisitos_dict["OS"] = componentes[0].split('OS:')[1].strip() embed = discord.Embed...
Python
1
target_feature(enable = "v7"))] #[cfg_attr(all(test, target_arch = "arm"), assert_instr("vceq.i16"))] #[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(cmeq))] pub unsafe fn vceqq_s16(a: int16x8_t, b: int16x8_t) -> uint16x8_t { simd_eq(a, b) } /// Compare bitwise Equal (vector) #[inline] #[target_featur...
Rust
0
chain_id: p.get_chain_id(PARAM_CHAIN_ID), color: p.get_color(PARAM_COLOR), hash: p.get_hash(PARAM_HASH), hname: p.get_hname(PARAM_HNAME), int16: p.get_int16(PARAM_INT16), int32: p.get_int32(PARAM_INT32), int64: p.get_int64(PARAM_INT64), request_id: p.get_reques...
Rust
0
class Solution: def longestSubsequence(self, s: str, k: int) -> int: oneCount = 0 num = 0 pow = 1 # Take as many 1s as possible from the right for i in reversed(range(len(s))): if num + pow > k: break if s[i] == '1': oneCount += 1 num += pow pow *= 2 ...
Python
1
d after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/...
Python
1
/// Quoted(Quoted), } impl TryFrom<&str> for IString { type Error = (); fn try_from(s: &str) -> Result<Self, ()> { s.to_string().try_into() } } impl TryFrom<String> for IString { type Error = (); fn try_from(s: String) -> Result<Self, ()> { if s.chars().all(|c| c.is_ascii() &...
Rust
0
,fp,structural_alias}; /// /// structural_alias!{ /// trait Tuple3<A,B,C>{ /// 0:A, /// 1:B, /// 2:C, /// } /// } /// /// fn with_tuple3<'a>(tup:impl Tuple3<&'a str,&'a str,&'a str>){ /// assert_eq!( tup.field_(fp!(0)), &"I" ); /// assert_eq!( tup.field_(fp!(1)), &"you" ); /// ...
Rust
0
''' Object : 40. Find the reverse of a number provided by the user(any number of digit) String slicing concept : arr[start:stop] # items start through stop-1 arr[start:] # items start through the rest of the array arr[:stop] # items from the beginning through stop-1 arr[:] ...
Python
1
g = { "role": role, "content": content } self.messages.append(msg) text = self.apply_chat_template(messages=self.messages, add_generation_prompt=add_generation_prompt) text = text[len(self.text):] if len(text) == 0: raise Valu...
Python
1
"""Test crypto extension.""" import pytest from extensions.tests.conftest import parametrize from openbb_core.app.model.obbject import OBBject # pylint: disable=redefined-outer-name @pytest.fixture(scope="session") def obb(pytestconfig): # pylint: disable=inconsistent-return-statements """Fixture to setup obb....
Python
1
_MEMORY_ALIGNMENT: usize = 8; /// Hardware for computation on local CPUs. /// /// Memories on this hardware are identical with the usual host memory and are allocated through /// `GlobalAlloc`. pub struct CpuHardware { /// Registry of supplied pointer and associated memory size. supplied: HashSet<(usize, usize...
Rust
0