Orientation with Kojo Idrissa
Published October 23, 2025
This video features Kojo Idrissa at DjangoCon US 2022 in San Diego, California, USA.
This talk was presented at: https://2022.djangocon.us/talks/lightning-talks/
LINKS:
Follow Kojo Idrissa 👇
On Twitter: https://twitter.com/kojoidrissa
On GitHub: https://github.com/kojoidrissa
Website: http://kojoidrissa.com/
Follow DjangCon US 👇
https://twitter.com/djangocon
Follow DEFNA 👇
https://twitter.com/defnado
https://www.defna.org/
The lightning talks cover several practical lessons and projects: Kojo Idrissa argues that developers do not need to understand everything immediately, and recommends staying focused, setting limits on research, and asking for help. Darcy Lee presents survey results about the Django community’s charitable and social-impact work, while another speaker explains the digital sector’s growing greenhouse-gas emissions and urges substantial annual reductions. Other speakers describe a StarCraft II player built with case-based reasoning, a thread-safety bug in Django cache usage with `pylibmc`, the open-source Aire Libre air-quality sensor network, and the trade-offs of microservice architecture. The final demonstrations show Django running in the browser through PyScript and WebAssembly, and a simple machine-learning model integrated into Django to classify documentation pages for privacy-conscious contextual advertising.
Summarised automatically from the transcript.
Automatically transcribed, so expect mistakes in names and technical terms.
Speaker 1: First time here, so Hope I don't faint. Alright, so today I want to talk about it's not it's okay to not know everything. What do I mean Now I can't go to next slide. One moment. Alright. Yeah. So we have all been this Uh in this kind of situation where we start off somewhere and hours later we're in the point like How did I get here? So last year I moved from a. NET world to Django. My first task was, I don't know, like um Just change the celery, uh split the celery cues, uh celery task into different cues. So
Speaker 1: eight hours in uh after a bunch of command b clicks and I'm looking at uh implementation for Django contrib art. How did I get there? Um so even Django cannot help with the deadlines if you're that kind of person. Um It's it's good to know like dig deeper into things, but you still have to find balance, right? So I tried to figure it out. Like why do I do this? And these are the three three things I think I get into that kind of situation. I like to get a bigger picture. And then like we are all curious beings, right? Like you there's a joy in
Speaker 1: trying to discover new things and when you have that aha moment. And then there's also the other aspect to it. Like um I get anxious if I don't know answer to everything. Like I feel like an imposter. So And I have been advised by many people that say things like, it's okay, you don't need to ev know everything. Just get to the point. Like Figure it out. You'll figure it out later. But I was always like, it's easy for you to na say it. You already know things. Like people usually I look up to say that. And then um I had this one uh incident recently that actually um helped put things uh like uh figure things out better.
Speaker 1: So that involves my little niece here. Um I know she's so cute. She's three year old and she's just discovering about relationships. So uh she calls me Chiki, like my si um my in my language it's aunt. So she goes, Chicky, you're my mom's sister. That's why you're Chiki. I'm like, yeah, that's right. So you and my mom are sisters. She's your sister, she's my sister. I mean uh you're her sister, but she's my mom and I'm not her mom. And it c she it was beautiful Watching her figure things out. Like she hate all these set theories like symmetric properties, all those things, right? I'm like as she's figuring this out, I'm like, oh
Speaker 1: my God Wait a minute, I've been through this and that didn't give me anxiety. We have all been through this learning process and we turned out okay. Like we know relationships now whenever we needed to know So that made me think, it's okay, even if I don't know today, like even if I don't know how everything works together. Like I don't know async, but someday I will when I need it. So some of the things I do um to tackle this problem I have, like Uh stay focused. Like eyes on the price. Like if you have a task, try to close the ticket. If you have time, great. Work on it later. And I
Speaker 1: Also set timers once every couple of hours if I find myself like deep down in some random topic that from so far away from where I started. The timer is a good kick to go back and ask someone. Like and I have this problem. Like the it might be ego or like being judged or whatever. But Being here last few days has taught me anything. Like everyone's so kind. So just ask people and learn to like go until you cannot. Anyway, so and also if anyone has any suggestions and if you have such s if you face similar struggles Please let me know how you do like how you deal with this.
Speaker 1: I would love to have a chat. Thank you
Speaker 2: So thanks to everyone who stopped by our booth or who filled out the survey online. We really appreciate that. So today I'm going to be sharing some of the results so far about our impact survey. So I've met many of you, but for those of you who I haven't met, I am Darcy Lee. I'm the VP of Strategic Growth and Partnerships at Six Feet Up. Our mission is to make the world a better place by accelerating tech leaders' impact. word impact a lot. Um this is my first DjangoCon, so it's been awesome. You guys are great. Had a lot of have had a really good time so far Um so as Calvin mentioned in his talk on Monday, our impactful mission um is to uh our clients focus on climate action, clean energy, and initiatives that benefit humankind. Um and we set to find out what you think is important. So here
Speaker 2: it is so far, you can see from the word cloud that what's important to you is climate change, inequality, education, energy, and water. So I'll leave that for just a second so we can take a look at it. So as Drew noted in yesterday's opening session, it's been increasingly challenging to find volunteers, and that's everything. From your kids' soccer team to volunteer all volunteer board of directors, which I also sit on, so I hear the struggle. Um I was thrilled to read the results and see how each and every one of the people who responded to the survey are giving time, talent, and treasure to make an impact. So please keep volunteering, keep donating your time and your talents to make the world a better place. At Six Feet Up, we're committed to completing 10 impactful projects defined as projects that are impressive, purposeful.
Speaker 2: and transformative by twenty twenty five and so far we've had the privilege of working on five impactful projects from space exploration, lightning strike predictions, forest fire management, genetic engineering, and battery energy battery energy storage. So we're on we're well on our way to achieving that goal and my goal is to completely blow that out of the water and surpass that. We also joined Pledge 1%. We've been supporting Kiva for several years, so we've granted over 800 loans and lent more than $22,000. Carol is on the Django Foundation board. We serve on the Plone Foundation board. Carol and I serve on the Women in High Tech board to support women in STEM. And as technologists, you have the opportunity. To find solutions for complex challenges, and Django has the superpower to meet that need. I challenge you to be intentional about the projects that you work on and using technology for good and being impactful.
Speaker 2: So Um, so which organizations do you think are impactful? We telled your results, and so far, um no surprise, really. But so far, Django Software Foundation and Python Software Foundation are the most mentioned organizations. So you do have the ability to change these results. So we are going to be continuing to leave the survey open so that you can complete it. We will announce the winners of the three M4 devices at three o'clock, but we would still love to hear from you. Let's see. So here you go. There it is. Take please take the survey. Um visit our booth. You can scan the QR code, take it on your own. You can also take it at our booth or you can take it online at sixfeedup. com slash impact survey.
Speaker 2: And so in addition, we'll be donating $200 to the most impactful uh the organization most mentioned. Um let's see So anybody online and in person is invited to participate. Like I said, at three o'clock today, we're gonna give away the final device and we'll tally the final results, which um we'll share in Slack. So in conclusion, whoa, I totally skipped down. In conclusion , with this being the final day of the conference, I'd love to hear the impact that you're making as well. So if you're here in person and you'd like to chat, feel free to come and visit the booth. And for those of you at home, you can find me on Slack at Darcy Lee. So thanks for everything you're doing to make the world a better place. I've heard some really great stories, and I know that I can tell we all really care. So let's use our talents
Speaker 2: to make the world a better place together. Thank you.
Speaker 3: So do we have an impact on climate changes? Unfortunately I'm not going to fix it for you. It's uh you are going to fix it for yourself So to answer the question it has been answered over and over and over. This is the first or at least one of the opening sentences in the last IPCC report. that explains that human influence has warmed the atmosphere, ocean and land. And this is happening at a very, very rapid pace. I would encourage you to read the summary for Policymaker. It's kind of a a bit of an impressive document, but it's only a few thousand pages. And you can find it uh at IPCC Report. There is three that has been published this year. The first thing to understand is
Speaker 3: actually the greenhouse gases emission is very very inequal and uh it depends per region and also per I'm going to remove this Much better. The richer you are, you the more you are emitting. And this graph is showing that for example in North America, you emit twice as much if you are in the top ten percent of income. than top ten percent of income in Europe, which at that uh at that turn emits three times more than people in Asia and Southeast Asia What about us in the digital world? It's often referred as the seven continents.
Speaker 3: It turned out that we are emitting four percent of the total greenhouse gases emission. And it's Two to three times uh what a country like France would emit. Four percent you are going to tell me it's not that much. The problem it's increasing, it's increasing at a breakneck pace. It has actually tripled in the last 15 years. And you need to notice that for IoT devices, it has been multiplied by 48 in the last 15 years. Where is this uh greenhouse gas is coming from? This is an ordered list. So it's coming first of all from the phone, laptop, watch, and any other IoT devices or devices that you have at your home. due to the manufacturing and then it's power consumption. Power consumption of the equipment, network and data center.
Speaker 3: Why power consumption? Is because when you actually produce electricity you often burn fossil energy and uh for a country like uh china every kilowatt hour is generating 541 gram of CO2 for a country like USA, it's 358, and then there is country which are lower in terms of carbon intensity I pick up France which is fifty eight grams of CO two per kilowatt hour, but basically you need to it depends. And In order to get an impression of what a website can emit, you can directly install a plugin extension that is called Green IT that will tell you the level of uh greenhouse gases emitted by a website. So this one is two
Speaker 3: grams of CO2. Two grams. Is that a lot? I don't know. You will tell me. So this website is 110 million page view a year That turned out to be 327 flight party Los Angeles for an individual. So not neutral. How much do my data center emit? It should be easy because most of the cloud provider provide a report. Carbon footprint reports. Turn out that these reports are often useless or full of greenwashing displaced information that you cannot do much with. Hopefully it's going to improve. But what do we want to do? Because we want to reduce uh greenhouse gases, right? Especially if we want to respect uh two degree or not to exceed two
Speaker 3: degrees of increase and I'm going to tell you that two degree is already a lot. But if we want to stay below two degrees that means we need to decrease number of emissions by five percent every year Turn out that five percent is actually what we did in the past uh during COVID the COVID year. So you need to do an addition an effort equivalent to an additional COVID every single year And there is a direct linear relationship between the temperature and the quantity of CO2 in the atmosphere. So if we don't want to overshoot this Two degree which is a lot and why it's a lot because between now the temperature between now and what it was between the last glacial area the only difference in temperature was five degrees
Speaker 3: So please work on decreasing the greenhouse gases emission of five degrees per year on whatever you are doing, and if you can exceed it, it's fantastic. Thank you very much
Speaker 4: This is my first time here. So I'm gonna talk about the development of an artificial player for StarCraft II using case-based reasoning A little bit about me. I'm from Uruguay. I'm a full stack developer at Octobot. I'm also a teaching assistant at Catholic University of Uruguay. I'm a big soccer fan too Uh about Starcraft 2 is a real-time strategy game where your objective is to defeat your enemy, building units and buildings, and you have like three important factions that you can choose to play with like Terran, Produce and Thur. The objectives of this project of this project were to develop the artificial player to defeat the easy level AI from Blizzard
Speaker 4: and evaluate the results to see whether the vote is good or not. A little bit about the structure. We have built three repos. The first one called SC2 Wrapper that wraps an API that Blizzard launched in 2017, I think. And it serves as a way of communication with StarCraft too and also exchange messages to obtain observations. Then we created another repo called Overmind that um that is for the logic. That has the logic for distribution of tasks and contains the other replace information that are like games from StarCraft in JSON.
Speaker 4: And we built an admin in Django in order to see that information. Then we created another repo called Overlord that processes receive tasks and delivers results. Just that. And the tasks are classify, process, and play. Here we have the overall structure, but I won't dig too much into it into that, so you can stop the YouTube video later. I'm gonna talk about now about um case-based reasoning. It's very simple. You receive like your situation, your new case. you have a case base and you compare that situation with the most similar case, then you reuse it. uh you have a proposed solution, you revise it, then you have the confirmed solution
Speaker 4: and then you retain that case and that process all over again. This is our case component. It has different attributes, the observation that will I will talk about it later. uh the games played, won lost, and the actions, the list of actions in this situation. Such as move attack train. Here is the observation object that has the game loop, that is the moment in the game, the player resources, minerals, spin gas, supplies, the units, and upgrades by active player. We use this distance equation. We have this tumorals
Speaker 4: function that converts attributes. and that received attributes and the quantity are converted to minerals and we compare the case and the situation and we do those operations. We used Persons G-Square test with the new hypothesis. There are no differences between absurd and uniform distributions of won and lost games, and the significance is 5%. The draws and not finished games are excluded and if null hypothesis is rejected and wins are over 50%, we will say that the severe bot is better than the opponent. So here are some results, but
Speaker 4: um if you if you see the last column you can see that the win ratio is over 50% and the games and the P that is the significance is over the significance that is 5% So the conclusions, the conclusions for for these projects were that it's possible to develop a competent Artificial player with CBR and this bot doesn't have a good strategy because it always does immediate actions and don't think on long-term goals So I want to thank Marcelo Mandirola, Marcelo Sigardi and Leonardo Val who played a big role in this project
Speaker 4: too. Thank you.
Speaker 5: Hi, I will tell about the a bug that I found on Django that Jungle Cache was not read safe and it was a cool fighting that I had It started when I tried to run WISGI with multiple threads, so I used two threads to start. It's to use better our server resource. And that started some big issues like that. That's a main cache failing. I have no idea why. So It looks like it's related with Django decorator cache, cache page.
Speaker 5: So I started looking for How can I debug that? So Django has the two things. He has a cache and a cache options to use so if you you you call cache and get ever anything there it's okay because it's a connection proxy and it It don't hold a a connection, it it it knows how to change threads there. But when you do that, you're Getting the default cache that's the same one I was getting in the other way. And it it holds a connection. And when I call this full
Speaker 5: function I'm reusing the same connection and it it's not red safe because my Pylibmc is a C implementation and it fails because it it's not expected to be thread safe. Django that fix that, handles that. And doc junk docs are awesome. The solution is there. So I I learned it after everything failed. If you call the the caches in the same thread, it will use the same connection and things are good. If I do what I was doing here, I'm calling caches default in one
Speaker 5: Trad and after that I reuse the same connection it fails. So the right way to do that is this one. And okay, great, that's easy. I can do that. I don't need to change anything. I just just to f just need to follow docs and looks easy, but not that easy. After I understand the problem, I found jungle cashback was doing it wrong. Here is their initialize implementation so they start the their main some singleton
Speaker 5: holding a catch The way we s we learn it doesn't work. So I can fix it. I s I fixed my my junk cashback fork for junk cashback is an awesome leap from octopus guys, so I really like that. I I fixed my fork and I forg forgot to send the a pull request to then. I sent it yesterday. Sorry. Oh Hector is there. Uh so okay now it well okay it's here. So I I fixed that, I I tried again, and I discovered that
Speaker 5: Cash page failed for some reason and that that's it. It's trying to get a key broken key. I I have no idea. It's Totally broken. So I keep digging the jungle codes and I found update cache mirror. Do the same thing. We hold the connect the the default cache there or any cache you define for cache mid or alias and after that we use that everywhere. This is a bug that exists since 2010. Russell implemented it in the first uh cache back end for Pylib Mc.
Speaker 5: And it exists since Django 1. 3. Uh we have that awesome docs. The docs are from 2014. And cashback decorator was never thread safe when you you use of uh Pylibm C implementation. And it works for Python cache implementations because GIL save us all the time. I don't have time to try it. I fix it the it's fixed for 4. 1. There you go. And I have uh you can try that, you just have to Download this repository
Speaker 5: and run it.
Speaker 6: Okay, uh today I'm going to talk about uh this project called Aire Libre. And this like if you were in my previous talk that that project was born in a pla from a place of love, this project was born from a place of spite. So this I'm going to and I'm going to get there. Okay, motivation. First the you know the the official motivation Uh you know like uh in Paraguay and in many countries you have like forest fire, large clandestine emissions, garbage burning and insufficient control from the government. At least that is in back home. And also you have like, you know, this is uh IQR that is a website to monitor the air quality.
Speaker 6: And as you can see, Paraguay doesn't have any sensors there. So that was the other uh motivation. And basically we needed to uh answer this question is healthier to go for a run or to stay at home Because if the air quality is really bad probably is best staying at home. So what is Aire Libre? Aire Libre is a community that we are concerned about the health and quality of our life and a network of sensors. Uh what differentiate us from other initiatives? So now is the the time that I'm going to speak about the spike So there was this initiative that this guy did an amazing job
Speaker 6: uh putting a network of sensors. But uh everybody wants to help and he didn't want to help and he wants to sell their sensor for five thousand dollars or something. and that didn't sound right. Later we found out that the guide was trying to gain a government contract for this So we say we decide to ruin uh his plans. So uh so we created like totally the opposite, like a community that uh use open data. Everything is open source because this guy was like more a fan of copyright than Oracle legal department, so we did the opposite.
Speaker 6: So I'm going to talk about a little about the hardware. We use uh a high precision laser dash sensor that in AliExpress costs something like 16 dollars. Uh yeah, sixteen dollars and the ESP eighty to sixty-six uh chip that is it cost two dollars or something and the total cost basically it's twenty-three dollars The firmware is also open source. It's there. You just plug into the into the wall and it uh get you get an uh wifi network to configure to uh everything all the settings And
Speaker 6: yeah, and basically it's so easy to you know to uh so to solve this and if you have never uh did any soldering it's the most entertained way to get a second grade uh burn so I totally recommend. Uh well this is the graphic try to explain how it works. The sensors uh send the information to the backend and the apps uh get the information from the backend We have like a many many projects. We have like the backend, the firmware, TwitterBot, and Android app. Like ever ev and yeah, I'm going to show the links after that. Well the back end uh it's called uh
Speaker 6: Linka, it's a web survey for data collection. And it has the documentation there and the And the Ripple, uh it's made on uh with fast API, not Django, sorry. And yeah, Linka because she was the planeteer of the wind. So the the website is uh aire libre like with dot re uh funny thing about um If you're going to buy uh this kind of domain, uh it's going to cost you more because uh if you're not a citizen of the uh European Union. So uh this is the website. Um we have like a lot of sensors and we also have dark mode in the in the website. Woohoo! Uh we have a bot.
Speaker 6: And yeah, that tweets the air quality. This is the sensor and this is the sensor working basically. It's really simple. So uh this is a telegram group if you want to join us or if you want to create something similar, uh you are more than welcome. Thank you. Thank you
Speaker 7: So uh microservice. They've been around for quite a while, and hopefully some of you guys are on a project maybe to convert one of your monoliths to it right now Or better still, uh maybe you are thinking about doing your next big project with it. Well, I got some news for you. It sucks. May maybe. Maybe. Hold on, hold on. Uh what's a microsurface? I think that is part of the problem, right? There's so many different definitions. This is the one that I like. A microservice has to be independently releasable. That means if you make a change, right, in def, in staging, push it out of production, it just works the rest of your app, the rest of your team.
Speaker 7: Doesn't have to worry about it. So um when I poll my team to say, hey, what are the pain points? I get a long list. And today I'm only going to show you three of them. The first one is where's the model when I need it? Right. A microservice by definition uh encapsulate its own data. So the datas are separated, so you cannot easily join. a model to another one across the surface. So that is a pain. And the question to ask at that point is how clean is my are my data boundaries and my surface boundaries? Problem number two, this is a good one, is you know, I'm working on microservice A, A
Speaker 7: uses B, so I've got a pull down. You know, service A, which has three containers, and then service B has four, and next thing you know, my Mac is kind of calling to halt. It is painful. The question I ask you is, do you really need to do that all the time? Last one. So kind of similar to the the the one before, right? By definition, services use each other's by API. So if I'm working on service A, everything seems to work in development, heard that before, right? Get it to production, it doesn't work because somebody else changed the API without me knowing about it So question to ask, why aren't the APIs backwards compatible? Are they versions? So there are ways around this.
Speaker 7: So does microservice architecture suck? I I really wouldn't say that, right? Maybe it is hard to do, which I hope you guys agree. But at the same time, it has a lot of benefits. So there is an equally long list of benefits. A couple that I think are important. Is that by definition, right, we're working on smaller independent but independent units. That means we can make changes faster and ship things faster. And this is the one that if you need to sell it to your managers, your CXOs, right, this is the one that gets the most attention. Second, this is a mildly controversial one. Testing is in a way hard in microservice, but it
Speaker 7: also is easier as long as you change your mindset as to how you test them. So to me, that is a benefit. And then lastly, it is a maybe a byproduct of using microservice. Your teams then tend to get more and more decentralized. They work more autonomously over time. And I hope you agree that autonomous teams means Easier teams and happier developers, right? So I think that is actually a a really good byproduct of uh running things that way. So again, I don't think it sucks. It's hard for sure, but to get around it, you just need to think differently. Right? You have a different mindset when you're working with microservices
Speaker 7: Some of the things that you may want to think about, up front, definitely invest time in defining your service boundaries. It's not easy. You're gonna be wrong, but do it anyway. Data sharing, you if you really look at it, you don't really have to share the entire model at the same time. So look at that carefully. And then last one is APIs, they're hard, version them, make sure they're backwards compatible. So as you know by now, I am a proponent of this. By sharing this stuff, hopefully you will kind of understand that it is hard. Don't give up, keep going. My contact info is up here. And uh love to talk with you m about it. And I made it. Well done, PK. Well done.
Speaker 7: Um
Speaker 8: hello everyone. Yeah, my name is Patrick and today I want to show a project that me and Will did. Last DjangoCon Europe, like a month ago, during the sprint. But yeah, just let me recap what what we did. So in I think in May, uh Anaconda released This cool tool is called PyScript, which allows you to run Python in the browser quite quickly. So you put a tag and then you can run Python. And it's very nice. And under Dode, it's using tool called Pyudai, which is a port of C Python. WebAssembly. WebAssembly technology that allows you to run kind of multiple languages on the browser. It's a bit complicated. I don't really understand how it works, but it's very cool. And there's been quite a few projects that have been using WebAssembly, especially in the Python world. So for example, there is data settled by uh
Speaker 8: Someone willison um which is um you know it's a way to run data set on on the browser so you don't have to install everything, which is really nice. Uh I've been doing this also for a very cool library that I use quite often. She's called diagrams, allows you to create diagram using this. This nice Python syntax so you can do whatever you want and update the diagram here. Um I've done the same for Surbre 's Gavka library. I I used to have a lot of bug reports and this has been a good way to kind of test things without installing everything from scratch. So for example here you can change the the code and should update. Now it's not updating for some reason but I think um That's fine. Uh but yeah, we um we'll we're just looking uh at the convent and say, oh it would be cool to see if we can get this. you know working with Django
Speaker 8: and you know turns out it's possible uh there's a bit of axe running but you can run a lot of things you can run uh the migrations, you can run post requests, you can run you know just persistent data as well. So for example here I'm you know I just have a hello world page uh if I want to change and I want to go to the home page you know I can change it updates uh very quickly um and you can see there is like this form with to do so I can do uh talk at jungle coming And I can add it. This is doing a post request and it's saving. If I refresh, um give a couple of seconds to to load. Um takes a bit of time at the beginning, but then once Pyodat is loaded. uh should work. Um hopefully this doesn't crash now.
Speaker 8: Um I um let's see. Maybe the Wi-Fi is not going well I don't have a way to run migration directly, so I Doing this on the view, which is no ideal, but you know works. So this you know it's running the the migration files, then I can you know can run it like this. Uh runs the migration, and you can see there is the data here as well. And yeah, that's it. There is a repo. If you want to test this out, this kind of current version is an open request because I did a lot of changes. Hopefully I'm gonna merge it today
Speaker 8: or during the sprint. Yeah, if you wanna you know just try it out and it could be a cool way to maybe test Django without installing everything. Um that's it. Thank you.
Speaker 5: Yay. Okay. Uh hello, I'm David. Uh I'm going to talk to you about introducing an ML model to Django, or introducing Django to your ML model. Um and and basically I I should say this, I didn't know very much about ML. I work at Read the Docs, that's uh I'm not really on social media that much, you can just email me.
Speaker 8: My background is in development, it is not in data science. So I
Speaker 7: I've never built an ML model, didn't know that much about ML models, still kinda don't know that much about ML models. Um
Speaker 6: but I I I work mostly on advertising. So uh that don't throw things at me, you know, I'm nice um or I I try to be. But uh that that that's sort of me. So as I scroll down, which I can't actually see.
Speaker 8: So basically I read the docs, ads pay the bills at read the docs. Uh, you know, that that's that's the reality of the situation.
Speaker 7: We built a Django-powered ad server to power the ads that read the docs, and we wanted to do ads that respected your privacy rather than ads that just Aren't yet illegal.
Speaker 8: So we we built our own ad network, we do our own ad sales. And in the biz, this is contextually targeted ads. This means we target ads not to people, we target ads to the content where the ad is going to appear. So, you know, if you have a Django webpage, you might see an ad related to Django.
Speaker 7: Makes sense, and advertisers will buy this. So this is this is sort of how it works. Now uh so basically you have this situation where you you have a a web page and you want to figure out what is this web page about. You want to distill this web page down into its Topics. What is this thing all about? And so you know you might take the Django documentation and say, oh, this is about Django and it's about Python and it's about back-end web development and stuff like that. Um so uh at first we did something very naive, we just sort of the counted keywords that appeared on web pages and stuff like that. And this worked okay, but you know, as you get to lots of things, this doesn't scale very well. It doesn't perform very well. There's lots of false positives. How do you tell the difference between Jane and Django the musician and Django the the web framework.
Speaker 7: So we decided to build a uh an ML model for this. So we started with a library called um
Speaker 8: Spacey.
Speaker 7: which is a python library for for text-based models. There are lots of things for other for other types of models. You should start with one of those. You can try this out at this link actually. You can just sort of of type in text. It was trained on high hundreds of documents that were manually classified
Speaker 6: from Read the Docs.
Speaker 7: And we just sort of said, okay, you know, this web page is about data science and this one's about, you know, this and this one's about
Speaker 8: about this other thing. And uh and eventually you get something that's pretty good. These ML models will just sort of figure out, hey, you know, this is Django the musician.
Speaker 7: Actually we didn't we don't all of it when we use Django, it's definitely not the musician, it's always developers because we only do ads for developers. But you get the picture. It can sort of try to figure out these different things and figure out what
Speaker 8: what you know
Speaker 6: what this ad should be targeted. towards. So you can you can actually give this a try and if you put in hundreds of words
Speaker 8: it will and it's about developers, it will usually work. If you throw at something that is not about developers at all, it will probably be horribly confused.
Speaker 7: But you can at least try it.
Speaker 8: It's kind of interesting. So I my suggestion is to start very simple. We started with, again, I mentioned a library called Spacey, and Textasy is sort of a library to help out with pre and post-processing for SpaceC Spacey. Basically, you you manually tag a bunch of data and you can train your data set and you will get a pip installable Python module that you can just load and and run. It's kind of powerful.
Speaker 7: In this case, we're we're loading it in a pipeline rather than directly, but you can just sort of pre-process things, train your model, run it against some categories, and it will give you an output. output. So in 10 lines of code, you you have something that that vaguely works. Very cool. So this was this was very interesting and actually was much better than what we were doing before. We actually have ways to like measure how effective it is
Speaker 6: I'm not saying it's the best it could be, but it's better than what we had before by a large margin. There's a lot of consig
Speaker 7: considerations if you're doing ML. Firstly, is ML appropriate to your problem? A very good like heuristic for this is
Speaker 8: If you are doing something that has a probabilistic outcome, ML might be great for this. So, you know, are you detecting is this maybe fraud? Is this maybe about this? These kinds of problems machine learning is typically pretty good at. Whether you should train your own model or use something off the shelf is another is another thing that you should consider. We ended up training one.
Speaker 7: We started off the shelf. It got better when we trained our own. Um be very careful with with memory in in this. You know, you're probably running eight processes in G
Speaker 8: Unicorn or something like that. Uh you know, when you start talking about high hundreds of megabytes or gigabytes of memory and you're forking eight processes, it's a disaster. So be very careful. That is the end of my talk. It's dangerous. Here are some resources.
Speaker 7: Good luck. Sprinkle some ML into your Django. Thank you, David.
Yes. You can learn things when you need them; the important balance is to stay focused on the task, avoid getting lost in unrelated details, and ask others for help when necessary.
Discussed at 0:21Focus on completing the current task, set a timer to interrupt deep dives, and return to the ticket or ask someone for guidance when you have gone too far off track.
Discussed at 3:24The speaker estimates that digital technology accounts for about 4% of global greenhouse-gas emissions—roughly two to three times France’s emissions—and says the amount has tripled in 15 years.
Discussed at 10:27They come first from manufacturing phones, laptops, watches, IoT devices, and other equipment, followed by electricity used by the equipment, networks, and data centers.
Discussed at 10:27The speaker recommends using the Green IT browser extension to estimate a site’s emissions. As an example, a site emitting two grams of CO₂ per page view with 110 million annual views was compared to about 327 round-trip flights between Los Angeles and Paris.
Discussed at 11:59Emissions need to fall by about 5% every year. The speaker compares that annual reduction to repeating the emissions reduction achieved during COVID every year.
Discussed at 12:45Yes. The project produced a bot that beat StarCraft II’s easy-level AI in testing, with a win rate above 50% and statistically significant results, although it lacked long-term strategy.
Discussed at 17:42The problem occurs because code can retain and reuse the same cache connection across threads, while PyLibMC’s C implementation is not thread-safe. Django’s cache proxy handles thread-specific connections correctly, but directly retaining a cache backend or singleton does not.
Discussed at 18:18The fix was applied to the relevant cache handling and released for Django 4.1. The speaker also fixed the related django-cacheback code and provided a repository that can be used to reproduce or test the issue.
Discussed at 23:05The sensor uses a high-precision laser dust sensor costing about $16 and an ESP8266 chip costing about $2, for a total hardware cost of roughly $23. Its firmware is open source and the device sends readings to a backend over Wi-Fi.
Discussed at 26:12Common problems include not being able to join models across independently owned data, having to run many dependent containers locally, and production failures caused by APIs changing unexpectedly. These problems point to the need for clean service boundaries, careful data sharing, and versioned, backward-compatible APIs.
Discussed at 29:35Independently releasable services can let teams change and ship software faster. Microservices can also make testing easier with the right mindset and encourage more autonomous teams.
Discussed at 31:08Yes. The project demonstrated Django running in the browser with PyScript/Pyodide, including migrations, POST requests, persistent data, and interactive page updates, though initial loading takes some time.
Discussed at 35:02Start with a simple problem and manually labeled data, then train a model with a Python library such as spaCy and package it as an installable module that Django can load and run. The speaker’s team used this approach to classify web-page topics for contextual advertising.
Discussed at 38:57Machine learning is a good fit for problems with probabilistic outcomes, such as determining whether something is fraudulent or belongs to a particular category. You should also decide whether an existing model is sufficient or whether training your own will improve results.
Discussed at 40:50Memory usage is a major concern: loading a model into multiple Gunicorn processes can multiply consumption, especially when models require hundreds of megabytes or gigabytes. The speaker recommends accounting for this before deploying.
Discussed at 41:29Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 14, 2026