Guest User

Untitled

a guest
Sep 5th, 2024
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. dzwdz@fleshwing:/tmp/lobs$ diff -C 1 old.txt new.txt
  2. *** old.txt 2024-09-05 19:23:38.578576138 +0200
  3. --- new.txt 2024-09-05 19:21:49.901014371 +0200
  4. ***************
  5. *** 17,19 ****
  6. . 2 For me it's missing only one thing, which is to support dark mode via a CSS
  7. - . 2 I love it! Looks great on both my desktop and phone, and it isn't weighed d
  8. . . 2 I brought back dark mode, new and improved. Can you let me know what you
  9. --- 17,18 ----
  10. ***************
  11. *** 22,23 ****
  12. --- 21,23 ----
  13. . . 1 Someone made one but there was something slightly wrong about pre tags in
  14. + . 2 I love it! Looks great on both my desktop and phone, and it isn't weighed d
  15. . . 1 Oh, that is good to hear. I do not regularly check up on how it looks on
  16. ***************
  17. *** 45,47 ****
  18. 26 My site's at https://jacky.wtf - definitely curious.
  19. - . 7 Linux/Desktop (1920x1080, 16:9)/Chromium with uBlock
  20. . 21 I dislike political stuff so I closed the tab right after the font loaded,
  21. --- 45,46 ----
  22. ***************
  23. *** 54,55 ****
  24. --- 53,55 ----
  25. . . . . 12 The first blog-post of the person is "I enforced the AGPL on my code
  26. + . 7 Linux/Desktop (1920x1080, 16:9)/Chromium with uBlock
  27. . 4 I like the simplicity of the design.
  28. ***************
  29. *** 379,382 ****
  30. 1 i recently redesigned my website https://bkkaggle.github.io to be a lot more
  31. - 1 Here's mine: https://utsavshah.com/
  32. . 2 I like it because it has a very distinctive design language, that reminds m
  33. . 1 Reviewed on iPhone X.
  34. --- 379,382 ----
  35. 1 i recently redesigned my website https://bkkaggle.github.io to be a lot more
  36. . 2 I like it because it has a very distinctive design language, that reminds m
  37. + 1 Here's mine: https://utsavshah.com/
  38. . 1 Reviewed on iPhone X.
  39. ***************
  40. *** 498,502 ****
  41. 1 Hi all! My site's at https://apas.gr and the blog at https://apas.gr/posts -
  42. - 1 Cool idea! Curious to see what folks think: http://cdaniels.net/
  43. . 2 It looks quite nice, I guess it's heavily inspired by the tufte layout? Fo
  44. . . 2 Thanks. Yes, indeed it's based on Tufte layout. In fact, [I built a minim
  45. . 2 Nice and simple.
  46. --- 498,502 ----
  47. 1 Hi all! My site's at https://apas.gr and the blog at https://apas.gr/posts -
  48. . 2 It looks quite nice, I guess it's heavily inspired by the tufte layout? Fo
  49. . . 2 Thanks. Yes, indeed it's based on Tufte layout. In fact, [I built a minim
  50. + 1 Cool idea! Curious to see what folks think: http://cdaniels.net/
  51. . 2 Nice and simple.
  52.  
  53.  
  54.  
  55. here's the stupid script:
  56. import json
  57. import sys
  58. import collections
  59.  
  60. data = json.load(sys.stdin)
  61.  
  62. def display(c):
  63. print((
  64. '. ' * c['depth'] +
  65. str(c['score']) +
  66. ' ' +
  67. c['comment_plain'].split('\n')[0]
  68. )[:80])
  69.  
  70. if True: # change this to use the new/old order
  71. for c in data['comments']:
  72. display(c)
  73. exit()
  74.  
  75. # let's sort in the new order
  76. cd = dict()
  77. tree = collections.defaultdict(list)
  78. for c in data['comments']:
  79. cd[c['short_id']] = c
  80. tree[c['parent_comment']].append(c['short_id'])
  81.  
  82. def display_tree(root):
  83. if root != None:
  84. display(cd[root])
  85. children = tree[root]
  86. tree[root].sort(key=lambda k: cd[k]['score'] - cd[k]['flags'], reverse=True)
  87. for child in tree[root]:
  88. display_tree(child)
  89. display_tree(None)
  90.  
Advertisement
Add Comment
Please, Sign In to add comment