3 ms·
Good fun, I'm going to hope that using ipython still qualifies, and it made things much easier by letting you define functions that join some ad-hoc datasets to
by shabble 11y ago
Good fun, I'm going to hope that using ipython still qualifies, and it made things much easier by letting you define functions that join some ad-hoc datasets to look for matches, or read particular files.
A similar approach to different puzzles by Peter Norvig[1]
Other useful (and perhaps less common) utilities I used were 'q'[2], and the standard unix 'comm(1)'[3]
[1] http://nbviewer.jupyter.org/url/norvig.com/ipython/Fred%20Buns.ipynb http://nbviewer.jupyter.org/url/norvig.com/ipython/Fred%20Bu...
http://norvig.com/sudoku.html http://norvig.com/sudoku.html
[2] https://harelba.github.io/q/ https://harelba.github.io/q/ - sqlite text munging ended up being a bit too clunky though, and I couldn't remember/fix the join syntax to make it worthwhile in teh end.
[3] $ comm -12 <(sort memberships/AAA) <(sort memberships/Delta_SkyMiles) > aaa_delta_comm # intersect names in 2 files. Sadly can't handle more than 2 inputs directly though, and assumes pre-sorting.
- d0m 11y agoI think the goal is teaching you unix text commands. So if you use Python it's missing the point. Thoughts?
- navls 11y agoDo what is fun, there is no point
- rcthompson 11y agoSeems equally valid to use it as a tool for learning how to manipulate data in ipython.