Revert "Fix all Python Cookbook links (#22205)" (GH-22424)

This commit reverts commit ac0333e1e117b7f61ed7ef1dbcdb6e515ada603b as the original links are working again and they provide extended features such as comments and alternative versions.
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index f4da9d0..5d75501 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -574,7 +574,7 @@
     #   http://en.wikipedia.org/wiki/Multiset
     #   http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html
     #   http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm
-    #   https://github.com/ActiveState/code/tree/master/recipes/Python/259174_bag_collection_class/recipe-259174.py
+    #   http://code.activestate.com/recipes/259174/
     #   Knuth, TAOCP Vol. II section 4.6.3
 
     def __init__(self, iterable=None, /, **kwds):
diff --git a/Lib/heapq.py b/Lib/heapq.py
index 5895562..fabefd8 100644
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -456,7 +456,7 @@
 # 2) Made multiple passes over the data.
 # 3) Made more comparisons in common cases (small k, large n, semi-random input).
 # See the more detailed comparison of approach at:
-# https://github.com/ActiveState/code/tree/master/recipes/Python/577573_Compare_algorithms/recipe-577573.py
+# http://code.activestate.com/recipes/577573-compare-algorithms-for-heapqsmallest
 
 def nsmallest(n, iterable, key=None):
     """Find the n smallest elements in a dataset.
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 2abe5b0..a6f6483 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -611,7 +611,7 @@
         def msum(iterable):
             """Full precision summation.  Compute sum(iterable) without any
             intermediate accumulation of error.  Based on the 'lsum' function
-            at https://github.com/ActiveState/code/tree/master/recipes/Python/393090_Binary_floating_point_summatiaccurate_full/recipe-393090.py
+            at http://code.activestate.com/recipes/393090/
 
             """
             tmant, texp = 0, 0