2018年1月7日 星期日

4G+記錄

Carrier Aggregation
載波聚合
可以同時使用不同頻段以加速無線網路
有人2CA測得200Mbps
聯發科要MT67XX、P10、X20等等才支援
高通要中階以上,s430、s617,s800系列等等等
Cat.x只代表處理器支援的網路速度,和CA無關。單一頻段頻寬夠大,不用CA也能跑到Cat.x的上限
台版紅米不支援CA
使用CA時,網路圖示多會呈現4G+
2CA理論速度225Mbps
3CA理論速度375Mbps
三星可以進Service Mode查詢。進入方式:對*#0011#打電話
Mobile01的peter大整理的表格
Band
頻段
台灣目前常見的4G頻段700/900/1800/2600MHz
低頻訊號好但承載人數少
高頻訊號死角較多但承載人數多,適合室外
LTE UE-Category (Cat)

python env

# Ubuntu
sudo apt install python python-pip python-dev
pip install --user virtualenv
cd ~
ENV_NAME=tensorflow
mkdir ~/${ENV_NAME}
virtualenv --no-site-packages ${ENV_NAME}
source ~/${ENV_NAME}/bin/activate
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.1-cp27-none-linux_x86_64.whl
#url https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package
pip install jupyter pandas

# Windows
# Make sure you download 64bit version python
pip install tensorflow

2017年2月25日 星期六

Folding@home on Ubuntu16.04 using Nvidia Graphic Card

Install some dependencies
$ wget http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb
$ sudo dpkg -i python-support_1.0.15_all.deb
$ sudo apt-get install python-gnome2
Download fahclient and fahcontrol
Install fah program
$ sudo dpkg -i fah*.deb
 Get newest GPUs.txt
$ wget http://fah.stanford.edu/file-releases/public/GPUs.txt
Move to replace the old one
$ mv  GPUs.txt /var/lib/fahclient/
Start to fold

2016年9月28日 星期三

TensorFlow Census predict


如果得到如下的結果
Traceback (most recent call last):
  File "census.py", line 22, in <module>
    print (df_train["income_bracket"].apply(lambda x: ">50K" in x))
  File "/usr/lib/python2.7/dist-packages/pandas/core/series.py", line 2023, in apply
    mapped = lib.map_infer(values, f, convert=convert_dtype)
  File "inference.pyx", line 920, in pandas.lib.map_infer (pandas/lib.c:44780)
  File "census.py", line 22, in <lambda>
    print (df_train["income_bracket"].apply(lambda x: ">50K" in x))
TypeError: argument of type 'float' is not iterable
在read_csv時用skipfooter=2 跳過最後兩行

2016年7月20日 星期三

Install Nvidia driver with dkms may help you

DKMS is Dynamic Kernel Module Support, which can help you when you upgrade your kernel with the out come modules.

To install Nvidia Graphic Card driver with DKMS support, install DKMS first.
$ sudo apt-get install dkms
Then install the driver, take NVIDIA-Linux-x86_64-367.35.run for example
$ chmod +x  NVIDIA-Linux-x86_64-367.35.run
$ sudo sh NVIDIA-Linux-x86_64-367.35.run --dkms
When the installation finish
$ dkms status
You can find  "nvidia, 367.35, 3.19.0-64-generic, x86_64: installed".
And you can build all modules for current kernel by
$ dkms autoinstall
And for a specifi kernel by
$ dkms autoinstall -k 4.4.15 
Or install a module for all kernels
$ dkms install -m nvidia -v 367.35 --all

Reference  https://wiki.archlinux.org/index.php/Dynamic_Kernel_Module_Support

Nvidia Fan speed control

Login by Xwindow
Run nvidia-xconfig cool-bits=4
Then either run the bash file below or open Nvidia X Server Setting to change the fan speed

The bash file
#!/bin/bash
nvidia-settings -a [gpu:0]/GPUFanControlState=1
nvidia-settings -a [fan:0]/GPUTargetFanSpeed=100

2016年7月18日 星期一

compile kernel with minimum modules

Use the option localmodconfig to minize the modules.
But any change in hardware will make it need to be compiled again.
# get linux kernel source code
$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.15.tar.xz
$ tar -xvf linux-4.4.15.tar.xz
$ cd linux-4.4.15
$ make mrproper
$ cp /boot/config-$(uname -r) .config
$ make oldconfig
$ make localmodconfig
# compile kernel. revision is the tag you can customize. -j4 means using 4 threads
$ sudo fakeroot make-kpkg --initrd --revision=4.4.localmodconfig kernel_image kernel_headers -j4
# wait for a while

# you will find linux-headers-4.4.15_4.4.localmodconfig_amd64.deb and linux-image-4.4.15_4.4.localmodconfig_amd64.deb outside
$ ls ../linux*
# install them
$sudo dpkg -i ../linux*localmodconfig_amd64.deb