Skip to content

Instantly share code, notes, and snippets.

@dchaplinsky
Created February 23, 2017 23:49
Show Gist options
  • Save dchaplinsky/1c3f02909b62fc8800bd92d98ee20425 to your computer and use it in GitHub Desktop.
Save dchaplinsky/1c3f02909b62fc8800bd92d98ee20425 to your computer and use it in GitHub Desktop.
from rpy2 import robjects
from rpy2.robjects.packages import importr, STAP
jsonlite = importr("jsonlite")
with open('function_to_test_decl_read_incomr_process.R', 'r') as f:
s = f.read()
proc = STAP(s, "declaration_income_processing")
with open("declarations_bank/data/01/авраменко_максим_ігорович_01a15d65-8f55-4c59-86f3-c6a58bc2f37b.json", "r") as fp:
s = fp.read()
print(jsonlite.toJSON(proc.declaration_income_processing(jsonlite.fromJSON(s))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment