Monday, August 26, 2019

Monday: Being back to work means being distracted by random things.

1) Stardew:
Oh geeze, I don't know?  This seems awfully fast, and I'm not sure I'm old enough to have a video game kid.

This, this isn't helping any!  Yikes.  Way to ramp up the pressure, Leah!
2) Twitter, lists, and those being used by bots to target attacks.

I saw this tweet yesterday, which made me think about how easy it should be to automatically block everyone who has put you on a list, and I was able to slap together this:

#!/usr/bin/python3

import twitter as tw
import time

api = tw.Api(consumer_key=CONSUMER_KEY,
             consumer_secret=CONSUMER_SECRET,
             access_token_key=ACCESS_TOKEN,
             access_token_secret=ACCESS_TOKEN_SECRET)

mm = api.GetMemberships(screen_name=SN, count=200)

ff = []
npage, ppage, new = api.GetFollowersPaged(screen_name=SN, count=200, cursor=-1)
ff.extend(new)

while npage != 0:
    time.sleep(1)
    npage, ppage, new = api.GetFollowersPaged(screen_name=SN,
                                              count=200, cursor=npage)
    ff.extend(new)
    print(npage, ppage, len(ff), ff[-1])

print(ppage, npage, new)
for idx, r in enumerate(mm): # .sort(key=lambda r: r['id'])):
    print(idx, repr(r))
    resp = api.CreateBlock(user_id = r.user.id)

which has key variables removed (for "don't spread your access tokens and secrets on your blog" reasons), and I think doesn't work due to incomplete testing (because I didn't want to auto-block however many people accidentally;  most things up to the block bit work fine if need to be rate limited more), but it seems like someone else would have come up with this already.

3) I hate when libraries don't have what seems like a critical function.

No comment.

4) How common was this?

This floorplan (along with a lot of others on that tumblr) have "maid rooms" included.  That made me wonder how often that happened.  From here, it sounds like 20-60%, depending on where in the country.  This says closer to 10%.  Still, wow.  Also: racism.

5) Other stuff.




No comments:

Post a Comment