Wednesday, October 16, 2013

trading with python

http://www.tradingwithpython.com/
looks like it might be interesting. found it via his blog; he also has a for-pay instructional course.

Tuesday, October 15, 2013

Wednesday, September 25, 2013

tox

http://testrun.org/tox/latest/
generic virtualenv management and test command line tool.

used by coverage.py, looks pretty interesting for testing against multiple versions and environments.

Thursday, September 5, 2013

scm-latexdiff

http://www.numbertheory.nl/2012/02/09/scm-latexdiff-a-python-script-to-calculate-diffs-for-tex-files-in-git-or-mercurial-repositories/

works for git and hg repositories.

inspect-shell

https://github.com/amoffat/Inspect-Shell

looks like a pretty cool way to open a manhole into a running python script. it is not a debugger and it doesn't lock or interrupt. allows you to call functions, inspect or (dangerously) modify globals, etc.

Tuesday, September 3, 2013

gitflow

http://nvie.com/posts/a-successful-git-branching-model/
procedure for working with a sane graph of git branches, from Vincent Driessen

more info and tools from
https://github.com/nvie/gitflow

gource

http://code.google.com/p/gource/

version control visualization. makes really cool movies showing the people making revisions over time.

Tuesday, August 27, 2013

windows python path bug

had a weird bug trying to import numpy:
...
from numpy.linalg import lapack_lite
ImportError: DLL load failed: The specified module could not be found.

looks like it's actually because the python Scripts dir needs to be in the path
http://bugs.activestate.com/show_bug.cgi?id=89474

export PATH=$PATH:/cygdrive/c/Python27/Scripts/
made it work.

Monday, August 19, 2013

git - merging a merge from a clone

still trying to figure git out.... i had a clone in which i had forked off a previous commit and made some changes, then did a merge to bring both branches together. now i need to bring that merged update (along with the intermediate forked-off commit, if possible) to the origin. 'git fetch file:///remote' didn't seem to do anything, and even after 'git merge' i didn't see those other commits in my original repo.

finally, the thing that seemed to do the trick was 'git merge FETCH_HEAD'. so i guess git fetch grabbed the info, but it just didn't make it visible. the clue was the return from 'git fetch':
* branch HEAD -> FETCH_HEAD

now my repos match.

git baby steps

http://www.youtube.com/watch?v=ZDR433b0HJY

gitref.org
gitpro.org
whygitisbetterthanx.com
git svn

git config --global user.name "Trevor Tippetts"
git config --global user.email "trevorbtippetts@gmail.com"
git config --global color.ui true
git init
git clone git://github.com/schaco/ticgit.git

git add (file) # snapshots; commit will take files as they were at time of 'git add'
git status # -s gives one-liner summaries
git diff # patch for unstaged changes
git diff --cached # patch for staged but uncommitted changes
git diff HEAD # patch for staged and unchanged (everything since commit, ignoring staging)
git diff --stat # summary of changes

git commit -m 'my comment' # commits changes present at the time of git add
git commit -a # svn style commit snapshot at present time; auto stages everything
git add -p # stage patches; it will ask about each diff block

git branch # create branch or view local branches
git branch -r # view remote branches
git checkout # switch between branches
git checkout -b newBranchName # create a branch and switch to it immediately
git checkout master; git merge newBranchName
git status # will show files needing merge
git log [file] # show commits on 2 sides that created the conflicts in conflicted file
git mergetool # external: kdiff3 tkdiff xxdiff meld gvimdiff opendiff emerge vimdiff
git add [merged file] # will take this snapshot as the new (merged) file on next commit
git commit

git branch -d newBranchName # safely delete (only delete if it is reachable in the history of HEAD)
git branch -D branch # unsafely delete (changes on that branch might not be reachable by any other branch)

git push origin master # move remote master branch to local master branch
git fetch # get remote changes and new remote origin master; then you can do normal merge and re-push
git push origin iss53 # make/move remote branch pointer iss53, not master

git pull # wrapper to fetch and merge a branch; can be confusing if not working on master or not familiar with tracking branches; easier to use fetch+merge manually
git remote add somebody git://github.com/etc # to pull from collaborator
get fetch somebody; git merge somebody/master

git log # show all commits reachable from HEAD
git log --oneline branchName # shorter one-line for each commit reachable from branchName
git log --oneline --graph # ascii graph going backwards from HEAD
git log --oneline --graph --all --decorate # all commits, show where branch pointers are pointing
git config --global alias.lol "log --oneline --graph --decorate" # git lol; git lol --all
git config --global alias.ff "merge --ff-only"

# log subsets with graph operations
git log branchA ^branchB # all commits reachable by branchA but not by branchB
git log branchA ^master # what will merge if i merge to master? what will i lose if i delete this branch?
git log origin/master ^master # commits that came in from remote; no output after merging
git log master ^origin/master # commits that will get pushed to remote; will still have output after merging but before pushing
git log -p # show patches for each commit
git log --stat # show files that changed, with indication of extent of changes

