# create a new directory for all your virtual environments, preferably in your home folder
mkidr environments
Add the below function to your bashrc or zshrc
create_venv(){
# check if folder exist
""" | |
Learning Task: | |
Given a sequence, predict a label based on the first value of the sequence | |
Explanation of stateful LSTM and setup: | |
http://philipperemy.github.io/keras-stateful-lstm/ | |
Exmple: | |
given a sequence [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], predict 1 | |
given a sequence [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], predict 0 |
#!/usr/bin/env python3 | |
# | |
# Use py.test: | |
# $ py.test test_mock.py | |
from unittest.mock import patch | |
import os.path | |
def my_isfile(filename): |
The script below will allow you to run gui programs from crontab
usage: * * * * /path/to/belowcode.sh "gui application"
#!/bin/bash
# Check whether the user is logged in Mate
#!/bin/bash
stats=””
echo "% user"
echo "============"
# collect the data
for user in `ps aux | grep -v COMMAND | awk '{print $1}' | sort -u`
do
dmesg -T| grep -E -i -B100 'killed process'
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
alias git-tree='git log --oneline --decorate --all --graph'