Skip to content

Instantly share code, notes, and snippets.

View stevesimmons's full-sized avatar

Steve Simmons stevesimmons

  • Sikoia Limited
  • Amsterdam and London
View GitHub Profile
@stevesimmons
stevesimmons / stars.sh
Created January 26, 2022 07:34
Extract starred repos on Github
#!/bin/bash
USER=${1:-stevesimmons}
while curl -s "https://api.github.com/users/$USER/starred?per_page=100&page=${page:-1}" \
| jq -r -e '.[].full_name' && [[ ${PIPESTATUS[1]} != 4 ]]; do
let page++
done
@stevesimmons
stevesimmons / bloomfilter.py
Last active October 25, 2020 21:54
Python bloomfilter accelerated by numba
import base64
import math
import random
import timeit
from typing import List, Optional
import numba
import numpy as np
class BloomFilter:
@stevesimmons
stevesimmons / github-stars.sh
Created July 5, 2020 12:19
Extract Github stars and dates they were starred
#!/bin/bash
# List starred GitHub repos and dates they were starred
# Usage: github-stars.sh > stars.txt
# Requires bash, sed, curl and jq.
# Note if unauthenticated, this has a rate limit of 60 requests per hour.
# So with 1000 starred repos 100 per page, this script can be called max 5 times in an hour.
# Overcome the rate limit by setting up an API token (Profile | Developer Options)
USER="GH_USERNAME"
AUTH="GH_USERNAME:GH_TOKEN"