Skip to content

Instantly share code, notes, and snippets.

View Ajinx1's full-sized avatar

Ayotola Ajisola Ajinx1

  • Abuja
  • 04:43 (UTC)
View GitHub Profile
@rosenhouse
rosenhouse / time-ago.py
Last active June 20, 2024 03:07
Python time-ago
def time_ago(time=False):
"""
Get a datetime object or a int() Epoch timestamp and return a
pretty string like 'an hour ago', 'Yesterday', '3 months ago',
'just now', etc
Modified from: http://stackoverflow.com/a/1551394/141084
"""
now = datetime.utcnow()
if type(time) is int:
@chrisidakwo
chrisidakwo / nigerian-states.json
Last active October 24, 2024 08:49
All 36 states in Nigeria, and their local government areas - including the Federal Capital Territory and its area councils
{
"Abia": [
"Aba North",
"Aba South",
"Arochukwu",
"Bende",
"Ikwuano",
"Isiala-Ngwa North",
"Isiala-Ngwa South",
"Isuikwato",