<jupyter_start><jupyter_text>Product controller<jupyter_code>from project.entity.product import Product
from project.controler.product import ProductController<jupyter_output><empty_output><jupyter_text>Create products<jupyter_code>product1 = Product('CD', 150)
product2 = Product('Tape', 1034)
product3 = Product('Game', 17)<jupyter_output><empty_output><jupyter_text>List product<jupyter_code>pprint(ProductController.list_products(), indent=2)<jupyter_output>{}<jupyter_text>Insert products to db<jupyter_code>ProductController.insert_product(product1)
ProductController.insert_product(product2)
ProductController.insert_product(product3)<jupyter_output><empty_output><jupyter_text>List new products<jupyter_code>pprint(ProductController.list_products(), indent=2)<jupyter_output>{ 0: {'name': 'CD', 'quantity': 150},
  1: {'name': 'Tape', 'quantity': 1034},
  2: {'name': 'Game', 'quantity': 17}}<jupyter_text>Change CD quantity<jupyter_code>ProductController.add_quantity_product(0, 2)
pprint(ProductController.select_product(0), indent=2)<jupyter_output>{'name': 'CD', 'quantity': 152}<jupyter_text>Delete Product<jupyter_code>ProductController.delete_product(1)
pprint(ProductController.list_products(), indent=2)<jupyter_output>{0: {'name': 'CD', 'quantity': 152}, 2: {'name': 'Game', 'quantity': 17}}
{'fraction_non_alphanumeric': 0.1497326203208556, 'fraction_numerical': 0.03437738731856379, 'mean_word_length': 14.783132530120483, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '84968', 'license': 'MIT', 'n_tokens_mistral': 488, 'n_tokens_neox': 446, 'n_words': 63, 'path': 'notebooks/poo-locadora-product.ipynb', 'repo_name': 'senavs/poo-locadora', 'size': '1309'}