Skip to content

Instantly share code, notes, and snippets.

@opmorgan
opmorgan / task_script_reproducible_example.iqjs
Created October 31, 2025 17:24
Inquisit: show 20 stimuli drawn from a list of 160 - want to adapt to meet randomization constraints
***********************************************************************
Main Task Script for Nochmani Experiment
***********************************************************************
This script implements the main version of the Nochmani food preference task.
Participants see food images and choose whether Nochmani would "eat" or "don't eat".
Nochmani preferences: like sweets (approach-pos) and insects (approach-neg), hate meat (avoid-pos) and fungi (avoid-neg)
// User-specified variables // TODO: move to config
<parameters>
@opmorgan
opmorgan / find_dicom_center.py
Last active April 8, 2025 19:15
Find the center of a dicom image
import numpy as np
import pydicom
import glob
import sys
# Get filename from user
dir_name = sys.argv[1]
file_name = dir_name + ".dcm"
data_dir = "data/" + dir_name
file_path = data_dir + "/" + file_name
## ~/.zshrc
## zsh-specific shell configuration.
#### Source base configuration from .profile
if [ -f ~/.profile ]; then
source ~/.profile
fi
#### Pywal (https://github.com/dylanaraps/pywal.git)
@opmorgan
opmorgan / optimus-manager.conf
Last active July 11, 2020 22:17
To set optimus-manager's boot mode to "auto", put this config file in /etc/optimus-manager/
# GPU mode to use at computer startup. Possible values: nvidia, intel, hybrid, auto
# "auto" is a special mode that auto-detects if the computer is running on battery
# and selects a proper GPU mode. See the other options below.
startup_mode=auto
# GPU mode to select when startup_mode=auto and the computer is running on battery.
# Possible values: nvidia, intel, hybrid
startup_auto_battery_mode=intel
# GPU mode to select when startup_mode=auto and the computer is running on external power.
# Possible values: nvidia, intel, hybrid
startup_auto_extpower_mode=nvidia