Skip to content

Instantly share code, notes, and snippets.

View FeiSun's full-sized avatar
🎯
Focusing

Ofey FeiSun

🎯
Focusing
  • Institute of Computing Technology, Chinese Academy of Sciences
  • Beijing
View GitHub Profile
@FeiSun
FeiSun / description.md
Created June 25, 2023 11:30 — forked from jaflo/description.md
Export Instapaper to HTML & PDF

Use this to automatically scrape all of your saved Instapaper articles locally as HTML and PDF files. I originally wrote this to read my saved documents on my reMarkable tablet. Instapaper does not have an option to export all my stuff as PDF as far as I could tell (the built-in options only export a subset).

You will need to have the following packages installed:

Configure your username and password, then run the script. It will go through all articles shown on your home page and download the copy Instapaper has stored into a folder called output as HTML file and convert it into a PDF. You can customize the look by updating the included styles.css file. Any errors will be reported and logged to failed.txt. Errors might be due to parsing errors on Instapaper's side or due to PDF conversion issues.

@FeiSun
FeiSun / metropolis.css
Created June 18, 2016 16:26 — forked from vhodges/metropolis.css
A version of the Beamer theme Metropolis for reveal.js
/**
* A simple theme for reveal.js presentations, derived from serif.css
* It's in the spirit of the Metropolis theme for beamer https://github.com/matze/mtheme
*
* This theme is Copyright (C) 2016 Vince Hodges, http://sourdoughlabs.com - it is MIT licensed.
*/
@import url('https://fonts.googleapis.com/css?family=Fira+Sans');
.reveal a {
@FeiSun
FeiSun / min-char-rnn.py
Created October 7, 2015 12:27 — forked from karpathy/min-char-rnn.py
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)