 I just added in the Miniswan slide here because I was talking to someone maybe about an hour ago and they hadn't heard of Miniswan and I think I'm still a little sad about what happened on Tuesday and so I think maybe talking about Miniswan briefly will be cathartic. So what Miniswan is, if you're not familiar, that's a rendering of Matz. Matz said he created the Ruby language to make developers happy and so that turned into this happy feeling in our community and back in the early days on the email lists before forms and stuff, if someone was kind of getting out in line and being a turd, people would be like, hey, hey, Miniswan, Miniswan and like what Miniswan means is Matz is nice and so we are nice and it's just this, I feel this is one of our best tenants of our community and like my local Ruby group, we make these Miniswan stickers and so if you want one come up after, I'd love to give you one. But today I'm going to be talking about Ruby, Red Pandas and you. I misjudged how many people were going to be here, so I really like this community. I'm Sean by the way, I love this community, this Ruby community and I love RubyConf, it's probably my favorite conference. It's hard to believe that it's been years since San Antonio, I feel it just happened and it's had me reflecting on what's happened in the past year, since last November, last year, I guess the thing that jumps to my mind, the big thing in the last year is that we've had an election, we have a new world leader, someone who's out there representing all that's best about us and what a country can be. Like someone I'm personally very, very proud we elected. You know, obviously I'm talking about Justin Trudeau in Canada. So a lot of people ask me about this picture and being from Saskatchewan, Canada, the reason I'm so happy here in this picture is being from Saskatchewan, it's my life goal to capture a Sasquatch. And I thought I had captured the rarest of all Sasquatches, the Albino Sasquatch, but it turns out it was just a Yeti, so. So about me, I'm Sean, I'm the creator, organizer of Ruby for Good. Love dogs, figuratively, Canadian, work for the government. And I'm not a big fan of public speaking, but my wife gave me some really good advice, she said, you know, Sean, don't worry, you're gonna be fine, just go up there, be your regular charming, enhance yourself. And yeah, see, I'm just thinking the exact same thing. So today I'm gonna talk, I'm gonna talk a little bit about bees, because a lot of people know me as the bee person. I'm gonna talk about red pandas, how I solve this red panda problem. I'm gonna hopefully inspire some of you guys to get involved in a similar thing. So if you're not familiar with the bee thing, I was helping this professor who's studying colony collapse disorder, monitor beehives using Ruby and Raspberry Pis. And he was hoping to get information on a beehive before it collapsed. Unfortunately, we weren't able to, none of the beehives collapsed. Well, we were monitoring them, so which seems good for the bees. And I told them, well, we should just monitor every beehive in the world, and then none will collapse. But he's from Columbia, and maybe it didn't translate right. He just said, no, no, that won't work. But the bees are in trouble. They've just, eight species just moved to the endangered species list. And so it would seem like that all this bee stuff is a failure. But I think there's some good that's happened. I want to introduce you all to Taylor. This is Taylor when I met her. This is, she was in the ninth grade. And I took her for a tour around George Mason University and showed her around. And then she just got inspired. She went back to her high school and her parents, and she got a beehive. And now she has nine beehives, and she's leading in clubs. And how awesome that is. She just got a $2,500 grant to spread research. It's just amazing. And I know this because Taylor's mom got in contact with me and told me that all this has happened and she's applying to colleges and she's writing about this and that this was all this beast that was an inspiration for her. So I really think that maybe while the project was a failure, that this amazing young woman is going to maybe solve the problem for the future. So I'm very optimistic. But I know everyone here, you guys don't care about the bees. You're waiting to see cute little pictures of red pandas. So let's talk about red pandas. I got introduced to, well, we've all seen pictures, but my first introduction to them was really when I read this article from New York Times. I was reading this article, telling me about what's going on. And it turned out that the lady who was all featured in this article and all the pictures in this researcher, she works at George Mason University, where I worked. And so I went and found her. Her name is Elizabeth Freeman. And I asked her, hey, how can I help with your research? Cuz really, I'm thinking in my head, I wanna go see a red panda. And I wanna steal a red panda. But and so we got talking and she told me a lot of really neat things about red pandas that I'm gonna share a few of them with you now. But the most important thing, if you only take one thing away from this talk about red pandas, know this, they're delicious. Okay, obviously it's a joke. So what is a red panda? This is not a red panda, this is a giant panda. But red pandas are actually the original panda. They were discovered, I guess discovered, I don't know if that's the right word. 50 years before the giant red pandas. And they're not related to them at all. They're not related to bears. They're distantly related to raccoons and weasels and skunks. But they broke out on their own branch about 29 million years ago. And they're actually something that's interesting about them, they're carnivores. They're not, even though they eat bamboo and they've evolved to eat bamboo. They are still carnivores. And they're found throughout in the Himalayas region. They're in Nepal, China, Sichuan, Yunnan, Bhutan, and there's two subspecies of them. And like I said, they are carnivores and they live in this really unique area. They're about 2,000 to 5,000 meters. And if you're, I guess, American multiply that by about 3.25 to get feet. They live on these slopes. They primarily eat bamboo, but like I said, they are carnivores, so they'll eat animals if they can. They'll eat birds, they'll eat insects, and they're just so cute. And like I said, they have this really slow metabolism and they have the inside of a carnivore. So what that means is like they have the single pouch stomach, they have the really short colon, and they have the big teeth and they have like a large range that they inhabit because like they can only eat those bamboo shoots and so they kind of like little farm areas of bamboo over the place. But one of the problems with them, like compared to other animals in carnivores their size, they're really slow to mature like sexually. It's about twice as long. Their gestation periods are about twice as long as well, like between 90 and 160 days, and they have a very small litter of cubs. And they suspect that some of the reasons why they, like their gestation period is so long is because it's because of their metabolism, possibly delayed implantation or embryonic dive haws. And like officially they're listed as endangered. About 50% of the population is in decline, or they've had a 50% population decline in the last three generations. And this is a consistent trend, like it's not reversing. And the total population in the world is less than 10,000, they suspect. And in captivity there's between about eight and 900. And basically like humans, like we're the reason they're disappearing, like they're either being poached, or like the people who live in these areas, they're getting by on very little, like they're very extreme areas, so they're cutting down the forest, or they're hunting dogs or invading their dens. And so it's, or they're even, like you see the lady with the hat, Elizabeth, when she was over there, she saw people wearing these hats, and actually in Yunnan province of China, there's a, it's considered good luck to give a wedding gift of an article of clothing with a red panda fur on it. And there's also a problem in captivity with red pandas, like over half the cubs born in captivity, they die within the first year. Like 20% of them, like they don't even know why they die, they're just still born or they die. The other ones, you know, maybe it's poor maternal care, internal cannibalism, maybe they are delicious, or pneumonia, or other factors. And so like they really need research into this to determine what's, like what's happening. And because like I said, like they are really unique, like they, like they are their own branch, like, like they're the Allure Day family. And so like to give an equivalent of that, like that's the same, like they have as much genetic diversity or information as felines, like all felines. So like that's lions and tigers and cats in your house. And so if we lose them, that's a lot of information we're losing. But how the researchers are getting this information to try and address a problem is through nest box cameras. And so like they've set up nest boxes and that's where a red panda lives in the wild as a nest. And so they're trying to mimic that. And they've put all these cameras in there to really learn about its first part of life. And like this is an example of a nest box. And like the information they try and get from this is like how do mothers and cubs interact, what happens after a cub is born. And then also like in subsequent generations, how do the female cubs, do they learn something from the mothers and behavior. And so we see she's making the nest here and checking stuff out and she's about to give birth. And so, and when they're born they're just, they're kind of like, oh, there's one. But it's not just this too, like there's some side information that they're trying to get from this as well. Like pandas suffer from a parasite and they don't know how this parasite is getting into captive panda populations. And they're also hoping by studying this, maybe they can see maybe if there's a vector from this. And there's just like little blobs of butter after they're born. And so then you also see how mothers and cubs interact. And so like I was saying, just so cute. So like I said, there is a parasite that's affecting them. And they don't know how this parasite's getting in and it causes encephalitis. And so like if you do a Google search for encephalitis and red panda, you'll see articles like this and like this. And but they don't call it encephalitis among the researchers. They call it panda cancer. And that really bothers me because I feel like that's just such a cute name. Like can't we give it, can't we call it like evil cancer or nasty cancer? Something that really denotes how horrible it is, like Trump cancer or. I'm sorry, I promise no Trump jokes. Damn. So with regards to the nest box. So they have these DVRs, they're recording all this video. And this is what Elizabeth really wanted me to help with. So they record hundreds and hundreds of hours of video. And but the problem is is like for every 12 hours they record, maybe there's only a panda on the video for three hours. And so right now what happens is a human sits down, they watch the video for the 12 hours and maybe they fast forward a bit. And they have to mark okay for minute 68 to 122. There's a red panda on camera, then minute 228 to 340. There's red pandas on camera. And this is really, really time consuming for them and their resources. And these are PhDs and doctoral researchers, like putting their time towards trying to watch videos. And the time we've better spent trying to help red pandas. And so I said, well, I'll figure that out. And just started to emphasize the problem here. We had these giant videos, they were all between six and 12 hours long. And all the videos were huge. They're like one plus gigabytes. And we also had international people using this. Like Elizabeth works with people in China and actually some in Cincinnati. I guess they're not international. But like people all over the world, like I guess the red panic means pretty small and tight knit. And so like I thought, okay, how can I solve this? I need to approach this problem. I'm a software engineer. What would a software engineer do? Bam. So I guess there wasn't an easy answer or no one else has done this before. And so, okay, how about I just break this down into small pieces? I can do that. This isn't overwhelming, seemed really overwhelming. But okay, what's the first part? Well, I just need to upload the files onto a server. Okay, I can do that. And I did, I just used the paperclip gem and the jQuery file upload. And the reason those two gems is because they're both easy. I've worked with them before. And the great thing about the jQuery gem is it allows a resuming of uploads. And this was very important because like I said, we had people in China and so I didn't want someone from China uploading a video that's multiple gigabytes get 90% of the way done and they lose their connection and start all over because they pay like some of their people pay by the 20 megabytes, so and there was one gotcha. I was having a problem with upload size and I thought it was a paperclip error. Turned out to be nginx comes with the default configuration says 20 megabytes. So if you just, if you're ever in this situation, change your upload max file size to zero and it'll have unlimited. So now, okay, now we need to identify the Panasonic video. Got the first half done, second half has got to be just as easy. So, and but I had no idea how to do this. And so I started asking friends and my good friend, Josh, he was the CTO of Aptoro and so I'm mentioning him. I'm sure they're probably hiring, so go work at Aptoro. But he said, you need to use a machine learning and a neural network. I know all those words, but I don't know what any of them mean. And so I started to do some research and like, okay, I understand this. But it really turns out that analyzing video is not an option. I found a couple services that would even do video. The first 30 seconds were fairly cheap, but then after that it's exponentially expensive and if they're 12 hours long, it wasn't possible. And again, we're trying to save these researchers money. But it turns out that analyzing pictures with a neural network is extremely easy. And so, okay, all I need to do then is convert a video to images. And it turns out like that's all a video is, is a series of images. And if you're ever, as a kid, had one of those books where you flip through it and see the horse running or something. So it's okay, I can do this. So how do I convert it? I found the FF MPEG tool and so I just put that in and sliced it up. But first thing, another little gotcha, most video is like 30 frames per second. And so it turned out to be a lot of images and I didn't need half a million images. Red pandas aren't very fast, and as you saw the baby, they're pretty slow and cumbersome. And so you just need one every second or so, but I had all the images, awesome. So let's move on to the next step. Let's identify these images. And so I'd researched these neural networks things and there was this library out there called TensorFlow, it's by Google. And I was like, okay, this isn't bad. They have something called an inception network. And it's like, okay, this is real easy because they had an example using cats and dogs with two different things and it's like, this is perfect. I can just steal all this entire example because I just need pandas and no pandas. And so I just basically stole all their code and it was perfect. I had to make my own classifier library of images. And the images are things like images when there's no pandas, images when there are pandas. She's being watched, or she. Again, there was a gotcha though. It turns out that one of the researchers in China, their videos were in color. And so that led to smarers. But the great thing is with TensorFlow, you can just rebuild your classification libraries. So you just throw in a couple more pictures, little babies. And then it was working for them, it was fantastic. And for reference, this is what it would look like when you run a picture through it would give you a probability if, okay, is there a red panda, or is it empty, cuz those cats, dogs, and so things, there's a red panda. And so basically what I did is, okay, if there's, if TensorFlow believes there's more than 60% chance there's a red panda, throw it into an array, and that's it. But there was a problem with false positives and false negatives. Like occasionally, TensorFlow would get some wrong. So I built in just a basic thing. So I wouldn't start recording yeses or noes unless there were three in a row. And so I'd need three yeses before I'd say, okay, there's a panda on camera, and then three noes. And then it actually turned out to be really clever that I, clever, lucky. It turned out to be really lucky that I was doing one every second, because then it just mapped up perfectly with time. So if the pandas, the yeses started at position 30, stopped at position 60. I knew from second 30 to second 60, there are red pandas on camera. And the final results of this were that it was really, really accurate. I was really worried at first, because when I ran the first video through, one that had been classified by one of the humans, I got different results. And so it's like, crap. And so, but then I manually went through and it turned out that the humans had misclassified it and the machine was smarter than the humans. And it was cost effective too, like it was just some of my time. But it saved the researchers a lot of money. Like, I think they were looking at buying software like this that was in the number of $20,000, and then software as a service fees each month, and all this kind of stuff. And so this is money that they're gonna use to help baby pandas, that hopefully they have to go visit and steal. So, so I don't know if like projects like this are interested, are interesting to all of you, and I hope they are. And if they are, I really want to encourage you to come out to Ruby for good, and this is our logo. It's a world that's full of love cuz it's embracing Ruby. And if you see in the bottom corner the copyright, that's actually not a copyright, that's a JW, that's our shout out to Jim Warwick cuz we love Jim, we miss Jim, we think he the proof of what we're doing. But to answer what Ruby for good is, it's easier to answer what it isn't. It's not a bunch of us trying to get together to solve like stupid theoretical questions like this one, but I guess this one's solved now. What it is, it's a long weekend long event where we get a bunch of people like us together, we start on a Thursday, we end on a Sunday, it's all inclusive, so your food and your room, everything's covered. And we build software for non-profits, like people who need our help, but would never be able to afford us. And so I know a lot of you are probably thinking, that's a hackathon, and it's not, it's really, really not. And anytime someone compares it to a hackathon, my soul dies a little bit. Like ours is a much about community and having fun as it is about doing good. Like we have a hard stop every day at dinner time and we play games in the evening and werewolf and karaoke. If I could tell you the goals of the event, it's obviously to make the world better and it's to learn. And we have people who come who are brand new beginners to people from GitHub and DigitalOcean and Optoro and so it's all a range. And everyone's gonna learn, it doesn't matter if you are brand new or if you are a senior because of the seniors. They're the people who seem to get the most out of it. Like a lot of them have never led teams before or if they have led teams. A lot of times, they get stuck in their ways. And so they're using certain gems and certain tools. And then they learn all these new kind of practices from these people who are new to our industry, like maybe just out of boot camp and familiar. And again, community, and building community is so important. And I think it's especially important right now with kind of the atmosphere we have in our country right now. And so these are some of the places we've helped in prior years. Like the Portland Depper Bank, SnapFresh, Habitat for Humanity, the Humane Society, just really great places. And this is the Humane Society team, like what a great looking group of people. And one of the great, amazing things about the Humane Society is we get to play with kittens. How many room events do you get to go to where there's kittens? And so again, there's learning and pair programming and building good stuff. And again, like community, we're playing board games here and singing karaoke. Actually, again, the hammer in this community a bit more because, again, I'm in a different mind space because of all the stuff happening. But so Julian there was singing karaoke late one night with another gentleman named Josh, and Josh is like from Iron Yard. And I guess Josh was looking for a new job and Julian found that out at like 3.30 in the morning. So he called up his manager at 3.30 in the morning. Said, you have to hire this guy, and now they're coworkers. Or this guy, Devin, who's right there. So Devin's another one that was like, amazing young men who, you meet this guy and he's like, wow, I'm so happy I've met him now. Because in ten years, this guy's gonna be amazing. But he's amazing now, more amazing. But it's a little like Devin flew in from San Francisco. And well then when it came time to leave, he didn't get on his plane. He stayed in the area. He just loved the community so much. And I guess it's lastly, Adam, someone get married at Ruby for good, or propose, come on. So these are my 75 new best friends from this year. And I hope next year you're one of my new 75 best friends. But enough preaching about Ruby for good. Kind of broken record on that, I think. Who's ever heard of an animal called an elephant? See a few hands. So if you've never heard of an elephant, this is an elephant. Elephants are pretty amazing animals. They have best friends. If one's sad, other elephants will comfort them. But elephants are being poached right now at the rate of about 100 a day. And actually, this is Elizabeth. Actually, the person's Elizabeth, the elephant's Ambika. But Elizabeth, that's the researcher. She's also working with researchers in Africa on an elephant project that she needs some help with. So if someone's interested, I'd love to give more information. And she's also working on a behavioral app to track red panda data. And I don't see her here, but Betsy is leading that project. So if you want to get involved in that, and there's another project as well, so please get in touch. So I know I joke around a lot, but if I can be serious, I guess, for a second. I know a lot of us are maybe confused or we're kind of hurting right now because of the stuff. And so many people choosing hate rather than hope. And we're worried for friends and those of us in the vulnerable communities. And so I know I come up to these events and I give talks on making the world great and saving the world together. That's great, and our community, we love to get together and save the world. And I feel like that's something I love about it, but I want everyone to know that it's okay if you leave here and you just save the world for one person. And it's especially okay if that one person's yourself. So I'm not leaving on a downer note. This is a red panda fighting with a pumpkin. And they're fighting to a draw, apparently. Keep hoping for him to win, but. So thank you, any questions?