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
| def calc_moving_avg_std(x, window=10): | |
| """ | |
| Calculates the moving average and standard deviation along the window | |
| Parameters | |
| ---------- | |
| x : array | |
| window : int (default=10) | |
| Window size | |
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
| def convert_dict_keys_to_numpy(dictionary): | |
| """ | |
| Converts each element in dictionary to numpy array | |
| Parameters: | |
| ---------- | |
| dictionary : dict | |
| Dictionary where each element is a list that must be converted to array | |
| Returns: |
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 matplotlib.pyplot as plt | |
| fig, axes = plt.subplots(3, 4, sharex=True, sharey=True) | |
| # add a big axes, hide frame | |
| fig.add_subplot(111, frameon=False) | |
| # hide tick and tick label of the big axes | |
| plt.tick_params(labelcolor='none', top='off', bottom='off', left='off', right='off') | |
| plt.xlabel("common X") | |
| plt.ylabel("common Y") | |
| plt.show() |
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 matplotlib.pyplot as plt | |
| fig, axes = plt.subplots(3, 4, sharex=True, sharey=True) | |
| # add a big axes, hide frame | |
| fig.add_subplot(111, frameon=False) | |
| # hide tick and tick label of the big axes | |
| plt.tick_params(labelcolor='none', top='off', bottom='off', left='off', right='off') | |
| plt.xlabel("common X") | |
| plt.ylabel("common Y") | |
| plt.show() |
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
| print 'test gist' |
NewerOlder