Skip to content

Commit 37669ff

Browse files
JmalloneJMallone
andauthored
Fix a Typo in README and a ZeroDivisionError (#1)
Co-authored-by: JMallone <[email protected]>
1 parent 8f47cd9 commit 37669ff

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This script is purely for the purposes of archival use only.
2727

2828
```bash
2929
# Install the requirements. Once only.
30-
python -m pip install -r requirements.py
30+
python -m pip install -r requirements.txt
3131
python birdwatch.py --url www.twitter.com/<profile>
3232

3333
# For more help use:

birdwatch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,12 @@ def _func(lst):
143143
def window_average(window):
144144
def _func(lst):
145145
v = lst[:-min(window, len(lst))]
146+
if len(v) == 0:
147+
return lst[-1]
146148
return sum(v) / len(v)
147149
return _func
148150

151+
149152
def constant(const):
150153
def _func(lst):
151154
return const

0 commit comments

Comments
 (0)