Skip to content

Instantly share code, notes, and snippets.

View bmikolaj's full-sized avatar

Brian Mikolajczyk bmikolaj

View GitHub Profile
@bmikolaj
bmikolaj / chudnovsky.py
Last active March 3, 2021 06:20 — forked from thebecwar/chudnovsky.py
Chudnovsky Algorithm in Python
import decimal
from mpmath import mp
import sys
# Basic recursive factorial calculation. For large n switch to iterative.
def fact(n):
if n == 0:
return 1
else:
@bmikolaj
bmikolaj / change_wallpaper
Created March 1, 2017 04:35 — forked from luelista/change_wallpaper
Use the recent "Astronomy Picture of the Day" by NASA as your desktop wallpaper (Python script for Mac OS X, should be easy do adapt for Linux or Windows)
#!/usr/bin/python
# Downloads the current "Astronomy Picture of the Day" from nasa.gov and sets as wallpaper
#
# Installation steps:
# - store this file somewhere and take note of the path
# - change WALLPAPER_DIR to some folder in your home directory
# and create the folder
# - make it executable:
# chmod a+x /path/to/change_wallpaper
# - follow instructions given in the .plist file to make it run daily