Skip to content

Instantly share code, notes, and snippets.

@fladd
fladd / .vimrc
Last active March 7, 2021 21:42
" Title: .vimrc
" Author: Florian Krause <florian.krause@fladd.de>
" Date: 2021-03-07
" " GLOBAL SETTINGS
"
if has('win32') || has ('win64')
let $VIMHOME = $HOME."/vimfiles"
else
class TreeviewTooltip:
def __init__(self, treeview, texts=[]):
self._treeview = treeview
self._texts = texts
self._tooltip_window = None
self._tooltip_x = self.tooltip_y = 0
self._last_idd = self._last_col = None
self._waittime = 500
self._id = None
@fladd
fladd / show_progress.md
Last active October 19, 2021 10:05
Show the progress of a process with a simple text-based progress bar

show_progress

Show the progress of a process with a simple text-based progress bar

Code

def show_progress(progress, info="", length=40, symbols="[= ]", decimals=1):
    """Show the progress of a process with a simple text-based progress bar.

    Parameters
    ----------
@fladd
fladd / changing_image_luminance.md
Last active February 2, 2022 01:42
Change the luminance of an image

Changing the luminance of an image

The following Python script allows to change the (overall) luminance of an image. This can be interesting when trying to match the luminance of several images (to their mean luminance for instance).

def change_image_luminance(image, luminance, precision=4):
    """Change the luminance of an image.

    Parameters
    ----------
@fladd
fladd / SPM_vs_FSL.ipynb
Last active February 6, 2024 11:48
Comparing GLM modelling approaches of SPM and FSL
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fladd
fladd / young_neurolabnl_matrix.md
Last active April 3, 2024 10:45
Young NeurolabNL on Matrix

Young NeurolabNL on Matrix

What is Matrix?

Matrix is a free standard and protocol for secure decentralised (real-time) communication. Think of it as the chat equivalent to email. As with email, decentralisation here means that there is no single provider/server who provides/owns the network (like with Slack for instance), but that there are multiple providers/servers on an open and interconnected network who can all talk to each other (just like you can send an email from your university email account to, for instance, a Google Gmail address). For more information have a look at the Matrix website.

The people who created Matrix also run the flagship implementationd of software to connect to the Matrix network, named Element (but there are many alternative implementations). Note that the Element website also provides professional/commercial hosting for Matrix servers (the equivalent to running your own email server), but this i

Young NeurolabNL @ Matrix

Get on board our new online community on Matrix:

  1. Enter the free, open and secure Matrix, for instance with Element
  2. Join us at #young-neurolabnl:matrix.org

More information and detailed instructions are available here.