Skip to content

Instantly share code, notes, and snippets.

View gromgull's full-sized avatar

Gunnar Aastrand Grimnes gromgull

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gromgull
gromgull / Unigram.ipynb
Last active August 30, 2023 10:00
Unigram Tokenizer Tutorial from Huggingface
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gromgull
gromgull / WordPiece.ipynb
Created August 30, 2023 09:59
WordPiece Tokenizer tutorial from Huggingface
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gromgull
gromgull / BPE.ipynb
Created August 30, 2023 09:58
BPE Encoding Tutorial from Huggingface
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gromgull
gromgull / diamond91.scad
Created March 31, 2018 06:19
Wharfedale Diamond 9.1 OpenScad model
// This is a fairly accurate model of the Wharfedale Diamond 9.1 Bookshelf speaker
// The outer measurements + screw-holes should be quite accurate.
// The curves are done by trial & error, the actual speaker elements are just guesswork.
H = 29.6;
module m6() { rotate([90, 0, 0]) cylinder(5, r=0.3, $fn=20); }
module base() {
//translate([0,0,1]) polygon([[ -6, 0 ], [-7.75, 26.5 ], [ 7.75, 26.5 ], [ 6, 0 ]]);

Keybase proof

I hereby claim:

  • I am gromgull on github.
  • I am gromgull (https://keybase.io/gromgull) on keybase.
  • I have a public key ASAlLO2JSXOL1xR5ogKlV47xo8v28loAeQXYeLfyj8CfEQo

To claim this, I am signing this object:

@gromgull
gromgull / shrdlu.md
Created July 13, 2017 09:54
The SHRDLU example dialog

PICK UP A BIG RED BLOCK.

OK. (does it)

GRASP THE PYRAMID.

I DON'T UNDERSTAND WHICH PYRAMID YOU MEAN.

FIND A BLOCK WHICH IS TALLER THAN THE ONE YOU ARE HOLDING AND PUT IT INTO THE BOX.

@gromgull
gromgull / doctor.md
Last active June 9, 2017 09:12
a conversation with the emacs doctor

I am the psychotherapist. Please, describe your problems. Each time you are finished talking, type RET twice.

I am writing this article about chatbots

Why do you say you are writing this article about chatbots?

because it's true.

Can you elaborate on that?

@gromgull
gromgull / processpool_tester.py
Created May 16, 2017 18:43
concurrent.futures.ProcessPoolExecutor bug in 2.7.12
"""
This script will break in various ways in python 2.7 with the concurrent.futures backport.
The script will either:
* run just fine, and exit cleanly
* do all the work, but not exit.
* and more rarely, not actually start any work.
from rdflib import Graph, Literal, URIRef
from rdflib.collection import Collection
g = Graph()
g.parse(data = '''<urn:thing> <urn:prop> ( 1 2 3 ) . ''', format="turtle")
collection_resource = g.value(URIRef('urn:thing'), URIRef('urn:prop'))