Skip to content

Instantly share code, notes, and snippets.

@oryon-dominik
Last active December 20, 2021 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oryon-dominik/6dfe00cf4bd4498f014ce73bcd8847ae to your computer and use it in GitHub Desktop.
Save oryon-dominik/6dfe00cf4bd4498f014ce73bcd8847ae to your computer and use it in GitHub Desktop.
python snippets
{
// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"TODO": {
"prefix": "todo",
"body": ["# TODO: $CURRENT_MONTH_NAME $CURRENT_DATE, $CURRENT_YEAR: "
],
"description": "Add TODO"
},
"DEBUG": {
"prefix": "debug",
"body": ["print(f'>>> DEBUG: {None}')"
],
"description": "Add DEBUG-Statement"
},
"SHEBANG": {
"prefix": "shebang",
"body": ["#!/usr/bin/env python",
"# coding: utf-8"
],
"description": "Add SHEBANG"
},
"DATA": {
"prefix": "data",
"body": ["import pandas as pd",
"import numpy as np",
"import matplotlib.pyplot as plt",
"import seaborn",
"",
"data_path = '/'",
],
"description": "Adds Data-Science imports"
},
"MODULE": {
"prefix": "module",
"body": ["'''",
"Title & Description...",
"'''",
"",
"__version__ = '0.0.1'",
"__author__ = 'oryon/dominik'",
"__date__ = '$CURRENT_MONTH_NAME $CURRENT_DATE, $CURRENT_YEAR'",
"__updated__ = '$CURRENT_MONTH_NAME $CURRENT_DATE, $CURRENT_YEAR'",
],
"description": "Adds Module-Docstring for file, version, author & date"
},
"TODAY": {
"prefix": "today",
"body": ["'$CURRENT_MONTH_NAME $CURRENT_DATE, $CURRENT_YEAR'",
],
"description": "Adds today Date"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment