Skip to content

Instantly share code, notes, and snippets.

@kppullin
kppullin / airflow-k8s-executor-minikube-helm.md
Last active September 12, 2022 19:47
Airflow w/ kubernetes executor + minikube + helm

Overview

The steps below bootstrap an instance of airflow, configured to use the kubernetes airflow executor, working within a minikube cluster.

This guide works with the airflow 1.10 release, however will likely break or have unnecessary extra steps in future releases (based on recent changes to the k8s related files in the airflow source).

Prerequisites

  • Docker installed
  • Minikube installed and started
@jakebathman
jakebathman / icd_regex.md
Last active October 12, 2023 09:31
ICD-9 and ICD-10 code regex

ICD code matching regex

The regex patterns below only help validate when something is not valid ICD-10 or ICD-9. They do not ensure that the code exists. You should consult a list of valid ICD codes for that level of verification.

ICD-10-CM list: https://gist.github.com/jakebathman/063c50cb9772e4bfc864a9e1ff4ccc8d

ICD-9 list: https://gist.github.com/jakebathman/f1ed0d473f12091a708243b0ddf03d82

ICD-10/ICD-9 combined regex

Useful for validating field values that could contain both, and may or may not use decimals

anonymous
anonymous / app.py
Created June 29, 2016 16:28
Drinks Sqla
from flask_sqlalchemy import SQLAlchemy
from flask import Flask
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///drinks.db'
db = SQLAlchemy(app)
class DrinkIngredient(db.Model):
id = db.Column(db.Integer, primary_key=True)
@letalvoj
letalvoj / MongoConfiguraion.java
Created May 5, 2016 17:47
Using Jackson together with Spring Data MongoDB
package cz.blindspot.armorway.analytics.configuration;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.TreeNode;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.mongodb.*;
@bishboria
bishboria / springer-free-maths-books.md
Last active September 17, 2024 05:30
Springer made a bunch of books available for free, these were the direct links
@alex-shpak
alex-shpak / querydsl.gradle
Last active January 9, 2020 05:45
Gradle script for querydsl-apt processor with separate classpath
// apply plugin: 'idea'
sourceSets {
generated.java
main.java.srcDirs += generated.java.srcDirs
}
configurations {
querydslapt
}
@thobson
thobson / gist:a49c896f1c6c1c4cbb58
Last active September 14, 2020 03:40
A simple example which shows how to work around the common Fork Join Pool in Java 8
public class ForkJoinTaskPoolTest {
public static void main(String args[]) throws Exception {
ThreadTest test = new ThreadTest();
test.executeTasks();
}
void executeTasks() throws Exception {
final List<Integer> firstRange = buildIntRange();
final List<Integer> secondRange = buildIntRange();
@johnynek
johnynek / AliceInAggregatorLand.scala
Last active January 24, 2024 19:38
A REPL Example of using Aggregators in scala
/**
* To get started:
* git clone https://github.com/twitter/algebird
* cd algebird
* ./sbt algebird-core/console
*/
/**
* Let's get some data. Here is Alice in Wonderland, line by line
*/
@mattmight
mattmight / pythedral.py
Created December 2, 2014 22:48
Church Python
# Void
VOID = lambda void: void
# Booleans / Conditionals
IF = lambda c: lambda t: lambda f: c(t)(f)

case studies

learning… haskell math how generators work in python french how to draw an instrument