- Clone repo (https://github.com/hexgrad/kokoro)
- Install brew dependencies
brew install python@3.9 espeak libsndfile portaudio- Create a Python 3.9 virtual environment + install Python dependencies
brew install python@3.9 espeak libsndfile portaudio| #!/bin/bash | |
| # A script to download the HTML content from a list of URLs. | |
| # How to use: `chmod +x fetch-html.sh` | |
| # ./fetch-html.sh urls.txt ./downloaded_pages | |
| # This will read the links from `urls.txt` and save the corresponding HTML files into the `downloaded_pages` directory. Let me know if you'd like any tweaks. | |
| # I use Link Gopher on Firefox to manually create my links. | |
| set -euo pipefail # Fail fast on errors |
Summarize the themes of the opinions expressed here. For each theme, output a markdown header. Include direct "quotations" (with author attribution) where appropriate. You MUST quote directly from users when crediting them, with double quotes. Fix HTML entities. Output markdown. Go long. Include a section of quotes that illustrate opinions uncommon in the rest of the piece.
AI coding agent by Google Labs:
| #!/bin/bash | |
| while true | |
| do | |
| lula=$(curl -s https://resultados.tse.jus.br/oficial/ele2022/544/dados-simplificados/br/br-c0001-e000544-r.json | jq '.cand[] | select(.nm == "LULA").vap | tonumber' 2> /dev/null ) | |
| bozo=$(curl -s https://resultados.tse.jus.br/oficial/ele2022/544/dados-simplificados/br/br-c0001-e000544-r.json | jq '.cand[] | select(.nm == "JAIR BOLSONARO").vap | tonumber' 2> /dev/null ) | |
| echo $(( $lula - $bozo )) | |
| sleep 30 |
| // Remove Element (3/11) | |
| // https://leetcode.com/problems/remove-element/ | |
| // time o(n) | space o(1) | |
| var removeElement = function(nums, val) { | |
| let count = 0; | |
| for (let i = 0; i < nums.length; i++) { | |
| if (nums[i] !== val) { | |
| nums[count] = nums[i]; | |
| count++; |
| // Max Ice Cream (3/3) | |
| var maxIceCream = function(costs, coins) { | |
| costs.sort(); | |
| for (let i = 0; i < costs.length; i++) { | |
| if (coins >= costs[i]) { | |
| coins -= costs[i]; | |
| } else { | |
| return i | |
| } | |
| } |
| // Min Heap | |
| // since JS does not have a native heap, | |
| // for an interview you can quickly code-up something like this | |
| // letting interviewer know what you are doing | |
| class MinHeap { | |
| constructor(compareFunc) { | |
| this.compareFunc = compareFunc; | |
| this.heap = []; | |
| } |