Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt's full-sized avatar

Guido Schmidt guidoschmidt

View GitHub Profile
@guidoschmidt
guidoschmidt / async_pandas_dataframe.py
Created April 13, 2024 20:07
asyncio Pandas dataframe
import asyncio
import numpy as np
import pandas as pd
async def fun2(x):
return x * 2
async def main():
df = pd.DataFrame(np.arange(10), columns=['old'])
@guidoschmidt
guidoschmidt / animate-ascii.zig
Created January 11, 2024 22:31
Animate 2D text buffers right in the terminal
fn printDefault(c: u8) void {
std.debug.print("{c}", .{ c });
}
fn animate(buffer: *[]u8, rows: u32, cols: u32, comptime print_fn: fn(u8) void) void {
for(0..rows) |dy| {
for(0..cols) |dx| {
const idx = dy * cols + dx;
const pipe_tile = buffer.*[idx];
std.debug.print("\x1B[{d};{d}H", .{ dy, dx });
@guidoschmidt
guidoschmidt / closure.zig
Created November 2, 2023 22:19 — forked from MasterQ32/closure.zig
Zig Closure Implementation
const std = @import("std");
pub fn main() void {
std.log.info("mutable closure:",.{});
runMutDemo();
std.log.info("const closure:",.{});
runConstDemo();
}
@guidoschmidt
guidoschmidt / index.ts
Created April 24, 2023 19:13
thi.ng/voronoi-foam
import { srgb } from "@thi.ng/color";
import type { Color, css } from "@thi.ng/color";
import { randMinMax2 } from "@thi.ng/vectors";
import type { Vec } from "@thi.ng/vectors";
import { repeatedly } from "@thi.ng/transducers";
import { draw } from "@thi.ng/hiccup-canvas";
import type { IToHiccup } from "@thi.ng/api";
const NUM_CELLS = 10;
const WIDTH = window.innerWidth;
@guidoschmidt
guidoschmidt / irc.md
Created December 9, 2022 19:39 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@guidoschmidt
guidoschmidt / hide-scrollbars.css
Created October 28, 2022 13:01
Hide Scrollbars
/* Hide scrollbar for Chrome, Safari and Opera */
.scrollable::-webkit-scrollbar {
display: none;
}
.scrollable {
/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
@guidoschmidt
guidoschmidt / reset.css
Created October 24, 2022 21:29
reset.css for Interface + Interaction 2022/23 @ FH Bielefeld
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
@guidoschmidt
guidoschmidt / css
Created October 31, 2021 11:29 — forked from mateuszkocz/css
Disable image smoothing. Comes in handy when creating pixel-art game. The pixels will stay sharp.
/* You can aslo add */
canvas {
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: optimize-contrast;
-ms-interpolation-mode: nearest-neighbor;
}
@guidoschmidt
guidoschmidt / print-shops.md
Last active March 24, 2023 15:50
buy art from living artists, the dead don't need the money
@guidoschmidt
guidoschmidt / verification
Created August 29, 2021 08:44
tzprofiles.com/github Verification
I am attesting that this GitHub handle guidoschmidt is linked to the Tezos account tz1Z9s59QUmYTs4NKf48uHhcgeY5wimpFWiX for tzprofiles
sig:edsigtYWSFbSE2FP5mFP9r1gAkJCQYqSf9myVdLQbVCuiQJt2JkZZkcxc49MSpoqSPotg6vhzzua18ixWoSXbQ969dbDC2pkYq2