Giter VIP home page Giter VIP logo

Comments (12)

satra avatar satra commented on July 18, 2024 1

it would be good to update them and perhaps use the nwbstreaming environment directly to pull in the streaming data.

from example-notebooks.

bendichter avatar bendichter commented on July 18, 2024

I just made that on my own, but we could add it to this repo! Eventually. It's a bit messy right now.

from example-notebooks.

djarecka avatar djarecka commented on July 18, 2024

So does it make sense to update NWBWidget-demo.ipynb and 000004_demo_analysis.ipynb (they are failing in the current form), or you have a different idea for the content in this repo.

from example-notebooks.

bendichter avatar bendichter commented on July 18, 2024

I can work on this

from example-notebooks.

bendichter avatar bendichter commented on July 18, 2024

@satra what do you think of this?

https://github.com/dandi/example-notebooks/blob/master/NWBWidget-demo.ipynb

from example-notebooks.

satra avatar satra commented on July 18, 2024

thanks that looks nice. regarding the search paths, there is a dedicated endpoint for that:

https://dandi.readme.io/reference#dandisets_versions_assets_paths_read

that specific api return will change shortly (dandi/dandi-archive#312), but that's what you should use instead of the current formulation.

from example-notebooks.

bendichter avatar bendichter commented on July 18, 2024

@satra I'd like to be able to demonstrate API best practices but I don't understand how to use this. What I need is an API where I can input the dandiset identifier and the nwb file path and have it output the asset_id of that NWB file. Is that possible with the API?

from example-notebooks.

satra avatar satra commented on July 18, 2024

yes that api has exactly those things but will return a list of objects. path is a parameter to that api endpoint. if you fill in the values in readme.io it will show you the corresponding python code.

from example-notebooks.

bendichter avatar bendichter commented on July 18, 2024

@satra

I've been playing around with it and this is the closest I've gotten

image

but this neither returns the single object I am looking for nor returns the asset ID. Also, the documentations says:

The specified path must be a folder; it either must end in a slash or (to refer to the root folder) must be the empty string.

but I want to specify the path of a file.

from example-notebooks.

satra avatar satra commented on July 18, 2024

really sorry, i gave the wrong api endpoint.

import requests

url = "https://api.dandiarchive.org/api/dandisets/000053/versions/draft/assets/"

querystring = {"path":"sub-npI1"}

headers = {"Accept": "application/json"}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)

from example-notebooks.

satra avatar satra commented on July 18, 2024

and you should be able to give the fullpath. the other endpoint returns the list of objects at a given level in the hierarchy

from example-notebooks.

bendichter avatar bendichter commented on July 18, 2024

that works, thanks @satra

from example-notebooks.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.