본문 바로가기

분류 전체보기

(115)
[Ollama] Expose port Open ollama's systemd file.sudo vi /etc/systemd/system/ollama.service AddEnvironment="OLLAMA_HOST=0.0.0.0:11434" Reload systemd and ollama. sudo systemctl daemon-reloadsudo systemctl restart ollama
[Linux] Decision to go back to macOS Constant rebooting after shutting down Linux is very cumbersome. Most things I do on macbook are web browsing and reading pdfs.I just decided to go back to macOS for stability.Although macOS Tahoe is very slow and annoying, Tahoe will be supported for 2 years from this moment, I guess.Until it is inevitable to use Linux, I should stick to macOS and use macports. Pros that I expected for Linux on..
[Linux] Search a specific text grep -rnw 'path for search' -e 'string to search' \ --include=\*.{txt,sh} --exclude-dir=dir_nameThis command searches 'string to search' from the directory 'path for search', while excluding dir_name directory.
[Slurm] Array 작업 시 job id 사용법 Array job 중 하나를 고르고 싶은데 그대로 job id를 입력하면 안된다. 예를 들어 job id가 546317_2이고 srun을 통해 nvidia-smi를 실행하고 싶을 때 아래처럼 하면 오류가 생긴다. [example@example.com ~]$ srun --jobid=546317_2 nvidia-smisrun: error: Slurm job 546317 has expiredsrun: Check SLURM_JOB_ID environment variable. Expired or invalid job 546317Array job id가 546317_2인 것을 그대로 사용해서 srun 명령어를 실행할 수 없다. 언더스코어가 붙어 있는 job id와 진짜 job id는 다르다. 언더스코어는 array..
[Slurm] 가용 가능한 GPU 빨리 보기 .bashrc에 아래 alias 추가alias showmethegpu="pestat -G | egrep 'mix|idle'"
[Python] pdb debugging To add a breakpoint to code, addbreakpoint()To execute the code with debugging mode,python -m pdb -c continue ./code.py
Cauchy-Schwarz 시험장에서 빠르게 유도하기 벡터 \(a\)와 \(b\)가 있고 사이각을 \(\theta\)라 하면,$$\begin{aligned}&|\cos \theta |\leq 1\\&\Rightarrow \frac{|\|a\| \|b\| \cos \theta |}{\|a\| \|b\|} \leq 1 \\&\Rightarrow\frac{|a^\top b|}{\|a\| \|b\|}\leq 1 \\&\Rightarrow |a^\top b| \leq \|a\| \|b\|\end{aligned}$$시험장에서 갑자기 기억 안날 때 빠르게 유도하는 법
[Linux] ssh pem file invalid format error This error originates from Windows-style line ending of the private key file. You need to remove CRLF. This can be easily done with this command.dos2unix your_file.pem