Skip to content

Instantly share code, notes, and snippets.

View lizadaly's full-sized avatar

Liza Daly lizadaly

View GitHub Profile
@lizadaly
lizadaly / temperature-prediction.py
Created April 27, 2017 12:49
Using PyTorch and a history of average temperatures by month, use a deep neural network to predict temperatures
# Toy example of using a deep neural network to predict average temperature
# by month. Note that this is not any better than just taking the average
# of the dataset; it's just meant as an example of a regression analysis using
# neural networks.
import logging
import datetime
import pandas as pd
import torch
rm -rf dist
mkdir dist
cp -r images dist
cp *.css dist/
echo "Writing index..."
pandoc index.md -o dist/index.html --template templates/default.html
for d in pages/*; do
mkdir -p dist/$d
for i in $d/*.md; do
f="${i##*/}"