Main public logs
From Master of Neuroscience Wiki
Combined display of all available logs of Master of Neuroscience Wiki. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).
- 09:55, 21 October 2025 Davrot talk contribs created page File:20 4.png
- 09:55, 21 October 2025 Davrot talk contribs uploaded File:20 4.png
- 09:54, 21 October 2025 Davrot talk contribs created page File:20 3.png
- 09:54, 21 October 2025 Davrot talk contribs uploaded File:20 3.png
- 09:54, 21 October 2025 Davrot talk contribs created page File:20 2.png
- 09:54, 21 October 2025 Davrot talk contribs uploaded File:20 2.png
- 09:52, 21 October 2025 Davrot talk contribs created page File:Data augmentation test image.jpg
- 09:52, 21 October 2025 Davrot talk contribs uploaded File:Data augmentation test image.jpg
- 09:51, 21 October 2025 Davrot talk contribs created page Data augmentation (Created page with "What is available as data augmentation methods in torchvision? Questions to [mailto:davrot@uni-bremen.de David Rotermund] Initial Image: Initial Image Photo by Udo Ernst == Loading an example image (with opencv2) == Load it via [https://docs.opencv.org/4.5.3/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56 cv2.imread( filename[, flags]) -> retval]<syntaxhighlight lang="python">import cv2 import matplotlib....") Tag: Visual edit
- 09:51, 21 October 2025 Davrot talk contribs created page File:20 1.png
- 09:51, 21 October 2025 Davrot talk contribs uploaded File:20 1.png
- 09:50, 21 October 2025 Davrot talk contribs created page File:20 0.png
- 09:50, 21 October 2025 Davrot talk contribs uploaded File:20 0.png
- 09:48, 21 October 2025 Davrot talk contribs created page Interfacing Data (Created page with "We need to handle our data and make it accessible for PyTorch. Questions to [mailto:davrot@uni-bremen.de David Rotermund] There are options to interface your data. == [https://pytorch.org/docs/stable/data.html#torch.utils.data.TensorDataset torch.utils.data.TensorDataset] == <syntaxhighlight lang="python">CLASS torch.utils.data.TensorDataset(*tensors)</syntaxhighlight><blockquote>Dataset wrapping tensors. Each sample will be retrieved by indexing tensors along the fi...") Tag: Visual edit
- 09:47, 21 October 2025 Davrot talk contribs created page Converting the original MNIST files into numpy (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''I will use Linux. You will need a replacement for gzip under Windows.''' == Download the files == We need to download the MNIST database files * t10k-images.idx3-ubyte.gz * t10k-labels.idx1-ubyte.gz * train-images.idx3-ubyte.gz * train-labels.idx1-ubyte.gz A source for that is for example https://www.kaggle.com/datasets/hojjatk/mnist-dataset?resource=download == Unpack the gz files == In a terminal:<synta...") Tag: Visual edit
- 09:46, 21 October 2025 Davrot talk contribs created page Get CUDA ready! (Created page with "Convince PyTorch and Nvidia’s GPUs working together. '''I assume you installed the PyTorch and/or TensorFlow version for CUDA. (see Python installation instructions on this site…)''' Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Windows / Linux == * Download and install [https://developer.nvidia.com/cuda-downloads CUDA driver] * Download and install [https://developer.nvidia.com/rdp/cudnn-download cuDNN toolkit] (you will need to create an account...") Tag: Visual edit
- 09:35, 21 October 2025 Davrot talk contribs created page How to read a webcam with CV2 (Created page with "We want to capture the webcam via CV2. Questions to [mailto:davrot@uni-bremen.de David Rotermund]<syntaxhighlight lang="shell">pip install opencv-contrib-python</syntaxhighlight><syntaxhighlight lang="python">import numpy as np import cv2 def record_video( camera_index: int, n_frames: int, fps: float = 20.0, framesize: tuple[int, int] = (640, 480), display: bool = False, ) -> tuple[bool, np.ndarray]: cap = cv2.VideoCapture(camera_index) asse...") Tag: Visual edit
- 09:30, 21 October 2025 Davrot talk contribs created page OpenCV2: Play, write, read a video (Created page with "How to playback a video? Howto save it into a mp4 file? Howto load from a mp4 file? Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Write the video into a mp4 file == <syntaxhighlight lang="python"> import numpy as np import cv2 # type: ignore import tqdm # type: ignore def write_video(frames: np.ndarray, filename: str = "test", fps: float = 20.0) -> None: assert len(filename) > 0, "write_video: Filename is empty." assert frames.size > 0, "wri...") Tag: Visual edit
- 09:27, 21 October 2025 Davrot talk contribs created page Austin: Time and memory profiling (Created page with "We want to see where your Python program requires the most processing time and memory. For this we will use a time- and memory profiler called Austin. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Installing Austin == Obviously, first we need to get [https://github.com/p403n1x87/austin Austin]. On the Austin website, there a several methods described how to install it. === Linux as user === Compiling<syntaxhighlight lang="shell">git clone --depth=1 htt...") Tag: Visual edit
- 09:27, 21 October 2025 Davrot talk contribs created page File:19 2.png
- 09:27, 21 October 2025 Davrot talk contribs uploaded File:19 2.png
- 09:27, 21 October 2025 Davrot talk contribs created page File:19 1.png
- 09:27, 21 October 2025 Davrot talk contribs uploaded File:19 1.png
- 09:26, 21 October 2025 Davrot talk contribs created page File:19 0.png
- 09:26, 21 October 2025 Davrot talk contribs uploaded File:19 0.png
- 09:26, 21 October 2025 Davrot talk contribs created page File:19 3.png
- 09:26, 21 October 2025 Davrot talk contribs uploaded File:19 3.png
- 09:25, 21 October 2025 Davrot talk contribs created page File:19 4.png
- 09:25, 21 October 2025 Davrot talk contribs uploaded File:19 4.png
- 09:24, 21 October 2025 Davrot talk contribs created page ZeroMQ: Microservices as well as connecting computers via message queue (Created page with "[https://zeromq.org/get-started/ ZeroMQ] is a simple to implement way to transfer data between server & client application. It is available for a vast range of programming languages. Including Python [https://pyzmq.readthedocs.io/en/latest/index.html PyZMQ]. It has a [https://zguide.zeromq.org/ lot of options], including broadcasting. I will only present a very simple example because most of it we don’t need. Questions to [mailto:davrot@uni-bremen.de David Roterm...") Tag: Visual edit
- 09:22, 21 October 2025 Davrot talk contribs created page Psutil vs os.cpu count: How many "CPUs" do I have? (Created page with "How man “CPUs” do I have in this computer? We need this information for multi-processing. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == os.cpu_count == We get the core count inclusive the virtual hyper threading cores. But it is included in Python:<syntaxhighlight lang="python">import os # If -1 then it looks up the amount of available CPU HT cores number_of_cpu_processes: int = -1 number_of_cpu_processes_temp = os.cpu_...") Tag: Visual edit
- 09:21, 21 October 2025 Davrot talk contribs created page Argh: Organize your command line arguments (Created page with "Argh helps to handle command line arguments in a big way. Don’t use the build-in Python stuff for that. Questions to [mailto:davrot@uni-bremen.de David Rotermund]<syntaxhighlight lang="shell">pip install argh</syntaxhighlight> == Simple example == === No argument is required === The arguments are now only optional for the function call:<syntaxhighlight lang="python">import argh def main(first_parameter: int = 1, second_parameter: int = 2, third_parameter: bool = T...") Tag: Visual edit
- 09:20, 21 October 2025 Davrot talk contribs created page TQDM: Make your progress visible (Created page with "[https://tqdm.github.io/ TQDM] : Introducing a nice progress bar for for loops. Questions to [mailto:davrot@uni-bremen.de David Rotermund]<syntaxhighlight lang="shell">pip install tqdm</syntaxhighlight> == trange == You can just replace range by trange:<syntaxhighlight lang="python">from tqdm import trange import time for i in trange(0, 10): time.sleep(1)</syntaxhighlight><syntaxhighlight lang="python"> 30%|███ | 3/10 [00:03<00:07, 1.12s/it]</syntaxhi...") Tag: Visual edit
- 09:16, 21 October 2025 Davrot talk contribs created page Linearize the spectral coherence (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] Let us assume we have two time series (white in spectrum) <math display="inline">x_1(t)</math> and <math display="inline">x_2(t)</math>. Both are linearly mixed together via a mixing coefficient <math display="inline">\alpha</math>: <math display="block">y(t) = (1- \alpha) x_1(t) + \alpha * x_2(t)</math> Wouldn’t it to be nice if the spectral coherence would be <math display="inline">\alpha</math>? For whit...") Tag: Visual edit
- 09:15, 21 October 2025 Davrot talk contribs created page File:18 0.png
- 09:15, 21 October 2025 Davrot talk contribs uploaded File:18 0.png
- 09:14, 21 October 2025 Davrot talk contribs created page Instantanious Spectral Coherence (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Test data == <syntaxhighlight lang="python">import numpy as np import matplotlib.pyplot as plt dt: float = 1.0 / 1000.0 # I want more trials f_base: float = 50 f_delta: float = 1 rng = np.random.default_rng(1) n_t: int = 1000 n_trials: int = 1 t: np.ndarray = np.arange(0, n_t) * dt amplitude: float = 0.75 x = dt * 2.0 * np.pi * (f_base + f_delta * 2 * (rng.random((n_t, n_trials)) - 0.5)) x = np.cumsum(x,...") Tag: Visual edit
- 09:14, 21 October 2025 Davrot talk contribs created page File:17 3.png
- 09:14, 21 October 2025 Davrot talk contribs uploaded File:17 3.png
- 09:13, 21 October 2025 Davrot talk contribs created page File:17 2.png
- 09:13, 21 October 2025 Davrot talk contribs uploaded File:17 2.png
- 09:13, 21 October 2025 Davrot talk contribs created page File:17 1.png
- 09:13, 21 October 2025 Davrot talk contribs uploaded File:17 1.png
- 09:12, 21 October 2025 Davrot talk contribs created page File:17 0.png
- 09:12, 21 October 2025 Davrot talk contribs uploaded File:17 0.png
- 09:10, 21 October 2025 Davrot talk contribs created page PyWavelets: Wavelet Transforms in Python (Created page with "How do we do wavelet transforms under Python? Questions to [mailto:davrot@uni-bremen.de David Rotermund] You might want to read: [https://paos.colorado.edu/research/wavelets/ A Practical Guide to Wavelet Analysis] -> [https://paos.colorado.edu/research/wavelets/bams_79_01_0061.pdf PDF]<syntaxhighlight lang="shell">pip install PyWavelets</syntaxhighlight> == Which [https://pywavelets.readthedocs.io/en/latest/ref/cwt.html#continuous-wavelet-families continuous moth...") Tag: Visual edit
- 09:09, 21 October 2025 Davrot talk contribs created page File:16 8.png
- 09:09, 21 October 2025 Davrot talk contribs uploaded File:16 8.png
- 09:09, 21 October 2025 Davrot talk contribs created page File:16 7.png
- 09:09, 21 October 2025 Davrot talk contribs uploaded File:16 7.png