Code & Community: The Synergy of Community Building and Task Automation

My planned outline for the talk is as follows:

  • Introduction: A brief overview of the project and its goals, focusing on community building and inclusivity within the Python ecosystem (3 minutes)
  • The Importance of Visibility: Explain the background of the project and why visibility is important (3 minutes)
  • Bot Architecture and Setup: A technical walkthrough of the bot, its architecture, and how it operates to extend the reach of community content on platforms like Mastodon or Bluesky (5 minutes)
  • Hands-On Demo: Task Automation with Google’s Gemini and GitHub Actions: A step-by-step guide to integrating Google’s Gemini and GitHub Actions for creating low-barrier, automated workflows tailored for community-building tasks (12 minutes)
  • Looking Ahead: Provide a forward-looking perspective (upcoming features of the project and future developments) (2 minutes)
  • Q&A and Buffer (5 minutes)

I hope that the talk will inspire more Pythonistas to automate their tasks, and also more PyLadies to share material publicly and make the public perception of experts in the field more diverse.

This session took place in track Natural Language Processing & Audio (incl. Generative AI NLP) and was classified suitable for novice domain / novice python by the speaker.

Transcript (auto)

Auto-generated from the recording utilizing Open-Source AI. Speaker labels (Speaker 1, Speaker 2) reflect diarization, not identity. Timestamps refer to the recording.

Speaker 1 [00:07]

