Open R
Copy and paste the R code from Cao et al.
x<-read.table("x.txt") #your control state
y<-read.table("y.txt") #your test state
x<-as.matrix(x)
y<-as.matrix(y)
BODP(x,y,1000,10) #feel free to change 1000 and 10 to whatever you'd like
Option "NvAGP" "1"
blacklist intel_agp
## equality
num = 8
num.should.equal 8 # bacon
num.must_equal 8 # minitest::spec
num.should == 8 # rspec
num.is 8 # clearly superior, similar to Test::More "is a, b"
## true/false
(num == 8).should.be.true # bacon
(num == 8).ok # superior, like Test::more "ok (something)"
class Object
def is(arg)
should.equal(arg)
end
def ok
should.equal true
end
end
sudo apt-get install libwxbase2.8-{0,dev} libwxgtk2.8-{0,dev} librmagick-ruby libopengl-ruby
sudo gem install wxruby
if [ ! `which gvfs-trash 2>/dev/null` ]So, now we can simply dl files and they go to a safe place. Still, I find myself using rm, so this little alias will help cure my addiction, by reminding me that I should be using dl instead of rm. I can still use the rm command by putting it in single quotes (that's how to get past any alias) as in: 'rm' -rf some_directory.
then
alias dl='mv -t ~/.Trash/' # for older systems
else
alias dl='gvfs-trash'
fi
alias rm="echo \"use dl or 'rm'\""
sudo mkdir /var/local/VirtualBox
ln -s /var/local/VirtualBox $HOME/.VirtualBox
sh -c "gksudo 'chown -R $USER:$USER /var/local/VirtualBox'; VirtualBox"(that command [or similar] could be wrapped up in a .bashrc function, a script placed in your $HOME/bin directory or whatever).
sudo aptitude install timidity
/home/<user>/timidity
timidity
|-- Piano.cfg
|-- ensemble.cfg
|-- harpsichord.cfg
|-- organ.cfg
|-- patches
| |-- eawpats12_full
| | |-- acbass.pat
| | |-- [...]
|-- soundfonts
| |-- Ensemble
| | |-- Zemljak_Overture.sf2
| | |-- choir
| | | |-- 052_Florestan_Ahh_Choir.sf2
| | | |-- Boychoir.sf2
| | | `-- boychoir.txt
| |-- Organ
| | |-- GothicOrgan.sf2
| | |-- jeux14.sf2
| | `-- jeux2.sf2
| |-- Piano
| | |-- ClavinovaGrandPiano2.sf2
| | |-- RolandPowerGrand.sf2
| | |-- harpsichord
| | | |-- Blanchet-440_ver.1.0.sf2
| | | |-- Campbells_Harpischord_tuned_1.sf2
| | | `-- Petit_Italien.sf2
sudo gedit /etc/timidity/timidity.cfg
---
# Instrument configuration file for timidity
# $Id: timidity.cfg,v 1.7 2005/09/03 19:26:03 hmh Exp $
# [... omitting some for brevity ...]
# [ NOTE: With a recent CPU you can leave everything commented in this file no problem ]
# Include a configuration for the selected patchset or soundfont
# By default, try to use the instrument patches from freepats:
source /etc/timidity/freepats.cfg
## added by JTP ##
source /home/john/timidity/timidity.cfg
dir /home/john/timidity
# (NOTE: I just comment out the config files I'm not using)
#source jeux14.cfg
#source organ.cfg
#source merlin.cfg
#source Piano.cfg
source harpsichord.cfg
# only in Ubuntu 9.04 or earlier !!
sudo aptitude install swami
# you can fire it up with the soundfont on the command line if you want (or without)
swami timidity/soundfonts/Piano/harpsichord/Blanchet-440_ver.1.0.sf2
At least for Karmic and Lucid (9.10) you will need to follow instructions here to install swami. Some guy is working to get GTK2.0 integration at which point we'll probably see the package surface again.
dir /home/john/timidity/soundfonts/Piano/harpsichord
bank 0
6 %font Blanchet-440_ver.1.0.sf2 1 1
7 %font Blanchet-440_ver.1.0.sf2 1 2
8 %font Blanchet-440_ver.1.0.sf2 1 3
9 %font Blanchet-440_ver.1.0.sf2 1 4
19 %font FluidR3GM.SF2 0 19 amp=140 pan=0
timidity <your_midi>.mid
# or what I often will use:
timidity --verbose <your_midi>.mid -EFreverb=3,40 -A150
# once you have it sounding like you want, you can record to a .wav file:
timidity <your_midi>.mid -Ow
# then you can convert to an mp3 with lame (install with: 'sudo aptitude install lame')
lame --preset medium <your_midi>.wav <your_midi>.mp3
cd supercool # make sure you are at the top level directory of your project
bzr init # starts up version control in this directory (an independent branch right now)
bzr add # will recursively add files in your project
bzr ci -m 'initial commit' # makes a commit to your branch
# the next step assumes you have already made the directory /home//bzr on your server
# this step will create a centralized repository on your remote
bzr push sftp://<user>@myserver.domain.org/home/<user>/bzr/supercool
# now, we need to 'bind' our independent branch to the remote branch
# which transforms it into "centralized mode"
bzr bind sftp://<user>@myserver.domain.org/home/<user>/bzr/supercool
# to check out a fresh copy on a different computer
bzr co sftp://<user>@myserver.domain.org/home/<user>/bzr/supercool
# assuming you are in your project directory...
bzr up # update your repo with any changes in the centralized repo
## do some work...
bzr add <file1> <file2> # add any new files, etc.
bzr ci -m 'adding new files, changed some other ones'
install.packages("car")
install.packages("doBy")
library(car)
library(doBy)
data<- read.table("/home/user/Desktop/data.txt")
names(data)<-c("Y","A","B","Group")
data_split<-splitBy(~Group,data=data)
i <-1 while(i <=length(data_split)){
print (Anova(lm(Y~A+B+A*B, data_split[[i]]),type="III")[4,4])
i<- i +1
}
on_createclient do |cid|
tag = read("/client/#{cid}/tags")
# does the last line start with a "1", then only one column
if read("/tag/#{tag}/index").split("\n").last.match(/^1\s+/)
write("/tag/sel/ctl", "send sel right")
end
end
artwork from Battle for Wesnoth, modified by JTP |
System->Preferences->KeyboardShortcuts then [+Add]
gnome-terminal --geometry 80x52 --working-directory $HOME
sudo apt-get install xbindkeys
"gvim"
control+alt + g
"nautilus"
control+alt + n
"firefox -new-window http://gmail.com"
control+alt + e
"nautilus"
control+alt + h
"firefox"
control+alt + f
"gnome-terminal --geometry 80x40"
control+alt + t
"rhythmbox"
control+alt + m
[Desktop Entry]
Type=Application
Name=XBindKeys
Exec=xbindkeys
Icon=system-run
Comment=
Name[en_US]=XBindKeys
Comment[en_US]=
X-GNOME-Autostart-enabled=true
sudo aptitude install r-base
sudo R CMD INSTALL packages/impute_1.0-5.tar.gz
sudo aptitude install g++-4.2 gfortran-4.2 tetex-base
# (also might need tetex-extras ...)
sudo rm /usr/bin/g++ # just removes the soft link
sudo ln -s /usr/bin/g++4.2 /usr/bin/g++
sudo rm /bin/sh # just a link to /bin/dash
sudo ln -s /bin/bash /bin/sh
cd src ; make ; make install
R
source("edge.r")
edge()
sudo rm /usr/bin/g++
sudo ln -s /usr/bin/g++4.3 /usr/bin/g++
sudo rm /bin/sh
sudo ln -s /bin/dash /bin/sh
metacity --replace
emerald --replace
compiz-decorator --replace
compiz # to start things up for compiz
sudo aptitude install libcamomile-ocaml-dev libzip-ocaml-dev libtype-conv-camlp4-dev
libsexplib-ocaml-dev libbin-prot-camlp4-dev libocamlnet-ocaml-dev
sudo ./configure
sudo make all opt install install-doc
# ssh into your server ssh jtprince@yourserver.domain.edu # on remote machine: mkdir git mkdir git/project1.git && cd git/project1.git git --bare init exit # on local machine mkdir project1 && cd project1 # if you don't already have a project # make a commit (you need at least one commit) git init echo "some text" > file.txt git add . git commit -m 'init commit' # now we will push it to the server git push ssh://jtprince@yourserver.domain.edu/home/jtprince/git/project1.git master # we still need to link our git folder with the server git remote add origin ssh://jtprince@yourserver.domain.edu/home/jtprince/git/project1.git git config branch.master.remote origin git config branch.master.merge refs/heads/master
SERVER='jtprince@yourserver.domain.edu' PROJ="project2" PROJ_URL="ssh://$SERVER/home/jtprince/git/${PROJ}.git" # set up the remote git repo in one command: ssh $SERVER "mkdir git/${PROJ}.git; cd git/${PROJ}.git; git --bare init" # (inside your project directory... with files/dirs already present): git init ; git add . ; git commit -m 'init commit'; git push $PROJ_URL master ; git remote add origin $PROJ_URL ; git config branch.master.remote origin ; git config branch.master.merge refs/heads/master
sudo /etc/init.d/mountkernfs.sh start
# -*- ruby -*-
# in .autotest file:
Autotest.add_hook :initialize do |at|
at.clear_mappings
end
Autotest.add_hook :initialize do |at|
at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m|
["spec/#{m[1]}_spec.rb"]
## for both specs and tests:
#["spec/#{m[1]}_spec.rb","test/#{m[1]}_test.rb"]
}
end