Skip to content

Instantly share code, notes, and snippets.

Barend bvanrijn

Block or report user

Report or block bvanrijn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
from math import floor, sqrt
from typing import List
def sieve(n: int) -> List[int]:
A: List[bool] = [True] * n
for i in range(2, floor(sqrt(n) + 1), 1):
if A[i]:
for j in range(i ** 2, n, i):
bvanrijn /
Last active Apr 5, 2020
This is the wordlist from with fixed accents.


This is the wordlist from with fixed accents. The original uses Windows-1252, which leads to some accents being replaced with the [Unicode replacement character][2]. Once I remembered how to, it was easily fixed using [Visual Studio Code][3], and I thought I'd upload the word list here for anyone else who might need it.

(🤓🎉: [][4] [links here][5])

bvanrijn /
Last active Feb 26, 2020
How to build Ruby from source on Ubuntu 18.04

⚠️ Warning: This will install an unstable version of Ruby with the latest changes.

apt update
apt install autoconf bison build-essential gcc git libedit-dev libffi-dev libgdbm-dev libqdbm-dev libreadline-dev libssl-dev make ruby zlib1g-dev
git clone --depth 1
cd ruby
bvanrijn / bench.txt
Created May 27, 2018 — forked from gabrielhpugliese/bench.txt
Python 3.4 asyncio + aiohttp parallel vs sequential requests
View bench.txt
[13:48:59:130701] Doing GET request to
[13:48:59:134958] Doing GET request to
[13:48:59:135498] Doing GET request to
[13:48:59:136174] Doing GET request to
****** STATUSES: [{'status': 200, 'url': ''}, {'status': 200, 'url': ''}, {'status': 200, 'url': ''}, {'status': 200, 'url': ''}]
[13:49:04:078752] Doing GET request to
[13:49:04:232725] Doing GET request to
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp = data
self.previous_hash = previous_hash
bvanrijn /
Last active Dec 14, 2016
Talking bots. Oh, my!
from urllib.parse import quote_plus
import requests
import time
class bot():
def __init__(self, name): = name
self.text = ''
self.said = []
bvanrijn /
Last active Dec 6, 2016
blink(1) telegram bot
import time
import tempfile
import logging
import requests
from colorthief import ColorThief
from blink1.blink1 import Blink1
from telegram.ext import Updater, MessageHandler, Filters
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
View recursive-fibonacci.go
package main
import "fmt"
func F(n int) int {
if n == 0 { return 0 }
if n == 1 { return 1 }
return F(n-2) + F(n-1)
# -*- coding: utf-8 -*-
usage: python FILE
Converts X or H system to Esperanto alphabet characters in FILE
Written by @grooveplex, released into the public domain under the terms of the
CC0 license.
View mdl.css
font-family: Roboto, sans-serif;
background: #2196f3;
background: #1976d2;
height: 150px;
-webkit-box-shadow: 0px 1px 8px #2c2c2c;
-moz-box-shadow: 0px 1px 8px #2c2c2c;
-ms-box-shadow: 0px 1px 8px #2c2c2c;
You can’t perform that action at this time.