THE PERSONAL NOTEBOOK OF SHELPER
So I write.
Ideas, projects, and things
learned along the way.
Latest writing
28 ENTRIESusing travis CI for github repo
using Nikola with Travis CI on github.io pages major reference here it is noticeable that instead of running travis login travis enable travis encrypt-file id_rsa --add we should run travis login travis encrypt-file id_rsa --add travis enable
set up nikola for markdown
to use nikola you need to install it with some other packages as well pip instal nikola markdown ws4py watchdog then to enable markdown, you need to change the conf.py variable POSTS and PAGES POSTS = ( ("posts/*.md", "posts", "post.tmpl"), ("posts/*.rst", "posts", "post.tmpl"), ("posts/*.txt", "posts", "post.tmpl"), ("posts/*.html", "posts", "post.tmpl"), ) PAGES = ( ("pages/*.md", "pages", "story.tmpl"), ("pages/*.rst", "pages", "story.tmpl"), ("pages/*.txt", "pages", "story.tmpl"), ("pages/*.html", "pages", "story.tmpl"), ) you may also need to change the github settings for easy github deploy
how to start python project on github
steps are: install cookiecutter: python -m pip install cookiecutter run cookiecutter to initiate a project: cookiecutter('https://github.com/audreyr/cookiecutter-pypackage.git') under the project folder on github, start a new repo python_prj run git init in the local project folder and commit run git remote add origin git@github.com:username/projectname.git using git@git requires to setup the ssh key pair, this can be found by easily google it or under FAQ of github run git push -u origin master
elisp notes
quote for symbols: (setq symbol) ;; is equivelent to (set 'symbol) the quote means; keep as it is, dont try to evaluate, so if no quote, the lisp processor will try to evaluate it, means the symbol (or the first element of the list) has to be evaluatable as either a function, or a defined variable let vs. let*: (setq y 2) (let ((y 1) (z y)) (list y z)) ⇒ (1 2) (setq y 2) (let* ((y 1) (z y)) (list y z)) ⇒ (1 1) let* binds 1 to y immediately, while let evaluate old y as 2, then list binds 1 to the new y and pring it out
install pyqt on mac for matplotlib
so i was trying to use matplotlib for fast image ploting and updating, and I found a post here. the matplotlib uses different backend to render the images, and due to the differences between different backend, some functions are only available for specific backend, for instance, the fig.canvas.update() is a fast way to render new images to the axes, but is only availabe to PyQt4. so i was trying to install pyqt4 using homebrew, it failed by saying the osx version is pre-released version and is not supported, and arises 2 errors during make process.
Thanks for stopping by.
Feel free to share anything you find useful.