Skip to content

Instantly share code, notes, and snippets.

View BennoCrafter's full-sized avatar
:shipit:

Benno BennoCrafter

:shipit:
  • Germany
  • 21:54 (UTC +01:00)
View GitHub Profile
@BennoCrafter
BennoCrafter / basic_tree.py
Last active October 27, 2025 22:21
BasicTree
class Node:
def __init__(self, value, count=0, children={}) -> None:
self.value: str = value
self.count: int = count
self.children: dict[str, Node] = children
def add_child(self, child) -> None:
self.children[child.value] = child
def __str__(self) -> str:
@BennoCrafter
BennoCrafter / pdf_utils.py
Last active September 28, 2024 12:00
Merge and rotate PDF files from the command line
"""
Usage:
python3 main.py --res <resources_folder> --out <output_folder>
Merge and rotate PDF files from the command line
Options:
--res <resources_folder> Path to the folder containing resource directories with PDF files.
--out <output_folder> Path to the output folder where merged and rotated PDFs will be saved.
Requirements:
@BennoCrafter
BennoCrafter / get_project_lines.py
Created August 3, 2024 16:24
Get the lines of a project/folder
import os
import argparse
ignored_files = [
'.gitignore', # Git ignore file
'node_modules', # Node.js dependency folder
'npm-debug.log', # NPM debug log
'yarn-error.log',# Yarn error log
'package-lock.json', # NPM lock file
'yarn.lock', # Yarn lock file