Skip to content

Instantly share code, notes, and snippets.

View Sobsz's full-sized avatar

hecko Sobsz

View GitHub Profile
t = [[int((x-y)%7%3==0) for x in range(13)] for y in range(13)]
for _ in range(26): print(('\n'.join(''.join(' #'[x] for x in y) for y in t)+'\n'+'-'*len(t[0])+'\n',t:=[[int((sum(t[(y+n[1])%len(t)][(x+n[0])%len(t[0])] for n in {(x, y) for x in range(-1,2) for y in range(-1,2)}-{(0,0)}),t[y][x]) in ((2,1),(3,1),(3,0))) for x in range(len(t[0]))] for y in range(len(t))])[0])
# this script merges multiple gdpr data requests for one channel into a format suitable for training gpt-whatever on
#
# 1. copy a message link from the channel/dm you want to make a dataset of and get the *second*-to-last number
# 2. in your data request, go to the `messages` folder, then `c<number>`, then copy out the messages.csv and name it however you want to be named
# 3. get all other members of the channel to do the same
# 4. put all the csv files in the same place as this script and then run it
# 5. plop it in your training software of choice, e.g. https://colab.research.google.com/drive/15qBZx5y9rdaQSyWpsreMDnTiZ5IlN0zD
#
# this code is hereby released under 0bsd/cc0/unlicense/wtfpl/yougetthepoint
@Sobsz
Sobsz / pg.nas
Last active August 1, 2021 16:10
Parkour Generator(tm)
// needs an mb with `/oss #pg_genblock repeatable`, by default at 103,63,122
// also needs empty space corresponding to the parkour area, by default starting at 0,111,0
// also also the performance is awful please don't actually use this without serious modification
// unlicense/0bsd/cc0/wtfpl/whatever
#input
set teststr pg_seed
if runArg1|=|teststr call #pg_setseed
quit
@Sobsz
Sobsz / sss.nas
Last active July 26, 2021 19:29
Scuffed Saving System(tm)
// needs a zone where everyone can build, by default starting at 120,64,120 and ending at 121,64,wherever
// unlicense/0bsd/cc0/wtfpl/whatever
#sss_setusername
set sss_username {runArg1}
quit
#sss_checkload
ifnot sss_loaded msg you must load first
ifnot sss_loaded terminate
#hbfInfo
msg %7---
msg %ethis is a brainfuck interpreter in cc script
msg %emade by hecko the very good time spender
msg %esign runs, red clay stops, the things in the back
msg %eload programs into the plaques (hence the edit perms)
msg %emore info on brainfuck:
msg %bhttps://esolangs.org/wiki/Brainfuck
msg %esee the awful code here (cc0 btw):
msg %bhttps://gist.github.com/Sobsz/1385246ac92189381529c4e70896b0ae
// promptmaker v0.bad by hecko
// if you wanna be like guzzdoritos and help me come up with words here you go https://pad.snopyta.org/yL4ZxVvVQhWKi9r73jP40w
// #hpmPlot if you want a plot generated for you, #hpmPrompt for just the prompt
// licensed under wtfpl http://www.wtfpl.net/txt/copying/
#hpmPlot
cmd tpp ~ ~ ~ 135 0
msg %7---
msg %emake sure you have 30x30 of space in front of you
msg %ereply 1 when ready, or reply 2 to cancel
import csv
import glob
import requests # `pip install requests` in command line
cookies = dict(User="PUT YOUR `User` COOKIE HERE (right click on tatoeba page → inspect element → storage")
list_id = "PUT YOUR LIST ID HERE (it's in the url)"
try:
with open(glob.glob("*.tsv")[0], encoding="utf-8-sig") as file: # the downloaded list, to prevent readding sentences that are already there
done = [i[0] for i in csv.reader(file, delimiter="\t")]
@Sobsz
Sobsz / ilo-pi-nimi-sin.markdown
Created February 19, 2021 17:31
ilo pi nimi sin

ilo pi nimi sin

probably uncopyrightable but cc0/unlicense/bsd0/wtfpl just in case

ilo lili pi weka pu tan jan pona Ke Tami https://jsbin.com/kewekiqewa/ (yes i could've written it myself but i didn't feel like it tbhtbhtbh)

A Pen by Sobsz on CodePen.

License.