### Install Pandas and TQDM for Bulk Import Source: https://github.com/deign86/cinesense/blob/main/README.md Installs the pandas and tqdm libraries required for bulk movie data processing. ```bash pip install pandas tqdm ``` -------------------------------- ### Run Development Server Source: https://github.com/deign86/cinesense/blob/main/README.md Starts the Django development server. ```bash python manage.py runserver ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/deign86/cinesense/blob/main/README.md Installs all necessary Python packages listed in the requirements.txt file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Example Bulk Movie Import Execution Source: https://github.com/deign86/cinesense/blob/main/README.md Demonstrates the command-line execution of the bulk movie import process with specific parameters and shows the expected output format. ```bash $ python manage.py import_movies --bulk --file=TMDB_all_movies.csv --limit=500000 📁 Detected format: CSV ✨ Using Kaggle CSV parser (includes IMDB ratings!) Loading existing movie IDs for deduplication... Found 178 existing movies with TMDB IDs 🎬 Starting bulk import from TMDB_all_movies.csv... Limit: 500,000 movies Batch size: 1,000 Only released: True Min votes: 0 Importing: 100%|██████████| 500000/500000 [04:52<00:00, 1710.42movies/s] ============================================================ ✅ BULK IMPORT COMPLETE! ============================================================ 📥 Imported: 487,234 new movies ⏭️ Skipped (exist): 178 ⚠️ Skipped (invalid):12,588 ⏱️ Time elapsed: 292.4 seconds 🚀 Import rate: 1,666 movies/second ============================================================ 📊 Total movies in database: 487,412 ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/deign86/cinesense/blob/main/README.md Example of a .env file for configuring OMDB API Key and Django settings. ```env # OMDB API Key (get free key at https://www.omdbapi.com/apikey.aspx) OMDB_API_KEY=your_api_key_here # Django Settings (optional) DEBUG=True SECRET_KEY=your-secret-key-here ``` -------------------------------- ### Python F-string Example Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Shows how to use f-strings for formatted string output in Python, embedding variables directly into strings. ```python f"{self.title} ({self.year})" ``` -------------------------------- ### Interactive Rating Session CLI Tool Source: https://github.com/deign86/cinesense/blob/main/README.md Start an interactive session for rating movies via the command line. ```bash python cli_tools/rating_session.py ``` -------------------------------- ### Python Casting Example Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Demonstrates casting numerical values to integer and float types in Python. ```python int(delta.days) ``` ```python float(avg) ``` -------------------------------- ### Get Letterboxd URLs using LetterboxdClient Source: https://github.com/deign86/cinesense/blob/main/README.md This example demonstrates how to use the LetterboxdClient to obtain relevant URLs for a movie on Letterboxd. It returns the film, diary, and watchlist URLs. ```python from movies.services.external_apis import LetterboxdClient client = LetterboxdClient() urls = client.get_movie_urls("Inception", 2010) # Returns: film_url, diary_url, watchlist_url ``` -------------------------------- ### Python String Modification Examples Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Illustrates common string manipulation methods in Python: splitting, stripping whitespace, and replacing substrings. ```python .split() ``` ```python .strip() ``` ```python .replace() ``` -------------------------------- ### Python Inheritance Example Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Demonstrates inheritance in Python, where a child class (e.g., Movie, Rating) inherits properties and methods from a parent class (TimestampedModel). ```python TimestampedModel base class ``` ```python TimestampedModel → Movie/Rating ``` -------------------------------- ### Python Lambda for Sorting Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Example of using a lambda function as a key for sorting a list in Python, often used for custom sort orders. ```python Sorting with lambda ``` -------------------------------- ### Django Shell: Get Top Movies by Popularity Source: https://github.com/deign86/cinesense/blob/main/README.md Retrieves the top 5 most popular movies, displaying their title, year, and popularity score using the Django shell. ```python >>> Movie.objects.order_by('-popularity')[:5].values_list('title', 'year', 'popularity') ``` -------------------------------- ### Clone and Navigate Project Directory Source: https://github.com/deign86/cinesense/blob/main/README.md Steps to clone or download the project and navigate into the main project directory. ```bash cd "CineSense Movie Recommendation System" cd cinesense_project ``` -------------------------------- ### Create and Activate Virtual Environment Source: https://github.com/deign86/cinesense/blob/main/README.md Instructions for creating a Python virtual environment and activating it on Windows or Linux/Mac. ```bash python -m venv venv # Windows venv\Scripts\activate # Linux/Mac source venv/bin/activate ``` -------------------------------- ### Run Database Migrations Source: https://github.com/deign86/cinesense/blob/main/README.md Applies database migrations to set up the necessary tables and schema. ```bash python manage.py makemigrations python manage.py migrate ``` -------------------------------- ### Python Class Initialization and String Representation Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Illustrates the implementation of `__init__` for object initialization and `__str__` for defining a user-friendly string representation of a class instance. ```python __init__ ``` ```python __str__ ``` -------------------------------- ### Manual Movie Import CLI Tool Source: https://github.com/deign86/cinesense/blob/main/README.md Execute the manual movie import script from the command line. ```bash python cli_tools/manual_import.py ``` -------------------------------- ### Executing SQL with Wrappers (Direct) Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Direct execution of SQL using a provided executor. ```python return executor(sql, params, many, context) ``` -------------------------------- ### Tkinter Desktop Client Entry Point Source: https://github.com/deign86/cinesense/blob/main/README.md Command to run the main script for the Tkinter-based desktop client. ```bash python tkinter_client/main.py ``` -------------------------------- ### OMDB API Key Configuration Source: https://github.com/deign86/cinesense/blob/main/README.md Instructions for setting up the OMDB API key in the .env file for IMDB integration. Requires requesting a key from the OMDB website. ```env OMDB_API_KEY=your_api_key_here ``` -------------------------------- ### Python Project Structure Overview Source: https://github.com/deign86/cinesense/blob/main/README.md Provides a hierarchical view of the CineSense project's directories and key files. Highlights the organization of Django apps, services, ML components, templates, static files, CLI tools, and the Tkinter client. ```text cinesense_project/ ├── manage.py # Django management script ├── requirements.txt # Python dependencies ├── README.md # This file │ ├── cinesense_project/ # Main Django project │ ├── __init__.py │ ├── settings.py # Configuration (dict, CINESENSE_CONFIG) │ ├── urls.py # URL routing │ ├── wsgi.py # WSGI entry point │ └── asgi.py # ASGI entry point │ ├── movies/ # Main Django app │ ├── __init__.py │ ├── models.py # Database models (Classes, __init__, __str__, Inheritance) │ ├── views.py # View functions/classes (Lambdas, If/Else, Loops) │ ├── forms.py # Form classes (Casting, Validation) │ ├── urls.py # App URL patterns │ ├── admin.py # Admin configuration │ │ │ ├── services/ │ │ ├── __init__.py │ │ ├── analytics.py # NumPy, SciPy statistics │ │ └── charts.py # Matplotlib charts │ │ │ └── ml/ │ ├── __init__.py │ └── recommender.py # Linear Regression, Custom Iterators │ ├── templates/ │ └── movies/ │ ├── base.html # Base template with Bootstrap │ ├── home.html # Homepage │ ├── movie_list.html # Movie listing │ ├── movie_detail.html # Movie details │ ├── analytics.html # Analytics dashboard │ ├── recommendations.html # ML recommendations │ ├── genre_movies.html # Genre-specific movies │ ├── all_genres.html # All genres │ ├── user_ratings.html # User ratings │ └── add_movie.html # Add movie form │ ├── static/ │ └── css/ │ └── styles.css # Custom styles │ ├── cli_tools/ │ ├── __init__.py │ ├── manual_import.py # Data import CLI (input(), Casting, Loops) │ └── rating_session.py # Interactive rating (input(), If/Else) │ └── tkinter_client/ ├── __init__.py └── main.py # Tkinter application (Classes, Callbacks) ``` -------------------------------- ### Executing SQL with Wrappers Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Executes SQL, potentially with database error wrappers. ```python return self._execute_with_wrappers( sql, params, many=False, executor=self. _execute ) ``` -------------------------------- ### Bulk Import Movies from Kaggle CSV Source: https://github.com/deign86/cinesense/blob/main/README.md Imports movies from a Kaggle TMDB CSV file, with options for limiting the number of movies and setting a minimum vote threshold. ```bash python manage.py import_movies --bulk --file=TMDB_all_movies.csv --limit=500000 # Import all released movies with IMDB ratings python manage.py import_movies --bulk --file=TMDB_all_movies.csv # Import with minimum vote threshold (higher quality) python manage.py import_movies --bulk --file=TMDB_all_movies.csv --min-votes=100 # Import including unreleased movies python manage.py import_movies --bulk --file=TMDB_all_movies.csv --include-unreleased ``` -------------------------------- ### SQL Execution with Parameters Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Executes a given SQL statement with parameters. ```python cursor.execute(sql, params) ``` -------------------------------- ### Query Compilation and Execution Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Compiles a query and executes the resulting SQL. ```python return query.get_compiler(using=using).execute_sql(returning_fields) ``` -------------------------------- ### Create Superuser for Admin Access Source: https://github.com/deign86/cinesense/blob/main/README.md Command to create a superuser account for accessing the Django admin panel. ```bash python manage.py createsuperuser ``` -------------------------------- ### Django Shell: Filter and Count Movies by Genre Source: https://github.com/deign86/cinesense/blob/main/README.md Demonstrates filtering movies by genre and counting the results within the Django shell. ```python >>> Movie.objects.filter(genres__icontains='Action').count() 68432 ``` -------------------------------- ### Executing Raw Inserts Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Internal method to execute a raw insert statement. ```python return manager._insert( [self], . . . < 3 l i n e s > . . . raw = raw, ) ``` -------------------------------- ### Python F-string with Placeholder Modifier Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Demonstrates using f-strings with a placeholder modifier to format a floating-point number to one decimal place. ```python f"{avg_rating:.1f}" ``` -------------------------------- ### Bulk Import Movies from TMDB Official JSON Source: https://github.com/deign86/cinesense/blob/main/README.md Imports movies from the TMDB official JSON dataset, with options for auto-downloading or specifying a local file. ```bash # Auto-download and import python manage.py import_movies --bulk --download --limit=500000 # Or download manually: # 1. Visit: https://datasets.tmdb.org/p/0.1/movie-list.json.gz # 2. Run: python manage.py import_movies --bulk --file=movie-list.json.gz ``` -------------------------------- ### Cleanup Duplicates CLI Command Source: https://github.com/deign86/cinesense/blob/main/README.md Command-line tools for managing duplicate movie entries. Includes a dry run option and an execution option. ```bash # Dry run (see what would be deleted) python manage.py cleanup_dups # Actually delete duplicates python manage.py cleanup_dups --execute # Dedupe by title+year instead of tmdb_id python manage.py cleanup_dups --by-title --execute ``` -------------------------------- ### Live Search Suggestions Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_list.html Enhances the search input with autocomplete functionality, fetching suggestions from the server as the user types. Hides suggestions when clicking outside the input or suggestion box. ```javascript document.addEventListener('DOMContentLoaded', function () { const searchInput = document.getElementById('id_query'); const suggestionsBox = document.getElementById('search-suggestions'); if (searchInput) { searchInput.setAttribute('autocomplete', 'off'); let debounceTimer; searchInput.addEventListener('input', function () { clearTimeout(debounceTimer); const query = this.value.trim(); if (query.length < 2) { suggestionsBox.style.display = 'none'; return; } debounceTimer = setTimeout(() => { fetch(`/movies/suggest/?query=${encodeURIComponent(query)}`) .then(response => response.json()) .then(data => { suggestionsBox.innerHTML = ''; if (data.results && data.results.length > 0) { data.results.forEach(movie => { const item = document.createElement('a'); item.href = `/movies/${movie.id}/`; item.className = 'list-group-item list-group-item-action d-flex align-items-center text-dark'; let poster = ''; if (movie.poster_path) { poster = ``; } else { poster = `
`; } item.innerHTML = ` ${poster}
${movie.title}
${movie.year || ''}
`; suggestionsBox.appendChild(item); }); suggestionsBox.style.display = 'block'; } else { suggestionsBox.style.display = 'none'; } }) .catch(error => console.error('Error fetching suggestions:', error)); }, 300); }); // Hide suggestions when clicking outside document.addEventListener('click', function (e) { if (e.target !== searchInput && e.target !== suggestionsBox) { suggestionsBox.style.display = 'none'; } }); } }); ``` -------------------------------- ### Recent User Reviews Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Displays a list of recent user reviews, including username, star rating, review text, tags, and date. ```html {% if ratings %} ##### Recent Reviews {% for rating in ratings %} **{{ rating.user.username }}** {{ rating.get_star_display }} {% if rating.review_text %} {{ rating.review_text }} {% endif %} {% if rating.tags %} Tags: {{ rating.tags }} {% endif %} {{ rating.created_at|date:"F j, Y" }} {% endfor %} {% endif %} ``` -------------------------------- ### Movie Header and Genre Links Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Renders the movie title and year, followed by a list of clickable genre links. ```html {{ movie.title }} ({{ movie.year }}) ==================================== {% if movie.rated %}{{ movie.rated }} • {% endif %} {% if movie.runtime %}{{ movie.get_display_runtime }} • {% endif %} {% if movie.released %}{{ movie.released }}{% endif %} {% for genre in movie.get_genres_list %} [{{ genre }}]({% url 'genre_movies' genre %}) {% endfor %} ``` -------------------------------- ### Raising Django Specific Exceptions Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Raises a Django-specific exception with traceback information. ```python raise dj_exc_value.with_traceback(traceback) from exc_value ``` -------------------------------- ### Database Error Handling Wrapper Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Context manager to wrap database operations for error handling. ```python with self.db.wrap_database_errors: ``` -------------------------------- ### Rating Distribution Visualization Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Iterates through rating distribution data to display the count for each star rating. ```html {% for stars, count in rating_distribution.items %} {{ stars }}★ {{ count }} {% endfor %} ``` -------------------------------- ### Movie List Rendering Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_list.html Renders a list of movies, displaying their poster, title, year, rating, and genres. Includes pagination controls. ```html {% extends 'base.html' %} {% load static %} {% load movie_extras %} {% block title %}{{ page_title }}{% endblock %} {% block content %} Browse Movies ============= {{ search_form.query }} {{ search_form.genre }} {{ search_form.year_from }} {{ search_form.year_to }} {{ search_form.sort_by }} {{ search_form.min_rating }} Search [Clear]({% url 'movie_list' %}) Showing {{ page_obj.paginator.count }} movie{{ page_obj.paginator.count|pluralize }} {% for movie in movies %} {% if movie.poster_url %} ![{{ movie.title }}]({{ movie.poster_url }}) {% else %} {% endif %} ##### [{{ movie.title }}]({% url 'movie_detail' movie.pk %}) {{ movie.year }} {% if movie.avg_rating %} {{ movie.avg_rating|floatformat:1 }} {% endif %} {% for genre in movie.get_genres_list|slice:":3" %} {{ genre }} {% endfor %} [View Details]({% url 'movie_detail' movie.pk %}) {% empty %} No movies found matching your criteria. Try adjusting your search filters. {% endfor %} {% if page_obj.has_other_pages %} {% if page_obj.has_previous %}* [Previous](?{% url_replace page=page_obj.previous_page_number %}) {% endif %} {% for num in page_obj.paginator.page_range %} {% if page_obj.number == num %}* {{ num }} {% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %}* [{{ num }}](?{% url_replace page=num %}) {% endif %} {% endfor %} {% if page_obj.has_next %}* [Next](?{% url_replace page=page_obj.next_page_number %}) {% endif %} {% endif %} {% endblock %} ``` -------------------------------- ### Django Shell: Count Movies Source: https://github.com/deign86/cinesense/blob/main/README.md Use the Django shell to interact with your database models. This snippet shows how to count the total number of movies. ```python >>> from movies.models import Movie >>> Movie.objects.count() 487412 ``` -------------------------------- ### Movie Poster Display Logic Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Conditionally displays the movie poster from the movie object or fetched IMDb data. If neither is available, no poster is shown. ```html {% if movie.poster_url %} ![{{ movie.title }}]({{ movie.poster_url }}) {% elif imdb_data and imdb_data.poster and imdb_data.poster != 'N/A' %} ![{{ movie.title }}]({{ imdb_data.poster }}) {% else %} {% endif %} ``` -------------------------------- ### Cursor Execution of SQL Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Executes SQL directly using the database cursor. ```python return self.cursor.execute(sql, params) ``` -------------------------------- ### Enrich Movies with OMDB Data CLI Command Source: https://github.com/deign86/cinesense/blob/main/README.md Command to enrich existing movie data with information from OMDB, such as ratings, cast, and crew. Supports updating existing entries. ```bash # Enrich existing movies with OMDB data python manage.py import_movies --omdb --update-existing ``` -------------------------------- ### Manager Method for Queryset Access Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Retrieves a queryset and applies a manager method to it. ```python return getattr(self.get_queryset(), name)(*args, **kwargs) ``` -------------------------------- ### Movie Detail Section Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Displays core movie details like year, runtime, rating, language, and country. Some fields are conditionally rendered. ```html * Year **{{ movie.year }}** {% if movie.runtime %}* Runtime **{{ movie.get_display_runtime }}** {% endif %} {% if movie.rated %}* Rated **{{ movie.rated }}** {% endif %} {% if movie.language %}* Language **{{ movie.language|truncatechars:20 }}** {% endif %} {% if movie.country %}* Country **{{ movie.country|truncatechars:20 }}** {% endif %} ``` -------------------------------- ### Fetch IMDB Data using OMDBClient Source: https://github.com/deign86/cinesense/blob/main/README.md This snippet shows how to use the OMDBClient to retrieve movie metadata from the OMDB API. It returns details such as poster URL, IMDB rating, and cast information. ```python from movies.services.external_apis import OMDBClient client = OMDBClient() movie_data = client.get_movie_by_title("Inception") # Returns: poster_url, imdb_rating, rotten_tomatoes, metacritic, director, actors, etc. ``` -------------------------------- ### Rating Display Logic Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Shows the IMDb rating if available, otherwise displays the average rating from the CineSense platform. ```html {% if movie.imdb_rating %} {{ movie.imdb_rating }} IMDb {% else %} ★ {{ movie.average_rating|floatformat:1 }} {% endif %} ``` -------------------------------- ### Similar Movies Section Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Lists movies that are similar to the current one, showing their title, year, and average rating. ```html {% if similar_movies %} ### Similar Movies {% for similar in similar_movies %} ###### [{{ similar.title }}]({% url 'movie_detail' similar.pk %}) {{ similar.year }} {% if similar.average_rating %} ★ {{ similar.average_rating|floatformat:1 }} {% endif %} {% endfor %} {% endif %} ``` -------------------------------- ### Performing Table Inserts Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Internal method to perform an insert operation on a table. ```python results = self._do_insert( cls._base_manager, using, fields, returning_fields, raw ) ``` -------------------------------- ### Responsive Hero Title Sizing in CSS Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Adjust the font size of hero titles using media queries to ensure better scaling and readability across different screen sizes, particularly on tablets. ```css @media (max-width: 992px) { .hero-title { font-size: 2.8rem; } } @media (max-width: 768px) { .hero-title { font-size: 2.2rem; } } ``` -------------------------------- ### Saving Model Instance Base Source: https://github.com/deign86/cinesense/blob/main/test_output.txt Internal method for saving a model instance, handling updates to fields. ```python updated = self._save_table( raw, . . . < 4 l i n e s > . . . update_fields, ) ``` -------------------------------- ### Movie Tags Display Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Lists all available tags associated with the movie. ```html {% if all_tags %} ##### Tags {% for tag in all_tags %} {{ tag }} {% endfor %} {% endif %} ``` -------------------------------- ### Scikit-learn Linear Regression (Ridge) Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Implements linear regression using scikit-learn's Ridge model for predictive analysis. ```python scikit-learn Ridge ``` -------------------------------- ### External Links for Movie Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Provides direct links to view the movie on IMDb and search for it on Letterboxd. ```html {% if movie.imdb_id %} [View on IMDb](https://www.imdb.com/title/{{ movie.imdb_id }}/) {% endif %} [Find on Letterboxd](https://letterboxd.com/search/{{ movie.title|urlencode }}/) ``` -------------------------------- ### NumPy Array Operations Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Shows basic usage of NumPy arrays for statistical calculations like mean, median, and standard deviation. ```python Arrays, mean, median, std ``` -------------------------------- ### Cast and Crew Information Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Lists the director, writers, and main cast members if this information is present for the movie. ```html {% if movie.director or movie.actors or movie.writer %} ##### Cast & Crew {% if movie.director %} ###### Director {{ movie.director }} {% endif %} {% if movie.writer %} ###### Writers {{ movie.writer }} {% endif %} {% if movie.actors %} ###### Cast {{ movie.actors }} {% endif %} {% endif %} ``` -------------------------------- ### User Rating Form Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Allows authenticated users to rate the movie and submit a review. Includes CSRF token for security. ```html {% if user.is_authenticated %} ##### {% if user_rating %} Update Your Rating {% else %} Rate This Movie {% endif %} {% csrf_token %} Your Rating {% for value, label in rating_form.fields.stars.choices %} {{ value }} {% endfor %} Tags Comma-separated tags Review (optional) {{ user_rating.review_text|default:'' }} {% if user_rating %}Update Rating{% else %}Submit Rating{% endif %} {% else %} [Login]({% url 'admin:login' %}) to rate this movie. {% endif %} ``` -------------------------------- ### Adjusting Text Contrast in CSS Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Modify CSS variables to improve text contrast for secondary and muted text elements, aiming for better readability and WCAG AA compliance. ```css --text-secondary: #d0d0d0; /* Was #c8c8c8 */ --text-muted: #a8a8a8; /* Was #9a9a9a */ ``` -------------------------------- ### SciPy Statistical Functions Source: https://github.com/deign86/cinesense/blob/main/UI_UX_ANALYSIS_AND_IMPROVEMENTS.md Utilizes SciPy for advanced statistical computations, such as finding the mode of a dataset. ```python Mode, statistics ``` -------------------------------- ### Awards and Box Office Data Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Displays any awards the movie has won and its box office performance figures. ```html {% if movie.awards or movie.box_office %} ##### Awards & Box Office {% if movie.awards %} ###### Awards {{ movie.awards }} {% endif %} {% if movie.box_office %} ###### Box Office {{ movie.box_office }} {% endif %} {% endif %} ``` -------------------------------- ### Set Progress Bar Widths Dynamically Source: https://github.com/deign86/cinesense/blob/main/templates/movies/analytics.html This JavaScript code dynamically sets the width of progress bars based on their 'aria-valuenow' attribute when the DOM is fully loaded. It's useful for visually representing progress or completion percentages. ```javascript document.addEventListener('DOMContentLoaded', function() { document.querySelectorAll('.progress-bar[aria-valuenow]').forEach(function(bar) { var value = bar.getAttribute('aria-valuenow'); bar.style.width = value + '%'; }); }); ``` -------------------------------- ### External Ratings Display Source: https://github.com/deign86/cinesense/blob/main/templates/movies/movie_detail.html Shows ratings from IMDb, Metascore, and Rotten Tomatoes if available. Also displays the CineSense average rating and vote count. ```html {% if movie.imdb_rating %} {{ movie.imdb_rating }} IMDb Rating {% if movie.imdb_votes %} {{ movie.imdb_votes }} votes {% endif %} {% endif %} {% if movie.metascore %} {{ movie.metascore }} Metascore {% endif %} {% if movie.rotten_tomatoes %} {{ movie.rotten_tomatoes }} Rotten Tomatoes {% endif %} {{ movie.average_rating|floatformat:1 }} CineSense {{ movie.rating_count }} ratings ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.