This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import praw | |
| from collections import defaultdict | |
| discussion_threads = \ | |
| ["https://www.reddit.com/r/AYearOfLesMiserables/comments/abcufy/111_chapter_discussion_spoilers_up_to_111/", | |
| "https://www.reddit.com/r/AYearOfLesMiserables/comments/abnlbx/112_chapter_discussion_spoilers_up_to_112/", | |
| "https://www.reddit.com/r/AYearOfLesMiserables/comments/ac0a73/113_chapter_discussion_spoilers_up_to_113/", | |
| "https://www.reddit.com/r/AYearOfLesMiserables/comments/acbssc/114_chapter_discussion_spoilers_up_to_114/", | |
| "https://www.reddit.com/r/AYearOfLesMiserables/comments/acpdhv/115_chapter_discussion_spoilers_up_to_115/", | |
| "https://www.reddit.com/r/AYearOfLesMiserables/comments/acy1xz/116_chapter_discussion_and_plot_summary_spoilers/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import praw | |
| from collections import defaultdict | |
| discussion_threads = \ | |
| ["https://www.reddit.com/r/AReadingOfMonteCristo/comments/eiazxw/chapter_1_reading_discussion_spoilers_up_to/", | |
| "https://www.reddit.com/r/AReadingOfMonteCristo/comments/ejo9bh/chapter_2_reading_discussion_spoilers_up_to/", | |
| "https://www.reddit.com/r/AReadingOfMonteCristo/comments/ekkjuq/chapter_3_reading_discussion_spoilers_up_to/", | |
| "https://www.reddit.com/r/AReadingOfMonteCristo/comments/elk7ti/chapter_4_reading_discussion_spoilers_up_to/", | |
| "https://www.reddit.com/r/AReadingOfMonteCristo/comments/emz5ol/chapter_5_reading_discussion_spoilers_up_to//", | |
| "https://www.reddit.com/r/AReadingOfMonteCristo/comments/env31y/chapter_6_reading_discussion_spoilers_up_to/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import praw | |
| from collections import defaultdict | |
| discussion_threads = \ | |
| ["https://www.reddit.com/r/Yogscast/comments/ete47v/did_you_hear_about_the_guy_who_ate_kevin_bacons/", | |
| "https://www.reddit.com/r/Yogscast/comments/ews83c/did_you_hear_about_the_tortoise_that_had_800/", | |
| "https://www.reddit.com/r/Yogscast/comments/f0e71c/nasa_says_this_10_plant_will_save_your_life/", | |
| "https://www.reddit.com/r/Yogscast/comments/f3vz67/haunted_elsa_doll_returns_from_the_dead_twice/", | |
| "https://www.reddit.com/r/Yogscast/comments/f7eydi/grandma_falls_from_7th_storey_window_and_survives/", | |
| "https://www.reddit.com/r/Yogscast/comments/fayroa/uks_first_cheesethemed_hotel_opens_for_business/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import praw | |
| from collections import defaultdict | |
| discussion_threads = \ | |
| ["https://www.reddit.com/r/yearofannakarenina/comments/ko1iwm/anna_karenina_part_1_chapter_1/", | |
| "https://www.reddit.com/r/yearofannakarenina/comments/kok3s8/anna_karenina_part_1_chapter_2/", | |
| "https://www.reddit.com/r/yearofannakarenina/comments/kpv8vg/anna_karenina_part_1_chapter_3/", | |
| "https://www.reddit.com/r/yearofannakarenina/comments/kr8xw6/anna_karenina_part_1_chapter_4/", | |
| "https://www.reddit.com/r/yearofannakarenina/comments/kvg5vg/anna_karenina_part_1_chapter_5/", | |
| "https://www.reddit.com/r/yearofannakarenina/comments/kw1u5d/anna_karenina_part_1_chapter_6/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import praw | |
| from collections import defaultdict | |
| discussion_threads = \ | |
| ["https://www.reddit.com/r/yearofdonquixote/comments/ko1iws/don_quixote_volume_1_chapter_1/", | |
| "https://www.reddit.com/r/yearofdonquixote/comments/kp9k3b/don_quixote_volume_1_chapter_2/", | |
| "https://www.reddit.com/r/yearofdonquixote/comments/kqm5jk/don_quixote_volume_1_chapter_3/", | |
| "https://www.reddit.com/r/yearofdonquixote/comments/ks194a/don_quixote_volume_1_chapter_4/", | |
| "https://www.reddit.com/r/yearofdonquixote/comments/ktfu6a/don_quixote_volume_1_chapter_5/", | |
| "https://www.reddit.com/r/yearofdonquixote/comments/kur1nv/don_quixote_volume_1_chapter_6/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import praw | |
| from collections import defaultdict | |
| discussion_threads = \ | |
| ["https://www.reddit.com/r/thehemingwaylist/comments/rthfhy/buddenbrooks_chapter_1/", | |
| "https://www.reddit.com/r/thehemingwaylist/comments/ru7p9c/buddenbrooks_chapter_2/", | |
| "https://www.reddit.com/r/thehemingwaylist/comments/rv0o67/buddenbrooks_thomas_mann_chapter_3_discussion/", | |
| "https://www.reddit.com/r/thehemingwaylist/comments/rvsc05/buddenbrooks_thomas_mann_chapter_4_discussion/", | |
| "https://www.reddit.com/r/thehemingwaylist/comments/rwluwr/buddenbrooks_thomas_mann_chapter_5_discussion/", | |
| "https://www.reddit.com/r/thehemingwaylist/comments/rxdycb/buddenbrooks_thomas_mann_chapter_6/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """QPlainTextEdit subclass which mimics QLineEdit. The idea is to make it | |
| hotswappable for QLineEdit with no changes needed, so that you can have a | |
| QLineEdit without its inherent limitations, like not being able to modify the | |
| undo behaviour, not being able to use QCursor, etc. | |
| Adapted from ssokolow’s OneLineSpellTextEdit: | |
| https://gist.github.com/ssokolow/abb20a30415fa4debce912c38060ca6a | |
| NOTE: | |
| * textEdited probably works differently from QLineEdit’s textEdited, because I | |
| am not sure yet how to replicate it exactly. For now it emits when the text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # use `xinput list` to check your keyboard name. this one is for laptop internal keyboard | |
| deviceName="AT Translated Set 2" | |
| builtInId=$(xinput list | grep "$deviceName" | sed 's/^.*id=//' | sed 's/\t.*//') | |
| case $1 in | |
| disable) | |
| xinput disable $builtInId | |
| echo "Keyboard '${deviceName}' disabled" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| from datetime import datetime, timezone | |
| def get_ntfs3g_file_creation_date(path): | |
| # type: (str) -> str | |
| c = subprocess.run([ | |
| 'getfattr', '--only-values', '--name=system.ntfs_crtime', path | |
| ], capture_output=True) | |
| # Convert getfattr output's little-endian bytes to int, and convert |