Thank you very much for joining my presentation on code and community, where I'm talking about the not-so-obvious synergy of how community building and task automation can form a really nice relationship. Before we get started, a few words about me. My name is Cosima. I'm currently working as a senior data scientist at SAP. I do have a background in social sciences where I spent a lot of time thinking about biases and how to make them a bit better or less biased. And I still enjoy doing that in my daily work where I'm passionate about building sustainable and explainable machine learning products. Today is not about my work. It's about one of my free time projects. And my free time is actually the second part of this slide. I'm a Google's Women Techmakers Ambassador, which is a network of really nice and amazing people. And I'm also an organizer of PyLadies and RLadies events, which as well is an amazing community. And if you didn't get a chance to hop over to PyLadies booth, take this as an opportunity. You still have time today. They're like, I'm not actually sure where we are located at, but I think they should be downstairs here, just right around the corner at the entrance. There are stairs, there are signs, you will find them. Okay, so that's about me. Now we're going to go into the talk. And to give you some kind of a background and how it all started, how I started this synergy between task automation and community building, we have to hop back like two years. I saw a post like that on LinkedIn, someone promoting a list of 10 data people you should follow. Fantastic people on the list. really cool knowledgeable persons but there was one little thing that kind of stood out and there was kind of a bit of a like it surprised me and it surprised not only me but also someone else who then posted a comment asking why isn't there more diversity on the list and the response that the original author gave left me a bit puzzled and also frustrated it was others are just not visible enough. And this is what I wanted to change and how I started the project. So when we think about visibility, obviously, there are two sides of this coin. First of all, visibility, obviously, it's important. You have to be visible to end up on the list. You have to be seen, you have to be out there that people recognize you, that people recognize your work, that people recognize that you should be valuable enough to be on that list. But of course, you also have to invest time. And time is often either your free time or your work time, but you have to dedicate a certain proportion of your time to write meaningful content, to share it with the world, to promote it, to build your brand and all those things. So when I wanted to change something here, I also was facing this kind of time constraint, because obviously I do have my day job, and I have my free time job, and I wanted to have a solution to this problem, which I'm not saying that I have the full solution yet, but a small step. I wanted to have a solution to the problem that leaves me with my free time, that leaves me with my work, and gives me enough time to do other things as well. And the solution that I came up with is a megaphone, and not just any megaphone, but an automated megaphone. And to show you how this kind of automated megaphone looks like, let's go to the PyLadies community. The PyLadies community for me was the kind of natural starting point for this project, because as you know, I'm involved with the Pi Ladies and I thought, okay, let's get started there. So you have the Pi Ladies around the globe. They are creating content. There are so many cool blog posts out there. There are so many cool YouTube channels, podcasts, open source software, you name it. All those things are out there, but a lot of things people are not fully aware of yet. So what I thought, why not build a little Pi Ladies bot that then shares this content using the automated megaphone. And this actually is something that is currently living on BlueSky and Mastodon. It has more than 1,400 followers, posted more than 850 posts by now, and it is quite active. And I get really positive feedback about that because people enjoy looking at those posts and the things that I'm doing, and I wanted to share with you what it actually does and what the latest feature is. So looking at the key functionalities, I wanted to have something, as I said, that runs in the background. So obviously a cron job, scheduled run-on-time job, at least for me, was the solution. So once this is triggered, it does a couple of things. First of all, it shares portraits of amazing women in tech. Those are little sketches, as you see here, cartoonish style, and a couple of bullet points highlighting what those people have been doing during their lifetime, what their background is, and I hope to inspire with those some kind of role models and to inspire others to follow a similar path and to show how diverse the community actually is. So the bot posts about them. But the bot can also be triggered by you. So it reposts mentions if you tag the bot, and it also reposts tags. So if you tag PyLadies, it also reposts your post, so you can use it as your own automated megaphone to share your content with the world. And last but not least, as I said before, it also promotes content. And this is where we're going to focus in the talk today. So it promotes content. Right now, what you will see, you have blog posts and YouTube channels, which is supported. And you will see something like the title of the post, the author and the handle if they have something, the link, plus a couple of hashtags. And for that, obviously, you need to have an RSS feed, you need to identify the next unposted post, and then post that post. But what you've seen, I mean, it's nice, you're doing DevRel wrong, which is the title, could be catchy, but I thought let's make it even catchier, and let's give the people a summary the post to make them even more likely to click on it and this is where like a larger automated megaphone comes in and that's how I did it will be the second part of this talk and I'll walk you through the steps that I did here so let's go into the construction site and before we get started obviously for a a summary, what I'm using is a LLM, and I've been looking for a couple of possibilities how to do that and ended up with Google's Gemini. Google's Gemini is actually a suite of different models, and I had a couple of criteria that I wanted to go for. One of them is I wanted to have a powerful LLM, not because summarisation is a super complex task, but because the content is highly technical, and I wanted to have something that allows me to really summarise and get the gist out of these technical topics. And then, and those were as equally as important as the first one is, I wanted to have something that is easy to integrate. So you will see in a second I have a really flat architecture, and since this is something that I'm running in my free time, I didn't want to invest too much time and energy to move things around, so I wanted to have an ideally easy plug-and-play approach. And I also wanted to have it cost-effective. So I don't want to wake up to a bill of like X hundred euros that were generated overnight, so Google's Gemini Suite in this case ticked all the boxes, and I went with that one. Talking about architecture, as I said before, it's a really flat architecture. It currently lives in a GitHub repository where I'm using GitHub actions, which triggers then the cron job, currently every second day. With this cron job, I'm sourcing the promote blog post Python script, which is where all the magic happens. Once this is triggered, I'm gathering the RSS feed content I talked about earlier. It's stored in an RSS meta pickle file, but it has to get there somehow, right? So those are other cron jobs happening in the background, but essentially I'm sourcing that from the awesome PyLadies blog post repository, where blogs but also YouTube channels are currently being added. So if you have something like that, and you identify as a PyLady, feel free to reach out to submit yours as well. So I'm using that one to get all the info with the RSS feeds. I have this all in the metadata pickle file. Identify the unposted next post, so who is next in the list, and who has an unposted post that should be out there. And then the Google AI Studio comes in. So here I'm connecting with the Gemini API, use the title of the blog post, and use also the content of the blog post, and generate the summary of the blog post. Then I'm building everything together, writing the post that the bot is posting, and send it out to BlueSky and Mastodon. And the bot then shares it. So how do we make this kind of connection here? That's what we're going to look at in a second. And I have to give a quick disclaimer, because it was not a disclaimer, but a pleasant surprise, let's put it like that. It took me 30 minutes to have that up and running. And it was really, really nice. So easy to integrate? Yes, definitely a check. So what you're doing is you're going to Google's AI Studio. Click on Get API Key. Then you get this numeric character API key that you're not pushing to GitHub, but storing in your environment variables, and also in your GitHub secrets, of course, because you will need to use it later. But you have that, then you have the choice. When I did that, when I implemented it, Gemini 1.5 just came out, so I went with that one. Now there are newer models you can also play around with. But for me, even though I want to have a powerful LLM, I don't have super complex things or operations that are happening in the background. So I thought, let's think as ecologically as possible, go for a smaller model. And it does a good job, actually. So I don't need highly complex operations. I also do have public data, which is already out there, which I'm scraping in a public way. So I don't need to identify while scraping, which is important. Because when you look at those comparisons here, you have one free of charge tier and one pay-as-you-go tier. With the free of charge tier, you obviously pay somehow, and you pay with the data that you're using. So this was for me. Since I'm using public data, it's OK. I can use the data here. So I'm good to go with the free of charge. And I also don't need high rate limits. As I said before, it runs every second day. I'm not, I don't think I will get anywhere those rate limits anytime soon. So also good, free of charge it is for me. So also cost effective. It's good. We're good to go here. So I picked the model, and now all you have to do is integrate it in your code. And for me, it was actually just this little Python thing that I've done. In particular, if you have a modularized code setup, it is really easy to do. So what you're doing essentially is you're importing the model. You're importing the library. Then in the next step, you're initializing the model. You're sourcing your API key. Remember, the one you start in your end variables or GitHub secrets, respectively. Then you're initializing the model. Here you can pick whichever model they offer, source it. And then in the next step, you have the summarize blog post function that I wrote. There in the very top part, you have a super simple prompt that I wrote, which basically says, please summarize the content of the blog post in a maximum of 60 characters. be as concise as possible and be engaging, because remember, we want people to go to those blog posts. And I'm also sending the text from RSS feed, which is a combined string of the title and the content as well. So I'm sending all those to the model, get my response back, and then a very last step happens because I don't want to wake up the next morning having nightmares, my bot posting something really weird, and we know this can happen with LLMs. So what I'm doing is I'm doing some kind of safety checks, like really simplistic here, but it lets me sleep well at night. So what the model actually does, it's based on perspective AI, another model running in the background doing some kind of safety checks, and it checks on a couple of categories. So it checks harassment, hate speech, sexually explicit content, dangerous civic integrity, violations or something like that as well. And what it returns, it returns both probabilities as well as a categorical ranking. And I'm going for the categorical ranking because probabilities may change and there may be changes and I want to have it as stable as possible. And I'm only accepting those where the model thinks it's insignificant. So the probability is as low as possible to be classified as being insignificant. And that's what I'm doing here. So risk is really low. I'm okay, I'm returning the response that the model generated, if not, I'm just returning nothing and no one's going to lose anything. It's all good here. And that's it. And then there is, like, one very last step, and I'm going to show you real quick my GitHub Actions YAML. It's the full one, and all I'm doing is adding here the Gemini API key. And that's it. And now the script, again, I mean, it's been sourced before, but now with the Gemini API the edit functionality and what the bot is now doing instead of just posting this one it's also adding a bit more meaningful content so development relationships is not like you're not doing it just wrong but it's not marketing and we should stop treating it like a quick fix and build an authentic community relationships for long-term success which hopefully makes people more likely to click on this really cool blog post someone spent a lot of time writing it. So that's for that, the full integration. And now some kind of lessons learned. So using powerful LLMs can easily enhance your applications. I mean, probably most of you have seen it in your day job as well, how easy it can be to add new functionalities, get new ideas how to add new functionalities as well. But you've seen here, it's really easy. You don't need to deploy it yourself. You can have this API plug and play approach. And as well, integrating those modern LLMs can be straightforward and requires only minor adjustments to your code structure, in particular if you have this kind of modular setup where things are nicely capsuled. And I'm being honest here, because when I started looking into it, I thought, oh, gosh, I have to go all the way to the cloud, set up Cloud Run, Scheduler, and all those things on Google. But no, you don't have to. You can keep it in your GitHub repo. You can have it there. It's an easy plug-and-play approach, which also obviously makes it easy to change. At one point, you decide, like, Gemini is not the way to go. Another provider has another model. Let's plug in that one. And as well, I mean, in particular for me, since this is a pet project, it's really cost effective for small projects and developers, or if you want to try something out and heard all the buzz about the LLMs at this conference and want to get it started, also a nice way of having it as a starting point. So to kind of close the session, what's next? this is a community project and I'm really open for a lot of ideas so if you have something feel free to reach out but when I was implementing those things I mean obviously your brain starts thinking and you have this oasis of kind of possibilities what you could do and I thought okay blog posts are nice I'm having Gemini which is multimodal probably let's also go for YouTube videos I mean easy start would be YouTube videos description, again, written language, but we could also do something with the videos if there's no description. We could add more meaningful content here. Then another thing I was thinking is to utilize those LLMs to reduce errors I'm currently or I'm often facing when texts are too long. So APIs are different. on, depending on the instance you're on, it allows really long texts for the bot to post. Blue Sky is really strict here. If you're using the API, you have 300 graph memes. That's what they call it. And 300, that's nothing, actually. And the bot currently is running or not posting stuff if those things are too long. So you could utilize LLMs to shorten things here as well and rewrite things. obviously it has a bit of an overhead because you don't want to misinterpret text, you don't want to drastically change things you don't want to change, but that's a whole other story. And then besides those LLM things that you could do, I obviously also want to onboard other content such as podcasts or open-source software. I mentioned before people are developing those things and as I mentioned in the introduction of this slide, I'm also very open for other ideas so if you have something feel free to reach out again community project it should be also supported and done by the community and with that thank you so much thank you so much for joining and thank you so much for the interest in this little pie lady spot that I built behind this QR code you'll find more information blog posts how I did things in case you're interested also how to reach me so thank you for the time on like it's not even afternoon yet but Friday still it counts

