├── .DS_Store ├── .gitignore ├── 00_prompt_engineering └── readme.md ├── 01_gen_ai_for_everyone ├── app.png └── readme.md ├── 02_python_crash_course ├── python_crash_course_book_code_with_typing │ ├── .gitignore │ ├── README.md │ ├── chapter_01 │ │ └── hello_world.py │ ├── chapter_02 │ │ ├── apostrophe.py │ │ ├── comment.py │ │ ├── full_name.py │ │ ├── full_name_2.py │ │ ├── full_name_3.py │ │ ├── hello_world.py │ │ ├── hello_world_variables.py │ │ ├── hello_world_variables_2.py │ │ ├── name.py │ │ └── name_2.py │ ├── chapter_03 │ │ ├── bicycles.py │ │ ├── cars.py │ │ ├── motorcycles.py │ │ └── partial_programs │ │ │ ├── bicycles_0_first_version.py │ │ │ ├── bicycles_1_accessing_elements.py │ │ │ ├── bicycles_2_using_methods.py │ │ │ ├── bicycles_3_index_1_3.py │ │ │ ├── bicycles_4_last_item.py │ │ │ ├── bicycles_5_message.py │ │ │ ├── cars_0_first_version.py │ │ │ ├── cars_1_sort_reverse.py │ │ │ ├── cars_2_sorted.py │ │ │ ├── cars_3_reverse_order.py │ │ │ ├── motorcycles_0_first_version.py │ │ │ ├── motorcycles_10_use_value.py │ │ │ ├── motorcycles_11_index_error.py │ │ │ ├── motorcycles_1_appending.py │ │ │ ├── motorcycles_2_starting_empty.py │ │ │ ├── motorcycles_3_inserting_elements.py │ │ │ ├── motorcycles_4_removing_elements.py │ │ │ ├── motorcycles_5_remove_second_item.py │ │ │ ├── motorcycles_6_pop.py │ │ │ ├── motorcycles_7_use_popped_value.py │ │ │ ├── motorcycles_8_popping_first_item.py │ │ │ └── motorcycles_9_removing_item_by_value.py │ ├── chapter_04 │ │ ├── dimensions.py │ │ ├── even_numbers.py │ │ ├── first_numbers.py │ │ ├── foods.py │ │ ├── magicians.py │ │ ├── partial_programs │ │ │ ├── dimensions_0_first_version.py │ │ │ ├── dimensions_1_error_change_value.py │ │ │ ├── dimensions_2_looping.py │ │ │ ├── dimensions_3_writing_over_tuple.py │ │ │ ├── even_numbers.py │ │ │ ├── first_numbers_0_first_version.py │ │ │ ├── first_numbers_1_one_to_five.py │ │ │ ├── first_numbers_2_list_of_numbers.py │ │ │ ├── foods_0_first_version.py │ │ │ ├── foods_1_new_foods.py │ │ │ ├── foods_2_incorrect_approach.py │ │ │ ├── hello_world_0_errors_indenting_unnecessarily.py │ │ │ ├── magicians_0_first_version.py │ │ │ ├── magicians_1_great_trick.py │ │ │ ├── magicians_2_next_trick.py │ │ │ ├── magicians_3_great_show.py │ │ │ ├── magicians_4_errors_forgetting_to_indent.py │ │ │ ├── magicians_5_errors_forgetting_to_indent_additional_lines.py │ │ │ ├── magicians_6_errors_indenting_unnecessarily_after_loop.py │ │ │ ├── magicians_7_errors_forgetting_colon.py │ │ │ ├── players_0_first_version.py │ │ │ ├── players_1_second_to_fourth.py │ │ │ ├── players_2_omit_first_index.py │ │ │ ├── players_3_omit_last_index.py │ │ │ ├── players_4_negative_first_index.py │ │ │ ├── players_5_looping_through_slice.py │ │ │ ├── square_numbers_0_first_version.py │ │ │ ├── square_numbers_1_shorter_loop.py │ │ │ └── squares.py │ │ ├── players.py │ │ ├── square_numbers.py │ │ └── squares.py │ ├── chapter_05 │ │ ├── amusement_park.py │ │ ├── banned_users.py │ │ ├── cars.py │ │ ├── magic_number.py │ │ ├── partial_programs │ │ │ ├── amusement_park_0_first_version.py │ │ │ ├── amusement_park_1_price_only.py │ │ │ ├── amusement_park_2_multiple_elif.py │ │ │ ├── amusement_park_3_omitting_else.py │ │ │ ├── banned_users.py │ │ │ ├── cars.py │ │ │ ├── magic_number.py │ │ │ ├── toppings_0_first_listing.py │ │ │ ├── toppings_1_multiple_conditions.py │ │ │ ├── toppings_2_checking_special_items.py │ │ │ ├── toppings_3_no_green_peppers.py │ │ │ ├── toppings_4_checking_list_not_empty.py │ │ │ ├── toppings_5_multiple_lists.py │ │ │ ├── voting_0_first_version.py │ │ │ ├── voting_1_two_lines.py │ │ │ └── voting_2_if_else.py │ │ ├── toppings.py │ │ └── voting.py │ ├── chapter_06 │ │ ├── alien.py │ │ ├── alien_no_points.py │ │ ├── aliens.py │ │ ├── favorite_languages.py │ │ ├── many_users.py │ │ ├── partial_programs │ │ │ ├── alien_0_first_version.py │ │ │ ├── alien_1_accessing_values.py │ │ │ ├── alien_2_new_points.py │ │ │ ├── alien_3_new_key_value_pairs.py │ │ │ ├── alien_4_starting_empty.py │ │ │ ├── alien_5_modifying_values.py │ │ │ ├── alien_6_track_position.py │ │ │ ├── alien_7_removing_key_value_pairs.py │ │ │ ├── alien_no_points_0_first_version.py │ │ │ ├── alien_no_points_1_using_get.py │ │ │ ├── aliens_0_first_listing.py │ │ │ ├── aliens_1_thirty_aliens.py │ │ │ ├── aliens_2_change_colors.py │ │ │ ├── favorite_languages_0_first_version.py │ │ │ ├── favorite_languages_1_look_up_language.py │ │ │ ├── favorite_languages_2_loop_items.py │ │ │ ├── favorite_languages_3_loop_keys.py │ │ │ ├── favorite_languages_4_work_inside_loop.py │ │ │ ├── favorite_languages_5_check_polled.py │ │ │ ├── favorite_languages_6_loop_sorted.py │ │ │ ├── favorite_languages_7_loop_values.py │ │ │ ├── favorite_languages_8_loop_set.py │ │ │ ├── favorite_languages_9_nested_lists.py │ │ │ ├── many_users.py │ │ │ ├── pizza.py │ │ │ ├── user_0_first_listing.py │ │ │ └── user_1_loop_items.py │ │ ├── pizza.py │ │ └── user.py │ ├── chapter_07 │ │ ├── cities.py │ │ ├── confirmed_users.py │ │ ├── counting.py │ │ ├── even_or_odd.py │ │ ├── greeter.py │ │ ├── mountain_poll.py │ │ ├── parrot.py │ │ ├── partial_programs │ │ │ ├── cities.py │ │ │ ├── confirmed_users.py │ │ │ ├── counting_0_first_version.py │ │ │ ├── counting_1_using_continue.py │ │ │ ├── counting_2_infinite_loop.py │ │ │ ├── even_or_odd.py │ │ │ ├── greeter_0_first_version.py │ │ │ ├── greeter_1_longer_prompt.py │ │ │ ├── mountain_poll.py │ │ │ ├── parrot_0_first_version.py │ │ │ ├── parrot_1_while_loop.py │ │ │ ├── parrot_2_while_loop_if_test.py │ │ │ ├── parrot_3_while_loop_flag.py │ │ │ ├── pets.py │ │ │ └── rollercoaster.py │ │ ├── pets.py │ │ └── rollercoaster.py │ ├── chapter_08 │ │ ├── formatted_name.py │ │ ├── greeter.py │ │ ├── importing_functions │ │ │ ├── importing_0_entire_module │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── importing_1_specific_functions │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── importing_2_function_alias │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── importing_3_module_alias │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ └── importing_4_all_functions │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ ├── partial_programs │ │ │ ├── formatted_name_0_first_version.py │ │ │ ├── formatted_name_1_making_argument_optional.py │ │ │ ├── formatted_name_2_argument_optional.py │ │ │ ├── greet_users.py │ │ │ ├── greeter_0_first_version.py │ │ │ ├── greeter_1_passing_information.py │ │ │ ├── greeter_2_infinite_loop.py │ │ │ ├── greeter_3_quit_conditions.py │ │ │ ├── importing_0_entire_module │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── importing_1_specific_functions │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── importing_2_function_alias │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── importing_3_module_alias │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── importing_4_all_functions │ │ │ │ ├── making_pizzas.py │ │ │ │ └── pizza.py │ │ │ ├── person_0_first_version.py │ │ │ ├── person_1_with_age.py │ │ │ ├── pets_0_first_version.py │ │ │ ├── pets_1_multiple_calls.py │ │ │ ├── pets_2_order_matters.py │ │ │ ├── pets_3_keyword_arguments.py │ │ │ ├── pets_4_default_values.py │ │ │ ├── pizza_0_first_version.py │ │ │ ├── pizza_1_loop.py │ │ │ ├── pizza_2_mixing_positional_arbitrary_args.py │ │ │ ├── printing_models_0_first_version.py │ │ │ ├── printing_models_1_two_functions.py │ │ │ └── user_profile.py │ │ ├── person.py │ │ ├── pets.py │ │ ├── pizza.py │ │ ├── printing_models.py │ │ └── user_profile.py │ ├── chapter_09 │ │ ├── car.py │ │ ├── dog.py │ │ ├── electric_car.py │ │ ├── importing_classes │ │ │ ├── importing_0_importing_single_class │ │ │ │ ├── car.py │ │ │ │ └── my_car.py │ │ │ ├── importing_1_storing_multiple_classes_in_a_module │ │ │ │ ├── car.py │ │ │ │ └── my_electric_car.py │ │ │ ├── importing_2_importing_multiple_classes_from_a_module │ │ │ │ ├── car.py │ │ │ │ └── my_cars.py │ │ │ ├── importing_3_importing_entire_module │ │ │ │ ├── car.py │ │ │ │ └── my_cars.py │ │ │ └── importing_4_importing_module_into_module │ │ │ │ ├── car.py │ │ │ │ ├── electric_car.py │ │ │ │ └── my_cars.py │ │ └── partial_programs │ │ │ ├── creating_and_using_a_class │ │ │ ├── dog_0_first_version.py │ │ │ ├── dog_1_calling_methods.py │ │ │ └── dog_2_multiple_instances.py │ │ │ ├── importing_classes │ │ │ ├── importing_0_importing_single_class │ │ │ │ ├── car.py │ │ │ │ └── my_car.py │ │ │ ├── importing_1_storing_multiple_classes_in_a_module │ │ │ │ ├── car.py │ │ │ │ └── my_electric_car.py │ │ │ ├── importing_2_importing_multiple_classes_from_a_module │ │ │ │ ├── car.py │ │ │ │ └── my_cars.py │ │ │ ├── importing_3_importing_entire_module │ │ │ │ ├── car.py │ │ │ │ └── my_cars.py │ │ │ └── importing_4_importing_module_into_module │ │ │ │ ├── car.py │ │ │ │ ├── electric_car.py │ │ │ │ └── my_cars.py │ │ │ ├── inheritance │ │ │ ├── electric_car_0_first_version.py │ │ │ ├── electric_car_1_child_attributes_methods.py │ │ │ ├── electric_car_2_instances_as_attributes.py │ │ │ └── electric_car_3_battery_get_range.py │ │ │ └── working_with_classes_instances │ │ │ ├── car_0_first_version.py │ │ │ ├── car_1_default_value.py │ │ │ ├── car_2_modifying_attributes_directly.py │ │ │ ├── car_3_modifying_through_method.py │ │ │ ├── car_4_reject_rollbacks.py │ │ │ └── car_5_incrementing_attribute.py │ ├── chapter_10 │ │ ├── exceptions │ │ │ ├── alice.py │ │ │ ├── alice.txt │ │ │ ├── division_calculator.py │ │ │ ├── little_women.txt │ │ │ ├── moby_dick.txt │ │ │ └── word_count.py │ │ ├── partial_programs │ │ │ ├── exceptions │ │ │ │ ├── alice.txt │ │ │ │ ├── alice_0_first_version.py │ │ │ │ ├── alice_1_handline_filenotfounderror.py │ │ │ │ ├── alice_2_analyzing_text.py │ │ │ │ ├── division_calculator_0_first_version.py │ │ │ │ ├── division_calculator_1_try_except.py │ │ │ │ ├── division_calculator_2_prevent_crashes.py │ │ │ │ ├── division_calculator_3_else_block.py │ │ │ │ ├── little_women.txt │ │ │ │ ├── moby_dick.txt │ │ │ │ ├── word_count_0_first_version.py │ │ │ │ ├── word_count_1_multiple_texts.py │ │ │ │ └── word_count_2_failing_silently.py │ │ │ ├── reading_from_a_file │ │ │ │ ├── file_reader_0_first_version.py │ │ │ │ ├── file_reader_1_remove_blank_line.py │ │ │ │ ├── file_reader_2_chained_methods.py │ │ │ │ ├── file_reader_3_accessing_lines.py │ │ │ │ ├── pi_birthday.py │ │ │ │ ├── pi_digits.txt │ │ │ │ ├── pi_million_digits.txt │ │ │ │ ├── pi_string_0_first_version.py │ │ │ │ ├── pi_string_1_lstrip.py │ │ │ │ └── pi_string_2_million_digits.py │ │ │ ├── storing_data │ │ │ │ ├── greet_user.py │ │ │ │ ├── number_reader.py │ │ │ │ ├── number_writer.py │ │ │ │ ├── numbers.json │ │ │ │ ├── remember_me_0_first_version.py │ │ │ │ ├── remember_me_1_combined.py │ │ │ │ ├── remember_me_2_refactoring.py │ │ │ │ ├── remember_me_3_refactoring_two_functions.py │ │ │ │ └── remember_me_4_refactoring_three_functions.py │ │ │ └── writing_to_a_file │ │ │ │ ├── programming.txt │ │ │ │ ├── write_message_0_first_version.py │ │ │ │ └── write_message_1_multiple_lines.py │ │ ├── reading_from_a_file │ │ │ ├── file_reader.py │ │ │ ├── pi_birthday.py │ │ │ ├── pi_digits.txt │ │ │ ├── pi_million_digits.txt │ │ │ └── pi_string.py │ │ ├── storing_data │ │ │ ├── greet_user.py │ │ │ ├── number_reader.py │ │ │ ├── number_writer.py │ │ │ ├── numbers.json │ │ │ ├── remember_me.py │ │ │ └── username.json │ │ └── writing_to_a_file │ │ │ ├── programming.txt │ │ │ └── write_message.py │ ├── chapter_11 │ │ ├── language_survey.py │ │ ├── name_function.py │ │ ├── names.py │ │ ├── survey.py │ │ ├── test_name_function.py │ │ └── test_survey.py │ ├── chapter_12 │ │ ├── adding_ship_image │ │ │ ├── alien_invasion.py │ │ │ ├── images │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── piloting_the_ship │ │ │ ├── alien_invasion.py │ │ │ ├── images │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── refactoring │ │ │ ├── alien_invasion.py │ │ │ ├── images │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── shooting_bullets │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── images │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ └── starting_the_game_project │ │ │ ├── alien_invasion.py │ │ │ └── settings.py │ ├── chapter_13 │ │ ├── building_alien_fleet │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── creating_first_alien │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── ending_the_game │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── making_fleet_move │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ └── shooting_aliens │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── images │ │ │ ├── alien.bmp │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ ├── chapter_14 │ │ ├── adding_play_button │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── leveling_up │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ └── scoring │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ ├── alien.bmp │ │ │ └── ship.bmp │ │ │ ├── scoreboard.py │ │ │ ├── settings.py │ │ │ └── ship.py │ ├── chapter_15 │ │ ├── plotting_simple_line_graph │ │ │ ├── mpl_squares.py │ │ │ ├── partial_programs │ │ │ │ ├── mpl_squares_0_first_version.py │ │ │ │ ├── mpl_squares_1_labeled.py │ │ │ │ ├── mpl_squares_2_corrected_plot.py │ │ │ │ ├── mpl_squares_3_style_seaborn.py │ │ │ │ ├── scatter_squares_0_first_version.py │ │ │ │ ├── scatter_squares_1_labeled.py │ │ │ │ ├── scatter_squares_2_series_of_points.py │ │ │ │ ├── scatter_squares_3_calculating_automatically.py │ │ │ │ ├── scatter_squares_4_custom_tick_labels.py │ │ │ │ └── scatter_squares_5_colormap.py │ │ │ └── scatter_squares.py │ │ ├── random_walks │ │ │ ├── partial_programs │ │ │ │ ├── random_walk.py │ │ │ │ ├── rw_visual_0_first_version.py │ │ │ │ ├── rw_visual_1_multiple_walks.py │ │ │ │ ├── rw_visual_2_coloring_points.py │ │ │ │ ├── rw_visual_3_starting_ending_points.py │ │ │ │ ├── rw_visual_4_cleaning_axes.py │ │ │ │ └── rw_visual_5_adding_plot_points.py │ │ │ ├── random_walk.py │ │ │ └── rw_visual.py │ │ └── rolling_dice │ │ │ ├── dice_visual.py │ │ │ ├── dice_visual_d6d10.py │ │ │ ├── die.py │ │ │ ├── die_visual.py │ │ │ └── partial_programs │ │ │ ├── dice_visual_0_first_version.py │ │ │ ├── dice_visual_1_further_customizations.py │ │ │ ├── dice_visual_d6d10.py │ │ │ ├── die.py │ │ │ ├── die_visual_0_first_version.py │ │ │ ├── die_visual_1_analyzing_results.py │ │ │ ├── die_visual_2_making_histogram.py │ │ │ └── die_visual_3_customizing_plot.py │ ├── chapter_16 │ │ ├── mapping_global_datasets │ │ │ ├── eq_data │ │ │ │ ├── eq_data_1_day_m1.geojson │ │ │ │ ├── eq_data_30_day_m1.geojson │ │ │ │ ├── eq_data_7_day_m1.geojson │ │ │ │ ├── readable_eq_data.geojson │ │ │ │ ├── world_fires_1_day.csv │ │ │ │ └── world_fires_7_day.csv │ │ │ ├── eq_explore_data.py │ │ │ ├── eq_world_map.py │ │ │ └── partial_programs │ │ │ │ ├── eq_data │ │ │ │ ├── eq_data_1_day_m1.geojson │ │ │ │ ├── eq_data_30_day_m1.geojson │ │ │ │ ├── eq_data_7_day_m1.geojson │ │ │ │ ├── readable_eq_data.geojson │ │ │ │ ├── world_fires_1_day.csv │ │ │ │ └── world_fires_7_day.csv │ │ │ │ ├── eq_explore_data_0_first_version.py │ │ │ │ ├── eq_explore_data_1_list_all_earthquakes.py │ │ │ │ ├── eq_explore_data_2_extract_magnitudes.py │ │ │ │ ├── eq_explore_data_3_extract_location_data.py │ │ │ │ ├── eq_world_map_0_first_version.py │ │ │ │ ├── eq_world_map_1_representing_magnitudes.py │ │ │ │ ├── eq_world_map_2_custom_marker_colors.py │ │ │ │ └── eq_world_map_3_adding_hover_text.py │ │ └── the_csv_file_format │ │ │ ├── death_valley_highs_lows.py │ │ │ ├── partial_programs │ │ │ ├── death_valley_highs_lows_0_first_version.py │ │ │ ├── death_valley_highs_lows_1_no_try_catch.py │ │ │ ├── death_valley_highs_lows_2_with_try_catch.py │ │ │ ├── sitka_highs_0_first_version.py │ │ │ ├── sitka_highs_1_headers_positions.py │ │ │ ├── sitka_highs_2_extracting_reading_data.py │ │ │ ├── sitka_highs_3_plotting_data.py │ │ │ ├── sitka_highs_4_plotting_dates.py │ │ │ ├── sitka_highs_5_longer_timeframe.py │ │ │ ├── sitka_highs_lows_0_first_version.py │ │ │ ├── sitka_highs_lows_1_shading_area.py │ │ │ └── weather_data │ │ │ │ ├── death_valley_2021_full.csv │ │ │ │ ├── death_valley_2021_simple.csv │ │ │ │ ├── sitka_weather_07-2021_simple.csv │ │ │ │ ├── sitka_weather_2021_full.csv │ │ │ │ ├── sitka_weather_2021_simple-original.csv │ │ │ │ └── sitka_weather_2021_simple.csv │ │ │ ├── sitka_highs.py │ │ │ ├── sitka_highs_lows.py │ │ │ └── weather_data │ │ │ ├── death_valley_2021_full.csv │ │ │ ├── death_valley_2021_simple.csv │ │ │ ├── sitka_weather_07-2021_simple.csv │ │ │ ├── sitka_weather_2021_full.csv │ │ │ ├── sitka_weather_2021_simple-original.csv │ │ │ └── sitka_weather_2021_simple.csv │ ├── chapter_17 │ │ ├── hn_article.py │ │ ├── hn_submissions.py │ │ ├── partial_programs │ │ │ ├── hn_article.py │ │ │ ├── hn_submissions.py │ │ │ ├── python_repos_0_first_version.py │ │ │ ├── python_repos_1_working_with_response_dict.py │ │ │ ├── python_repos_2_examine_first_repo.py │ │ │ ├── python_repos_3_summarizing_top_repos.py │ │ │ ├── python_repos_visual_0_first_version.py │ │ │ ├── python_repos_visual_1_styling_chart.py │ │ │ ├── python_repos_visual_2_custom_tooltips.py │ │ │ ├── python_repos_visual_3_clickable_links.py │ │ │ └── python_repos_visual_4_custom_marker_colors.py │ │ ├── python_repos.py │ │ └── python_repos_visual.py │ ├── chapter_18 │ │ ├── building_additional_pages │ │ │ ├── learning_logs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_entry.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── learning_logs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── topic.html │ │ │ │ │ │ └── topics.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── manage.py │ │ ├── making_pages │ │ │ ├── learning_logs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_entry.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── learning_logs │ │ │ │ │ │ └── index.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── manage.py │ │ ├── setting_up_project │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── manage.py │ │ └── starting_an_app │ │ │ ├── learning_logs │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_entry.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── tests.py │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ │ └── manage.py │ ├── chapter_19 │ │ ├── allowing_users_to_enter_data │ │ │ ├── learning_logs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── forms.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_entry.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── learning_logs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── new_entry.html │ │ │ │ │ │ ├── new_topic.html │ │ │ │ │ │ ├── topic.html │ │ │ │ │ │ └── topics.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── manage.py │ │ ├── allowing_users_to_own_their_data │ │ │ ├── accounts │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── registration │ │ │ │ │ │ ├── login.html │ │ │ │ │ │ └── register.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── learning_logs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── forms.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_entry.py │ │ │ │ │ ├── 0003_topic_owner.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── learning_logs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── new_entry.html │ │ │ │ │ │ ├── new_topic.html │ │ │ │ │ │ ├── topic.html │ │ │ │ │ │ └── topics.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── manage.py │ │ └── setting_up_user_accounts │ │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── registration │ │ │ │ │ ├── login.html │ │ │ │ │ └── register.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ │ ├── learning_logs │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_entry.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── learning_logs │ │ │ │ │ ├── base.html │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── new_entry.html │ │ │ │ │ ├── new_topic.html │ │ │ │ │ ├── topic.html │ │ │ │ │ └── topics.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ │ └── manage.py │ ├── chapter_20 │ │ ├── deploying_learning_log │ │ │ ├── .gitignore │ │ │ ├── .platform.app.yaml │ │ │ ├── .platform │ │ │ │ ├── local │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── README.txt │ │ │ │ │ └── project.yaml │ │ │ │ ├── routes.yaml │ │ │ │ └── services.yaml │ │ │ ├── accounts │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── registration │ │ │ │ │ │ ├── login.html │ │ │ │ │ │ └── register.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── learning_logs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── forms.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_entry.py │ │ │ │ │ ├── 0003_topic_owner.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── learning_logs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── new_entry.html │ │ │ │ │ │ ├── new_topic.html │ │ │ │ │ │ ├── topic.html │ │ │ │ │ │ └── topics.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ ├── manage.py │ │ │ ├── requirements.txt │ │ │ ├── requirements_remote.txt │ │ │ └── templates │ │ │ │ ├── 404.html │ │ │ │ └── 500.html │ │ └── styling_learning_log │ │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── registration │ │ │ │ │ ├── login.html │ │ │ │ │ └── register.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ │ ├── learning_logs │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_entry.py │ │ │ │ ├── 0003_topic_owner.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── learning_logs │ │ │ │ │ ├── base.html │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── new_entry.html │ │ │ │ │ ├── new_topic.html │ │ │ │ │ ├── topic.html │ │ │ │ │ └── topics.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ │ └── manage.py │ ├── cheat_sheets │ │ ├── beginners_python_cheat_sheet_all.zip │ │ ├── bw_sheets │ │ │ ├── beginners_python_cheat_sheet_pcc_all_bw.pdf │ │ │ └── individual_sheets_bw │ │ │ │ ├── beginners_python_cheat_sheet_pcc_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_classes_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_dictionaries_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_django_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_files_exceptions_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_functions_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_git_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_if_while_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_lists_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_matplotlib_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_plotly_bw.pdf │ │ │ │ ├── beginners_python_cheat_sheet_pcc_pygame_bw.pdf │ │ │ │ └── beginners_python_cheat_sheet_pcc_testing_bw.pdf │ │ └── color_sheets │ │ │ ├── beginners_python_cheat_sheet_pcc_all.pdf │ │ │ └── individual_sheets_color │ │ │ ├── beginners_python_cheat_sheet_pcc.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_classes.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_dictionaries.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_django.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_files_exceptions.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_functions.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_git.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_if_while.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_lists.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_matplotlib.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_plotly.pdf │ │ │ ├── beginners_python_cheat_sheet_pcc_pygame.pdf │ │ │ └── beginners_python_cheat_sheet_pcc_testing.pdf │ ├── online_resources_site │ │ ├── docs │ │ │ ├── cheat_sheets.md │ │ │ ├── contact.md │ │ │ ├── images │ │ │ │ ├── mp_logo_200px.png │ │ │ │ ├── pcc_3e_cheat_sheet_image.png │ │ │ │ ├── pcc_3e_cheat_sheet_image_250px.png │ │ │ │ ├── pcc_3e_cheat_sheet_image_corner.png │ │ │ │ ├── pcc_3e_cover-170px.png │ │ │ │ ├── pcc_3e_cover.png │ │ │ │ ├── pcc_printing_page.png │ │ │ │ ├── pcc_printing_page_outlined.png │ │ │ │ ├── pcc_snake_favicon-48px.png │ │ │ │ ├── pcc_snake_favicon-600px.png │ │ │ │ ├── pcc_snake_favicon-96px.png │ │ │ │ ├── pcc_snake_logo.png │ │ │ │ ├── solutions_images │ │ │ │ │ ├── automatic_indexes.png │ │ │ │ │ ├── blog_home_page_styled.png │ │ │ │ │ ├── colored_cubes.png │ │ │ │ │ ├── cubes_5.png │ │ │ │ │ ├── cubes_5000.png │ │ │ │ │ ├── death_valley_highs_lows_comparison.png │ │ │ │ │ ├── die_comprehension.png │ │ │ │ │ ├── eq_world_map_automated_title.png │ │ │ │ │ ├── eq_world_map_refactored.png │ │ │ │ │ ├── hn_discussions_visual.png │ │ │ │ │ ├── javascript_repos.png │ │ │ │ │ ├── ll_register_after_styling.png │ │ │ │ │ ├── ll_register_before_styling.png │ │ │ │ │ ├── molecular_motion.png │ │ │ │ │ ├── multiplication.png │ │ │ │ │ ├── sitka_death_valley_comparison.png │ │ │ │ │ ├── sitka_highs_lows_comparison.png │ │ │ │ │ ├── sitka_rainfall.png │ │ │ │ │ ├── three_dice.png │ │ │ │ │ ├── two_d8.png │ │ │ │ │ └── world_fires.png │ │ │ │ └── vs_code_screenshots │ │ │ │ │ ├── python_option.png │ │ │ │ │ ├── run_debug_icon.png │ │ │ │ │ ├── vs_code_debug_console_output.png │ │ │ │ │ └── vs_code_default_output.png │ │ │ ├── index.md │ │ │ ├── new_in_3e.md │ │ │ ├── newsletter.md │ │ │ ├── setup_instructions │ │ │ │ ├── configuring_vs_code.md │ │ │ │ └── index.md │ │ │ ├── solutions │ │ │ │ ├── chapter_10.md │ │ │ │ ├── chapter_11.md │ │ │ │ ├── chapter_12.md │ │ │ │ ├── chapter_13.md │ │ │ │ ├── chapter_14.md │ │ │ │ ├── chapter_15.md │ │ │ │ ├── chapter_16.md │ │ │ │ ├── chapter_17.md │ │ │ │ ├── chapter_18.md │ │ │ │ ├── chapter_19.md │ │ │ │ ├── chapter_2.md │ │ │ │ ├── chapter_20.md │ │ │ │ ├── chapter_3.md │ │ │ │ ├── chapter_4.md │ │ │ │ ├── chapter_5.md │ │ │ │ ├── chapter_6.md │ │ │ │ ├── chapter_7.md │ │ │ │ ├── chapter_8.md │ │ │ │ ├── chapter_9.md │ │ │ │ └── index.md │ │ │ ├── stylesheets │ │ │ │ └── extra.css │ │ │ └── updates │ │ │ │ ├── first_printing.md │ │ │ │ ├── fourth_printing.md │ │ │ │ ├── index.md │ │ │ │ ├── second_printing.md │ │ │ │ ├── third_printing.md │ │ │ │ └── which_printing.md │ │ └── mkdocs.yml │ └── solution_files │ │ ├── README.md │ │ ├── chapter_02 │ │ ├── famous_quote.py │ │ ├── famous_quote_2.py │ │ ├── famous_quote_3.py │ │ ├── favorite_number.py │ │ ├── file_extensions.py │ │ ├── name_cases.py │ │ ├── personal_message.py │ │ ├── simple_message.py │ │ ├── simple_messages.py │ │ └── stripping_names.py │ │ ├── chapter_03 │ │ ├── changing_guest_list.py │ │ ├── greetings.py │ │ ├── guest_list.py │ │ ├── more_guests.py │ │ ├── names.py │ │ ├── seeing_the_world.py │ │ └── shrinking_guest_list.py │ │ ├── chapter_04 │ │ ├── animals.py │ │ ├── buffet.py │ │ ├── counting_to_twenty.py │ │ ├── cube_comprehension.py │ │ ├── cubes.py │ │ ├── more_loops.py │ │ ├── my_pizzas_your_pizzas.py │ │ ├── odd_numbers.py │ │ ├── pizzas.py │ │ ├── summing_a_million.py │ │ └── threes.py │ │ ├── chapter_05 │ │ ├── alien_colors_1.py │ │ ├── alien_colors_1_fail.py │ │ ├── alien_colors_2_else_block.py │ │ ├── alien_colors_2_if_block.py │ │ ├── alien_colors_3.py │ │ ├── checking_usernames.py │ │ ├── favorite_fruits.py │ │ ├── hello_admin.py │ │ ├── no_users.py │ │ ├── ordinal_numbers.py │ │ └── stages_of_life.py │ │ ├── chapter_06 │ │ ├── cities.py │ │ ├── favorite_numbers.py │ │ ├── favorite_numbers_6_10.py │ │ ├── favorite_places.py │ │ ├── glossary.py │ │ ├── glossary_2.py │ │ ├── people.py │ │ ├── person.py │ │ ├── pets.py │ │ ├── polling.py │ │ └── rivers.py │ │ ├── chapter_07 │ │ ├── deli.py │ │ ├── dream_vacation.py │ │ ├── movie_tickets.py │ │ ├── multiples_of_ten.py │ │ ├── no_pastrami.py │ │ ├── pizza_toppings.py │ │ ├── rental_car.py │ │ └── restaurant_seating.py │ │ ├── chapter_08 │ │ ├── album.py │ │ ├── album_num_songs.py │ │ ├── archived_messages.py │ │ ├── cars.py │ │ ├── cities.py │ │ ├── city_names.py │ │ ├── favorite_book.py │ │ ├── large_shirts.py │ │ ├── message.py │ │ ├── messages.py │ │ ├── printing_functions.py │ │ ├── printing_models.py │ │ ├── sandwiches.py │ │ ├── sending_messages.py │ │ ├── t_shirt.py │ │ └── user_albums.py │ │ ├── chapter_09 │ │ ├── admin.py │ │ ├── battery_upgrade.py │ │ ├── dice.py │ │ ├── ice_cream_stand.py │ │ ├── imported_admin │ │ │ ├── my_user.py │ │ │ └── user.py │ │ ├── imported_restaurant │ │ │ ├── my_restaurant.py │ │ │ └── restaurant.py │ │ ├── login_attempts.py │ │ ├── lottery.py │ │ ├── lottery_analysis.py │ │ ├── multiple_modules │ │ │ ├── admin.py │ │ │ ├── my_admin.py │ │ │ └── user.py │ │ ├── number_served.py │ │ ├── privileges.py │ │ ├── restaurant.py │ │ ├── three_restaurants.py │ │ └── users.py │ │ ├── chapter_10 │ │ ├── addition.py │ │ ├── addition_calculator.py │ │ ├── alice.txt │ │ ├── cats.txt │ │ ├── cats_and_dogs.py │ │ ├── common_words.py │ │ ├── dogs.txt │ │ ├── favorite_number.json │ │ ├── favorite_number_reader.py │ │ ├── favorite_number_remembered.py │ │ ├── favorite_number_writer.py │ │ ├── guest.py │ │ ├── guest.txt │ │ ├── guest_book.py │ │ ├── guest_book.txt │ │ ├── learning_c.py │ │ ├── learning_python.py │ │ ├── learning_python.txt │ │ ├── pi_digits.txt │ │ ├── pi_million_digits.txt │ │ ├── silent_cats_and_dogs.py │ │ ├── simpler_code_file_reader.py │ │ ├── simpler_code_pi_birthday.py │ │ ├── simpler_code_pi_string.py │ │ ├── user_dictionary.py │ │ ├── user_info.json │ │ ├── username.json │ │ ├── verify_user.py │ │ └── verify_user_clean.py │ │ ├── chapter_11 │ │ ├── city_country │ │ │ ├── city_functions.py │ │ │ └── test_cities.py │ │ ├── employee │ │ │ ├── employee.py │ │ │ └── test_employee.py │ │ ├── employee_with_fixture │ │ │ ├── employee.py │ │ │ └── test_employee.py │ │ └── population │ │ │ ├── city_functions.py │ │ │ ├── city_functions_pop_optional.py │ │ │ └── test_cities.py │ │ ├── chapter_12 │ │ ├── ex_12_1_blue_sky │ │ │ ├── blue_sky_game.py │ │ │ └── settings.py │ │ ├── ex_12_2_game_character │ │ │ ├── bird.py │ │ │ ├── blue_bird_game.py │ │ │ ├── images │ │ │ │ └── bird_small.bmp │ │ │ └── settings.py │ │ ├── ex_12_4_rocket │ │ │ ├── images │ │ │ │ ├── rocket.png │ │ │ │ └── rocket_small.png │ │ │ ├── rocket.py │ │ │ ├── rocket_game.py │ │ │ └── settings.py │ │ ├── ex_12_5_keys │ │ │ ├── key_game.py │ │ │ └── settings.py │ │ └── ex_12_6_sideways_shooter │ │ │ ├── bullet.py │ │ │ ├── images │ │ │ └── rocket_small.png │ │ │ ├── settings.py │ │ │ ├── ship.py │ │ │ └── sideways_shooter.py │ │ ├── chapter_13 │ │ ├── ex_13_1_stars │ │ │ ├── images │ │ │ │ ├── star.png │ │ │ │ └── star_original.png │ │ │ ├── settings.py │ │ │ ├── star.py │ │ │ └── stars_game.py │ │ ├── ex_13_2_better_stars │ │ │ ├── images │ │ │ │ ├── star.png │ │ │ │ └── star_original.png │ │ │ ├── settings.py │ │ │ ├── star.py │ │ │ └── stars_game.py │ │ ├── ex_13_2_better_stars_alternate │ │ │ ├── images │ │ │ │ ├── star.png │ │ │ │ └── star_original.png │ │ │ ├── settings.py │ │ │ ├── star.py │ │ │ └── stars_game.py │ │ ├── ex_13_3_raindrops │ │ │ ├── images │ │ │ │ └── raindrop.png │ │ │ ├── raindrop.py │ │ │ ├── raindrops_game.py │ │ │ └── settings.py │ │ ├── ex_13_4_steady_rain │ │ │ ├── images │ │ │ │ └── raindrop.png │ │ │ ├── raindrop.py │ │ │ ├── raindrops_game.py │ │ │ └── settings.py │ │ ├── ex_13_5_sideways_shooter_2 │ │ │ ├── alien.py │ │ │ ├── bullet.py │ │ │ ├── images │ │ │ │ ├── GreenUFO_NoDmg.png │ │ │ │ ├── alien_ship.png │ │ │ │ └── rocket_small.png │ │ │ ├── settings.py │ │ │ ├── ship.py │ │ │ └── sideways_shooter.py │ │ └── ex_13_6_game_over │ │ │ ├── alien.py │ │ │ ├── bullet.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ ├── GreenUFO_NoDmg.png │ │ │ ├── alien_ship.png │ │ │ └── rocket_small.png │ │ │ ├── settings.py │ │ │ ├── ship.py │ │ │ └── sideways_shooter.py │ │ ├── chapter_14 │ │ ├── ex_14_1_p_to_play │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── ex_14_2_target_practice │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── GreenUFO_NoDmg.png │ │ │ │ ├── alien_ship.png │ │ │ │ └── rocket_small.png │ │ │ ├── settings.py │ │ │ ├── ship.py │ │ │ ├── target.py │ │ │ └── target_practice.py │ │ ├── ex_14_3_challenging_tp │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── GreenUFO_NoDmg.png │ │ │ │ ├── alien_ship.png │ │ │ │ └── rocket_small.png │ │ │ ├── settings.py │ │ │ ├── ship.py │ │ │ ├── target.py │ │ │ └── target_practice.py │ │ ├── ex_14_4_difficulty_levels │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── ex_14_4_difficulty_levels_toggle │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── ex_14_5_high_score │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── images │ │ │ │ ├── alien.bmp │ │ │ │ └── ship.bmp │ │ │ ├── scoreboard.py │ │ │ ├── settings.py │ │ │ └── ship.py │ │ └── ex_14_6_refactoring │ │ │ ├── alien.py │ │ │ ├── alien_invasion.py │ │ │ ├── bullet.py │ │ │ ├── button.py │ │ │ ├── game_stats.py │ │ │ ├── high_score.json │ │ │ ├── images │ │ │ ├── alien.bmp │ │ │ └── ship.bmp │ │ │ ├── scoreboard.py │ │ │ ├── settings.py │ │ │ └── ship.py │ │ ├── chapter_15 │ │ ├── cubes_5.py │ │ ├── cubes_5000.py │ │ ├── cubes_colormap.py │ │ ├── die.py │ │ ├── die_comprehension.py │ │ ├── molecular_motion.py │ │ ├── multiplication.py │ │ ├── random_walk.py │ │ ├── random_walk_refactored.py │ │ ├── rw_visual.py │ │ ├── three_dice.py │ │ └── two_d8.py │ │ ├── chapter_16 │ │ ├── automatic_indexes.py │ │ ├── death_valley_highs_lows_comparison.py │ │ ├── eq_data │ │ │ ├── eq_data_30_day_m1.geojson │ │ │ └── world_fires_1_day.csv │ │ ├── eq_world_map_automated_title.py │ │ ├── eq_world_map_refactored.py │ │ ├── sitka_death_valley_comparison.py │ │ ├── sitka_highs_lows_comparison.py │ │ ├── sitka_rainfall.py │ │ ├── weather_data │ │ │ ├── death_valley_2021_simple.csv │ │ │ ├── sitka_weather_2021_full.csv │ │ │ └── sitka_weather_2021_simple.csv │ │ └── world_fires.py │ │ ├── chapter_17 │ │ ├── hn_discussions_visual.py │ │ ├── javascript_repos.py │ │ ├── python_repos.py │ │ ├── python_repos_tested.py │ │ ├── test_python_repos.py │ │ └── test_python_repos_with_fixture.py │ │ ├── chapter_18 │ │ ├── ex_18_1_new_projects │ │ │ ├── manage.py │ │ │ └── tg_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ ├── ex_18_4_pizzeria │ │ │ ├── manage.py │ │ │ ├── pizzas │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── tests.py │ │ │ │ └── views.py │ │ │ └── pizzeria_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ ├── ex_18_5_meal_planner │ │ │ ├── manage.py │ │ │ ├── meal_plans │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_mealitem_meal.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── meal_plans │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── meal.html │ │ │ │ │ │ └── meals.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ └── mp_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ ├── ex_18_6_pizzeria_home_page │ │ │ ├── manage.py │ │ │ ├── pizzas │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── pizzas │ │ │ │ │ │ └── index.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ └── pizzeria_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ └── ex_18_8_pizzeria_pages │ │ │ ├── manage.py │ │ │ ├── pizzas │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── pizzas │ │ │ │ │ ├── base.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── pizza.html │ │ │ │ │ └── pizzas.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ │ └── pizzeria_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ ├── chapter_19 │ │ ├── ex_19_1_blog │ │ │ ├── blog_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ ├── blogs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── forms.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── blogs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── blog.html │ │ │ │ │ │ ├── blogs.html │ │ │ │ │ │ ├── edit_post.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── new_blog.html │ │ │ │ │ │ └── new_post.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ └── manage.py │ │ ├── ex_19_2_blog_accounts │ │ │ ├── accounts │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── registration │ │ │ │ │ │ ├── login.html │ │ │ │ │ │ └── register.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── blog_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ ├── blogs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── forms.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── blogs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── blog.html │ │ │ │ │ │ ├── blogs.html │ │ │ │ │ │ ├── edit_post.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── new_blog.html │ │ │ │ │ │ └── new_post.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ └── manage.py │ │ ├── ex_19_3_refactoring │ │ │ ├── accounts │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── registration │ │ │ │ │ │ ├── login.html │ │ │ │ │ │ └── register.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── learning_logs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── forms.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_entry.py │ │ │ │ │ ├── 0003_topic_owner.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── learning_logs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── new_entry.html │ │ │ │ │ │ ├── new_topic.html │ │ │ │ │ │ ├── topic.html │ │ │ │ │ │ └── topics.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── manage.py │ │ ├── ex_19_4_protecting_new_entry │ │ │ ├── accounts │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── registration │ │ │ │ │ │ ├── login.html │ │ │ │ │ │ └── register.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── learning_logs │ │ │ │ ├── __init__.py │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── forms.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── 0002_entry.py │ │ │ │ │ ├── 0003_topic_owner.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── templates │ │ │ │ │ └── learning_logs │ │ │ │ │ │ ├── base.html │ │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── new_entry.html │ │ │ │ │ │ ├── new_topic.html │ │ │ │ │ │ ├── topic.html │ │ │ │ │ │ └── topics.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ ├── ll_project │ │ │ │ ├── __init__.py │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── manage.py │ │ └── ex_19_5_protected_blog │ │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── registration │ │ │ │ │ ├── login.html │ │ │ │ │ └── register.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ │ ├── blog_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ │ ├── blogs │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_blog_owner.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── blogs │ │ │ │ │ ├── base.html │ │ │ │ │ ├── blog.html │ │ │ │ │ ├── blogs.html │ │ │ │ │ ├── edit_post.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── new_blog.html │ │ │ │ │ └── new_post.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ │ └── manage.py │ │ └── chapter_20 │ │ ├── ex_20_1_other_forms │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── registration │ │ │ │ │ ├── login.html │ │ │ │ │ └── register.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── learning_logs │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_entry.py │ │ │ │ ├── 0003_topic_owner.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── learning_logs │ │ │ │ │ ├── base.html │ │ │ │ │ ├── edit_entry.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── new_entry.html │ │ │ │ │ ├── new_topic.html │ │ │ │ │ ├── topic.html │ │ │ │ │ └── topics.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── ll_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ └── manage.py │ │ ├── ex_20_2_stylish_blog │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── registration │ │ │ │ │ ├── login.html │ │ │ │ │ └── register.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── blog_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ ├── blogs │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_blog_owner.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── blogs │ │ │ │ │ ├── base.html │ │ │ │ │ ├── blog.html │ │ │ │ │ ├── blogs.html │ │ │ │ │ ├── edit_post.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── new_blog.html │ │ │ │ │ └── new_post.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── manage.py │ │ ├── ex_20_3_live_blog │ │ ├── .gitignore │ │ ├── .platform.app.yaml │ │ ├── .platform │ │ │ ├── local │ │ │ │ ├── .gitignore │ │ │ │ ├── README.txt │ │ │ │ └── project.yaml │ │ │ ├── routes.yaml │ │ │ └── services.yaml │ │ ├── accounts │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── registration │ │ │ │ │ ├── login.html │ │ │ │ │ └── register.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── blog_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ ├── blogs │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_blog_owner.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── blogs │ │ │ │ │ ├── base.html │ │ │ │ │ ├── blog.html │ │ │ │ │ ├── blogs.html │ │ │ │ │ ├── edit_post.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── new_blog.html │ │ │ │ │ └── new_post.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── manage.py │ │ ├── requirements.txt │ │ ├── requirements_remote.txt │ │ └── templates │ │ │ ├── 404.html │ │ │ └── 500.html │ │ └── ex_20_4_extended │ │ ├── .gitignore │ │ ├── .platform.app.yaml │ │ ├── .platform │ │ ├── local │ │ │ ├── .gitignore │ │ │ ├── README.txt │ │ │ └── project.yaml │ │ ├── routes.yaml │ │ └── services.yaml │ │ ├── accounts │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── registration │ │ │ │ ├── login.html │ │ │ │ └── register.html │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ │ ├── learning_logs │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── forms.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_entry.py │ │ │ ├── 0003_topic_owner.py │ │ │ ├── 0004_topic_public.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── learning_logs │ │ │ │ ├── base.html │ │ │ │ ├── edit_entry.html │ │ │ │ ├── index.html │ │ │ │ ├── new_entry.html │ │ │ │ ├── new_topic.html │ │ │ │ ├── topic.html │ │ │ │ └── topics.html │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ │ ├── ll_project │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ │ ├── manage.py │ │ ├── requirements.txt │ │ ├── requirements_remote.txt │ │ └── templates │ │ ├── 404.html │ │ └── 500.html └── readme.md ├── 03_gpts ├── 01_location_action │ ├── location.py │ ├── readme.md │ ├── test_location.py │ └── with_db.py ├── 02_sql_model │ ├── model.py │ ├── readme.md │ └── requirements.txt ├── 03_simple_hero_api │ ├── main.py │ └── readme.md ├── 04_session_dependency │ └── readme.md ├── 05_production_ready_project │ └── readme.md └── readme.md ├── 04_everything_is_an_api ├── 00_concept │ └── readme.md ├── 01_requests │ ├── requests.ipynb │ └── requirements.txt ├── 02_pydantic │ ├── code.ipynb │ ├── model.ipynb │ ├── requirements.txt │ └── validators.ipynb ├── 03_serverless_postgresql_database │ ├── 00_helloworld │ │ ├── connection_string.png │ │ ├── hello.ipynb │ │ ├── readme.md │ │ └── requirements.txt │ ├── 01_create_insert_select │ │ └── statements.ipynb │ ├── 02_session │ │ └── session.ipynb │ ├── 03_orm_one_to_many │ │ └── orm.ipynb │ ├── 04_orm_query │ │ └── readme.md │ ├── 05_class_inheritance │ │ └── readme.md │ └── readme.md ├── 04_pytest │ ├── readme.md │ ├── requirements.txt │ ├── test_class.py │ ├── test_sample.py │ ├── test_sysexit.py │ └── tests │ │ ├── test_class.py │ │ ├── test_class_demo.py │ │ └── test_sample.py ├── 05_docstring │ ├── pydocs.ipynb │ └── readme.md ├── 06_ai_assisted_development │ ├── file1.py │ ├── file2.py │ └── readme.md ├── 07_fastapi │ ├── 01_modern_web │ │ └── readme.md │ ├── 02_hello │ │ ├── check.py │ │ ├── hello.py │ │ ├── hello1.py │ │ ├── readme.md │ │ ├── requirements.txt │ │ ├── test_requests.py │ │ └── tests │ │ │ └── test_url.py │ ├── 03_hello_who │ │ ├── 01_url_path │ │ │ ├── hello.py │ │ │ ├── hello_internally.py │ │ │ ├── readme.md │ │ │ └── test_url_path.py │ │ ├── 02_query_parameters │ │ │ ├── hello.py │ │ │ ├── readme.md │ │ │ └── test_query_param.py │ │ ├── 03_body │ │ │ ├── hello.py │ │ │ ├── readme.md │ │ │ └── test_body.py │ │ ├── 04_http_header │ │ │ ├── hello.py │ │ │ ├── readme.md │ │ │ └── test_header.py │ │ ├── 05_header_return │ │ │ ├── hello.py │ │ │ ├── readme.md │ │ │ └── test.py │ │ └── readme.md │ ├── 04_pydantic │ │ ├── data.py │ │ ├── model.py │ │ ├── readme.md │ │ ├── test.py │ │ └── web.py │ ├── 05_dependencies │ │ ├── .env_bak │ │ ├── 01_hello.py │ │ ├── 02_hello.py │ │ ├── 03_hello.py │ │ ├── 04_hello.py │ │ ├── 05_hello.py │ │ ├── 06_sqlalchemy_injection.py │ │ ├── 07_openai_chat_api_test.py │ │ ├── main.py │ │ ├── openai_chat_api.py │ │ ├── readme.md │ │ └── test_dependency_injection.py │ └── readme.md ├── 08_fastapi_todo │ ├── 01_todo_api_project │ │ └── readme.md │ └── readme.md ├── 09_formats │ ├── json │ │ ├── code.ipynb │ │ └── readme.md │ ├── markdown │ │ └── readme.md │ └── readme.md ├── 10_http_streaming_api │ ├── client.ipynb │ ├── client1.py │ ├── hello.py │ ├── integration_with_openai.md │ └── readme.md ├── 11_websockets │ ├── hello.py │ ├── readme.md │ └── stapp.py ├── 12_openapi │ └── readme.md ├── 13_oauth2 │ ├── 00_helloworld │ │ ├── 01_first_steps │ │ │ ├── main.py │ │ │ └── readme.md │ │ ├── 02_get_current_user │ │ │ ├── main.py │ │ │ └── readme.md │ │ ├── 03_simple_oauth2 │ │ │ ├── main.py │ │ │ └── readme.md │ │ └── readme.md │ ├── 01_basic_auth │ │ ├── data.py │ │ ├── main.py │ │ ├── models.py │ │ ├── readme.md │ │ ├── requirements.txt │ │ └── service.py │ ├── 02_jwt_auth │ │ ├── 01_hashing_and_access_tokens │ │ │ ├── data.py │ │ │ ├── main.py │ │ │ ├── models.py │ │ │ ├── readme.md │ │ │ ├── requirements.txt │ │ │ └── service.py │ │ └── 02_refresh_tokens │ │ │ ├── data.py │ │ │ ├── main.py │ │ │ ├── models.py │ │ │ ├── readme.md │ │ │ ├── requirements.txt │ │ │ └── service.py │ ├── 03_google_auth │ │ ├── .gitignore │ │ ├── main.py │ │ ├── nextjs-flow │ │ │ ├── .eslintrc.json │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── app │ │ │ │ ├── favicon.ico │ │ │ │ ├── globals.css │ │ │ │ ├── layout.tsx │ │ │ │ ├── page.tsx │ │ │ │ └── user │ │ │ │ │ └── page.tsx │ │ │ ├── components.json │ │ │ ├── components │ │ │ │ └── ui │ │ │ │ │ └── button.tsx │ │ │ ├── lib │ │ │ │ └── utils.ts │ │ │ ├── middleware.ts │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pnpm-lock.yaml │ │ │ ├── postcss.config.js │ │ │ ├── public │ │ │ │ ├── next.svg │ │ │ │ └── vercel.svg │ │ │ ├── tailwind.config.ts │ │ │ └── tsconfig.json │ │ ├── readme.md │ │ └── requirements.txt │ ├── 04_authentication │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── readme.md │ │ ├── requirements.txt │ │ └── src │ │ │ ├── __init__.py │ │ │ ├── data │ │ │ ├── __init__.py │ │ │ └── auth.py │ │ │ ├── main.py │ │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── auth.py │ │ │ └── sqlalchemy_models.py │ │ │ ├── placeholder_client_secret.json │ │ │ ├── service │ │ │ ├── __init__.py │ │ │ └── auth.py │ │ │ ├── utils │ │ │ ├── __init__.py │ │ │ ├── db_dep.py │ │ │ └── helpers.py │ │ │ └── web │ │ │ ├── __init__.py │ │ │ └── auth.py │ └── readme.md ├── 14_microservices │ └── readme.md ├── 15_realtime_data_streams │ └── readme.md ├── 16_realtime_todo_project │ └── readme.md ├── 17_async_api │ ├── 00_http_request_websocket_response.md │ ├── 01_http_request_sse_response.md │ └── readme.md ├── 18_audio │ └── readme.md ├── 19_next_fastapi │ ├── .eslintrc.json │ ├── .gitignore │ ├── README.md │ ├── api │ │ └── index.py │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── src │ │ └── app │ │ │ ├── favicon.ico │ │ │ ├── globals.css │ │ │ ├── layout.tsx │ │ │ └── page.tsx │ ├── tailwind.config.ts │ └── tsconfig.json ├── 20_fastapi_sqlmodel_template │ └── readme.md └── 21_celery │ └── readme.md ├── 05_microservices_all_in_one_platform ├── 00_what_is_a_microservice │ ├── microservices.png │ └── readme.md ├── 01_what_is_a_microservices_application │ ├── app.png │ └── readme.md ├── 02_whats_wrong_with_the_monolith │ └── readme.md ├── 03_microservices_all_in_one_platform │ ├── arch.jpeg │ ├── readme.md │ └── tech_stack.jpeg ├── 04_is_microservices_a_passing_fad │ └── readme.md ├── 05_domain_driven_design │ └── readme.md ├── 06_best_practices │ ├── best.jpeg │ └── readme.md ├── 07_design_patterns │ └── design_patterns.pdf ├── 08_git_microservices │ └── readme.md ├── 09_create_project │ ├── Fast Api with Poetry Steps.txt │ ├── README.md │ ├── project_youtube │ │ ├── README.md │ │ ├── dist │ │ │ ├── project_youtube-0.1.0-py3-none-any.whl │ │ │ └── project_youtube-0.1.0.tar.gz │ │ ├── poetry.lock │ │ ├── project_youtube │ │ │ ├── __init__.py │ │ │ └── main.py │ │ ├── pyproject.toml │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_myproject.py │ └── test_poetry │ │ ├── README.md │ │ ├── pyproject.toml │ │ ├── test_poetry │ │ └── __init__.py │ │ └── tests │ │ └── __init__.py ├── 10_microservice_helloworld │ ├── fastapi-helloworld │ │ ├── README.md │ │ ├── fastapi_helloworld │ │ │ ├── __init__.py │ │ │ └── main.py │ │ ├── poetry.lock │ │ ├── pyproject.toml │ │ └── tests │ │ │ └── __init__.py │ ├── fastapi_helloworld_online │ │ ├── README.md │ │ ├── fastapi_helloworld_online │ │ │ ├── __init__.py │ │ │ └── main.py │ │ ├── poetry.lock │ │ ├── pyproject.toml │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_main.py │ └── readme.md ├── 11_microservice_db │ ├── .gitignore │ ├── README.md │ ├── fastapi_neon │ │ ├── __init__.py │ │ ├── main.py │ │ └── settings.py │ ├── poetry.lock │ ├── pyproject.toml │ └── tests │ │ ├── __init__.py │ │ └── test_main.py ├── 12_fastapi_sqlmodel │ ├── fastapi │ │ ├── 00_step_fastapi_helloworld_with_test │ │ │ ├── README.md │ │ │ ├── heroapi_uit │ │ │ │ ├── __init__.py │ │ │ │ └── main.py │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ └── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_main.py │ │ ├── FastAPI Response Model with SQLModel │ │ │ ├── README.md │ │ │ ├── database.db │ │ │ ├── heroapi_uit │ │ │ │ ├── __init__.py │ │ │ │ ├── main.py │ │ │ │ └── settings.py │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ └── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_main.py │ │ ├── Multiple Models with FastAPI │ │ │ ├── README.md │ │ │ ├── database.db │ │ │ ├── heroapi_uit │ │ │ │ ├── __init__.py │ │ │ │ ├── main.py │ │ │ │ └── settings.py │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ └── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_main.py │ │ ├── Simple Hero API with FastAPI │ │ │ ├── README.md │ │ │ ├── database.db │ │ │ ├── heroapi_uit │ │ │ │ ├── __init__.py │ │ │ │ ├── main.py │ │ │ │ └── settings.py │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ └── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_main.py │ │ └── heroapi_uit │ │ │ ├── README.md │ │ │ ├── database.db │ │ │ ├── heroapi_uit │ │ │ ├── __init__.py │ │ │ ├── main.py │ │ │ └── settings.py │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_main.py │ ├── hero_api │ │ ├── README.md │ │ ├── hero_api │ │ │ ├── __init__.py │ │ │ └── main.py │ │ ├── poetry.lock │ │ ├── pyproject.toml │ │ └── tests │ │ │ └── __init__.py │ └── readme.md ├── 13_sqlmodel_databases │ └── readme.md ├── 14_docker │ ├── 00_getting_started_ops │ │ └── readme.md │ ├── 01_containerizing_poetry │ │ ├── README.md │ │ └── test_poetry │ │ │ ├── .dockerignore │ │ │ ├── Dockerfile.dev │ │ │ ├── Dockerfile.prod │ │ │ ├── README.md │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ ├── test_poetry │ │ │ ├── __init__.py │ │ │ └── main.py │ │ │ └── tests │ │ │ └── __init__.py │ ├── 02_containerization │ │ ├── .gitignore │ │ ├── Dockerfile.dev │ │ ├── Dockerfile.prod │ │ ├── README.md │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── main.py │ │ │ └── settings.py │ │ ├── env_backup │ │ ├── mypy.ini │ │ ├── poetry.lock │ │ ├── pyproject.toml │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_main.py │ ├── 03_dev_containers │ │ ├── .devcontainer │ │ │ └── devcontainer.json │ │ ├── .github │ │ │ └── dependabot.yml │ │ ├── .gitignore │ │ ├── Dockerfile.dev │ │ ├── Dockerfile.prod │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── main.py │ │ │ └── settings.py │ │ ├── architecture-containers.png │ │ ├── attach-container.png │ │ ├── cmd1.png │ │ ├── cmd2.png │ │ ├── compose-dev.yaml │ │ ├── env_backup │ │ ├── image.png │ │ ├── mypy.ini │ │ ├── poetry.lock │ │ ├── pyproject.toml │ │ ├── readme.md │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_main.py │ ├── 04_compose │ │ ├── README.md │ │ ├── compose.yaml │ │ └── todo │ │ │ ├── .gitignore │ │ │ ├── Dockerfile.dev │ │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── main.py │ │ │ └── settings.py │ │ │ ├── env_backup │ │ │ ├── mypy.ini │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ ├── readme.md │ │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_main.py │ ├── 05_compose_db │ │ ├── .gitignore │ │ ├── README.md │ │ ├── compose.yaml │ │ └── todo │ │ │ ├── .env │ │ │ ├── Dockerfile.dev │ │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── main.py │ │ │ └── settings.py │ │ │ ├── env_backup │ │ │ ├── mypy.ini │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ ├── readme.md │ │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_main.py │ ├── 06_compose_dev_container │ │ └── README.md │ ├── 07_synchronous_messages │ │ ├── .gitignore │ │ ├── README.md │ │ ├── compose.yaml │ │ ├── order_service │ │ │ ├── Dockerfile.dev │ │ │ ├── app │ │ │ │ ├── __init__.py │ │ │ │ ├── main.py │ │ │ │ └── settings.py │ │ │ ├── env_backup │ │ │ ├── mypy.ini │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ ├── readme.md │ │ │ └── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_main.py │ │ └── user_service │ │ │ ├── Dockerfile.dev │ │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── main.py │ │ │ └── settings.py │ │ │ ├── env_backup │ │ │ ├── mypy.ini │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ ├── readme.md │ │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_main.py │ ├── 08_kafka │ │ └── README.md │ ├── 09_power_bi │ │ └── readme.md │ └── readme.md └── 15_template │ └── readme.md ├── 06_chatgpt ├── 01_hello_world │ ├── .env_bak │ ├── .gitignore │ ├── hello_world.ipynb │ ├── readme.md │ └── requirements.txt ├── 02_multiple_roles │ ├── .env_bak │ ├── .gitignore │ ├── multiple_rules.ipynb │ └── requirements.txt ├── 03_streaming_response │ ├── .env_bak │ ├── .gitignore │ ├── app.py │ ├── requirements.txt │ └── streaming_response.ipynb ├── 04_json_mode │ ├── .env_bak │ ├── .gitignore │ ├── json_mode.ipynb │ └── requirements.txt ├── 05_function_calling │ ├── .env_bak │ ├── .gitignore │ ├── first.png │ ├── function_calling.ipynb │ └── second.png ├── 06_assistants_code_interpreter │ ├── .env_bak │ ├── .gitignore │ ├── assistants.png │ └── assistants_code_interpreter.ipynb ├── 07_assistants_knowledge_retrieval │ ├── .env_bak │ ├── .gitignore │ ├── assistants_knowledge_retrieval.ipynb │ ├── objects.jpeg │ ├── ret.jpg │ └── zia_profile.pdf ├── 08_assistants_function_calling │ ├── .env_bak │ ├── .gitignore │ ├── assistants_function_calling.ipynb │ ├── diagram-2.png │ └── diagram.png ├── 09_projects │ ├── 01_financial_financial_analyst │ │ └── readme.md │ ├── 02_ai_travel_agent │ │ ├── readme.md │ │ └── sample_airbnb_receipt.pdf │ └── 03_automation │ │ └── readme.md ├── 10_multimodal_genai │ ├── 01_text-to-speech │ │ ├── 01_text-to-speech.ipynb │ │ ├── 01_text-to-speech.py │ │ ├── speech.mp3 │ │ ├── streaming.mp3 │ │ └── urdu.mp3 │ ├── 02 Speech to text │ │ ├── chuck_10_25mb.mp3 │ │ ├── code.ipynb │ │ └── urdu.mp3 │ ├── 03_text_to_image │ │ ├── background_image.png │ │ ├── code.ipynb │ │ ├── image.png │ │ ├── masked.png │ │ └── white_cat_from_DALE3.png │ ├── 04_vision │ │ ├── abc.jpeg │ │ └── code.ipynb │ └── readme.md ├── 11_fine_tuning │ ├── .env_bak │ ├── app.ipynb │ ├── message.jsonl │ ├── readme.md │ └── requirement.txt ├── 12_azure_openai │ └── azure_helloworld │ │ └── readme.md └── 13_rag_openai_pinecone │ └── readme.md ├── 07_gemini ├── -01_multimodel_prompting │ ├── hello_world.ipynb │ └── readme.md ├── 00_quickstart │ └── readme.md └── readme.md ├── 08_ui_streamlit ├── 00_helloworld │ ├── hello.py │ ├── readme.md │ └── urdu.mp3 ├── 01_magic │ ├── magic.py │ ├── readme.md │ └── requirements.txt ├── 02_basics │ ├── basics.py │ ├── readme.md │ └── streamlit.png ├── 03_bmi_caulculator_project │ ├── bmi.py │ └── readme.md ├── 04_multipage_apps │ ├── Hello.py │ ├── pages │ │ ├── 1_Profile.py │ │ └── 2_About_US.py │ └── readme.md ├── 05_session_state │ ├── 0_counter_without_session.py │ ├── 1_counter.py │ ├── 2_counter_callbacks.py │ ├── 3_counter_callbacks_args.py │ └── readme.md ├── 06_layout_containers │ ├── columns.py │ ├── container.py │ ├── empty.py │ ├── expander.py │ ├── readme.md │ ├── sidebar.py │ └── tabs.py ├── 07_chat_elements │ ├── chat_input.py │ ├── chat_message.py │ └── readme.md ├── 08_status │ ├── readme.md │ └── status.py ├── 09_secrets_management_native │ ├── .streamlit │ │ └── .gitignore │ ├── native.py │ └── readme.md ├── 10_deploy │ └── readme.md ├── 11_connect │ ├── .streamlit │ │ └── .gitignore │ ├── pets.db │ ├── readme.md │ └── streamlit_app.py ├── 12_chat_app_project │ └── readme.md ├── 13_openai_assistants_project │ └── readme.md ├── 14_multimodal_project │ └── readme.md ├── 15_build_with_chatgpt │ └── readme.md └── readme.md ├── 09_streamlit_genai_apps ├── 01_completion_chat_app │ ├── .env_bak │ ├── .gitignore │ ├── app.py │ ├── database.py │ ├── model.py │ ├── mypy.ini │ ├── readme.md │ └── requirements.txt └── 02_assistant_chat_app │ ├── .env_bak │ ├── .gitignore │ ├── app.py │ ├── model.py │ ├── mypy.ini │ ├── readme.md │ └── requirements.txt ├── 10_streamlit_genai_projects └── readme.md ├── 11_langchain ├── bak │ ├── 00_llm_app_dev │ │ ├── .env_bak │ │ ├── .gitignore │ │ ├── Data.csv │ │ ├── L1-Model_promt_parser.ipynb │ │ ├── L2-Memory.ipynb │ │ ├── L3-Chains.ipynb │ │ ├── L4-QnA.ipynb │ │ ├── L5-Evaluation.ipynb │ │ ├── OutdoorClothingCatalog_1000.csv │ │ ├── embeddings.png │ │ ├── llm.png │ │ ├── open_ai.py │ │ ├── readme.md │ │ ├── requirements.txt │ │ ├── router_chain.png │ │ ├── seq1_chain.png │ │ ├── seq_chain.png │ │ ├── simple_chain.png │ │ ├── vector_db.png │ │ └── vector_db2.png │ ├── 01_functions_tools_agents │ │ └── readme.md │ ├── 02_chat_with_data │ │ └── readme.md │ └── readme.md └── readme.md ├── 12_llm_apps └── readme.md ├── 13_hugging_face └── readme.md ├── 14_personalization └── readme.md ├── 15_llm_cloud_platforms └── readme.md ├── 16_llm_projects └── 01_travel_app_project │ ├── 00_concept_dev │ ├── chat_history.db │ ├── gemini-assistant.ipynb │ ├── openai-streaming.ipynb │ └── readme.md │ ├── 01_fast_api_service │ ├── backend │ │ ├── .dockerignore │ │ ├── .env_bak │ │ ├── Dockerfile │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── data │ │ │ │ ├── __init__.py │ │ │ │ └── openai_streaming.py │ │ │ ├── main.py │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ └── openai_streaming.py │ │ │ ├── service │ │ │ │ ├── __init__.py │ │ │ │ └── openai_streaming.py │ │ │ └── web │ │ │ │ ├── __init__.py │ │ │ │ └── openai_streaming.py │ │ ├── chat_history.db │ │ └── requirements.txt │ └── readme.md │ ├── 02_googlecloud_deploy_fastapi │ └── readme.md │ ├── 03_streamlit_nextjs │ ├── nextjs-starter │ │ ├── .env_bak │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── README.md │ │ ├── next.config.js │ │ ├── package.json │ │ ├── pnpm-lock.yaml │ │ ├── postcss.config.js │ │ ├── public │ │ │ ├── ai.png │ │ │ ├── human.png │ │ │ ├── next.svg │ │ │ └── vercel.svg │ │ ├── src │ │ │ ├── app │ │ │ │ ├── api │ │ │ │ │ ├── openai-map │ │ │ │ │ │ └── route.ts │ │ │ │ │ └── streaming-openai │ │ │ │ │ │ └── route.ts │ │ │ │ ├── favicon.ico │ │ │ │ ├── globals.css │ │ │ │ ├── layout.tsx │ │ │ │ ├── page.tsx │ │ │ │ └── ui │ │ │ │ │ └── OpenAIChatBox.tsx │ │ │ └── components │ │ │ │ ├── ChatUI.tsx │ │ │ │ └── GoogleMapComponent.tsx │ │ ├── tailwind.config.ts │ │ └── tsconfig.json │ ├── readme.md │ └── streamlit │ │ ├── .env_bak │ │ ├── app.py │ │ ├── hi_robot.json │ │ ├── lottie_files_credits.txt │ │ └── requirements.txt │ ├── public │ ├── fastapi_deployed.png │ ├── fastapi_docs.png │ ├── nextjs.png │ ├── open_cloud_run.png │ ├── overall_flow.png │ ├── run-config.png │ ├── st-front.png │ └── streamlit-frontend.png │ └── readme.md ├── 17_ai_npcs └── readme.md ├── 18_assignment_projects └── readmd.md ├── 19_ai_agents └── readme.md ├── 20_reasoning_engine_intro └── readme.md ├── 22_future └── readme.md ├── ASSIGNMENTS └── readme.md ├── CERTIFICATIONS └── readme.md ├── README.md ├── assistants.png ├── genai_fit.jpeg ├── opl.jpeg ├── xx_containers_development_deployment ├── 01_local │ ├── 01_containers │ │ ├── 00_helloworld_ops │ │ │ └── readme.md │ │ ├── 01_helloworld_dev_python │ │ │ ├── readme.md │ │ │ └── web │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ └── requirements.txt │ │ ├── 02_dockerfile │ │ │ └── readme.md │ │ ├── 03_push │ │ │ ├── Figure8.1.png │ │ │ └── readme.md │ │ ├── 04_pydantic │ │ │ ├── flask_docker │ │ │ │ ├── Dockerfile │ │ │ │ ├── models.py │ │ │ │ ├── requirements.txt │ │ │ │ └── server.py │ │ │ └── readme.md │ │ ├── 05_volume_mounts │ │ │ ├── EphemeralContainerStorage.png │ │ │ ├── High-level-view-of-volumes-and-containers.png │ │ │ ├── Plugging external storage into Docker.png │ │ │ ├── Sharing storage across cluster nodes.png │ │ │ ├── VolumeDrivers.png │ │ │ ├── bind-mounts.png │ │ │ └── readme.md │ │ ├── 06_yaml │ │ │ ├── config.json │ │ │ ├── config.yaml │ │ │ ├── foo.py │ │ │ ├── foo.yaml │ │ │ ├── readme.md │ │ │ └── requirements.txt │ │ ├── 07_docker_compose │ │ │ ├── Figure9.2.png │ │ │ ├── multi-contianer │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app │ │ │ │ │ ├── app.py │ │ │ │ │ ├── static │ │ │ │ │ │ ├── css │ │ │ │ │ │ │ └── main.css │ │ │ │ │ │ └── images │ │ │ │ │ │ │ └── image.png │ │ │ │ │ └── templates │ │ │ │ │ │ ├── error.html │ │ │ │ │ │ └── index.html │ │ │ │ ├── compose.yaml │ │ │ │ └── requirements.txt │ │ │ └── readme.md │ │ ├── 08_postgres │ │ │ ├── docker-compose.yml │ │ │ └── readme.md │ │ ├── 09_flask_with_postgres │ │ │ └── readme.md │ │ ├── 10_todo_api │ │ │ ├── 00_basic_api │ │ │ │ ├── compose.yaml │ │ │ │ └── web │ │ │ │ │ ├── Dockerfile │ │ │ │ │ ├── app.py │ │ │ │ │ └── requirements.txt │ │ │ └── readme.md │ │ └── xx_deploy_streamlit │ │ │ ├── readme.md │ │ │ └── streamlit-app │ │ │ ├── Dockerfile │ │ │ ├── requirements.txt │ │ │ └── streamlit_app.py │ ├── 02_containers_api_development │ │ └── readme.md │ └── readme.md ├── 02_testing │ └── 01_test_containers │ │ └── readme.md ├── 03_deploy_cloud │ ├── 01_google_cloud_run │ │ ├── 01_containers_api_deploy │ │ │ └── google │ │ │ │ ├── 00_helloworld_cloud │ │ │ │ ├── helloworld │ │ │ │ │ ├── main.py │ │ │ │ │ └── requirements.txt │ │ │ │ └── readme.md │ │ │ │ └── 01_helloworld_local │ │ │ │ ├── helloworld │ │ │ │ ├── Dockerfile │ │ │ │ ├── main.py │ │ │ │ └── requirements.txt │ │ │ │ └── readme.md │ │ └── 02_serverless_python │ │ │ ├── 00_sam_helloworld │ │ │ └── readme.md │ │ │ ├── 01_terraform_helloworld │ │ │ └── readme.md │ │ │ └── readme.md │ ├── 02_azure_container_apps │ │ └── readme.md │ ├── 03_kubernetes │ │ └── readme.md │ ├── 04_terraform │ │ └── readme.md │ └── 05_integrated_project │ │ ├── 00_project_structure │ │ ├── quiz_ai │ │ │ └── model.py │ │ └── readme.md │ │ └── readme.md ├── 04_cloud_development_environment │ └── readme.md └── readme.md ├── xx_design_patterns └── readme.md ├── xx_docker_nextjs └── readme.md ├── xx_fintech └── readme.md └── xx_vlogger └── readme.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | *.env 3 | .vscode 4 | .DS_Store 5 | .DS_Store 6 | __pycache__ -------------------------------------------------------------------------------- /01_gen_ai_for_everyone/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/01_gen_ai_for_everyone/app.png -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | __pycache__/ 4 | *.pyc 5 | 6 | *_env/ 7 | .venv*/ 8 | 9 | online_resources_site/site/ 10 | 11 | *.sqlite3 12 | 13 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_01/hello_world.py: -------------------------------------------------------------------------------- 1 | print("Hello Python world!") 2 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/apostrophe.py: -------------------------------------------------------------------------------- 1 | message:str = "One of Python's strengths is its diverse community." 2 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/comment.py: -------------------------------------------------------------------------------- 1 | # Say hello to everyone. 2 | print("Hello Python people!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/full_name.py: -------------------------------------------------------------------------------- 1 | first_name:str = "ada" 2 | last_name:str = "lovelace" 3 | full_name:str = f"{first_name} {last_name}" 4 | print(full_name) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/full_name_2.py: -------------------------------------------------------------------------------- 1 | first_name:str = "ada" 2 | last_name:str = "lovelace" 3 | full_name:str = f"{first_name} {last_name}" 4 | print(f"Hello, {full_name.title()}!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/full_name_3.py: -------------------------------------------------------------------------------- 1 | first_name:str = "ada" 2 | last_name:str = "lovelace" 3 | full_name:str = f"{first_name} {last_name}" 4 | message:str = f"Hello, {full_name.title()}!" 5 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/hello_world.py: -------------------------------------------------------------------------------- 1 | message:str = "Hello Python world!" 2 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/hello_world_variables.py: -------------------------------------------------------------------------------- 1 | message:str = "Hello Python world!" 2 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/hello_world_variables_2.py: -------------------------------------------------------------------------------- 1 | message:str = "Hello Python world!" 2 | print(message) 3 | 4 | message:str = "Hello Python Crash Course world!" 5 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/name.py: -------------------------------------------------------------------------------- 1 | name:str = "ada lovelace" 2 | print(name.title()) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_02/name_2.py: -------------------------------------------------------------------------------- 1 | name:str = "Ada Lovelace" 2 | print(name.upper()) 3 | print(name.lower()) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/bicycles.py: -------------------------------------------------------------------------------- 1 | bicycles:list[str] = ['trek', 'cannondale', 'redline', 'specialized'] 2 | message = f"My first bicycle was a {bicycles[0].title()}." 3 | 4 | print(message) 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/cars.py: -------------------------------------------------------------------------------- 1 | cars:list[str] = ['bmw', 'audi', 'toyota', 'subaru'] 2 | print(cars) 3 | 4 | cars.reverse() 5 | print(cars) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/bicycles_0_first_version.py: -------------------------------------------------------------------------------- 1 | bicycles:list[str] = ['trek', 'cannondale', 'redline', 'specialized'] 2 | print(bicycles) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/bicycles_1_accessing_elements.py: -------------------------------------------------------------------------------- 1 | bicycles:list[str] = ['trek', 'cannondale', 'redline', 'specialized'] 2 | print(bicycles[0]) 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/bicycles_2_using_methods.py: -------------------------------------------------------------------------------- 1 | bicycles:list[str] = ['trek', 'cannondale', 'redline', 'specialized'] 2 | print(bicycles[0].title()) 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/bicycles_3_index_1_3.py: -------------------------------------------------------------------------------- 1 | bicycles: list[str] = ['trek', 'cannondale', 'redline', 'specialized'] 2 | print(bicycles[1]) 3 | print(bicycles[3]) 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/bicycles_4_last_item.py: -------------------------------------------------------------------------------- 1 | bicycles: list[str] = ['trek', 'cannondale', 'redline', 'specialized'] 2 | print(bicycles[-1]) 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/bicycles_5_message.py: -------------------------------------------------------------------------------- 1 | bicycles:list[str] = ['trek', 'cannondale', 'redline', 'specialized'] 2 | message:str = f"My first bicycle was a {bicycles[0].title()}." 3 | 4 | print(message) 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/cars_0_first_version.py: -------------------------------------------------------------------------------- 1 | cars:list[str] = ['bmw', 'audi', 'toyota', 'subaru'] 2 | cars.sort() 3 | print(cars) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/cars_1_sort_reverse.py: -------------------------------------------------------------------------------- 1 | cars:list[str] = ['bmw', 'audi', 'toyota', 'subaru'] 2 | cars.sort(reverse=True) 3 | print(cars) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/cars_3_reverse_order.py: -------------------------------------------------------------------------------- 1 | cars: list[str] = ['bmw', 'audi', 'toyota', 'subaru'] 2 | print(cars) 3 | 4 | cars.reverse() 5 | print(cars) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_0_first_version.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki'] 2 | print(motorcycles) 3 | 4 | motorcycles[0] = 'ducati' 5 | print(motorcycles) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_11_index_error.py: -------------------------------------------------------------------------------- 1 | motorcycles :list[str] = ['honda', 'yamaha', 'suzuki'] 2 | print(motorcycles[3]) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_1_appending.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki'] 2 | print(motorcycles) 3 | 4 | motorcycles.append('ducati') 5 | print(motorcycles) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_2_starting_empty.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = [] 2 | 3 | motorcycles.append('honda') 4 | motorcycles.append('yamaha') 5 | motorcycles.append('suzuki') 6 | 7 | print(motorcycles) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_3_inserting_elements.py: -------------------------------------------------------------------------------- 1 | motorcycles: list[str] = ['honda', 'yamaha', 'suzuki'] 2 | 3 | motorcycles.insert(0, 'ducati') 4 | print(motorcycles) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_4_removing_elements.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki'] 2 | print(motorcycles) 3 | 4 | del motorcycles[0] 5 | print(motorcycles) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_5_remove_second_item.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki'] 2 | print(motorcycles) 3 | 4 | del motorcycles[1] 5 | print(motorcycles) 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_6_pop.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki'] 2 | print(motorcycles) 3 | 4 | popped_motorcycle:str = motorcycles.pop() 5 | print(motorcycles) 6 | print(popped_motorcycle) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_7_use_popped_value.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki'] 2 | 3 | last_owned:str = motorcycles.pop() 4 | print(f"The last motorcycle I owned was a {last_owned.title()}.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_8_popping_first_item.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki'] 2 | 3 | first_owned:str = motorcycles.pop(0) 4 | print(f"The first motorcycle I owned was a {first_owned.title()}.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_03/partial_programs/motorcycles_9_removing_item_by_value.py: -------------------------------------------------------------------------------- 1 | motorcycles:list[str] = ['honda', 'yamaha', 'suzuki', 'ducati'] 2 | print(motorcycles) 3 | 4 | motorcycles.remove('ducati') 5 | print(motorcycles) 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/even_numbers.py: -------------------------------------------------------------------------------- 1 | even_numbers:list[int] = list(range(2, 11, 2)) 2 | print(even_numbers) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/first_numbers.py: -------------------------------------------------------------------------------- 1 | numbers:list[int] = list(range(1, 6)) 2 | print(numbers) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/dimensions_0_first_version.py: -------------------------------------------------------------------------------- 1 | dimensions:tuple[int,int] = (200, 50) 2 | print(dimensions[0]) 3 | print(dimensions[1]) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/dimensions_1_error_change_value.py: -------------------------------------------------------------------------------- 1 | dimensions:tuple[int,int] = (200, 50) 2 | dimensions[0] = 250 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/dimensions_2_looping.py: -------------------------------------------------------------------------------- 1 | dimensions:tuple[int,int] = (200, 50) 2 | for dimension in dimensions: 3 | print(dimension) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/even_numbers.py: -------------------------------------------------------------------------------- 1 | even_numbers:list[int] = list(range(2, 11, 2)) 2 | print(even_numbers) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/first_numbers_0_first_version.py: -------------------------------------------------------------------------------- 1 | for value in range(1, 5): 2 | print(value) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/first_numbers_1_one_to_five.py: -------------------------------------------------------------------------------- 1 | for value in range(1, 6): 2 | print(value) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/first_numbers_2_list_of_numbers.py: -------------------------------------------------------------------------------- 1 | numbers:list[int] = list(range(1, 6)) 2 | print(numbers) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/hello_world_0_errors_indenting_unnecessarily.py: -------------------------------------------------------------------------------- 1 | message:str = "Hello Python world!" 2 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/magicians_0_first_version.py: -------------------------------------------------------------------------------- 1 | magicians:list[str] = ['alice', 'david', 'carolina'] 2 | for magician in magicians: 3 | print(magician) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/magicians_1_great_trick.py: -------------------------------------------------------------------------------- 1 | magicians:list[str] = ['alice', 'david', 'carolina'] 2 | for magician in magicians: 3 | print(f"{magician.title()}, that was a great trick!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/magicians_4_errors_forgetting_to_indent.py: -------------------------------------------------------------------------------- 1 | magicians:list[str] = ['alice', 'david', 'carolina'] 2 | for magician in magicians: 3 | print(magician) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/magicians_7_errors_forgetting_colon.py: -------------------------------------------------------------------------------- 1 | magicians:list[str] = ['alice', 'david', 'carolina'] 2 | for magician in magicians 3 | print(magician) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/players_0_first_version.py: -------------------------------------------------------------------------------- 1 | players:list[str] = ['charles', 'martina', 'michael', 'florence', 'eli'] 2 | print(players[0:3]) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/players_1_second_to_fourth.py: -------------------------------------------------------------------------------- 1 | players:list[str] = ['charles', 'martina', 'michael', 'florence', 'eli'] 2 | print(players[1:4]) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/players_2_omit_first_index.py: -------------------------------------------------------------------------------- 1 | players:list[str] = ['charles', 'martina', 'michael', 'florence', 'eli'] 2 | print(players[:4]) 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/players_3_omit_last_index.py: -------------------------------------------------------------------------------- 1 | players:list[str] = ['charles', 'martina', 'michael', 'florence', 'eli'] 2 | print(players[2:]) 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/players_4_negative_first_index.py: -------------------------------------------------------------------------------- 1 | players:list[str] = ['charles', 'martina', 'michael', 'florence', 'eli'] 2 | print(players[-3:]) 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/players_5_looping_through_slice.py: -------------------------------------------------------------------------------- 1 | players:list[str] = ['charles', 'martina', 'michael', 'florence', 'eli'] 2 | 3 | print("Here are the first three players on my team:") 4 | for player in players[:3]: 5 | print(player.title()) 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/square_numbers_0_first_version.py: -------------------------------------------------------------------------------- 1 | squares:list[str] = [] 2 | for value in range(1, 11): 3 | square = value ** 2 4 | squares.append(square) 5 | 6 | print(squares) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/square_numbers_1_shorter_loop.py: -------------------------------------------------------------------------------- 1 | squares:list[int] = [] 2 | for value in range(1, 11): 3 | squares.append(value**2) 4 | 5 | print(squares) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/partial_programs/squares.py: -------------------------------------------------------------------------------- 1 | squares:list[int] = [value**2 for value in range(1, 11)] 2 | print(squares) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/players.py: -------------------------------------------------------------------------------- 1 | players:list[str] = ['charles', 'martina', 'michael', 'florence', 'eli'] 2 | 3 | print("Here are the first three players on my team:") 4 | for player in players[:3]: 5 | print(player.title()) 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/square_numbers.py: -------------------------------------------------------------------------------- 1 | squares:list[int] = [] 2 | for value in range(1, 11): 3 | squares.append(value**2) 4 | 5 | print(squares) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_04/squares.py: -------------------------------------------------------------------------------- 1 | squares:list[int] = [value**2 for value in range(1, 11)] 2 | print(squares) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/amusement_park.py: -------------------------------------------------------------------------------- 1 | age:int = 12 2 | 3 | if age < 4: 4 | price = 0 5 | elif age < 18: 6 | price = 25 7 | elif age < 65: 8 | price = 40 9 | elif age >= 65: 10 | price = 20 11 | 12 | print(f"Your admission cost is ${price}.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/banned_users.py: -------------------------------------------------------------------------------- 1 | banned_users:list[SyntaxWarning] = ['andrew', 'carolina', 'david'] 2 | user:str = 'marie' 3 | 4 | if user not in banned_users: 5 | print(f"{user.title()}, you can post a response if you wish.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/cars.py: -------------------------------------------------------------------------------- 1 | cars:list[str] = ['audi', 'bmw', 'subaru', 'toyota'] 2 | 3 | for car in cars: 4 | if car == 'bmw': 5 | print(car.upper()) 6 | else: 7 | print(car.title()) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/magic_number.py: -------------------------------------------------------------------------------- 1 | answer:int = 17 2 | 3 | if answer != 42: 4 | print("That is not the correct answer. Please try again!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/amusement_park_0_first_version.py: -------------------------------------------------------------------------------- 1 | age:int = 12 2 | if age < 4: 3 | print("Your admission cost is $0.") 4 | elif age < 18: 5 | print("Your admission cost is $25.") 6 | else: 7 | print("Your admission cost is $40.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/amusement_park_1_price_only.py: -------------------------------------------------------------------------------- 1 | age:int = 12 2 | 3 | if age < 4: 4 | price = 0 5 | elif age < 18: 6 | price = 25 7 | else: 8 | price = 40 9 | 10 | print(f"Your admission cost is ${price}.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/banned_users.py: -------------------------------------------------------------------------------- 1 | banned_users:list[str] = ['andrew', 'carolina', 'david'] 2 | user:str = 'marie' 3 | 4 | if user not in banned_users: 5 | print(f"{user.title()}, you can post a response if you wish.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/cars.py: -------------------------------------------------------------------------------- 1 | cars:list[str] = ['audi', 'bmw', 'subaru', 'toyota'] 2 | 3 | for car in cars: 4 | if car == 'bmw': 5 | print(car.upper()) 6 | else: 7 | print(car.title()) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/magic_number.py: -------------------------------------------------------------------------------- 1 | answer:int = 17 2 | 3 | if answer != 42: 4 | print("That is not the correct answer. Please try again!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/toppings_0_first_listing.py: -------------------------------------------------------------------------------- 1 | requested_topping:str = 'mushrooms' 2 | 3 | if requested_topping != 'anchovies': 4 | print("Hold the anchovies!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/voting_0_first_version.py: -------------------------------------------------------------------------------- 1 | age:int = 19 2 | if age >= 18: 3 | print("You are old enough to vote!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_05/partial_programs/voting_1_two_lines.py: -------------------------------------------------------------------------------- 1 | age:int = 19 2 | if age >= 18: 3 | print("You are old enough to vote!") 4 | print("Have you registered to vote yet?") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/alien.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'points': 5} 2 | print(alien_0) 3 | 4 | del alien_0['points'] 5 | print(alien_0) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/alien_no_points.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'speed': 'slow'} 2 | 3 | point_value = alien_0.get('points', 'No point value assigned.') 4 | print(point_value) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_0_first_version.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'points': 5} 2 | 3 | print(alien_0['color']) 4 | print(alien_0['points']) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_1_accessing_values.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green'} 2 | print(alien_0['color']) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_2_new_points.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'points': 5} 2 | 3 | new_points = alien_0['points'] 4 | print(f"You just earned {new_points} points!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_3_new_key_value_pairs.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'points': 5} 2 | print(alien_0) 3 | 4 | alien_0['x_position'] = 0 5 | alien_0['y_position'] = 25 6 | print(alien_0) 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_4_starting_empty.py: -------------------------------------------------------------------------------- 1 | alien_0 = {} 2 | 3 | alien_0['color'] = 'green' 4 | alien_0['points'] = 5 5 | 6 | print(alien_0) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_5_modifying_values.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green'} 2 | print(f"The alien is {alien_0['color']}.") 3 | 4 | alien_0['color'] = 'yellow' 5 | print(f"The alien is now {alien_0['color']}.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_7_removing_key_value_pairs.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'points': 5} 2 | print(alien_0) 3 | 4 | del alien_0['points'] 5 | print(alien_0) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_no_points_0_first_version.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'speed': 'slow'} 2 | print(alien_0['points']) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/alien_no_points_1_using_get.py: -------------------------------------------------------------------------------- 1 | alien_0 = {'color': 'green', 'speed': 'slow'} 2 | 3 | point_value = alien_0.get('points', 'No point value assigned.') 4 | print(point_value) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/favorite_languages_0_first_version.py: -------------------------------------------------------------------------------- 1 | favorite_languages = { 2 | 'jen': 'python', 3 | 'sarah': 'c', 4 | 'edward': 'rust', 5 | 'phil': 'python', 6 | } -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/user_0_first_listing.py: -------------------------------------------------------------------------------- 1 | user_0 = { 2 | 'username': 'efermi', 3 | 'first': 'enrico', 4 | 'last': 'fermi', 5 | } 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/partial_programs/user_1_loop_items.py: -------------------------------------------------------------------------------- 1 | user_0 = { 2 | 'username': 'efermi', 3 | 'first': 'enrico', 4 | 'last': 'fermi', 5 | } 6 | 7 | for key, value in user_0.items(): 8 | print(f"\nKey: {key}") 9 | print(f"Value: {value}") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_06/user.py: -------------------------------------------------------------------------------- 1 | user_0 = { 2 | 'username': 'efermi', 3 | 'first': 'enrico', 4 | 'last': 'fermi', 5 | } 6 | 7 | for key, value in user_0.items(): 8 | print(f"\nKey: {key}") 9 | print(f"Value: {value}") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/counting.py: -------------------------------------------------------------------------------- 1 | current_number = 0 2 | while current_number < 10: 3 | current_number += 1 4 | if current_number % 2 == 0: 5 | continue 6 | 7 | print(current_number) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/even_or_odd.py: -------------------------------------------------------------------------------- 1 | number = input("Enter a number, and I'll tell you if it's even or odd: ") 2 | number = int(number) 3 | 4 | if number % 2 == 0: 5 | print(f"\nThe number {number} is even.") 6 | else: 7 | print(f"\nThe number {number} is odd.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/greeter.py: -------------------------------------------------------------------------------- 1 | prompt = "If you share your name, we can personalize the messages you see." 2 | prompt += "\nWhat is your first name? " 3 | 4 | name = input(prompt) 5 | print(f"\nHello, {name}!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/partial_programs/counting_0_first_version.py: -------------------------------------------------------------------------------- 1 | current_number = 1 2 | while current_number <= 5: 3 | print(current_number) 4 | current_number += 1 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/partial_programs/counting_1_using_continue.py: -------------------------------------------------------------------------------- 1 | current_number = 0 2 | while current_number < 10: 3 | current_number += 1 4 | if current_number % 2 == 0: 5 | continue 6 | 7 | print(current_number) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/partial_programs/counting_2_infinite_loop.py: -------------------------------------------------------------------------------- 1 | # This loop runs forever! 2 | x = 1 3 | while x <= 5: 4 | print(x) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/partial_programs/greeter_0_first_version.py: -------------------------------------------------------------------------------- 1 | name = input("Please enter your name: ") 2 | print(f"\nHello, {name}!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/partial_programs/greeter_1_longer_prompt.py: -------------------------------------------------------------------------------- 1 | prompt = "If you share your name, we can personalize the messages you see." 2 | prompt += "\nWhat is your first name? " 3 | 4 | name = input(prompt) 5 | print(f"\nHello, {name}!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/partial_programs/parrot_0_first_version.py: -------------------------------------------------------------------------------- 1 | message = input("Tell me something, and I will repeat it back to you: ") 2 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/partial_programs/pets.py: -------------------------------------------------------------------------------- 1 | pets = ['dog', 'cat', 'dog', 'goldfish', 'cat', 'rabbit', 'cat'] 2 | print(pets) 3 | 4 | while 'cat' in pets: 5 | pets.remove('cat') 6 | 7 | print(pets) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/pets.py: -------------------------------------------------------------------------------- 1 | pets = ['dog', 'cat', 'dog', 'goldfish', 'cat', 'rabbit', 'cat'] 2 | print(pets) 3 | 4 | while 'cat' in pets: 5 | pets.remove('cat') 6 | 7 | print(pets) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_07/rollercoaster.py: -------------------------------------------------------------------------------- 1 | height = input("How tall are you, in inches? ") 2 | height = int(height) 3 | 4 | if height >= 48: 5 | print("\nYou're tall enough to ride!") 6 | else: 7 | print("\nYou'll be able to ride when you're a little older.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/importing_functions/importing_0_entire_module/making_pizzas.py: -------------------------------------------------------------------------------- 1 | import pizza 2 | 3 | 4 | pizza.make_pizza(16, 'pepperoni') 5 | pizza.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/importing_functions/importing_1_specific_functions/making_pizzas.py: -------------------------------------------------------------------------------- 1 | from pizza import make_pizza 2 | 3 | 4 | make_pizza(16, 'pepperoni') 5 | make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/importing_functions/importing_2_function_alias/making_pizzas.py: -------------------------------------------------------------------------------- 1 | from pizza import make_pizza as mp 2 | 3 | 4 | mp(16, 'pepperoni') 5 | mp(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/importing_functions/importing_3_module_alias/making_pizzas.py: -------------------------------------------------------------------------------- 1 | import pizza as p 2 | 3 | 4 | p.make_pizza(16, 'pepperoni') 5 | p.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/importing_functions/importing_4_all_functions/making_pizzas.py: -------------------------------------------------------------------------------- 1 | from pizza import * 2 | 3 | 4 | make_pizza(16, 'pepperoni') 5 | make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/partial_programs/greeter_0_first_version.py: -------------------------------------------------------------------------------- 1 | def greet_user()->None: 2 | """Display a simple greeting.""" 3 | print("Hello!") 4 | 5 | greet_user() -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/partial_programs/greeter_1_passing_information.py: -------------------------------------------------------------------------------- 1 | def greet_user(username:str)->None: 2 | """Display a simple greeting.""" 3 | print(f"Hello, {username.title()}!") 4 | 5 | greet_user('jesse') 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/partial_programs/importing_0_entire_module/making_pizzas.py: -------------------------------------------------------------------------------- 1 | import pizza 2 | 3 | 4 | pizza.make_pizza(16, 'pepperoni') 5 | pizza.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/partial_programs/importing_1_specific_functions/making_pizzas.py: -------------------------------------------------------------------------------- 1 | from pizza import make_pizza 2 | 3 | 4 | make_pizza(16, 'pepperoni') 5 | make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/partial_programs/importing_2_function_alias/making_pizzas.py: -------------------------------------------------------------------------------- 1 | from pizza import make_pizza as mp 2 | 3 | 4 | mp(16, 'pepperoni') 5 | mp(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/partial_programs/importing_3_module_alias/making_pizzas.py: -------------------------------------------------------------------------------- 1 | import pizza as p 2 | 3 | 4 | p.make_pizza(16, 'pepperoni') 5 | p.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_08/partial_programs/importing_4_all_functions/making_pizzas.py: -------------------------------------------------------------------------------- 1 | from pizza import * 2 | 3 | 4 | make_pizza(16, 'pepperoni') 5 | make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_09/importing_classes/importing_0_importing_single_class/my_car.py: -------------------------------------------------------------------------------- 1 | from car import Car 2 | 3 | 4 | my_new_car = Car('audi', 'a4', 2024) 5 | print(my_new_car.get_descriptive_name()) 6 | 7 | my_new_car.odometer_reading = 23 8 | my_new_car.read_odometer() -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/exceptions/alice_0_first_version.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | path = Path('alice.txt') 5 | contents = path.read_text(encoding='utf-8') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/exceptions/division_calculator_0_first_version.py: -------------------------------------------------------------------------------- 1 | print(5/0) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/exceptions/division_calculator_1_try_except.py: -------------------------------------------------------------------------------- 1 | try: 2 | print(5/0) 3 | except ZeroDivisionError: 4 | print("You can't divide by zero!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/reading_from_a_file/file_reader_0_first_version.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | path = Path('pi_digits.txt') 5 | contents = path.read_text() 6 | print(contents) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/reading_from_a_file/file_reader_1_remove_blank_line.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | path = Path('pi_digits.txt') 5 | contents = path.read_text() 6 | contents = contents.rstrip() 7 | print(contents) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/reading_from_a_file/file_reader_2_chained_methods.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | path = Path('pi_digits.txt') 5 | contents = path.read_text().rstrip() 6 | print(contents) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/reading_from_a_file/pi_digits.txt: -------------------------------------------------------------------------------- 1 | 3.1415926535 2 | 8979323846 3 | 2643383279 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/storing_data/greet_user.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import json 3 | 4 | 5 | path = Path('username.json') 6 | contents = path.read_text() 7 | username = json.loads(contents) 8 | 9 | print(f"Welcome back, {username}!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/storing_data/number_reader.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import json 3 | 4 | path = Path('numbers.json') 5 | contents = path.read_text() 6 | numbers = json.loads(contents) 7 | 8 | print(numbers) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/storing_data/number_writer.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import json 3 | 4 | 5 | numbers = [2, 3, 5, 7, 11, 13] 6 | 7 | path = Path('numbers.json') 8 | contents = json.dumps(numbers) 9 | path.write_text(contents) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/storing_data/numbers.json: -------------------------------------------------------------------------------- 1 | [2, 3, 5, 7, 11, 13] -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/writing_to_a_file/programming.txt: -------------------------------------------------------------------------------- 1 | I love programming. 2 | I love creating new games. 3 | I also love working with data. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/partial_programs/writing_to_a_file/write_message_0_first_version.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | path = Path('programming.txt') 5 | path.write_text("I love programming.") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/reading_from_a_file/file_reader.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | path = Path('pi_digits.txt') 5 | contents = path.read_text() 6 | 7 | lines = contents.splitlines() 8 | for line in lines: 9 | print(line) 10 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/reading_from_a_file/pi_digits.txt: -------------------------------------------------------------------------------- 1 | 3.1415926535 2 | 8979323846 3 | 2643383279 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/storing_data/greet_user.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import json 3 | 4 | 5 | path = Path('username.json') 6 | contents = path.read_text() 7 | username = json.loads(contents) 8 | 9 | print(f"Welcome back, {username}!") -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/storing_data/number_reader.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import json 3 | 4 | path = Path('numbers.json') 5 | contents = path.read_text() 6 | numbers = json.loads(contents) 7 | 8 | print(numbers) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/storing_data/number_writer.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import json 3 | 4 | 5 | numbers = [2, 3, 5, 7, 11, 13] 6 | 7 | path = Path('numbers.json') 8 | contents = json.dumps(numbers) 9 | path.write_text(contents) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/storing_data/numbers.json: -------------------------------------------------------------------------------- 1 | [2, 3, 5, 7, 11, 13] -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/storing_data/username.json: -------------------------------------------------------------------------------- 1 | "Eric" -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_10/writing_to_a_file/programming.txt: -------------------------------------------------------------------------------- 1 | I love programming. 2 | I love creating new games. 3 | I also love working with data. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_12/refactoring/images/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_12/refactoring/images/ship.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_12/shooting_bullets/images/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_12/shooting_bullets/images/ship.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/ending_the_game/images/alien.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/ending_the_game/images/alien.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/ending_the_game/images/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/ending_the_game/images/ship.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/shooting_aliens/images/alien.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/shooting_aliens/images/alien.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/shooting_aliens/images/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_13/shooting_aliens/images/ship.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/leveling_up/images/alien.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/leveling_up/images/alien.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/leveling_up/images/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/leveling_up/images/ship.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/scoring/images/alien.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/scoring/images/alien.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/scoring/images/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/02_python_crash_course/python_crash_course_book_code_with_typing/chapter_14/scoring/images/ship.bmp -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_15/plotting_simple_line_graph/partial_programs/mpl_squares_0_first_version.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | 3 | squares = [1, 4, 9, 16, 25] 4 | 5 | fig, ax = plt.subplots() 6 | ax.plot(squares) 7 | 8 | plt.show() -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_15/plotting_simple_line_graph/partial_programs/scatter_squares_0_first_version.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | 3 | plt.style.use('seaborn-v0_8') 4 | fig, ax = plt.subplots() 5 | ax.scatter(2, 4) 6 | 7 | plt.show() -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/building_additional_pages/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/building_additional_pages/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/building_additional_pages/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/making_pages/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/making_pages/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/making_pages/learning_logs/templates/learning_logs/index.html: -------------------------------------------------------------------------------- 1 |

