This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: myapp | |
labels: | |
app: myapp | |
spec: | |
replicas: 3 | |
template: | |
metadata: |
This file contains 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
Vagrant.configure("2") do |config| | |
config.vm.box = "generic/ubuntu1904" | |
# set the provider | |
config.vm.provider "virtualbox" | |
# configure the provider | |
config.vm.provider "virtualbox" do |v| | |
v.cpus = 4 | |
v.memory = 4096 | |
end |
This file contains 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
CREATE DATABASE hellomemsql; | |
USE hellomemsql; | |
CREATE TABLE test ( | |
message text NOT NULL | |
); | |
INSERT INTO test (message) VALUES ('this is a sample message'); | |
This file contains 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
# A deployment ensures pod(s) are restarted on failure | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: memsql | |
spec: | |
replicas: 1 # only create one pod (container) | |
selector: | |
matchLabels: | |
app: memsql |
This file contains 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
version: '2' | |
services: | |
memsql: | |
image: 'memsql/cluster-in-a-box' | |
ports: | |
- 3306:3306 | |
- 8080:8080 | |
environment: | |
LICENSE_KEY: ${LICENSE_KEY} |
This file contains 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
import pandas as pd | |
import geopandas as gpd | |
from shapely import wkt | |
import time | |
# Read pub points from CSV to a pandas dataframe | |
pubs = pd.read_csv('~/Documents/pub_points.csv', | |
header=None, names=['name', 'coordinates']) | |
# Parse the WKT coordinate format from PostGIS |
This file contains 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
CREATE DATABASE IF NOT EXISTS iris_db; | |
USE iris_db; | |
CREATE TABLE IF NOT EXISTS iris ( | |
vector BLOB, | |
species VARCHAR(20) | |
); | |
INSERT INTO iris VALUES |
This file contains 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
sepal_length | sepal_width | petal_length | petal_width | species | |
---|---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | Iris-setosa | |
4.9 | 3 | 1.4 | 0.2 | Iris-setosa | |
4.7 | 3.2 | 1.3 | 0.2 | Iris-setosa | |
4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa | |
5 | 3.6 | 1.4 | 0.2 | Iris-setosa | |
5.4 | 3.9 | 1.7 | 0.4 | Iris-setosa | |
4.6 | 3.4 | 1.4 | 0.3 | Iris-setosa | |
5 | 3.4 | 1.5 | 0.2 | Iris-setosa | |
4.4 | 2.9 | 1.4 | 0.2 | Iris-setosa |
This file contains 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
CREATE DATABASE iris_db; | |
USE iris_db; | |
CREATE TABLE iris ( | |
sepal_length FLOAT, | |
sepal_width FLOAT, | |
petal_length FLOAT, | |
petal_width FLOAT, | |
species VARCHAR(20) |
This file contains 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
DROP DATABASE IF EXISTS e_store; | |
CREATE DATABASE IF NOT EXISTS e_store | |
DEFAULT CHARACTER SET utf8 | |
DEFAULT COLLATE utf8_general_ci; | |
USE e_store; | |
CREATE TABLE brands ( | |
id INT UNSIGNED NOT NULL AUTO_INCREMENT, |