import turtle
star = turtle.Turtle()
for i in range(5):
star.forward(100)
star.right(144)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pdf2image | |
from PIL import ImageOps | |
import img2pdf | |
import os | |
import sys | |
from pathlib import Path | |
from random import randint | |
def invert_color(filepath): |
Inspired from Jguer's dotfile
TO set kitty as default terminal on gnome(make it work when doing right click -> open in terminal on nautilus):
gsettings set org.gnome.desktop.default-applications.terminal exec kitty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pprint_timedelta(delta: timedelta): | |
duration_units = ( | |
('week', 60 * 60 * 24 * 7), | |
('day', 60 * 60 * 24), | |
('hour', 60 * 60), | |
('min', 60), | |
('second', 1) | |
) | |
seconds = int(delta.total_seconds()) |