bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| /** | |
| * Generate Case class from DataFrame.schema | |
| * | |
| * val df:DataFrame = ... | |
| * | |
| * val s2cc = new Schema2CaseClass | |
| * import s2cc.implicit._ | |
| * | |
| * println(s2cc.schemaToCaseClass(df.schema, "MyClass")) | |
| * |
Easiest HDFS cluster in the world with kubernetes.
Inspiration from kimoonkim/kubernetes-HDFS
kubectl create -f namenode.yaml
kubectl create -f datanode.yaml
Setup a port-forward to so you can see it is alive:
| import org.apache.spark.sql.SparkSession | |
| import org.apache.spark.sql.functions._ | |
| object WordCountKafkaCouchbase { | |
| def main(args: Array[String]) { | |
| // create spark session with settings | |
| val spark = SparkSession | |
| .builder | |
| .appName("Word Count Test") | |
| .config("spark.couchbase.username", "[username goes here]") |
| import logging | |
| import os | |
| from selenium import webdriver | |
| from selenium.webdriver.firefox.options import Options | |
| from selenium.webdriver.support import expected_conditions | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.common.by import By | |
| from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
| from joblib import Parallel, delayed |
Nix is a package manager that you can install in parallel with your system package manager on Linux or MacOS. It allows you to effortlesly build any of the thousands of packages defined in the nixpkgs repository or write your own package expressions. Packages in the nixpkgs repository get periodically built by our CI server so the GIMP dependencies will be obtained from binary cache saving you time.
To obtain Nix, you can simply run an installation script, or use your package manager if it is packaged in your distro repositories. Notably, there is a package in Arch’s AUR and Debian Unstable.
The pull request containing changes for the latest changes for GIMP master is NixOS/nixpkgs#67576. I usually update the branch several times a month to point to t
| # I use MacOS VMs from github for iOS development. | |
| # By no suprise they are a bit slow and have a lot of things I don't use | |
| # Hence this script for lighter and better VM for my iOS development and builds | |
| # GUI and animation related things to tweak | |
| defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false | |
| defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 | |
| defaults write -g QLPanelAnimationDuration -float 0 | |
| defaults write com.apple.dock autohide-time-modifier -float 0 | |
| defaults write com.apple.dock launchanim -bool false | |
| sudo sysctl debug.lowpri_throttle_enabled=0 |
| #!/bin/bash | |
| DEFAULT_WORKFLOW="https://gist.github.com/10c8/1d11361a82d63da4116437e67d4a8f7e/raw" | |
| APT_PACKAGES=( | |
| # "package-1" | |
| ) | |
| PIP_PACKAGES=( | |
| # "package-1" |