Posts

[ Level 1 ] Limit memory usage in Python program

We could limit memory usage in Python program. #!/usr/bin/env python3.5 import resource def show_memory_limit(): soft, hard = resource.getrlimit(resource.RLIMIT_DATA) print 'Soft limit changed to :', soft print 'Hard limit changed to :', hard def set_memory_limit(soft, hard): resource.setrlimit(resource.RLIMIT_DATA, (soft, hard)) #limit to one kilobyte if __name__ == '__main__': show_memory_limit() set_memory_limit(1024, 2048) show_memory_limit() Wish this helps. regards, Stanley Huang

[Level 1] Install RStudio on Ubuntu 16.04

Image
One you have installed R on Ubuntu, there is a great R develop environment called "RStudio". You could install "R Studio" via apt-get command. $ sudo apt-get -y install rstudio $ rstudio Wish this helps. regards, Stanley Huang

[Level 1] Install R in Ubuntu

Here are the steps to install R on Ubuntu 16.04 $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 $ sudo add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/' $ sudo apt-get update $ sudo apt-get -y install r-base r-base-core $ sudo -i R ## test R Here are the steps to instal R packages from CRAN $ sudo -i R > install.packages('__package_name__') Wish this helps. regards, Stanley Huang

[Level 1] How to setup Debian for sharing screen on WebEx.

I installed Debian 8 on my laptop but cannot share my screen on WebEx. After I google it and I found I could share my screen by installing the following packages. libgcj14-awt:i386 libpangoft2-1.0-0:i386 libpangox-1.0-0:i386 libxft2:i386 libpangoxft-1.0-0:i386 libgtk2.0-0:i386libxmu6:i386 Wish this helps. regards, Stanley Huang

[ Level 1 ] What could we do in Sprint 0?

There are many different opinions about if team should have Sprint 0 or not. In my opinion, Sprint 0 is a good for team, because it could avoid team to take pressure immediately if no more Sprint 0.1, 0.2, 0.3...etc. What will I do in Sprint 0? Here is a task list of Sprint 0. * Kick-Off * Agile/Scrum training. (SM) => http://scrummethodology.com/ => http://scrumreferencecard.com/scrum-reference-card/ => 2 half day training. * Auto training. (Auto) * Schedule regular meetings. (SM) * Define user stories. (PO) * Define DoD. (Team) * Prepare developing/testing/integration environment. Wish this helps. regards, Stanley Huang

[Level 1] git ignore

If you want git not to commit some temporary files or log files...etc., you could create .gitignore file to ignore them. If you don't have any idea about which file should be ignore, you could also download ignore templates that prepared by github. mkdir ~/git-home cd ~/git-home git init git clone https://github.com/github/gitignore cd ~/my_py_project cp ~/git-home/gitignore/Python.gitignore ./.gitignore Wish this helps. regards, Stanley Huang

[Level 1] HOWTO Installing Packages from Yaourt AUR in Archlinux.

If you want to install packages from Yaourt(Yet AnOther User Repository Tool ) AUR(Archlinux User Repository), you could follow the following steps. a. Install yaourt by downloading source code. 1. Install development environment. $ sudo pacman -S base-devel $ sudo pacman -S yajl 2. Download, build and install package-query $ curl -O https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz $ tar zxvf ./package-query.tar.gz $ cd ./package-query $ makepkg -si 3. Download, build and install Yaourt $ wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz $ tar zxvf ./yaourt.tar.gz $ cd ./yaourt $ makepkg -si b. Install yaourt from repository. 1. setup repository $ sudo su # cat >> /etc/pacman.conf <<EOF [archlinuxfr] SigLevel = Never Server = http://repo.archlinux.fr/$arch EOF 2. update repository and install yaourt # pacman -Syu # pacman -Ss yaourt Wish this helps. regards, Stanley Huang