Skip to content

Instantly share code, notes, and snippets.

View JohnAtl's full-sized avatar

John T. Johnson JohnAtl

View GitHub Profile
JohnAtl / check-nvidia-cuda
Created January 5, 2024 15:25
Distrobox with Tensorflow and Nvidia support
# Adapted from
function lib_installed() { /sbin/ldconfig -N -v $(sed 's/:/ /' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep $1; }
function check() { lib_installed $1 && echo "$1 is installed" || echo -e "\nERROR: $1 is NOT installed\n"; }
check libcudart
check libcudnn
JohnAtl / Chatgpt.txt
Created March 27, 2023 20:57
Prosthetics, AON, Maurice Merleau-Ponty
Write an academic discussion of the cognitive ramifications of an amputee using a prosthesis, rather than a hand, and how that can affect empathy from people observing the amputee performing reach to grasp tasks. Incorporate the work of Maurice Merleau-Ponty on phenomenology. Also incorporate research about the action observation network.
The use of a prosthetic limb by an amputee can have significant cognitive ramifications that may affect the way they perceive and interact with the world around them, as well as the way that others perceive and interact with them. Maurice Merleau-Ponty's concept of "embodiment" can be helpful in understanding these cognitive effects, as it emphasizes the role of the body in our perception and experience of the world.
One potential effect of using a prosthetic limb is the need for the amputee to integrate the prosthesis into their existing sensorimotor system. This process may require the reorganization of neural pathways and the development of new compensatory strategies,
JohnAtl /
Created January 17, 2023 13:40 — forked from dmsul/
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.


Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

JohnAtl /
Created October 26, 2022 02:41
business_rule_engine demo
params = {
'products_in_stock': 10
def order_more(items_to_order):
print('you ordered {} new items'.format(items_to_order))
return items_to_order
with open('test.rules', 'r') as f:
rules =
root@nextcloudpi:/var/www/nextcloud# cat config/config.php
$CONFIG = array (
'passwordsalt' => 'redacted',
'secret' => 'redacted',
'trusted_domains' =>
array (
0 => 'localhost',
7 => 'nextcloudpi',
5 => 'nextcloudpi.local',
JohnAtl /
Created September 24, 2022 17:23
Output from NextCloudPi's ncp-report command
NextCloudPi diagnostics

NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_08-16-22
OS                   Debian GNU/Linux 11. 5.10.92-v8+ (aarch64)
automount            yes
USB devices          sda
JohnAtl / Mail + Reminders.kmmacros
Last active August 6, 2022 13:58
Opens Mail in the left 2/3 of the screen, and Reminders in the right 1/3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
KeyError Traceback (most recent call last)
Input In [221], in <cell line: 6>()
4 display = plot_anat(mni_img, figure=fig, display_mode='z', cut_coords=z_coords)
5 display.add_markers(coords, figure=fig)
----> 6 display.savefig(f'/output/2ndLevel/{cont_name}/task-ao/cluster_z_slices.png')
File /opt/miniconda-latest/envs/neuro/lib/python3.8/site-packages/nilearn/plotting/displays/, in BaseSlicer.savefig(self, filename, dpi)
696 """Save the figure to a file.
name: nilearn
- conda-forge
- defaults
prefix: /usr/local/Caskroom/miniconda/base/envs/nilearn
JohnAtl /
Last active April 21, 2022 14:53
Build an nipype docker image based on neurodocker
# Note that this repo includes a Singularity file too
git clone
cd nipype_tutorial
chmod +x
docker build --tag jjnipype .