A Draft Page | only draft

Quick Notes

>>stopwords2.txt (11/03/2018)
>>take care of a = "doesn\u2019t" - char = a.decode('unicode-escape') print char --> doesn't (11/03/2018)
>>File "/usr/bin/pip", line 9, in from pip import main
ImportError: cannot import name main
Soluion: which pip
sudo cp pathname(e.g./usr/local/bin/pip) /usr/bin/ (6/20/2018)
>>Vim Search & replace(:%s/foo/bar/g ) (6/4/2018)
>>SSL error downloading NLTK data (nltk.download()) (6/4/2018)
>>copy all local files in dir to server "scp -r /home/user/html/* root@server_address:/mnt/volume-nyc1-07/crawler/crawling" (link)<< (4/18/2019)
>>Setup MS X Remote Desktop - sudo apt-get install xrdp xfce4 (3/24/2018)
>>Mongodb enable authentication (Enable Access Control)<< (11/27/2017)
>>Avoid Sublime Text 3 beta update to 3.0 verion --> "update_check": false<<
>>CS498rk1: How to Install and Use the Linux Bash Shell on Windows 10<< (08/29/2017)
>>Install MongoDB via brew: brew install mongodb<< (08/28/2017)
>>Install brew on macOS Sierra<< (08/28/2017)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Update: 8-27-2017 (End of 2017 Summer)
>>Mac Thunderbolt固件1.2无法更新终端解决办法: softwareupdate --ignore ThunderboltFirmwareUpdate1.2<< (08/27/2017)
>>各排序算法 in C<< (04/7/2017)
>>How to Run Graphical Linux Desktop App on Win 10’s Bash Shell<< (export DISPLAY=:0) (01/18/2017)
Update: 12-31-2016 (The end of 2016 & happy new year! @_@)
Update: 10-31-2016 (Happy Helloween!)
>>Ubuntu Crash: 1. Ctrl + Alt + (1 of F1-F6), 2.Alt + Prt Sc + (TYPE:reBoot)<< (10/26)
>>Reset Apple Bluetooth Keyboard for macOS<< (10/13)
>>Java for macOS 11.12 (Chinese Version)<< (10/13)
>>If use mongoose, change collection name to plural(复数, this is shit!)<< (9/16)
Update: 9-15-2016 (GitHub Changed Web UI)
>>How to restart WiFi connection on Linux? (ifconfig wlp4s0 down/up, service network-manager restart)<< (9/8)
>>How to find your IP address?<< (9/8)
>>How to install PyCharm on Linux<< (9/8)
>>How to setup MongoDB on Ubuntu and Linux Mint<< (9/8)
>>Ubuntu on Win: C:\Users\[W_un]\AppData\Local\lxss\home\[U_un]<< (9/5) (Sample)
>>Examples of Emails to a Prof.<< (8/23)
>>如何与教授用电子邮件联系<< (7/20)
>>使用NodeJS和AngularJS创建一个TODO的单页网站 << (7/20)
>>Why doesn't “cd” work in a bash shell script? How?<< (7/20)
>>ThinkPad YOGA 11e 重装Win10后 触摸屏失效?<< (7/19)
>>Sublime Text 编辑神器(Win中文离线版)<< (7/19) (官网)
>>Asus T100HA Problem turning on<< (6/30)
>>下载谷歌浏览器(Win中文离线版)<< (6/30) (官网)
>>下载火狐浏览器47(Win中文离线版)<< (6/22) (官网)
>>下载Avira小红伞免费杀毒软件(Win中文离线版)<< (6/22) (官网)
>>Win10搜索web栏和windows怎么去掉?<< (6/18)
>>Windows 7连上无线信号上不了网?<< (6/18)

Update: 6-16-2016

>>点击Win7升级Wini10<< (5/?)
点击“立即升级” - “保存”(任意位置或者桌面) - 然后点击浏览器左下角点开下载的 - 是 - (正在检查更新)- 然后就自动下载更新


Basic Linux Command

when you cannot start mongod: ps aux | grep mongod, then kill the ID contains mongo

Click to download.new_ubuntu_OS_setup_file (GNOME 16.04)
xx@oo: chmod a+x init.sh
xx@oo: ./init.sh (simply once you type "./i", then click on button "Tab")

Or... you can simply copy & paste the following code (but the web might be an older version of "init.sh" file):

# create root password, you can comment out of it after you alread create a pwd for root
sudo passwd

# update system
sudo apt-get update && sudo apt-get upgrade -y

# apt libs
sudo apt-get install -y python python3-pip python-numpy python-scipy python-matplotlib nodejs-legacy mongodb-server vim gcc g++ nodejs npm build-essential libssl-dev curl git ruby clang python-pip python-scrapy python-bs4 python-lxml python-html5lib python-lucene python-dev libpuzzle-dev build-essential cmake nginx openssh-server openvpn easy-rsa tcl tk tcllib libgd2-xpm-dev (libgd-dev) php (or php5)

