This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
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
#!/bin/sh | |
brew install python boost exiv2 | |
curl -O http://launchpadlibrarian.net/61465005/pyexiv2-0.3.0.tar.bz2 | |
tar xjvf pyexiv2-0.3.0.tar.bz2 | |
cd pyexiv2-0.3.0 | |
# https://answers.launchpad.net/pyexiv2/+question/140742 | |
echo "env['FRAMEWORKS'] += ['Python']" >> src/SConscript |
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
source | target | weight | |
---|---|---|---|
sam | tully | 3 | |
sam | pat | 8 | |
sam | kim | 2 | |
sam | pris | 1 | |
roy | pris | 5 | |
roy | sam | 1 | |
tully | sam | 1 | |
tully | pris | 5 | |
tully | kim | 3 |
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
from pyspark.sql import SparkSession | |
spark = SparkSession \ | |
.builder \ | |
.appName("demography mapper") \ | |
.getOrCreate() | |
df_user = spark.read.format("com.mongodb.spark.sql.DefaultSource")\ | |
.option("spark.mongodb.input.uri", "mongodb://localhost:27017/raw.user").load() |
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 objc | |
from Foundation import NSBundle | |
IOKit = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
functions = [("IOServiceGetMatchingService", b"II@"), | |
("IOServiceMatching", b"@*"), | |
("IORegistryEntryCreateCFProperties", b"IIo^@@I"), | |
("IOPSCopyPowerSourcesByType", b"@I"), | |
("IOPSCopyPowerSourcesInfo", b"@"), |
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
# Install K3S | |
curl -sfL https://get.k3s.io | sh - | |
# Copy k3s config | |
mkdir $HOME/.kube | |
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config | |
sudo chmod 644 $HOME/.kube/config | |
# Check K3S | |
kubectl get pods -n kube-system |