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
# -*- coding: utf-8 -*- | |
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds | |
# Copyright 2019 Board of Regents of the University of Wisconsin System | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.node { | |
font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif; | |
fill: #bbb; | |
} | |
.node:hover { |
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
#!/usr/bin/env python | |
""" | |
Compute stimulus orderings for the mnemonic similarity task, described in: | |
Stark SM, Stevenson R, Wu C, Rutledge S, & Stark CEL (2015). Stability of | |
age-related deficits in the mnemonic similarity task across task variations. | |
Behavioral Neuroscience 129(3), 257-268. | |
Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds, | |
University of Wisconsin-Madison, for the mp2 study conducted by Dan Grupe |
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 | |
# Written by Jonah Chaiken and Nate Vack | |
# Support: bit_help@lists.wisc.edu | |
help=" Usage: convert_dcm2niix.sh <in_file> <out_file> | |
This program will individually convert a dicom archive file to a NIfTI file. | |
The input can be either a .tar file containing bzip2'd dicom slices, or a |
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
#!/usr/bin/env python | |
""" | |
Usage: dos_line_endings | |
Takes stdin, changes all line endings from \r or \n to \r\n, strips UTF-8 | |
byte-order mark (if any), writes to stdout. | |
""" | |
import sys | |
import re |
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
def convert_three_byte(frame): | |
data_out = np.zeros(128, dtype=np.int32) # You're looking to make a 128-element array of int32. | |
data_out.dtype = np.byte | |
data_out = data_out.reshape(-1, 4) # Shape is now (128,4) and dtype is byte | |
# Now, copy the data from chans08to00 into data_out. We need to specify which bytes to put it in. | |
# Also, we need to reverse the data in frame. | |
# You'd change 0:3 to 1:4 if the stuff in frame is big-endian, I think? You'll need to experiment. | |
data_out[0:8, 0:3] = frame['chans08to00'][::-1] | |
# ... and so on with channels | |
data_out.dtype = np.int32 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<script type="text/javascript"> | |
window.console = window.console || {} | |
window.console.log = window.console.log || function() {}; | |
console.log("Hello"); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<title>Beeswarm plot - collision detection</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<style> | |
text { font: 10px sans-serif; } | |
</style> | |
</head> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> |
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
#!/usr/bin/env ruby | |
class HumanBinarySize | |
MATCHER = /([\d_,]+) *([kmgtp])?b?/i | |
MULTIPLIER = { | |
'b' => 1, | |
'k' => 2**10, | |
'm' => 2**20, | |
'g' => 2**30, |