# for X-remote
apt-get install -y xrdp xfce4
# apt software
sudo apt-get install -y xrdp xfce4 gedit chromium-browser eclipse gdebi gimp blender stardict vlc smplayer dosbox unzip emacs audacity filezilla transmission comix openshot cheese deluge clamav clamtk virtualbox visualboyadvance-gtk

# pip libs
Download >>Python<<
python file.py
sudo pip3 install -U statsmodels ipykernel tqdm seaborn theano parameterized scikit-cuda torch torchvision Cython CherryPy joblib dtaidistance tensorflow gensim setuptools scikit-learn pandas beautifulsoup4 pymongo selenium nltk numpy scrapy matplotlib lxml scipy tensorflow ipython jupyter keras statsmodels patsy ggplot twitter tweepy google-api-python-client
python3 file.py
sudo pip install -U statsmodels ipykernel tqdm seaborn theano parameterized scikit-cuda torch torchvision Cython CherryPy joblib dtaidistance tensorflow gensim setuptools scikit-learn pandas beautifulsoup4 pymongo selenium nltk numpy scrapy matplotlib lxml scipy tensorflow ipython jupyter keras statsmodels patsy ggplot twitter tweepy google-api-python-client
sudo pip install -U setuptools
sudo pip install -U scikit-learn (machine learning)
sudo pip install -U pandas
sudo pip install -U beautifulsoup4
sudo pip install -U pymongo
sudo pip install -U selenium
sudo pip install -U nltk (NLP)
sudo pip install -U numpy
sudo pip install -U scrapy
sudo pip install -U matplotlib
sudo pip install -U lxml
sudo pip install -U scipy
sudo pip install -U tensorflow (machine learning and deep neural networks)
sudo pip install -U gensim (machine learning and deep neural networks)
sudo pip install -U ipython
sudo pip install -U jupyter (jupyter notebook)
sudo pip install -U keras (deep learning)
sudo pip install -U statsmodels
sudo pip install -U patsy
sudo pip install -U ggplot
sudo pip install -U google-api-python-client
-------
sudo pip install -U grass (grass GIS)
# npm software
sudo npm express forever -gd

Ubuntu 16.04: How to Move Unity’s Left Launcher to The Bottom
gsettings set com.canonical.Unity.Launcher launcher-position Bottom
revert back:
gsettings set com.canonical.Unity.Launcher launcher-position Left

Mac Softwares (Not in the App Store)
Download >>Python2.7/3.6<< | >><Anaconda<< | >>Nodejs<< | >>KugouMusic<< | >>Github<< | >>Sublime Text 3<< | >>Atom<< | >>MongoHub<< | >>Android File Transfer<< | >>Logitech Options<< | >>Firefox<< | >>Chrome<< | >>MacTex<< | >>VLC<< | >>TeamViewer<< | >>Paintbrush2<< | >>MySQL Workbench<< | >>Go2Shell<< | >>Java<< | >>JDK8<< | >>PyCharm<< | >>JetBrain Student Reg<< | >>VirtualBox<< | >>Dropbox<< | >>name<< |

Other Linux Softwares
Dropbox | 有道词典 | Sublime Text 3(S/N) | Chrome | WPS | Slack | JetBrains Products

Quick Links


Terminal

"show disk useage"
du -h --max-depth=0 * | sort -hr
df


MongoDB

"initialize MongoDB"
sudo mkdir -p /data/db
sudo chmod g+w /data/db
sudo mongod &
mongo

"Export":
exit mongodb
mongoexport --db test --collection traffic --out sample.json

"Import":
exit mongodb
mongoimport --db test --collection traffic --file sample.json

"find one":
db.collection_name.find()

"find sth":
db.collection_name.find({field_name: "value"})

"drop":
db.dropDatabase() / db.collection_name.drop()

"count":
db.collection_name.find().count()

"distinct":
db.collection_name.distinct("field_name")

"delete":
db.collection_name.remove({field_name: "value"})


GitHub

"update & push":
git pull
git add * / git rm filename.type
git commit -m "sth"
git push

Delete the folder locally and then push to github ex:
rm -rf folder
git add .
git commit -a -m "removed folder"
git push origin master


Click to download SIGGRAPH demo files done


Desktop Environment

sudo apt-get install xorg
XFCE:
sudo apt-get install xfce4
sudo apt-get install xubuntu-desktop
IceWM:
sudo apt-get install icewm iceconf icepref iceme icewm-themes
OpenBox:
sudo apt-get install openbox obconf openbox-themes
fluxBox:
sudo apt-get install fluxbox fluxconf
LXDE:
sudo apt-get install lxde


Recons. Demo

Visitors

Copyright © Jinda Han. 2015-2016. All Rights Reserved.