Skip to content

Instantly share code, notes, and snippets.

View AtmaMani's full-sized avatar

Atma Mani AtmaMani

View GitHub Profile
@AtmaMani
AtmaMani / dsx-snippets.md
Last active September 18, 2020 20:39
DSX snippets

Jupyter tricks

Creating note cells

<div class="alert alert-info">
    <b>Note:</b> If you are running this guide in an environment <b>without <code>arcpy</code></b>, you can comment out the line that imports it and proceed with the guide. The Python API will look for <code>shapely</code> library and use it for geometry operations.
</div>

Embed Python API map widgets within HBox and VBox

@AtmaMani
AtmaMani / custom.bashprofile.md
Last active October 11, 2019 20:51
Mac terminal bash profile

Tell ls to be colorful

export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'

To display git repo status with colors and branch name

parse_git_branch() {
@AtmaMani
AtmaMani / bash_commands.md
Last active December 2, 2022 05:10
Bash commands

Frequently used bash commands

Recursively list or count files of a particular extension

To search for all notebook files: find . -type f -name "*.ipynb" | wc -l will return the count in all subdirectories.

To just list the files, do: find . -type f -name "*.ipynb"

Compress and archive a directory

@AtmaMani
AtmaMani / zshrc.md
Last active October 23, 2020 23:00
custom-zsh-profile.md

Newer Mac OS uses ZSH instead of bash. This wiki will talk through setting it up with nice features such as autocomplete, colorized ls, git & conda aware prompts etc.

Steps

  1. After upgrading to zsh, confirm you have it by typing zsh in terminal.
  2. Install a framework such as Oh my zsh which will simplify the whole process. Rest of steps assume you have it running. As of today, you can install it by running

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)".

Restart terminal.