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
/* | |
* 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
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
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
// 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
var checkboxes = document.getElementsByTagName("*"); | |
for (var i=0, max=checkboxes.length; i < max; i++) { | |
if (checkboxes[i].type == 'checkbox') { | |
checkboxes[i].checked = true; | |
} | |
} |
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
### | |
# The result below shows the sum of population of all cities. | |
### | |
{ | |
Local { | |
Get(where:{ | |
operands: [{ | |
path: ["Things", "City", "population"], | |
operator: GreaterThan | |
valueInt: 1000000 |
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
## | |
# 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'} |
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 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 \ |
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
{ | |
Local{ | |
Get{ | |
Things{ | |
Place(where:{ | |
operator:And | |
operands:[ | |
{ | |
operator:Equal | |
path:["rating"] |