Skip to content

Instantly share code, notes, and snippets.

👍
Focusing

Bob van Luijt bobvanluijt

👍
Focusing
Block or report user

Report or block bobvanluijt

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
View gist:f2a0bc149280ec71b97287b14e9c80a1
$ docker container rm $(docker container ls -aq) && docker image prune -a
@bobvanluijt
bobvanluijt / utf8-lowercase.py
Created Sep 2, 2019
List of UTF-8 lowercase characters in Python 3
View utf8-lowercase.py
def printIfLower(i):
s = chr(i)
if s.islower():
if s is not None:
print(s)
for x in range(1, 125251):
printIfLower(x)
View Operator for And and And Or operations.graphql
{
Local{
Get{
Things{
Place(where:{
operator:And
operands:[
{
operator:Equal
path:["rating"]
View download-weaviate-DC.sh
sudo apt-get update && \
sudo apt-get -qq -y upgrade && \
sudo apt-get -qq -y install \
apt-transport-https \
ca-certificates \
curl \
jq \
software-properties-common && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
sudo add-apt-repository \
@bobvanluijt
bobvanluijt / emptyWeaviate.py
Created May 2, 2019
Remove all concepts from Weaviate
View emptyWeaviate.py
##
# This script removes all things and action (i.e., concepts) from a Weaviate.
#
# Make sure to set the WEAVIATE_URL
##
import requests
from datetime import datetime
WEAVIATE_URL = "localhost"
HEADERS = {'Content-type': 'application/json'}
@bobvanluijt
bobvanluijt / group.graphql
Last active Oct 25, 2018
Idea for grouping
View group.graphql
###
# The result below shows the sum of population of all cities.
###
{
Local {
Get(where:{
operands: [{
path: ["Things", "City", "population"],
operator: GreaterThan
valueInt: 1000000
View check all checkboxes in DOM
var checkboxes = document.getElementsByTagName("*");
for (var i=0, max=checkboxes.length; i < max; i++) {
if (checkboxes[i].type == 'checkbox') {
checkboxes[i].checked = true;
}
}
@bobvanluijt
bobvanluijt / main.go
Created Jun 5, 2018
Example of additional functions
View main.go
// 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
@bobvanluijt
bobvanluijt / csvToCbor.go
Created May 23, 2018
Creates CBOR from GloVe vector file
View csvToCbor.go
package main
import (
"bufio"
"bytes"
"compress/gzip"
"fmt"
"io/ioutil"
"log"
"os"
@bobvanluijt
bobvanluijt / vector-draft.go
Last active May 23, 2018
VECTOR DRAFT IN GO
View vector-draft.go
package main
import (
"bufio"
"bytes"
"compress/gzip"
"errors"
"fmt"
"io/ioutil"
"log"
You can’t perform that action at this time.