This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name arXiv Paper Starred List | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Star arXiv papers and keep a persistent list | |
| // @match https://arxiv.org/abs/* | |
| // @grant GM_getValue | |
| // @grant GM_setValue | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env nu | |
| use std/log | |
| mut results: list<string> = []; | |
| mut empty_page = false; | |
| for page in 0..100 { | |
| mut duplicate_count = 0; | |
| mut amount_of_jokes = 20; | |
| try { | |
| let response = (http get -H [Accept, application/json] https://icanhazdadjoke.com/search?page=($page)&limit=30 | $in.results | select joke) | |
| $amount_of_jokes = ($response | length); |