This file contains hidden or 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 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from datetime import datetime | |
from sklearn.preprocessing import MinMaxScaler | |
nifty = pd.read_csv('nifty.csv', usecols=['Date', 'Close'], parse_dates=True) | |
#nifty = Nifty data from Jan 1, 2020 to 18 Sep, 2020 | |
nifty = nifty.loc[(nifty['Date'] >= "2020-01-01") & (nifty['Date'] <= "2020-09-18")].copy() |
This file contains hidden or 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 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
data = pd.read_csv('netflix_titles.csv') | |
data = data.loc[data['release_year'].isin([*range(2016, 2020)]), ['type', 'release_year']].copy() | |
data.dropna(inplace=True) | |
data['release_year'] = data['release_year'].astype('int') | |
data |
This file contains hidden or 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 | |
import matplotlib.pyplot as plt | |
fig, ax = plt.subplots(figsize=(12,5)) | |
ax2 = ax.twinx() | |
ax.set_title('GDP per capita ($) and GDP growth rate') | |
ax.set_xlabel('Year') | |
ax.plot(gdp['date'], gdp[' GDP Per Capita (US $)'], color='green', marker='x') | |
ax2.plot(gdp['date'], gdp[' Annual Growth Rate (%)'], color='red', marker='o') |
This file contains hidden or 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 numpy as np | |
import pandas as pd | |
from sklearn.linear_model import LinearRegression | |
from sklearn.metrics import r2_score | |
from sklearn.datasets import load_boston | |
X = load_boston()['data'].copy() | |
y = load_boston()['target'].copy() | |
linear_regression = LinearRegression() |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.mynews"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
This file contains hidden or 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 bs4 import BeautifulSoup | |
import requests as r | |
import streamlit as st | |
st.markdown('<h1 style="background-color: gainsboro; padding-left: 10px; padding-bottom: 20px;">Search Engine Scraper</h1>', unsafe_allow_html=True) | |
query = st.text_input('', help='Enter the search string and hit Enter/Return') | |
query = query.replace(" ", "+") #replacing the spaces in query result with + | |
if query: #Activates the code below on hitting Enter/Return in the search textbox |
This file contains hidden or 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 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
nifty = pd.read_csv("Nifty.csv", | |
usecols=['Date', "Close"], | |
parse_dates=['Date']) | |
nifty.set_index("Date", inplace=True) #setting "Date" as index |
This file contains hidden or 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.melt() |
This file contains hidden or 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 numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import streamlit as st | |
st.title("Visualizing Central Limit Theorem") | |
POP_MIN, POP_MAX = st.sidebar.slider('Select the population range (Example: range of age is 0-100)',0, 10000, (0, 1000)) |
This file contains hidden or 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 numpy as np | |
import pandas as pd | |
from sklearn.datasets import load_iris | |
from sklearn.feature_selection import mutual_info_classif, SelectKBest | |
from sklearn.model_selection import GridSearchCV, train_test_split | |
from sklearn.pipeline import Pipeline | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.preprocessing import MinMaxScaler | |
import joblib |
NewerOlder