text
string
label_name
string
labels
int64
ER_MIXER_GAIN: u32 = 10619188; pub const V4L2_CID_RF_TUNER_IF_GAIN_AUTO: u32 = 10619197; pub const V4L2_CID_RF_TUNER_IF_GAIN: u32 = 10619198; pub const V4L2_CID_RF_TUNER_PLL_LOCK: u32 = 10619227; pub const V4L2_CID_DETECT_CLASS_BASE: u32 = 10684672; pub const V4L2_CID_DETECT_CLASS: u32 = 10682369; pub const V4L2_CID_DE...
Rust
0
""" JIT scripting/tracing utils Hacked together by / Copyright 2020 Ross Wightman """ import os import torch def set_jit_legacy(): """ Set JIT executor to legacy w/ support for op fusion This is hopefully a temporary need in 1.5/1.5.1/1.6 to restore performance due to changes in the JIT exectutor. These...
Python
1
""" 剑指offer 第三题。从左到右升序从上到下升序数组,判断是否能找到一个值 思路: 从右上角开始找,大于 target 排除当前列。小于 target 排除当前行 """ class Solution: def solve(self, matrix, target): if not matrix or not matrix[0]: return False leny = len(matrix) x = 0 y = leny - 1 while x >= 0 and y >= 0: i...
Python
1
# PSNR on Y channel psnrs.append(bPSNR(image_out, img_gt, 0)) mean_psnr = np.mean(np.asarray(psnrs)) # save best psnr for set5 if mean_psnr > best_psnr: best_psnr = np.mean(np.asarray(psnrs))...
Python
1
import os from PIL import Image from pathlib import Path from .enums import CONVERSION, DEVICE, SAMPLING from . import cpu_render, gpu_render class Converter: def convert(input: str, output: str, conversion: CONVERSION, device: DEVICE = DEVICE.GPU, sampling: SAMPLING = SAMPLING.LINEAR): try: fi...
Python
1
9_\(\)]+)").unwrap(); rust_source = re.replace_all(&rust_source, " * `$var` - ").into(); let re = regex::Regex::new(r"\\\\[cp]\s+(?P<var>[A-Za-z0-9_\(\)]+)").unwrap(); rust_source = re.replace_all(&rust_source, "`$var`").into(); let re = regex::Regex::new(r"\\\\ref\s+(?P<var>[A-Za-z0-9_\(\)]+)").unwrap(); rust_sou...
Rust
0
peft_scheme.lower() == 'none': recipe.trainer.strategy.tensor_model_parallel_size = 2 recipe.optim.config.lr = 2e-05 elif peft_scheme.lower() == 'lora': # pylint: disable=line-too-long """Adapted from https://github.com/meta-llama/llama-recipes/blob/main/src/llama_recipes/configs/pef...
Python
1
arr = [ [3, 5, 9], [4, 2, 1], [1, 1, 5], ] colored_arr = [] for _ in range(3): colored_arr.append(list(map(int, input().split()))) total = 0 for i in range(3): for j in range(3): if colored_arr[i][j] == 1: total += arr[i][j] print(total)
Python
1
() } impl StepSerde { pub fn input_var_ids(&self, var_store: &ObjectStore<Box<dyn Var + Send + Sync>, VarId>) -> Result<Option<Vec<VarId>>, IdError<VarId>> { match &self.input_vars { Some(input_vars) => Ok(Some(names_to_ids(var_store, &input_vars)?)), None => Ok(None), } ...
Rust
0
import itertools import numpy as np from matplotlib import pyplot as plt from peds.distributions_lognormal import matern, LogNormalDistribution1d n = 256 Lambda = 0.1 # correlation length a_power = 2 nu = a_power - 1 / 2 domain_size = 1.3 distribution = LogNormalDistribution1d(n, domain_size, Lambda, a_power) # Com...
Python
1
agents") creation_dates = stats.get('creation_dates', {}) if creation_dates: print(f"\nCreation Dates (Last 12 months):") for month, count in sorted(creation_dates.items(), reverse=True): print(f" {month}: {count} agents") async def main(): parser...
Python
1
dd.demo.make_timeseries() df2 = df[df.y > 0] df3 = df2.compute() assert df3["y"].min() > 0 assert list(df.columns) == list(df3.columns) def test_make_timeseries_column_projection(): ddf = dd.demo.make_timeseries( "2001", "2002", freq="1D", partition_freq="3M", seed=42 ) assert_eq...
Python
1
#!/usr/bin/env python3 # Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause import rclpy from rclpy.node import Node from sensor_msgs.msg import JointState import numpy as np import time class TestROS2Bridge(Node): def __init__(self): super().__ini...
Python
1
from typing import Dict, Optional from gotrue import ( AuthFlowType, SyncGoTrueClient, SyncMemoryStorage, SyncSupportedStorage, ) from gotrue.http_clients import SyncClient class SyncSupabaseAuthClient(SyncGoTrueClient): """Supabase Auth Client for synchronous operations.""" def __init__( ...
Python
1
from .. import Provider as BaseProvider # Ukrainian job names taken from # https://uk.wikipedia.org/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BF%D1%80%D0%BE%D1%84%D0%B5%D1%81%D1%96%D0%B9 # on 22th September 2014 class Provider(BaseProvider): jobs = [ # А "Агроном", "Адвокат", "...
Python
1
#!/usr/bin/python3 -i # # Copyright (c) 2021 LunarG, Inc. # # Permission is hereby 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...
Python
1
x)), util::span::Span::dummy(), ) }; } macro_rules! unit { () => { crate::terms::Term::new( crate::terms::Kind::Const(crate::terms::Constant::Unit), util::span::Span::dummy(), ) }; } /// TmVar term macro_rules! var { ($x:expr) => { cr...
Rust
0
c!("unexpected {:?}", &stmt_items[1]); } } match &stmt_items[7] { StmtItem::Bind(name) => { assert_eq!(name, "total"); } _ => { panic!("unexpected {:?}", &stmt_items[1]); } } } #[test] fn into_token() { use super::INTO_TOK...
Rust
0
rray_buffer()).await.unwrap(); Ok(js_sys::Uint8Array::new(&buffer).to_vec()) } <filename>day_5/src/main.rs extern crate rayon; use rayon::prelude::*; use std::env; use std::fs::File; use std::io::prelude::*; fn main() { let args: Vec<String> = env::args().collect(); let filename = &args[1]; let con...
Rust
0
#!/usr/bin/env python #from G.Benelli and Arun Mittal # 2016 November 17 #Quick script to split a large sqlite file (holding all of our Noise payloads (Run1+Run2) into a set of smaller ones. import subprocess IOVs=[] for line in subprocess.Popen("conddb --noLimit --db Linear.db list EcalLinearCorrections_from2011_offli...
Python
1
import socket import random HOST = '' PORT = 50008 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() print('서버가 시작되었습니다.') conn, addr = s.accept() with conn: answer = random.randint(1, 99) print(f'클라이언트가 접속했습니다:{addr}, 정답은 {answer} 입니다.') ...
Python
1
ValueError: If `kernel_size` or `strides` is a tuple whose length is not equal to 3. ValueError: If `data_format` is not 'NCDHW'. Supported Platforms: ``Ascend`` ``GPU`` Examples: >>> x = Tensor(np.arange(1 * 2 * 2 * 2 * 3).reshape((1, 2, 2, 2, 3)), mindspore.float32) >...
Python
1
e: f64 = 1.0; let distrib: Normal<f64> = Normal::new(mean, variance); let x: f64 = 0.0; let prob: f64 = distrib.pdf(x); assert_relative_eq!(0.3989422804014327, prob); } //Does not work all the time, because the used function random is not mocked. // #[test] // fn random() // { // let mean_1 : f64 =...
Rust
0
guration settings for coalescing batches and // we should do that once https://issues.apache.org/jira/browse/ARROW-11059 is // implemented. For now, we choose half the configured batch size to avoid copies // when a small number of rows are removed from a batch ...
Rust
0
.clear_bit() .dig_clk8m_en() .set_bit() .dig_clk8m_d256_en() .set_bit() }); // set divider from 8MHz to CPU clock self.apb_control .sysclk_conf .modify(|_, w| unsafe { w.pre_div_cnt().bits(di...
Rust
0
_hops and 1 hops_left 0x11, 0x02]) # cmd1, cmd2 obj5 = Msg.InpStandard.from_bytes(b5) assert obj != obj5 assert obj != [1, 2, 3] #----------------------------------------------------------------------- def test_nak_str(self): from_addr = IM.Address(0x01, 0...
Python
1
dados = dict() cont = 1 gols = list() geral = list() total = 0 c = 0 while True: dados.clear() dados["nome"] = input("Qual nome do jogador: ") partis = int(input(f"Quantas partidas {dados['nome']} jogou: ")) for c in range(0, partis): gol = int(input(f"Quantos gols ele fez na {c + 1} partida: ")...
Python
1
""" name: jupyter_tools.py desc: Based on CadQuery version. license: Copyright 2022 Gumyr 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/licen...
Python
1
# coding=utf-8 # Copyright 2024 The TensorFlow GAN Authors. # # 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 applicabl...
Python
1
le_tools) # 获取LLM响应 try: if hasattr(self.llm, 'invoke'): response = self.llm.invoke(prompt) else: response = self.llm(prompt) if hasattr(respo...
Python
1
vars: &[usize], var: usize, ) -> E { let p = ap.coefficients[0].p; let fastp = FastModulus::from(p); let mut rng = rand::thread_rng(); let range = Uniform::new(1, p); // store a table for variables raised to a certain power let mut cache = (0..ap.nva...
Rust
0
let res_classes = res_classes.unwrap(); for (i, row) in data.iter().enumerate() { for (j, value) in row.iter().enumerate() { assert_eq!(*value, result[i][j]); } } let res_classes: HashSet<usize> = HashSet::from_iter(res_classes.iter() .map(|(_, &cl)| cl as usize)); let diff: HashSet<_> = res_c...
Rust
0
from restack_ai.function import function, log from pydantic import BaseModel class WelcomeInput(BaseModel): name: str @function.defn() async def welcome(input: WelcomeInput) -> str: try: log.info("welcome function started", input=input) return f"Hello, {input.name}!" except Exception as e:...
Python
1
try: min_even = 0 max_even = 0 min_odd = 0 max_odd = 0 num = 0 while(num < 10): n = float(input("Digite um número: ")) if(n < 0): print("Número inválido, tem que ser positivo.") if(n % 2 == 0): num += 1 if(n < min_even or min_even == 0)...
Python
1
Agent"]) # Initialize session state variables if "vectordb" not in st.session_state: st.session_state.vectordb = None if "few_shot" not in st.session_state: st.session_state.few_shot = "" if "ticket" not in st.session_state: st.session_state.ticket = "" if "generated_code" not in st.session_state: st....
Python
1
::ensure_signed; #[cfg(test)] mod mock; #[cfg(test)] mod tests; pub trait Trait: frame_system::Trait { type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>; type Asset: Codec + Parameter + Default + Copy; type Price: Codec + Parameter + Default + Copy; type OnPriceSet: OnPriceSe...
Rust
0
art_row) valid_start_col = min(col_start, valid_start_col) valid_end_col = max(col_end, valid_end_col) for row in range(row_start, row_end + 1): for col in range(col_start, col_end + 1): grid[row][col] = (i, row_start, row_end, col_start, col_end) # 创建表格 ...
Python
1
2].to_le_bytes()); keystream[12..16].copy_from_slice(&state[3].to_le_bytes()); keystream[16..20].copy_from_slice(&state[4].to_le_bytes()); keystream[20..24].copy_from_slice(&state[5].to_le_bytes()); keystream[24..28].copy_from_slice(&state[6].to_le_bytes()); keystream[28..32].copy_from_slice(&state[...
Rust
0
"""Time Interval module.""" from datetime import datetime from croniter import croniter def crontab_sleep(cron_expression): """ Function that calculates the number of seconds to sleep to get to the next loop cycle. Args: cron_expression: String representing the cron expression. Returns: ...
Python
1
ments.append( DeclareLaunchArgument( "start_joint_controller", default_value="true", description="Enable headless mode for robot control", ) ) declared_arguments.append( DeclareLaunchArgument( "initial_joint_controller", default...
Python
1
_TABLE_LOWER[offset + ((code & 31) as usize)] } /// Returns the index pointer for code point `code` in this index. #[cfg(feature = "no-optimized-legacy-encoding")] pub fn backward(code: u32) -> u8 { if code > 8805 || ((0x30005u32 >> (code >> 9)) & 1) == 0 { return 0; } let code = code as u16; for i in 0..0...
Rust
0
"simd_x86", since = "1.27.0")] pub unsafe fn _mm256_permute_pd(a: __m256d, imm8: i32) -> __m256d { let imm8 = (imm8 & 0xFF) as u8; macro_rules! shuffle4 { ($a:expr, $b:expr, $c:expr, $d:expr) => { simd_shuffle4(a, _mm256_undefined_pd(), [$a, $b, $c, $d]); }; } macro_rules! s...
Rust
0
_3 = handle.clone(); let requests_to_serve_3 = requests_to_serve.clone(); timer::tick(&handle_3, requests_to_serve_3, time_slice, uri, &mut core); } /** * [114] Flatten Binary Tree to Linked List * * Given a binary tree, flatten it to a linked list in-place. * * For example, given the following tree: * *...
Rust
0
# analysis.py # ----------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # ...
Python
1
"); let body = json!({ "pid": 84562, "terminate": "true" }); match client .service() .cancel_query("myproject", "myservice", &body) .await { Ok(response) => { assert!(response.success, format!("{:?}", response)); } Err(e) => assert!(false, format!("{:?}", e)), } } #[tokio::test]...
Rust
0
file "localhost.ip6.zone"; }; zone "koompi.com" IN { type master; file "koompi.zone"; allow-update { none; }; notify no; };"#.to_string() } fn gen_named_conf_logging() -> String { r#" logging {{ channel xfer-log {{ file "/var/log/named.lo...
Rust
0
#!/usr/bin/env python import json import os from collections import OrderedDict from io import StringIO def to_json(self, path, nested=False, indent=None, **kwargs): """ Write :class:`TableSet` to either a set of JSON files for each table or a single nested JSON file. See :meth:`.Table.to_json` for ...
Python
1
# # 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"); y...
Python
1
let mut finder = Finder { lints: lints.iter().cloned().map(|l| (l, Span::default())).collect() }; finder.visit_file(&syn::parse_file(src)?); // Group lints by the line where they occur let mut inserts: BTreeMap<usize, HashSet<String>> = BTreeMap::new(); for (lint, smallest) in finder.lints {...
Rust
0
let mut output = Vec::new(); let mut r = ZiRead::from(w.into_string()); r.read_to_end(&mut output).unwrap(); input == output } quickcheck(two_write as fn(_: Vec<u8>) -> bool); } #[test] fn test_two_read() { fn two_read(input: Vec<u8>) -> bool { let x = input.len() / 2; ...
Rust
0
ge(&self, c: char) -> bool { Age::of(c).map_or(false, |age| age.actual() <= self.unic_version) } fn extract_char(&self, character: PyStrRef, vm: &VirtualMachine) -> PyResult<Option<char>> { let c = character .borrow_value() .chars() .exactly_one() ...
Rust
0
ith tf.Session() as sess: saver = tf.train.Saver(tf.all_variables()) ckpt = tf.train.get_checkpoint_state(args.save_dir) if ckpt and ckpt.model_checkpoint_path: saver.restore(sess, ckpt.model_checkpoint_path) data = data_loader.tensor.copy() n_chunks = len(data) / sa...
Python
1
reader - Timer Mode."] pub struct TMODE_R(crate::FieldReader<u8, TMODE_A>); impl TMODE_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { TMODE_R(crate::FieldReader::new(bits)) } #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> TMODE_A { ...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test Stemmers ---------------------------------- Tests for Stemmers in the `text_preparation.stemmers` module. """ import pytest from mindmeld.text_preparation.stemmers import ( StemmerFactory, EnglishNLTKStemmer, NoOpStemmer, SnowballNLTKStemmer, ) fr...
Python
1
))?; } else { render(&cfg, output_file, bg_output)?; if matches.is_present("watch") { watch(&cfg, &input_file, output_file, bg_output, matches.value_of("seed").map(|_| seed))?; } } Ok(()) } fn render(cfg: &RenderConfig, output_file: &str, output_file_bg: Option<&str>) ...
Rust
0
import warnings warnings.filterwarnings('ignore') import argparse, yaml, copy from ultralytics.models.yolo.detect.distill import DetectionDistiller if __name__ == '__main__': param_dict = { # origin 'model': 'E:/SCAM_yolo/ultralytics-main/yolov8-C2f-EMSCs.yaml', 'data': 'E:/SCAM_yolo/ultral...
Python
1
")] pub mod log_tracer; #[cfg(feature = "trace-logger")] pub mod trace_logger; #[cfg(feature = "log-tracer")] #[doc(inline)] pub use self::log_tracer::LogTracer; #[cfg(feature = "trace-logger")] #[deprecated( since = "0.1.1", note = "use the `tracing` crate's \"log\" feature flag instead" )] #[allow(deprecat...
Rust
0
& 0xbfffe400) == 0x0d606000 } pub const fn is_LD2_asisdlso_S2_2s(d: u32) -> bool { (d & 0xbfffec00) == 0x0d608000 } pub const fn is_LD2_asisdlso_D2_2d(d: u32) -> bool { (d & 0xbffffc00) == 0x0d608400 } pub const fn is_LD4_asisdlso_S4_4s(d: u32) -> bool { (d & 0xbfffec00) == 0x0d60a000 } pub const fn is...
Rust
0
价格区间,说明历史上处于转换前置状态,但新K线未满足价格条件,则要求其不应满足触发要求: if range_result is not None: lower, upper = range_result if direction == "long": # long 信号触发条件是:close >= lower_bound if lower is not None and current_price >= lower: p...
Python
1
unwrap()) { output.insert(*a, i); allergen_to_remove = Some((*a, i)); break; } } if let Some((a, i)) = allergen_to_remove { // Remove from remaining allergens remaining_allergens.remove(a); // Remove from c...
Rust
0
ilder::ball(BALL_RADIUS / RAPIER_SCALE) .restitution(1.0) // Bouncy .friction(0.0) // No friction // Set the user data: first 64 bits is the entity type and the second 64 bits is the entity ID .user_data((entity.id().to_bits() as u128) << 64 | PhysicsEntityType::Ball as u128); entit...
Rust
0
import asyncio from genaitor.core import ( Orchestrator, Flow, ExecutionMode ) from genaitor.presets.agents import create_preset_agents from genaitor.presets.tasks import create_preset_tasks from genaitor.presets.providers import create_gemini_provider from dotenv import load_dotenv import os load_dotenv() async...
Python
1
# # Copyright (c) 2018 Intel Corporation # # 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...
Python
1
from testsuite.test_utils.response import TestResponse import math import scipy from testsuite.test_utils.test_status_determiner import TestStatusDeterminer class RunsTest: DEFAULT_DECISION_RULE = 0.01 @staticmethod def run_test(bit_sequence: list[int], decision_rule=DEFAULT_DECISION_RULE): """ ...
Python
1
assert count_none(bestMatch) <= count_none(path_zero) # TODO: This is just sloppy, we want to make a copy but are updating in place. merge(bestMatch, path_one) tc_out[cond] = (bestMatch, path_one) # Now do the same for paths to True: if has_none(path_on...
Python
1
""" Created on 2024-02-05 based on https://raw.githubusercontent.com/zauberzeug/nicegui/main/examples/chat_app/main.py @author: wf """ from datetime import datetime from typing import List, Tuple from uuid import uuid4 from nicegui import Client, ui from ngwidgets.llm import LLM messages: List[Tuple[str, str, str...
Python
1
= models.ImageField(blank=True, upload_to='images/') # fix this to put images into newly created directory (by post's id + date) image_alt = models.CharField(max_length=255, blank=True) def __str__(self): return f'\nTitle: {self.title_en}\nSlug: {self.slug}\nID: {self.id}\nPost ID: {self.post_i...
Python
1
&tag).give(data)?; } Ok(()) } } struct SubtaskJoin<L, R, O, F> { peers: u32, parent_data: HashMap<Tag, Vec<Option<L>>>, func: F, _ph: std::marker::PhantomData<(R, O)>, } impl<L, R, O, F> SubtaskJoin<L, R, O, F> { pub fn new(meta: &OperatorMeta, func: F) -> Self { Subta...
Rust
0
{ return name == "emscripten" || name == "wasm32-bare"; } let triple: Vec<_> = triple.split('-').collect(); for &(triple_os, os) in OS_TABLE { if triple.contains(&triple_os) { return os == name; } } panic!("Cannot determine OS from triple"); } /// Determine the a...
Rust
0
sort(&self) -> Vec<usize> { let mut visited = vec![false; self.size()]; let mut topology_vec = Vec::with_capacity(self.size()); for vertex in 1..self.size() { if !visited[vertex]{ self.topoligical_dfs(&mut topology_vec, &mut visited, vertex); } } ...
Rust
0
e same value (IE when the approach vector is the normal to the segment). And that the returned angles are different otherwise. """ expected_output = xr.DataArray( data=np.deg2rad([-90.0, -90.0, -90.0]), dims=["time"] ) should_be_same_as_egocentric = expected_output.copy( data=[Tr...
Python
1
import json import urllib from tornado import gen, httpclient from graphite_beacon.handlers import AbstractHandler class OpsgenieHandler(AbstractHandler): name = 'opsgenie' defaults = { 'api_key': None } def init_handler(self): self.api_key = self.options.get('api_key') as...
Python
1
# main.py import discord from discord.ext import commands import asyncio from config import TOKEN, intents # 봇 생성 bot = commands.Bot(command_prefix='!', intents=intents) # Cog 파일들 목록 COGS_TO_LOAD = [ "cogs.general", "cogs.cat_commands", "cogs.chatbot" ] # Cog 로드 함수 async def load_extensions(): for co...
Python
1
( &table, &*format!("{} $a55a, Y", inst_str), mnemonic, opcodes.absolute_y, Address::AbsoluteY(0xa55a), )?; test_asm_line( &table, &*format!("{} ($a55a)", inst_str), mnemonic, opcodes.indirect, ...
Rust
0
import sys import bpy import os import time argv = sys.argv try: argv = argv[argv.index("--") + 1:] # get all args after "--" except ValueError: # test value argv = [ "M:/Unity/horizon-forge/levels/New Map/assets/shrub/0002_20B8/shrub.bin.glb" , "M:/Unity/horizon-forge/Assets/Maps/New Map/Shrub/8376/8...
Python
1
s != 0 { len += 1; s = s.add(1); } len } // mmap #[cfg(any(target_os = "android", target_os = "linux"))] const MAP_ANONYMOUS: i32 = 32; #[no_mangle] pub unsafe extern "C" fn mmap( addr: *mut c_void, length: usize, prot: c_int, flags: c_int, fd: c_int, offset: i64, ) ->...
Rust
0
modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hfrcoctrl](hfrcoctrl) module"] pub type HFRCOCTRL = crate::Reg<u32, _HFRCOCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _HFRCOCTRL; #[doc = "`read()` method returns [hfrcoctrl::R](hfrcoctrl::R...
Rust
0
EstimatorGpu { #[inline] fn as_raw_ImageMotionEstimatorBase(&self) -> *const c_void { self.inner_as_raw() } } impl crate::videostab::ImageMotionEstimatorBase for PtrOfKeypointBasedMotionEstimatorGpu { #[inline] fn as_raw_mut_ImageMotionEstimatorBase(&mut self) -> *mut c_void { self.inner_as_raw_mut() } } pt...
Rust
0
file:expr, $status:expr, $path:expr) => { test_case!($name, RemountAndInclude, $file, $status, $path); }; ($name:ident, $path_behaviour:ident, $file:expr, $status:expr, $path:expr) => { #[test] fn $name() -> Result<(), Box<dyn Error>> { let mut handler = make_rocket() ...
Rust
0
h(&Capability::Auth(AuthMechanism::Plain)); cap_vec.push(&Capability::Auth(AuthMechanism::Login)); cap_str.push_str("_AUTH"); } } } let greeting = Status::ok(None, None, "Fake IMAP server ready").unwrap(); let mut overrides = Ha...
Rust
0
; for dirty_addr in dirty_pages { debug!( self.log, "committing Page(address=0x{:x}, bytes=[{}])", dirty_addr, show_bytes_compact(&get_page(dirty_addr as *mut u8)[..]) ); let page_num = (dirty_addr as usize - sel...
Rust
0
ruction]>>(input: &T) -> Option<isize> { let input = input.as_ref(); let mut accumulator = 0; let mut ptr = 0; let mut instructions_hit = HashSet::new(); Some(loop { if instructions_hit.insert(ptr) { let instruction = &input[ptr as usize]; match instruction.opcode { ...
Rust
0
: &T, b: &T) -> T; fn mul(a: &T, b: &T) -> T; // conversion fn from_u32_raw(a: u32) -> T; fn from_u64_raw(a: u64) -> T; fn to_u64(a: T) -> u64; } use clap::{App, Arg, SubCommand}; use unveil_rs::unveil::UnveilProject; fn main() { let matches = App::new("Unveil.rs") .version("1.0") ...
Rust
0
utex`]. /// /// [`lock`]: FastMutex::lock /// [`try_lock`]: FastMutex::try_lock pub struct FastMutexGuard<'a, T: 'a + ?Sized> { pub(crate) lock: &'a mut FAST_MUTEX, pub(crate) data: &'a mut T, } impl<'a, T: ?Sized> Drop for FastMutexGuard<'a, T> { fn drop(&mut self) { unsafe { ExRelease...
Rust
0
_base_ = [ '../_base_/models/ssd300.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py' ] # model settings input_size = 300 model = dict( bbox_head=dict( type='SSDHead', anchor_generator=dict( type='LegacySSDAnchorGene...
Python
1
.to_string(), '&' => "_ampercand".to_string(), '\'' => "_quote".to_string(), '(' => "_left_paranthesis".to_string(), ')' => "_right_paranthesis".to_string(), '*' => "_asterisk".to_string(), '+' => "_plus".to_string(), ',' => "_comma".to...
Rust
0
Some(OperandSize::Zmmword), None, )), operand4: Some(Literal8(38)), lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: Some(MaskReg::K2), broadcast: None, }, ...
Rust
0
_origin(state: State) -> (State, Response) { let mut res = create_response(&state, StatusCode::Ok, Some((vec![], mime::TEXT_PLAIN))); { let headers = res.headers_mut(); headers.set(AccessControlAllowOrigin::Value("http://localhost:4200".into())); headers.set(AccessControlAllowHeaders(vec...
Rust
0
e_true", help="Use flag if rubric contains GradedTaskNodes.", ) parser.add_argument( "--model", type=str, default="o1", help="Model to use for the LLM", ) parser.add_argument( "--use-api", action="store_true", help="Use flag if you want to ...
Python
1
best_combination = get_best_hyperparameter_combination('lending','medium') worst_hyperparameters = find_worst_hyperparameters('lending','medium') best_combination = get_best_hyperparameter_combination('lending','low') worst_hyperparameters = find_worst_hyperparameters('lending','low') best_combination = get_best...
Python
1
entry to revocation status check for certificate with serial number {} issued by {} to cache", key.1, key.0).as_str()); cache_map.insert(key, status_and_time); } } } use warp::Filter; use std::sync::{Arc, RwLock}; use std::collections::HashMap; use crate::proto::Trigger; struct Trigge...
Rust
0
int, ) -> BOOL; pub fn CallMsgFilterW( lpMsg: LPMSG, nCode: c_int, ) -> BOOL; pub fn OpenClipboard( hWnd: HWND, ) -> BOOL; pub fn CloseClipboard() -> BOOL; pub fn GetClipboardSequenceNumber() -> DWORD; pub fn GetClipboardOwner() -> HWND; pub fn SetClipboardVie...
Rust
0
^ ^ // | | // b ---+ // "digraph { a -> c -> d -> e -> c; b -> d; b -> e; }", let mut relation = TransitiveRelation::new(); relation.add("a", "c"); relation.add("c", "d"); relation.add("d", "e"); relation.add("e", "c"); relation.add("b", "d"); r...
Rust
0
if node['include_bjs_header']: #we only want to inject the CODEPEN_INIT on one #bokehjs-content block per page resources = get_sphinx_resources(include_bokehjs_api=True) self.body.append(BJS_CODEPEN_INIT.render( css_files=resources.css_files, js_files=resourc...
Python
1
import re from dndme.commands import Command from dndme.gametime import Date class AdjustDate(Command): keywords = ["date"] help_text = """{keyword} {divider} Summary: Query, set, or adjust the in-game date using the calendar specified at startup. Usage: {keyword} {keyword} <day> <month> [<year>] ...
Python
1
import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm import matplotlib # 支持中文显示 matplotlib.rcParams['font.sans-serif'] = ['SimHei'] matplotlib.rcParams['axes.unicode_minus'] = False # 仿真参数 N_sim = int(1e6) # 符号数 EbN0_dB = np.arange(0, 21, 1) # Eb/N0 范围 (dB) N_path = 16 ...
Python
1
Cookies, uri: String) -> Redirect { clear_cookies(&mut cookies); Redirect::to(uri) } #[get("/clear_cookies")] fn clear_cookies_page_noredir(mut cookies: Cookies) -> Redirect { clear_cookies(&mut cookies); Redirect::to("/") } fn main() { thread::spawn(|| { http_to_https::Config::new() ...
Rust
0
<Coordinate>> #[doc(hidden)] #[derive(Debug)] pub struct MapCoordsIter< 'a, T: 'a + CoordinateType, Iter1: Iterator<Item = &'a Iter2>, Iter2: 'a + CoordsIter<'a, T>, >(Iter1, marker::PhantomData<T>); impl<'a, T: 'a + CoordinateType, Iter1: Iterator<Item = &'a Iter2>, Iter2: CoordsIter<'a, T>> Itera...
Rust
0
#!/usr/bin/env python3 """ Script de teste para o sistema unificado de gravação de dados Valida integração com callbacks e persistência em Parquet """ import os import sys import time import logging from pathlib import Path from datetime import datetime from dotenv import load_dotenv # Carregar configurações load_dot...
Python
1
import time from animation import * line1 = "Từng cái vỗ về" line2 = "Từng cái nắm tay" line3 = "Từng cái nhíu mày" line4 = "\tKhi gặp nhiều điều đắng cay" line5 = "Và từng khóc" line5a = " trên vai nhau" line6 = " Rồi cùng ngủ thiếp đi" line6a = "\t\t\ttrong yên bình" line7 = "Dù cho tận thế" line8 = "\tVẫn yêu...
Python
1