Skip to content

Instantly share code, notes, and snippets.

View SHDShim's full-sized avatar

S.-H. Dan Shim SHDShim

View GitHub Profile
@SHDShim
SHDShim / ase_cif.md
Last active January 13, 2024 22:48
CIF for ASE from CrystalMaker

Fix ASE problem for reading CIF

Insert the following lines to avoid error in reading CIF from ASE when you make a cif file from CrystalMaker.

_symmetry_space_group_name_H-M    "P 1"
_symmetry_int_tables_number       1

Space group number can be found in: https://en.wikipedia.org/wiki/List_of_space_groups

@SHDShim
SHDShim / folders.md
Last active January 13, 2024 22:50
Add favorite folders in bash_profile

To make a shortcut to favorite folders in Mac OS

Place the following lines in .bash_profile.

X, Y, Z = change to your folder names.

# define favorite paths
if [ -f /etc/bash_completion ]; then
 . /etc/bash_completion
@SHDShim
SHDShim / make_editable_pdf.md
Last active January 13, 2024 22:52
matplotlib output PDF editable illustrator
@SHDShim
SHDShim / pip_force.md
Created July 3, 2019 02:59
Force reinstall using PIP

Force reinstall pip package

pip install -I <package>

or

pip install --ignore-installed <package>
@SHDShim
SHDShim / env_req.md
Created April 16, 2019 04:24
How to package a conda environment (environment.yml or requirements.txt)

Installing/Packaging with requirements.txt

create an environment from requirements.txt

conda create --name <env_name> --file requirements.txt

make a requirements.txt

@SHDShim
SHDShim / nikola_conda.md
Last active April 15, 2019 03:11
How to install Nikola in conda

How to install Nikola in conda

conda create -n nikola python=3.6 lxml docutils Pillow MarkupSafe mako Pygments six python-dateutil cloudpickle requests unidecode natsort decorator traitlets tornado ptyprocess pexpect pickleshare appnope simplegeneric wcwidth ipython pyzmq jupyter ipykernel Jinja2 Markdown PyYAML mistune html5lib bleach jsonschema nbformat entrypoints nbconvert terminado notebook watchdog macfsevents

then activate the new environment

conda activate nikola
@SHDShim
SHDShim / jupyter_blog.md
Last active April 15, 2019 05:20
Building Jupyter blog using Nikola
@SHDShim
SHDShim / pip_install_c_problem.md
Last active July 3, 2019 02:57
What to do if pip fails because of c compile problem in MacOS

If pip fails because of c compile problem in MacOS

Remove gcc in conda and run pip. gcc should be removed from the base environment.

Also, run the following in the terminal for updating xcode.

sudo open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
@SHDShim
SHDShim / new_package_reload.md
Created December 6, 2018 17:14
reload jupyter for new packages

Magic commands for autoreloading packages

%load_ext autoreload
%autoreload 2
@SHDShim
SHDShim / kernel_jupyter.md
Last active June 26, 2021 23:25
Setup a new Kernel in Jupyter for a conda env

How to add/remove a kernel in Jupyter from a conda environment

How to add a kernel

conda activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"

If ipykernel was not found: