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 pandas as pd | |
# cd /data/predict1/to_nda/nda-submissions | |
df=pd.read_csv('blood_saliva_rack_Pronet.csv') | |
index=[] | |
for i,row in df.iterrows(): | |
rc=row['Rack Code'] |
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 python | |
import sys | |
import pandas as pd | |
df=pd.read_csv(sys.argv[1],dtype=str) | |
df1=df.copy() | |
df1.rename(columns={'chric_record_id':'participant_id'},inplace=True) | |
df1["redcap_system_data_format_version"]=1 |
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 python | |
from glob import glob | |
from os.path import isfile, basename | |
import pandas as pd | |
subjects=glob('/data/predict1/data_from_nda/Pronet/PHOENIX/PROTECTED/*/raw/*') | |
subjects=[basename(s) for s in subjects] | |
print('for how many subjects inclusionexclusion_criteria_review does not exist?') |
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
# execute it from within /data/predict1/data_from_nda/Prescient/PHOENIX/GENERAL | |
from os.path import dirname, join as pjoin | |
import pandas as pd | |
from glob import glob | |
files=glob('*/processed/*/interviews/open/*_combinedQCRecords.csv') | |
j=0 | |
for file in files: |
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 pandas as pd | |
# this is API pulled from Yale REDCap | |
filename='pronet_dict_20230321.csv' | |
df=pd.read_csv(filename, dtype=str) | |
df1=df.copy() | |
# erase calcs, logics | |
# replace calc by text |
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 python | |
import pandas as pd | |
from glob import glob | |
def get_count(): | |
for file in files: | |
df=pd.read_csv(file) |
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
// count good | |
let demographs; | |
let count=0; | |
let incl; | |
let csv; | |
let coll; | |
demographs=db.toc.find({"assessment":"form_sociodemographics"}) | |
// print(demographs.length()) |
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 python | |
# detect files with excess rows | |
# cd /data/predict1/data_from_nda/formqc/ | |
from glob import glob | |
import pandas as pd | |
files=glob('??-*-form_*day1to*csv') |
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 | |
# master script | |
for p in $(cat ip_addr.txt) | |
do | |
echo -n 172.21.$p,; ssh [email protected].$p -i ~/.ssh/id_ecdsa -o StrictHostKeyChecking=no -C "~/get_mac_addr.sh"; done | |
# slave script | |
str1=`ip addr | grep BROADCAST,MULTICAST,UP,LOWER_UP` | |
IFS=': ' read -ra names <<< $str1 |
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 python | |
from os import getcwd, chdir | |
import pandas as pd | |
import json | |
from glob import glob | |
var_col='field_name' | |
form_col='form_name' | |
type_col='field_type' |