Skip to content

Instantly share code, notes, and snippets.

View paulgribble's full-sized avatar

Paul Gribble paulgribble

View GitHub Profile
@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'])
@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
@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:
@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.
@Harry-Harrison
Harry-Harrison / ContentView.swift
Last active December 1, 2024 17:59
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: {
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
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
"""
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
@skeeto
skeeto / README.md
Last active September 23, 2024 02:16
AI driving simulation
@huytd
huytd / wordle.md
Last active April 1, 2025 00:28
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

// ==UserScript==
// @name TweetXer
// @namespace https://github.com/lucahammer/tweetXer/
// @version 0.9.3
// @description Delete all your Tweets for free.
// @author Luca,dbort,pReya,Micolithe,STrRedWolf
// @license NoHarm-draft
// @match https://x.com/*
// @match https://mobile.x.com/*
// @match https://twitter.com/*