Skip to main content

dlai_tools

A set of tools for DeepLearning.AI.

Usage

Install

pip install dlai_tools

Add table of content

python -m dlai_tools.toc Name_of_Notebook.ipynb [patterns.json templates.json]

You can change the style of your table of content by changing the default patterns and templetes. You can pass 2 json files containing the new set of patterns and templates. This will be described properly later.

default_patterns

default_patterns = {
    'section': ['^## [0-9]+ - '], # '- [Part {section_number}: {section_title}](# {section_number})'
    'subsection': ['^### [0-9]+.[0-9]+ '], 
    'exercise': ['^### Exercise [0-9]+'], 
    'toc_title': ['^# Table of Contents'],
    'href_key': 'id',
    'subsection_separator': '-'
}

dafault_template

default_templates = {
    'section': '## {section_number} - {section_title}', 
    'subsection': '### {section_number}.{subsection_number} {subsection_title}', 
    'exercise': '### Exercise {exercise_number}', 
    'toc_title': '# Table of Contents'
}

It produces a file called Name_of_Notebook_toc.ipynb

Create learner facing version

python -m dlai_tools.learner_generator Name_of_Notebook.ipynb [tags.json]

It produces a file called Name_of_Notebook_Assignment.ipynb

You can change the style of your table of content by changing the default tags. You can pass a path to a json file containing the new set of tags.

defaul_tags =  {
    'tagStartCode': "START CODE HERE",
    'tagEndCode': "END CODE HERE",
	'tagStartOmitBlock': "START OMIT BLOCK",
	'tagEndOmitBlock': "END OMIT BLOCK",
	'tagOmit': "@OMIT",
	'tagKeep': "@KEEP",
	'tagReplaceEquals': "@REPLACE EQUALS",
	'tagReplace': "@REPLACE",
}

Testing utils

You can import from your python code, a set of functions that helps in the testing process.

from dlai_tool.testing_utils import *

datatype_check("abc", "csf", "Error")
...

Release files for dlai-tools 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dlai-tools 0.6.1
File Size Uploaded
dlai_tools-0.6.1.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dlai-tools 0.6.1
File Interpreter ABI Platform
dlai_tools-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / dlai_tools-0.6.1.tar.gz

Download URL dlai_tools-0.6.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3bbb5bef6bf6414f1f7fd4aed83fd9f19e381ddd2b25b4966125531ac84acb36
BLAKE2b-256 checksum
How to use checksums
0984976cb071fe652cf4cfbfa8e630bec40ea8155cddc94008bf93fd1a8e4d24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.17

Release files / dlai_tools-0.6.1-py3-none-any.whl

Download URL dlai_tools-0.6.1-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28f0ad930055f4e05cc5fb5ff644fb9ca37a3b5faeea648a88a73db57af23357
BLAKE2b-256 checksum
How to use checksums
d3ba41e364620840a50ff7bcbe93e8b7164acba6de38eafea44499880541445c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.17

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.7

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

1 release file

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page