Programming
Table of Contents
Table of Contents
Python
Python
- Miniconda Installation
- Useful Tools
- Post-Installation
# It creates ~/.condarc with following content:
auto_activate_base: false
- Jupyter notebook
$ python -m ipykernel install --user --name lal --display-name "python-lal"
# It modifies ~/Library/Jupyter/kernels/ or ~/.local/share/jupyter/kernels/
- Check environments
$ python -m site
- Conda ENV
$ conda activate py37
$ conda deactivate
$ conda env list
$ conda env remove -n py37
- Conda
$ conda install -c conda-forge xxx
HTTP server
HTTP server
- Start a http server
Virtual Environment
Virtual Environment
- virtualenv
$ source myenv/bin/activate
$ deactivate
- pip
$ pip install -r requirements.txt
C/C++
C/C++
- Compiler
- Examples
Haskell
$ sudo port install ghcHaskell
Latex
Latex
Setup
Setup
- Installation (Mac)
- Download the MacTex distribution from: http://www.tug.org/mactex/mactex-download.html
- Uninstall
- Installation (Ubuntu)
Packages
Packages
- tikz-feynman : Drawing nice Feynman diagrams
- Have to use “lualatex” instead of “pdflatex” as the compiler to avoid this problem.
- [Manual] https://arxiv.org/pdf/1601.05437.pdf
- [Quick Start] https://www.overleaf.com/learn/latex/TikZ-Feynman
- tikz-3dplot : A simple package for making 3-d coordinates
- Others
\usepackage{amssymb} % AMS symbols
\usepackage{physics} % \bra \ket ...
% Text Color
\usepackage{xcolor}
\newcommand{\red}{\textcolor{red}}
\newcommand{\blue}{\textcolor{darkblue}}
% Hyperlink
\usepackage[colorlinks]{hyperref}
\definecolor{darkblue}{HTML}{2E3092}
\hypersetup{colorlinks=true,linkcolor=darkblue,citecolor=darkblue,urlcolor=darkblue}
\usepackage{amsthm} % AMS theorem
\theoremstyle{definition}
\newtheorem{example}{Example}[section]
\newtheorem*{solution*}{Solution}
Packages
\usepackage[sc]{mathpazo}Packages
\linespread{1.05} % Palladio needs more leading (space between lines)
\usepackage[T1]{fontenc}
Makefile
Makefile
- $ latexmk -pdf main.tex
Git
Git
Gitignore
Gitignore
- https://git-scm.com/docs/gitignore
- https://orianna-zzo.github.io/sci-tech/2018-01/mac%E4%B8%ADgit%E5%BF%BD%E7%95%A5.ds_store%E6%96%87%E4%BB%B6/