Useful Hive UDFs (based on nexr's Hive UDF repo)