====== netJSON ====== * {{pub:pdf:sreda1263.pdf}} * [[notes:net:json|JSON]] ===== Rename JSON fields ===== * http://stackoverflow.com/questions/4647817/javascript-object-rename-key * http://stackoverflow.com/questions/13391579/how-to-rename-json-key * http://stackoverflow.com/questions/14789405/renaming-a-field-in-an-object * http://stackoverflow.com/questions/21148419/efficiently-rename-re-map-javascript-json-object-keys-within-structured-array * http://stackoverflow.com/questions/32452014/change-key-name-in-javascript-object * https://recalll.co/app/?q=Efficiently%20rename/re-map%20javascript/json%20object%20keys%20within%20structured%20array ===== Platform and working directory ===== >>> import platform >>> h = platform.uname()[1] >>> h 'fmf6707' >>> os.chdir('C:/Users/batagelj/work/Python/graph/graph') >>> os.getcwd() 'C:\\Users\\batagelj\\work\\Python\\graph\\graph' >>> > Sys.info()["nodename"] nodename "FMF6707" > help(Sys.info) > setwd('C:/Users/batagelj/work/Python/graph/graph') > getwd() [1] "C:/Users/batagelj/work/Python/graph/graph" > ===== Checksum ===== * https://en.wikipedia.org/wiki/Checksum * http://stackoverflow.com/questions/3431825/generating-an-md5-checksum-of-a-file * http://stackoverflow.com/questions/24847602/how-to-create-a-checksum-of-a-file-in-python * http://stackoverflow.com/questions/16874598/how-do-i-calculate-the-md5-checksum-of-a-file-in-python * https://gist.github.com/juusimaa/5846242 * https://docs.python.org/3/library/hashlib.html * https://cran.r-project.org/web/packages/digest/ * https://stat.ethz.ch/R-manual/R-devel/library/tools/html/checkMD5sums.html * https://stat.ethz.ch/R-manual/R-devel/library/tools/html/md5sum.html * https://www.quora.com/Why-does-R-use-MD5-checksum-to-verify-that-we-have-a-valid-download