Skip to content

Instantly share code, notes, and snippets.

View asamoal's full-sized avatar

Leslie A asamoal

View GitHub Profile
@asamoal
asamoal / prov2graphson_TP3.groovy
Created November 29, 2023 06:50 — forked from mattyb149/prov2graphson_TP3.groovy
A Groovy script to take NiFi provenance events and transform them into Tinkerpop3-compliant GraphSON
import groovy.json.*
import java.util.UUID
def json = new JsonSlurper().parseText("file:///Users/mburgess/git/nifi-client/prov.json".toURL().text)
def links = json.links.collect { ['outV': it.targetId, 'inV': it.sourceId] }
println links
new File('prov_TP3.json').withWriter { out ->
def builder = new JsonBuilder()
#!/bin/bash
# This script is edited by Brice Dutheil
# See there in french http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
# Translate button is broken for now, please use Google to translate this website.
#
# 2013/05/11 Added a few more guidance when Java Preferences is not available anymore
# Added a simple example of a JDK switch function.
#
# 2012/08/25 This script didn't behave correctly when ran on 10.8.1
#!/usr/bin/env python
from pypodio2 import api
import sys, shutil, os, json
c = api.OAuthClient(sys.argv[1],sys.argv[2], sys.argv[3], sys.argv[4])
orginfo = c.transport.get(url = '/org/')
def writerawtext(filename, data):
try: