Skip to content

Instantly share code, notes, and snippets.

View rajacsp's full-sized avatar

Raja CSP rajacsp

View GitHub Profile
@rajacsp
rajacsp / title_collector.py
Last active July 9, 2018 23:57
Title Collector in Python
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
def startpy():
phantomjs_path = r'C:\Phantom\phantomjs-2.1.1-windows\bin\phantomjs.exe';
driver = webdriver.PhantomJS(phantomjs_path)
@rajacsp
rajacsp / gist:c10dbb12a63eef9088ef8c7f4b92d466
Created September 26, 2018 15:53
Python 3.6 Setup - Windows
#
Anaconda Installation
https://www.anaconda.com/download/
https://snag.gy/034BZU.jpg
#
Create an environment in Python
https://snag.gy/Erbk1M.jpg
@rajacsp
rajacsp / gist:8c265676f2c6a0268d4452a47407f96c
Created September 26, 2018 22:23
Trump Tweet Similarity
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# the above line is to avoid 'SyntaxError: Non-UTF-8 code starting with' error
'''
Created on
@author: raja.raman
source:
@rajacsp
rajacsp / gist:59aa49dd1eb91a180c10e9fb30573f26
Created September 27, 2018 12:29
Interview Checklist - TACT
Sample Interview Report: (2017 March on DB developer)
Dress code:
Dress code is very good! The candidate came with good dress appearance and received the interviewer in a good manner.
Gesture:
The gesture is good when he explained the technical details as the gesture conveys the real involvement with the technologies and experience.
Attitude:
Usually, experience comes with an attitude. But this candidate doesn't have defined attitude and is very polite when he answers/listens.
@rajacsp
rajacsp / gist:8bcf07813f81a4e867c48e1deb99b721
Created September 27, 2018 12:35
Interview Elements - TACT
Interview elements:
EQ Elements:
Decision Making
Time Management
Empathy
Stress Tolerance
Anger Management
Team work
Change tolerance
Communication
Basic flow: (basis status check, add, commit, push)
git status
git add .
git commit -m "dc-00: comment"
git push
git diff *_client.html
git checkout -- abc.java
git commit filename
git diff --cached [filename]
git diff HEAD [filename]
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
sentiment = sid.polarity_scores("Hello Toronto")
print(sentiment)
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
def get_sentiment(sentence):
return sid.polarity_scores(sentence)
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
def get_sentiment(sentence):
sentiment_score = sid.polarity_scores(sentence)
import os
import nltk
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import PorterStemmer
porter_stemmer = PorterStemmer()
def get_dir():
dir_path = os.path.dirname(os.path.realpath(__file__))