Skip to content

Instantly share code, notes, and snippets.

@criccomini
criccomini / test_dags.py
Created June 22, 2016 15:18
test_dags.py
import os
import unittest
from airflow.models import DagBag
class TestDags(unittest.TestCase):
"""
Generic tests that all DAGs in the repository should be able to pass.
"""
@sashka
sashka / rename.sh
Created April 11, 2015 22:10
Rename file with the SHA1 of its content.
#!/bin/bash
find . -type f -name '*.m[p4][a3]' -exec bash -c 'fn=$(basename "$0"); ext=$(echo "${fn##*.}" | tr '[A-Z]' '[a-z]'); mv "$0" "$(sha1sum "$0" | cut -d" " -f1).$ext"' {} \;