Sunday, February 19, 2012

.bash_profile vs .bashrc

When you login (type username and password) via console, either sitting at the machine, or remotely via ssh: .bash_profile is executed to configure your shell before the initial command prompt.

If you’ve already logged into your machine and open a new terminal window, then .bashrc is executed before the window command prompt. .bashrc is also run when you start a new bash instance by typing /bin/bash in a terminal.

Most of the time you don’t want to maintain two separate config files for login and non-login shells. You can fix this by sourcing .bashrc from your .bash_profile file, then putting PATH and common settings in .bashrc. To do this, add the following lines to .bash_profile:

if [ -f ~/.bashrc ]; 
    then source ~/.bashrc
fi

Now when you login to your machine from a console .bashrc will be called.

References

Saturday, February 18, 2012

SSH Tips

All changes are within file ~/.ssh/config

Multiple Connections

Often it’s useful to have multiple connections to the same server.

ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r


Repeated Connections

If you find yourself making multiple consecutive connections to the same server then enablepersistent connections.

ControlPersist 4h

Passwords

If currently you type a password when making an SSH connection, you can make connecting much more pleasant by setting up SSH keys.

$ ssh-keygen
$ ssh-copy-id username@host.example.org


Hostname Aliases and Usernames

You can also define hostname aliases in SSH config, though this can involve listing each hostname. If your username on a remote server is different from your local username, specify this in your SSH config as well.

Host host1 host2 host3
   HostName %h.example.org
   User username

References:

Tuesday, February 14, 2012

Reading Notes for Writing in the Sciences (Ch 04)

IMRAD:
  • introduction
  • methods and materials: past tense, active or passive voice
  • results: past tense
  • discussion
  • references
Common Moves in Research Article Introductions
  • establish topic and significance
  • establish need for present research
  • introduce the present research
Reporting Results
  • the major generalization(s) you are making about your data -- such generalizations are often stated in topic sentences at the beginning of paragraphs.
  • in pact form, the data supporting the generalization(s)
    • refer readers to the visual explicitly
    • tell them what patterns to notice
Discussion Trends and Implications
  • briefly summarize the major findings
  • acknowledge the advantages and limitations of the methods
  • explain the implications of the findings
  • outline the research questions that remain
Most Common Words
  • verbs: 
    • suggest, indicate, show, demonstrate
  • adverbs and adverbial phrases:
    • possibly, probably, very likely, necessarily, certainly, without doubt, presumably, in all probably, hypothetically, maybe, so far as the evidence suggests, as far as we can determine
  • modal auxiliary verb:
    • may, might, would, could, should, must, can, shall
Abstract:
  1. the topic will be introduced in present tense, usually in a sentence or two; 
  2. the background and/or need for the study will be outlined in another few sentences; 
  3. methods and results will be briefly described in past tense; and 
  4. the major conclusions and implications of the study will be stated in present tense.
How Scientists Read Reports
  • Readers typically began by scanning the title and abstract of an article and then looking for the data, focusing on the tables and graphs in which the data are summarized. Only after examining the data themselves did these scientists read the results sectin provided by the authors.
Checklist for Writers of Research Reports:
  • importance of the research
  • originality of the work
  • analysis of previous literature
  • appropriateness of the approach and experimental design
  • adequacy of experimental techniques
  • soundness of conclusions and interpretations
  • relevance of discussion
  • clarity of presentation and organization of the article
  • demonstration of reproducibility
Reference
  1. Ann M. Penrose, Steven B. Katz. Writing in the Sciences (3rd edition). Longman. 2009

Sunday, February 12, 2012

Noun Phrase Similarity Rules

Observation:
  1. integer: [-+]?\d+
  2. rational number: \d+[/]\d+
  3. finite decimal representation: [-+]?[0-9]*[.][0-9]+([eE][-+]?[0-9]+)?
  4. suffix hyphen: \w+[-]
  5. prefix hyphen: [-]\w+
  6. infix hyphen: \w+[-]\w+
  7. [A-Z]{2,}
  8. [A-Z]+\d+
  9. [a-z]+\d+
  10. [a-z]+[A-Z]+
  11. [a-z]+[A-Z]+\d+
  12. [A-Z]+[a-z]+\d+
  13. [a-z]+\d+[A-Z]+
  14. [a-z]+\d+[a-z]+\d+
  15. [A-Z]+[a-z]+[A-Z]+\d+
Summary:
  1. integer: [-+]?\d+
  2. rational number: \d+[/]\d+
  3. finite decimal representation: [-+]?[0-9]*[.][0-9]+([eE][-+]?[0-9]+)?
  4. suffix hyphen: \w+[-]
  5. prefix hyphen: [-]\w+
  6. infix hyphen: \w+[-]\w+
  7. [A-Z]{2,}
  8. [A-Z][\w \\\/-]*\d
  9. [a-z][\w \\\/-]*\d
  10. [a-z0-9]+[A-Z]+
  11. [a-zA-Z]+\d+[a-zA-Z]+
counter example of combining 3 and 4:  
p53 and TAFII40 and TAFII60

Wednesday, February 8, 2012

Tuesday, February 7, 2012

Varying Sentence Beginnings

1. Non-finite and verbless clause
1.1. gerund-participle
Using histidine - tagged recombinant TR6 , we screened soluble forms of TNF - ligand proteins with immunoprecipitation .

counter example:
Immunoblotting experiments indicate that GRB2 associates with ...

1.2. past-participle
Based on the experiences of all the authors , we emphasized cell cycle inhibitors such as p16 and p21 and regulators of apoptosis such as p53 and members of the bcl - 2 family .

1.3. to-infinitival
To examine whether GRB2 is also a component of ras signaling in mammalian cells , microinjection studies were performed .

2. dependent clause
As previously shown with reticulocyte lysate - reconstituted steroid receptor heteroprotein complexes , the reconstituted pp60 src multiprotein complex contains hsp70

Although both unstimulated and activated human T cells express high affinity IL - 7R , only activated T cells can proliferate to IL - 7 .

3. preposition phrase
In addition , hsp90 in the lysate complexes with wild - type pp60v - src .

From Scatchard analyses , the Kd :s for binding of aFGF and bFGF to hFGFR - 1 were estimated to 25 pM and 41 pM , respectively .

4. adverb
Interestingly , GRB2 exhibits striking structural and functional homology to the C. elegans protein sem - 5 .

5. noun phrase (an object)
The letter , I read it to to you.


Reference
  1. Rodney Huddleston, Geoffrey Pullum, etc. The Cambridge Grammar of the English Language. page 51,  604, 1173
  2. http://intensive-english.blogspot.com/2009/01/25-varying-sentence-beginnings.html 

Thursday, December 1, 2011

Transformer (head+body)


It took me more than half a year to finish the head and body part.