sudo add-apt-repository ppa:marutter/rrutter sudo apt-get update sudo apt-get upgrade sudo apt-get install r-base r-base-dev
Saturday, June 25, 2016
Install R-base 3.1.1 on Ubuntu 14.04
set static ip ubuntu
1. Set IP changes in "/etc/network/interfaces"
2. Don't give your DNS configurations in
So use
auto eth0
iface eth0 inet static
address 136.187.xx.xx
netmask 255.255.248.0
gateway 136.187.80.1
2. Don't give your DNS configurations in
/etc/resolv.conf because while we restart the server sometimes the configuration get erased.So use
vim /etc/resolvconf/resolv.conf.d/base (while updating configs in this it doesn't get removed).search (domain name)
nameserver 8.8.8.8
nameserver 8.8.4.4
isntall R and other packages
install.packages('ggplot2', dependencies=T)
using above can install ggplot2 package.
Sunday, June 19, 2016
Wednesday, March 9, 2016
Flask, how to send email. Configuration
Using gmail as flask's sendmail server
1, First configure flask as below:
MAIL_SERVER = 'smtp.gmail.com'MAIL_PORT = 587
MAIL_USERNAME = 'email@gmail.com'
MAIL_PASSWORD = 'password'
MAIL_USE_TLS = True
MAIL_USE_SSL = False
2, Change your google account settings:
Google blocks sign-in attempts from apps which do not use modern security standards(mentioned on their support page). You can however, turn on/off this safety feature by going into the link below:
Go to this link and select turn on :
Saturday, February 13, 2016
file size
- individual file size : ls -lh file
- free and used place on the disk : df -h
- total folder size : du -hs
DNS configure
- all mappings are in hosts: /etc/hosts
- google public dns
- clients need to be able to connect to local nameserver
Thursday, February 11, 2016
using sublime text2 as latex editor on ubuntu
- install sublime text2
- install package control via sublime console (ctrl + `)
import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')- install latextools :
- CTRL + SHIFT + P
- install package ..
- install latextools ...
- install tex : sudo apt-get install texlive latexmk
vim configure
3 set nu
4 set autoindent
5 set ruler
6 syntax on
7 set nocompatible
8 filetype indent plugin on
9 set hlsearch
10 set softtabstop=4
11 set shiftwidth=4
12 set expandtab
13 set autoindent
14 set ruler
4 set autoindent
5 set ruler
6 syntax on
7 set nocompatible
8 filetype indent plugin on
9 set hlsearch
10 set softtabstop=4
11 set shiftwidth=4
12 set expandtab
13 set autoindent
14 set ruler
Tuesday, February 9, 2016
install and configure ns3 on ubuntu
- wiki: install ns3
- download ns3 tar
- install pre requirements: sudo apt-get install
gcc g++ python python-dev qt4-dev-tools libqt4-dev mercurial bzr cmake libc6-dev
libc6-dev-i386 g++-multilib gdb valgrind gsl-bin libgsl0-dev libgsl0ldbl flex bison
libfl-dev tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0
libgtk2.0-dev vtun lxc uncrustify doxygen graphviz imagemagick texlive
texlive-extra-utils texlive-latex-extra texlive-font-utils dvipng python-sphinx dia
python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev libboost-signals-dev
libboost-filesystem-dev openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
install ubuntu using virtualbox in mac
- install virtualbox on mac
- download ubuntu iso
- install ubuntu on virtualbox
- make ubuntu window full screen :
- start ubuntu
- Home+F make the virtualbox full screen
- find devices menu on the left top, and then choose "install guest addition"
- finish.
Full Screen:
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install dkms
- sudo apt-get install build-essential
- install guest additioin on the devices menu
Friday, December 4, 2015
Tuesday, November 17, 2015
install linux
- 分区:主(一般最多四个)、延伸、逻辑
- /boot 必须在最前面
- 不同分区的大小,以及如何分区,依据系统的功能制定
- 一般需要etx4, swap类型的分区,当然也可以添加
file system
- find file system type : df -T
- linux & windows both support : vfat file system
Monday, November 16, 2015
Saturday, November 14, 2015
Python Plan
- develop some small projects
- develop games 2D
- develop games 3D
- develop games interesting (how to create a game structure)
Friday, November 13, 2015
Linux study plan
basic stage (精通使用、内核基本了解):
- 鸟哥的书,共两册。 使用、了解linux,打好基础!
- UCore. 初步了解linux系统的程序开发过程以及开发工具的使用,以及较好的了解UCore系统
- 其他的比较好的介绍linux的书
master stage (内核深入了解、精通开发):
- 更多的通过实践来了解
Wednesday, November 11, 2015
Windows visual studio 2013 install MS_MPI and run mpi program
- install MSMPI : msmpi. We need install both msmpisdk.msi (to get include\ & lib\) and MSMpiSetup.exe (to get bin\mpiexec.exe)
- set environment variables :
- MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\
- MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
- MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
- MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\
- create a new C++ empty project :
- change linker's system configuration to CONSOLE(SUBSYSTEM:CONSOLE)
- add linker additional lib directories (x86 or x64) this machine is x86:
- add linker input additional dependencies , Type msmpi.lib to the list
- add location of mpi header file
- Add a C++ file to write your first MPI program and write the following codes as a test:
#include<iostream> #include<mpi.h> using namespace std; int main(int argc, char** argv){ int mynode, totalnodes; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &totalnodes); MPI_Comm_rank(MPI_COMM_WORLD, &mynode); cout << "Hello world from process " << mynode; cout << " of " << totalnodes << endl; MPI_Finalize(); return 0; }
- build the program and if there is no error , then test it by running mpiexec: "mpiexec -n 4 mpi_hello.exe"
- use msmpi ; use msmpi 2 : 主要参考
Subscribe to:
Posts (Atom)




