Skip to content

Instantly share code, notes, and snippets.

View sam-the-programmer's full-sized avatar
:shipit:
making stuff...

Samuel sam-the-programmer

:shipit:
making stuff...
View GitHub Profile
@sam-the-programmer
sam-the-programmer / main.go
Created October 24, 2023 18:42
Round-Cell Cellular Automata
package main
import (
"image/color"
"math"
"math/rand"
"github.com/hajimehoshi/ebiten/v2"
)
@sam-the-programmer
sam-the-programmer / main.go
Last active October 24, 2023 18:41
Worm Cellular Automata
package main
import (
"image/color"
"math"
"math/rand"
"github.com/hajimehoshi/ebiten/v2"
)
@sam-the-programmer
sam-the-programmer / dark.json
Last active April 14, 2022 09:48
qiskit-notebook-starter
{
"name": "default",
"textcolor": "#fff",
"gatetextcolor": "#fff",
"subtextcolor": "#fff",
"linecolor": "#ddd",
"creglinecolor": "#778899",
"gatefacecolor": "#BB8BFF",
"barrierfacecolor": "#BDBDBD",
"backgroundcolor": "#000",
@sam-the-programmer
sam-the-programmer / main.go
Created April 8, 2022 17:00
approximating pi
package main
import (
"fmt"
)
func main() {
const ITERS = 1000000000
var pi float64 = 3
@sam-the-programmer
sam-the-programmer / cloud.py
Last active April 3, 2022 16:05
google-wordcloud
import pathlib
import matplotlib.pyplot as plt
import numpy as np
import PIL.Image
from wordcloud import ImageColorGenerator, WordCloud, STOPWORDS
words = pathlib.Path("words.txt").read_text()
mask = np.array(PIL.Image.open("google.png"))
@sam-the-programmer
sam-the-programmer / index.html
Created March 6, 2022 16:08
html-button-styles
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
@sam-the-programmer
sam-the-programmer / colours.go
Last active August 27, 2022 11:58
ansi-colour-codes
package main
const (
BLACK = "\033[30m"
BLUE = "\033[34m"
CYAN = "\033[36m"
GREEN = "\033[32m"
GREY = "\033[1;30m"
LIGHTBLUE = "\033[1;34m"
LIGHTCYAN = "\033[1;36m"
@sam-the-programmer
sam-the-programmer / main.cpp
Created February 6, 2022 12:23
cpp-boilerplate
#include <iostream>
using namespace std;
int main() {
return 0;
}
@sam-the-programmer
sam-the-programmer / code.code-snippets
Last active February 5, 2022 16:34
vscode-snippet-template
{
// Ooh, look, JSON with Comments!
"Name": {
"prefix": "type this to trigger it",
"body": [
"line 1",
"line 2",
"etc."
],
"description": "describe it here",
@sam-the-programmer
sam-the-programmer / main.go
Last active February 5, 2022 12:51
go-boilerplate
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello World!")
}