<commit_before>"""
This script create a bash script to be used 
in the Makefile of the data directory.
It will download the filtered data from from 
https://nipy.bic.berkeley.edu/rcsds/ds005/
and locate them in the relevant local directories
The bash script is then used in the Makefile of the
data directory to download the filtered data one
by one.

Run with:
    python filtered_data_sh_script.py
    from this directory
"""
import os
import pdb
import numpy as np

project_id = 'ds005'
subject_N = 16
run_N = 3

project_path = '../'
data_path = project_path + 'data/'

#subject_list = [str(i) for i in range(1,subject_N+1)]
subject_list = [str(i) for i in range(1,5)]
run_list = [str(i) for i in range(1,run_N+1)]
base_url = 'http://nipy.bic.berkeley.edu/rcsds/'
file_name = 'filtered_func_data_mni.nii.gz'

#Write local downloading location and link on txt file
txt_out = []
for s in subject_list:
    for r in run_list:
        start = 'wget -N -P ' + data_path
        location = project_id + '/sub'+ s.zfill(3)\
           +'/model/model001/task001_run%s.feat/'%(r.zfill(3))
        link = base_url + location + file_name
        txt_out.append((start + location + ' ' + link))<commit_msg>download the filtered data even if you have them locally<commit_after>"""
This script create a bash script to be used 
in the Makefile of the data directory.
It will download the filtered data from from 
https://nipy.bic.berkeley.edu/rcsds/ds005/
and locate them in the relevant local directories
The bash script is then used in the Makefile of the
data directory to download the filtered data one
by one.

Run with:
    python filtered_data_sh_script.py
    from this directory
"""
import os
import pdb
import numpy as np

project_id = 'ds005'
subject_N = 16
run_N = 3

project_path = '../'
data_path = project_path + 'data/'

#subject_list = [str(i) for i in range(1,subject_N+1)]
subject_list = [str(i) for i in range(1,5)]
run_list = [str(i) for i in range(1,run_N+1)]
base_url = 'http://nipy.bic.berkeley.edu/rcsds/'
file_name = 'filtered_func_data_mni.nii.gz'

#Write local downloading location and link on txt file
txt_out = []
for s in subject_list:
    for r in run_list:
        start = 'wget -P ' + data_path
        location = project_id + '/sub'+ s.zfill(3)\
           +'/model/model001/task001_run%s.feat/'%(r.zfill(3))
        link = base_url + location + file_name
        txt_out.append((start + location + ' ' + link))
{'fraction_non_alphanumeric': 0.10723089564502876, 'fraction_numerical': 0.018898931799506986, 'mean_word_length': 3.577067669172932, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2466590', 'n_tokens_mistral': 866, 'n_tokens_neox': 821, 'n_words': 281}