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 | |
# | |
# auto match window title and tab background color with | |
# terminal background color for iTerm2 | |
# append to your .bashrc, .zshrc or whatever | |
# does not really work with High Sierra | |
# to reset: | |
# echo -e "\033]6;1;bg;*;default\a" | |
osascript -e \ |
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
--- | |
output: html_document | |
editor_options: | |
chunk_output_type: inline | |
--- | |
Copyright 2018 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at |
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 | |
find ${1:-.} -name '*.zip' | sed 's/.zip//' | xargs -n1 -P $(nproc) -I _ unzip _.zip -d _ |
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
channels: | |
- defaults | |
- pytorch | |
- fastai | |
dependencies: | |
- pip | |
- ipykernel | |
- pytorch::pytorch | |
- pytorch::torchvision | |
- tensorflow-gpu |
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
-- Functions TODO: | |
-- FROM table CROSS JOIN UNNEST(table.column) AS col -> ???? (see icustay-hours) | |
-- ???(column) -> PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY column) (not sure how to do median in BQ) | |
-- psql 'dbname=mimiciv user=mimic options=--search_path=public,mimic_core,mimic_hosp,mimic_icu,mimic_derived' -f postgres-functions.sql | |
DROP FUNCTION IF EXISTS REGEXP_EXTRACT(str TEXT, pattern TEXT); | |
CREATE OR REPLACE FUNCTION REGEXP_EXTRACT(str TEXT, pattern TEXT) RETURNS TEXT AS $$ | |
BEGIN | |
RETURN substring(str from pattern); |
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 file makes tables for the concepts in this subfolder. | |
# Be sure to run postgres-functions.sql first, as the concepts rely on those function definitions. | |
# Note that this may take a large amount of time and hard drive space. | |
# string replacements are necessary for some queries | |
export REGEX_DATETIME_DIFF="s/DATETIME_DIFF\((.+?),\s?(.+?),\s?(DAY|MINUTE|SECOND|HOUR|YEAR)\)/DATETIME_DIFF(\1, \2, '\3')/g" | |
export REGEX_SCHEMA='s/`physionet-data.(mimic_derived|mimic_core|mimic_hosp|mimic_icu).(.+?)`/\2/g' | |
export CONNSTR='mimiciv mimic' | |
# this is set as the search_path variable for psql |
OlderNewer