Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
You can download a file from OSF to your Colab notebook using !wget, which will store it as a local file. Depending on what is in the file it can then be loaded using the usual methods. Here is an example for creating a numpy.npz file with multiple named matrices: #@title Data retrieval #@markdown This cell downloads the example dataset that we will use in this tutorial. import io import requests r = requests.get('https://osf.io/sy5xt/download') if r.status_code != 200: print('Failed to download data') else: spike_times = np.load(io.BytesIO(r.content), allow_pickle=True)['spike_times'] And this allows treating the downloaded data set as a file, although it is less secure: #np.savez('W1D2_data.npz', judgments=judgments, opticflow=opticflow, vestibular=vestibular) !wget https://osf.io/c5xyf/download -O W1D2_data.npz filez = np.load(file='W1D2_data.npz', allow_pickle=True) judgments = filez['judgments'] opticflow = filez['opticflow'] vestibular = filez['vestibular'] Important is to get the URL correct: https://osf.io/c5xyf/download which can be found by clicking on the file in OSF after upload, then right-click on 'Download' in the upper right and copying the link / URL / address.
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.