[visudo] Username is not in the sudoers file

Username is not in the sudoers file. This incident will be reported Besides making sure that your username is in sudo group (I think it is), there are other cases that cause this problem. Some of them may have something to do with sudoers file (/etc/sudoers) in my case, i accidently commented out 1 important… Continue reading [visudo] Username is not in the sudoers file

Một chút với Linux Terminal

Cho những ai lười đọc Bước 1: cài đặt oh-my-zsh  sh -c “$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)” Bước 2: cài đặt powerlevel10k git clone –depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-sh/custom}/themes/powerlevel10k Bước 3: Edit ~/.zshrc ZSH_THEME=”powerlevel10k/powerlevel10k”  Sau đó thoát terminal ra vào lại xem thành quả. Bước 4: Cài đặt thêm plugins (optional nhé) 4.1 tải về một số plugins… Continue reading Một chút với Linux Terminal

Applied Machine Learning – things you need to know

Một số lưu ý khi áp dụng Machine Learning để giải quyết các vấn đề cụ thể: Always use train_test_split or similar GridSearchCV (built-in cross validation) HDF need to be shrunk after write/update –> ptrepack –chunkshape=auto –propindexes –complevel=9 –complib=blosc data_in.h5 data_out.h5 Use Keras optimizer instead of tensorflow itself (so that it can be saved later… Continue reading Applied Machine Learning – things you need to know

Bash: check if a zip or a rar file has password-protection

ZIP crypted=$( 7z l -slt — $file | grep -i -c “Encrypted = +” ) if [ “$crypted” -eq “1” ]; then protected=1 fi RAR unrar x -p- -y -o+ “$file” 1> /dev/null 2> /dev/null if [ “$?” -eq “3” ] ; then unrar x -p$password -y -o+ “$file” 1> /dev/null 2> /dev/null fi Source:… Continue reading Bash: check if a zip or a rar file has password-protection

Linux Tips

bash (zsh too) tricks from tutorialLinux sudo !!: re-run previous command in sudo prepended ctrl-k ctrl-u ctrl-w ctrl-y cutting/pasting text less +F /  less then shift-f instead of tail ctrl-x-e to continue editting shell in a text editor alt-. to paste previous command’s argument reset to reset/unbork your terminal ctrl-a. ctrl-e to move to the… Continue reading Linux Tips

Koding : coding in the Cloud

https://koding.com [just calm down and move on, it’s gonna save your time later, trust me] This one is new to me so I’m going to have a brief introduction here, hopefully it’s worth your time reading this : 1. The first thing is an active support from the Community & Administrators : My question was answered… Continue reading Koding : coding in the Cloud

Hadoop 2.2 Single Node Installation on CentOS 6.5

By far the best tutorial for you to get started with Hadoop installation. Source : http://alanxelsys.com/2014/02/01/hadoop-2-2-single-node-installation-on-centos-6-5/ Introduction This HOWTO covers Hadoop 2.2 installation with CentOS 6.5. My series of tutorials are meant just as that – tutorials. The intent is to allow the user to gain familiarity with the application and should not be construed… Continue reading Hadoop 2.2 Single Node Installation on CentOS 6.5

Python setup tools easy_install Linux

Let’s not use easy_install anyway: https://packaging.python.org/discussions/pip-vs-easy-install/ https://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install Cai dat easy_install cho linux, unix : I ran into a bit of trouble installing easy_install, after reading many useless articles, this is how I solved the problem,  actually it’s rather simple : Type : wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py && python ez_setup.py and you’re done .   Bonus : to… Continue reading Python setup tools easy_install Linux

Install Backtrack 5 startx black screen hang up

Cài đặt Backtrack 5, bị treo sau khi “startx” I encountered this problem whilst I was installing Backtrack 5 R3 using USB (multiboot) Well, I did google it and really found some helps, but after all I had to fix it myself If you have googled and try this but not sucess : Edit the… Continue reading Install Backtrack 5 startx black screen hang up