Skip to content

Instantly share code, notes, and snippets.

View trizist's full-sized avatar
💭
Contentment is half emaan

Umair Siddiquie trizist

💭
Contentment is half emaan
View GitHub Profile
@trizist
trizist / content_defined_parquet_writer.py
Created July 2, 2025 23:42 — forked from ylow/content_defined_parquet_writer.py
Content Defined Parquet Writing Prototype
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
min_row_count = 512
max_row_count = 2048
def write_parquet_content_defined(df: pd.DataFrame, key_column: str, output_file: str):
# Initialize the Parquet writer object
writer = None
batch_accumulator = []
use std::sync::RwLock;
use std::sync::RwLockReadGuard;
#[allow(dead_code)]
pub struct Store<T, U> {
name: String,
state: RwLock<T>,
listeners: RwLock<Vec<fn(&T, &U)>>,
reducer: fn(&mut T, &U),
}
@trizist
trizist / main.rs
Created July 2, 2025 23:40 — forked from cetra3/main.rs
Example FFmpeg to image output
/*
Copyright 2021 https://github.com/cetra3/
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, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
@trizist
trizist / arxiv_search_service_guide.md
Last active July 2, 2025 04:36
Complete Guide to arXiv Search Service Base Classes - Python data structures and patterns for building academic paper search systems with type safety, classification handling, and query management ```
@trizist
trizist / grpo_demo.py
Created February 23, 2025 06:31 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer