Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: colab task examples #40

Merged
merged 12 commits into from
Jan 10, 2025
Merged
77 changes: 0 additions & 77 deletions docs/code_examples/tasks/prelabel_videos.py

This file was deleted.

18 changes: 0 additions & 18 deletions docs/code_examples/tasks/prioritize_by_data_title.py

This file was deleted.

55 changes: 0 additions & 55 deletions docs/code_examples/tasks/twin_project.py

This file was deleted.

15 changes: 0 additions & 15 deletions docs/code_examples/tasks/wrong_stage_and_pathway_names.py

This file was deleted.

370 changes: 370 additions & 0 deletions docs/notebooks/prelabel_videos_with_bounding_boxes.ipynb

Large diffs are not rendered by default.

274 changes: 274 additions & 0 deletions docs/notebooks/task_agent_set_priority.ipynb

Large diffs are not rendered by default.

386 changes: 386 additions & 0 deletions docs/notebooks/twin_project_label_transfer.ipynb

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions docs/overrides/partials/content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!--
Copyright (c) 2016-2024 Martin Donath <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->

<!-- Tags -->
{% if "material/tags" in config.plugins and tags %} {% include
"partials/tags.html" %} {% endif %}

<!-- Actions -->
{% include "partials/actions.html" %}

<!--
Hack: check whether the content contains a h1 headline. If it doesn't, the
page title (or respectively site name) is used as the main headline.
-->


{% if "\x3ch1" not in page.content %}
<h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %}

{% if page.nb_url %}
{% include "partials/notebook_links.html" %}
{% endif %}

<!-- Page content -->
{{ page.content }}

{% if page.nb_url %}
{% include "partials/notebook_links.html" %}
{% endif %}

<!-- Source file information -->
{% include "partials/source-file.html" %}


<!-- Was this page helpful? -->
{% include "partials/feedback.html" %}

<!-- Comment system -->
{% include "partials/comments.html" %}
42 changes: 42 additions & 0 deletions docs/overrides/partials/notebook_links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% set page_url_parts = page.nb_url.split('/') %}
{% set gh_ns = namespace(gh_nb_url='') %} {# Create a namespace to store the variable #}
{% for page_url_part in page_url_parts %}
{% if loop.index + 1 < page_url_parts | length %}
{% set gh_ns.gh_nb_url = gh_ns.gh_nb_url + page_url_part %}
{% set gh_ns.gh_nb_url = gh_ns.gh_nb_url + '/' %}
{% elif loop.index == page_url_parts | length %}
{% set gh_ns.gh_nb_url = gh_ns.gh_nb_url + page_url_part %}
{% endif %}
{% endfor %}
<div style="display: flex; justify-content: center; column-gap: 2em;">
<a
href="{{ config.repo_url }}/blob/{{ config.branch_name }}/docs{{ gh_ns.gh_nb_url }}"
target="_blank"
rel="noopener noreferrer"
>
<span class="md-source-file__fact">
<span class="md-icon">{% include ".icons/material/github.svg" %}</span>
View on Github
</span>
</a>
<a
href="{{ config.colab_prefix }}/blob/{{ config.branch_name }}/docs{{ gh_ns.gh_nb_url }}"
target="_blank"
rel="noopener noreferrer"
>
<span class="md-source-file__fact">
<span class="md-icon">{% include ".icons/simple/googlecolab.svg" %}</span>
Try in Colab
</span>
</a>
<a
href="{{ page.nb_url }}"
target="_blank"
rel="noopener noreferrer"
>
<span class="md-source-file__fact">
<span class="md-icon">{% include ".icons/material/download.svg" %}</span>
Download notebook
</span>
</a>
</div>
4 changes: 4 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Hack to make code in markdown cells of notebooks look similar to actual code */
div.jp-MarkdownCell pre {
font-size: var(--jp-code-font-size);
}
Loading
Loading