Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233import streamlit as stimport json# --- DATA STRUCTURE ---# I have converted your text into a Python dictionary.# This is the most crucial step for creating a dynamic app.# This separates the data from the presentation logic.syllabus_data = {"Paper I: Programming in Java": {"UNIT-I": {"Introduction": ["History and features of Java", "Difference between C, C++ & JAVA", "JAVA and Internet, WWW, Web Browsers", "Java support system, Java Environment", "JDK, JVM, Byte code"],"Java Programming Basics": ["Structure of Java program", "JAVA tokens and Statements", "Constants & Variables", "Data types", "Operators", "Command line arguments"],"Java Statements & Arrays": ["`if` and `switch` statement", "`while`, `do-while` and `for` loops", "Introduction to arrays, types of arrays, `new` operator", "Strings, `String` class & its methods", "Vectors"],"Classes & Objects": ["Specifying classes", "Methods and fields", "Creating objects", "Passing objects to methods, returning objects", "Static fields & methods", "Constructors", "Garbage collection", "Overloading methods & constructors", "`this` keyword"]},"UNIT-II": {"Inheritance": ["Specifying sub class", "Types of inheritance", "Visibility control: `public`, `private`, `protected`, `package`", "`super` keyword", "Overriding methods", "Dynamic method dispatch", "Abstract methods and classes", "`final` methods & classes"],"Packages & Interfaces": ["Introduction to packages, naming conventions", "`package` statement, creating packages", "`import` statement, accessing package", "Use of CLASSPATH, adding class to package, hiding classes", "Interface, implementing interfaces, multiple interfaces"],"Multithreading": ["Creation threads", "Extending `Thread` class, implements `Runnable` interface", "Stopping and blocking thread", "Thread life cycle", "Thread priorities & Thread synchronization", "Using `Thread` methods"]},"UNIT-III": {"Exception Handling": ["Managing errors, types of errors, exceptions", "Syntax of exception handling code: `try`, `catch`, `throw`, `throws` and `finally` statements", "Multiple `catch` & nested `try` statements"],"Java Input Output": ["Java I/O package", "Byte/Character Stream", "Buffered reader / writer", "File reader / writer", "File Sequential / Random", "Reading numeric, character & strings data from keyboard"],"Applet Programming": ["Applet Vs. Application", "Creating applets, life cycle", "Local & remote applets", "`<APPLET>` tag & its attributes", "Adding applet to HTML file, Running applet"]},"UNIT-IV": {"Abstract Windows Toolkit (AWT)": ["Components and Graphics", "Containers, Frames and Panels", "Layout Managers: Border layout, Flow layout, Grid layout, Card layout", "AWT components", "Event delegation Model: Event source and handler, Event categories, Listeners, Interfaces", "Controls: text box, radio buttons, checkboxes, lists, choice, command buttons, text area etc."],"JDBC (Java Database Connectivity)": ["Types of JDBC drivers", "Writing JDBC applications", "Types of statement objects: `Statement`, `PreparedStatement` and `CallableStatement`", "Types of resultset", "Inserting and updating records", "JDBC and AWT"]},"UNIT-V": {"Networking with Java": ["Networking basics, Sockets, port", "Internet addressing", "`java.net` β networking classes and interfaces", "Implementing TCP/IP based Server and Client"],"Servlets": ["Introduction Servlet API Overview", "Writing and running Simple Servlet, Servlet Life cycle", "Generic Servlet, `HTTPServlet`", "`ServletConfig`, `ServletContest`", "Writing Servlet to handle Get and Post methods"]}},"Paper II: Computer Graphics": {"UNIT-I": {"Introduction": ["Introduction of computer Graphics and its applications", "Overview of Graphics systems", "Video display devices (Raster scan, Random scan, Color CRT, Flat panel)", "Interactive input devices (Keyboard, mouse, Joysticks, etc.)", "Graphics software", "Coordinates representations", "Graphics functions"]},"UNIT-II": {"Algorithms": ["Line drawing algorithms: DDA, Bresenhamβs", "Circle generating: Mid-point circle algorithm", "Ellipse generating: Polynomials", "Scan-line polygon fill", "Boundary fill"]},"UNIT-III": {"Transformations & Viewing": ["Basic transformations: Translation, Rotation, Scaling", "Matrix representations & homogeneous co-ordinates", "Composite transformations: Reflection", "Two dimensional viewing", "Two dimensional clipping: Line, Polygon, Curve, Text", "3D-transformation, Projection, Viewing, Clipping"]},"UNIT-IV": {"Curves & Surfaces": ["Spline representation (Cubic, Bezier, Beta, B-spline)", "Hidden surfaces", "Hidden lines", "Z-buffer"]},"UNIT-V": {"Advanced Topics": ["Fractals geometry (Generation, Classification, Dimension, Construction)", "Color models: XYZ, RGB, YIQ, CMY & HSV", "Shading algorithms (Illumination models, Gouraud, Phong)"]}},"Paper III: LINUX": {"UNIT-I": {"Introduction & Basics": ["Introduction to Multi-user System, History of Unix", "System Structure: Kernel, System calls, Shell", "File System: i-node, links, commands (`who`, `pwd`, `cd`, etc.)", "Vi Editor: Command/edit mode, basic operations"]},"UNIT-II": {"Shell Programming": ["Wild cards, I/O redirection, Pipes", "Shell variables, profile files", "Command line arguments, command substitution", "Conditional execution (`if...fi`)", "Loops (`for`, `while`, `until`)", "Choice making (`case...esac`)"]},"UNIT-III": {"Advanced Shell & Process Control": ["Advanced Shell features (`cshrc`, `login`, `logout`)", "History and alias mechanism", "Directory stacks (`pushd`, `popd`)", "Process management, states, and transition", "Process creation (`fork`) and killing (`kill`)", "Signals and traps"]},"UNIT-IV": {"Inter-process Communication & System Calls": ["I/O Sub system", "IPC: Messages, shared memory, semaphores", "Memory management: swapping, demand paging", "File handling calls: `open()`, `read()`, `write()`, `close()`, `fseek()`", "Process control calls: `kill()`, `exec()`, `fork()`, `wait()`, `signal()`"]},"UNIT-V": {"System Administration & Xwindows": ["Process and Scheduling, Security", "Basic Admin: Adding/Deleting Users & Groups, Super User", "Advanced Admin: Managing Disk Space, Backup & Restore", "Introduction to Xwindows concept"]}},"Paper IV: Image Processing": {"UNIT-I": {"Digital Image Fundamentals": ["Introduction, An image model", "Sampling & quantization", "Basic relationships between Pixels", "Imaging geometry"]},"UNIT-II": {"Image Transforms": ["Properties of 2-D Fourier transform", "FFT algorithm and other separable image transforms", "Walsh, Hadamard, Cosine, Haar, Slant, KL transforms"]},"UNIT-III": {"Image Enhancement & Restoration": ["Enhancement by point processing, histogram processing", "Spatial filtering and frequency domain enhancement", "Color image processing", "Degradation model, Inverse filtering, Restoration techniques"]},"UNIT-IV": {"Image Compression & Segmentation": ["Fundamentals, Compression modes (Error free, Lossy)", "Image compression standards", "Detection of discontinuities, edge linking", "Thresholding, Region-oriented segmentation"]},"UNIT-V": {"Representation & Description": ["Representation schemes, Boundary/Regional descriptors", "Image reconstruction from Projections", "Radon Transforms", "Convolution/Filter back-Project Algorithms"]}},"Paper V: Object Oriented Analysis And Design": {"UNIT-I": {"Introduction to OOAD": ["SSAD vs OOAD", "Why Object-Orientation? (Classes, Abstraction, Inheritance, Polymorphism)", "The Business case for OO Developments", "OO Methodologies (Booch, Rumbaugh, Coad-Yourdan, Jacobson)"]},"UNIT-II": {"Unified Approach & Process": ["UML Notation and Diagramming Techniques", "Rational Unified Process (Inception, Elaboration, Construction, Transition)", "Requirements Engineering", "Use-case Model: Writing Requirements"]},"UNIT-III": {"Analysis": ["Behavioral Analysis, Domain Analysis", "Use-case Driven OO analysis", "Identifying classes (Noun Phrase, CRC, etc.)", "Relationships: Aggregation, Composition, Association, Inheritance"]},"UNIT-IV": {"Design Phases": ["Translating Analysis to Design", "Multi-tiered Architecture View", "Object Visibility, Collaboration & Sequential Diagrams", "Designing Data Access, User Interface, and System Interface layers"]},"UNIT-V": {"Refinement & Testing": ["Design for Extensibility and Reusability", "Persistent Objects and Database Issues (OODBMS vs RDBMS)", "Testing Strategies, Impact of OO on Testing", "Testing Business Process, Design Matrix"]}}}# --- PAGE CONFIGURATION ---st.set_page_config(page_title="M.Sc. CS Syllabus",page_icon="π",layout="centered",initial_sidebar_state="auto")# --- CUSTOM CSS FOR A BEAUTIFUL UI ---def local_css(file_name):with open(file_name) as f:st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)# You can create a style.css file or just embed it directlyst.markdown("""<style>/* Main app styling */.stApp {background-color: #f0f2f6; /* Light grey background */}/* Title styling */h1 {color: #0c356a; /* Dark blue */text-align: center;font-family: 'Verdana', sans-serif;}/* Sidebar styling */.st-emotion-cache-16txtl3 {background-color: #ffffff;border-right: 2px solid #e0e0e0;}.st-emotion-cache-16txtl3 .st-emotion-cache-1y4p8pa {padding-top: 2rem;}/* Radio button styling in sidebar */.st-emotion-cache-16txtl3 .st-emotion-cache-ltfnpr {background-color: #e6f3ff;border-radius: 0.5rem;padding: 10px;margin-bottom: 10px;}/* Expander styling */.st-emotion-cache-sh2krr {border: 1px solid #dcdcdc;border-radius: 0.75rem;box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);margin-bottom: 1rem;background-color: #ffffff;}.st-emotion-cache-sh2krr summary {font-size: 1.1rem;font-weight: 600;color: #2c3e50; /* Darker text for header */}/* Tab styling */.st-emotion-cache-1qg05j { /* Tab container */border-bottom: 2px solid #0c356a;}button[data-baseweb="tab"][aria-selected="true"] {background-color: #0c356a;color: white;border-radius: 0.5rem 0.5rem 0 0;}</style>""", unsafe_allow_html=True)# --- APP LAYOUT ---# --- HEADER ---st.title("π M.Sc. (CS) Syllabus Navigator")st.markdown("Welcome! Select a subject from the sidebar to explore the syllabus for the **Third Semester**.")st.markdown("---")# --- SIDEBAR NAVIGATION ---st.sidebar.title("π Subjects")st.sidebar.markdown("Choose a paper to view its syllabus:")# Get list of papers from the datapapers = list(syllabus_data.keys())selected_paper = st.sidebar.radio(label="M.Sc. (CS) Papers",options=papers,label_visibility="collapsed" # Hides the 'M.Sc. (CS) Papers' label above radio)st.sidebar.markdown("---")st.sidebar.info("This app provides a user-friendly view of the M.Sc. (CS) syllabus.")st.sidebar.markdown("Made with β€οΈ by Streamlit")# --- MAIN CONTENT AREA ---if selected_paper:# Get the details for the selected paperpaper_details = syllabus_data[selected_paper]# Display the paper title in the main areast.header(f"π {selected_paper}")# Create tabs for each unitunit_names = list(paper_details.keys())tabs = st.tabs([f"**{name}**" for name in unit_names])# Populate each tab with its contentfor i, tab in enumerate(tabs):with tab:unit_name = unit_names[i]unit_content = paper_details[unit_name]if not unit_content:st.write("No topics listed for this unit.")continue# Use expanders for each topic within the unitfor topic, sub_topics in unit_content.items():with st.expander(f"**{topic}**", expanded=(list(unit_content.keys()).index(topic) == 0)):# The first expander in each tab will be open by defaultfor item in sub_topics:st.markdown(f"- {item}")123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730import streamlit as stimport json# Page configurationst.set_page_config(page_title="M.Sc. CS Syllabus Explorer",page_icon="π",layout="wide",initial_sidebar_state="expanded")# Custom CSS for beautiful UIst.markdown("""<style>.main {padding-top: 2rem;}.stApp {background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);}.main-header {background: linear-gradient(90deg, #4facfe, #00f2fe);padding: 2rem;border-radius: 15px;text-align: center;margin-bottom: 2rem;box-shadow: 0 8px 32px rgba(0,0,0,0.1);}.main-header h1 {color: white;font-size: 2.5rem;margin: 0;text-shadow: 2px 2px 4px rgba(0,0,0,0.3);}.main-header p {color: white;font-size: 1.2rem;margin: 0.5rem 0 0 0;opacity: 0.9;}.paper-card {background: white;padding: 1.5rem;border-radius: 15px;margin: 1rem 0;box-shadow: 0 4px 20px rgba(0,0,0,0.1);border-left: 5px solid #4facfe;transition: transform 0.3s ease;}.paper-card:hover {transform: translateY(-5px);box-shadow: 0 8px 30px rgba(0,0,0,0.15);}.unit-card {background: #f8f9fa;padding: 1rem;border-radius: 10px;margin: 0.5rem 0;border-left: 3px solid #28a745;}.topic-item {background: #e3f2fd;padding: 0.5rem;margin: 0.3rem 0;border-radius: 8px;border-left: 2px solid #2196f3;}.sidebar .sidebar-content {background: white;border-radius: 10px;padding: 1rem;}.metric-card {background: linear-gradient(135deg, #667eea, #764ba2);color: white;padding: 1rem;border-radius: 10px;text-align: center;margin: 0.5rem 0;}.search-box {background: white;border-radius: 10px;padding: 1rem;margin: 1rem 0;box-shadow: 0 2px 10px rgba(0,0,0,0.1);}</style>""", unsafe_allow_html=True)# Syllabus data structuresyllabus_data = {"Programming in Java": {"UNIT-I": {"Introduction": ["History and features of Java","Difference between C, C++ & JAVA","JAVA and Internet, WWW, Web Browsers","Java support system, Java Environment","JDK, JVM, Byte code"],"Java Programming Basics": ["Structure of Java program","JAVA tokens and Statements","Constants & Variables","Data types","Operators","Command line arguments"],"Java Statements & Arrays": ["if and switch statement","while, do-while and for loops","Introduction to arrays, types of arrays, new operator","Strings, String class & its methods","Vectors"],"Classes & Objects": ["Specifying classes","Methods and fields","Creating objects","Passing objects to methods, returning objects","Static fields & methods","Constructors","Garbage collection","Overloading methods & constructors","this keyword"]},"UNIT-II": {"Inheritance": ["Specifying sub class","Types of inheritance","Visibility control: public, private, protected, package","super keyword","Overriding methods","Dynamic method dispatch","Abstract methods and classes","final methods & classes"],"Packages & Interfaces": ["Introduction to packages, naming conventions","package statement, creating packages","import statement, accessing package","Use of CLASSPATH, adding class to package, hiding classes","Interface, implementing interfaces, multiple interfaces"],"Multithreading": ["Creation threads","Extending Thread class, implements Runnable interface","Stopping and blocking thread","Thread life cycle","Thread priorities & Thread synchronization","Using Thread methods"]},"UNIT-III": {"Exception Handling": ["Managing errors, types of errors, exceptions","Syntax of exception handling code: try, catch, throw, throws and finally statements","Multiple catch & nested try statements"],"Java Input Output": ["Java I/O package","Byte/Character Stream","Buffered reader / writer","File reader / writer","File Sequential / Random","Reading numeric, character & strings data from keyboard"],"Applet Programming": ["Applet Vs. Application","Creating applets, life cycle","Local & remote applets","<APPLET> tag & its attributes","Adding applet to HTML file, Running applet"]},"UNIT-IV": {"Abstract Windows Toolkit (AWT)": ["Components and Graphics","Containers, Frames and Panels","Layout Managers: Border layout, Flow layout, Grid layout, Card layout","AWT components","Event delegation Model: Event source and handler, Event categories, Listeners, Interfaces","Controls: text box, radio buttons, checkboxes, lists, choice, command buttons, text area etc."],"JDBC (Java Database Connectivity)": ["Types of JDBC drivers","Writing JDBC applications","Types of statement objects: Statement, PreparedStatement and CallableStatement","Types of resultset","Inserting and updating records","JDBC and AWT"]},"UNIT-V": {"Networking with Java": ["Networking basics, Sockets, port","Internet addressing","java.net β networking classes and interfaces","Implementing TCP/IP based Server and Client"],"Servlets": ["Introduction Servlet API Overview","Writing and running Simple Servlet, Servlet Life cycle","Generic Servlet, HTTPServlet","ServletConfig, ServletContest","Writing Servlet to handle Get and Post methods"]}},"Computer Graphics": {"UNIT-I": {"Graphics Systems Overview": ["Introduction of computer Graphics and its applications","Overview of Graphics systems"],"Video Display Devices": ["Raster scan display, Raster scan systems, video controller, Raster scan display processor","Random scan display, random scan systems","Color CRT monitor","Flat panel display"],"Interactive Input Devices": ["Logical classification of input devices","Keyboard, mouse, Trackball and spaceball, Joysticks, Image scanner, Light pens"],"Graphics Foundations": ["Graphics software","Coordinates representations","Graphics functions"]},"UNIT-II": {"Drawing Algorithms": ["Line drawing algorithms: DDA, Bresenham's","Circle generating: Mid-point circle algorithm","Ellipse generating: Polynomials","Scan-line polygon fill","Boundary fill"]},"UNIT-III": {"2D Transformations": ["Basic transformations: Translation, Rotation, Scaling","Matrix representations & homogeneous co-ordinates","Composite transformations: Reflection"],"2D Viewing and Clipping": ["Two dimensional viewing","Two dimensional clipping: Line, Polygon, Curve, Text"],"3D Graphics": ["3D-transformation, Projection, Viewing, Clipping"]},"UNIT-IV": {"Spline Representation": ["Cubic spline","Bezier curve, Bezier surfaces","Beta spline","B-spline surfaces, B-spline curve"],"Hidden Surface Removal": ["Hidden surfaces","Hidden lines","Z-buffer"]},"UNIT-V": {"Fractals Geometry": ["Fractal generation procedure","Classification of Fractal","Fractal dimension","Fractal construction methods"],"Color and Shading": ["Color models: XYZ, RGB, YIQ, CMY & HSV","Shading algorithms","Shading model","Illumination model","Gouraud shading","Phong shading"]}},"LINUX": {"UNIT-I": {"Introduction to Unix/Linux": ["Introduction to Multi-user System","Emergency and history of Unix","Feature and benefits, Versions of Unix"],"System Structure": ["Hardware requirements","Kernel and its function","Introduction to System calls and Shell"],"File System": ["Feature of Unix File System","Concept of i-node table, links","Commonly used commands (who, pwd, cd, mkdir, rm, ls, mv, lp, chmod, cp, grep, sed, awk, pr, lex, yacc, make)","Getting started (login / logout)","File system management, file operation, system calls, buffer cache"],"Vi Editor": ["Intro to text processing","Command and edit mode, invoking vi","Command structure, deleting and inserting line","Deleting and replacing character, searching strings, yanking","Running shell command, command macros","Set windows, set auto indent, set number, intro to exrc file"]},"UNIT-II": {"Shell Programming": ["Introduction to shell feature, wild card characters","I/O redirections, standard error redirection","System and user created shell variables, profile files","Pipes/tee, background processing","Command line arguments, command substitution, read statement","Conditional execution of commands","Special shell variables ($#, #?, $* etc.)","Shift commands","Loops and decision making: for, while and until","Choice making using case...esac","Decision making if...fi","Using test, string comparison, numerical comparison, logical operation, using expr"]},"UNIT-III": {"Advanced Shell": ["Features, changing the login shell","cshrc, login, logout files","Setting environment variables","History and alias mechanism","Command line arguments","Redirection/appending safely, noclobber, noglob, ignore eof","Directory stacks (pushd, popd)","Feature of other shell (rsh, vsh)"],"Process Control": ["Process management, process states and transition","Regions and control of process","Sleep and waking","Process creation, process killing","Signals","System boot and init process","Traps","Setting process priorities"]},"UNIT-IV": {"Inter-process Communication": ["I/O Sub system, terminal drives, disk drives","Messages, shared memory, semaphores","Memory management, swapping, demand paging"],"System Calls and Unix-C Interface": ["File handling calls: access(), open(), create(), read(), write(), close(), fseek()","Process control system calls: kill(), exec(), fork(), wait(), signal(), exit()","Comparing stdio library and calls"]},"UNIT-V": {"System Administration": ["Process and Scheduling","Security","Basic System Administration: Adding a User, User Passwords, Delete of a User, Adding a Group, Deleting a Group, Super User, Startup and Shutdown","Advanced System Administration: Managing Disk Space, Backup and Restore, Managing System Services"],"Xwindows": ["Introduction to Xwindows concept"]}},"Image Processing": {"UNIT-I": {"Digital Image Fundamentals": ["Introduction","An image model","Sampling & quantization","Basic relationships between Pixels","Imaging geometry"]},"UNIT-II": {"Image Transforms": ["Properties of 2 β D Fourier transform","FFT algorithm and other separable image transforms","Walsh transforms","Hadamard, Cosine, Haar, Slant transforms, KL transforms and their properties"]},"UNIT-III": {"Image Enhancement": ["Background","Enhancement by point processing, histogram processing","Spatial filtering and enhancement in frequency domain","Color image processing"],"Image Filtering and Restoration": ["Degradation model","Diagnolisation of circulant and block circulate matrices","Algebraic approach to restoration","Inverse filtering, least mean squares and interactive restoration","Geometric transformations"]},"UNIT-IV": {"Image Compression": ["Fundamentals","Image compression modes","Error free compression, lossy compression","Image compression standards"],"Image Segmentation": ["Detection of discontinuities, edge linking and boundary detection","Thresholding","Region β oriented segmentation","Use of motion in segmentation"]},"UNIT-V": {"Representation and Description": ["Various schemes for representation","Boundary descriptors","Regional descriptors"],"Image Reconstruction": ["Image reconstruction from Projections","Radon Transforms","Convolution/Filter back β Project Algorithms"]}},"Object Oriented Analysis And Design": {"UNIT-I": {"Introduction to OOAD": ["Two views of software Developments: SSAD and OOAD","Why Object βOrientation?","Object and classes","Abstraction and encapsulation","Methods and Message","Interfaces","Inheritance and Polymorphism","Access Control","The Business case for OO Developments"],"Object Oriented Methodologies": ["Object Oriented Design β Booch","Object Modeling Techniques β Rumbaugh","Object β Oriented Analysis β Coad-Yourdan","Object β Oriented Software Engineering β Ivar Jacobson"]},"UNIT-II": {"Unified Approach": ["Diagramming and Notational Techniques using the UML","UML Notation","Analysis Diagramming Techniques (Introduction to all ten diagrams)","Design Diagramming Techniques","Generalization/Specialization, Aggregation and composition, Association, Cardinality, Navigability, Icons, relationships and adornments"],"Development Process": ["Rational Unified Process","Four Major phases: Inception, Elaboration, Construction, Transition"],"Requirements Engineering": ["Problem analysis, Understanding Stockholders need","Type of requirements","Use-case Model: Writing Requirements"]},"UNIT-III": {"Analysis Phase": ["Behavioral Analysis","Domain Analysis or Business Object Analysis","Use-case Driven Object Oriented analysis: The UML approach","Develop use-case Model","Use-case Description","Documentation, Activity Diagram","Identify the classes"],"Class Identification Approaches": ["'Noun Phrase' approach","'Conman Class Pattern' approach","'CRC' approach","Use case Driven Approach"],"Relationships": ["Containment and Composition, Aggregation, Inheritance","SubTypes and IS-A Hierarchies","Association and Link Relationships","Diagramming System Events"]},"UNIT-IV": {"Design Phases": ["Translating Analysis Concept into Design","Optimizing classes and Objects: The Multi-tiered Architecture View","Mapping System functions to objects","Object to Object Visibility","Collaboration Diagram","Sequential Diagram","Specification Class Diagram","Specifying Object Interfaces","Designing the Data Access layer","Design User Interface layer","Designing System Interfaces, Controls and Security"]},"UNIT-V": {"Design Refinement": ["Designing for Extensibility","Design for reusability","Portioning class space","Checking Completeness and correctness"],"Database Issues": ["The Cood Data Management Domain","Object Persistence","Object-oriented Database Management System","Object-Oriented verses Relational Database","Mapping object to Relational Data structure"],"Testing": ["Introduction to Testing Strategies","Impact of Object Orientation on Testing","Testing Business Process","Design Matrix","Discovering reusable pattern"]}}}def main():# Headerst.markdown("""<div class="main-header"><h1>π M.Sc. Computer Science</h1><p>Third Semester Syllabus Explorer</p></div>""", unsafe_allow_html=True)# Sidebarst.sidebar.title("π Navigation")# Search functionalitysearch_term = st.sidebar.text_input("π Search Topics", placeholder="Enter topic to search...")# Paper selectionselected_paper = st.sidebar.selectbox("Select Paper",["All Papers"] + list(syllabus_data.keys()),index=0)# Unit filterif selected_paper != "All Papers":units = list(syllabus_data[selected_paper].keys())selected_unit = st.sidebar.selectbox("Select Unit",["All Units"] + units,index=0)else:selected_unit = "All Units"# Statisticsst.sidebar.markdown("### π Quick Stats")total_papers = len(syllabus_data)total_units = sum(len(paper_data) for paper_data in syllabus_data.values())total_topics = sum(len(unit_data)for paper_data in syllabus_data.values()for unit_data in paper_data.values())col1, col2, col3 = st.sidebar.columns(3)with col1:st.markdown(f"""<div class="metric-card"><h3>{total_papers}</h3><p>Papers</p></div>""", unsafe_allow_html=True)with col2:st.markdown(f"""<div class="metric-card"><h3>{total_units}</h3><p>Units</p></div>""", unsafe_allow_html=True)with col3:st.markdown(f"""<div class="metric-card"><h3>{total_topics}</h3><p>Topics</p></div>""", unsafe_allow_html=True)# Main content areaif selected_paper == "All Papers":display_all_papers(search_term)else:display_single_paper(selected_paper, selected_unit, search_term)def display_all_papers(search_term=""):"""Display all papers with search functionality"""st.markdown("## π All Papers Overview")for paper_name, paper_data in syllabus_data.items():# Check if paper matches searchif search_term and not matches_search(paper_name, paper_data, search_term):continuewith st.expander(f"π {paper_name}", expanded=False):display_paper_content(paper_data, search_term)def display_single_paper(paper_name, selected_unit="All Units", search_term=""):"""Display a single paper with optional unit filtering"""st.markdown(f"## π {paper_name}")paper_data = syllabus_data[paper_name]if selected_unit == "All Units":display_paper_content(paper_data, search_term)else:if selected_unit in paper_data:unit_data = {selected_unit: paper_data[selected_unit]}display_paper_content(unit_data, search_term)def display_paper_content(paper_data, search_term=""):"""Display content of a paper"""for unit_name, unit_data in paper_data.items():# Check if unit matches searchif search_term and not matches_search_unit(unit_name, unit_data, search_term):continuest.markdown(f"""<div class="unit-card"><h3>π {unit_name}</h3></div>""", unsafe_allow_html=True)for topic_name, topic_items in unit_data.items():# Check if topic matches searchif search_term and not matches_search_topic(topic_name, topic_items, search_term):continuewith st.expander(f"π {topic_name}", expanded=False):for item in topic_items:# Highlight search termsif search_term and search_term.lower() in item.lower():highlighted_item = item.replace(search_term,f"**{search_term}**")st.markdown(f"""<div class="topic-item">β’ {highlighted_item}</div>""", unsafe_allow_html=True)else:st.markdown(f"""<div class="topic-item">β’ {item}</div>""", unsafe_allow_html=True)def matches_search(paper_name, paper_data, search_term):"""Check if paper matches search term"""search_term = search_term.lower()# Check paper nameif search_term in paper_name.lower():return True# Check unit and topic contentfor unit_data in paper_data.values():if matches_search_unit("", unit_data, search_term):return Truereturn Falsedef matches_search_unit(unit_name, unit_data, search_term):"""Check if unit matches search term"""search_term = search_term.lower()# Check unit nameif search_term in unit_name.lower():return True# Check topicsfor topic_name, topic_items in unit_data.items():if matches_search_topic(topic_name, topic_items, search_term):return Truereturn Falsedef matches_search_topic(topic_name, topic_items, search_term):"""Check if topic matches search term"""search_term = search_term.lower()# Check topic nameif search_term in topic_name.lower():return True# Check topic itemsfor item in topic_items:if search_term in item.lower():return Truereturn Falseif __name__ == "__main__":main()
src/streamlit_app.py+659-162