Skip to content

Instantly share code, notes, and snippets.

View HilarioNengareJr's full-sized avatar
💭
I may be slow to respond.

HILARIO NENGARE HilarioNengareJr

💭
I may be slow to respond.
View GitHub Profile
@HilarioNengareJr
HilarioNengareJr / scrape_imdb.py
Last active February 24, 2024 13:12
Python simple script to scrape Movie Reviews from IMDB top 50.
"""
Python simple script to scrape Movie Reviews from IMDB top 50.
Disclaimer: For educational purposes only!!!!
Purpose: To perform sentiment analysis on user reviews for movie recommendation system.
"""
import csv
from bs4 import BeautifulSoup
from selenium_stealth import stealth
@HilarioNengareJr
HilarioNengareJr / heq.m
Created April 22, 2023 14:00
matlab program ro implement equalisation on a color rgb image.
% second method to solving the histogram equalization using cdf and pdf functions
close all;
clear all;
clc
warning off;
% Read the image
lenna = imread('/MATLAB Drive/read.png');
% Converting the image to a grayscale
lenna = rgb2gray(lenna);
lennaSize = size(lenna);
from flask import Flask, render_template, url_for, flash, redirect, request
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate as migrate
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, FileField, TextAreaField, IntegerField, PasswordField, BooleanField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError
from flask_login import UserMixin, LoginManager, login_required, logout_user, current_user, login_user
from flask_bcrypt import Bcrypt
app = Flask(__name__)
@HilarioNengareJr
HilarioNengareJr / operatoroverloading.cpp
Created January 19, 2022 11:21
Overloading operators in C++ basic blueprint.
String & operator += (const String & other) {
int newlen = _len + other._len; // calc new length
char * newstr = new char[newlen + 1]; // alloc new buffer
strcpy(newstr, _s); // copy own contents
strcpy(newstr + _len, other._s); // append new contents
delete[] _s; // release orig memory
_s = newstr; // install new buffer
return *this;
}
#include <stdio.h>
#include <conio.h>
int main() {
int a, b;
a = 5; //initialzed variable
int * p; // uninitialized pointer
p = & a; //stores address of ‘a’ in ptr
b = * p; //put value at ptr in b
bool search(Node *root, int x)
{
if(root==NULL)
{
printf("Not Found! ");
return false;
}
else if(x<root->key)
struct node * removeNode(struct node * root, int val) {
/*
* If the node becomes NULL, it will return NULL
* Two possible ways which can trigger this case
* 1. If we send the empty tree. i.e root == NULL
* 2. If the given node is not present in the tree.
*/
if (root == NULL)
return NULL;
/*
struct node * getNewNode(int val) {
struct node * newNode = malloc(sizeof(struct node));
newNode -> key = val;
newNode -> left = NULL;
newNode -> right = NULL;
return newNode;
}
struct node * insert(struct node * root, int val) {
int isStackEmpty() {
if (top == -1)
return 1;
return 0;
}
void pop() {
//check if the stack is empty
if (isStackEmpty())
printf("Stack Is Empty\n");