Skip to content

Instantly share code, notes, and snippets.

@VeryFatBoy
VeryFatBoy / DEFRA AUR Data Downloader.ipynb
Created March 28, 2023 10:50 — forked from psychemedia/DEFRA AUR Data Downloader.ipynb
DEFRA AUR Data Downloader - quick hack for downloading UK air quality data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
version: '2'
services:
memsql:
image: 'memsql/cluster-in-a-box'
ports:
- 3306:3306
- 8080:8080
environment:
LICENSE_KEY: ${LICENSE_KEY}
# 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
CREATE DATABASE hellomemsql;
USE hellomemsql;
CREATE TABLE test (
message text NOT NULL
);
INSERT INTO test (message) VALUES ('this is a sample message');
@VeryFatBoy
VeryFatBoy / Vagrantfile
Created October 12, 2021 16:35 — forked from robrich/Vagrantfile
MemSQL Vagrant Dev Cluster
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
@VeryFatBoy
VeryFatBoy / deployment.yaml
Created October 12, 2021 16:35 — forked from robrich/deployment.yaml
Kubernetes first elements
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
labels:
app: myapp
spec:
replicas: 3
template:
metadata:
@VeryFatBoy
VeryFatBoy / deployment.yaml
Created October 12, 2021 16:35 — forked from robrich/deployment.yaml
RedHat OpenShift + MemSQL Operator
apiVersion: apps/v1
kind: Deployment
metadata:
name: memsql-operator-envvar
namespace: memsql
spec:
replicas: 1
selector:
matchLabels:
name: memsql-operator-envvar
@VeryFatBoy
VeryFatBoy / etl-with-memsql-spark-connector.ipynb
Last active October 12, 2021 16:34 — forked from robrich/etl-with-memsql-spark-connector.ipynb
MemSQL Spark Connector and MySQL JDBC
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@VeryFatBoy
VeryFatBoy / linear-regression-pushdown-disabled.ipynb
Created October 12, 2021 16:33 — forked from robrich/linear-regression-pushdown-disabled.ipynb
Training and testing a Machine Learning model with Spark and MemSQL
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.