목록Tips (Utility, Computer Language, and etc.) (201)
감동, 마음이 움직이는 것
https://stackoverflow.com/questions/26984414/efficiently-sorting-a-numpy-array-in-descending-order Use array[::-1].sort(). 오름차순으로 정렬할 때는 array.sort().In [1]: a = np.array([1 ,9, 7]) In [2]: a Out[2]: array([1, 9, 7]) In [3]: a[::-1].sort() In [4]: a Out[4]: array([9, 7, 1])만약 a자체는 바꾸지 않고 새로운 어레이에 받고싶으면 싶으면 np.sort(a)[::-1] 해서 받아서 쓰면 된다.
http://donggov.tistory.com/18 tar과 tar.gz의 차이가 궁금해서 찾아봤더니 tar은 그냥 묶어만 주는거고 tar.gz는 묶어서 압축까지 해주는 거였다. 나는 압축까지 필요해서 tar.gz로 묶기를 했고 명령어는 다음과 같다. tar -zcvf 저장할이름.tar 폴더이름풀고싶을 때는 다음과 같이 해주면 된다.tar -xvf 저장된이름.tar
1. object (circle or rec)set object circle set object rechttp://gnuplot.sourceforge.net/demo/circles.html 2. file name for loophttps://stackoverflow.com/questions/25257202/how-to-define-a-gnuplot-output-file-as-a-variableset palette defined ( -1 "blue", 0 "#999999", 1 "red" ) p for [i=10:90]g = 0.01*i sprintf('test_%g', g) u 1:3:g w l lc palette t '' 3. define palettehttp://gnuplot.sourceforge.n..
[python precision problem]http://mpmath.org [organizing references]https://www.mendeley.com/?interaction_required=true [comparing two documents]http://meldmerge.org
[ref]https://stackoverflow.com/questions/11874767/how-do-i-plot-in-real-time-in-a-while-loop-using-matplotlibhttps://stackoverflow.com/questions/23141452/difference-between-plt-draw-and-plt-show-in-matplotlib # main loopfor t in range(10000): bk += dt*eom(temp_bk) t += dt #plot if time%1000==0: plt.axis([100, 300, 0, 0.2]) plt.plot(bk) plt.pause(0.05) plt.show()
https://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically put source ~/.bashrc in your .bash_profile" is standard advice.
https://tex.stackexchange.com/questions/56627/multiple-alignment \begin{equation}\begin{aligned}a &= b+ c+ d &&\text{ for ABC} &&\text{at rate $l$}\\alpha &= mu+ delta+ gamma &&\text{ for B} &&\text{at rate $k$}\\\end{aligned}\end{equation} &이후로는 모두 &&로 정렬됨.
https://tex.stackexchange.com/questions/6835/minimum-length-for-xrightarrow \begin{equation}X \xrightarrow{\mathmakebox[3em]{over the arrow}} Y\end{equation}
http://www.cplusplus.com/reference/random/normal_distribution/ #include #include #include using namespace std; int main() {int nrolls = 10000; //the number of sampling trialrandom_device rd; //making random seed for generatordefault_random_engine generator( rd() ); //making random generator using the random seednormal_distribution gaussian(5., 2.); //Gaussian distribution with mean 5 deviation 2..
Using "multiprocessing" library in python, we can make parallel computing process (https://m.blog.naver.com/townpharm/220951524843). This works when the parallel calculations do not exchange their results value but each calculation is independent. Simple code (example): ========================== from multiprocessing import Pool import time import os import math def f(x): print("for input: ", x,..