Speaker 2 [20:16]

Thank you so much for your talk was really inspiring. We do have a couple of questions, and I think we also have the time for them So let me just start mm-hmm You mentioned that the pilot spot is automatically reposting things when it is tagged Did you experience abuse of this if so, how did you prevent it?

Speaker 1 [20:34]

experienced abuse of that but only like really little like over the like the bot is live since February 2024 I think I'm mixing up years with COVID and everything it's it's it's like it's a mess so it's been it's been active a while and I've been only experiencing abuse I think three times in total so I think that's I mean it will happen I don't have really like guardrails here in place yet. If anyone has any idea, happy to hear about them, but it's really small the proportion, and I'm happy about that.

Speaker 2 [21:11]

Next one, amazing, says the question. Can you share any feedback you received from the community, e.g. did someone get invited somewhere because they were featured by the bot or anything?

Speaker 1 [21:22]

Oh, I didn't hear about anything like that. That would be amazing. No, what I'm hearing is like positive feedback when the bot posts about those blog posts because there are also like the bot goes back in time and then if the post is older than two years, it gets the tag oldie but goldie or oldie but goodie. I think I picked that one. And then you bring up old posts that might be outdated but still are so rich in value that people are reminded of those posts that someone wrote. So that's the feedback I mostly get.

Speaker 2 [21:57]

