### Plot histograms in python with matplotlib

Suppose we have a file theta.dat which has 1000 lines and each line has a angle value. Its first 10 lines are as follows.

100.35766
105.05182
112.56954
119.66241
125.35966
127.44947
125.47673
121.08910
118.00765
117.77907


How to plot a histogram figure in python with matplotlib with the file theta.dat?

We put this file in the home directory, thus the position is ~/theta.dat.
Then , we plot in Enthought Canopy Graphical Environment! One can download and install it in Software Manager. If we open it, the window looks like this.

### How to use USB Audio cards on Raspberry Pi 3 (jessie)

A few days ago,I bought a USB Audio card.

I used one night to figure out how to configure the device on Raspberry Pi. I searched a lot of material, and I found many of them are outdated. Lots of people said to changed "/etc/modprobe.d/alsa-base.conf", but in jessie , the file dose not exist.

The files I changed are as follows and these settings works for me:

### Display and decode QRcode in Linux Terminal

I need to display the qrcode in Linux Terminal.  I find there is another convenient tool we can use.

Install qrencode in Debian-based Linux:

sudo apt-get install qrencode


Usage example:

qrencode -o - -t UTF8 '北京欢迎你'
qrencode -o - -t UTF8 'hello world'


These commands will display the information in QRcode in terminal.

### Working in Linux 02: Jtext2code–Use Python to make a QR code generator

Sometimes, I need copy some links or text from computer to my smart phone.  It's such a bad experience to type all of the contents by myself. So I made a tool  in Linux called "Jtext2code", which  can  generate a QR code according to the text you choose. Use your smart phone application like Scanner to scan the picture generated, you can get the information you choose easily.

### Solution for the Error “*** is not in the sudoers file. This incident will be reported. “

On the Raspbian system, when I created a new user with the commands
#useradd gang
There is no directory named "gang" under the home directory. When I login as a user (gang) and want to use the sudo command to create a main directory for myself, I saw the error "gang is not in the sudoers file. This incident will be reported. " This error implies that I have to edit the sudoers file to give myself the privilege to use sudo. To have the root privilege, I need to do as follows.