This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from googleapiclient.discovery import build | |
from google_auth_oauthlib.flow import InstalledAppFlow,Flow | |
from google.auth.transport.requests import Request | |
import os | |
import pickle | |
SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] | |
# here enter the id of your google sheet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df_gold=df[(df['Medal']=='Gold') & (df['Sport']=='Gymnastics')] | |
#change this by your sheet ID | |
SAMPLE_SPREADSHEET_ID_input = '1cvZswLiDo3LfhnA7RcS8vFqacx73RGor-OZ_FtvyLE8' | |
#change the range if needed | |
SAMPLE_RANGE_NAME = 'A1:AA1000' | |
def Create_Service(client_secret_file, api_service_name, api_version, *scopes): | |
global service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Sequential | |
from keras.layers.convolutional import Convolution2D | |
from keras.layers.convolutional import MaxPooling2D | |
from keras.layers.core import Activation | |
from keras.layers.core import Flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://stackoverflow.com/questions/10138085/python-pylab-plot-normal-distribution | |
import numpy as np | |
import matplotlib.pyplot as plt | |
mean = 0; variance = 1 | |
x = np.arange(-5,5,.01) | |
y = np.exp(-np.square(x-mean)/2*variance)/(np.sqrt(2*np.pi*variance)) | |
plt.plot(x,y) | |
plt.ylabel('gaussian distribution') |