The useful python libraries
contextlib.py : can include the object in “with” and keep the memory small. py4j: call java from python
contextlib.py : can include the object in “with” and keep the memory small. py4j: call java from python
It is very difficult to say which one I like more. Jupter vs. RMarkdown RMarkDown: quick edit for beautiful report, compile is slow Jupyter: console in web, flexible, but sometimes you will fall into chaos Both can integrate different language…
1. How to install ipython 3 kernel to jupyter? + install Anaconda 3 + copy “Jupyter notebook” symbol to desktop + right click -> “property” -> “start in” change to the folder which you want to begin with 2. How…
There are several methods to break the long string line in python. I think the triple-quoted “”” method is the easiest way. The reason is you can also for json object. myJson =””” { “result”: [{“short_description”: “I am getting bluescreen…
Using the SimpleGUICS2Pygame can animate the walking path easily. (The SimpleGUICS2Pygame is a implementation of simplegui.) I wrote an small code for the simulation in codeskulptor, you can run it directly and see the effect: But you need to install and…
I have two computers, the one has windows system at home, the other has ubuntu system in my office. In each computer, I have two python, the one is normal python, the other is anaconda. I try to install the…
Useful packages: R: library(matrixcalc) Python: numpy Matrix generation: R: matrix(1:6, 2, 3) Python: np.arange(1,7).reshape(2,3) construct a diagnal matrix: R: advanced-R diag(vector, nrow, ncol) #construct a matrix which diagonal elements is equal to the vector diag(matrix) # a vector which elements is…