Skip to content

Instantly share code, notes, and snippets.

@ErvalhouS
Created January 27, 2017 06:50
Show Gist options
  • Save ErvalhouS/6992113eaa0106cde3faa9c482f4a9cd to your computer and use it in GitHub Desktop.
Save ErvalhouS/6992113eaa0106cde3faa9c482f4a9cd to your computer and use it in GitHub Desktop.
Getting SINESP Python API to work with Ruby
from sinesp_client import SinespClient
import sys
sc = SinespClient()
result = sc.search(sys.argv[1])
print result
plate = "mxz6429"
result = system 'python', *["sinesp.py", plate]
result.sub("{", "").sub("}", "").split(", ").each {|pair| hash[pair.split(": ").first.gsub("'", "").to_sym] = pair.split(": ").last.gsub("'","") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment