1.download and installed the atom in mac as usual way.
2.download the package atom-runner
(from the atom menu->preference->install...)
ref:https://github.com/lsegal/atom-runner
3.go to atom->config
you will open below setting, and add the red line into it. (careful with indent.)
"*":
"atom-runner": {}
core:
automaticallyUpdate: false
destroyEmptyPanes: false
openEmptyEditorOnStart: false
themes: [
"one-dark-ui"
"atom-dark-syntax"
]
editor:
fontSize: 18
invisibles: {}
showIndentGuide: true
showInvisibles: true
zoomFontWhenCtrlScrolling: true
"exception-reporting":
userId: "d4912b62-aa97-a2d1-4abc-b19393b94058"
runner:
scopes:
python: "/Library/Frameworks/Python.framework/Versions/3.4/bin/python3"
welcome:
showOnStartup: false
4. you can change the keymap if you want.
# import python
# Trading by Hacking (web crawler, data analysis, machine learning)
#
利用 Python,R,Excel VBA,multicharts 自造決策中心,取得量化交易能力, 再利用資訊不對稱,站在對你有利的這邊。
2016年9月7日 星期三
2016年9月2日 星期五
[rubyonrails] call out python
This method is not running command in background.
put your test.py under
/app/assets/pythonscripts/test.py
import os, sys
import time
time.sleep(5)
print("python in rails ha ha 5 ")
in show.html.erb
<% cmd = "python3.4 "+ "#{Rails.root}/app/assets/pythonscripts/test.py" %>
<% result = %x[#{cmd} &] %>
<%= result %>
put your test.py under
/app/assets/pythonscripts/test.py
import os, sys
import time
time.sleep(5)
print("python in rails ha ha 5 ")
in show.html.erb
<% cmd = "python3.4 "+ "#{Rails.root}/app/assets/pythonscripts/test.py" %>
<% result = %x[#{cmd} &] %>
<%= result %>
2016年8月3日 星期三
[Sublime text ] support big5
簡體中文GBK
“Preferences”-->“Package Control”,或者使用快捷键CTRL+SHIFT+P调出
在输入框内输入“Install Package”,点击下方自动提示出来的“Install Package”
在输入框内输入“CovertToUTF8”,下面就会相应的插件,鼠标点击安装。
插件就会安装成功,无需重启Sublime Text,你就会发现中文内容已经能够正确显示了。
Big5
Again, but this time, install Codecs33
Reopen sublime
“Preferences”-->“Package Control”,或者使用快捷键CTRL+SHIFT+P调出
在输入框内输入“Install Package”,点击下方自动提示出来的“Install Package”
在输入框内输入“CovertToUTF8”,下面就会相应的插件,鼠标点击安装。
插件就会安装成功,无需重启Sublime Text,你就会发现中文内容已经能够正确显示了。
Big5
Again, but this time, install Codecs33
Reopen sublime
2016年7月28日 星期四
[R][MAC]
1.When install package always shows
tar: Failed to set default locale
2.Open Mac terminal:defaults write org.R-project.R force.LANG en_US.UTF-8
3.Restart R
Done.
2016年7月11日 星期一
[git] set different user.name user.email in different repository
Go the the folder of your local repository
and type
and type
git config user.name "xxxxxx"
git config user.email "xxxxx@www.com"
take a check
cd .git
cat config
[MAC] Terminal hostname not mine.
it appears other's name who give you DNS.
go to terminal and check
xxxx $ hostname
xxxxxx
if the xxxx
$ sudo scutil --set HostName "xxxx's MacBook Air"
QUIT terminal, reopen again.
[octave] install octave 4.0.3 under mac osx EI 10.11, plot OK
ref: https://kiskeyix.org/articles/605
1.
install hombrew
install AquaTerm from sourceforge
brew tap homebrew/science
brew reinstall gnuplot --with-aquaterm
gnuplot # make sure it says "terminal set to aqua"
brew install lua51 # yes, you also need this old version of Lua
brew install octave
2.
vim ~/.octaverc
add below....
octave:1> graphics_toolkit('gnuplot')
octave:1> setenv('GNUTERM','aqua')
check again
octave:1> getenv("GNUTERM")
ans = aqua
octave:2>
=========================
For waring message when you plot
warning: could not match any font: *-normal-normal-10
use...
brew uninstall fontconfig
brew install fontconfig --universal
OK
訂閱:
文章 (Atom)