This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://jaredkrinke.itch.io/sic-1 | |
namespace SIC1 | |
@[reducible] def Index := UInt8 | |
@[reducible] def Data := Int8 | |
namespace Index | |
@[match_pattern, simp] def max : Index := 252 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# text to 3-bit RGB image, one byte per bit. endianness might be important | |
import sys | |
import math | |
text = bytes(sys.argv[1], encoding='utf-8') | |
n_text_bits = len(text) * 8 | |
width_str = sys.argv[2] | |
width = int(width_str) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from datetime import datetime | |
import pandas | |
import aiohttp | |
import json | |
async def get_data(url: str) -> dict[str, tuple[pandas.DataFrame, datetime]]: | |
"""Extract county-level election data from the NYT API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
let container = document.getElementById("app") | |
.getElementsByTagName("div")[0] | |
.getElementsByTagName("div")[0]; | |
container.style.position = "static"; // allow scroll | |
for (suspect of Array.from(container.getElementsByTagName("div"))) { | |
if (getComputedStyle(suspect).background.includes("linear-gradient")) { | |
suspect.style.background = "none"; // remove shadow gradient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.a2435191.death_coords; | |
import net.minecraft.Util; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.player.LocalPlayer; | |
import net.minecraft.core.Position; | |
import net.minecraft.network.chat.TextComponent; | |
import net.minecraft.world.entity.Entity; | |
import net.minecraft.world.entity.LivingEntity; |