aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorAnthony Wang2024-09-30 00:43:59 -0400
committerAnthony Wang2024-09-30 00:43:59 -0400
commit0465392836d91a13a78ba5bf1d24cb7ea2f66e36 (patch)
treea61b5d767f188b611f6090363cd2b4ad41ba3c03 /static
parent8ba8197a9caeee1dcfce7a7cd7d760e5ff0ae0ee (diff)
Anime birthdays
Diffstat (limited to 'static')
-rw-r--r--static/img/anime-birthdays.pngbin0 -> 24398 bytes
-rw-r--r--static/img/uk-birthdays.pngbin0 -> 98897 bytes
-rw-r--r--static/src/moegirlpedia-birthdays.py392
3 files changed, 392 insertions, 0 deletions
diff --git a/static/img/anime-birthdays.png b/static/img/anime-birthdays.png
new file mode 100644
index 0000000..b179e2e
--- /dev/null
+++ b/static/img/anime-birthdays.png
Binary files differ
diff --git a/static/img/uk-birthdays.png b/static/img/uk-birthdays.png
new file mode 100644
index 0000000..a457246
--- /dev/null
+++ b/static/img/uk-birthdays.png
Binary files differ
diff --git a/static/src/moegirlpedia-birthdays.py b/static/src/moegirlpedia-birthdays.py
new file mode 100644
index 0000000..baa8da3
--- /dev/null
+++ b/static/src/moegirlpedia-birthdays.py
@@ -0,0 +1,392 @@
+import re
+import urllib.request
+import numpy as np
+import matplotlib.pyplot as plt
+
+headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
+
+cnts = np.zeros((12, 31), dtype=np.uint8)
+
+for month in range(12):
+ monthlen = 29 if month == 1 else 30 if month in [3, 5, 8, 10] else 31
+ for day in range(monthlen):
+ req = urllib.request.Request(f'https://moegirl.uk/Category:{month + 1}%E6%9C%88{day + 1}%E6%97%A5', headers=headers)
+ body = urllib.request.urlopen(req).read().decode('utf-8')
+ cnts[month, day] = int(re.search(r'(\d*)个页面', body).group()[:-3])
+ print(month + 1, day + 1, cnts[month, day])
+
+plt.matshow(cnts)
+plt.colorbar()
+plt.show()
+
+
+"""
+1 1 137
+1 2 47
+1 3 69
+1 4 42
+1 5 41
+1 6 65
+1 7 65
+1 8 58
+1 9 51
+1 10 50
+1 11 69
+1 12 47
+1 13 54
+1 14 39
+1 15 47
+1 16 42
+1 17 45
+1 18 59
+1 19 53
+1 20 56
+1 21 65
+1 22 53
+1 23 61
+1 24 39
+1 25 50
+1 26 37
+1 27 52
+1 28 49
+1 29 38
+1 30 47
+1 31 43
+2 1 62
+2 2 87
+2 3 59
+2 4 65
+2 5 67
+2 6 58
+2 7 41
+2 8 60
+2 9 51
+2 10 58
+2 11 48
+2 12 52
+2 13 46
+2 14 121
+2 15 64
+2 16 48
+2 17 49
+2 18 55
+2 19 64
+2 20 49
+2 21 34
+2 22 103
+2 23 48
+2 24 47
+2 25 53
+2 26 33
+2 27 57
+2 28 65
+2 29 37
+3 1 70
+3 2 49
+3 3 147
+3 4 49
+3 5 54
+3 6 65
+3 7 73
+3 8 49
+3 9 46
+3 10 67
+3 11 46
+3 12 47
+3 13 48
+3 14 82
+3 15 74
+3 16 49
+3 17 54
+3 18 45
+3 19 54
+3 20 77
+3 21 66
+3 22 45
+3 23 44
+3 24 57
+3 25 64
+3 26 45
+3 27 54
+3 28 65
+3 29 47
+3 30 56
+3 31 51
+4 1 122
+4 2 90
+4 3 62
+4 4 78
+4 5 76
+4 6 56
+4 7 62
+4 8 60
+4 9 60
+4 10 76
+4 11 40
+4 12 52
+4 13 64
+4 14 45
+4 15 69
+4 16 56
+4 17 53
+4 18 46
+4 19 44
+4 20 47
+4 21 54
+4 22 60
+4 23 50
+4 24 44
+4 25 52
+4 26 33
+4 27 46
+4 28 45
+4 29 40
+4 30 61
+5 1 68
+5 2 67
+5 3 53
+5 4 60
+5 5 128
+5 6 48
+5 7 40
+5 8 53
+5 9 56
+5 10 54
+5 11 32
+5 12 57
+5 13 44
+5 14 59
+5 15 77
+5 16 40
+5 17 40
+5 18 48
+5 19 46
+5 20 81
+5 21 64
+5 22 48
+5 23 43
+5 24 57
+5 25 64
+5 26 33
+5 27 46
+5 28 45
+5 29 44
+5 30 56
+5 31 53
+6 1 124
+6 2 35
+6 3 52
+6 4 48
+6 5 44
+6 6 142
+6 7 57
+6 8 56
+6 9 58
+6 10 56
+6 11 47
+6 12 60
+6 13 55
+6 14 43
+6 15 55
+6 16 55
+6 17 57
+6 18 67
+6 19 54
+6 20 42
+6 21 68
+6 22 66
+6 23 68
+6 24 51
+6 25 42
+6 26 64
+6 27 46
+6 28 37
+6 29 35
+6 30 67
+7 1 80
+7 2 49
+7 3 45
+7 4 57
+7 5 50
+7 6 49
+7 7 151
+7 8 36
+7 9 40
+7 10 61
+7 11 58
+7 12 48
+7 13 44
+7 14 53
+7 15 67
+7 16 44
+7 17 50
+7 18 54
+7 19 43
+7 20 83
+7 21 47
+7 22 59
+7 23 82
+7 24 55
+7 25 48
+7 26 53
+7 27 43
+7 28 59
+7 29 50
+7 30 58
+7 31 54
+8 1 84
+8 2 64
+8 3 56
+8 4 45
+8 5 60
+8 6 40
+8 7 58
+8 8 118
+8 9 54
+8 10 94
+8 11 65
+8 12 50
+8 13 45
+8 14 43
+8 15 80
+8 16 70
+8 17 57
+8 18 63
+8 19 51
+8 20 67
+8 21 54
+8 22 64
+8 23 56
+8 24 48
+8 25 66
+8 26 41
+8 27 48
+8 28 69
+8 29 43
+8 30 54
+8 31 65
+9 1 58
+9 2 43
+9 3 63
+9 4 40
+9 5 54
+9 6 67
+9 7 62
+9 8 50
+9 9 100
+9 10 64
+9 11 36
+9 12 74
+9 13 62
+9 14 49
+9 15 53
+9 16 39
+9 17 50
+9 18 40
+9 19 65
+9 20 61
+9 21 49
+9 22 52
+9 23 62
+9 24 55
+9 25 48
+9 26 51
+9 27 56
+9 28 55
+9 29 57
+9 30 59
+10 1 89
+10 2 63
+10 3 66
+10 4 62
+10 5 62
+10 6 47
+10 7 66
+10 8 51
+10 9 46
+10 10 128
+10 11 55
+10 12 44
+10 13 39
+10 14 58
+10 15 60
+10 16 64
+10 17 49
+10 18 76
+10 19 41
+10 20 55
+10 21 58
+10 22 39
+10 23 65
+10 24 66
+10 25 67
+10 26 41
+10 27 64
+10 28 45
+10 29 51
+10 30 65
+10 31 82
+11 1 78
+11 2 57
+11 3 83
+11 4 48
+11 5 46
+11 6 50
+11 7 62
+11 8 56
+11 9 58
+11 10 46
+11 11 133
+11 12 51
+11 13 55
+11 14 51
+11 15 62
+11 16 47
+11 17 46
+11 18 43
+11 19 44
+11 20 58
+11 21 52
+11 22 68
+11 23 51
+11 24 43
+11 25 52
+11 26 48
+11 27 45
+11 28 49
+11 29 65
+11 30 69
+12 1 80
+12 2 56
+12 3 68
+12 4 42
+12 5 59
+12 6 65
+12 7 66
+12 8 55
+12 9 31
+12 10 49
+12 11 33
+12 12 87
+12 13 40
+12 14 48
+12 15 58
+12 16 52
+12 17 34
+12 18 52
+12 19 41
+12 20 65
+12 21 69
+12 22 68
+12 23 65
+12 24 131
+12 25 127
+12 26 52
+12 27 36
+12 28 51
+12 29 37
+12 30 38
+12 31 80
+"""
+
+# For real human data, see https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/livebirths/articles/howpopularisyourbirthday/