Skip to content

Instantly share code, notes, and snippets.

View paulgribble's full-sized avatar

Paul Gribble paulgribble

View GitHub Profile
@dhh
dhh / linux-setup.sh
Last active July 24, 2024 13:05
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@huytd
huytd / wordle.md
Last active May 16, 2024 20:39
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@skeeto
skeeto / README.md
Last active December 20, 2021 14:00
AI driving simulation
@riveSunder
riveSunder / autograd_mlp.py
Created June 26, 2020 19:20
Simple MLP demo using [autograd](https://github.com/HIPS/autograd)
"""
Simple MLP demo using [autograd](https://github.com/HIPS/autograd)
With l1 and l2 regularization.
Depends on autograd and scikit-learn (the latter for the mini digits dataset)
pip install autograd scikit-learn
"""
from autograd import numpy as np
@IanColdwater
IanColdwater / twittermute.txt
Last active July 29, 2024 08:50
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@Harry-Harrison
Harry-Harrison / ContentView.swift
Last active July 11, 2023 10:42
Haptic Feedback Vibrations in SwiftUI
// This prints a list of buttons that on tap will fire a different type of haptic vibration
import SwiftUI
struct ContentView: View {
let generator = UINotificationFeedbackGenerator()
var body: some View {
VStack(alignment: .center, spacing: 30.0) {
Button(action: {
@bmjstau
bmjstau / wesAnderson.m
Last active April 18, 2019 10:41
Wes Anderson Colormaps
function [rgb] = wesAnderson(N, which)
% wesAnderson returns N colors taken from Wes Anderson's films, which
% can be used as color maps for hipster line plots. Colors have been
% adapted from https://github.com/karthik/wesanderson, who has them from
% http://wesandersonpalettes.tumblr.com/.
%
% Inputs:
% INT N Number of colors. Is limited by color palette.
% CHAR which Name of color palette. See
% https://github.com/karthik/wesanderson for previews.
@konrad
konrad / doi2bibtex.sh
Last active August 23, 2017 08:52
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs
# (https://www.doi.org/).
#
# Call it like this:
#
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533
#
# Can also be used for several DOIs at once:
@giuseppebonaccorso
giuseppebonaccorso / hodgkin-huxley-main.py
Created August 19, 2017 15:06
Hodgkin-Huxley spiking neuron model in Python
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import odeint
# Set random seed (for reproducibility)
np.random.seed(1000)
# Start and end time (in milliseconds)
tmin = 0.0
@nitely
nitely / rpn.py
Last active December 18, 2020 23:03
Python shunting-yard algorithm
# LICENSE: MIT
import collections
RIGHT, LEFT = range(2)
Op = collections.namedtuple('Op', [
'precedence',
'associativity'])