Another question jumped, give me a sec.

Speaker 1 [22:00]

I bear a lot.

Speaker 2 [22:01]

Thanks so much for sharing. What happens with blocks without an RSS feed?

Speaker 1 [22:01]

You have a lot. Yeah, so how the whole thing works with the awesome PyLadies repository, what I'm having is once you want to submit your blog or your YouTube channel or in the future the other things, you have a couple of different options. You can open an issue if you're not really sure what to do and there are automatic things. You can also open a direct pull request, and I'm reviewing those things, and I'm double-checking whether the RSS feed will work, and I had that in the past that it didn't work, so I'm figuring these things out with the people, and there are also a couple of instructions how to potentially add RSS feeds to your blog with the most common ones, but we'll figure it out. Let's put it like that, so no worries about this.

Speaker 2 [22:58]

Interesting question, I love the idea in executions as a comment and question. Thanks for the talk. Did you also consider applying the profanity checks to the reposted content itself?

Speaker 1 [23:07]

Oh yeah that's a good one. Didn't think about that yet because I mean it might be naive but I do have trust in community and I'm but yeah I mean like might make sense definitely yeah so because you never know whether someone's mind changes and you pick those or accepted those blocks at one point thinking it was good and then it isn't yeah.

Speaker 2 [23:33]

