Difference between revisions of "CompSciWeek7"

From Predictive Chemistry
Jump to: navigation, search
(Class 1: The Git Revision Control System)
(Class 1: The Git Revision Control System)
Line 17: Line 17:
 
* [https://github.com/git/git Git repository of git]
 
* [https://github.com/git/git Git repository of git]
 
* [http://git-scm.com/book/en/Git-Internals-Git-Objects Very Detailed Explanation of Internals]
 
* [http://git-scm.com/book/en/Git-Internals-Git-Objects Very Detailed Explanation of Internals]
  +
  +
Example git workflow:
  +
  +
Starting up:
  +
<code lang="bash">
  +
cd /path/to/source/dir
  +
git init # create the .git directory for storing git objects
  +
git add . # add all files in the current folder
  +
git rm -r --cached the_unversioned_dir # remove the_unversioned_dir from the staged files
  +
git commit -am "First commit" # perform the commit, saving the files into git
  +
</code>
  +
  +
Alternate start-up:
  +
<code lang="bash">
  +
cd /path/to/source/dir
  +
git clone https://github.com/git/git # create your own copy of a git tree
  +
</code>
  +
  +
Reading status:
  +
<code lang="bash">
  +
git status # check current directory against HEAD
  +
git branch # print a list of branches
  +
git diff <branchname> # see how branchname is different
  +
</code>
  +
  +
Making changes:
  +
<code lang="bash">
  +
git commit -am "A descriptive commit message." # save the current working state
  +
git checkout <branch> # switch to another (existing) branch
  +
git checkout -b <new_branch_name> # make a new branch
  +
</code>
  +
  +
Repository to repository commands. If you used clone to start your project, these should "just work".
  +
If you didn't you have to use git remote. Follow the [http://gitref.org/remotes/ Gitref Docs] to do that.
  +
<code lang="bash>
  +
git pull # merge remote changes with current work.
  +
git push # push current changes to the remote server (this won't work unless you have permission to write there)
  +
</code>
   
 
= Class 2: Parallel Programming =
 
= Class 2: Parallel Programming =

Revision as of 15:53, 6 October 2014

Reading (shared with Week 6)

  • Beginning Python - skim. chapters 8-14 (use as reference material)
    • see especially urlopen on p. 300, forks and threads on p. 304
  • Beginning Python - Chapter 15 (Web services)

Class 1: The Git Revision Control System

  • Repository structure
    • git clone, init
    • examining git objects
    • code branches, git branch, status, checkout
  • Version histories and diff-s
    • git diff, patch
  • Working with remote repo-s
    • git commit, pull, push

References (optional):

Example git workflow:

Starting up: cd /path/to/source/dir git init # create the .git directory for storing git objects git add . # add all files in the current folder git rm -r --cached the_unversioned_dir # remove the_unversioned_dir from the staged files git commit -am "First commit" # perform the commit, saving the files into git

Alternate start-up: cd /path/to/source/dir git clone https://github.com/git/git # create your own copy of a git tree

Reading status: git status # check current directory against HEAD git branch # print a list of branches git diff <branchname> # see how branchname is different

Making changes: git commit -am "A descriptive commit message." # save the current working state git checkout <branch> # switch to another (existing) branch git checkout -b <new_branch_name> # make a new branch

Repository to repository commands. If you used clone to start your project, these should "just work". If you didn't you have to use git remote. Follow the Gitref Docs to do that. git pull # merge remote changes with current work. git push # push current changes to the remote server (this won't work unless you have permission to write there)

Class 2: Parallel Programming

  • Parallel complexity - sum / min / max
  • Parallel caching
  • Eigenvalue computation - the "google" algo.
  • Web Services