Skip to content

Instantly share code, notes, and snippets.

@tjdett
Last active August 29, 2015 14:02
Show Gist options
  • Save tjdett/f01affb46d3b92bfea09 to your computer and use it in GitHub Desktop.
Save tjdett/f01affb46d3b92bfea09 to your computer and use it in GitHub Desktop.
Notes for Python SC lessons on DIT4C.

Notes for Python SC lessons on DIT4c

First challenge: How do I "download these four data files"?

mkdir sc
# Use shell expansion to get each of the four files
wget http://resbaz.github.io/2014-03-18-combine/novice/python/inflammation-0{1,2,3,4}.csv

That's complicated. We might need a "download me" script.

Shell

It's not made clear if I should be following along or just reading for the shell lessons, but I'll work on the assumption I should be able to run any of the commands that are mentioned.

nano draft.txt
# bash: nano: command not found

Fixed with sudo yum install -y nano but we should have it installed from the outset.

  • Need to add nano to installed programs.

After skim-reading, that's it for the shell. Next...

Git

Following along happily enough, and I decide to maximize my editor. Bad move - when opening nano, things go weird. Have to ditch the terminal and refresh page - quite annoying, but doesn't require lesson to restart from earlier place.

Tried it again later when maximized. Attempted to close with Ctrl-W, and closed my entire window. Ouch.

Resized window and used nano. Similar screwup. Refresh needed. Grrrr...

Learnt something new: git status --ignored. Neat.

Pulling & pushing to GitHub is a little annoying, but only because I have 2-factor auth enabled.

Nano editing of Git messages works just fine.

Python

"Autosave failed!". Nginx reports:

2014/06/17 04:50:03 [crit] 15#0: *1957 open() "/var/lib/nginx/tmp/client_body/00
00000046" failed (13: Permission denied), client: 172.17.42.1, server: , request
: "PUT /ipynb/api/notebooks/sc/01-numpy.ipynb HTTP/1.1", host: "172.17.42.1:4917
3", referrer: "https://timtest1.dit4d.labs.cloud.unimelb.edu.au/ipynb/notebooks/
sc/01-numpy.ipynb"  

Uh oh. Caused by lack of execute permissions on parent directories, as mentioned here: http://forum.nginx.org/read.php?2,239816,239817

  • Need to fix permissions on /var/lib/nginx

"Request Entity Too Large". Nginx again, for both the outer and container Nginx servers.

  • "client_max_body_size ?G" needed for Nginx

SQL

Missing sqlitemagic, but that's a supplied file. Needs texttable though:

  • Install texttable & sqlite?

When attempting to install it as a PIP module, didn't have sudo privs

  • Allow sudo to execute python-pip
  • Provide a symlink to pip?

Created using Inkpen - http://inkpen.in

@tjdett
Copy link
Author

tjdett commented Jun 20, 2014

The file management bug is fixed now.
dit4c/dit4c-dockerfiles@6f2c175

@DamienIrving
Copy link

Zed Editor would be perfect. We just need a simple text editor option that doesn't run within the terminal (i.e. not nano, Vim or Emacs).

When I right click paste isn't an option... it will be interesting to see if other people have the same issue on Tuesday.

@tjdett
Copy link
Author

tjdett commented Jun 20, 2014

  • Fix paste for Firefox in TTY.js

It's an open bug: chjj/tty.js#31

@tjdett
Copy link
Author

tjdett commented Jun 20, 2014

  • Pre-install zedrem

@tjdett
Copy link
Author

tjdett commented Jun 20, 2014

  • Fix UniMelb logins, which don't provide an ID! (but do provide an email)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment