This file contains hidden or 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
Year | Value | ||||||
1880 | -0.17 | ||||||
1881 | -0.09 | ||||||
1882 | -0.11 | ||||||
1883 | -0.18 | ||||||
1884 | -0.29 | ||||||
1885 | -0.34 | ||||||
1886 | -0.32 | ||||||
1887 | -0.37 |
This file contains hidden or 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 math | |
from typing import Tuple | |
def vdeg_to_px( | |
gaze_vdeg:Tuple[float, float], | |
screen_size_cm:Tuple[float, float], | |
screen_size_px:Tuple[int, int], | |
viewer_distance_cm:float, | |
) -> Tuple[float, float]: | |
''' |
This file contains hidden or 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 mne | |
mneraw = mne.read_raw_edf('file.edf') | |
electrodes = ['Fpz', 'Cz'] | |
# if electrodes to plot are not available, try to interpolate them | |
electrodes_not_in_list = [e for e in electrodes if e not in mneraw.ch_names] | |
if len(electrodes_not_in_list) > 0: | |
try: |
This file contains hidden or 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
''' quick and dirty script to glob a directory of dicom files and extract the header information into a csv file ''' | |
import pydicom | |
import glob | |
import pandas as pd | |
from tqdm import tqdm | |
import numpy as np | |
########################### | |
# Parameters |
This file contains hidden or 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 | |
cat - << EOF > /etc/apt/sources.d/bionic.list | |
deb http://ca.archive.ubuntu.com/ubuntu/ bionic main | |
deb http://ca.archive.ubuntu.com/ubuntu/ bionic universe | |
EOF | |
apt update | |
apt install -y g++-6 | |
apt install -y libgfortran3 |
This file contains hidden or 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 list_mutator(inner_list): | |
inner_list.append(4) | |
def list_setter(inner_list): | |
inner_list = inner_list + [4] | |
def list_returner(inner_list): | |
inner_list = inner_list + [4] | |
return inner_list |
This file contains hidden or 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 -x | |
# fixQpdf.sh [zip file] [output folder] | |
BASEDIR=$HOME | |
TEMPDIR=$(uuidgen) | |
mkdir $BASEDIR/$TEMPDIR | |
mkdir $BASEDIR/$2 |
This file contains hidden or 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 numpy as np | |
from collections import deque | |
import datetime | |
iters = 2000 | |
values = np.random.rand(10000) | |
def nproll(): |
This file contains hidden or 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 | |
PLANID=12345678 | |
JWTTOKEN={{TOKEN}} | |
for DAY in {1..365} | |
do | |
curl 'https://plans.youversionapi.com/4.0/together/$PLANID/activities?day=$DAY&page=1&order=desc&talk_it_over=0' \ | |
-H 'authority: plans.youversionapi.com' \ | |
-H 'x-youversion-app-version: 4' \ |
This file contains hidden or 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 python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Dec 5 11:40:07 2019 | |
@author: simeonwong | |
""" | |
import pyedflib | |
import os.path |