Skip to content

Instantly share code, notes, and snippets.

View siddharththakur26's full-sized avatar
💭
Life is beautiful

Siddharth siddharththakur26

💭
Life is beautiful
View GitHub Profile
@siddharththakur26
siddharththakur26 / GitHub-Forking.md
Created August 4, 2020 17:53 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@siddharththakur26
siddharththakur26 / StockPrices.py
Created May 9, 2020 16:26
TestDome-DataScience
import pandas as pd
import numpy as np
def most_corr(prices):
"""
:param prices: (pandas.DataFrame) A dataframe containing each ticker's
daily closing prices.
:returns: (container of strings) A container, containing the two tickers that
are the most highly (linearly) correlated by daily percentage change.
"""
@siddharththakur26
siddharththakur26 / LoginTable.py
Created May 9, 2020 16:25
TestDome-DataScience
import pandas as pd
import numpy as np
def login_table(id_name_verified, id_password):
"""
:param id_name_verified: (DataFrame) DataFrame with columns: Id, Login, Verified.
:param id_password: (numpy.array) Two-dimensional NumPy array where each element
is an array that contains: Id and Password
:returns: (None) The function should modify id_name_verified DataFrame in-place.
It should not return anything.
@siddharththakur26
siddharththakur26 / IrisClassifier.py
Created May 9, 2020 16:24
TestDome-DataScience
import numpy as np
from sklearn import datasets,svm
from sklearn.model_selection import train_test_split
from sklearn import metrics
def train_and_predict(train_input_features, train_outputs, prediction_features):
"""
:param train_input_features: (numpy.array) A two-dimensional NumPy array where each element
is an array that contains: sepal length, sepal width, petal length, and petal width
:param train_outputs: (numpy.array) A one-dimensional NumPy array where each element
@siddharththakur26
siddharththakur26 / DesiredMarketingExpenditure.py
Last active December 7, 2022 08:39
TestDome-DataScience
import numpy as np
from sklearn import linear_model
def desired_marketing_expenditure(marketing_expenditure, units_sold, desired_units_sold):
"""
:param marketing_expenditure: (list) A list of integers with the expenditure for each previous campaign.
:param units_sold: (list) A list of integers with the number of units sold for each previous campaign.
:param desired_units_sold: (integer) Target number of units to sell in the new campaign.
:returns: (float) Required amount of money to be invested.
"""