Skip to content

Instantly share code, notes, and snippets.

View ravi07bec's full-sized avatar
🏠
Senior Applied Scientist

ravi Shankar ravi07bec

🏠
Senior Applied Scientist
View GitHub Profile
from pytrends.request import TrendReq
url="https://trends.google.com/trends/explore?date=today%205-y&geo=US&q=dumbbells"
pytrends.build_payload(kw_list, cat=0, timeframe='today 5-y', geo='US', gprop='')
gtrends=pytrends.interest_over_time().reset_index()
test=px.scatter(gtrends,x='date',y=filters3,height=450,title="""<a href="{}">{}</a>""".format(url,filters3+":Google Searches-5 Years"))
test.update_traces(mode='lines+markers')
test.update_layout({
'plot_bgcolor': 'rgba(0, 0, 0, 0)',
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import pandas as pd
df1 = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/718417069ead87650b90472464c7565dc8c2cb1c/sunburst-coffee-flavors-complete.csv')
df2 = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/718417069ead87650b90472464c7565dc8c2cb1c/coffee-flavors.csv')
fig = make_subplots(
rows = 1, cols = 2,
def embed_iframe(value):
print(value)
variant=value.split('\n')[0]
#print('https://www.youtube.com/watch?v=sh-MQboWJug')
df_final2=pd.read_csv('youtube_ids.csv')
print(df_final2)
df_final2['Variety']=df_final2['Variety'].str.upper()
stopwords = set(STOPWORDS)
import random
foo = ['black','white']
for i in variety:
subset=data[data['variety']==i]
subset['description']=subset['description'].str.lower()
subset['description2']=subset['description'].apply(lambda x: ' '.join([word for word in x.split() if word not in (stopwords)]))
text = " ".join(review for review in subset.description2)
wc = WordCloud(background_color=random.choice(foo), max_words=100, mask=transformed_wine_mask,
import os
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
LOG_DIR = 'logs'
mnist = input_data.read_data_sets('MNIST_data')
images = tf.Variable(mnist.test.images, name='images')
with tf.Session() as sess:
This file has been truncated, but you can view the full file.
<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script type="text/javascript">/**
* plotly.js v1.57.1
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
{
"embeddings": [
{
"tensorName": "music_vector",
"tensorShape": [
1000,
100
],
"tensorPath": "https://gist.githubusercontent.com/ravi07bec/1a24e0ea2867e4f1d30667abb06b4d51/raw/9c77f650b6363b88fe093843f4f352c784d82db3/sample_tensor_artist.tsv"
,
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
color
acorn
alloy
almond
aloe
american navy
anchor
angel blue
anthracite
antique indigo
We can't make this file beautiful and searchable because it's too large.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
-0.008826861 0.14712125 0.14984393 0.03741063 -0.447161 0.750259 0.17495684 0.39537993 -0.19258313 -0.33608186 0.03766776 0.46875164 0.25622755 0.030031884 -0.21934327 0.81438655 -0.30240303 -0.32825795 -0.5412107 0.014231324 0.2349854 1.0813432 -0.12823704 0.25709152 -0.24238282 0.19340871 0.041515462 -0.058305223 0.17574815 0.52108234 0.26135543 -0.5616022 -0.59634197 0.11061073 0.8746614 -0.0008210669 0.25566977 0.3999487 0.13468345 -0.12887232 -0.15199159 -0.06385901 0.10250424 0.33175743 0.10983313 -0.41795734 0.05240363 0.10812743 -0.03821073 -0.11447425 0.009639623 -0.2860793 -0.11930247 0.56726474 -0.33321252 -0.15417482 -0.36149317 -0.11043632 0.18114583 -0.15371099 -0.27607924 -0.36437076 0.015887987 -0.19109431 -0
from datetime import datetime
from gensim.models import Word2Vec
from fse import IndexedList
#Data Inputs
movies=pd.read_csv('ml-latest/movies.csv')
links=pd.read_csv('ml-latest/ratings.csv')
links=links.sample(frac=0.05)