Skip to content

Instantly share code, notes, and snippets.

View LunaticNeko's full-sized avatar

Chawanat Nakasan LunaticNeko

View GitHub Profile
@LunaticNeko
LunaticNeko / deer.cow
Last active August 3, 2024 18:09
Deer for Cowsay しかのこのこのここしたんたん
$the_cow = <<"EOC";
$thoughts\\_\\_ _/_/
$thoughts \\__/
$thoughts ($eyes)\\_______
-- \\ )\\/\\
$tongue ||-----||
|| ||
EOC
@LunaticNeko
LunaticNeko / bitburner-parens.py
Created March 1, 2022 14:22
BitBurner - parentheses validation contract task
# When your computer is fast enough, you can rely on luck and hackjob.
# This is NOT valid for actual programming tests IRL. You will need a
# more serious effort for that, including picking parentheses to remove
# more deterministically, or have some better heuristics than "lol d2".
from random import randint
'''
Validates the string.
'''
@LunaticNeko
LunaticNeko / identifying-signed-commits
Created July 16, 2019 01:56
How to Identify Signed Commits
# How to identify signed commits
1. Go to https://github.com/<username>/<reponame>/commits/master
2. Click on [Verified] green text and box near the latest (or all) commits.
3. You should see the public key signature. Check with the person him/herself for the ID to ensure that it is valid.
@LunaticNeko
LunaticNeko / pi_distribution.py
Created March 5, 2019 12:08
Analyzes digit distribution of pi from a plaintext file.
with open('pi-billion.txt') as f:
f.read(2)
count = [0]*10
while True:
s = f.read(1000000).strip()
if not s:
break
for c in s:
count[int(c)] += 1
print(count)

Keybase proof

I hereby claim:

  • I am lunaticneko on github.
  • I am lunaticneko (https://keybase.io/lunaticneko) on keybase.
  • I have a public key ASBI-0aXnJwZWJg0oe-lK4y2dC1PDBYHHNyK04At1NRoTwo

To claim this, I am signing this object: