text
string
label_name
string
labels
int64
t: self.get_dsets() num_train = len(self.train_dataset) self.train_size = num_train train_idx = np.arange(len(self.train_dataset)) if class_balance_train: self.train_dataset.data = [self.train_dataset.data[idx] for idx in train_idx] self.train_dataset.targets = s...
Python
1
lkies", "description": "Par de walkie talkies.", "category": "Mixta", "price": 65.0, "image_url": "/static/images/toys/default_toy.png"}, ] # Agregar cada juguete a la base de datos for toy_data in toys: toy = Toy(**toy_data) db.session.add(toy) try: ...
Python
1
methingOutOfScope; // FIXME: intra-links resolve in their nearest module scope, not their actual scope in cases // like this // Let's link to [SomethingOutOfScope] while we're at it. impl SomeTrait for SomeStruct {} } <filename>gstreamer-gl/src/auto/gl_base_src.rs // This file was generated by gir (htt...
Rust
0
oftware License', ], keywords='computer vision, single stage, temporal action detection', packages=find_packages(include=('vedacore', 'vedatad')), package_data={'vedacore.ops': ['*/*.so']}, setup_requires=parse_requirements('requirements/build.txt'), # tests_require=parse...
Python
1
nto<Date>) -> Self { Self { uncached: UncachedDaySet { en: Some(d.into()), ..self.uncached }, ..self } } #[must_use] pub fn with_observance(self, o: impl 'static + Observance) -> Self { Self { uncached: UncachedDaySet { observance: Some(Arc::new(o)), ..self.uncached }, ..self } } #...
Rust
0
at which amplitude decays by half (or by 3 db in log scale), the lower it will /// be, the wider band will be and vice versa. See more info [here](https://ccrma.stanford.edu/~jos/filters/Quality_Factor_Q.html) pub fn tune(&mut self, kind: BiquadKind, fc: f32, gain: f32, quality: f32) { let w0 = 2.0 * s...
Rust
0
( &CS::OprfGroup::scalar_as_bytes(CS::OprfGroup::hash_to_scalar::<CS::Hash>( &keypair_seed[..], STR_OPAQUE_DERIVE_AUTH_KEY_PAIR, )?), )?; Ok(client_static_keypair) } fn construct_aad(id_u: &[u8], id_s: &[u8], server_s_pk: &[u8]) -> Vec<u8> { [server_s_pk, id_s, id_u...
Rust
0
} impl From<[f32; 2]> for NormalizeCoord2d { fn from(v: [f32; 2]) -> NormalizeCoord2d { NormalizeCoord2d { x: v[0], y: v[1] } } } #[derive(Debug, Clone, Copy, Default)] pub struct NormalizeCoord3d { pub x: f32, pub y: f32, pub z: f32, } impl From<NormalizeCoord3d> for [f32; 3] { f...
Rust
0
nto(); assert!(value.is_object()); assert_eq!(value.as_object().unwrap()["foo"].as_str().unwrap(), "bar"); } #[test] fn it_converts_to_body() { let document: CosmosDbDocument = r#"{ "foo": "bar" }"#.into(); let body: Body = document.into(); assert_eq!(body.as_str().u...
Rust
0
t), modname.take(), funcname.take(), )); } } } pub fn take_result(&mut self) -> Option<Val> { self.result.take() } pub fn handle_result(result: Val) -> i8 { vout!("Result = {:?}\n", result); let...
Rust
0
self.timeout_thread.start(); try!(self.stream.write_line(command)); let ret = self.stream.flush(); self.timeout_thread.stop(); ret } pub fn write_response<W: Writer>(&mut self, w: &mut W, max_timeouts: u32) -> IoResult<()> { let mut timeouts = 0u32; self.stre...
Rust
0
import re from typing import Dict from g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import ( GCodeFunctionalityDefBase, ) class GetTempGCodeFunctionalityDef(GCodeFunctionalityDefBase): RESPONSE_RE = re.compile(r"C:(?P<current_temp>\d+.\d+) T:(?P<set_temp>\d+.\d+)") @classmethod ...
Python
1
ction success, join_url = await test_agent_interaction() if success and join_url: print(f"\n🎯 READY FOR LIVE TEST!") print(f"🔗 Join URL: {join_url}") print(f"\n📋 Test Instructions:") print(f"1. Open the URL above in your browser") print(f"2. Allow microphone acces...
Python
1
# Parser for cppcheck_run.log files import sys def usage(): print( 'usage: python chhpcheck-parse.py [OPTIONS] <path-to-log>' ) print( ' --severity <W|E|l> limit which severities are shown (Warnings, Errors, locations; default=WEl)' ) sys.exit(1) import getopt try: opts, args = getopt.getopt(...
Python
1
(&origin) { Some(vec) => vec.push(comment_cid.into()), None => { list.comments.insert(origin, vec![comment_cid.into()]); } } update_ipns(&ipfs, COMMENTS_KEY, &list).await?; println!("Unpinning Old List..."); let occ = old_comments_cid.to_string(); if let Err(e)...
Rust
0
("f2cfb6f5446e7aa172adfcd66b92a98d"), tag: [0xe099c64d, 0x2966e780, 0xce7d2eaa, 0xe97f47d8], }, Gcm { key: [ 0x2bdad9c3, 0xe5de6e4e, <KEY>, 0xe727c690, 0xdb95eacf, 0x4b0ccbde, 0xc7aab6fb, 0x9fc80486, ], iv: [0xa5cf3967, 0xd244074d, 0x2153c576], pt:...
Rust
0
#!/usr/bin/python3 def pow(a, b): exponentation = a ** b return exponentation
Python
1
======== # C9500 # ========================================================================== showVersionC9500 = { "version": { "version_short": "17.4", "platform": "Catalyst L3 Switch", "version": "17.4.20200702:124009", ...
Python
1
let hbs = self.registry.read().unwrap(); let page_wrapper = if let Some(ref name) = h.name { Some( hbs.render(name, &h.value) .map_err(TemplateRenderError::from), ) } else if let ...
Rust
0
erase_owner(); let _f: OwningRefMut<Box<dyn Erased>, [u8]> = d.erase_owner(); } #[test] fn total_erase_box() { let a: OwningRefMut<Vec<u8>, [u8]> = OwningRefMut::new(vec![]).map_mut(|x| &mut x[..]); let b: OwningRefMut<Box<[u8]>, [u8]> = OwningRefMut::new(vec...
Rust
0
with 'yes' or 'no' " "(or 'y' or 'n').\n") def report_model_in_traceback(tb): """ Report on location of model in current traceback, if one can be found easily. """ import traceback for level, (frame, line) in enumerate(reversed(list(traceback.walk_tb(tb)))): file_loc = "{}, line {}".forma...
Python
1
r = "blind-sign"; pub const COCONUT_VERIFICATION_KEY: &str = "verification-key"; pub const STATUS_ROUTES: &str = "status"; pub const MIXNODE: &str = "mixnode"; pub const GATEWAY: &str = "gateway"; pub const CORE_STATUS_COUNT: &str = "core-status-count"; pub const SINCE_ARG: &str = "since"; pub const STATUS: &str = "...
Rust
0
文档\n 📝 代码重构\n 📝 性能优化\n\n3. 测试验证:\n 🔍 单元测试\n 🔍 集成测试\n 🔍 系统测试\n\"\"\")\n\nif __name__ == \"__main__\":\n try:\n status_info = check_project_structure()\n generate_next_steps(status_info)\n \n # 生成状态报告文件\n with open('project_status_report.txt', 'w', encoding='utf-8') as...
Python
1
ar hex frequency Huffman code') print(70 * '-') for i in sorted(codedict, key=lambda c: (freq[c], c), reverse=True): print('%7r %-4s 0x%02x %10i %s' % ( i, disp_char(i), i, freq[i], codedict[i].to01())) def test(): from bitarray.util import _huffman_tree freq =...
Python
1
def get_palindrome_letter(message): return message == message[::-1] message = "level" result = get_palindrome_letter(message) print(result)
Python
1
# Gerenciamento de tarefas: Criar, visualizar e atualizar listas de tarefas ou projetos. # Módulo: Criação # 29/05/2025 # Autor: Paulo Augusto de Jesus Vilela # Bibliotecas import datetime # Importando o dicionário de tarefas e o próximo ID from dicionario import tarefas, proximo_id # Função para verificar e retornar...
Python
1
''' Copyright (C) 2023 CG Cookie http://cgcookie.com hello@cgcookie.com Created by Jonathan Denning 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 3 of the License, or ...
Python
1
the content of the trie for the purpose of serialization. pub fn dump(&self) -> MultiTrieDump<T> { let node_data = self.store.iter().map(|x| x.get_data()).collect(); MultiTrieDump { node_data, base: self.base, nb_tries: self.nb_tries, nb_required: sel...
Rust
0
pub mod profile_attribute_view; pub use self::profile_attribute_view::ProfileAttributeView; pub mod profile_view_builder_template; pub use self::profile_view_builder_template::ProfileViewBuilderTemplate; pub mod profile_view_builder_template_attribute; pub use self::profile_view_builder_template_attribute::ProfileView...
Rust
0
w::{Button, Key}; pub struct Keyboard { mapping: KeyMapping, } #[allow(dead_code)] pub enum KeyMapping { Default, Improved, } impl Keyboard { pub fn new(map: KeyMapping) -> Keyboard { Keyboard { mapping: map } } pub fn map_key(&self, button: Button) -> Option<u8> { match self...
Rust
0
ue: row[sparse_sv[i].index] = sparse_sv[i].value if sparse_sv[i].index == -1: break i += 1 result.append(row) return result def toPyModel(model_ptr): """ toPyModel(model_ptr) -> svm_model Convert a ctypes POINTER(svm...
Python
1
class PropertyWithSetter: @property def foo(self) -> str: """Docstring for foo.""" return "foo" @foo.setter def foo(self, value: str) -> None: pass @foo.deleter def foo(self): pass @foo def foo(self, value: str) -> None: pass
Python
1
import math import time import openai import tiktoken import random import requests import google.generativeai as genai import util from log.custom_logger import log from prompt.agent_prompt import * from procoder.functional import format_prompt from procoder.prompt import * from secretary import Secretary from stock...
Python
1
dates param("12 Hulyo 2003 13:01", datetime(2003, 7, 12, 13, 1)), param("1978, 1 Peb, 7:05 PM", datetime(1978, 2, 1, 19, 5)), param("2 hun", datetime(2012, 6, 2)), param("Lin 16:16", datetime(2012, 11, 11, 16, 16)), # Japanese dates param("2016年3月...
Python
1
ration, \ without modifying the original"] #[inline] pub fn wrapping_shl(self, rhs: u32) -> Self { let mut result = MaybeUninit::uninit(); intrinsics::ashl3(&mut result, &self, rhs & 0xff); unsafe { result.assume_init() } } /// Panic-free bitwise shift-right; y...
Rust
0
ashMap, convert::{TryFrom, TryInto}, }; #[extend::ext] impl<'a, S> &'a [u8] where S: Get<u32>, { fn try_into_bounded(self) -> Result<BoundedVec<u8, S>, ()> { core::convert::TryFrom::try_from(self.to_vec()) } fn into_bounded(self) -> BoundedVec<u8, S> { core::convert::TryFrom::try_from(self.to_vec()).unwrap() ...
Rust
0
import numpy as np import networkx as nx import string from itertools import chain, product, islice, count from numpy.random import default_rng from pgmpy import models from pgmpy.factors.continuous import LinearGaussianCPD def sample_erdos_renyi_graph( num_variables, p=None, num_edges=None,...
Python
1
: variables are immutable // by default in Rust. // The `mut` keyword is used to signal that you must pay special attention to the // variable as it's likely to change later on in the function body. let mut store = TicketStore::new(); let ticket_id = Faker.fake(); // Her...
Rust
0
validate!(ascii [true] true => i64 "foobar"); // Valid validate!(ascii [false] true => String ""); validate!(ascii [false] true => String " "); validate!(ascii [false] true => String "foobar"); validate!(ascii [false] true => String "0987654321"); validate!(ascii [false...
Rust
0
frame. PageNotMapped, } impl<'a> RecursivePageTable<'a> { /// Creates a new RecursivePageTable from the passed level 4 PageTable. /// /// The page table must be recursively mapped, that means: /// /// - The page table must have one recursive entry, i.e. an entry that points to the table //...
Rust
0
f); filter.x += 1; if filter.x >= input.width() { filter.x = 0; filter.y += 1; } } } } if filter.y < input.height() { ctx.waker().wake_by_ref(); ...
Rust
0
f.center_ics_ = subset self.labels_ = cluster_ics return self def _check_array(self, feat): # Check that the number of clusters is less than or equal to # the number of samples if self.n_clusters > feat.shape[0]: raise ValueError('The number of medoids ' + '({}) '.format( self.n_c...
Python
1
pect_tree, &info).await } } } fn send_scan_results( handle: fidl_sme::ScanTransactionControlHandle, scan_results: ScanResultList, ) -> Result<(), fidl::Error> { // Maximum number of scan results to send at a time so we don't exceed FIDL msg size limit. // A scan result may contain all IEs, ...
Rust
0
= ('name',) readonly_fields = ('traffic_enabled', 'security_enabled',) @admin.register(Plan) class PlanAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'video_transcoding', 'audio_transcoding', 'storage', 'data_transfer') search_fields = ('name',) @admin.register(Bill) class BillsAdmin(admin.Model...
Python
1
theme}; pub(crate) use styling::styled_component; <filename>src/widget/common.rs use druid::{Data, Widget, Lens, WidgetExt}; use druid::widget::{Flex, Label, TextBox, CrossAxisAlignment}; use druid::text::format::Formatter; pub fn create_form_element<I: Data, O: Data, L: Lens<I, O>>( text: impl Into<String>, for...
Rust
0
} } <reponame>rbatis/rexpr use crate::ast::Node; use crate::lexer::lexer; use crate::parser::parse; use crate::token::TokenMap; use dashmap::DashMap; use serde_json::Value; /// the express engine for exe code on runtime #[derive(Debug)] pub struct RExprRuntime { pub expr_cache: DashMap<String, Node>, pub toke...
Rust
0
for i in workers: best_value = -1 best_arm = None remaining_cap = rmab.worker_capacity[i].item() lowest_cost = np.min(available_arm_costs[available_arm_costs != -1]) # find cheapest available arm while remaining_cap ...
Python
1
popt_greedy print(f"Greedy Algorithm Discrepancy ~ {a_greedy:.4e} * n^(-{alpha_greedy:.4f})") # Weighted Averaging Algorithm (50/50) regression popt_weight_avg, pcov_weight_avg = curve_fit(power_law, n_values, weight_avg_discrepancies) a_weight_avg, alpha_weight_avg = popt_weight_avg print(f"Weight...
Python
1
sys.stderr = old True True True True These refleak tests should perhaps be in a testfile of their own, test_generators just happened to be the test that drew these out. """ __test__ = {"tut": tutorial_tests, "pep": pep_tests, "email": email_tests, "fun": fun_...
Python
1
for event in events_loop.poll_iter() { if let sdl2::event::Event::Quit { .. } = event { break 'render; } } } gl.clear(glow::COLOR_BUFFER_BIT); gl.draw_arrays(glow::TRIANGLES, 0, 3); ...
Rust
0
9, 0x82, 0x16, 0x4f, 0xe2, 0x58, 0x59, 0xe0, 0xd1, 0xdc, 0xc1, 0x47, 0x5c, 0x80, 0xa6, 0x15, 0xb2, 0x12, 0x3a, 0xf1, 0xf5, 0xf9, 0x4c, 0x11, 0xe3, 0xe9, 0x40, 0x2c, 0x3a, 0xc5, 0x58, 0xf5, 0x00, 0x19, 0x9d, 0x95, 0xb6, 0xd3, 0xe3, 0x01, 0x75, 0x85, 0x86, 0x28,...
Rust
0
//Expected response // { // "success": true|false, // is the passcode valid, and does it meet security criteria you specified, e.g. sitekey? // "challenge_ts": timestamp, // timestamp of the challenge (ISO format yyyy-MM-dd'T'HH:mm:ssZZ) // "hostname": string, // the hostname of the site where the challenge was solv...
Rust
0
s channel C. \n \n Writing to a bit where a DMA channel is not implemented has no effect."] #[inline(always)] pub fn chnl_enable_set(&self) -> CHNL_ENABLE_SET_R { CHNL_ENABLE_SET_R::new((self.bits & 0xffff) as u16) } } impl W { #[doc = "Bits 0:15 - Returns the enable status of the channels, or e...
Rust
0
# Function Approximation-based algorithms from gridmind.algorithms.function_approximation.ppo.ppo import PPO from gridmind.algorithms.function_approximation.actor_critic.one_step_actor_critic import ( OneStepActorCritic, ) from gridmind.algorithms.function_approximation.temporal_difference.control.deep_q_learning i...
Python
1
pls after method call statement is already done, with associated methods"); std::io::stdin().read_line(&mut choice) .expect("Input Save failed..."); match choice.trim() { "1" => { let user = create_user(); println!("=== USER created: {:?}\n", user...
Rust
0
(true, false): true // - (false, true): true // - (true, true): false self.initialized != self.reassigned } } type Scope = Arc<Mutex<RawScope>>; #[derive(Debug)] struct RawScope { parent: Option<Scope>, variables: BTreeMap<JsWord, Variable>, } impl RawScope { fn new(parent: Option<Scope>) -> Sel...
Rust
0
graph::Graph, mesh::{ surface::{SurfaceBuilder, SurfaceData}, MeshBuilder, RenderPath, }, node::Node, transform::TransformBuilder, }, }; use std::sync::Arc; pub enum ScaleGizmoMode { None, X, Y, Z, Uniform, } pub struct ScaleGizmo...
Rust
0
%reset import pandas as pd import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import tensorflow_probability as tfp np.random.seed(42) dataframe = pd.read_csv('Apple_Data_300.csv').ix[0:800,:] dataframe.head() plt.plot(range(0,dataframe.shape[0]),dataframe.iloc[:,1]) x1=np.array(dataframe.iloc...
Python
1
from typing import List class Solution: def lexicalOrder(self, n: int) -> List[int]: result = [] curr = 1 for _ in range(n): result.append(curr) if curr * 10 <= n: curr *= 10 else: while curr % 10 == 9 or curr + 1 > n: ...
Python
1
} #[test] fn url() { let mut c = Config::new(); c.set_url(String::from("http://foolio.com")); assert_eq!(c.url(), "http://foolio.com"); } #[test] fn topology() { let mut c = Config::new(); c.set_topology(Topology::Leader); assert_eq!(c.topology(), To...
Rust
0
d_err!(d, [], [i], [0xfe], ""); assert_feed_err!(d, [], [i], [0xff], ""); assert_finish_ok!(d, ""); } } #[test_case] fn test_decoder_invalid_lead_followed_by_invalid_trail_partial() { for i in 0x81..0xa0 { let mut d = Windows31JEncoding.raw_decoder(); ...
Rust
0
import numpy as np # Code adapted from https://github.com/uzh-rpg/rpg_e2vid/blob/master/utils/inference_utils.py#L431 def to_voxel_grid_numpy(events, sensor_size, n_time_bins=10): """Build a voxel grid with bilinear interpolation in the time domain from a set of events. Implements the event volume from Zhu et...
Python
1
; let vt = match ch { b'B' => VarType::Binary, b'C' => VarType::Continuous, b'I' => VarType::Integer, b'S' => VarType::SemiCont, b'N' => VarType::SemiInt, _ => { return Err(format!( "unexpected value {:?}...
Rust
0
_token: item.semi_token, })), TraitItem::Method(item) => Some(Item::Fn(ItemFn { attrs: item.attrs, vis: Visibility::Inherited, constness: item.sig.constness, unsafety: item.sig.unsafety, asyncness: item.sig.asyncness...
Rust
0
) # cost = tf.reduce_mean(tf.nn.cross_entropy_with_logits(py_x, Y)) train_step = tf.train.RMSPropOptimizer(0.001, 0.9).minimize(cost) predict = tf.argmax(py_x, 1) sess = tf.Session() sess.run(tf.initialize_all_variables()) for i in range(100): # One epoch for start, end in zip(range(0, len(trX), N_BATCH), ra...
Python
1
pected percentage expected_percentage = ((close_price_check - entry_price) / entry_price) * 100 print(f" Expected Frontend Percentage: {expected_percentage:.2f}%") return True except Exception as e: print(f"❌ Error fixing BTC current_pr...
Python
1
#!/usr/bin/env python3 # Copyright 2023 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Certificate chain with policies and requireExplicitPolicy, including policies on the root.""" import sys sys.path += ['../..'] import gencerts # Self-s...
Python
1
_exprs = expressions(min_right, max_right); let size = right_exprs.len(); let mut index = 0; let mut count = 0; for left in expressions(min_left, max_left) { index -= count; if index >= size { break } count = 0; while index < size && left...
Rust
0
self, v: T) { self.0 = self.0.clone() * v.into().0; if self.0.bits() > 255 { panic!("overflow"); } } } impl CheckedMul for Int256 { fn checked_mul(&self, v: &Int256) -> Option<Int256> { // drop down to wrapped bigint to stop from panicing in fn above let num...
Rust
0
LevelAndSource { // Check whether we should always warn if self.force_warns.contains(&LintId::of(lint)) { return (Level::Warn, LintLevelSource::ForceWarn(Symbol::intern(lint.name))); } let (level, mut src) = self.get_lint_id_level(LintId::of(lint), idx, aux); // If...
Rust
0
import controllers.test.get import controllers.test.post route_map = { '/test': { 'GET': controllers.test.get.handler, 'POST': controllers.test.post.handler } }; def router(packages, event): controller = route_map[event['path']][event['httpMethod']]; if not controller: ret...
Python
1
_RULE: Rule<'a> = RightRule { first: First { lhs: E::V(PlusOrMinus), rhs: E::V(Term), }, second: Second(E::T(TerminalSymbol::Metasymbol(Failure))), }; // Term /// Term = Factor ZeroOrMoreStarOrSlashAndFactors / f const TERM_RULE: Rule<'a> = RightRule { ...
Rust
0
e consider n>=N #also returns R such that WR is the QR decomposition def gram_schmidt(V): n,N=V.shape #dimension, cardinal W=th.zeros_like(V) R=th.zeros((N,N)).double().to(V.device) W[:,0]=V[:,0]/th.norm(V[:,0]) R[0,0]=W[:,0].dot(V[:,0]) for i in range(1,N): proj=th.zeros(n).double().to(...
Python
1
[i as usize]; set_balance(currency_id, &caller, dollar(1000)); } }: _(RawOrigin::Signed(caller), None) } #[cfg(test)] mod tests { use super::*; use frame_support::assert_ok; fn new_test_ext() -> sp_io::TestExternalities { frame_system::GenesisConfig::default() .build_storage::<Runtime>() ...
Rust
0
AbstractModel): """CreateParameterTemplate返回参数结构体 """ def __init__(self): r""" :param _TemplateId: 参数模板ID,用于唯一确认参数模板 :type TemplateId: str :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 :type RequestId: str ...
Python
1
_, _, _| { let (path, version_list) = &nwg_get!(ui; [ (Id::Path, String), (Id::VersionList, nwg::ListBox<String>) ]); match version_list.get_selected_index() { Some(idx) => { let version = &version_list.collection()[id...
Rust
0
from django import template import re register = template.Library() def embed_video(text): """ Detect and embed video links for YouTube, TikTok, Instagram, Facebook, and other platforms. """ # Regular expressions for various platforms youtube_regex = r'(https?://(?:www\.)?youtube\.com/watch\...
Python
1
) -> T; /// Float division that allows optimizations based on algebraic rules. /// May assume inputs are finite. pub fn fdiv_fast<T>(a: T, b: T) -> T; /// Float remainder that allows optimizations based on algebraic rules. /// May assume inputs are finite. pub fn frem_fast<T>(a: T, b: T) -> T;...
Rust
0
ifier` on the signature value and serialized /// data (in that order). /// /// # Panics /// /// This method will panic if `which` is >= `self.signatures.len()`. pub fn verify_signature<F, E>(&self, which: usize, aad: &[u8], verifier: F) -> Result<(), E> where F: FnOnce(&[u8], &[u8]) ...
Rust
0
RayTracingPropertiesNV { /// * **Values:** [`VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV`] sType: VkStructureType, /// * **Optional:** true pNext: *mut c_void, shaderGroupHandleSize: uint32_t, maxRecursionDepth: uint32_t, maxShaderGroupStride: uint32_t, shaderGroupBaseAli...
Rust
0
h.isdir(save_path(save))] def add_server(meta, server): meta['servers'] = meta.get('servers', []) meta['servers'].append(server) save_global_meta(meta) def delete_server(meta, server): meta['servers'].remove(server) save_global_meta(meta) def check_meta(meta): return set_defaults(meta, def...
Python
1
"""14. Crear un módulo y un archivo principal (donde llamará las funciones del módulo) el módulo tendrá una función para ingresar nombres y apellidos, una función para pedir el tipo de seguro que tiene y otra función para indicar si es mayor de edad o no (pedir la edad desde consola)""" from Modulo import Mi_Modulo ...
Python
1
ng on the scale moves the time to where the user clicked initially let time_ns = self.xpos_to_ns(start_x - LAYER_PANEL_WIDTH - (TICK_LENGTH/2.0)); let time = Self::ns_to_duration(time_ns); self.anim_model.timeline().current_time.set(time); self.drag_st...
Rust
0
import logging from pydantic import Field from atomic_agents.lib.base.base_tool import BaseTool, BaseToolConfig from atomic_agents.agents.base_agent import BaseIOSchema from atlas.joern.client import run_command logger = logging.getLogger(__name__) class GraphDBToolInputSchema(BaseIOSchema): """ Input schema ...
Python
1
be a regular message. A regular message has a tag (32 // bytes), and auth_tag (12 bytes) and the NODES response has an ID (8 bytes) and a total (8 bytes). // The encryption adds the HMAC (16 bytes) and can be at most 16 bytes larger so the total packet size can be at most 92 (given AES_...
Rust
0
import re def findNumbera_Instring(input1): pattern='\d+' numbers=re.findall(pattern,input1) return numbers input1="there are 3434 boxes 3 pencils 233 Pens" numbers=findNumbera_Instring(input1) print(numbers)
Python
1
s = input("enter string: ").lower() l = [] for i in range(len(s)): l.append(s[i]) u_l = list(set(l)) d = {u_l[i]: 0 for i in range(len(u_l))} print(u_l) print(d) for j in range(len(u_l)): for k in range(len(s)): if u_l[j] == s[k]: d[u_l[j]] += 1 print(d)
Python
1
############################################################################### ## ## Copyright (c) typedef int GmbH ## ## 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://...
Python
1
ived {}.'.format(dim) ) def forward(self, input): """ Apply gaussian filter to input. Arguments: input (torch.Tensor): Input to apply gaussian filter on. Returns: filtered (torch.Tensor): Filtered output. """ return self.conv(input...
Python
1
import re from logging import Logger from pathlib import Path from tempfile import TemporaryDirectory import pytest from invokeai.app.util.profiler import Profiler def test_profiler_starts(): with TemporaryDirectory() as tempdir: profiler = Profiler(logger=Logger("test_profiler"), output_dir=Path(tempdi...
Python
1
ouble). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). pub total_amount: i64, /// Bot specified invoice payload pub invoice_payload: String, /// O...
Rust
0
::LoadConstIBig(_) => mark!(?self.ibig_class_label), InstructionKind::LoadConstF32(_) => mark!(?self.f32_class_label), InstructionKind::LoadConstF64(_) => mark!(?self.f64_class_label), InstructionKind::LoadConstFBig(_) => mark!(?self.fbig_class_lab...
Rust
0
CharacterCodes::GreaterThan => // Starts of conflict marker trivia true, CharacterCodes::Hash => // Only if its the beginning can we have #! trivia pos == 0, _ => c...
Rust
0
BorderPortError::Chain {} {}", func_name, comment)] Chain { func_name: &'static str, comment: String }, } use super::super::*; pub struct BtrfsSuperblockChunkItem<'a> { key: &'a BtrfsKey, data: &'a BtrfsChunkItemData, } impl<'a> BtrfsSuperblockChunkItem<'a> { pub fn new( key: &'a BtrfsKey, ...
Rust
0
def test_when_fitting_keras_model_all_correct_with_padding(self): (bags_train, y_train, _), (bags_test, y_test, _) = mnist_bags.load() pipeline = [('padding', Padding())] self.trainer.prepare(model=AttentionDeepPoolingMil(), preprocess_pipeline=pipelin...
Python
1
v") os.system(f"grep 's2_3-eth2' data/run/{test}-tmp.bwm > data/run/s2_3-eth2-a{test}.csv") os.system(f"grep 's2_4-eth2' data/run/{test}-tmp.bwm > data/run/s2_4-eth2-a{test}.csv") os.system(f"grep 's1_1-eth1' data/run/{test}-tmp.bwm > data/run/s1_1-eth1-a{test}.csv") os.system(f"grep 's1...
Python
1
&context as *const _ as *mut c_void; let mode = mode as c_int; let with_comments = if with_comments { 1 } else { 0 }; let output = output.as_ptr(); let ret = match namespaces { Some(namespaces) => { let namespaces = namespaces.iter...
Rust
0
ent_batch == i] if lane_types is not None: scene_i_lane_types = lane_types[lane_batch == i] else: scene_i_lane_types = None fig = plot_scene( scene_i_agents, scene_i_lanes, scene_i_agent_types, scene_i_lane_types, ...
Python
1
= "Macht den gleichen Gegenstand für 25 Handwerkspunkte. Schneller und einfacher als andere Anleitungen dafür kostenaufwendiger." tge = "Versucht die Zutaten wenn möglich herzustellen als sie zu kaufen. In der Regel teurer als normale Anleitungen, aber weniger komplex. Vergleichbar mit Anleitungen die vor ACCG e...
Python
1
var_246, )?; object_247.finish(); } Ok(()) } pub fn serialize_structure_crate_input_scan_input( object: &mut aws_smithy_json::serialize::JsonObjectWriter, input: &crate::input::ScanInput, ) -> Result<(), aws_smithy_http::operation::SerializationError> { if let Some(var_248)...
Rust
0