Skip to content

Instantly share code, notes, and snippets.

@matthen
matthen / hello_world.py
Last active November 25, 2024 21:51
Hello world in python, using genetic algorithm
"""Hello world, with a genetic algorithm.
https://twitter.com/matthen2/status/1769368467067621791
"""
import random
import time
from dataclasses import dataclass
from itertools import chain
from typing import Iterable, List
@Julynx
Julynx / 15_python_tips.md
Last active August 12, 2025 05:03
15 Python Tips To Take Your Code To The Next Level!
@rain-1
rain-1 / LLM.md
Last active October 20, 2025 07:02
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@jiacai2050
jiacai2050 / tree.zig
Last active April 24, 2023 15:10
Tree(1) in Zig
//! Tree(1) in Zig
//! https://linux.die.net/man/1/tree
const std = @import("std");
const process = std.process;
const fs = std.fs;
const mem = std.mem;
const testing = std.testing;
const VisitedEntry = struct {
@CrockAgile
CrockAgile / float_arcade.md
Last active December 27, 2022 00:47
Floating Point Arcade

Floating Point Arcade

![Twitter Follow][twitter]

A Shady Coin Toss

A shady game master approaches...

Hey there! You look like you would enjoy a good game of chance.
@ioistired
ioistired / repository_names.rb
Created June 1, 2020 22:56
github repository name generator
# Creates a fun suggested name for users
def suggested_name
prefix = rand < 0.25 ? "octo-" : ""
"#{adjectives.sample}-#{prefix}#{nouns.sample}"
end
ADJECTIVES = %w[
animated
automatic
bookish
@orenitamar
orenitamar / Dockerfile
Last active March 22, 2024 05:13
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib
@ictlyh
ictlyh / test-argp.c
Created November 30, 2016 10:01
Demo of parsing program options with Argp
/*
* Demo of parsing program options with Argp
* Build: gcc test-argp.c -o test-argp
* Run: ./test-argp
*/
#include <argp.h>
#include <stdlib.h>
/* Program documentation. */