Skip to content

Instantly share code, notes, and snippets.

Człowiek jest istotą która często ma jakiś cel do którego dąży. Jest to też często pokazane w dziełach literackich. Jednak i w owych dziełach i poza nimi na metaforycznej drodze do tego celu są przeszkody.

Te przeszkody różnią się mocno w zależności od tego jakiej natury jest cel. Gdy ten cel jest zależny od innych, ci inni często są najwiękrzym źródłem owych przeszkód. A good example is in "Lalka", where the main character aims to gain the love of a szlachcianki. Ta szlachcianka jednak odrzuca jego zaloty które są dla niego przeszkodzą. Ignorując problemy moralne wychodzące z takiego traktowania innego człowieka przez Wokulskiego, nie udało się mu te przeszkody pokonać. Mimo prób, we które wchodziły kupienie kamienicy oraz doroszki oraz srebr, nie udało mu się. Ta postawa, a także koniec powieści

#################
# binaryfuck #
# in dc #
# because I'm a #
# massohist #
#################
# (c) MinekPo1 aka Lily A.N.
# under the FAFOL license
# which is attached at the
@MinekPo1
MinekPo1 / example.txt
Last active September 15, 2022 19:17
I didn't feel like calculating my math homework by hand (I mean with a calculator but still) so I made python do it for me.
: -3,0,3,0,0,0,9
b: 1,-1
[-3.0, -3.0, 0.0, 0.0, 0.0, 0.0]
[9.0]
@MinekPo1
MinekPo1 / hellapi.py
Last active September 8, 2022 22:23
a python api, written in what can be a single line
[flask := __import__("flask"), yaml := __import__("yaml"), secrets := __import__("secrets"), random := __import__("random"), app := flask.Flask(__name__), "load data", file := open("hellapidata.yml"), data := yaml.safe_load(file), file.close(), update_db := lambda : [ file := open("hellapidata.yml","w"), yaml.dump(data,file), file.close() ], name := lambda func, name: type(func)(func.__code__.replace(co_name=name),globals(),name), app.route("/api/hell")( name(lambda : {"is_hell":True},"hell") ), app.route("/api/demon/get/<d_id>")( name(lambda d_id: data["demons"][d_id] if d_id in data["demons"] else 404, "demon_get" ) ), app.route("/api/demon/create/<name>")( name(lambda name: [ d_id := secrets.token_urlsafe(16), data["demons"].__setitem__(d_id, { "name": name, "age": random.randint(300,5000), }), update_db(), {"d_id":d_id}, ][-1], "demon_create" ) ) ]
@MinekPo1
MinekPo1 / benchmark.sc
Created August 27, 2022 18:49
SCPP benchmark (primes)
#include <math>
#include <time>
namespace benchmark {
func is_prime(num){
for(i from 2 to math::floor(math::sqrt(num),0) + 1){
if((num % i) == 0) {
return 0;
}
}
@MinekPo1
MinekPo1 / cheatsheet.md
Created July 16, 2022 12:54
SLVM shortnames
code
ldi load into a
jts jump and push to stack
jt jump if true
jf jump if false
clg clear grahpics
imalloc intiger malloc
1 | --------\
| |
| v
3 | --------+--------\
| | |
| v v
13 | --------+--------+--------\
| | |
| v v
24 |r | |
@MinekPo1
MinekPo1 / analiser.py
Last active August 24, 2022 17:10
jump analiser for SLVM machine code
"""
(c) MinekPo1
This code is under the FAFOL licence, which is attached at the end
"""
############
# Settings #
############
[Info - 12:14:38] (11732) Pylance language server 2022.4.1 (pyright af32b7d8) starting
[Info - 12:14:38] (11732) Server root directory: c:\Users\<User>\.vscode\extensions\ms-python.vscode-pylance-2022.4.1\dist
[Info - 12:14:38] (11732) No configuration file found.
[Info - 12:14:38] (11732) No pyproject.toml file found.
[Info - 12:14:38] (11732) Setting pythonPath for service "test": "C:\Users\<User>\AppData\Local\Microsoft\WindowsApps\python3.10.exe"
[Warn - 12:14:38] (11732) stubPath c:\Users\<User>\Documents\test\typings is not a valid directory.
[Info - 12:14:39] (11732) Assuming Python version 3.10
[Info - 12:14:39] (11732) Assuming Python platform Windows
[Info - 12:14:41] (11732) Search paths for c:\Users\<User>\Documents\test
@MinekPo1
MinekPo1 / meteor_to_xaeros.py
Created January 5, 2022 14:06
Script converting meteor waypoints to xaeros or the other way if you want for some reason.
from typing import Callable, NewType, TypeAlias, TypedDict, overload
import pynbt as nbt
from glob import glob
import os.path
from os import mkdir, name as os_name, chdir
import re
XAEROS_HEADER = """
#