Skip to content

Instantly share code, notes, and snippets.

View wasi-master's full-sized avatar

Wasi Master wasi-master

View GitHub Profile
@wasi-master
wasi-master / or.md
Last active December 31, 2021 09:25

Got code that looks like this, and it's not working properly?

if x == "foo" or "bar" or "baz":

Python is interpreting this as though it was this:

if (x == "foo") or ("bar") or ("baz"):

If the first expression (x == "foo") isn't true, the second ("bar") will be, so this compound conditional always passes. Try this instead:

@wasi-master
wasi-master / nkfc.json
Last active December 30, 2021 05:04
NKFC Normalization mapping
{
' ': ['\xa0', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200a', '\u202f', '\u205f', '\u3000'],
'!': ['︕', '﹗', '!'],
'!?': ['⁉'],
'"': ['"'],
'#': ['﹟', '#'],
'$': ['﹩', '$'],
'%': ['﹪', '%'],
'&': ['﹠', '&'],
"'": ['''],
@wasi-master
wasi-master / README.md
Last active November 1, 2021 05:27
Uses neuralblock to find the sponsors of a video

Neuralblock Website: https://ai.neuralblock.app

To use it just save it to a file then use

python filename.py videoid

replace filename with your file name and videoid with the video id

@wasi-master
wasi-master / lucas_bad.md
Last active March 12, 2022 06:50
Why is lucas bad?
{
"0": "General error (such as a malformed request body, amongst other things)",
"10001": "Unknown account",
"10002": "Unknown application",
"10003": "Unknown channel",
"10004": "Unknown guild",
"10005": "Unknown integration",
"10006": "Unknown invite",
"10007": "Unknown member",
"10008": "Unknown message",