Skip to content

Instantly share code, notes, and snippets.

@clee704
clee704 / matcher.py
Last active November 28, 2015 12:34
Simple tag expression matcher
LPAR = 0
RPAR = 1
AND = 2
OR = 3
NOT = 4
IDENT = 5
EOF = 6
token_names = ('LPAR', 'RPAR', 'AND', 'OR', 'NOT', 'IDENT', 'EOF')
@clee704
clee704 / a.cpp
Created September 2, 2016 08:56
Make a unary lambda function from a pointer to function/data member (C++14)
#include <functional>
#include <iostream>
#include <utility>
using namespace std;
template<class>
struct memfun_traits {};
template<class C, class R, class... Args>
@clee704
clee704 / pat.py
Last active May 21, 2024 06:29
Azure DevOps PAT helper
# Moved to https://github.com/clee704/azure-pat-helper
#!/bin/env python3
import argparse
import json
import os.path
parser = argparse.ArgumentParser()
parser.add_argument("files", nargs="+", help="JSON files containing RDD infos per stage")
args = parser.parse_args()