https://github.com/c-w/cocktails
A place where I collect tasty cocktail recipes
https://github.com/c-w/cocktails
progressive-web-app reactjs semantic-ui
Last synced: 5 months ago
JSON representation
A place where I collect tasty cocktail recipes
- Host: GitHub
- URL: https://github.com/c-w/cocktails
- Owner: c-w
- Created: 2018-03-04T18:13:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-13T19:02:04.000Z (6 months ago)
- Last Synced: 2025-01-03T03:42:25.672Z (5 months ago)
- Topics: progressive-web-app, reactjs, semantic-ui
- Language: JavaScript
- Homepage: https://justamouse.com/cocktails
- Size: 10.6 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## What's this?
This blog is a space for me to collect tasty cocktail recipes that I've prepared
and make them easily searchable for the future.The frontend for the blog is hosted on [gh-pages](https://justamouse.com/cocktails/).
It's built using ReactJS and SemanticUI and pulls data from this repository.## Generating new recipes
Install Torch and LSTM:
```sh
git clone https://github.com/nagadomi/distro.git ~/torch --recursive
cd ~/torch
./install-deps
./clean.sh
./update.sh
cd -
. ~/torch/install/bin/torch-activate
git clone https://github.com/karpathy/char-rnn.git ~/char-rnn
```Prepare training data and train model:
```sh
node ./scripts/lstm-pretrain.js ~/char-rnn/data/tinyshakespeare/input.txt
cd ~/char-rnn
th ./train.lua -batch_size 10 -rnn_size 128 -val_frac 0.05 -train_frac 0.9 -max_epochs 50 -eval_val_every 500 -dropout 0.45 | tee ./train.txt
```Sample from best model:
```sh
best_validation_score="$(find ./cv -name '*.t7' -exec basename {} .t7 \; | cut -d'_' -f4 | sort -n | head -n1)"
best_model="$(find ./cv -name "*${best_validation_score}.t7")"
th ./sample.lua -primetext '>' "${best_model}" -length 5000 -verbose 0 | tee ./sample.txt
cd -
clear
node ./scripts/lstm-postsample.js ~/char-rnn/sample.txt | tee ./lstm-recipes.json
```