Jitesh Gosar
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in xterm-color|*-256color) color_prompt=yes;; esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # We have color support; assume it's compliant with Ecma-48 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such # a case would tend to support setf rather than setaf.) color_prompt=yes else color_prompt= fi fi if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" ;; *) ;; esac # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi # colored GCC warnings and errors #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # some more ls aliases alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi # bashrc export PATH="/usr/share/dotnet:$PATH" export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" if command -v pyenv 1>/dev/null 2>&1; then eval "$(pyenv init -)" fi # Cuda export CUDAHOME=/usr/local/cuda-11.1 export PATH=${CUDAHOME}/bin:${CUDAHOME}/NsightCompute-2019.3${PATH:+:${PATH}} export LD_LIBRARY_PATH=${CUDAHOME}/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} # Export paths export nagoya_home=/home/doors export dataset=/home/jitesh/detectron_tutorial/dataset export dl=/home/jitesh/Downloads export nddscontent=/home/jitesh/3d/Dataset_Synthesizer/Source/Content export nddsplug=/home/jitesh/3d/Dataset_Synthesizer/Source/Plugins/DomainRandomizationDNN/Content export FAIRMOT_ROOT=/home/jitesh/prj/FairMOT # Unreal Engine UE_HOME=/home/jitesh/3d/UnrealEngine function unrealbuild { CURR_DIR=`pwd`; PROJ_NAME=$(basename ${1%.uproject}); $UE_HOME/Engine/Build/BatchFiles/Linux/Build.sh $PROJ_NAME Linux Development -editorrecompile "${CURR_DIR}/${PROJ_NAME}.uproject" -progress -editor -game -NoHotReloadFromIDE } complete -f -X '!*.@(uproject)' unrealbuild function unrealeditor { DIR="$( cd "$( dirname "$i" )" && pwd )" $UE_HOME/Engine/Binaries/Linux/UE4Editor $DIR/$1 } complete -f -X '!*.@(uproject)' unrealeditor function unrealgen { DIR="$( cd "$( dirname "$i" )" && pwd )" pushd $UE_HOME ./GenerateProjectFiles.sh -project="$DIR/$1" -game -engine -editor popd } complete -f -X '!*.@(uproject)' unrealgen # For automation tests, if used function unrealtest { DIR="$( cd "$( dirname "$i" )" && pwd )" $UE_HOME/Engine/Binaries/Linux/UE4Editor $DIR/$1 -Game -ExecCmds="Automation RunTests $2" -log } complete -f -X '!*.@(uproject)' unrealtest # Zip into parts slack_zip(){ tar cvzf - $1| split --bytes=950MB - $(basename $1).tar.gz. } zip_targz_in_parts() { # Example: $1=dataset_dir $2=. $3=200MB tar cvzf - $1 | split -b $3 - $(realpath -s $2)/$(basename $1).tar.gz. } unzip_targz_parts() { cat ${1}.* | tar xzvf - } # tar_compress tar_compress() { tar cvzf $(basename $1).tar.gz $1 } tar_extract() { tar xvzf $1 } # zip_slack zip_slack() { CHECK="`du -hs --block-size=M $1`" CHECK=${CHECK%M*} if (($(echo "$CHECK > "999"" |bc -l) )); then echo "big" tar cvzf - $1| split --bytes=950MB - $(basename $1).tar.gz. else echo "small" tar cvzf $(basename $1).tar.gz $1 fi } # NDDS output data postprocessing postprocessing_data.() { /home/jitesh/3d/venv/bin/python /home/jitesh/3d/data/src/data_postprocessing.py -f $1 -c $2 } # Reinstall a repository from PT-ML install-from-pt() { pip install https://github.com/PT-ML/$(basename $1).git } # Reinstall a repository from cm107 reinstall() { pip uninstall $1 pip install https://github.com/cm107/$(basename $1)/archive/master.zip } reinstall.all() { pip uninstall annotation_utils common_utils logger streamer pip install https://github.com/cm107/annotation_utils/archive/master.zip pip install https://github.com/cm107/common_utils/archive/master.zip pip install https://github.com/cm107/logger/archive/master.zip pip install https://github.com/cm107/streamer/archive/master.zip } install-cm-all() { gitcon git clone https://github.com/cm107/annotation_utils.git git clone https://github.com/cm107/common_utils.git git clone https://github.com/cm107/logger.git git clone https://github.com/cm107/streamer.git } alias uninstall-cm='pip uninstall annotation_utils common_utils logger streamer' # Copy multiple times copy2multiple() { tee <(basename $1).png o{$2..$3}.png >/dev/null } # Make a new folder folder() { mkdir $1 && cd $1 } # Replace a string in multiple files replace-in-files() { sed -i 's/$1/$2/g' $3 } # Connecting Diff Server alias diff="sshpass -p 'pas' ssh doors@172.xx.xx.xxx -X" copy_to_diff_server() { scp -r $1 doors@172.xx.xx.xxx:$2 } copy_from_diff_server() { scp -r doors@172.xx.xx.xxx:$1 $2 } # Reinstall a repository from cm107 reinstall() { pip uninstall $1 pip install pyclay-$(basename $1) } reinstall.all() { yes | pip uninstall pyclay-annotation_utils pyclay-common_utils pyclay-logger pyclay-streamer pip install pyclay-annotation_utils pip install pyclay-common_utils pip install pyclay-logger pip install pyclay-streamer } # Copy multiple times copy2multiple() { tee <(basename $1).png o{$2..$3}.png >/dev/null } # Make a new folder folder() { mkdir $1 && cd $1 } # Replace a string in multiple files replace-in-files() { sed -i 's/$1/$2/g' $3 } nvdu(){ current_path="`pwd`" cd ~/3d venv cd $current_path nvdu_viz } mp4_2_gif() { ffmpeg -i $1.mp4 $1.gif } # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/jitesh/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/home/jitesh/miniconda3/etc/profile.d/conda.sh" ]; then . "/home/jitesh/miniconda3/etc/profile.d/conda.sh" else export PATH="/home/jitesh/miniconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<< export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" if command -v pyenv 1>/dev/null 2>&1; then eval "$(pyenv init -)" fi upload_graph() { ts python upload_events.py --folder $1 } export HARUHOME="/home/haru" # # doc-18 Unity-Ros interaction # ## My PC # export ROS_MASTER_URI=http://$HOSTNAME:11311 # export ROS_HOSTNAME=$HOSTNAME # export ROS_IP=$(ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}') ### Use Real Haru export ROS_MASTER_HOSTNAME="haru-47" export ROS_MASTER_URI=http://$ROS_MASTER_HOSTNAME:11311/ export MY_IP=$(ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}') export ROS_IP=$MY_IP export ROS_HOSTNAME=$ROS_IP alias connect-haru="ssh haru@$ROS_MASTER_HOSTNAME" alias connect-har="sshpass -p haru ssh haru@$ROS_MASTER_HOSTNAME" # Make a new folder folder() { mkdir $1 && cd $1 } # Replace a string in multiple files replace-in-files() { sed -i 's/$1/$2/g' $3 } copy_file_from_haru() { scp haru@haru-29:$1 $2 } copy_file_to_haru() { scp $1 haru@haru-29:$2 } ros-source() { source "/home/jitesh/workspaces/$1_ws/devel/setup.bash" } convert-mov-to-webm() { IFS="." read -a strarr <<< "$1" echo "Converting from $1 to ${strarr[0]}.webm" mkdir webm # ffmpeg -i "$1" -c:v libvpx-vp9 -crf 33 -b:v 0 -speed 4 "${strarr[0]}.webm" yes | ffmpeg -i "$1" -c:v libvpx -quality good -cpu-used 0 -b:v 7000k -qmin 10 -qmax 42 -maxrate 500k -bufsize 1500k -threads 8 -vf scale=-1:1080 -c:a libvorbis -b:a 192k -f webm "${strarr[0]}.webm" mv "${strarr[0]}.webm" webm/ echo "Moved ${strarr[0]}.webm to webm/ directory" } convert-all-mov-to-webm() { for file in $1/*.mov do convert-mov-to-webm "$file" done } branch-list() { local base_path="${1:-.}" find $base_path -type d -name '.git' -exec echo {} \; -exec git -C {} branch \; } all-git-branch() { local base_path="${1:-.}" find $base_path -type d -name '.git' -exec echo {} \; -exec git -C {} branch \; } all-git-pull() { local base_path="${1:-.}" find $base_path \ -maxdepth 2 -type d \ -name ".git" \ -execdir python -c 'import os; print(os.path.abspath("."))' \; \ -execdir git branch \; \ -execdir git pull \; } # Android export JAVA_HOME="$HOME/JDK/jdk-11.0.18" export ANDROID_HOME="$HOME/Android" export ANDROID_SDK_ROOT="$HOME/Android/Sdk" PATH="$JAVA_HOME/bin:$ANDROID_SDK_ROOT:$ANDROID_HOME/Sdk/cmdline-tools:$ANDROID_HOME/Sdk/platform-tools:$PATH"

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully