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 os | |
import re | |
import subprocess as sp | |
import argparse | |
''' | |
Script to automatize mapping neuroimaging data from volumes (NIfTI) to brain | |
surface (workbench). This script is dedicated for multiple files. The simplified | |
version of this script, for single NIfTI file is available here: | |
https://gist.github.com/mikbuch/fb28aef0f77c7c7aeeff92a61b109d16 |
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
// Imports required | |
import java.sql.ResultSet; | |
import java.sql.ResultSetMetaData; | |
import java.sql.SQLException; | |
/** | |
* Print a result set to system out. | |
* | |
* @param rs The ResultSet to print | |
* @throws SQLException If there is a problem reading the ResultSet |
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
source ~/antigen.zsh | |
# Load the oh-my-zsh's library. | |
antigen use oh-my-zsh | |
# Bundles from the default repo (robbyrussell's oh-my-zsh). | |
antigen bundle git | |
antigen bundle heroku | |
antigen bundle pip | |
antigen bundle lein |
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 serial | |
# Source: https://pyserial.readthedocs.io/en/latest/shortintro.html#opening-serial-ports | |
# Additional info: | |
# * you have to install pyserial in order for this code to work, command `sudo pip install serial` | |
# * run this script with sudo: `sudo python read_serial.py` | |
with serial.Serial('/dev/ttyUSB0', 9600, timeout=1) as ser: | |
while True: | |
# read a '\n' terminated line |
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
#!/bin/bash | |
# Takes all files within current directory and replaces one substring with | |
# another. This functionality is missing from standard linux shell (maybe | |
# it is possible to achieve with some complex awk command with regex, but | |
# I'd prefer to have a plain command for this). | |
# | |
# | |
# e.g. files: | |
# |
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
message("\n") | |
message("############################################") | |
message("# Mediation analysis example #") | |
message("############################################") | |
message("\n") | |
message(" + Import packages\n") | |
library('mediation') | |
# For Sobel filter: | |
library('multilevel') |
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
# Standard system upgrade: | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Nodejs installation on debian (source (here)[https://tecadmin.net/install-laatest-nodejs-npm-on-debian/]): | |
sudo apt-get install curl software-properties-common | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - | |
sudo apt-get install -y nodejs nodejs-legacy | |
# Installing the Jupyter itself: |
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 argparse | |
import re | |
import subprocess as sp | |
''' | |
Script to automatize mapping neuroimaging data from volumes (NIfTI) to brain | |
surface (workbench). | |
Edit data: 2021-04-28 | |
Author: Mikolaj Buchwald, [email protected] |
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
// This script is avilable as gist: | |
// https://gist.github.com/mikbuch/212cfb7365703caf517aa83642d10d91 | |
/* Requirements: | |
* * "esp8266" board installed. | |
* | |
* In order to install the board, go to: | |
* -- Tools => Board => Boards Manager => Install "esp8266" | |
* It also includes "Wemos" boards ("LOLIN"). | |
* |
OlderNewer