Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts and experience preferred (super rare at this point).
This file contains 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 python3 | |
import os | |
from datetime import datetime, timezone | |
from pathlib import Path | |
from prompt_toolkit import PromptSession | |
from prompt_toolkit.history import FileHistory | |
import openai | |
from rich.console import Console | |
from rich.markdown import Markdown |
This file contains 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
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory | |
git clone https://github.com/myshell-ai/OpenVoice | |
cd OpenVoice | |
git clone https://huggingface.co/myshell-ai/OpenVoice | |
cp -r OpenVoice/* . | |
pip install whisper pynput pyaudio | |
""" | |
from openai import OpenAI | |
import time |
This file contains 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
[alias] | |
br = branch | |
st = status -s -b | |
lg = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative -20 | |
ac = !git add -A && git commit -m | |
oops = !git add -A && git commit --amend --no-edit | |
unstash = stash pop | |
bd = branch -D |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# aproducer.py | |
# | |
# Async Producer-consumer problem. | |
# Challenge: How to implement the same functionality, but no threads. | |
import time | |
from collections import deque | |
import heapq | |
class Scheduler: |
Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.
The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from
This file contains 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
from datetime import datetime | |
from typing import Optional | |
import pandas as pd | |
from rich import box | |
from rich.console import Console | |
from rich.table import Table | |
console = Console() |
This file contains 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
COUNTRY | BEEF | PIG | POULTRY | SHEEP | TOTAL | |
---|---|---|---|---|---|---|
ARG | 40.41400058 | 8.24187459 | 36.4689953 | 1.174247185 | 86.29911766 | |
AUS | 22.8010372 | 20.25072536 | 42.00750521 | 7.423454044 | 92.48272181 | |
BGD | 0.885267859 | 5.14E-04 | 1.223173534 | 1.163676301 | 3.272631248 | |
BRA | 24.15640871 | 11.20721696 | 39.36312514 | 0.393513724 | 75.12026453 | |
BRICS | 4.289081407 | 15.79587836 | 10.29847417 | 1.654767905 | 32.03820184 | |
CAN | 17.37132968 | 15.74658647 | 34.15846671 | 0.81704465 | 68.09342751 | |
CHL | 14.96778476 | 17.51448686 | 30.93243359 | 0.411750266 | 63.82645548 | |
CHN | 3.817396071 | 31.56769795 | 11.61724318 | 2.965417779 | 49.96775498 | |
COL | 12.10121226 | 5.084564383 | 26.43592901 | 0.202352547 | 43.8240582 |