Skip to content

Instantly share code, notes, and snippets.

View kolibril13's full-sized avatar
🐶

Jan-Hendrik Müller kolibril13

🐶
View GitHub Profile
# Path to your image
image_path = "image_plot.png"
import base64
import requests
# OpenAI API Key
from api_key import api_key
# Function to encode the image
@kolibril13
kolibril13 / embed_base64_image_in_markdown.ipynb
Created January 7, 2024 23:14
embed_base64_image_in_markdown
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import { useState, useEffect } from "react";
import { Tldraw, createShapeId } from "tldraw";
import "tldraw/tldraw.css";
export default function App() {
const [xCoordinate, setXCoordinate] = useState(350);
const [editorInstance, setEditorInstance] = useState(null);
const handleMount = (editor) => {
setEditorInstance(editor);
@kolibril13
kolibril13 / twitter_bird.js
Created May 22, 2024 21:54
Script to bring back the twitter bird
// ==UserScript==
// @name Log Hi on X
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Logs Hi to the console on x.com/home, changes the website title, hides a specific element, and changes the favicon. Generated by ChatGPT, no warrenty.
// @author Your Name
// @match https://x.com/home
// @grant none
// ==/UserScript==
@kolibril13
kolibril13 / hello.py
Last active August 7, 2024 09:49
marimo reactive tldraw colorpicker
import marimo
__generated_with = "0.7.17"
app = marimo.App(width="medium")
@app.cell
def __():
import matplotlib.pyplot as plt
import numpy as np
@kolibril13
kolibril13 / solara.ipynb
Created August 9, 2024 10:36
solara-tldraw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kolibril13
kolibril13 / iris_quack.ipynb
Created August 15, 2024 11:15
iris dataset with quack
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kolibril13
kolibril13 / housing.csv
Created August 23, 2024 19:47
California housing dataset
We can't make this file beautiful and searchable because it's too large.
longitude,latitude,housing_median_age,total_rooms,total_bedrooms,population,households,median_income,median_house_value,ocean_proximity
-122.23,37.88,41.0,880.0,129.0,322.0,126.0,8.3252,452600.0,NEAR BAY
-122.22,37.86,21.0,7099.0,1106.0,2401.0,1138.0,8.3014,358500.0,NEAR BAY
-122.24,37.85,52.0,1467.0,190.0,496.0,177.0,7.2574,352100.0,NEAR BAY
-122.25,37.85,52.0,1274.0,235.0,558.0,219.0,5.6431,341300.0,NEAR BAY
-122.25,37.85,52.0,1627.0,280.0,565.0,259.0,3.8462,342200.0,NEAR BAY
-122.25,37.85,52.0,919.0,213.0,413.0,193.0,4.0368,269700.0,NEAR BAY
-122.25,37.84,52.0,2535.0,489.0,1094.0,514.0,3.6591,299200.0,NEAR BAY
-122.25,37.84,52.0,3104.0,687.0,1157.0,647.0,3.12,241400.0,NEAR BAY
-122.26,37.84,42.0,2555.0,665.0,1206.0,595.0,2.0804,226700.0,NEAR BAY
@kolibril13
kolibril13 / flower.py
Created September 18, 2024 11:38
flower in marimo
import marimo
__generated_with = "0.8.15"
app = marimo.App(width="medium")
@app.cell
def __():
import marimo as mo
import polars as pl
dataset x y
dino 55.3846 97.1795
dino 51.5385 96.0256
dino 46.1538 94.4872
dino 42.8205 91.4103
dino 40.7692 88.3333
dino 38.7179 84.8718
dino 35.641 79.8718
dino 33.0769 77.5641
dino 28.9744 74.4872