Skip to content

Instantly share code, notes, and snippets.

View bobvanluijt's full-sized avatar

Bob van Luijt bobvanluijt

View GitHub Profile
@bobvanluijt
bobvanluijt / utf8-lowercase.py
Created September 2, 2019 11:45
List of UTF-8 lowercase characters in Python 3
def printIfLower(i):
s = chr(i)
if s.islower():
if s is not None:
print(s)
for x in range(1, 125251):
printIfLower(x)
$ docker container rm $(docker container ls -aq) && docker image prune -af
@bobvanluijt
bobvanluijt / gist:866547300a3acbe2c24fba12ff8ef67f
Last active January 3, 2020 21:05
Wget websites from SeMI PoV
wget --recursive --quiet --level=0 -U "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --directory-prefix="collection/" --follow-tags=a -H semi.technology
@bobvanluijt
bobvanluijt / Logics.md
Created February 11, 2020 12:07
Logics

Logic

Categorical Logic

Propositional Logic

variables

  • q
@bobvanluijt
bobvanluijt / synthwaveglow.md
Created February 16, 2020 18:24 — forked from sbinlondon/synthwaveglow.md
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

@bobvanluijt
bobvanluijt / Weaviate-vector.ho
Created May 8, 2020 14:36
Example of Weaviate vector generator
// takes an array of vectors and outputs a single mean vector
function meanVector(inputVectors) {
// sum up each dimension in a single “sum” vector
sums = new Array(dimensions(inputVectors))
for i = 0; i < dimensions(inputVectors); i ++ {
for j = 0; j < inputVectors.length(); j ++ {
sums[i] += inputVectors[j][i]
}
}
@bobvanluijt
bobvanluijt / microtonal.js
Created June 7, 2020 18:52
Microtonal JS
// https://pages.mtu.edu/~suits/notefreqs.html
// https://pages.mtu.edu/~suits/NoteFreqCalcs.html
// create web audio api context
var audioCtx = new(window.AudioContext || window.webkitAudioContext)();
// microtonal division
var microtonalDiv = 24;
var c4 = 261.6256;
@bobvanluijt
bobvanluijt / show-publication-vectors.graphql
Created April 20, 2021 14:20
Show Publication vectors in GraphQL for Weaviate's News Article demo dataset
{
Get {
Publication {
name
_additional {
vector
}
}
}
}
@bobvanluijt
bobvanluijt / NEN-data.json
Last active June 14, 2021 14:34
NEN – example data
[
{
"class": "Document",
"properties": [
{
"name": "title",
"dataType": [
"string"
]
},
@bobvanluijt
bobvanluijt / NEN-1.graphql
Last active June 14, 2021 14:16
NEN - first GraphQL query
{
Get {
Paragraph (
limit: 3 # show the first three results
nearText: {
concepts: ["machines to make pasta"] # the semantic query
certainty: 0.6 # between 0.0 and 1.0, the higher the certainty the more the document should match the query
}){
inDocument {
... on Document {