Skip to content

Instantly share code, notes, and snippets.

@lotabout
lotabout / pod.py
Last active December 6, 2016 09:06
download the wallpaper from bing.com and set it as wallpaper, everyday.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# You can put it into crontab
# * */2 * * * HOME=/home/<your username> DISPLAY=:0 <path to the script>
# it will run every two hours to check for new pictures.
from datetime import datetime
import urllib
import urllib2
@karpathy
karpathy / min-char-rnn.py
Last active June 28, 2024 06:13
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)