This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Opaque type that models an index number used to identify a word. | |
type ItemIndex int | |
func (*ItemIndex i) IsPresent() { | |
return i >= 0 | |
} | |
// Opque type that models a fixed-length vector. | |
type Vector { | |
vector []float32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"bytes" | |
"compress/gzip" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"bytes" | |
"compress/gzip" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Genarate rsa keys. | |
*/ | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update && \ | |
sudo apt-get -qq -y install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
git \ | |
jq \ | |
software-properties-common && \ | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ | |
sudo mkdir -p -m 0755 /etc/apt/keyrings && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Idea for SPA server instead of NGINX - Dorel IO | |
* | |
* You can run this locally: `$ go run dorel-io-static-server.go` | |
* The concept is that the Wordpress API is asked if the page exsists, if yes, it sends the correct meta data and status code. | |
* If you try: localhost:8080/foobar you will get a 404 | |
* If yountry: localhost:8080/about-us (or another exsisting page) you will get a 200 with the correct metadata | |
* | |
* Bower compontents is always skipped and shown. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### | |
# Make sure the locale settings are in order: http://askubuntu.com/a/229512/119583 | |
# Tested on Ubuntu 16.04 LTS | |
### | |
## | |
# Run from /usr/local | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Tensorflow installation bash for Ubuntu 16.04 for x86_64 - Python 2.7 | |
# Set locale (comment when not needed) | |
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" | |
# Install CUDA | |
sudo apt-get update -y | |
sudo apt-get upgrade -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Place": { | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"invitation": { | |
"$ref": "#/definitions/PlaceInvitation" | |
}, | |
"member": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Room": { | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"placeId": { |