From 229fd49182000255f92a58e8622243bbd27fceaa Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Sun, 4 Jul 2021 21:37:11 -0400 Subject: credit --- .gitignore | 1 + README.md | 9 +++------ Untitled.ipynb | 43 +++++++++++++++++++++++++++++-------------- index.html | 9 +++++++-- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 763513e..085876a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .ipynb_checkpoints +node_modules diff --git a/README.md b/README.md index 01d5122..d7893a9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ -recipes.json from https://github.com/teijo/iba-cocktails. +# well-ordered - -- check lp scores against python -- roseacrucis -- use strict -- greedy + greedyscore +IBA recipe data from https://github.com/teijo/iba-cocktails. +glpk.js from https://github.com/jvail/glpk.js/. diff --git a/Untitled.ipynb b/Untitled.ipynb index 40be1aa..5352cf4 100644 --- a/Untitled.ipynb +++ b/Untitled.ipynb @@ -2,14 +2,14 @@ "cells": [ { "cell_type": "code", - "execution_count": 208, + "execution_count": 212, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "['Dark rum', 'Dry white wine', 'Créme de Menthe', 'Peach bitters', 'Maraschino', 'Galliano', 'Raspberry syrup', 'Campari', 'Tequila', 'Créme de Cassis', 'DOM Bénédictine', 'Lillet Blonde', 'Sweet vermouth', 'Kirsch', 'Cream liqueur', 'Grenadine', 'Cherry liqueur', 'Calvados', 'Bourbon', 'Aperol', 'Créme de Cacao', 'Triple Sec', 'Absinthe', 'DiSaronno', 'Peach schnapps', 'Rye', 'Coffee liqueur', 'Drambuie', 'Strawberry syrup', 'Irish whiskey', \"Peychaud's bitters\", 'Raspberry liqueur', 'Scotch', 'Dry vermouth', 'Peach puree', 'Apricot brandy', 'White rum', 'Pisco', 'Orange flower water', 'Prosecco', 'Orange bitters', 'Cognac', 'Angostura bitters', 'Gin', 'Vodka', 'Orgeat', 'Cachaca', 'Blackberry liqueur', 'Champagne', 'Red Port']\n" + "['Grenadine', 'Bourbon', 'White rum', 'Campari', 'Strawberry syrup', 'Angostura bitters', 'Gin', 'Lime juice', 'Vodka', 'Lillet Blonde', 'Sweet vermouth', 'Dry vermouth', 'Kirsch']\n" ] } ], @@ -34,6 +34,7 @@ " 'Olive juice',\n", " 'Ginger Ale',\n", "]\n", + "skip = []\n", "recipesj = json.load(open('recipes-fix.json'))\n", "ingredients = set()\n", "for recipe in recipesj:\n", @@ -62,10 +63,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 213, "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/plain": [ + "13" + ] + }, + "execution_count": 213, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "n_ingredients" + ] }, { "cell_type": "code", @@ -83,18 +97,19 @@ }, { "cell_type": "code", - "execution_count": 192, + "execution_count": 214, "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "(50, 50)" - ] - }, - "execution_count": 192, - "metadata": {}, - "output_type": "execute_result" + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: 'sol.2'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mlinesf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'sol.2'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mlines\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlinesf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msplitlines\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mlinesf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0msol\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mseen\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'sol.2'" + ] } ], "source": [ diff --git a/index.html b/index.html index e19bb22..088eba7 100644 --- a/index.html +++ b/index.html @@ -64,6 +64,12 @@ form {

Well-Ordered

+

+ The bibulous sorcerer Roseacrucis has depleted our distilled reserves. You must journey to obtain the + hallowed ingredients necessary to recreate the seventy-seven official IBA cocktails—but your wallet runs + light, and your thirst grows stronger. In what order do you obtain the ingredients in order to create the + most recipes for the fewest stater? +

@@ -345,8 +351,7 @@ form {
- - +
-- cgit v1.2.3