Skip to content

Instantly share code, notes, and snippets.

@shacharmirkin
shacharmirkin / vllm_on_google_colab.ipynb
Last active April 26, 2025 12:58
Serving an LLM with vLMM on Google Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shacharmirkin
shacharmirkin / github_invalid_notebook.md
Last active November 9, 2025 21:44
Handling Github Invalid Notebook

Handling GitHub Invalid Notebooks

Last updated: 21/4/25

The Problem

When trying to view Jupyter notebooks on GitHub, we sometimes see an 'Invalid Notebook' message:

"Invalid Notebook
@shacharmirkin
shacharmirkin / merge_pdfs.py
Created December 20, 2024 12:05
Merging selected pages of pdf files (or images)
"""
Merge PDFs and images into a single PDF file.
You can select which pages to include in the output.
Images are resized to A4 size while maintaining aspect ratio.
This script is a substitute for online tools, which you can use when you don't want to upload your private files)
Setup:
pip install PyPDF2 pillow
@shacharmirkin
shacharmirkin / multiple_venvs_in_colab.ipynb
Last active December 20, 2024 12:12
using multiple virtual environments in Google Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Some memes, made up of multiple boxes with a predefined reading order,
can be confusing or feel unnatural when used with right-to-left (RTL) languages.
This script takes a vertically symmetric meme and adjusts it for RTL reading.
Optionally, you can also mirror the images if it makes more sense after swapping the two vertical halves.
"""
from PIL import Image