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
# -*- coding: utf-8 -*- | |
""" | |
Minimal-code rewriting of BrainDecode's | |
https://braindecode.org/stable/auto_examples/applied_examples/plot_sleep_staging_chambon2018.html | |
https://github.com/braindecode/braindecode/blob/master/examples/applied_examples/plot_sleep_staging_chambon2018.py | |
It | |
- Eliminates all (explicit) dependence on `braindecode` |
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
# -*- coding: utf-8 -*- | |
"""Skip to "Configure" section. | |
Install the zip (URL below), unzip, put in path. | |
pip install cmap | |
or | |
conda install -c conda-forge cmap | |
""" | |
# https://github.com/OverLordGoldDragon/ssqueezepy/files/13063053/jtfs_fbank.zip |
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 | |
import matplotlib.pyplot as plt | |
from ssqueezepy import ssq_cwt, issq_cwt, TestSignals, icwt | |
from ssqueezepy.visuals import plot, imshow | |
from PIL import Image | |
N = 7000 | |
Npad = 8192 | |
x = TestSignals().echirp(N=N, fmin=64, fmax=512)[0] | |
x = np.pad(x, (Npad - N)//2) |
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
# -*- coding: utf-8 -*- | |
"""README | |
**Requirements** | |
Python 3, `steam` package (!pip install steam). Steam itself is *not* required. | |
**Usage** | |
In Python terminal: | |
python path/steamlog.py --servers="name1 name2" --stats="players map" --savepath="path/logs.csv" --appid=224260 --interval=600 |
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
from keras.layers import Input, Dense, LSTM, Conv1D, Activation | |
from keras.layers import Dropout, AlphaDropout, BatchNormalization | |
from keras.layers import GlobalAveragePooling1D, Reshape, multiply | |
from keras.models import Model | |
import keras.backend as K | |
import numpy as np | |
import matplotlib.pyplot as plt | |
############################################################################# |
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
from tensorflow.python.framework import ops | |
from tensorflow.python.keras import backend_config | |
from tensorflow.python.keras.optimizer_v2 import optimizer_v2 | |
from tensorflow.python.ops import array_ops, control_flow_ops, math_ops, state_ops | |
from tensorflow.python.util.tf_export import keras_export | |
import keras.backend as K | |
@keras_export('keras.optimizers.Adam') | |
class Adam(optimizer_v2.OptimizerV2): |