Table of Contents
Compile OpenBLAS for R on Windows
- Install MinGW using the installer: http://sourceforge.net/projects/mingw/files/latest/download?source=files Make sure install MSYS
- Install wget within MinGW: mingw-get install msys-wget
- Download OpenBLAS: https://github.com/xianyi/OpenBLAS/archive/develop.zip
- Compile it using make
LyX customized reference list
This can be used for APA style references in LyX of not want to use the bib file.
The following procedure can be used to create a list of references for your own style.
- Add a layout in Document – Settings – Local Layout with the following
Style List Margin Static LatexType Item_Environment LatexName reflist NextNoIndent 1 LeftMargin MMN LabelSep xx ItemSep 0.2 TopSep 0.7 BottomSep 0.7 ParSep 0.3 Align Block AlignPossible Block, Left LabelType Itemize End
- In the Latex Preamble, add the following
\newenvironment{reflist}{ \begin{list}{}{\leftmargin=1em \itemindent=-1em} }{ \end{list} }
Install OpenBUGS 3.0.7 on Linux server
The following instructions were tested on Red Hat Enterprise Linux Server release 5.4 (Tikanga), Kernel version 2.6.18-164.11.1.el5. Could work for other linux releases.
Installation
The new version of OpenBUGS (v.3.0.7) can be run on Linux machine very easily. To install it on a linux machine, following these steps (adapted from openbugs.info)
- Create a directory named OpenBUGS307 and create two sub-directories within it: bin and lib.
- Download the shared library libOpenBUGS.so to the lib directory.
- Download the bash shell script, OpenBUGS, to the bin directory.
- Download the compiled C program, OpenBUGSCli to the bin directory.
- Change the permission of OpenBUGS and OpenBUGSCli using
chmod 755 OpenBUGS OpenBUGSCli
Use OpenBUGS
To use the interactive OpenBUGS, in the prompt, type the following and return (in the folder of bin)
./OpenBUGS
Below is an example to run OpenBUGS interactively using the Rats example:
$ ./OpenBUGS OpenBUGS version 3.0.7 rev 397 type 'modelQuit()' to quit OpenBUGS> modelCheck("model.txt") model is syntactically correct OpenBUGS> modelData("data.txt") data loaded OpenBUGS> modelCompile() model compiled OpenBUGS> modelInits("init.txt") model is initialized OpenBUGS> modelUpdate(1000) 1000 updates took 0 s OpenBUGS> samplesSet("alpha0") monitor set OpenBUGS> samplesSet("beta.c") monitor set OpenBUGS> samplesSet("sigma") monitor set OpenBUGS> modelUpdate(10000) 10000 updates took 0 s OpenBUGS> samplesStats("alpha0") mean sd MC_error val2.5pc median val97.5pc start sample alpha0 106.6 3.669 0.04221 99.41 106.6 113.6 1001 10000 OpenBUGS> samplesStats("*") mean sd MC_error val2.5pc median val97.5pc start sample alpha0 106.6 3.669 0.04221 99.41 106.6 113.6 1001 10000 beta.c 6.186 0.1091 0.001411 5.972 6.187 6.398 1001 10000 sigma 6.097 0.468 0.007489 5.263 6.07 7.106 1001 10000 OpenBUGS> samplesCoda('*', 'codafilename') OpenBUGS> modelQuit()
To run OpenBUGS in batch format, one can save all the scripts in a file such as script.txt and then issue the command at the prompt
./OpenBUGS script.txt
Instructions for executing OpenBUGS can be obtained by typing
./OpenBUGS -h
Below is a list of related files used in the example
Subfigures in LyX
This is an example form LyX website for using subfigures in LyX. I changed it a little to include multiple figures on multiple rows and columns.
The LyX file can be downloaded at example.lyx
The figure used can be downloaded at platypus.eps
The output looks like example.pdf
Install and Use Subversion (svn) and ViewVC on Ubuntu
Install Subversion with Web Access on Ubuntu
- To install subversion, open a terminal and run the following command:
sudo apt-get install subversion libapache2-svn
- To create a folder for the subversion repository in /svn, use
sudo svnadmin create /svn
- Edit the configuration file for the subversion webdav module.
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
The Location element in the configuration file dictates the root directory where subversion will be acessible from, for instance: http://128.143.XX.XX/svn
In the file uncomment the following lines<Location /svn> DAV svn #The SVNPath line should be set to the same place #your created the repository with the svnadmin command. # Set this to the path to your repository SVNParentPath /svn # Uncomment the following 3 lines to enable Basic Authentication AuthType Basic AuthName “Subversion Repository” AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user ## add this line
- To create a user on the repository, use the following command:
sudo htpasswd -cm /etc/apache2/dav_svn.passwd <username>
Type in password when required. - If the password file exists, use the following command:
sudo htpasswd -m /etc/apache2/dav_svn.passwd <username>
Type in password when required. - Restart apache by running the following command:
sudo /etc/init.d/apache2 restart
- Now if you go in your browser to http://128.143.XX.XX/svn. Input username and password created when required.
Use SVN
- Create a repos using
$ svnadmin create /svn/repos1
on the server
- In the local computer, check out the repos1 by using
svn checkout http://128.143.XX.XX/svn/repos1
- Now add a new or update a file on the server
- Create a file
nano test.txt
- Add it to repos1
svn add test.txt
- Upload it to the sever to repos1
svn commit test.txt -m "Initial readme file"
Install ViewVC on Ubuntu
- In the terminal
sudo apt-get install viewvc
- Edit SVN configuration file
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
Add the following line in the file
ScriptAlias /viewvc /usr/lib/cgi-bin/viewvc.cgi
at the end of the file
- Edit the file
/etc/viewvc/viewvc.conf
Change the root_parents to
root_parents = /svn : svn
- Restart apache by running the following command:
sudo /etc/init.d/apache2 restart
- Visit
http://128.143.XX.XX/viewvc/viewvc.cgi
Access control for ViewVC
By default, anyone can access ViewVC. To control access using the rules for svn. Open the svn configure file using
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
and add the following at the end
<Location /viewvc> AuthType Basic AuthName "ViewSVN" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user </Location>
<< Newer entries | Older entries >>
Note. Everything on this blog only reflects my personal view which may or may not be true and is not related to any organization or institute.