STYLE: Apply syntax highlight to Python notebook example doc
Apply syntax highlight to Python notebook example doc.
"This time, we get back only the names of the files.\n",
"\n",
"### Filtering files by entities\n",
- "The utility of the `BIDSLayout` would be pretty limited if all we could do was retrieve a list of all files in the dataset. Fortunately, the `.get()` method accepts all kinds of arguments that allow us to filter the result set based on specified criteria. In fact, we can pass *any* BIDS-defined keywords (or, as they're called in PyBIDS, *entities*) as constraints. For example, here's how we would retrieve all BOLD runs with `.nii.gz` extensions for subject '01':"
+ "The utility of the `BIDSLayout` would be pretty limited if all we could do was retrieve a list of all files in the dataset. Fortunately, the `.get()` method accepts all kinds of arguments that allow us to filter the result set based on specified criteria. In fact, we can pass *any* BIDS-defined keywords (or, as they're called in PyBIDS, *entities*) as constraints. For example, here's how we would retrieve all BOLD runs with `.nii.gz` extensions for subject `'01'`:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "If you're wondering what entities you can pass in as filtering arguments, the answer is contained in the .json configuration files [housed here](https://github.com/bids-standard/pybids/tree/master/bids/layout/config). To save you the trouble, here are a few of the most common entities:\n",
+ "If you're wondering what entities you can pass in as filtering arguments, the answer is contained in the `.json` configuration files [housed here](https://github.com/bids-standard/pybids/tree/master/bids/layout/config). To save you the trouble, here are a few of the most common entities:\n",
"\n",
- "* suffix: The part of a BIDS filename just before the extension (e.g., 'bold', 'events', 'physio', etc.).\n",
- "* subject: The subject label\n",
- "* session: The session label\n",
- "* run: The run index\n",
- "* task: The task name\n",
+ "* `suffix`: The part of a BIDS filename just before the extension (e.g., `'bold'`, `'events'`, `'physio'`, etc.).\n",
+ "* `subject`: The subject label\n",
+ "* `session`: The session label\n",
+ "* `run`: The run index\n",
+ "* `task`: The task name\n",
"\n",
"New entities are continually being defined as the spec grows, and in principle (though not always in practice), PyBIDS should be aware of all entities that are defined in the BIDS specification.\n",
"\n",
"source": [
"### Other `get()` options\n",
"The `.get()` method has a number of other useful arguments that control its behavior. We won't discuss these in detail here, but briefly, here are a couple worth knowing about:\n",
- "* regex_search: If you set this to `True`, string filter argument values will be interpreted as regular expressions.\n",
- "* scope: If your BIDS dataset contains BIDS-derivatives sub-datasets, you can specify where you wa"
+ "* `regex_search`: If you set this to `True`, string filter argument values will be interpreted as regular expressions.\n",
+ "* `scope`: If your BIDS dataset contains BIDS-derivatives sub-datasets, you can specify where you wa"
]
},
{
