Skip to content

Instantly share code, notes, and snippets.

@alhoo
alhoo / audio_predict.py
Last active February 1, 2019 15:58
Predict next audio frame
"""
!pip install matplotlib scipy numpy keras python_speech_features
"""
import scipy
import scipy.io.wavfile
from python_speech_features import mfcc
from matplotlib import pyplot as plt
import numpy as np
from keras.layers import Dense, Input, CuDNNLSTM, TimeDistributed
@alhoo
alhoo / Xerox Phaser 6010N
Last active June 12, 2024 21:22
Install Xerox Phaser 6010N on Ubuntu 64bit 16.04 and 18.04
# Xerox Phaser 6010N
Xerox Phaser 6010N on Ubuntu 64bit 16.04, 18.04 and 20.04
```bash
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 libcupsimage2:i386
# Download the [.DEB driver](https://www.support.xerox.com/support/phaser-6010/downloads/enus.html?operatingSystem=linux&fileLanguage=en) that Xerox supplies.
@alhoo
alhoo / bashrc
Last active May 11, 2019 05:04
bashrc PS1
# support cd .....
cd () {
if [ $# -eq 1 ] && [ "${1:0:3}" == "..." ]; then
for ((i=1; i<=${#1} - 1; i++)); do
builtin cd ..;
done;
pwd;
else
builtin cd "$@"
fi
@alhoo
alhoo / dualboot encrypted ubuntu 18.04.md
Created July 25, 2018 08:42
Installing ubuntu 18.04 alongside windows

Preparations in windows

  • Shrink windows to free up some space for the ubuntu installation

Installing ubuntu 18.04

  • boot from the live-cd
  • create partitions for the luks storage and /boot
  • cryptsetup a new luks partition
  • launch disks