- Connect to your EC2 instance
- Install zsh :
sudo apt-get update && sudo apt-get install zsh
- Edit your passwd configuration file to tell which shell to use for user
ubuntu
:sudo vim /etc/passwd
- Look for
ubuntu
user, and replacebin/bash
bybin/zsh
- Install OhMyZsh :
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
- Disconnect from your instance and reconnect it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
def print_confusion_matrix(confusion_matrix, class_names, figsize = (10,7), fontsize=14): | |
"""Prints a confusion matrix, as returned by sklearn.metrics.confusion_matrix, as a heatmap. | |
Note that due to returning the created figure object, when this funciton is called in a | |
notebook the figure willl be printed twice. To prevent this, either append ; to your | |
function call, or modify the function by commenting out the return expression. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from tensorflow import keras | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras import backend as K | |
def cosine_decay_with_warmup(global_step, | |
learning_rate_base, | |
total_steps, |
I was building up a small library of css snippets, and mixing and matching via copy-paste was getting tiresome.
So, I knocked myself up a little solution using https://sass-lang.com/
To use this solution, you need to follow the instructions on the website to install the SASS command line utility.
For my purposes, I created a subfolder in my Obsidian vault called ./.themes
where my obsidian.scss
file lives.
I also created a subfolder for mixins (./.themes/mixins
) containing small snippets like "Andy Matuschak" mode and collapsing sidebars (and my preferred custom colours for my Base2Tone theme)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name Monokai for Observable | |
@namespace github.com/openstyles/stylus | |
@version 1.0.0 | |
@description Overrides the Observable CodeMirror theme with Monokai. | |
@author - | |
==/UserStyle== */ | |
@-moz-document domain("observablehq.com") { | |
/* Based on Sublime Text's Monokai theme */ |