Skip to content

Instantly share code, notes, and snippets.

View sanjayssane's full-sized avatar

Sanjay Sane sanjayssane

  • www.saneacademy.com
  • Pune
View GitHub Profile
@sanjayssane
sanjayssane / stem_lemma_pos_nltk_example.py
Created September 5, 2018 15:43 — forked from bonzanini/stem_lemma_pos_nltk_example.py
Example of stemming, lemmatisation and POS-tagging in NLTK
from nltk import pos_tag
from nltk.tokenize import word_tokenize
from nltk.stem import PorterStemmer, WordNetLemmatizer
stemmer = PorterStemmer()
lemmatiser = WordNetLemmatizer()
print("Stem %s: %s" % ("going", stemmer.stem("going")))
print("Stem %s: %s" % ("gone", stemmer.stem("gone")))
print("Stem %s: %s" % ("goes", stemmer.stem("goes")))
library(shiny)
# Define UI for application
fluidPage(
titlePanel("Indian Leadership"),
sidebarLayout(
sidebarPanel( "President & PM"),
mainPanel(
img(src="http://ste.india.com/sites/default/files/2017/06/19/603716-ramnathgovind.jpg",height=200,width=250),
library(shiny)
# Define server logic required to draw a histogram
function(input, output) {
# Expression that generates a histogram. The expression is
# wrapped in a call to renderPlot to indicate that:
#
# 1) It is "reactive" and therefore should be automatically
# re-executed when inputs change
library(shiny)
library(Ecdat)
data("Housing")
ui <- pageWithSidebar(headerPanel = headerPanel("Regression Analysis"),
sidebarPanel = sidebarPanel(
sliderInput(inputId = "num",
label = "Choose a Number:",
value = mean(Housing$lotsize),
@sanjayssane
sanjayssane / Sane
Created April 27, 2017 15:49
XG Boost with Regression
library(MASS)
data("Boston")
Boston
library(caret)
set.seed(1234)
trainIndex <- createDataPartition(y=Boston$medv,p=0.7,list=F)
training <- Boston[trainIndex,]