-
How to use markdown
https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet
-
Setup Sublime Text 2 (Ubuntu: http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/)
- Install [Package Control][1]
- Install Theme: Flatland
{ | |
// Themes | |
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme", | |
"theme": "Flatland Dark.sublime-theme", | |
// font | |
"font_size": 15.0, | |
// tabs and white spaces | |
"draw_white_space": "all", |
IPython Notebook has always been handy and cool for prototyping algorithms and running quick simulations, for it brings the best of two worlds -- the powerful interactive capability of IPython terminal, and the beautiful documentation enabled by Markdown. You can always check out the IPython website for existing and coming cool new features.
Simply put, IPython Notebook runs in a server-client mode. A IPython kernel (server) runs at the backend, and you connect to and interact with the kernel from your web browser through a localhost TCP port. The initialization is automated so you don't have to bother with setting up the whole enviroment by hand. Everytime you'd lide to start an IPython notebook, just type ipython notebook
in the command line and the script will take care of the rest for you. That's pretty much the way I have been using ipython notebook up to now.
Last night, I started to think of the possibility of remote a IPython notebook, or strictly speaking,
- Install R
- Install rpy2. Rpy2 doesn't officially support windows. Follow this post as a workaround.
- In IPython,
%load_ext rmagic
and there you go.
sys.stdout.flush()
This function will flush the output (e.g. print 'hello world') immdiately to the command line so that you can see the results of the program in real time.
Basic setup in Ubuntu:
- Remote Desktop
- sudo apt-get update
- sudo apt-get install xrdp
- sudo apt-get install gnome-session-fallback
- echo "gnome-session --session=ubuntu-fallback" > ~/.xsession
- sudo /etc/init.d/xrdp restart ** use gnome-session-quit --logout to log out
import os
os.path.abspath(__file__)
os.path.realpath(__file__)
重定向操作符 描述
> 将命令输出写入到文件或设备(例如打印机)中,而不是写在命令提示符窗口或句柄中。
< 从文件中而不是从键盘或句柄中读入命令输入。
>> 将命令输出添加到文件末尾而不删除文件中的信息。
>& 将一个句柄的输出写入到另一个句柄的输入中。
<& 从一个句柄读取输入并将其写入到另一个句柄输出中。
| 从一个命令中读取输出并将其写入另一个命令的输入中。也称作管道。
0 是 < 重定向输入操作符的默认句柄。
C 和C++ 对应不同的调用约定,产生的修饰符也各不相同,如下:
调用约定 extern "C" 或 .c 文件 .cpp、.cxx 或 /TP C 命名约定 (__cdecl) _test ?test@@ZAXXZ Fastcall 命名约定 (__fastcall) @test@0 ?test@@YIXXZ 标准调用命名约定 (__stdcall) _test@0 ?test@@YGXXZ
__declspec(dllexport) __declspec(dllimport)
一般也是使用宏的形式:
screen -ls | |
screen -r | |
screen -x | |
screen -S socketname | |
Ctrl + A: | |
c -- create | |
k -- kill | |
d -- detach |