Skip to content

Instantly share code, notes, and snippets.

View shreyash05's full-sized avatar

Shreyash Gade shreyash05

  • Pune
View GitHub Profile
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from statistics import *
class AdvertisementAgency:
def __init__(self):
self.advertisement_dataset = pd.read_csv("Advertising.csv")
self.x_axis_values = self.advertisement_dataset.TV
self.y_axis_values = self.advertisement_dataset.sales
self.mean_x = mean(self.x_axis_values)
from sklearn.feature_extraction.text import TfidfVectorizer
import numpy as np
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
def find_keyword_sentence(str):
icnt = 0
keyword = ''
for element in str:
if element == ' ':
import spacy
from spacy import displacy
def find_subject_sentence(str):
nlp = spacy.load('en_core_web_sm',disable=['ner','textcat'])
text = str
doc = nlp(text)
displacy.render(doc, style='dep',jupyter=True)
sub = '\0'
for token in doc:
# extract subject
import spacy
from spacy import displacy
def find_subject_sentence(str):
nlp = spacy.load('en_core_web_sm',disable=['ner','textcat'])
text = str
doc = nlp(text)
displacy.render(doc, style='dep',jupyter=True)
for token in doc:
import pandas as pd
import boto3
import sys
import botocore
import botocore.exceptions
##########################################################################################################################
def group_response():
group = []
client = boto3.client('cognito-idp','us-east-2')
response = client.list_groups(UserPoolId="us-east-2_FRhf7xm7F")
import pandas as pd
import boto3
import sys
import botocore
import botocore.exceptions
##########################################################################################################################
def group_response():
group = []
client = boto3.client('cognito-idp','us-east-2')
response = client.list_groups(UserPoolId="us-east-2_FRhf7xm7F")
import pandas as pd
import boto3
import sys
import botocore
import botocore.exceptions
def group_response():
group = []
client = boto3.client('cognito-idp','us-east-2')
response = client.list_groups(UserPoolId="us-east-2_FRhf7xm7F")
import pandas as pd
import boto3
def group_response():
group = []
client = boto3.client('cognito-idp','us-east-2')
response = client.list_groups(UserPoolId="us-east-2_FRhf7xm7F")
while(response["NextToken"]!=""):
response = client.list_groups(UserPoolId="us-east-2_FRhf7xm7F",NextToken=response['NextToken'])
group.append(response['Groups'])
@shreyash05
shreyash05 / PY0101EN-1-1-Types.ipynb
Created December 31, 2019 08:54
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shreyash05
shreyash05 / PY0101EN-1-1-Types.ipynb
Created December 31, 2019 08:53
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.