<jupyter_start><jupyter_text>Nbdev tutorial> This is an example of how to use nbdev.<jupyter_code>#hide
from nbdev.showdoc import *
from fastcore.test import *<jupyter_output><empty_output><jupyter_text>Functions<jupyter_code>#export
def say_hi(to):
    "Say hi to someone"
    return f"Hi {to}"
say_hi("Sergi")
test_eq(say_hi("Sergi"), "Hi Sergi")<jupyter_output><empty_output><jupyter_text>Classes<jupyter_code>#exports
class hiSayer:
    "class that spams hi"
    def __init__(self,to):
        self.to=to
    def say(self):
        "calls function to say hi"
        return say_hi(self.to)
show_doc(hiSayer)
sayer = hiSayer("Alex")
sayer.say()
#hide
from nbdev.export import notebook2script
notebook2script()<jupyter_output>Converted 00_core.ipynb.
Converted index.ipynb.
{'fraction_non_alphanumeric': 0.11612903225806452, 'fraction_numerical': 0.005161290322580645, 'mean_word_length': 5.5210084033613445, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '182257', 'license': 'Apache-2.0', 'n_tokens_mistral': 304, 'n_tokens_neox': 304, 'n_words': 62, 'path': '00_core.ipynb', 'repo_name': 'adauphin/nbdev_tutorial', 'size': '775'}