Skip to content

Instantly share code, notes, and snippets.

View alexott's full-sized avatar
🏠
Working from home

Alex Ott alexott

🏠
Working from home
View GitHub Profile
@alexott
alexott / README.md
Last active August 21, 2023 12:33
AAD -> DBX synchronizer using Terraform

This gist contains Terraform code that allows to synchronize groups & users from AAD into the Databricks workspace, without need to setup SCIM connector.

This is an extended version of initial synchronizer implemented by Serge.

To start, download all .tf files to some place, and create a file terraform.tfvars with following content:

groups = {
 "My AAD group" = {
@alexott
alexott / code.scala
Last active July 22, 2020 12:57
Testing quality of the language detection of Spark NLP, compared with FastText
// full code is here: https://github.com/alexott/spark-playground/tree/master/spark-nlp
@alexott
alexott / batches.puml
Created May 18, 2020 09:52
Execution of Cassandra's logged batch
@startuml
hide footbox
participant "Client" as client
database "Coordinator DSE node" as cnode
database "Batchlog DSE nodes" as bnode
database "DSE Nodes" as onode
alt successful case
@alexott
alexott / 1.cql
Created August 16, 2019 11:21
example of counter deletion
cqlsh:test> describe test.abc6
CREATE TABLE test.abc6 (
id int PRIMARY KEY,
c counter
);
cqlsh:test> select * from test.abc6;
id | c
@alexott
alexott / list.txt
Created August 8, 2019 08:52
tlp-stress answer........
>curl -L -O "https://dl.bintray.com/thelastpickle/tlp-tools-tarball/tlp-stress-1.0.0.tar"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 22.5M 100 22.5M 0 0 3641k 0 0:00:06 0:00:06 --:--:-- 4985k
>tar xvf tlp-stress-1.0.0.tar
x tlp-stress-1.0.0/
x tlp-stress-1.0.0/lib/
...
>cd tlp-stress-1.0.0
test ♈ up ☝️ light skin ☝🏻 Zimbabwe 🇿🇼 England 🏴 keycap0 0️⃣end 0
@alexott
alexott / Dockerfile
Created January 11, 2019 16:02
Docker image for Zeppelin + DSE
ARG DSE_VERSION=6.7.0
FROM datastax/dse-server:${DSE_VERSION}
ARG Z_VERSION="0.8.0"
ENV Z_HOME="/zeppelin"
ARG Z_URL_PREFIX=http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}
ARG Z_TARBALL=zeppelin-${Z_VERSION}-bin-all.tgz
ARG Z_DOWNLOAD_URL=${Z_URL_PREFIX}/${Z_TARBALL}
@alexott
alexott / generate-dse-topology.py
Last active January 7, 2019 13:52
Scripts for generation DSE service discovery JSON files for Prometheus
from dse.cluster import Cluster
import sys
import json
if (len(sys.argv) < 3):
print("Usage: generate.py contact_point file_name")
exit(1)
cluster = Cluster([sys.argv[1]])
session = cluster.connect()
@alexott
alexott / index.md
Last active June 14, 2018 12:44
Draft of documentation about Java driver's Built statements

Built statements

Built statements are generated via [QueryBuilder]'s Fluent API. Use of Fluent API allows easier build of the complex queries, comparing with hardcoding the CQL statements into the source code.

Note: The provider builders perform very little validation of the built query. There is thus no guarantee that a built query is valid, and it is definitively possible to create invalid queries.

@alexott
alexott / find-corrupted-jar.sh
Last active March 13, 2018 05:32
Snippet to find corrupted JAR in Maven repository
for i in `find ~/.m2/repository/ -name \*.jar`; do unzip -l $i 2> /dev/null > /dev/null ; RES=$?; if [ $RES -ne 0 ]; then echo "$i: $RES" ; fi ; done