Skip to content

Instantly share code, notes, and snippets.

Find an assignment of the jobs to the machines such that total processing time is minimal.

Given bipartite Graph G = (V,E), determine its minimum weight matching:

1. Relabel edge weight of G: E' = {e' := e and e.w *= -1 | forall e in E}
2. Find minimum edge weight min_e in E'
3. E'' = {e'' := e' and e'.w += min_e | forall e' in E'}
4. Apply maximum weight matching problem to G = (V, E'')

helpful sources:

Squashing last 3 commits to 1 commit: git rebase -i HEAD~3 source

# add a method that allows an object to add dyn. new instance methods.
module A
klass.instance_eval do
send(:attr_accessor, :observers)
instance_variable_set("@#{:observers}", [])
end
end
# including this object prepends a class' initializer
module B

rvm @webshop3 do gem list

rvm @global do gem install bundler -v=1.8.2

@simplay
simplay / vim_me_tonight.md
Last active August 29, 2015 14:19
all vim steps needed to be done...

... and this is how the story started...

:s/foo/bar/gc replace every foo in a text with bar (confirm after each detected occurrence). goto beginning of a word (move cursor onto its first letter), type v1ey to copy that word and move cursor to target word (its first letter) and type v1ep to overwrite it with copied word (not taht overwritten word is now in clipboard, i.e. can be pastes again - easy word swaps).

Locations you should know: ~/.vimrc

Initially, do this:

@simplay
simplay / howto_install_bronx_s_motion_tracking.md
Last active October 23, 2016 18:34
How to install Bronx's motion tracking software

Installation

  • install ubuntu 14.04 LTS (64bit)
  • run sudo apt-get install build-essential
  • download http://lmb.informatik.uni-freiburg.de/resources/binaries/eccv2010_trackingLinux64.zip
  • from: http://lmb.informatik.uni-freiburg.de/resources/software.php
  • unzip downloaded source
  • run make within unzipped folder
  • run the example: ./tracking cars1.bmf 0 20 8
i1 = [1,2,3,4,5]
i2 = (0...(i1.size-1)).inject([]) {|pairs,x| pairs += ((x+1)...i1.size).map {|y| [i1[x],i1[y]]}}
@simplay
simplay / screen_shortcuts.md
Last active November 21, 2015 14:06
screen keybindings

Screen Keybindings

Definitions

<c-a> := presss control a

Window Management

@simplay
simplay / install_rvm_windows.md
Last active November 24, 2015 14:55
install rvm and jruby under windows 7

1 . cygwin installiere (x86 verion (auso nid 64bit)): source: http://cygwin.com/install.html

2 . Cygwin package manager installiere (drmit uf windows in cygwin s gliche wie apt-get uf linux distros chasch mache)

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin