목록Tips (Utility, Computer Language, and etc.) (201)
감동, 마음이 움직이는 것
https://stackoverflow.com/questions/627435/how-to-remove-an-element-from-a-list-by-index-in-pythonres = []res.append("a")res.append("b")res.append("c") #res = ['a', 'b', 'c']여기서 만약 두 번째 element인 'b'를 지우고 싶다면 res.pop(1) #res[1] = 'b'이므로 1번 idx에 있는 성분을 지우라는 게 된다. 그러면 다음과 같은 결과를 얻을 수 있다 res = ['a', 'c']. 만약 가장 최근에 넣은 성분을 지고 싶다면 (지금 예에서는 'c')res.pop() 또는 res.pop(-1)을 해주면 된다.
import numpy as npx = np.array(X) #X is data list, we have to convert list to numpy arrayy = np.array(Y) #2d heatmapheatmap, xedges, yedges = np.histogram2d(x, y, bins=100)#1d histogramhist, xedges = cp.histogram(x, bins=100) [Script for read and write]import numpy as npimport re#read datafp = open("data/scatter_a%g_Nen660000.d" % a,'r')lines = fp.readlines()Nlines = len(lines)fp.close() X = []Y..
Extract: http://reference.wolfram.com/language/howto/GetPartsOfAMatrix.htmlres = data[[All, 2 ;; 3]]; (*all row & 2-3 col*)Import: http://reference.wolfram.com/language/tutorial/ImportingAndExportingFiles.html
[Ref] https://stackoverflow.com/questions/11289551/argument-list-too-long-error-for-rm-cp-mv-commandsfind . -name "*.pdf" -print0 | xargs -0 rm
[ssh-keygen을 이용하여 scp password없이 사용하기] https://superuser.com/questions/555799/how-to-setup-rsync-without-password-with-ssh-on-unix-linux$ ssh-keygenEnter passphrase (empty for no passphrase):Enter same passphrase again: Note: When it asks you to enter the passphrase just press enter key, and do not give any password here.$ ssh-copy-id -i ~/.ssh/id_rsa.pub 115.200.301.2(고정 IP) [remove password of..
rsync -a --ignore-existing host:/remote/directory/ /local/directory/[Ref] https://unix.stackexchange.com/questions/105140/how-to-copy-only-new-files-using-scp-command
이런게 있을줄이야!http://bartysways.net/?p=682https://www.letmecompile.com/xcode-lldb-%EB%94%94%EB%B2%84%EA%B9%85-%ED%85%8C%ED%81%AC%EB%8B%89/ 유용한 명령어!>>p variable //variable의 값을 출력하는데 python처럼 vector도 통째로 뱉어준다.>>br list //break poin 보기>>up/down //break point에서 hierachy위나 아래로 들어가기
[Ref] http://www.amycesal.com/data-visualization-style-guidelines/Color set is amazing!The best color set I has ever seen!OMG! This site is amazing!I will look up when I want to get some idea for visualization or picking the color set for my presentation!I LOVE this site, hehe.
Ref) http://ayapin-film.sakura.ne.jp/Gnuplot/Docs/ps_guide.pdf => '{/Symbol \341} x {/Symbol \361}'
Ref) https://tex.stackexchange.com/questions/26707/one-column-equation-in-twocolumn-document-class \documentclass[twocolumn]{revtex4-1} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{widetext} \begin{equation} f(x) = ax + b \end{equation} \end{widetext} \lipsum[1]