Learning Log

2 | 3 |

Learning Log helps you keep track of your learning, for any topic you're 4 | interested in.

-------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/making_pages/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/making_pages/learning_logs/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | 4 | def index(request): 5 | """The home page for Learning Log.""" 6 | return render(request, 'learning_logs/index.html') 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/starting_an_app/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/starting_an_app/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/starting_an_app/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_18/starting_an_app/learning_logs/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_enter_data/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_enter_data/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_enter_data/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_own_their_data/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_own_their_data/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_own_their_data/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_own_their_data/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_own_their_data/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_own_their_data/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/allowing_users_to_own_their_data/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/setting_up_user_accounts/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/setting_up_user_accounts/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/setting_up_user_accounts/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/setting_up_user_accounts/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/setting_up_user_accounts/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/setting_up_user_accounts/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_19/setting_up_user_accounts/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/.gitignore: -------------------------------------------------------------------------------- 1 | ll_env/ 2 | __pycache__/ 3 | *.sqlite3 4 | 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/.platform/local/.gitignore: -------------------------------------------------------------------------------- 1 | / 2 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/.platform/local/project.yaml: -------------------------------------------------------------------------------- 1 | id: 7hzn2gjzsf6qs 2 | host: api.platform.sh 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/.platform/services.yaml: -------------------------------------------------------------------------------- 1 | # Each service listed will be deployed in its own container as part of your 2 | # Platform.sh project. 3 | 4 | db: 5 | type: postgresql:12 6 | disk: 1024 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.5.2 2 | beautifulsoup4==4.11.1 3 | Django==4.1b1 4 | django-bootstrap5==21.3 5 | platformshconfig==2.4.0 6 | soupsieve==2.3.2.post1 7 | sqlparse==0.4.2 8 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/requirements_remote.txt: -------------------------------------------------------------------------------- 1 | # Requirements for live project. 2 | gunicorn 3 | psycopg2 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "learning_logs/base.html" %} 2 | 3 | {% block page_header %} 4 |

The item you requested is not available. (404)

5 | {% endblock page_header %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/deploying_learning_log/templates/500.html: -------------------------------------------------------------------------------- 1 | {% extends "learning_logs/base.html" %} 2 | 3 | {% block page_header %} 4 |

There has been an internal error. (500)

5 | {% endblock page_header %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/styling_learning_log/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/styling_learning_log/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/styling_learning_log/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/styling_learning_log/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/styling_learning_log/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/styling_learning_log/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/chapter_20/styling_learning_log/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/online_resources_site/docs/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | .lead-paragraph { 2 | font-size: 1.2em; 3 | } 4 | 5 | :root > * { 6 | --md-primary-fg-color: #007F9E; 7 | --md-accent-fg-color: #0DA4CE; 8 | } -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/famous_quote.py: -------------------------------------------------------------------------------- 1 | print('Albert Einstein once said, "A person who never made a mistake') 2 | print('never tried anything new."') -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/famous_quote_2.py: -------------------------------------------------------------------------------- 1 | famous_person = "Albert Einstein" 2 | 3 | message = f'{famous_person} once said, "A person who never made a mistake never tried anything new."' 4 | 5 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/famous_quote_3.py: -------------------------------------------------------------------------------- 1 | famous_person = "Albert Einstein" 2 | 3 | message = f'{famous_person} once said, "A person who never made a mistake' 4 | message += ' never tried anything new."' 5 | 6 | print(message) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/favorite_number.py: -------------------------------------------------------------------------------- 1 | fav_num = 42 2 | msg = f"My favorite number is {fav_num}." 3 | 4 | print(msg) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/file_extensions.py: -------------------------------------------------------------------------------- 1 | filename = 'python_notes.txt' 2 | simple_filename = filename.removesuffix('.txt') 3 | 4 | print(simple_filename) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/name_cases.py: -------------------------------------------------------------------------------- 1 | name = "eric" 2 | 3 | print(name.lower()) 4 | print(name.upper()) 5 | print(name.title()) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/personal_message.py: -------------------------------------------------------------------------------- 1 | name = "eric" 2 | msg = f"Hello {name.title()}, would you like to learn some Python today?" 3 | 4 | print(msg) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/simple_message.py: -------------------------------------------------------------------------------- 1 | msg = "I love learning to use Python." 2 | print(msg) 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_02/simple_messages.py: -------------------------------------------------------------------------------- 1 | msg = "I love learning to use Python." 2 | print(msg) 3 | 4 | msg = "It's really satisfying!" 5 | print(msg) 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_03/names.py: -------------------------------------------------------------------------------- 1 | names = ['ron', 'tyler', 'dani'] 2 | 3 | print(names[0]) 4 | print(names[1]) 5 | print(names[2]) 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_04/counting_to_twenty.py: -------------------------------------------------------------------------------- 1 | numbers = list(range(1, 21)) 2 | 3 | for number in numbers: 4 | print(number) 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_04/cube_comprehension.py: -------------------------------------------------------------------------------- 1 | cubes = [number**3 for number in range(1,11)] 2 | 3 | for cube in cubes: 4 | print(cube) 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_04/cubes.py: -------------------------------------------------------------------------------- 1 | cubes = [] 2 | for number in range(1, 11): 3 | cube = number**3 4 | cubes.append(cube) 5 | 6 | for cube in cubes: 7 | print(cube) 8 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_04/odd_numbers.py: -------------------------------------------------------------------------------- 1 | odd_numbers = list(range(1, 20, 2)) 2 | 3 | for number in odd_numbers: 4 | print(number) 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_04/summing_a_million.py: -------------------------------------------------------------------------------- 1 | numbers = list(range(1, 1_000_001)) 2 | 3 | print(min(numbers)) 4 | print(max(numbers)) 5 | print(sum(numbers)) 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_04/threes.py: -------------------------------------------------------------------------------- 1 | threes = list(range(3, 31, 3)) 2 | 3 | for number in threes: 4 | print(number) 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_05/alien_colors_1.py: -------------------------------------------------------------------------------- 1 | alien_color = 'green' 2 | 3 | if alien_color == 'green': 4 | print("You just earned 5 points!") 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_05/alien_colors_1_fail.py: -------------------------------------------------------------------------------- 1 | alien_color = 'red' 2 | 3 | if alien_color == 'green': 4 | print("You just earned 5 points!") 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_05/alien_colors_2_else_block.py: -------------------------------------------------------------------------------- 1 | alien_color = 'yellow' 2 | 3 | if alien_color == 'green': 4 | print("You just earned 5 points!") 5 | else: 6 | print("You just earned 10 points!") 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_05/alien_colors_2_if_block.py: -------------------------------------------------------------------------------- 1 | alien_color = 'green' 2 | 3 | if alien_color == 'green': 4 | print("You just earned 5 points!") 5 | else: 6 | print("You just earned 10 points!") 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_07/multiples_of_ten.py: -------------------------------------------------------------------------------- 1 | number = input("Give me a number, please: ") 2 | number = int(number) 3 | 4 | if number % 10 == 0: 5 | print(f"{number} is a multiple of 10.") 6 | else: 7 | print(f"{number} is not a multiple of 10.") 8 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_07/rental_car.py: -------------------------------------------------------------------------------- 1 | car = input("What kind of car would you like? ") 2 | 3 | print(f"Let me see if I can find you a {car.title()}.") 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_08/favorite_book.py: -------------------------------------------------------------------------------- 1 | def favorite_book(title): 2 | """Display a message about someone's favorite book.""" 3 | print(f"{title} is one of my favorite books.") 4 | 5 | favorite_book('The Abstract Wild') 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_08/message.py: -------------------------------------------------------------------------------- 1 | def display_message(): 2 | """Display a message about what I'm learning.""" 3 | msg = "I'm learning to store code in functions." 4 | print(msg) 5 | 6 | display_message() 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_08/messages.py: -------------------------------------------------------------------------------- 1 | def show_messages(messages): 2 | """Print all messages in the list.""" 3 | for message in messages: 4 | print(message) 5 | 6 | messages = ["hello there", "how are u?", ":)"] 7 | show_messages(messages) 8 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_09/imported_restaurant/my_restaurant.py: -------------------------------------------------------------------------------- 1 | from restaurant import Restaurant 2 | 3 | channel_club = Restaurant('the channel club', 'steak and seafood') 4 | channel_club.describe_restaurant() 5 | channel_club.open_restaurant() -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/cats.txt: -------------------------------------------------------------------------------- 1 | henry 2 | clarence 3 | mildred -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/dogs.txt: -------------------------------------------------------------------------------- 1 | willie 2 | annahootz 3 | summit -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/favorite_number.json: -------------------------------------------------------------------------------- 1 | "17" -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/guest.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | path = Path('guest.txt') 4 | 5 | name = input("What's your name? ") 6 | path.write_text(name) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/guest.txt: -------------------------------------------------------------------------------- 1 | eric -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/guest_book.txt: -------------------------------------------------------------------------------- 1 | eric 2 | erin 3 | ever 4 | willie 5 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/learning_python.txt: -------------------------------------------------------------------------------- 1 | In Python you can store as much information as you want. 2 | In Python you can connect pieces of information. 3 | In Python you can model real-world situations. -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/pi_digits.txt: -------------------------------------------------------------------------------- 1 | 3.1415926535 2 | 8979323846 3 | 2643383279 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/simpler_code_file_reader.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | path = Path('pi_digits.txt') 4 | contents = path.read_text() 5 | 6 | for line in contents.splitlines(): 7 | print(line) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/user_info.json: -------------------------------------------------------------------------------- 1 | {"username": "eric", "game": "chess", "animal": "mountain goat"} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_10/username.json: -------------------------------------------------------------------------------- 1 | "ever" -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_11/city_country/city_functions.py: -------------------------------------------------------------------------------- 1 | """A collection of functions for working with cities.""" 2 | 3 | def city_country(city, country): 4 | """Return a string like 'Santiago, Chile'.""" 5 | return f"{city.title()}, {country.title()}" -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_14/ex_14_6_refactoring/high_score.json: -------------------------------------------------------------------------------- 1 | 4500 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_4_pizzeria/pizzas/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Pizza, Topping 4 | 5 | admin.site.register(Pizza) 6 | admin.site.register(Topping) 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_4_pizzeria/pizzas/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PizzasConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'pizzas' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_4_pizzeria/pizzas/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_4_pizzeria/pizzas/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_5_meal_planner/meal_plans/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Meal, MealItem 4 | 5 | admin.site.register(Meal) 6 | admin.site.register(MealItem) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_5_meal_planner/meal_plans/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MealPlansConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'meal_plans' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_5_meal_planner/meal_plans/templates/meal_plans/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'meal_plans/base.html' %} 2 | 3 | {% block content %} 4 |

Meal Planner helps you plan your meals for the week.

5 | {% endblock content %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_5_meal_planner/meal_plans/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_6_pizzeria_home_page/pizzas/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Pizza, Topping 4 | 5 | admin.site.register(Pizza) 6 | admin.site.register(Topping) 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_6_pizzeria_home_page/pizzas/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PizzasConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'pizzas' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_6_pizzeria_home_page/pizzas/templates/pizzas/index.html: -------------------------------------------------------------------------------- 1 |

Pizzeria

2 | 3 |

Welcome to the Pizzeria! We hope you'll find a pizza that you like. :)

-------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_6_pizzeria_home_page/pizzas/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_6_pizzeria_home_page/pizzas/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | def index(request): 4 | """The home page for Pizzeria.""" 5 | return render(request, 'pizzas/index.html') 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_8_pizzeria_pages/pizzas/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Pizza, Topping 4 | 5 | admin.site.register(Pizza) 6 | admin.site.register(Topping) 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_8_pizzeria_pages/pizzas/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PizzasConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'pizzas' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_8_pizzeria_pages/pizzas/templates/pizzas/base.html: -------------------------------------------------------------------------------- 1 |

2 | Pizzeria - 3 | Pizzas 4 |

5 | 6 | {% block content %}{% endblock content %} 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_8_pizzeria_pages/pizzas/templates/pizzas/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'pizzas/base.html' %} 2 | 3 | {% block content %} 4 |

Welcome to the Pizzeria! We hope you'll find a pizza that you like. :)

5 | {% endblock content %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_18/ex_18_8_pizzeria_pages/pizzas/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_1_blog/blog_project/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path('admin/', admin.site.urls), 6 | path('', include('blogs.urls')), 7 | ] 8 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_1_blog/blogs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Blog, BlogPost 4 | 5 | admin.site.register(Blog) 6 | admin.site.register(BlogPost) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_1_blog/blogs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'blogs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_1_blog/blogs/templates/blogs/base.html: -------------------------------------------------------------------------------- 1 |

2 | Blog Host - 3 | All blogs 4 |

5 | 6 | {% block content %}{% endblock content %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_1_blog/blogs/templates/blogs/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'blogs/base.html' %} 2 | 3 | {% block content %} 4 |

Blog Host lets you create your own blog, and share it with the world.

5 | {% endblock content %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_1_blog/blogs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/blogs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Blog, BlogPost 4 | 5 | admin.site.register(Blog) 6 | admin.site.register(BlogPost) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/blogs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'blogs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/blogs/templates/blogs/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'blogs/base.html' %} 2 | 3 | {% block content %} 4 |

Blog Host lets you create your own blog, and share it with the world.

5 | {% endblock content %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_2_blog_accounts/blogs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_3_refactoring/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_3_refactoring/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_3_refactoring/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_3_refactoring/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_3_refactoring/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_3_refactoring/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_3_refactoring/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_4_protecting_new_entry/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_4_protecting_new_entry/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_4_protecting_new_entry/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_4_protecting_new_entry/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_4_protecting_new_entry/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_4_protecting_new_entry/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_4_protecting_new_entry/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/blogs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Blog, BlogPost 4 | 5 | admin.site.register(Blog) 6 | admin.site.register(BlogPost) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/blogs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'blogs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/blogs/templates/blogs/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'blogs/base.html' %} 2 | 3 | {% block content %} 4 |

Blog Host lets you create your own blog, and share it with the world.

5 | {% endblock content %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_19/ex_19_5_protected_blog/blogs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_1_other_forms/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_1_other_forms/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_1_other_forms/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_1_other_forms/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_1_other_forms/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_1_other_forms/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_1_other_forms/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_2_stylish_blog/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_2_stylish_blog/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_2_stylish_blog/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_2_stylish_blog/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_2_stylish_blog/blogs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Blog, BlogPost 4 | 5 | admin.site.register(Blog) 6 | admin.site.register(BlogPost) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_2_stylish_blog/blogs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'blogs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_2_stylish_blog/blogs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/.gitignore: -------------------------------------------------------------------------------- 1 | b_env/ 2 | __pycache__/ 3 | *.sqlite3 4 | 5 | .DS_Store 6 | 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/.platform/local/.gitignore: -------------------------------------------------------------------------------- 1 | / 2 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/.platform/local/project.yaml: -------------------------------------------------------------------------------- 1 | id: apnnmfmpkul3w 2 | host: api.platform.sh 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/.platform/services.yaml: -------------------------------------------------------------------------------- 1 | # Each service listed will be deployed in its own container as part of your 2 | # Platform.sh project. 3 | 4 | db: 5 | type: postgresql:12 6 | disk: 1024 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/blogs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Blog, BlogPost 4 | 5 | admin.site.register(Blog) 6 | admin.site.register(BlogPost) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/blogs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'blogs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/blogs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.6.0 2 | Django==4.1.6 3 | django-bootstrap5==22.2 4 | platformshconfig==2.4.0 5 | sqlparse==0.4.3 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/requirements_remote.txt: -------------------------------------------------------------------------------- 1 | # Requirements for live project. 2 | gunicorn 3 | psycopg2 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "blogs/base.html" %} 2 | 3 | {% block page_header %} 4 |

The item you requested is not available. (404)

5 | {% endblock page_header %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_3_live_blog/templates/500.html: -------------------------------------------------------------------------------- 1 | {% extends "blogs/base.html" %} 2 | 3 | {% block page_header %} 4 |

There has been an internal error. (500)

5 | {% endblock page_header %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/.gitignore: -------------------------------------------------------------------------------- 1 | ll_env/ 2 | __pycache__/ 3 | *.sqlite3 4 | 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/.platform/local/.gitignore: -------------------------------------------------------------------------------- 1 | / 2 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/.platform/local/project.yaml: -------------------------------------------------------------------------------- 1 | id: 7hzn2gjzsf6qs 2 | host: api.platform.sh 3 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/.platform/services.yaml: -------------------------------------------------------------------------------- 1 | # Each service listed will be deployed in its own container as part of your 2 | # Platform.sh project. 3 | 4 | db: 5 | type: postgresql:12 6 | disk: 1024 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/learning_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Topic, Entry 4 | 5 | 6 | admin.site.register(Topic) 7 | admin.site.register(Entry) -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/learning_logs/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LearningLogsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'learning_logs' 7 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/learning_logs/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.5.2 2 | beautifulsoup4==4.11.1 3 | Django==4.1b1 4 | django-bootstrap5==21.3 5 | platformshconfig==2.4.0 6 | soupsieve==2.3.2.post1 7 | sqlparse==0.4.2 8 | -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/requirements_remote.txt: -------------------------------------------------------------------------------- 1 | # Requirements for live project. 2 | gunicorn 3 | psycopg2 -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "learning_logs/base.html" %} 2 | 3 | {% block page_header %} 4 |

The item you requested is not available. (404)

5 | {% endblock page_header %} -------------------------------------------------------------------------------- /02_python_crash_course/python_crash_course_book_code_with_typing/solution_files/chapter_20/ex_20_4_extended/templates/500.html: -------------------------------------------------------------------------------- 1 | {% extends "learning_logs/base.html" %} 2 | 3 | {% block page_header %} 4 |

There has been an internal error. (500)

5 | {% endblock page_header %} -------------------------------------------------------------------------------- /03_gpts/02_sql_model/requirements.txt: -------------------------------------------------------------------------------- 1 | psycopg2-binary 2 | sqlmodel -------------------------------------------------------------------------------- /03_gpts/03_simple_hero_api/readme.md: -------------------------------------------------------------------------------- 1 | # Simple Hero API with FastAPI 2 | 3 | https://sqlmodel.tiangolo.com/tutorial/fastapi/simple-hero-api/ 4 | 5 | uvicorn main:app --reload -------------------------------------------------------------------------------- /03_gpts/04_session_dependency/readme.md: -------------------------------------------------------------------------------- 1 | # Session with FastAPI Dependency¶ 2 | 3 | https://sqlmodel.tiangolo.com/tutorial/fastapi/session-with-dependency/ 4 | -------------------------------------------------------------------------------- /03_gpts/05_production_ready_project/readme.md: -------------------------------------------------------------------------------- 1 | # FastAPI + SQLModel Production Ready API 2 | 3 | https://github.com/anthonycepeda/fastapi-sqlmodel -------------------------------------------------------------------------------- /04_everything_is_an_api/01_requests/requirements.txt: -------------------------------------------------------------------------------- 1 | requests -------------------------------------------------------------------------------- /04_everything_is_an_api/02_pydantic/requirements.txt: -------------------------------------------------------------------------------- 1 | pydantic 2 | email-validator -------------------------------------------------------------------------------- /04_everything_is_an_api/03_serverless_postgresql_database/00_helloworld/connection_string.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/03_serverless_postgresql_database/00_helloworld/connection_string.png -------------------------------------------------------------------------------- /04_everything_is_an_api/03_serverless_postgresql_database/00_helloworld/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/03_serverless_postgresql_database/00_helloworld/readme.md -------------------------------------------------------------------------------- /04_everything_is_an_api/03_serverless_postgresql_database/00_helloworld/requirements.txt: -------------------------------------------------------------------------------- 1 | psycopg2-binary 2 | SQLAlchemy -------------------------------------------------------------------------------- /04_everything_is_an_api/03_serverless_postgresql_database/04_orm_query/readme.md: -------------------------------------------------------------------------------- 1 | # Writing SELECT statements for ORM Mapped Classes 2 | 3 | https://docs.sqlalchemy.org/en/20/orm/queryguide/select.html -------------------------------------------------------------------------------- /04_everything_is_an_api/03_serverless_postgresql_database/05_class_inheritance/readme.md: -------------------------------------------------------------------------------- 1 | # Mapping Class Inheritance Hierarchies 2 | 3 | https://docs.sqlalchemy.org/en/20/orm/inheritance.html 4 | 5 | -------------------------------------------------------------------------------- /04_everything_is_an_api/04_pytest/requirements.txt: -------------------------------------------------------------------------------- 1 | pytest -------------------------------------------------------------------------------- /04_everything_is_an_api/04_pytest/test_sample.py: -------------------------------------------------------------------------------- 1 | # content of test_sample.py 2 | def func(x:int)->int: 3 | return x + 1 4 | 5 | def func1(x:int)->int: 6 | return x + 1 7 | 8 | 9 | def test_answer(): 10 | assert func(3) == 5 11 | 12 | def test_answer1(): 13 | assert func1(3) == 4 -------------------------------------------------------------------------------- /04_everything_is_an_api/04_pytest/test_sysexit.py: -------------------------------------------------------------------------------- 1 | # content of test_sysexit.py 2 | import pytest 3 | 4 | 5 | def f()-> None: 6 | raise SystemExit(1) 7 | 8 | 9 | def test_mytest(): 10 | with pytest.raises(SystemExit): 11 | f() -------------------------------------------------------------------------------- /04_everything_is_an_api/04_pytest/tests/test_class.py: -------------------------------------------------------------------------------- 1 | # content of test_class.py 2 | class TestClass: 3 | def test_one(self): 4 | x = "this" 5 | assert "h" in x 6 | 7 | def test_two(self): 8 | x = "hello" 9 | assert hasattr(x, "check") -------------------------------------------------------------------------------- /04_everything_is_an_api/04_pytest/tests/test_class_demo.py: -------------------------------------------------------------------------------- 1 | # content of test_class_demo.py 2 | class TestClassDemoInstance: 3 | value = 0 4 | 5 | def test_one(self): 6 | self.value = 1 7 | assert self.value == 1 8 | 9 | def test_two(self): 10 | assert self.value == 1 -------------------------------------------------------------------------------- /04_everything_is_an_api/04_pytest/tests/test_sample.py: -------------------------------------------------------------------------------- 1 | def func(x): 2 | return x + 1 3 | 4 | 5 | def test_answer(): 6 | assert func(3) == 5 -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/01_modern_web/readme.md: -------------------------------------------------------------------------------- 1 | # The Modern Web 2 | 3 | [Chapter 1 of FastAPI Textbook](https://www.amazon.com/FastAPI-Bill-Lubanovic-ebook/dp/B0CLKZJSGV/ref=sr_1_1) -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/02_hello/check.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | r = requests.get('http://127.0.0.1:8000/hi/Muhammad Qasim') 4 | print(r.status_code) 5 | print(r.headers) 6 | print(r.json()) 7 | print(r.text) -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/02_hello/hello.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | 3 | app : FastAPI = FastAPI() 4 | 5 | @app.get("/") 6 | def index() -> str: 7 | return "Pakistan zinda bad , 123 , abc" -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/02_hello/requirements.txt: -------------------------------------------------------------------------------- 1 | fastapi 2 | uvicorn 3 | httpie 4 | requests 5 | httpx -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/02_hello/test_requests.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | r = requests.get("http://localhost:8000/hi") 4 | print(r.json()) -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/02_hello/tests/test_url.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | r = requests.get('http://127.0.0.1:8000/hi/Muhammad Qasim') 4 | 5 | def test_status_code(): 6 | 7 | assert r.status_code == 200 8 | -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/01_url_path/hello.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | 3 | app = FastAPI() 4 | 5 | @app.get("/hi/{who}") 6 | def greet(who:str): 7 | return f"Hello? {who}?" 8 | 9 | # @app.get("/hi/{who}/piaic") 10 | # def greet(who:str): 11 | # return f"Hello? {who}?" -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/01_url_path/hello_internally.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | app = FastAPI() 3 | 4 | @app.get("/hi") 5 | def greet(): 6 | return "Hello? World?" 7 | 8 | if __name__ == "__main__": 9 | import uvicorn 10 | uvicorn.run("hello_internally:app", reload=True) -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/01_url_path/test_url_path.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | r = requests.get("http://localhost:8000/hi/Mom") 4 | 5 | print(r.json()) -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/02_query_parameters/hello.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | 3 | app = FastAPI() 4 | 5 | # @app.get("/hi") 6 | # def greet(who:str): 7 | # return f"Hello? {who}?" 8 | 9 | @app.get("/hi") 10 | def greet(who): 11 | return f"Hello? {who}?" -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/02_query_parameters/test_query_param.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | params = {"who": "Mom"} 4 | r = requests.get("http://localhost:8000/hi", params=params) 5 | print(r.json()) -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/03_body/hello.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI, Body 2 | 3 | app = FastAPI() 4 | 5 | @app.post("/hi") 6 | def greet(who:str = Body(embed=True)): 7 | return f"Hello? {who}?" -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/03_body/test_body.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | r = requests.post("http://localhost:8000/hi", json={"who": "Mom"}) 4 | print(r.json()) -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/04_http_header/hello.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI, Header 2 | 3 | app = FastAPI() 4 | 5 | @app.post("/hi") 6 | def greet(who:str = Header()): 7 | return f"Hello? {who}?" -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/04_http_header/readme.md: -------------------------------------------------------------------------------- 1 | # Header 2 | 3 | Passing the greeting argument as an HTTP header 4 | 5 | Start Uvicorn with the command line 6 | 7 | uvicorn hello:app --reload 8 | 9 | Test with HTTPie 10 | 11 | http -v localhost:8000/hi who:Mom 12 | -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/04_http_header/test_header.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/07_fastapi/03_hello_who/04_http_header/test_header.py -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/05_header_return/hello.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI, Header 2 | 3 | app = FastAPI() 4 | 5 | @app.post("/agent") 6 | def get_agent(user_agent:str = Header()): 7 | print(user_agent) 8 | return user_agent -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/03_hello_who/05_header_return/test.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | r = requests.post("http://localhost:8000/agent") 4 | print(r.text,"Pakistan") -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/04_pydantic/test.py: -------------------------------------------------------------------------------- 1 | from model import Creature 2 | 3 | dragon = Creature( 4 | name="dragon", 5 | description=["incorrect", "string", "list"], 6 | country="*" , 7 | area="*", 8 | aka="firedrake") -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/04_pydantic/web.py: -------------------------------------------------------------------------------- 1 | from model import Creature 2 | from fastapi import FastAPI 3 | 4 | app = FastAPI() 5 | 6 | @app.get("/creature") 7 | def get_all() -> list[Creature]: 8 | from data import get_creatures 9 | return get_creatures() -------------------------------------------------------------------------------- /04_everything_is_an_api/07_fastapi/05_dependencies/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY= -------------------------------------------------------------------------------- /04_everything_is_an_api/10_http_streaming_api/integration_with_openai.md: -------------------------------------------------------------------------------- 1 | [Implementing Streaming with FastAPI’s StreamingResponse — Part 1](https://noplacelikelocalhost.medium.com/implementing-streaming-with-fastapis-streamingresponse-part-1-edf4c55a4132) -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/00_helloworld/01_first_steps/readme.md: -------------------------------------------------------------------------------- 1 | # Security First Steps 2 | 3 | https://fastapi.tiangolo.com/tutorial/security/first-steps/ -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/00_helloworld/02_get_current_user/readme.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://fastapi.tiangolo.com/tutorial/security/get-current-user/ 4 | -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/00_helloworld/readme.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Note: 4 | 5 | [Official Docs are very important](https://fastapi.tiangolo.com/learn/) -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/01_basic_auth/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | class User(BaseModel): 4 | username: str 5 | email: str | None = None 6 | full_name: str | None = None 7 | disabled: bool | None = None 8 | 9 | 10 | class UserInDB(User): 11 | hashed_password: str -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/01_basic_auth/requirements.txt: -------------------------------------------------------------------------------- 1 | fastapi 2 | uvicorn 3 | python-multipart 4 | pydantic -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/02_jwt_auth/01_hashing_and_access_tokens/requirements.txt: -------------------------------------------------------------------------------- 1 | fastapi 2 | uvicorn 3 | python-dotenv 4 | python-jose 5 | passlib 6 | python-multipart 7 | pydantic -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/02_jwt_auth/02_refresh_tokens/requirements.txt: -------------------------------------------------------------------------------- 1 | fastapi 2 | uvicorn 3 | python-dotenv 4 | python-jose 5 | passlib 6 | python-multipart 7 | pydantic -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/03_google_auth/.gitignore: -------------------------------------------------------------------------------- 1 | client_secret.json -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/03_google_auth/nextjs-flow/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/03_google_auth/nextjs-flow/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/03_google_auth/nextjs-flow/app/favicon.ico -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/03_google_auth/nextjs-flow/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/03_google_auth/nextjs-flow/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/03_google_auth/requirements.txt: -------------------------------------------------------------------------------- 1 | google-api-python-client 2 | google-auth 3 | google-auth-oauthlib 4 | google-auth-httplib2 5 | 6 | fastapi 7 | uvicorn[standard] 8 | itsdangerous -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/.gitignore: -------------------------------------------------------------------------------- 1 | client_secret.json -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/04_authentication/__init__.py -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/04_authentication/src/__init__.py -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/src/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/04_authentication/src/data/__init__.py -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/src/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/04_authentication/src/models/__init__.py -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/src/placeholder_client_secret.json: -------------------------------------------------------------------------------- 1 | // replace with your client_secret here -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/src/service/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/04_authentication/src/service/__init__.py -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/src/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/04_authentication/src/utils/__init__.py -------------------------------------------------------------------------------- /04_everything_is_an_api/13_oauth2/04_authentication/src/web/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/13_oauth2/04_authentication/src/web/__init__.py -------------------------------------------------------------------------------- /04_everything_is_an_api/19_next_fastapi/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /04_everything_is_an_api/19_next_fastapi/api/index.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | 3 | app = FastAPI() 4 | 5 | @app.get("/") 6 | def status(): 7 | return {"messge": "ok from uvicorn server"} 8 | 9 | @app.get("/status") 10 | def next_app(): 11 | return {"message": "from nextjs api"} 12 | 13 | 14 | -------------------------------------------------------------------------------- /04_everything_is_an_api/19_next_fastapi/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /04_everything_is_an_api/19_next_fastapi/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/04_everything_is_an_api/19_next_fastapi/src/app/favicon.ico -------------------------------------------------------------------------------- /04_everything_is_an_api/21_celery/readme.md: -------------------------------------------------------------------------------- 1 | # Asynchronous Tasks with Celery 2 | 3 | https://docs.celeryq.dev/en/stable/ -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/00_what_is_a_microservice/microservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/00_what_is_a_microservice/microservices.png -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/01_what_is_a_microservices_application/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/01_what_is_a_microservices_application/app.png -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/03_microservices_all_in_one_platform/arch.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/03_microservices_all_in_one_platform/arch.jpeg -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/03_microservices_all_in_one_platform/tech_stack.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/03_microservices_all_in_one_platform/tech_stack.jpeg -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/06_best_practices/best.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/06_best_practices/best.jpeg -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/07_design_patterns/design_patterns.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/07_design_patterns/design_patterns.pdf -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/project_youtube/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/09_create_project/project_youtube/README.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/project_youtube/dist/project_youtube-0.1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/09_create_project/project_youtube/dist/project_youtube-0.1.0.tar.gz -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/project_youtube/project_youtube/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/09_create_project/project_youtube/project_youtube/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/project_youtube/project_youtube/main.py: -------------------------------------------------------------------------------- 1 | def my_first_function()->str: 2 | return "Hello World" 3 | 4 | result: str = my_first_function() 5 | 6 | print(result) -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/project_youtube/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/09_create_project/project_youtube/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/project_youtube/tests/test_myproject.py: -------------------------------------------------------------------------------- 1 | from project_youtube import main 2 | 3 | def test_function1(): 4 | r = main.my_first_function() 5 | assert r == "Hello World" 6 | 7 | def test_function2(): 8 | r = main.my_first_function() 9 | assert r != "Pakistan" -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/test_poetry/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/09_create_project/test_poetry/README.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/test_poetry/test_poetry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/09_create_project/test_poetry/test_poetry/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/09_create_project/test_poetry/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/09_create_project/test_poetry/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/10_microservice_helloworld/fastapi-helloworld/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/10_microservice_helloworld/fastapi-helloworld/README.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/10_microservice_helloworld/fastapi-helloworld/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/10_microservice_helloworld/fastapi-helloworld/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/10_microservice_helloworld/fastapi_helloworld_online/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/10_microservice_helloworld/fastapi_helloworld_online/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/11_microservice_db/fastapi_neon/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/11_microservice_db/fastapi_neon/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/11_microservice_db/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/11_microservice_db/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/00_step_fastapi_helloworld_with_test/heroapi_uit/main.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | 3 | app : FastAPI = FastAPI() 4 | 5 | @app.get("/") 6 | def root(): 7 | return {"Hello": "world"} -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/Multiple Models with FastAPI/database.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/Multiple Models with FastAPI/database.db -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/Simple Hero API with FastAPI/database.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/Simple Hero API with FastAPI/database.db -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/database.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/database.db -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/heroapi_uit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/heroapi_uit/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/heroapi_uit/settings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/heroapi_uit/settings.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/fastapi/heroapi_uit/tests/test_main.py: -------------------------------------------------------------------------------- 1 | from fastapi.testclient import TestClient 2 | from heroapi_uit.main import app 3 | 4 | def test_root_path(): 5 | client = TestClient(app=app) 6 | response = client.get('/') 7 | assert response.status_code == 200 -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/hero_api/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/hero_api/README.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/hero_api/hero_api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/hero_api/hero_api/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/hero_api/hero_api/main.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | 3 | app = FastAPI(title="UIT Fast API", version="0.0.0") 4 | 5 | @app.get("/") 6 | def index(): 7 | return {"Hello": "World"} -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/12_fastapi_sqlmodel/hero_api/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/12_fastapi_sqlmodel/hero_api/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .venv 3 | .mypy_cache 4 | __pycache__ -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/Dockerfile.prod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/Dockerfile.prod -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/README.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/test_poetry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/test_poetry/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/test_poetry/main.py: -------------------------------------------------------------------------------- 1 | print("Hello World for Zia Container") -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/01_containerizing_poetry/test_poetry/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/02_containerization/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/02_containerization/app/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/02_containerization/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/02_containerization/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/02_containerization/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/Dockerfile.prod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/Dockerfile.prod -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/app/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/architecture-containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/architecture-containers.png -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/attach-container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/attach-container.png -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/cmd1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/cmd1.png -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/cmd2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/cmd2.png -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/image.png -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/03_dev_containers/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/03_dev_containers/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/04_compose/compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | 3 | name: myapi 4 | 5 | services: 6 | api: 7 | build: 8 | context: ./todo 9 | dockerfile: Dockerfile.dev 10 | ports: 11 | - "8000:8000" # Expose container port 8000 to host port 8000 12 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/04_compose/todo/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/04_compose/todo/app/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/04_compose/todo/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/04_compose/todo/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/04_compose/todo/readme.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/04_compose/todo/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/04_compose/todo/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/05_compose_db/.gitignore: -------------------------------------------------------------------------------- 1 | postgres-data 2 | data -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/05_compose_db/todo/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/05_compose_db/todo/app/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/05_compose_db/todo/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/05_compose_db/todo/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/05_compose_db/todo/readme.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/05_compose_db/todo/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/05_compose_db/todo/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/06_compose_dev_container/README.md: -------------------------------------------------------------------------------- 1 | https://toptechtips.github.io/2023-05-17-docker-compose-multiple-dev-containers/ 2 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/.gitignore: -------------------------------------------------------------------------------- 1 | postgres-data 2 | data -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/order_service/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/order_service/app/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/order_service/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/order_service/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/order_service/readme.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/order_service/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/order_service/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/user_service/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/user_service/app/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/user_service/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/user_service/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/user_service/readme.md -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/user_service/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/05_microservices_all_in_one_platform/14_docker/07_synchronous_messages/user_service/tests/__init__.py -------------------------------------------------------------------------------- /05_microservices_all_in_one_platform/15_template/readme.md: -------------------------------------------------------------------------------- 1 | # Full Stack FastAPI SQLModel Template 2 | 3 | [Base Template](https://github.com/tiangolo/full-stack-fastapi-template/) -------------------------------------------------------------------------------- /06_chatgpt/01_hello_world/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/01_hello_world/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/01_hello_world/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | openai -------------------------------------------------------------------------------- /06_chatgpt/02_multiple_roles/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/02_multiple_roles/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/02_multiple_roles/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | openai -------------------------------------------------------------------------------- /06_chatgpt/03_streaming_response/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/03_streaming_response/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/03_streaming_response/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | openai -------------------------------------------------------------------------------- /06_chatgpt/04_json_mode/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/04_json_mode/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/04_json_mode/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | openai -------------------------------------------------------------------------------- /06_chatgpt/05_function_calling/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/05_function_calling/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/05_function_calling/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/05_function_calling/first.png -------------------------------------------------------------------------------- /06_chatgpt/05_function_calling/second.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/05_function_calling/second.png -------------------------------------------------------------------------------- /06_chatgpt/06_assistants_code_interpreter/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/06_assistants_code_interpreter/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/06_assistants_code_interpreter/assistants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/06_assistants_code_interpreter/assistants.png -------------------------------------------------------------------------------- /06_chatgpt/07_assistants_knowledge_retrieval/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/07_assistants_knowledge_retrieval/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/07_assistants_knowledge_retrieval/objects.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/07_assistants_knowledge_retrieval/objects.jpeg -------------------------------------------------------------------------------- /06_chatgpt/07_assistants_knowledge_retrieval/ret.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/07_assistants_knowledge_retrieval/ret.jpg -------------------------------------------------------------------------------- /06_chatgpt/07_assistants_knowledge_retrieval/zia_profile.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/07_assistants_knowledge_retrieval/zia_profile.pdf -------------------------------------------------------------------------------- /06_chatgpt/08_assistants_function_calling/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/08_assistants_function_calling/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /06_chatgpt/08_assistants_function_calling/diagram-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/08_assistants_function_calling/diagram-2.png -------------------------------------------------------------------------------- /06_chatgpt/08_assistants_function_calling/diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/08_assistants_function_calling/diagram.png -------------------------------------------------------------------------------- /06_chatgpt/09_projects/01_financial_financial_analyst/readme.md: -------------------------------------------------------------------------------- 1 | # Building an AI Financial Analyst with the Assistants API 2 | 3 | [Building an AI Financial Analyst with the Assistants API](https://www.mlq.ai/ai-financial-analyst-assistants-api/) -------------------------------------------------------------------------------- /06_chatgpt/09_projects/02_ai_travel_agent/sample_airbnb_receipt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/09_projects/02_ai_travel_agent/sample_airbnb_receipt.pdf -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/01_text-to-speech/speech.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/01_text-to-speech/speech.mp3 -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/01_text-to-speech/streaming.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/01_text-to-speech/streaming.mp3 -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/01_text-to-speech/urdu.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/01_text-to-speech/urdu.mp3 -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/02 Speech to text/chuck_10_25mb.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/02 Speech to text/chuck_10_25mb.mp3 -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/02 Speech to text/urdu.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/02 Speech to text/urdu.mp3 -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/03_text_to_image/background_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/03_text_to_image/background_image.png -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/03_text_to_image/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/03_text_to_image/image.png -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/03_text_to_image/masked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/03_text_to_image/masked.png -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/03_text_to_image/white_cat_from_DALE3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/03_text_to_image/white_cat_from_DALE3.png -------------------------------------------------------------------------------- /06_chatgpt/10_multimodal_genai/04_vision/abc.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/06_chatgpt/10_multimodal_genai/04_vision/abc.jpeg -------------------------------------------------------------------------------- /06_chatgpt/11_fine_tuning/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /06_chatgpt/11_fine_tuning/readme.md: -------------------------------------------------------------------------------- 1 | # Fine-tuning 2 | 3 | https://platform.openai.com/docs/guides/fine-tuning 4 | 5 | https://platform.openai.com/docs/api-reference/fine-tuning -------------------------------------------------------------------------------- /06_chatgpt/11_fine_tuning/requirement.txt: -------------------------------------------------------------------------------- 1 | openai 2 | python-dotenv -------------------------------------------------------------------------------- /07_gemini/00_quickstart/readme.md: -------------------------------------------------------------------------------- 1 | # Quick Start 2 | 3 | [Quick Start](https://ai.google.dev/tutorials/python_quickstart) -------------------------------------------------------------------------------- /07_gemini/readme.md: -------------------------------------------------------------------------------- 1 | # Build with Gemini 2 | 3 | Integrate Gemini models into your applications with Google AI Studio and Google Cloud Vertex AI. 4 | 5 | [Gemini Intro](https://deepmind.google/technologies/gemini/) 6 | 7 | [Code Samples](https://github.com/GoogleCloudPlatform/generative-ai/tree/main/gemini) 8 | -------------------------------------------------------------------------------- /08_ui_streamlit/00_helloworld/readme.md: -------------------------------------------------------------------------------- 1 | # Streamlit Hello World 2 | 3 | Install streamlit package 4 | 5 | pip install streamlit 6 | 7 | Create hello.py and run it: 8 | 9 | streamlit run hello.py 10 | 11 | Open http://localhost:8501/ -------------------------------------------------------------------------------- /08_ui_streamlit/00_helloworld/urdu.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/08_ui_streamlit/00_helloworld/urdu.mp3 -------------------------------------------------------------------------------- /08_ui_streamlit/01_magic/requirements.txt: -------------------------------------------------------------------------------- 1 | streamlit 2 | matplotlib 3 | numpy -------------------------------------------------------------------------------- /08_ui_streamlit/02_basics/readme.md: -------------------------------------------------------------------------------- 1 | # Learn the Basic Functions 2 | 3 | [A Beginners Guide To Streamlit](https://www.geeksforgeeks.org/a-beginners-guide-to-streamlit/) 4 | 5 | streamlit run basics.py -------------------------------------------------------------------------------- /08_ui_streamlit/02_basics/streamlit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/08_ui_streamlit/02_basics/streamlit.png -------------------------------------------------------------------------------- /08_ui_streamlit/04_multipage_apps/Hello.py: -------------------------------------------------------------------------------- 1 | import streamlit as st 2 | 3 | st.set_page_config( 4 | page_title="Hello", 5 | page_icon="👋", 6 | ) 7 | 8 | st.write("# Welcome to Zia's Page!") 9 | 10 | st.sidebar.success("Select a demo above.") -------------------------------------------------------------------------------- /08_ui_streamlit/04_multipage_apps/pages/1_Profile.py: -------------------------------------------------------------------------------- 1 | import streamlit as st 2 | 3 | st.write("This is the Profile Page") -------------------------------------------------------------------------------- /08_ui_streamlit/04_multipage_apps/pages/2_About_US.py: -------------------------------------------------------------------------------- 1 | import streamlit as st 2 | 3 | st.write("This is the About Page") -------------------------------------------------------------------------------- /08_ui_streamlit/04_multipage_apps/readme.md: -------------------------------------------------------------------------------- 1 | # Multipage Apps 2 | 3 | [Multipage Apps](https://docs.streamlit.io/library/get-started/multipage-apps) 4 | 5 | https://github.com/Sven-Bo/streamlit-multipage-app-example -------------------------------------------------------------------------------- /08_ui_streamlit/05_session_state/readme.md: -------------------------------------------------------------------------------- 1 | # Session State 2 | 3 | [Sesssion State](https://docs.streamlit.io/library/advanced-features/session-state) 4 | 5 | 6 | Reference: 7 | 8 | [Session State Docs](https://docs.streamlit.io/library/api-reference/session-state) 9 | 10 | -------------------------------------------------------------------------------- /08_ui_streamlit/06_layout_containers/readme.md: -------------------------------------------------------------------------------- 1 | # Layout and Containers 2 | 3 | https://docs.streamlit.io/library/api-reference/layout 4 | 5 | -------------------------------------------------------------------------------- /08_ui_streamlit/07_chat_elements/readme.md: -------------------------------------------------------------------------------- 1 | # Chat Elements 2 | 3 | https://docs.streamlit.io/library/api-reference/chat -------------------------------------------------------------------------------- /08_ui_streamlit/08_status/readme.md: -------------------------------------------------------------------------------- 1 | # Status 2 | 3 | https://docs.streamlit.io/library/api-reference/status/st.status -------------------------------------------------------------------------------- /08_ui_streamlit/09_secrets_management_native/.streamlit/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.toml 2 | -------------------------------------------------------------------------------- /08_ui_streamlit/09_secrets_management_native/readme.md: -------------------------------------------------------------------------------- 1 | # Secrets management 2 | 3 | https://docs.streamlit.io/library/advanced-features/secrets-management 4 | 5 | 6 | #### Note: Existing secrets management tools, such as [dotenv](https://pypi.org/project/python-dotenv/) files will work fine in Streamlit. -------------------------------------------------------------------------------- /08_ui_streamlit/10_deploy/readme.md: -------------------------------------------------------------------------------- 1 | # Deploy 2 | 3 | https://docs.streamlit.io/knowledge-base/tutorials/deploy 4 | 5 | 6 | https://docs.streamlit.io/streamlit-community-cloud/get-started -------------------------------------------------------------------------------- /08_ui_streamlit/11_connect/.streamlit/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.toml 2 | -------------------------------------------------------------------------------- /08_ui_streamlit/11_connect/pets.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/08_ui_streamlit/11_connect/pets.db -------------------------------------------------------------------------------- /08_ui_streamlit/11_connect/readme.md: -------------------------------------------------------------------------------- 1 | # Connect Streamlit to data sources 2 | 3 | 4 | 5 | https://docs.streamlit.io/knowledge-base/tutorials/databases 6 | 7 | https://docs.streamlit.io/library/advanced-features/connecting-to-data -------------------------------------------------------------------------------- /08_ui_streamlit/12_chat_app_project/readme.md: -------------------------------------------------------------------------------- 1 | # Build a basic LLM chat app 2 | 3 | https://docs.streamlit.io/knowledge-base/tutorials/build-conversational-apps -------------------------------------------------------------------------------- /08_ui_streamlit/13_openai_assistants_project/readme.md: -------------------------------------------------------------------------------- 1 | # Build AI Agents with OpenAI's Assistant API - Quick Streamlit Tutorial 2 | 3 | https://www.toolify.ai/gpts/build-ai-agents-with-openais-assistant-api-quick-streamlit-tutorial-48395 4 | 5 | https://www.youtube.com/watch?v=tLeqCDKgEDU 6 | 7 | 8 | -------------------------------------------------------------------------------- /08_ui_streamlit/14_multimodal_project/readme.md: -------------------------------------------------------------------------------- 1 | # Create Multi Modal ChatGPT Application with Streamlit DALLE-3 Function Calling From Scratch 2 | 3 | https://www.youtube.com/watch?v=tLeqCDKgEDU -------------------------------------------------------------------------------- /08_ui_streamlit/15_build_with_chatgpt/readme.md: -------------------------------------------------------------------------------- 1 | # Take your Streamlit apps to the next level with GPT-4 2 | 3 | https://blog.streamlit.io/take-your-streamlit-apps-to-the-next-level-with-gpt-4/ -------------------------------------------------------------------------------- /09_streamlit_genai_apps/01_completion_chat_app/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /09_streamlit_genai_apps/01_completion_chat_app/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | .mypy_cache 4 | chat_history.db 5 | -------------------------------------------------------------------------------- /09_streamlit_genai_apps/01_completion_chat_app/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | #check_untyped_defs = False 5 | disallow_untyped_calls = False 6 | #disallow_incomplete_defs = False 7 | #disallow_untyped_defs = False 8 | #ignore_errors = True -------------------------------------------------------------------------------- /09_streamlit_genai_apps/01_completion_chat_app/requirements.txt: -------------------------------------------------------------------------------- 1 | streamlit 2 | OpenAI -------------------------------------------------------------------------------- /09_streamlit_genai_apps/02_assistant_chat_app/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /09_streamlit_genai_apps/02_assistant_chat_app/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | .mypy_cache 4 | -------------------------------------------------------------------------------- /09_streamlit_genai_apps/02_assistant_chat_app/mypy.ini: -------------------------------------------------------------------------------- 1 | # Global options: 2 | 3 | [mypy] 4 | #check_untyped_defs = False 5 | disallow_untyped_calls = False 6 | #disallow_incomplete_defs = False 7 | #disallow_untyped_defs = False 8 | #ignore_errors = True -------------------------------------------------------------------------------- /09_streamlit_genai_apps/02_assistant_chat_app/readme.md: -------------------------------------------------------------------------------- 1 | # Assistant Chat App 2 | 3 | Install streamlit package 4 | 5 | pip install -r requirements.txt 6 | 7 | Create hello.py and run it: 8 | 9 | streamlit run cat.py 10 | 11 | Open http://localhost:8501/ -------------------------------------------------------------------------------- /09_streamlit_genai_apps/02_assistant_chat_app/requirements.txt: -------------------------------------------------------------------------------- 1 | streamlit 2 | OpenAI -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY = "" 2 | PINECONE_ENV = "" 3 | PINECONE_API_KEY ="" -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/embeddings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/embeddings.png -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/llm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/llm.png -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | openai 3 | langchain 4 | pinecone-client 5 | tiktoken 6 | IPython 7 | docarray -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/router_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/router_chain.png -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/seq1_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/seq1_chain.png -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/seq_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/seq_chain.png -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/simple_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/simple_chain.png -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/vector_db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/vector_db.png -------------------------------------------------------------------------------- /11_langchain/bak/00_llm_app_dev/vector_db2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/11_langchain/bak/00_llm_app_dev/vector_db2.png -------------------------------------------------------------------------------- /11_langchain/bak/01_functions_tools_agents/readme.md: -------------------------------------------------------------------------------- 1 | # Functions, Tools and Agents with LangChain 2 | 3 | 4 | https://www.deeplearning.ai/short-courses/functions-tools-agents-langchain/ -------------------------------------------------------------------------------- /11_langchain/bak/02_chat_with_data/readme.md: -------------------------------------------------------------------------------- 1 | # LangChain: Chat with Your Data 2 | 3 | 4 | [LangChain: Chat with Your Data](https://www.deeplearning.ai/short-courses/langchain-chat-with-your-data/) 5 | -------------------------------------------------------------------------------- /11_langchain/bak/readme.md: -------------------------------------------------------------------------------- 1 | # Langchain 2 | 3 | [6 Problems of LLMs That LangChain is Trying to Assess](https://www.kdnuggets.com/6-problems-of-llms-that-langchain-is-trying-to-assess) 4 | 5 | https://nanonets.com/blog/langchain/ 6 | -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/00_concept_dev/chat_history.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/00_concept_dev/chat_history.db -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/.dockerignore: -------------------------------------------------------------------------------- 1 | .env -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY='' -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/__init__.py -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/data/__init__.py -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/models/__init__.py -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/service/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/service/__init__.py -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/web/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/01_fast_api_service/backend/app/web/__init__.py -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/chat_history.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/01_fast_api_service/backend/chat_history.db -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/01_fast_api_service/backend/requirements.txt: -------------------------------------------------------------------------------- 1 | fastapi 2 | openai 3 | uvicorn 4 | python-dotenv 5 | SQLAlchemy 6 | psycopg2 -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/.env_bak: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_JS_GOOGLE_MAPS_KEY='' 2 | NEXT_PUBLIC_FASTAPI_BACKEND_URL='' -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | module.exports = nextConfig 5 | -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/public/ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/public/ai.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/public/human.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/public/human.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/src/app/favicon.ico -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/nextjs-starter/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/streamlit/.env_bak: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY='' 2 | BACKEND_FASTAPI_URL='' 3 | MAPBOX_TOKEN="" # optional # use it for maps styling if needed -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/streamlit/lottie_files_credits.txt: -------------------------------------------------------------------------------- 1 | Robot Says Hi! 2 | Irby Pace 3 | https://lottiefiles.com/animations/robot-says-hi-4KNeuRqlcw 4 | -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/03_streamlit_nextjs/streamlit/requirements.txt: -------------------------------------------------------------------------------- 1 | plotly 2 | requests 3 | streamlit 4 | python-dotenv 5 | streamlit-lottie -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/fastapi_deployed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/fastapi_deployed.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/fastapi_docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/fastapi_docs.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/nextjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/nextjs.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/open_cloud_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/open_cloud_run.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/overall_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/overall_flow.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/run-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/run-config.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/st-front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/st-front.png -------------------------------------------------------------------------------- /16_llm_projects/01_travel_app_project/public/streamlit-frontend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/16_llm_projects/01_travel_app_project/public/streamlit-frontend.png -------------------------------------------------------------------------------- /18_assignment_projects/readmd.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/18_assignment_projects/readmd.md -------------------------------------------------------------------------------- /assistants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/assistants.png -------------------------------------------------------------------------------- /genai_fit.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/genai_fit.jpeg -------------------------------------------------------------------------------- /opl.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/opl.jpeg -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/01_helloworld_dev_python/web/app.py: -------------------------------------------------------------------------------- 1 | # Import flask module 2 | from flask import Flask 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route('/') 7 | def index(): 8 | return 'Hello from Zia' 9 | -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/01_helloworld_dev_python/web/requirements.txt: -------------------------------------------------------------------------------- 1 | flask -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/03_push/Figure8.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/xx_containers_development_deployment/01_local/01_containers/03_push/Figure8.1.png -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/04_pydantic/flask_docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM continuumio/miniconda3:latest 2 | 3 | # Copy app to /app 4 | COPY . /app 5 | 6 | WORKDIR /app 7 | 8 | RUN pip install -r requirements.txt 9 | 10 | CMD [ "python", "-m" , "flask", "run", "--host=0.0.0.0"] -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/04_pydantic/flask_docker/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | pydantic -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/05_volume_mounts/EphemeralContainerStorage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/xx_containers_development_deployment/01_local/01_containers/05_volume_mounts/EphemeralContainerStorage.png -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/05_volume_mounts/VolumeDrivers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/xx_containers_development_deployment/01_local/01_containers/05_volume_mounts/VolumeDrivers.png -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/05_volume_mounts/bind-mounts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/xx_containers_development_deployment/01_local/01_containers/05_volume_mounts/bind-mounts.png -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/06_yaml/foo.py: -------------------------------------------------------------------------------- 1 | import yaml 2 | # https://ioflood.com/blog/python-import/ 3 | 4 | with open('foo.yaml', 'r') as file: 5 | prime_service = yaml.safe_load(file) 6 | 7 | print(prime_service) -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/06_yaml/foo.yaml: -------------------------------------------------------------------------------- 1 | foo: bar 2 | pleh: help 3 | stuff: 4 | foo: bar 5 | bar: foo -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/06_yaml/requirements.txt: -------------------------------------------------------------------------------- 1 | PyYAML 2 | types-PyYAML -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/07_docker_compose/Figure9.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/xx_containers_development_deployment/01_local/01_containers/07_docker_compose/Figure9.2.png -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/07_docker_compose/multi-contianer/app/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error page 6 | 7 | 8 | Throwing an error 9 | 10 | 11 | -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/07_docker_compose/multi-contianer/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | redis 3 | jinja2 -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/09_flask_with_postgres/readme.md: -------------------------------------------------------------------------------- 1 | # Flask With Postgres Container 2 | 3 | -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/10_todo_api/00_basic_api/web/requirements.txt: -------------------------------------------------------------------------------- 1 | flask -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/01_containers/xx_deploy_streamlit/streamlit-app/requirements.txt: -------------------------------------------------------------------------------- 1 | altair 2 | pandas 3 | streamlit 4 | -------------------------------------------------------------------------------- /xx_containers_development_deployment/01_local/02_containers_api_development/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/learn-generative-ai/05e5a2b42a9c4367790040da3abc2d0ca9b3d848/xx_containers_development_deployment/01_local/02_containers_api_development/readme.md -------------------------------------------------------------------------------- /xx_containers_development_deployment/02_testing/01_test_containers/readme.md: -------------------------------------------------------------------------------- 1 | # Test Containers 2 | 3 | [Testcontainers – From Zero to Hero](https://www.youtube.com/watch?v=v3eQCIWLYOw) 4 | 5 | https://testcontainers.com/ -------------------------------------------------------------------------------- /xx_containers_development_deployment/03_deploy_cloud/01_google_cloud_run/01_containers_api_deploy/google/00_helloworld_cloud/helloworld/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==3.0.0 2 | gunicorn==20.1.0 3 | Werkzeug==3.0.1 -------------------------------------------------------------------------------- /xx_containers_development_deployment/03_deploy_cloud/01_google_cloud_run/01_containers_api_deploy/google/01_helloworld_local/helloworld/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==3.0.0 2 | gunicorn==20.1.0 3 | Werkzeug==3.0.1 -------------------------------------------------------------------------------- /xx_containers_development_deployment/03_deploy_cloud/02_azure_container_apps/readme.md: -------------------------------------------------------------------------------- 1 | https://azure.microsoft.com/en-us/products/container-apps -------------------------------------------------------------------------------- /xx_containers_development_deployment/03_deploy_cloud/03_kubernetes/readme.md: -------------------------------------------------------------------------------- 1 | [Easily Run Kubernetes on Docker Desktop](https://www.youtube.com/watch?v=dZXXulK97u8] 2 | 3 | https://docs.docker.com/desktop/kubernetes/ -------------------------------------------------------------------------------- /xx_containers_development_deployment/03_deploy_cloud/04_terraform/readme.md: -------------------------------------------------------------------------------- 1 | # Infrastructure as Code (IaC) using Terraform -------------------------------------------------------------------------------- /xx_containers_development_deployment/03_deploy_cloud/05_integrated_project/00_project_structure/readme.md: -------------------------------------------------------------------------------- 1 | # Python Project Structure 2 | 3 | [Guide to Python Project Structure and Packaging](https://medium.com/mlearning-ai/a-practical-guide-to-python-project-structure-and-packaging-90c7f7a04f95) -------------------------------------------------------------------------------- /xx_design_patterns/readme.md: -------------------------------------------------------------------------------- 1 | https://towardsdatascience.com/generative-ai-design-patterns-a-comprehensive-guide-41425a40d7d0 2 | 3 | -------------------------------------------------------------------------------- /xx_docker_nextjs/readme.md: -------------------------------------------------------------------------------- 1 | # Docker on Vercel 2 | 3 | https://twitter.com/TooTallNate/status/1727374632934879464 4 | 5 | https://twitter.com/TooTallNate/status/1727392596614664535 6 | 7 | Text Book: 8 | 9 | https://www.amazon.com/Docker-Deep-Dive-Nigel-Poulton/dp/1916585256/ref=tmm_pap_swatch_0 10 | 11 | -------------------------------------------------------------------------------- /xx_fintech/readme.md: -------------------------------------------------------------------------------- 1 | # Build Financial Software with Generative AI 2 | 3 | https://www.manning.com/books/build-financial-software-with-generative-ai -------------------------------------------------------------------------------- /xx_vlogger/readme.md: -------------------------------------------------------------------------------- 1 | 2 | https://opencv.org/blog/google-vlogger-generative-ai/ --------------------------------------------------------------------------------