Skip to content

Instantly share code, notes, and snippets.

Avatar

Roberto Arista roberto-arista

View GitHub Profile
View showHideDesktopIcon.py
import os
import vanilla
def showHide(sender):
value = "true"
if "Hide" in sender.getNSButton().title():
value = "false"
os.system(f"defaults write com.apple.finder CreateDesktop {value} && killall Finder")
@eevee
eevee / perlin.py
Last active Jan 8, 2022
Perlin noise in Python
View perlin.py
"""Perlin noise implementation."""
# Licensed under ISC
from itertools import product
import math
import random
def smoothstep(t):
"""Smooth curve with a zero derivative at 0 and 1, making it useful for
interpolating.