JackLSauce

joined 2 years ago
[–] JackLSauce@lemmy.world 2 points 7 hours ago

I'm not sure I can think of a more crack-headed thing than starting a sentence with "I hired this cat" but I'm also not trying very hard

[–] JackLSauce@lemmy.world 52 points 2 days ago

You'll be happier not knowing

[–] JackLSauce@lemmy.world 2 points 5 days ago (1 children)

I get that a lot

Getting threats over one line of code is called senior development

[–] JackLSauce@lemmy.world 16 points 5 days ago (19 children)

Pre-commit hooks don't require a pipeline nor any money. In most cases it's one line of code to make the tests run every commit

[–] JackLSauce@lemmy.world 1 points 5 days ago (1 children)

I can kinda understand that but I've taken week-long overseas vacations so giving border control extra work verifying a visitor isn't returning home "too fast" seems counter-productive

[–] JackLSauce@lemmy.world 4 points 6 days ago (3 children)

For countries not on the list, a transit policy allows eligible citizens to enter for 10 days if they depart for a different country they arrived from.

Cool cool cool..... Why?

[–] JackLSauce@lemmy.world 12 points 1 week ago

O-Damn blood type

[–] JackLSauce@lemmy.world 4 points 1 week ago (1 children)

Should do so on its own if one of the legs is shorter than the other(s)

[–] JackLSauce@lemmy.world 11 points 1 week ago

I distinctly recall thinking inner monologues were a "neat idea" after seeing them on TV as a child and thinking it would be a useful skill to learn. I never did though

[–] JackLSauce@lemmy.world 11 points 2 weeks ago

They may have invented seals but the Egyptians perfected walruses

[–] JackLSauce@lemmy.world 3 points 3 weeks ago

The fact they chose not to use the (entirely accurate) headline of "US Denies Mads Mikkelsen Entry to US due to Vance Meme" is the most frustrating part

 

Amazon Prime is particularly heinous about using dark patterns to confound users into risking forgetting but ultimately you've already paid for the month, year

I can confirm this to also be the case with most streaming giants plus the less-giant Shutter

Edit: comments have pointed out some notable exceptions such as services through Apple and HP Instant Ink

 
 
 
 
 

You'll need to update the praw.Reddit() parameters and set booleans to True based on what you want to have cleared.

This also overwrites your comments with nonsense content seeing as Reddit doesn't really delete your comments if nobody forces them

Sorry about the amateurish Python, this isn't my go-to language

import praw

#Update all values set to XXXXXX and set boolean values to True for whatever you'd like to clear

reddit = praw.Reddit(
    client_id="XXXXXX",
    client_secret="XXXXXX",
    user_agent="script running locally", #required for PRAW but not sure content matters
    username="XXXXXX",
    password="XXXXXX"
)

#booleans
delete_posts = False
delete_comments = False
delete_saved = False
clear_votes = False
unsubscribe = False

def get_posts():
    return reddit.user.me().submissions.new(limit=100)

def get_comments():
    return reddit.user.me().comments.new(limit=100)

def get_subscriptions():
    return reddit.user.subreddits()

def get_saved_items():
    return reddit.user.me().saved(limit=100)

def get_upvoted():
    return reddit.user.me().upvoted(limit=100)

def get_downvoted():
    return reddit.user.me().downvoted(limit=100)

while(clear_votes):
    count = 0
    upvotes = get_upvoted()
    downvotes = get_downvoted()
    for vote in upvotes:
        try:
            vote.clear_vote()
            count += 1
            print('Clearing vote for: ', vote)
        except Exception as e:
            print('Could not clear vote due to: ', e, '(this is normal for archived posts)')
            continue
    for vote in downvotes:
        try:
            vote.clear_vote()
            count += 1
            print('Clearing vote for: ', vote)
        except Exception as e:
            print('Could not clear vote due to: ', e, '(this is normal for archived posts)')
            continue
    if(count == 0):
        clear_votes = False

while(delete_saved):
    count = 0
    saved_items = get_saved_items()
    for item in saved_items:
        item.unsave()
        count += 1
        print('Unsaved item ID: ', item)
    if(count == 0):
        delete_saved = False


while(delete_posts):
    count = 0
    posts = get_posts()
    for post in posts:
        print("Deleting submission: ", post)
        post.delete()
        count += 1
    if(count == 0): 
        delete_posts = False 


#Replace comments with nonsense data first as Reddit only "marks comments as" deleted
while(delete_comments):
    count = 0
    comments = reddit.user.me().comments.new(limit=1000)
    print("Replacing comments with nonsense data")
    for comment in comments:
       comment.edit('So long and thanks for all the fish')
    print("Deleting comments")
    for comment in comments:
        comment.delete()
        count+=1
    if (count == 0):
        delete_comments = False

while(unsubscribe):
    count = 0
    subscriptions = get_subscriptions()
    for subreddit in subscriptions:
        subreddit.unsubscribe()
        count += 1
        print('Unsubscribed from: ', subreddit.display_name)
    if (count == 0):
        unsubscribe = False

print('--finished--')
view more: next ›