From 77e5010f22b412bfcf5ea179bda0bdadba39578b Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Thu, 24 Dec 2020 00:53:55 +0100 Subject: [PATCH] update .xonshrc --- .xonshrc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.xonshrc b/.xonshrc index 237f917..e3ccdc8 100644 --- a/.xonshrc +++ b/.xonshrc @@ -2,8 +2,14 @@ $PROMPT = '{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} ' # XONSH WEBCONFIG END -# env +# plugins +xontrib load pipeliner +xontrib load sh +xontrib load onepath +$XONTRIB_ONEPATH_ACTIONS[''] = 'vim' # Yes, I don't trust auto-exec +xontrib load ssh_agent +# env $PATH.insert(0, $HOME+'/bin') $PATH.insert(0, $HOME+'/bin') $PATH.insert(0, $HOME+'/.local/bin') @@ -15,6 +21,7 @@ $DATA = '/media/me/dataDrive' $UPDATE_OS_ENVIRON = True $PROMPT = '{env_name}{BOLD_INTENSE_PURPLE}{user}@{hostname}{BOLD_INTENSE_YELLOW} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_INTENSE_YELLOW}{prompt_end}{RESET} ' +$XONTRIB_SH_SHELLS = ['bash', 'sh'] if ${...}.get('XDG_CURRENT_DESKTOP', '') != "KDE" and \ ${...}.get('XDG_CURRENT_DESKTOP', '') != "GNOME": @@ -53,3 +60,16 @@ aliases['config'] = '/usr/bin/git --git-dir=/home/me/.cfg/ --work-tree=/home/me' # fix some shit aliases["alsamixer"] = "$[/usr/bin/alsamixer]" + +# python utils :) +import matplotlib.pyplot as plt +import numpy as np + +def plot(f, a:float=0.0, b:float=10.0, n:int=300): + """ Plot the function f between a and b with an + accuracy of n points. + """ + x = np.linspace(a, b, n) + plt.plot(x, list(map(f, x))) + plt.show() +