Sentiment-analysis-Raddit-api

For this analysis, i'll be using a Reddit API wrapper, called "praw", to loop through the /r/politics subreddit headlines. In [1]: from IPython import display import math from pprint import pprint import pandas as pd import numpy as np import nltk import matplotlib.pyplot as plt import seaborn as sns sns.set(style='darkgrid', context='talk', palette='Dark2') In [2]: """ For this … Continue reading Sentiment-analysis-Raddit-api

Coin Flip Simulation

Coin Flip Simulation - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. """ Q: Coin Flip Simulation - Write some code that simulates flipping a single coin however many times the user decides. The … Continue reading Coin Flip Simulation

SSL-Certificate-checker

import requests from bs4 import BeautifulSoup as bs import re url = "https://matlabhelpers.com/" page = requests.get(url) soup = bs(page.content , 'html.parser') head = soup.find('head') # re.findall(r'[^<]+', str(head)) #SSL secure ssl = soup.find(attrs={"rel": re.compile(r'canonical', re.I)}) # ssl['href'] if re.search('(https:)', ssl['href']): print('SSL Secure!!!') else: print('Bad news your website is not SSL secure')

Language-filtered-tweet-Analysis

This blog  will show the code with the help of which i've done sentiment analysis and also made an wordcloud after filtration of language. Applicable for all language. In [3]: import tweepy from tweepy import OAuthHandler import os import re In [5]: consumer_key = "--------------------------------" consumer_secret_key = "-------------------------------------" access_token = "-----------------------------------------------------" access_secret = "------------------------------------------" auth = OAuthHandler(consumer_key, … Continue reading Language-filtered-tweet-Analysis