Skip to content

Instantly share code, notes, and snippets.

View paladinic's full-sized avatar
🍍

Claudio Paladini paladinic

🍍
View GitHub Profile
@pavankjadda
pavankjadda / How to fix gitignore not working issue.md
Last active May 9, 2024 06:13
How to fix "gitignore not working" issue

FYI: Created blog post with more details

How to fix ".gitignore not working" issue?

Sometimes git does not exclude files/folders added .gitignore especially if you had commited them before. Here is how to fix it. I am ignoring node_modules from Angular project as an example

  1. Update .gitignore with the folder/file name you want to ignore. You can use anyone of the formats mentioned below (prefer format1)
### Format1  ###
node_modules/
@honake
honake / adstock.py
Last active November 17, 2022 06:54
Calculate the optimal Ad Stock
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def broadbent_adstock(grp, r):
adstock = np.zeros(len(grp))
adstock[0] = grp[0]
for i in range(1,len(grp)):
adstock[i] = grp[i] + r*adstock[i-1]
return adstock