Skip to content

Instantly share code, notes, and snippets.

WITH Ada.Text_IO;
USE Ada.Text_IO;
WITH Ada.Integer_Text_IO;
USE Ada.Integer_Text_IO;
PROCEDURE Kalendarz IS
Data : String (1 .. 20); -- data wprowadzana przez uzytkownika
Miejsce : Natural := 0; -- ilosc znakow daty wprowadzanej przez uzytkownika
Rok : Integer := 0; -- zmienna przechowywujaca przstepnosc roku
Miesiac : Integer := 0; -- zmienna informujaca o rodzaju miesiaca
#include <amp.h>
#include <vector>
#include <iostream>
#include <chrono>
int main()
{
using namespace std;
using namespace std::chrono;
using namespace concurrency;
import time
import numpy as np
import numba
# Comparison: C++ code from episode: 15 μs per advance()
# Pure Python code from episode: 14000 μs per advance()
def add_glider(area, x, y):
xs = (np.array([0, 1, 2, 0, 1]) + x) % area.shape[1]
ys = (np.array([0, 1, 1, 2, 2]) + y) % area.shape[0]
@Noxitu
Noxitu / _h9_read (entry point).py
Last active January 14, 2024 15:06
Parsing decked out 2 area (finding holes and other random stuff)
import json
from pathlib import Path
import rich.progress
import numpy as np
from noxitu.minecraft.io.assets import Assets
from noxitu.minecraft.io.world import World
@Noxitu
Noxitu / add_playsound_command_blocks.mcfunction
Last active February 4, 2024 18:49
add_playsound_command_blocks.mcfunction
# setblock glass/diamond_block are used to make sure command block commands get updated, if a command block was already there
# this was mainly useful when these commands were changing a lot
# recent changes:
# commented as audio system is being fixed:
# setblock -627 -25 2004 minecraft:diamond_block
# setblock -627 -25 2004 minecraft:command_block[facing=south,conditional=false]{Command: "execute as @a[tag=do2.tags.audio.enabled,distance=..32] at @s run playsound do2:events.card_reveal master @s"}
# setblock -648 -24 2002 minecraft:diamond_block
# setblock -648 -24 2002 minecraft:command_block[facing=south,conditional=false]{Command: "execute as @a[tag=do2.tags.audio.enabled,distance=..32] at @s run playsound do2:events.card_reveal master @s"}
@Noxitu
Noxitu / compute_prefix.mcfunction
Created February 22, 2024 22:27
GUI Calibration
execute if score @s gui_position matches ..-256 run data modify storage do:tmp GUI.PrefixText set value "\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64"
execute if score @s gui_position matches -255 run data modify storage do:tmp GUI.PrefixText set value "\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB32\\uEB16\\uEB08"
execute if score @s gui_position matches -254 run data modify storage do:tmp GUI.PrefixText set value "\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB64\\uEB32\\uEB16"
execute if sco