Posts

Showing posts from November, 2024

Some slips for full stacks

  Slip 11 : Q.1) Develop an Express.js application that defines routes for Create operations on a resource (Movie) // Import required libraries const express = require('express'); const bodyParser = require('body-parser'); // Initialize the Express app const app = express(); // Middleware to parse JSON data in request body app.use(bodyParser.json()); // In-memory storage for movies (acting as a database) let movies = []; // Route to create a movie (POST request) app.post('/movie', (req, res) => {   // Extract movie details from the request body   const { title, director, releaseYear, genre } = req.body;   // Validate required fields   if (!title || !director || !releaseYear || !genre) {     return res.status(400).json({       success: false,       message: 'All fields (title, director, releaseYear, genre) are required.'     });   }   // Create a new movie object   const newMovie = {   ...

Practical slips programs : Machine Learning

                                                     Savitribai Phule Pune University                                         M.Sc.-II (Comp. Sci.) Sem-III Practical Examination -2024-25                  Practical Paper (CS-605-MJP) Lab course on CS-602-MJ Machine Learning                                                     Practical slips programs : Machine Learning Slip 1 : Q.1  Use Apriori algorithm on groceries dataset to find which items are brought together. Use minimum support =...