# these 12 above commands are 99% of what you need to do with git

# more stuff
git svn

git blame -C # find where snippets were copied from

git bisect start # initialize bisection search
git bisect bad # current commit (HEAD) is broken
git bisect good goodCommit # identify last known good branch; checkouts a revision in the middle
git bisect good OR git bisect bad # after testing
...
git bisect reset # go back to the revision where you started

# or make your script return 0 on success, nonzero otherwise
git bisect start HEAD goodCommit
git bisect run test-error.sh

git reset HEAD -- fileName # unstage a file (reset the hash for the file in the index to its value after last commit)
git config --global alias.unstage "reset HEAD"
git reset --soft HEAD~ # undo last commit (go to parent of HEAD) and restage last committed files; basically same as git commit --amend
git reset --hard # reset --soft, then undo changes in working dir (make working dir like the index)
git rm # remove from staging and delete; can also just delete it and git commit -a; --cached will leave file in working dir
git mv # alias for git rm --cached orig; mv orig new; git add new

git stash # save work-in-progress state and checkout last commit
git stash list # show saved states
git stash apply # reapply stash to working dir
git stash drop # remove last stash from the stack
git stash pop # apply and drop
git stash clear # drop the whole stack



lol = log --graph --decorate --pretty=oneline --abbrev-commit

So, just copy the following into ~/.gitconfig for your full color git lola action:

[alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
[color]
branch = auto
diff = auto
interactive = auto
status = auto


git update-index --assume-unchanged filename
might be better than
git rm --cached filename
when working with others, since it will stop updating but won't take it out of the repo. and you can always bring it back with
git update-index --no-assume-unchanged filename

Wednesday, July 31, 2013

A Pragmatic Look at Exception Specifications

http://www.gotw.ca/publications/mill22.htm

nice ref on how to handle exception specifications in c++, especially useful with inheritance, etc.

Thursday, July 18, 2013

articles

Geostatistical interpolation using copulas. András Bárdossy, Jing Li

Wednesday, July 17, 2013

Hypervolume-based Multiobjective Optimization: Theoretical Foundations and Practical Implications

Anne Auger, Johannes Bader, Dimo Brockhoff, Eckart Zitzler

http://hal.archives-ouvertes.fr/docs/00/63/89/89/PDF/tcspaper.pdf
see page 19 for good overview of test problems and their hype densities

networking resources

"how to work a room" susan roane
"the ultimate guide to successful networking" carol stone
general confidence building: "feel the fear and do it anyway" susan jeffers

tips
keep communicating
  2 or 3 times/year, before key events, things of interest to them, my personal news
  remind them: "story so far", for for lunch, etc., always do what you say you will
  contact them before you want something!
  thank you notes/emails
  refer to previous contact, re-introduce yourself

building credibility
http://changingminds.org/explanations/theories/credibility.htm

jobhunting, but also more generally:
http://www.realworldmagazine.com/networking-its-one-of-the-most-efficient-job-hunting-strategies-but-also-one-of-the-most-misunderstood/

Wednesday, June 26, 2013

tastytrade.com

nice video podcast with a number of shows that discuss practical aspects of trading.

Monday, June 24, 2013

latex, tex package install

figured out a good way to install tex packages for a non root user.

grab what you need from a tds.zip file from here:
http://www.ctan.org/tex-archive/install/macros/latex/contrib

then unzip it in, eg, ~/texmf/
then i think you need to set an env var like TEXMF or something, and maybe run texhash or something, or maybe you don't need to do any of that (should have posted this right after i did it!) but at least i know this is the file type to use and where to get them.

this might help:
http://tex.stackexchange.com/questions/30307/how-to-install-latex-zip-package-from-ctan-using-texhash-on-a-nix-system

ipad for writing equations, etc

possibly handy info for drawing, math, latex, etc on an ipad:

http://math.stackexchange.com/questions/193072/tablet-for-reading-textbooks-and-writing-math-by-hand/204393#204393

folding bluetooth keyboard

http://www.amazon.com/Perixx-PERIBOARD-805L-Bluetooth-Folding-Keyboard/dp/B00BU4OV50/ref=sr_1_1?ie=UTF8&qid=1371726428&sr=8-1&keywords=periboard+805l
http://www.amazon.com/Perixx-PERIBOARD-806-Bluetooth-Folding-Keyboard/dp/B00C6Y0ODG/ref=sr_1_3?s=pc&ie=UTF8&qid=1371715310&sr=1-3&keywords=folding+keyboard+-silicone
http://www.amazon.com/Universal-Folding-Bluetooth-Keyboard-Backlight/dp/B00AFRBF8O/ref=pd_sim_sbs_pc_5
http://www.amazon.com/QQ-Tech%C2%AE-Foldable-Wireless-Bluetooth-Keyboard/dp/B006XAGB1S/ref=pd_sim_sbs_pc_4
http://www.amazon.com/Matias-Bluetooth-Folding-Keyboard-MAC/dp/B001Q2COXC/ref=sr_1_6?s=pc&ie=UTF8&qid=1371715310&sr=1-6&keywords=folding+keyboard+-silicone
http://www.amazon.com/HDE%C2%AE-Wireless-Bluetooth-Folding-Keyboard/dp/B007FS994S/ref=pd_sim_sbs_pc_3
http://www.amazon.com/QQ-Tech%C2%AE-Foldable-Wireless-Bluetooth-Keyboard/dp/B006XAGB1S/ref=pd_sim_sbs_pc_2
http://www.cellphoneshop.net/foldable.html?CA_6C15C=1648900766
http://www.amazon.com/Wireless-Foldable-Keyboard-Laptops-Bluetooth/dp/B005F2VQ8I/ref=sr_1_5?s=pc&ie=UTF8&qid=1371715310&sr=1-5&keywords=folding+keyboard+-silicone
http://eshop.macsales.com/item/Matias/FK204F/?utm_source=amazon&utm_medium=shoppingengine&utm_campaign=productads
http://www.amazon.com/Stowaway-Ultra-Slim-Bluetooth-Blackberry-Handhelds/dp/B0002OKCXE/ref=sr_1_1?ie=UTF8&qid=1371720733&sr=8-1&keywords=thinkoutside+stowaway
http://www.amazon.com/s/ref=nb_sb_ss_i_2_7?url=search-alias%3Daps&field-keywords=matias+folding+keyboard&sprefix=matias+%2Caps%2C276&rh=i%3Aaps%2Ck%3Amatias+folding+keyboard
http://www.amazon.com/Wireless-Bluetooth-Keyboard-GT-I9500-Foldable/dp/B00B0L6TG2/ref=sr_1_10?s=pc&ie=UTF8&qid=1371715310&sr=1-10&keywords=folding+keyboard+-silicone

http://www.amazon.co.uk/BestDealUK-Foldable-Bluetooth-Wireless-Smartphone/dp/B00A1YUJHO/ref=sr_1_35?ie=UTF8&qid=1371718772&sr=8-35&keywords=folding+keyboard
http://www.amazon.co.uk/Perixx-PERIBOARD-805-Bluetooth-Foldable-Keyboard/dp/B0083JE5Q0/ref=sr_1_1?ie=UTF8&qid=1371718246&sr=8-1&keywords=folding+keyboard
http://www.amazon.co.uk/Perixx-PERIBOARD-805L-Bluetooth-Folding-Keyboard/dp/B00BU4OV50/ref=sr_1_23?ie=UTF8&qid=1371718567&sr=8-23&keywords=folding+keyboard
http://www.amazon.co.uk/Freedom-i-Connex-Folding-Bluetooth-Keyboard/dp/B003LO2FR8/ref=sr_1_4?ie=UTF8&qid=1371718246&sr=8-4&keywords=folding+keyboard
http://www.amazon.co.uk/Folding-Wireless-Bluetooth-Keyboard-Notebook/dp/B009ZP0Z24/ref=sr_1_8?ie=UTF8&qid=1371718246&sr=8-8&keywords=folding+keyboard
http://www.amazon.co.uk/Matias-Wireless-Folding-Keyboard-iPhone/dp/B005EG4880/ref=sr_1_41?ie=UTF8&qid=1371718772&sr=8-41&keywords=folding+keyboard

http://www.amazon.co.uk/DUSIEC-Bluetooth-Wireless-keyboard-Keyboard/dp/B005M36BNK/ref=sr_1_2?ie=UTF8&qid=1371718246&sr=8-2&keywords=folding+keyboard
http://uk.cellphoneshop.net/foldable.html?CA_6C15C=1810944409
http://www.amazon.co.uk/Bluetooth-Wireless-Portable-bluetooth-compatible/dp/B006RMJ3NA/ref=pd_sim_sbs_computers_3
http://www.amazon.co.uk/Logitech-Fold-Up-Keyboard-iPad/dp/B005UKH922/ref=sr_1_7?ie=UTF8&qid=1371718246&sr=8-7&keywords=folding+keyboard
http://www.amazon.co.uk/HDE%C2%AE-Wireless-Bluetooth-Folding-Keyboard/dp/B007FS994S/ref=sr_1_19?ie=UTF8&qid=1371718567&sr=8-19&keywords=folding+keyboard
http://www.amazon.co.uk/Lerway-Portable-Backlight-Bluetooth-Keyboard/dp/B00CAKPFVC/ref=sr_1_29?ie=UTF8&qid=1371718567&sr=8-29&keywords=folding+keyboard
http://www.amazon.co.uk/Skque-Foldable-Wireless-Bluetooth-Keyboard/dp/B008KEQ78C/ref=sr_1_67?ie=UTF8&qid=1371719265&sr=8-67&keywords=folding+keyboard
http://www.amazon.co.uk/Think-Outside-Bluetooth-Stowaway-Keyboard/dp/B0002OKCXE/ref=tag_dpp_lp_edpp_ttl_in