text
string
label_name
string
labels
int64
U RS5up[U S5upU SU S U S 3nUR!S UR"S US USU35IShvN gUR!S5IShvN gUR!S5IShvN gGNGNiN?N'N7f)Nr ...
Python
1
tion::Some(WordRequest_WordRequestType::WordRequestType_Matrix6), _ => ::std::option::Option::None } } fn values() -> &'static [Self] { static values: &'static [WordRequest_WordRequestType] = &[ WordRequest_WordRequestType::WordRequestType_Plain, WordRequest_...
Rust
0
500) ocpbtn.place(x=10, y=550) #cadastra o cliente def cadastrocli(): pessoa = [ (rgent.get(), ocpent2.get(), cllent.get(), "")] for rg, nomep, cll, divida in pessoa: hospede = Cliente(rg, nomep, cll, divida) clients.append(hospede) rgent.de...
Python
1
ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ //! Type definitions for testing. Includes various mocks. use crate::test::mocks::rpc_responder_mock::RpcResponderMock; use itp_sgx_crypto::Aes; use itp_test::mock::onchain_mo...
Rust
0
macro_rules! make_cluster_tests { ( $( $name:ident $($raw:literal),* | $([$start:literal, $end:literal])*;)*) => { $( mod $name { use super::super::*; #[test] fn test_cluster() { let input = [$($r...
Rust
0
_: Self::Substream, _: SubstreamEndpoint<Self::OutboundOpenInfo>) {} fn inject_event(&mut self, _: Self::InEvent) {} fn inject_address_change(&mut self, _: &Multiaddr) {} fn poll(&mut self, _: &mut Context<'_>) -> Poll<Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEve...
Rust
0
PNG&fmt=auto&q=75&size=f585_410", "jumpUrl": "https://image.baidu.com/front/aigc?tn=aigc&fr=b_guidecard&word=%E7%8C%AB%E5%92%AA%E5%9B%BE%E7%89%87&applid=11804063332518040958&lid=11804063332518040958&width=1440&height=1920", "reqParams": {"query83": 19, "query970": 858, "q...
Python
1
ids.remove(&pid); return Some((pid, *offset)); } *offset }; inner.remove(&offset); None } fn add_pids(&self, offset: LogOffset, pids: BTreeSet<PageId>) { let mut inner = self.inner.lock(); let prev = inner.insert(offset, pids); ...
Rust
0
derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Ascend1 { pub name: String, pub count: i64, } #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Ascend2 { pub name: String, pub...
Rust
0
groupname) { Some(g) => { Ok(g.gid()) }, None => { Err(From::from("Failed to obtain gid for given groupname.")) } } } fn get_current_uid(&self) -> Result<u32, Box<dyn Error>> { Ok(get_current_uid()) } } <gh_st...
Rust
0
&self.mines.reverse(); } pub fn print_fields(&self) { let y = self.size.1; for mine in self.mines.iter() { print!("x"); if (y-1) == mine.position.1 { println!(""); } } println!(""); } pub fn print_fields_...
Rust
0
{error::UnpackError, packer::Packer, unpacker::Unpacker, Packable}; use core::convert::Infallible; macro_rules! impl_packable_for_integer { ($ty:ty) => { impl Packable for $ty { type UnpackError = Infallible; #[inline(always)] fn pack<P: Packer>(&self, packer: &mut P) ...
Rust
0
stiefel_param = ManifoldParameter(Q_, manifold=manifold) # ------------------------------------------------------------------------------ # 5) Riemannian Optimizer # ------------------------------------------------------------------------------ learning_rate = 1e-3 ...
Python
1
# SPDX-FileCopyrightText: 2025 M5Stack Technology CO LTD # # SPDX-License-Identifier: MIT import os, sys, io import M5 from M5 import * from module import LTEModule import requests2 label0 = None label1 = None label2 = None label3 = None label4 = None label5 = None label6 = None label7 = None label8 = None label9 = ...
Python
1
{name} match") else: # print(tensor) # print(torch_tensor) print((tensor - torch_tensor).abs().max()) print((tensor - torch_tensor).abs().max()/torch_tensor.abs().mean()) print(f"❌ Torch and Torch C64 {name} differ") # triton.test...
Python
1
import functools from pathlib import Path from django.conf import settings from django.template.backends.django import DjangoTemplates from django.template.loader import get_template from django.utils.functional import cached_property from django.utils.module_loading import import_string ROOT = Path(__file__).parent ...
Python
1
import numpy as np import errno import os import cv2 import math from shapely.geometry import Polygon from cfglib.config import config as cfg from scipy import ndimage as ndimg def to_device(*tensors): if len(tensors) < 2: return tensors[0].to(cfg.device) return (t.to(cfg.device) for t in tensors) de...
Python
1
"""create vacancies table Revision ID: 296985049689 Revises: c39950991d98 Create Date: 2025-09-19 22:22:28.763949 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = '296985049689' down_revision: Union[str, Sequence[str], No...
Python
1
(Debug, AperCodec)] #[asn(type = "SEQUENCE", extensible = true, optional_fields = 1)] pub struct TNLInformationEnhRelInfoRes { pub dl_forwarding_transport_layer_address: TransportLayerAddress, pub dl_forwarding_transport_association: IuTransportAssociation, #[asn(optional_idx = 0)] pub ie_extensions: Op...
Rust
0
from fastapi import FastAPI, HTTPException import subprocess app = FastAPI() @app.get("/execute/{cpu}/{script_name}") def execute_command(cpu: str, script_name: str): try: # Define comandos según el script_name usando un switch-like estructura command = [ "docker", "run", "--env-file"...
Python
1
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 your option) any later version. # # This program is distrib...
Python
1
Formatter) -> fmt::Result { write!(f, "parser error") } } pub fn parse_tokens(tokens: Vec<Token>) -> Result<ParserResult, ParserErr> { let mut src = TokenSrc::from(tokens); match parse_workflow(&mut src) { Some(node) => { return Ok(ParserResult { root: node, ...
Rust
0
Receiver<uri::Uri>, pool: deadpool::unmanaged::Pool<client::Client>, } impl ClientPool { pub fn new( tx: mpsc::Sender<types::Response>, rx: mpsc::Receiver<uri::Uri>, clients: Vec<Client>, ) -> Self { let pool = Pool::from(clients); ClientPool { tx, rx, pool } } ...
Rust
0
{ let (iter, r, _, w, _) = (a, b, &mut *c, &mut *d).iter().entities(ctx); for entity in iter { let x = r.get(entity).unwrap(); let y = w.get_mut(entity).unwrap(); println!("x={}, y={}", x, y); ...
Rust
0
utils::{AllocGadget, EqGadget, ToBitsGadget, ToBytesGadget}, }; use std::{borrow::Borrow, marker::PhantomData}; #[derive(Derivative)] #[derivative(Clone(bound = "P::G1Gadget: Clone, P::G2Gadget: Clone"))] pub struct ProofGadget< PairingE: PairingEngine, ConstraintE: PairingEngine, P: PairingGadget<Pai...
Rust
0
let config = Arc::new(Config::default().validate()?); let router = Arc::new(RaftRouter::new(config.clone())); let mut n_logs = 0; tracing::info!("--- initializing cluster"); { router.new_raft_node(0).await; router.wait_for_log(&btreeset![0], n_logs, None, "empty").await?; ...
Rust
0
gr_list_2 = div(&gr_list_2, d); let gr_list = gr_zip(&mut gr_list_1, &mut gr_list_2); g.add(poly( &gr_list, PolyArgs { x_off, y_off, fil: "white".to_string(), stroke: "none".to_string(), width: 2., name: Some("sflt mnt...
Rust
0
(plaintext.encode()) return base64.b64encode(ciphertext).decode() def encrypt_para(plaintext): public_key = RSA.import_key(public_key_data) cipher = PKCS1_v1_5.new(public_key) ciphertext = cipher.encrypt(plaintext.encode()) return ciphertext.hex() def encode_phone(text): encoded_chars = [] ...
Python
1
total 1499 output rows (999 from lp1 + 100 from lp2 - 500 duplicates) let mut num_rows: usize = batches[0].iter().map(|rb| rb.num_rows()).sum(); num_rows += batches[1].iter().map(|rb| rb.num_rows()).sum::<usize>(); assert_eq!(num_rows, 1499); } } <gh_stars>1-10 rye::test_harness!(); #[rye:...
Rust
0
pt_step = -1 maps = np.zeros(nc) # mAP per class results = (0, 0, 0, 0, 0, 0, 0) # P, R, mAP@.5, mAP@.5-.95, val_loss(box, obj, cls) scheduler.last_epoch = start_epoch - 1 # do not move # 自动混合精度训练 scaler = amp.GradScaler(enabled=cuda) # 初始化计算loss的类 compute_loss = ComputeLoss(model) # ini...
Python
1
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 Imperial College London (Pingchuan Ma) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import warnings import torchvision from ibug.face_detection import RetinaFacePredictor from ibug.face_alignment import FANPredictor warnings.filterwarnings(...
Python
1
String::from("A good post"))); } #[test] fn title_else() { assert_eq!(meta("title: true").title(), None); } #[test] fn title_missing() { assert_eq!(meta("not-title: true").title(), None); } #[test] fn tags_one() { assert_eq!(meta("tags:\n - one").tags(), v...
Rust
0
new_states.append(torch.cat([state, zeros], 1)) final_states = new_states # It's possible to need to pass sequences which are padded to longer than the # max length of the sequence to a Seq2SeqEncoder. However, packing and unpacking # the sequences mean that the returned te...
Python
1
" contains score, probably secret key for reCAPTCHA v2", ) raise ValidationError(self.messages["captcha_error"], code="captcha_error") action = check_captcha_response.extra_data.get("action", "") if self.recaptcha_required_score > float(self.score): logger.info(...
Python
1
DWORD = 5; pub const CERT_STORE_ADD_NEWER: DWORD = 6; pub const CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES: DWORD = 7; pub const CERT_STORE_SAVE_AS_STORE: DWORD = 1; pub const CERT_STORE_SAVE_AS_PKCS7: DWORD = 2; pub const CERT_STORE_SAVE_TO_FILE: DWORD = 1; pub const CERT_STORE_SAVE_TO_MEMORY: DWORD = 2; pub const CERT_...
Rust
0
move |x| (x, y))) .map(|(x, y)| Lx.get(x, y).powi(2) as f64 + Ly.get(x, y).powi(2) as f64) .map(float_ord::FloatOrd) .max() .unwrap() .0 .sqrt(); for y in 1..(gaussian.height() - 1) { for x in 1..(gaussian.width() - 1) { let modg = (Lx.get(x, y).po...
Rust
0
params[1]].index] user_item_dict = data.to_dict() user_mapping = [] item_set = set() for user_id, item_list in data.iteritems(): user_mapping.append(user_id) for item_id in item_list: item_set.add(item_id) item_mapping = list(item_set) print('num of users:{}, num o...
Python
1
from django.urls import path from rest_framework.routers import DefaultRouter from materials.apps import MaterialsConfig from materials.views import CourseViewSet, LessonCreateAPIView, LessonListAPIView, LessonRetrieveAPIView, \ LessonUpdateAPIView, LessonDestroyAPIView, SubscriptionAPIView app_name = MaterialsCo...
Python
1
# type: ignore """ Example" - Connect to the Chroma database (with or without authorization) - Load data from Apify's dataset and store it in the Chroma database - Perform a query search Run chroma docker docker pull chromadb/chroma docker run -p 8000:8000 chromadb/chroma """ import os import chromadb from apify_cli...
Python
1
delete_router(&router_name_b).await.unwrap(); // add routers client.update_router(cfg_foo_1.clone()).await.unwrap(); client.update_router(cfg_bar.clone()).await.unwrap(); let routers = client.list_routers().await.unwrap(); assert_eq!(routers.len(), 2); assert_eq!(&routers[0], &cfg_bar); ass...
Rust
0
import os import numpy as np from shape_model.mesh_obj import mesh_obj def create_displacements(combined_data, ref_mesh_path): train_data = np.load(combined_data) ref_mesh = mesh_obj(ref_mesh_path) print(np.array(ref_mesh.vertices).reshape(78951).shape) print(train_data.shape) displace_data = tra...
Python
1
= "-l"; // scp传输时的状态常量 /// 代表当前接收的数据是文件的最后修改时间和最后访问时间 /// "T1647767946 0 1647767946 0\n"; pub const T :u8 = 'T' as u8; /// 代表当前接收的数据是文件夹 /// "D0775 0 dirName\n" pub const D :u8 = 'D' as u8; /// 代表当前接收的数据是文件 /// "C0664 200 fileName...
Rust
0
d_at, } } /// Create a new BlockSignature by signing a block. /// Since is generally done inside an enclave, time is not available. As /// such, `signed_at` is being initialized to zero. It can then be set /// by calling `set_signed_at`. pub fn from_block_and_keypair( block: &Bl...
Rust
0
'main, _ => (), }, _ => (), } } // Instantiate the widgets. { let ui = &mut ui.set_widgets(); // Draw a light blue background. widget::Canvas::new().color(color::LIGHT_BLUE).set(ids.background, ...
Rust
0
status_code=404, detail=f"文章不存在: {article_id}" ) raise HTTPException( status_code=500, detail=f"获取文章失败: {result.get('error', '未知错误')}" ) return result except HTTPException: raise exce...
Python
1
": "Aedes", }, "metadata": { "vector_status": True, "diseases": ["Dengue", "Zika"], "habitat": "Urban", "breeding_sites": ["Artificial containers"], "sources": ...
Python
1
[inline] pub fn cfdctrl_mut(&self) -> *mut Cfdctrl { self.cfdctrl_reg().ptr() } #[doc="Get the *const pointer for the CFDCTRL register."] #[inline] pub fn cfdctrl_ptr(&self) -> *const Cfdctrl { self.cfdctrl_reg().ptr() } #[doc="Read the CFDCTRL register."] #[inline] pub fn cf...
Rust
0
y: pos_array[1] as u32, z: pos_array[2], }; if let Some(parsed) = BlockEntity::from_nbt(val) { parsed_block_entities.insert(pos, parsed); } } Some(WorldEditClipboard { size_x, size_y, size_z, ...
Rust
0
ot None else out # scale output out = self.bias(out) if self.bias is not None else out # add bias # apply ecm scaling (optional) return self.ecm(out) if self.ecm else out def backward(self, grad_out): grad = grad_out grad = self.ecm.backward(grad) if self.ecm else grad ...
Python
1
self)->Option<CompTLFields>{ match self.data { MonoTLData::Primitive{..}=>return None, MonoTLData::Opaque=>return None, MonoTLData::Struct{fields}=>Some(fields), MonoTLData::Union{fields}=>Some(fields), MonoTLData::Enum (tlenum)=>Some(tlenum.fields), ...
Rust
0
ts { use super::*; const SAMPLE: &str = "1163751742 1381373672 2136511328 3694931569 7463417111 1319128137 1359912421 3125421639 1293138521 2311944581"; #[test] fn test_part_1() { let input = input_generator(SAMPLE); assert_eq!(part1(&input), 40); } #[test] fn test_part_2()...
Rust
0
y for the Sprout parameters, which // appears at the beginning of the parameter file. The rest is loaded // during proving time. let sprout_vk = sprout_fs.as_mut().map(|mut fs| { VerifyingKey::<Bls12>::read(&mut fs) .expect("couldn't deserialize Sprout Groth16 verifying key") }); ...
Rust
0
out_channels=interplanes, kernel_size=3, stride=1, padding=1, ), nn.BatchNorm3d(interplanes), nn.ReLU(), ) else: self.con_bn_relu = nn.Sequential( nn.C...
Python
1
); let compound_setup_params = compound_proof::SetupParams { vanilla_params: setup_params( PaddedBytesAmount::from(porep_config), usize::from(PoRepProofPartitions::from(porep_config)), )?, partitions: Some(usize::from(PoRepProofPartitions::from(porep_config))), ...
Rust
0
st N: usize> Clone for SliceStorageDefault<'a, T, N> { slice_storage_impl_clone!(); } impl<'a, T: 'a + Clone + PartialEq + Default, const N: usize> Clone for SliceStorageDefaultClone<'a, T, N> { slice_storage_impl_clone!(); } macro_rules! slice_storage_newlike_impl { ($copy_or_clone_default: ident)...
Rust
0
lled on exit signal def close(_, __, sm: SocketManager) -> None: print(f'Closing {SERVER_ADDR}') sm.close_all() sys.exit(0) # init socket manager sm = SocketManager() sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.bind(SERVER_ADDR) sock.listen(1) # store socket for future close sm(sock) # t...
Python
1
import numpy as np import pandas as pd import matplotlib.pyplot as plt def draw_graph(df, y, x, color, figsize, legend, title, xlabel, ylabel, start_layer, end_layer): df.columns = df.columns.str.strip() if(end_layer == "all"): df_new = df else: df_new = df[start_layer:end_layer] my_plo...
Python
1
ult(), validation_code, &params.encode(), spawner, ) }, #[cfg(not(any(target_os = "android", target_os = "unknown")))] IsolationStrategy::ExternalProcessSelfHost(pool) => { pool.validate_candidate(validation_code, params) }, #[cfg(not(any(target_os = "android", target_os = "unknown")))] Is...
Rust
0
of the fields. /// /// This macro should only be used for fields where the value is not validated beyond its type. macro_rules! builders { ($($builder_name:ident $name:ident: $ty:ty),+ $(,)?) => {$( /// Set the named component and return `self`. pub const fn $builder_name(mut self, value: $ty) -> O...
Rust
0
], z: E, ) -> Option<(E, Vec<E>)> { if air.context().options().field_extension().is_none() { None } else { Some(( z.conjugate(), trace_state.iter().map(|v| v.conjugate()).collect(), )) } } <reponame>krendil/gleam use crate::assert_js; use crate::javascript...
Rust
0
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * generator = cms.EDFilter("Pythia8GeneratorFilter", maxeventsToPrint = cms.untracked.int32(1), pythiaPylistVerbosity = cms.untracked.int32(1)...
Python
1
{ logger: stderr(), tasks: HashMap::new(), } } } impl EchoGlobalState { pub fn new() -> Self { Default::default() } } impl GlobalState for EchoGlobalState { fn new() -> Self { EchoGlobalState::new() } } //impl TaskEventHandler for EchoGlobalState {...
Rust
0
Count as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(StdVideoEncodeH265ReferenceModifications), "::", stringify!(referenceList0ModificationsCount) ) ); assert_eq!( unsafe { &(*(::std::pt...
Rust
0
Command::new("git") .args(&["reset", "--hard", "HEAD^"]) .current_dir(repo_dir.as_path()) .output()?; barrier(); Ok(()) } fn diverge(repo_dir: &PathBuf) -> io::Result<()> { Command::new("git") .args(&["reset", "--hard", "HEAD^"]) .current_dir(repo_dir.as_path())...
Rust
0
sessions WHERE id = ?1", &[&message.session_id])?; Ok(()) }); } } impl Handler<FetchUrlCached> for RusqliteStore { fn handle(&mut self, message: FetchUrlCached, cx: Context<Self, FetchUrlCached>) { // TODO: Add locking to coordinate multiple fetches for the same resource. l...
Rust
0
let (min_ns, max_ns) = frame.range_ns; ui.label(format!( "Showing frame #{}, {:.1} ms, {} threads, {} scopes, {:.1} kB", frame.frame_index, (max_ns - min_ns) as f64 * 1e-6, frame.thread_streams.len(), frame.num_scopes, ...
Rust
0
tracing::trace!(target: "stuff", "and neither should this"); tracing::warn!(target: "stuff", "this should be enabled"); tracing::error!("this should be enabled too"); tracing::error!(target: "stuff", "this should be enabled also"); }); finished.assert_finished(); } #[test] fn not_order...
Rust
0
One("w:latentStyles", successors=_tag_seq[2:]) style = ZeroOrMore("w:style", successors=()) del _tag_seq def add_style_of_type(self, name, style_type, builtin): """Return a newly added `w:style` element having `name` and `style_type`. `w:style/@customStyle` is set based on the value of `bu...
Python
1
!(Xyz<Wp, T>, [x, y, z], white_point); impl_color_mul!(Xyz<Wp, T>, [x, y, z], white_point); impl_color_div!(Xyz<Wp, T>, [x, y, z], white_point); impl_array_casts!(Xyz<Wp, T>, [T; 3]); impl_eq!(Xyz<Wp>, [x, y, z]); impl<Wp, T> RelativeContrast for Xyz<Wp, T> where T: Real + Arithmetics + PartialOrd, { type Sc...
Rust
0
EPC_PFLTACT_UNCHG => 0, USB_EPC_PFLTACTW::USB_EPC_PFLTACT_TRIS => 1, USB_EPC_PFLTACTW::USB_EPC_PFLTACT_LOW => 2, USB_EPC_PFLTACTW::USB_EPC_PFLTACT_HIGH => 3, } } } #[doc = r"Proxy"] pub struct _USB_EPC_PFLTACTW<'a> { w: &'a mut W, } impl<'a> _USB_EPC_PFLTACTW<'a> { ...
Rust
0
_GP20: RWRegister<u32>, _reserved41: [u32; 3], /// Value of OTP Bank5 Word2 (SW GP2) pub HW_OCOTP_SW_GP21: RWRegister<u32>, _reserved42: [u32; 3], /// Value of OTP Bank5 Word3 (SW GP2) pub HW_OCOTP_SW_GP22: RWRegister<u32>, _reserved43: [u32; 3], /// Value of OTP Bank5 Word4 (SW GP...
Rust
0
countered unset `TextureAttachment::Input`. The `RenderGraph` executor should always set `TextureAttachment::Inputs` to `TextureAttachment::RenderResource` before running. This is a bug, please report it!"), } } fn create_wgpu_color_attachment_descriptor<'a>( global_render_resource_bindings: &RenderResourceBin...
Rust
0
import pytest from model_training.custom_datasets.formatting import QA_SPECIAL_TOKENS, DatasetEntrySft, Role, Utterance def test_dataset_entry_formatting_missing_lang(): ds_entry = DatasetEntrySft( conversation=[ Utterance( text="What is the capital of France?", ...
Python
1
import os from decouple import config from datetime import timedelta BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # uri = config('DATABASE_URL') # if uri.startswith("postgres://"): # uri = uri.replace("postgres://", "postgresql://", 1) class Config: SECRET_KEY = config('SECRET_KEY'...
Python
1
= &xi[1..]; let c = xi[0]; y_plus .iter_mut() .zip(y.iter()) .zip(w_alm_aux.iter()) .for_each(|((y_plus_i, y_i), w_alm_aux_i)| *y_plus_i = w_alm_aux_i + y_i / c); // Step #3: y_plus := Proj_C(y_plus) alm_se...
Rust
0
# %% from itertools import groupby from datasets import load_dataset import librosa import torch from transformers import AutoModelForCTC, AutoProcessor, Wav2Vec2Processor def decode_phonemes( ids: torch.Tensor, processor: Wav2Vec2Processor, ignore_stress: bool = False, ) -> str: """CTC-like decoding. First ...
Python
1
# (Be in -*- python -*- mode.) # # ==================================================================== # Copyright (c) 2006-2008 CollabNet. All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of ...
Python
1
, github_url) if match: repo_path = match.group(1) github_url = f"https://github.com/{repo_path}" else: github_url = "https://github.com/" + github_url.strip() logger.info(f"[DependencyManager] 标准化后的URL: {github_url}") ...
Python
1
"""Pipeline to load personio data into Duckdb.""" from typing import List import dlt from personio import personio_source def load_resources(resources: List[str]) -> None: """Execute a pipeline that will load the given Personio resources incrementally. Subsequent runs will load only items updated since the ...
Python
1
const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(pci_map), "::", stringify!(path) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<pci_map>())).offset as *const _ as usize }, 16usize, concat!( ...
Rust
0
# Enter 2 lists of integers. Check whether list sums to same value l1= [int(n) for n in input("Enter values in list 1: ").split()] l2= [int(n) for n in input("Enter values in list 2: ").split()] s1=sum(l1) s2=sum(l2) print("Sum of list1:",s1) print("Sum of list2:",s2) if(s1==s2): print("The sum of list1 & list2 are s...
Python
1
impl RX_TZA1_DIAGSELR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of th...
Rust
0
fn default() -> Self { unsafe { std::mem::MaybeUninit::zeroed().assume_init() } } } /// The opcode for `Input::Event` errors. /// /// If this value plus the extension error base appears in [`xcb_generic_error_t::error_code`], /// then the type of the error is [`xcb_input_event_error_t`]. pub const XCB_INPU...
Rust
0
, Err(f) => panic!(f.to_string()), }; let chain_len = matches .opt_str("l") .unwrap_or_else(|| String::from("1")) .parse() .expect("Could not parse chain length"); let chain_pos = matches .opt_str("j") .unwrap_or_else(|| String::from("0")) .p...
Rust
0
alse => data[3].0, }; let end_key = product.get_record_range_one(end_id); assert_eq!(res_start_key, start_key); assert_ge!(res_end_key, end_key.get_start()); assert_le!(res_end_key, end_key.get_end()); } // test drained for desc in [false, true] { let paging_...
Rust
0
), ) CloseMessageWindow() OP_62(0x0101, 0x00000000, 2000, 0x02, 0x07, 0x00000050, 0x01) PlaySE(39, 0x00, 0x64) Sleep(1000) @scena.Lambda('lambda_E908') def lambda_E908(): CameraMove(-40, 4010, 32640, 4000) ExitThread() DispatchAsync(0x0101, 0x0000, lambda_E908) ...
Python
1
global fix_disk fix_disk = input("输入盘符:") if len(fix_disk) == 2: print("开始修复...") os.system(f"chkdsk {fix_disk} /F") print("修复完成!") os.system("pause") elif len(fix_disk) == 1: print("开始修复...") os.system(f"chkdsk {fix_disk}: /F") print("修复完成!") ...
Python
1
""" This module provides some constants used by WHAD to communicate with the RZUSBStick. """ from enum import IntEnum # USB device reset class RZUSBStickOSPrimitive(IntEnum): """OS Primitive enumeration. """ USBDEVFS_RESET = ord('U') << (4 * 2) | 20 # RZUSBStick Internal states class RZUSBStickInternalSta...
Python
1
rr) => return format!("{:?}", err), } } fn get_example_usage(&self) -> String { self.example_usage.clone() } fn get_toolbox(&self) -> String { self.toolbox.clone() } fn run<'a>( &self, args: Vec<String>, working_directory: &'a str, verbo...
Rust
0
allInteger ) # 0 = basic limit usage isActive: Mapped[bool | None] = mapped_column(Boolean) isSuperuser: Mapped[bool | None] = mapped_column(Boolean) isBanned: Mapped[bool | None] = mapped_column(Boolean) hashedPassword: Mapped[str] = mapped_column(String, nullable=False) createdAt: Mapped[date...
Python
1
timeline title History of Social Media Platforms 2002 : LinkedIn 2004 : Facebook : Google 2005 : Youtube 2006 : Twitter </chart-response> </example> <example> <user-chart-request> ...
Python
1
def pauseRunningDownloaders(self=self): self.pausedDownloaders = list() for dl in downloader.RemoteDownloader.make_view(): if dl.get_state() == 'downloading': self.pausedDownloaders.append(dl) dlCount = len(self.pausedDownloaders) i...
Python
1
self.scheduler.next_event() .map(|t| t.checked_duration_since(Instant::now()).expect("event in the far future")); trace!("processor waiting for poll, with timeout {:?}", timeout); self.poll.poll(&mut events, timeout).expect("poll error"); trace!("processor woken up"); // First handle control messages ...
Rust
0
) except Exception as e: self.get_logger().error(f'Error in process_image: {e}') def get_marker_corners_3d(self): return np.array([ [-self.marker_size / 2, self.marker_size / 2, 0], [self.marker_size / 2, self.marker_size / 2, 0], [self.marke...
Python
1
import getopt import sys from termcolor import colored shortOpts = "hi:o:f:" longOpts = ["help", "input=", "outputDir=", "factor=", "fontname=", "familyname=", "fullname="] def parseOpts(): """Parses, validates, and handles all script input arguments.""" args = {} try: arguments, values = getop...
Python
1
led duplicating tpdp packet") sys.stdout.flush() return tpdp_packet += ciphertext tpdp_packet = update_len_field(tpdp_packet, len(ciphertext)) tpdp_packet = calc_checksum(tpdp_packet) return tpdp_packet def exploit(rhost, command): print("Starting exploit") sys.stdout.flush() ...
Python
1
c_usize_byref(memory, environ_size_ptr, environ_size as usize) } pub(crate) fn random_get( memory: &mut [u8], buf_ptr: wasm32::uintptr_t, buf_len: wasm32::size_t, ) -> Result<()> { use rand::{thread_rng, RngCore}; trace!("random_get(buf_ptr={:#x?}, buf_len={:?})", buf_ptr, buf_len); let buf =...
Rust
0
low: u8, high: u8) -> i16 { decode_short(low, high) } /// Decode Packet 56 (Main Brush Motor Current) and return its value /// /// This returns the current being drawn by the side brush motor as an unsigned 16 bit value, high byte first. /// Range: -32768 – 32767 mA /// /// Arguments: /// high: The high byte o...
Rust
0
import os import logging from flask import Flask, request, jsonify, render_template from scraper import ShopifyStoreScraper # Set up logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) # Create Flask app app = Flask(__name__) app.secret_key = os.environ.get("SESSION_SECRET", "dev_sec...
Python
1
rr(|_| InvalidAssignment)?; if claimed_core_index.0 >= config.n_cores { return Err(InvalidAssignment); } // Check that the validator was not part of the backing group // and not already assigned. let is_in_backing = is_in_backing_group( &config.validator_groups, validator_index, backing_group, ); if i...
Rust
0