Skip to content

Instantly share code, notes, and snippets.

View Humbedooh's full-sized avatar

Daniel Gruno Humbedooh

View GitHub Profile
@Humbedooh
Humbedooh / asf-oauth-example.py
Created July 19, 2019 07:03
ASF Oauth Examples
#!/usr/bin/env python3
""" ASF OAuth example in Python 3"""
import cgi
import os
import requests
import urllib
import uuid
def init_oauth():
-- quick and dirty JSON conversion
local function quickJSON(input)
if type(input) == "table" then
local t = 'array'
for k, v in pairs(input) do
if type(k) ~= "number" then
t = 'hash'
break
end
end