Skip to content

Instantly share code, notes, and snippets.

View cristian-bicheru's full-sized avatar
🚀

Cristian Bicheru cristian-bicheru

🚀
View GitHub Profile
"""
Programmatically generate rocket engine regenerative cooling geometry using CadQuery 2.
"""
import cadquery as cq
import math
import argparse
from tqdm import tqdm
import time
start_time = time.time()
@cristian-bicheru
cristian-bicheru / winapi_compress_decompress.py
Last active April 11, 2024 02:05
WinAPI Compression and Decompression in Python
import ctypes
RtlDecompressBuffer = ctypes.windll.ntdll.RtlDecompressBuffer
RtlCompressBuffer = ctypes.windll.ntdll.RtlCompressBuffer
RtlGetCompressionWorkSpaceSize = ctypes.windll.ntdll.RtlGetCompressionWorkSpaceSize
Formats = {
"COMPRESSION_FORMAT_LZNT1" : ctypes.c_uint16(2),
"COMPRESSION_FORMAT_XPRESS" : ctypes.c_uint16(3),
"COMPRESSION_FORMAT_XPRESS_HUFF" : ctypes.c_uint16(4)