Skip to content

Instantly share code, notes, and snippets.

View jsmits's full-sized avatar

Sander Smits jsmits

  • DeepHealth
  • The Netherlands
View GitHub Profile
@jsmits
jsmits / words.md
Created April 14, 2024 08:42 — forked from fogleman/words.md
Mnemonic Encoding Word List

Mnemonic Encoding Word List

http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html

  • The wordlist contains 1626 words.
  • All words are between 4 and 7 letters long.
  • No word in the list is a prefix of another word (e.g. visit, visitor).
  • Five letter prefixes of words are sufficient to be unique.
  • The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning in another language or is pronounced very differently but for the purpose of the encoding it is still ok - I assume that when the encoding is
@jsmits
jsmits / finetune_llama_v2.py
Created July 21, 2023 14:51 — forked from younesbelkada/finetune_llama_v2.py
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@jsmits
jsmits / convert-arraybuffer.js
Created November 8, 2021 08:18 — forked from nuclearglow/convert-arraybuffer.js
ArrayBuffer <-> JSON <-> ArrayBuffer
// array buffer to JSON
const dataString JSON.stringify(Array.from(new Uint8Array(arrayBuffer)));
// send around
// JSON to ArrayBuffer
new Uint8Array(JSON.parse(dataString)).buffer
@jsmits
jsmits / client.js
Created November 3, 2021 22:15 — forked from hagino3000/client.js
WebSocket with binary data
var socket = null;
function bootstrap() {
// 適当な図形を描画
var c = document.getElementById('mycanvas');
var ctx = c.getContext('2d');
ctx.globalalpha = 0.3;
for(var i=0; i<1000; i++) {
ctx.beginPath();
@jsmits
jsmits / .eslintrc.js
Created June 18, 2020 19:37 — forked from adrianhall/.eslintrc.js
A sample .eslintrc file
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
@jsmits
jsmits / nginx
Last active August 29, 2015 14:13 — forked from vdel26/nginx
#!/bin/sh
#
# chkconfig: 2345 55 25
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx
# For Debian, run: update-rc.d -f nginx defaults
# For CentOS, run: chkconfig --add nginx
#
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
@jsmits
jsmits / fabfile.py
Created January 24, 2010 13:56 — forked from heckj/fabfile.py
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'