This file contains hidden or 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
#!/bin/bash | |
# Replaces annoying "fancy" quotes created by programs like Microsoft Word and everything in MacOS | |
# with normal ASCII single-quotes (') or double-quotes (") | |
# This script does NOT replace the GRAVE ACCENT (`) since it is commonly used in Markdown and as a bash command | |
# See: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html | |
SINGLE=$(echo -ne '\u00B4\u2018\u2019') | |
DOUBLE=$(echo -ne '\u201C\u201D') | |
sed -i "s/[$SINGLE]/'/g; s/[$DOUBLE]/\"/g" $1 |
This file contains hidden or 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 | |
def array_for_sliding_window(x, wshape): | |
"""Build a sliding-window representation of x. | |
The last dimension(s) of the output array contain the data of | |
the specific window. The number of dimensions in the output is | |
twice that of the input. | |
Parameters |