Skip to content

Instantly share code, notes, and snippets.

View harahu's full-sized avatar
🏔️

Harald Husum harahu

🏔️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am harahu on github.
  • I am harahu (https://keybase.io/harahu) on keybase.
  • I have a public key ASDS4_mCXyxsAKKd5H3ESgDOTXuvG8N8Ww9rPZfPK6fx7wo

To claim this, I am signing this object:

@harahu
harahu / spotifyAlarm.scpt
Last active March 9, 2018 10:32
Starts Spotify and eases into a Tame Impala song
-- Things to do in order to use this as an alarm:
-- 1) Schedule it to run using crontab (or other similar tool)
-- 2) Make sure machine is awake before cron job run time. (See energy saver settings)
-- Avoid blowing speakers
set volume 2
-- Define playlist and track ( Share > Spotify URI)
set playlist to "spotify:playlist:37i9dQZF1DX2zsdpDHp0xI"
set trackToBePlayed to "spotify:track:4g3Ax56IslQkI6XVfYKVc5"
@harahu
harahu / frozen_lake_q_learning.py
Created October 10, 2016 20:04
Q-learning on the Frozen Lake domain
import gym, random
LEARNING_RATE = 0.1
DISCOUNT = 0.99
class qTable:
"""
Implements a table tracking the estimated values
for state action pairs in an MDP.
"""