This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib, urllib, string | |
# Just a quick, dirty function I made before a proper API appeared (e.g. goslate). | |
def translate(IN, OUT, text): | |
text = urllib.quote(text) | |
conn = httplib.HTTPConnection("translate.google.com") | |
conn.request("GET", "/translate_a/t?client=t&text="+text+"&hl="+IN+"&tl="+OUT) | |
res = conn.getresponse().read() | |
res = res[4:string.find(res,",\"\",\"\"]]")] | |
res = string.split(res, "],[") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
# Get lv2 syscall group | |
def getLv2SyscallGroup(id): | |
if 1 <= id <= 31: | |
return "sys_process" | |
if 40 <= id <= 58: | |
return "sys_ppu_thread" | |
if 67 <= id <= 69 or id == 77: |