Skip to content

Instantly share code, notes, and snippets.

View mikaelvesavuori's full-sized avatar

Mikael Vesavuori mikaelvesavuori

View GitHub Profile
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@koaning
koaning / claude.md
Last active February 10, 2026 10:17
Claude.md file for marimo

Marimo notebook assistant

I am a specialized AI assistant designed to help create data science notebooks using marimo. I focus on creating clear, efficient, and reproducible data analysis workflows with marimo's reactive programming model.

<assistant_info>

  • I specialize in data science and analytics using marimo notebooks
  • I provide complete, runnable code that follows best practices
  • I emphasize reproducibility and clear documentation
  • I focus on creating interactive data visualizations and analysis
  • I understand marimo's reactive programming model
@thomashartm
thomashartm / aws-sam-colima.md
Last active September 2, 2025 11:00
Enable AWS SAM local to run without Docker Desktop but Colima + Docker Daemon on MacOs

AWS SAM local commands without Docker Desktop

AWS SAM local commands check for the existance of DOCKER_HOST. If the variable is not present, it will fail with the following error message

Error: Running AWS SAM projects locally requires Docker. Have you got it installed and running?

Replace it with Colima

Point DOCKER_HOST to unix socket of the Docker Daemon.

@pahud
pahud / bootstrap.sh
Last active August 20, 2024 20:32
My AWS SSO setup script for Gitpod workspaces
# watch the demo at https://youtu.be/cGUNf1FMNvI
#
# customize these variables
#
DEFAULT_PROFILE='default'
DEFAULT_REGION='us-east-1'
DEFAULT_OUTPUT='json'
SSO_START_URL='https://your-sso.awsapps.com/start'
SSO_REGION='us-east-1'
SSO_ACCOUNT_ID='123456789012'
@leegilmorecode
leegilmorecode / serverless.yml
Created June 27, 2021 14:26
Example of AWS AppConfig alongside the Serverless Framework for the use of Feature Flags
service: serverless-feature-flag
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221
memorySize: 128
stage: ${opt:stage, 'develop'}
region: eu-west-1
apiGateway:
shouldStartNameWithService: true
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active December 6, 2025 02:38
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@medwig
medwig / buildspec.yml
Created April 7, 2019 16:57
Install Terraform in AWS Codebuild
version: 0.2
phases:
install:
commands:
# install terraform binary
- curl -s -qL -o terraform_install.zip https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip
- unzip terraform_install.zip -d /usr/bin/
- chmod +x /usr/bin/terraform
finally:
@slashdotdash
slashdotdash / architecture.md
Created March 26, 2019 16:29
Architecture principles from "Design It!" by Michael Keeling

Architecture principles

From Design It! From Programmer to Software Architect by Michael Keeling.

  • Partition system and assign responsibilities.
  • Decide trade-offs among quality attributes:
    • Performance (response time)
    • Scalability (annual growth)
    • Availability
    • Security
@helephant
helephant / !calling-lambda-cross-account.md
Last active November 12, 2025 00:26
Calling a lambda in another AWS account by assuming a cross-account IAM role

Set up a cross-account IAM role in the destination account

  • Add a new IAM role
  • For type of trusted entity select "another AWS account"
  • Specify the accountId of the account that will be using the resource in the destination account. You can find your AWS Account ID, which is available on the support homepage when you are logged in.
  • Create a policy that allows lambda:InvokeFunction for your function and attach it to this new role.

Create a lambda in the calling account.

  • Set up a role for your lambda that is allowed to assumeRole
  • Use the AWS SDK to assume the new role in the destination account.
  • Pass the credentials to the lambda object when you create it
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active February 28, 2026 19:07
set -e, -u, -o, -x pipefail explanation