You are viewing a single comment's thread from:

RE: Python Libraries: Expanding the Functions

in STEMGeeks2 years ago

Sparse is the new shit!

Looks some fairly reasonable code up there. I have always been of the kind that writes small bits to get things done. One day I hope to get a bit pythony

Sort:  

Voting on those one-liner Actifit posts would be embarrassing! I noticed some use AFIT and my code skips over those and votes.. DOH! I think I need to tweak it again.

You can check for intersections of sets to see if a post has any of a number of tags. I use that in proofofbrian.

if c.is_main_post() and tracktags.intersection(post['tags']) and author not in notified:

I will have a mess with this, otherwise it's back to looping!

tracktags is a set in that case. Otherwise I'd need nested loops to check all the combinations. I will use loops in some cases. I know there's a thing called 'code golf' where people try to implement something in as few characters as possible. That will end up with unreadable code. I try to make mine maintainable by others.

I know there's a thing called 'code golf' where people try to implement something in as few characters as possible.

I remember this from the Perl days.. crazy!

I know sometimes people make real posts on Actifit but I cant do it. There is so much dross that when Isee one I flee for the hills!