Daily Dated Untitled Jupyter Notebooks

I am a heavy user of Jupyter Notebook, both personally for wrapping my head around Open Data, professionally for analysis and reporting, and for education/presentations. So am very comfortable with just spinning up new notebooks all over the show. However, this ends up looking like this… Less than informative and impossible to work out WTF I was doing. Helpfully, there’s a way to change it. In your jupyter_notebook_config.py file (Normally in ~/.jupyter), add the following somewhere sensible ...

October 22, 2018 · Andrew Bolster

Bolsters Code-Related Rants (An ongoing collection)

Logging functions being called with just a variable and no comment as to what the hell it is logging has functions more than logging.info, use them! Debug = useful information if something breaks but isn’t interesting during normal operation info = useful and generally interesting information warn = something went wrong, indicating something should probably be refactored / fixed,_ but the system could recover from it._ error = oh dear jesus fuck the entire site evaporated into a swarm of zombie locusts, I better put something in the error log. ...

February 12, 2011 · Andrew Bolster

Customised User Directories in Ubuntu

I’ve been doing alot of messing around in Ubuntu recently and there are lots of tweaks I like to make. One of them being to show the contents of my home folder as my desktop; I don’t need any more pointless folders…. Dead easy, there is a .config directory under your $HOME dir, containing several files. The one we need is user-dirs.dirs , and it looks something like this. # This file is written by xdg-user-dirs-update # If you want to change or add directories, just edit the line you're # interested in. All local changes will be retained on the next run # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an # absolute path. No other format is supported. # XDG_DESKTOP_DIR="$HOME/Desktop" XDG_DOWNLOAD_DIR="$HOME/Downloads" XDG_TEMPLATES_DIR="$HOME/Templates" XDG_PUBLICSHARE_DIR="$HOME/Public" XDG_DOCUMENTS_DIR="$HOME/Documents" XDG_MUSIC_DIR="$HOME/Music" XDG_PICTURES_DIR="$HOME/Pictures" XDG_VIDEOS_DIR="$HOME/Videos" And this is what I changed mine to ...

June 1, 2010 · Andrew Bolster

Chmod on lots of files

My lil-NAS has plenty of space but is maddeningly underpowered. I came across a permissions issue where, depending on how the files in question got there, they would not be accessible to my windows boxes because they were owned by root (I have no doubt that its my fault!) So, first attempt was nice and easy. $chown -R smbusr:smbusr * But this was taking a horrific amount of time, so I thought “There must be a better way”. ...

March 23, 2010 · Andrew Bolster