I think two questions came regarding the portraits, where did they came from?

Speaker 1 [23:40]

By the way, all those things here, they are not Gen-AI made. It's all me doing these things. So I'm using, for the portraits, I'm asking people for a reference picture, and I'm then using an app on the tablet to draw them.

Speaker 2 [24:00]

two related questions so the first one is is it possible to build a bot for LinkedIn and I think tied to that is how did you decide on the platforms the bot is posting to

Speaker 1 [24:10]

posting to yeah so LinkedIn that would be amazing that would be like I mean I'm posting the amazing women in tech serious there from my personal account but as far as I know it's not possible to post directly to LinkedIn and that basically answers the second part of the question so I pick those platforms based on availability based on automation possibilities

Speaker 2 [24:37]

Interesting one, what are the next steps to have more visibility for PyLadies?

Speaker 1 [24:45]

Me being here talking, no, like I think that's the way to go, right? Like you have to go out, you have to talk to people, you have to make them aware, you have to, I mean, like I'm seeing so many cool people from the community here, but also people who are probably not yet part of the community, so come over, hop to the booth, talk to us, we're here.

Speaker 2 [25:05]

Two last ones, so is the bot repo public? I cannot find it with the QR code.

Speaker 1 [25:10]

Yeah, I wished it was public. No, I wanted to do some kind of refactoring before I put it out there yet. It was planned for last month, then life happened in between. So hopefully, keep my fingers crossed, May-ish something, but then I'll put it also in the QR code and you will find it there.

Speaker 2 [25:33]

There's a question, I think, not entirely sure how it ties to the talk, but I'll allow it. So is there a collaboration between Pi ladies and feminist AI? Maybe also with regard to the talk.

Speaker 1 [25:42]

Oh, I think, I'm not a spokesperson here, so I can't say, like, make an official statement. I think there are informal connections, but probably not officially.

Speaker 2 [25:56]

Probably also, like, not really ties into the talk, but it's more general.

Speaker 1 [25:59]

No, no, but it's a good question, right? I can answer the question. The person who founded PyLadies... The person who founded PyLadies originally is running Feminist AI. Ah, easy. So here you have the connection.

Speaker 2 [26:15]

So thank you all for this session. Thanks, Cosima, again for this wonderful talk and for your nice slides. Yes, that's it from our side. Have a nice last day. COSIMA KOZIMAEVA- Thank you.

Cosima Meyer

Cosima Meyer is a data scientist with a strong focus on making machine learning models explainable and accessible. Passionate about trustworthy AI, she is committed to building systems that are not only technically robust but also transparent and ethical. As a Google's Women Techmakers Ambassador and an active member of PyLadies, Cosima is dedicated to fostering inclusive and collaborative communities, working to bridge the two groups and create spaces for knowledge-sharing and growth.

During her PhD studies at the University of Mannheim, Cosima discovered her enthusiasm for sharing knowledge through technical blog posts and developing open-source software. Her work reflects a blend of technical expertise and a passion for community building, inspiring others to explore, learn, and contribute to the fields of AI and data science.

Social card for talk: Code & Community: The Synergy of Community Building and Task Automation