Lightning Talks Day 3

This video features Buddy Lindsey Jr., Eric Holscher, Jeremy Gatens, Kelsey Hawley, Kenneth Reitz, Laura Hampton, Mike Hansen, Nicholle James and Wayne Merry at DjangoCon US 2017 in Spokane, Washington, USA.

Lightning Talks Day 3
0:43:34
Published September 7, 2017
324 views

DjangoCon US 2017 - Lightning Talks Day 3 by Various Speakers

00:00 Kelsey Hawley
05:20 Eric Holscher
10:26 Laura Hampton
12:40 Jeremy Gatens
18:10 Buddy Lindsey
23:08 Nicholle James
28:30 Wayne Merry
33:16 Mike Hansen
38:12 Kenneth Reitz

LINKS:
Follow DjangCon US 👇
https://twitter.com/djangocon

Follow DEFNA 👇
https://twitter.com/defnado
https://www.defna.org/

Summary

Kelsey Hawley described Girls Who Code’s after-school clubs and seven-week summer program, where students learned Scratch, Python, Arduino, HTML, CSS, and JavaScript while building collaborative final projects and developing confidence. Eric Holscher explained that the Python Software Foundation is a community-run nonprofit that organizes PyCon, protects Python-related trademarks, supports conferences and Django Girls events, and funds Python communities worldwide. Laura Hampton introduced PyVideo as an open-source, searchable index of Python conference videos, while Jeremy Gatens gave a lighthearted introduction to Django Channels through a real-time rock-paper-scissors game. Buddy Lindsey Jr. outlined Bitcoin, wallets, altcoins, exchanges, and common ways traders lose money; Nicholle James traced the oboe’s development from ancient double-reed instruments to the modern oboe; Wayne Merry shared the practical and visual experience of observing a total solar eclipse; Mike Hansen explained Django’s prefetch-related internals; and Kenneth Reitz demonstrated Pipenv’s Pipfile and lockfile workflow for managing dependencies and virtual environments.

Key takeaways

  • Girls Who Code combines programming instruction with mentorship, teamwork, reflection, and exposure to careers in technology.
  • The Python Software Foundation supports the Python ecosystem through PyCon, grants, trademarks, community programs, and volunteer participation.
  • PyVideo makes Python conference recordings searchable by topic, speaker, and event, and welcomes open-source contributors.
  • Django Channels supports applications with communication beyond ordinary HTTP request-response cycles, including real-time games and chat.
  • Django prefetching evaluates the primary query first, then fetches related objects and places them in a cache for efficient access.
  • Pipenv combines human-readable dependency declarations with deterministic lockfiles and manages project virtual environments and Python versions.

Summarised automatically from the transcript.

Transcript

7,234 words · auto-generated Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:14

Speaker 1: Okay, so I'm Kelsey Hawley. I spent the last seven weeks at Girls Who Code and I wanted to share that experience. So if you haven't heard of Girls Who Code, it was founded by Reshma. Like many of us, she noticed the gender gap in the computer sciences and technology. And what she saw was that many young girls are actually very interested in computer programming and computer scientists. But as they get older, that number kind of drops. By the time when they get to college, there's very few of them left. So she came up with two different ways to kind of get girls interested and keep them interested in computer science. science. So one of them is after school clubs. These are for sixth to twelfth graders who hang out maybe in a teacher's classroom. They get exposure to computer science and some

0:59

Speaker 1: of the fundamentals. And the other is the Summer Immersion Program, which is a seven-week program over the summer for 10th and 11th graders. where they cover the fundamentals, have them build various programs in a bunch of different languages, also gives them exposure to many different women in tech, as well as the jobs in tech. So this is me and my two TAs for the summer, Kim and Jen. And we tried to encourage uh sisterhood as well as the The qualities here that are, you know, making our girls brave and resilient, socially just, emotionally intelligent, intellectually curious. So everything we did, we really encouraged the girls to feel this about themselves and embody these things So the first language we taught them was actually Scratch.

1:47

Speaker 1: So you can kind of see on the screen there's the little cat icon. They had it drawing pictures. If you're not familiar with Scratch, it's a block kind of puzzle-like language that teaches them about conditionals, functions, all the basics of programming. After Scratch, we went into Python, and so they have they were drawing shapes with the uh the turtle library. Soon they were writing their own text adventures and by the next project they were using the pillow library to dissect the pixels in an image and put a filter on it. And I thought some of the coolest images were actually mistakes in their code. So the blurry one here is actually one of the pixels was not written to the file. And so it created this kind of crazy looking image.

2:32

Speaker 1: Then they learned Arduino, they were playing with the LED lights. They were also, hopefully these will load. Yes. They also taught them to dance and sing a song, which I don't have the audio for plugged in. And that's okay. They we did a lot of code reviews together, so we went through their code, we debugged it as a class, uh, we went over some things that wow you did this really well your peers could really learn from this. The video showing is actually our escape bot so they had sensors on it and as it ran into walls it was supposed to kind of kinda back up and get through the maze. Theirs was a little bit buggy, it just wanted to really rug into walls. You know, that was part of the fun. We also taught them HTML, CSS, and JavaScript.

3:20

Speaker 1: Some of them came out of the summer with a really well-done professional-looking portfolio site. Some of them still look like something I built in the 90s. You know, it's fun. We had them do journals through every day kind of documenting their journey and their process. And we covered what we called the core four. So we taught them variables, we taught them loops and conditionals, and we taught them functions. And I'm not gonna lie, these screenshots I actually stole from one of my students' websites. So there you go. And finally, the last two weeks we had them focusing on final projects. So they came up with various ideas of what they wanted to build for the last two weeks. weeks of the program. And then they picked what they wanted to work on as a group together. And so once they had their group, I think I had five different groups total, once they had their group, we had them wireframe and storyboard what they wanted to build.

4:14

Speaker 1: Um at the very end when they had built that, they had a poster board here that had their inspirations, their process along the way, the problem they were trying to tackle, as well as the solution that they came up with. One of the projects was called Nuage, and it was a chat bot that some of my girls built for the depressed, the lonely, and the upset. Another one was Environ to encourage recycling. My favorite part, my TA actually had this from her time at Girls Who Code. We had a stuffed animal named Aurora, and she was the stuffed animal we gave out every day to a different girl who embodied one of the four concepts. And these are various pictures of them with Aurora maybe that night with pets, with um hobbies. And at the very end, we actually gave each girl their own individual Aurora.

5:01

Speaker 1: So if you see me taking pictures with mine around um that's what it's about. So I encourage you to all get involved. It was a great summer for me. Join a local club, be a mentor, be a classroom sponsor, be a teacher.

5:21

Speaker 2: Hello, I am Eric Olsher. You might know me from Read the Docs andor Write. The docs world. Today I'm going to be talking about the Python Software Foundation. Please raise your hand if you know what the Python Software Foundation is. Keep your hand up if you know what the Python Software Foundation does. All right, so about 70, 60, 70 percent. So my talk today is what is the Python Software Foundation and why should I care? So credit for most of these goes to Eva, who is our kind of coordinator. She's really, you can think of her as the CEO of the PSF. She's given talks. You've seen her. She also helps run PyCon, but a lot of this data and anecdotes come from her. So really the PSF is is us. The PSF is you.

6:09

Speaker 2: Anyone who spends five hours a month working on Python-related community projects, writing documentation, writing code, helping people in IRC, really just doing anything that furthers the mission of Python. Python in any way is eligible to become a member of the PSF. So if that's you, you can go on to python. org or just Google, you know, Python PSF, and you can find out more information about joining the PSF. PSF. So what does being a member of the PSF mean? That means you get to elect the board of directors. The board of directors are the people who actually run the PSF. I learned this by being elected to the board of directors about two months ago. So I am still figuring out how all this stuff works and I'm trying to explain it to folks as well. Because the PSF is a really, really kind of special organization.

6:56

Speaker 2: Not many other software languages have organizations organizations behind them that do all the good work that we do to increase diversity, to make events happen, all this kind of stuff. So all the membership of the PSF votes. It's basically a democracy. You select the board, then the board oversees the staff. The PSF has five full-time staff who work on operating the Python Software Foundation. So what does the PSF actually do? What are the operations that happen inside the PSF? The big thing the PSF does is run PyCon US. So the big Python conference that just happened in Portland, uh it had 3,500 people. The PSF actually runs that event. Django and DjangoCon are actually run by a separate nonprofit. So the DSF and

7:42

Speaker 2: DEFNA are separate nonprofits. So DjangoCon is run independently of the DSF. That's one of the big differences. The PSF and the DSF are similar also in that we hold the IP rights for the language. So the trademark of the word Python is held by the PSF. Django is held by the DSF. We also hold as the PSF the PyCon trademark, PyLadies trademarks, both in the US, in Europe, and other places. So we're kind of the legal entity that says when somebody talks about Python, they're actually talking about the programming language that we release on python. org that is like so you know what you're talking about when you get Python. The other big thing that we do, so PyCon every year makes money. That funds the operations. of the PSF, and we also give a large amount of that money away.

8:28

Speaker 2: So in the last year, I believe in 2016, we gave over $250,000 in grants to conferences. So the Django Con is sponsored by the PSF. That was done through a grant. Almost a majority of all Django Girls events all across the world are sponsored by the PSF. Almost every Python conference, all the regional events, all the international events, are supported by the PSF. So we bootstrap a lot of events, we bootstrap a lot of communities, and we really try and give money to places that are really going to have an impact in growing the diversity and just the global outreach of the Python language. And last year we actually gave money to 45 different countries to support the Python communities in those countries. So that's one of the big things that we do.

9:15

Speaker 2: So how can you get involved with the PSF? You know, by being at DjangoCon, you're almost certainly doing five months, five hours a month of work on Django. or Python or anything like that, you can join a working group. So we have a few different working groups that you can join that do different things in the community. You can become a member and actually vote and choose who the board is, choose who is kind of directing the PSF. You can run for the board if you think you know what the PSF should be doing and you actually know stuff about nonprofits, unlike me. You can also convince your company to donate to the Python or Django Software Foundations so that we continue doing this good work. You can also volunteer at PyCon or DjangoCon or any of these other things. Um okay, last thing we can also do more. Like the PSF is just this kind of thing that's giving out money.

10:03

Speaker 2: I really want the vision of the PSF to be more than that to help operate things like pip, uh PyPI. Those things currently have no like a So that's something I'm really trying to work on. Last thing, you should come to PyCascades, which is in Vancouver, January 22nd and 23rd. So more northwest, awesome things. Thank you.

10:27

Speaker 3: Hopefully nothing else will go wrong. My name is Laura Hampton. I am a Python developer in New York City. and I am somewhat involved with pyvideo. org, which is the index site for Python videos. A lot of the Python conferences put up their videos. And a lot of the times they wind up on YouTube or some other video site. The thing is it can be very hard to find the videos and define videos by specific speakers or on specific topics because YouTube is full of things like cat videos and videos about makeup and monster trucks. So we've created PyVideo to make Python videos easier to find. This is our homepage You can see talks from past conferences.

11:12

Speaker 3: You can see conf talks from conferences that you could not attend for whatever reason. You can see talks from conferences on the other side of the world. And you can do the hallway track without guilt, because you can go back and watch videos later. We have talks organized by tags. That's our main tags page. for your convenience. And we have the best tags. We also have talks organized by speakers, so you can find everything that somebody has said on a particular in their career. We also have event the talks organized by events. So if you want to look at do the talks from this event, you can can find them when they get posted. We are also an open source project.

11:59

Speaker 3: So if you would like to help, you can go to that URL and you can start seeing which videos we have not yet posted. We are based on Pelican, which is a Python-based static site generator. The video entries are JSON objects, and we are relatively beginner-friendly. There are a couple things that I would like to sort out that would make it even more beginner-friendly, but if you are interested in getting involved in open source, we are a very good first project. Unfortunately, we will not be sprinting, but this is a good place to start. So yes, visit pyvideo. org and enjoy our videos.

12:41

Speaker 4: To start out. We the best code. Thank you. So hello DjangoCon. This is fun with channels. My name is Jeremy Gaitons. I'm here from Philadelphia. This presentation is going to be a mix about Django channels and also about Pablo Picasso. So as an intro, art is a lie that makes us realize the truth. And this piece is Woman in a Hat. I'm also wearing a hat. Okay, as for me, I am I only have five minutes, but I can talk all day about myself. I am the newest web professional at words. the award-winning research platform of Wharton Business School.

13:28

Speaker 4: I graduated from Etown College. I'm a Tom Petty fan who does web design in that order. Often referred to as a degenerate disc golfer, much of my free time I'm spending chasing that sweet jangle jangle at the world-famous Sedgley Woods disc golf course. If you have any questions about disc golf, please come find me. Okay, the point of all this, why are we here? Learn the rules like a pro so you can break them like an artist. And this is Girl Before Mirror. Bloop. Here we go. So what the talk is on is Django Channels. I wanted to learn a little bit about it at DjangoCon because I was unfamiliar with it. And the best way to learn about a subject is to present about it.

14:15

Speaker 4: Uh yeah, hello. So channels is something that it allows for more than plain HTTP requests. I find that it allows you to really have a fully functioning website that both the front end and the back end are completely synchronized. The proof of this. Good artist borrow, great artist steal. As we all know, hi there. As an open source, there's no use reinventing the wheel. This is piece of Picasso is Dormont. And what I found what the uh with Django channels, what I found the value in it. is as a web designer who likes to do projects on the side, I'm able to offer added

15:04

Speaker 4: functionality to my clients. uh which is really great. Like the one thing the one use case that I've found is offering a chat for their website. So if you're thinking of e commerce website, a lot of times people will put something in their cart, but by having this chat functionality and I'm kind of getting ahead of myself, you'll be able to finalize more purchases. Or at least that's the goal. So the purpose, action is the foundational key to all success. This is this is Dora Mawr, the Picasso piece. Thank you. Thank you. So I wanted to build something. We're here, we're doing code, we're all doing fun stuff. I wanted to make a rock, paper,

15:49

Speaker 4: scissors game using Django, using Django channel. And for those who are not familiar, rock, paper, scissors is a hand game in which each player simultaneously forms one of the three shapes with an outstretched hand. hand. Paper covers rock, rock breaks scissors, and so on and so forth. Okay. So this is what I made here. This is part of it. And as you can see, it has the logic and And it tells you right now, okay, hey, it gives you the score at the bottom. I apologize for all the design. I literally was coding this five minutes ago. I'm sure my bosses love to hear that. Moving on. So yeah, as you can see, even with the simple design, hey, I threw a rock,

16:35

Speaker 4: ponent threw a rock tie, so on and so forth. Oh hey, do you want to play again? No. Good. Love it when stuff doesn't work. Okay. The conclusion: only put off until tomorrow what you are willing to die having left undone. Of course, this is Picasso's most one of his most famous pieces, The Three Musicians. And finally a live demo, okay, because what could go wrong? Okay, this is a Heroku app that I came up with following the tutorial. Put in my name

17:21

Speaker 4: and then okay. But simultaneously, if you went to this also Excuse me. How much time do I got?

17:45

Speaker 5: Your time is up actually.

17:46

Speaker 4: Okay. Well everybody wants to see how the game finishes, right? That's a suspense.

17:54

Speaker 5: We're in Lightning Country, we are about fairness.

17:56

Speaker 4: That's true.

17:57

Speaker 5: Yep, which means you've got to go.

17:59

Speaker 4: You gots to go.

18:01

Speaker 5: Got to go.

18:01

Speaker 4: And then lastly, we can paper. We can say it. Okay, bing bang boom. That's all live. Thank you very much, everybody. Take care and have a great day.

18:12

Speaker 6: Obviously, this is supposed to be a little bit of a light-hearted introduction into cryptocurrency of how to lose all your money trading cryptocurrency. The first way to do that is to take advice from a five-minute presentation at a conference. The second way is to listen to somebody that's only been doing it for five months. And then the obligatory, this is not financial advice, so if you lose all your money, it's not my fault. So the first place we need to start is with Bitcoin. This is kind of an introduction into cryptocurrencies. If you've never taken a look at it before, but you've always been like, someday I need to figure out the basics of The first thing is you don't need to understand the technology to actually be able to deal with uh Bitcoin and other altcoins. Uh Basically, it starts out you have a coin

18:58

Speaker 6: and it really is just a piece of numbers on a long, really long string on a blockchain. The blockchain is basically a distributed database, and that's all you need to understand for the moment until you get further and deeper into like researching other topics. Wallet address at the top um actually produces this uh uh QR code that people use with their wallets, and I'll explain that. or their uh wallet applications which I'll explain here in a second. And by the way, if you currently have something, you can send me a tip using this QR code and I would appreciate it. I would So there is kind of uh three types of wallets that you can uh generally think of. There's uh hard hardware wallets There's a hot wallet and then there's a paper wallet. Hardware wallets is actually kind of like a USB

19:45

Speaker 6: stick that you kind of plug into your computer. It pops up. You can actually do all your things. There's a hot wallet, which is something like uh Jax uh J A X J A X X, which is uh what I use for my uh day-to-day interactions over the internet, um, but it's not actually stored on my uh the information isn't just stored on my machine uh on a node. I probably shouldn't go much further into those details. And then there's a paper wallet which is actually really fascinating to me. Uh you basically write down a whole bunch of stuff on a piece of paper, put it in your safe deposit box, and the only way anyone can ever access that wallet is they go to your paper, their your safe deposit box, pull out that paper, and type in those numbers into a specific piece of paper. of uh technology. And then basically all the wallet is at the end of the day that you need to understand is it's a whole bunch of words, uh

20:32

Speaker 6: kind of like, you know mini word password that you need to save somewhere so that you can restore that wallet at a at a later loc at a later time. Basically all the wallets are is that long string that I showed you in the beginning that save uh basically one, twos and threes and either you know 123 bitcoins or 0. 0123 bitcoins, however you want to deal with it. Uh it's just string that stores numbers. So how do you get some Bitcoin? The easiest place that I find for people to start is to use a site called Coinbase. You can basically attach either a credit card, a PayPal account, or your checking account, and you can immediately ish buy some Bitcoins and get started on your PayPal. From there you can actually move through wallet

21:19

Speaker 6: through your different wallets, a Bitcoin from one location to another, by using that address. So that leads us to altcoins. Altcoins are in a sense derivatives of Bitcoin. That's how they kind of started. And then other people started developing similar blockchain technologies. technologies and they too have a wallet similar to that long string that holds one, twos, and threes and whatever combination that you need. And you can trade those back and forth. Those are basically altcoins. It's some sort of value that other people place on another type of technology. Where can you get some altcoins? You can get two other types at Coinbase. Again, I like to bring up Coinbase because it's an easy place to start. You can get Ethereum and Litecoin. And they're debating the new Bitcoin Cash at some other point to maybe bring that on board.

22:05

Speaker 6: So that kind of gives you a place to start. But there's 800 different altcoins. How do you get those? Well you can go a step further and you can go with Shapeshift and you can start shifting uh from one altcoin to another uh through there. It'll I forget how many it's like 30 or 50 or something like that to start. But where do you get the other 800 potentials? You start with exchanges. Poloniax, Bittrix, Kraken, or GDAX are your top ways. To exchange it. And this is how you make your money doing day trading. A lot of information out there about that. So let's get to more ways to lose money. Randomly buy altcoins. uh without doing any research. Buy and sell any motion. Don't buy and sell on emotion. I can explain that one to you later.

22:50

Speaker 6: Don't learn anything about trading and don't pay attention to the market. Finally, don't start. And then I'm I run Go Django. I'm on buddy Lindsay on Twitter, and don't forget you can send me a Bitcoin tip if you want. Thank you and have a great day.

23:10

Speaker 7: Okay, so we'll see if we can make this work. All right, so hi, I'm Nicole James. Um my Twitter handle is at obochick underscore. And I Several people have asked me why I use Obotic. It's because I am a professional amateur Oboist. So I figured I'd go through and because I need practice speaking in front of people, give you a small history about The oboe. So um the first like rn the first sort of oboe is actually the olos. I hope I don't butcher this. Um it's a flute that was done used in Greece and um

23:55

Speaker 7: It they believe that it had a double reed, which is what the oboe is. It's a double reed instrument. So the olos is either one or two um cylindrical tubes that you blow into and you play. It's a f there's a fun myth about how uh Uh Apollo cursed uh Midas with donkey ears because there was a competition and Midas declared that Apollo did not play better than the person competing against him, so that was fun But the next one that I could find was the Duduk.

24:41

Speaker 7: This is from Armenia. There are many different um opinions about when this one actually originates time-wise, but the Armenian historians say around 1200 BC. Um if you notice it has the double reed at the very tip of it. It's a rather large reed. Um and it sounds closer to an English horn, which is kind of like the tenor obo, so it's kind of it's a lower voice. Um it's still used today. It's normally played with two dadukes. One of them plays kind of a drone or one tone and the other one plays a melody on top of it and you get a really interesting thing. It kinda sounds like the bagpipes, but not. Um so that's the Daduke.

25:28

Speaker 7: Then there's the Zerna or the Sorna, depending on where in the Middle East you are. It there's uh it it shows up all over the Middle East. Um there's stone tablets with Persian courtesans playing the Zirna. Um so that's a lot of fun. It is normally about this long, which is not very long, if you know most instruments, it's pretty short. Again it is the double reed and the reed is about half the length of the modern oboes reed. So it's about the size of the tip of your thumb. But again, and then

26:13

Speaker 7: most Obos and renditions that come after this are actually derived from the Zerna. So There's the Suna, which is the Chinese version. They believe that it the oldest record that they have of the Sona is From the Jade Dynasty. Um, they're pretty sure that it showed up before then, but they're also pretty sure that it didn't originate in China. So they're pretty sure that it was probably one of those things where like the Zerna or the Sorna uh showed up and this uh was created after that. Um the Sona is still used in China. It's used for funerals, marriages.

27:01

Speaker 7: and some military well, in ancient history it was used for military maneuvers similar to the way the Scots use the bagpipes, kinda to give the signal because it's really, really, really loud. It's not something you want to play inside. Um and it's really fun when you get one that's made out of all brass instead of wood and brass. So that's fun. This one I just mentioned, I wasn't I don't have chance to go into all of the ones in Africa. There's about five different ones in Africa as well. But I just thought I'd mention they're there too. We're gonna move into Europe now. This one is the direct descendant of the Zerna, the Sham. It's in Europe. Um They're around sixteen hundred they started adding all different sizes so that you can have an entire chorus.

27:48

Speaker 7: So there's a soprano to the bass. all of them, which then led to the original oboe which had seven holes and two keys on it. And then we got to the modern oboe which has about fifteen different holes in it. And this is the one that I play. So to see the three of them together, and after that, there are now like ten of them. But they're not used very often. There's one of them where there's only two pieces that have ever been written for the instrument, and there's only about three of them in the entire world. So with that, I hope you enjoyed that

28:32

Speaker 8: Alrighty, so uh as uh just been said we are having a solar eclipse here in uh uh on the 21st, which I didn't know until after I'd already was going to come to Jenkins And I thought, well gee, it's only a few days after and we're almost going to be there. And like this eclipse which was in 2002, we went a long way to go see that eclipse. for 30 seconds of totality. But it was something that I rem I'll remember for the rest of my life. So so this is a bit of a warm-up for for next week. So this is a this is near where we uh totality happened. which is in the South Australian desert, which is a very barren place, as you can see from the photo there. And if it wasn't for the eclipse, there'd be no one there. Uh

29:17

Speaker 8: they have like say a a big uh a big ranch with say five people on it and uh it could be a hundred miles across or two hundred miles across and that's that's the the only thing that's there. Which means that when you are selecting a site to get it to view this eclipse, you need to be really careful getting the the car off the road. So here's some friends they came up from Adelaide and we had to dig the car out out of this big ditch that they managed to ground the car on. So that was uh uh there's uh we had a bit of spare time before because the eclipse ain't gonna wait just like uh five minute lightning talk finishes at five minutes sharp Totality happens and then it goes. And so there's the boys with their various homemade instruments looking at the eclipse.

30:02

Speaker 8: Before totality you can't look at it through the naked eye. When you look at the sun when it's just up in the sky by itself, it will cause you pain and you'll look away. But when it's close to totality, it won't cause you pain, but the damage is still happening. So you need to be very careful and but when it's total you can look at it directly. Um but only when it's total. So here's some boys looking at some reflections uh in these devices that they made up, which uh because it was late in the day, which uh next week won't be, uh they could conveniently lose use the slope of the car uh windscreen um uh to put those devices on. Um the interesting thing this photo's blurry it's taken

30:48

Speaker 8: this is 2002 and digital cameras weren't any new near as good back then um The light was still it looked bright, but actually wasn't bright. It was actually really dark. The sun was about 95% covered by this stage. And we're just looking at the shutter times on cameras and they were really long even though it looked bright but it wasn't. Finally it starts to get dark. Um I took some uh pictures with a um with a film camera uh which have been scanned and here's a photo of the sun with the filter. Um and so I'll qu I'll just quickly flick you through as the moon begins to appear, which is about an hour and a half before totality.

31:35

Speaker 8: And it spends its time crewing. over the sun's face slowly. When it's looking like you look up in the sky when it's like this, if you actually weren't looking at it through a filter It doesn't really look different to normal daytime. And the sun, even just 5% cover 5% less, so 95% coverage. still just looks normal. It's only when you can see that moon is slowly but surely covering more and more. Now we get this very thin crescent. Um it still looks like daytime, but now it's getting really dark. I had a big filter over the camera. When I'm looking at this tiny crescent, I'm just

32:20

Speaker 8: like, maybe I can take that. filter off and so that then I take the filter off and this is taken unfiltered and it's like uh blasting away and then I see that Which is the last direct sunlight fading, and we can start to see the chronosphere of the sun, which is the red thing. And because I only had 30 seconds, I had a whole plan for what I was going to do in terms of Photo exposures and go bang bang bang bang bang. Like this guy coming up to me with like 30 seconds is about the time from there to here. And so we see the Bailey beads, we see the the beginning of the sh the solar chronosphere. And then

33:06

Speaker 8: Then the end, the start of the sun from the other side. And that's a solar eclipse. You'll never forget them. My name's Mike Hansen. I'm an engineer at Rover. And today I want to talk to you a bit about prefetching behind the scenes. So how many people here have Used or at least heard of prefetch related within Django. So quite a few. But probably not everyone has taken a look at what the code is that Django is doing. um under the hood in order to make this work. I found a number of times that it's been useful to know what's going on. And so I wanted to

33:52

Speaker 8: To give an overview today of just sort of kind of the main functions involved and the main pieces, so that if you may need to customize how you fetch data, you'll sort of know what's going on. Um so we'll have a little toy example today with uh dogs and toys. We have two uh simple Django models, and the thing to notice is that on the toy, Uh there's a foreign key to the dog model, and so we'll think of the toys as toys belonging to a dog. So what happens when Django evaluates this query set? Well the first thing that happens is it evaluates it as if you hadn't done prefetch related at all. So it's just like the same thing when you evaluate

34:38

Speaker 8: uh Django. objects at all. Django will run some SQL and build a list of dogs. So here we have Miyoki and Megatron, uh, which are my two lists little chihuahuas. And so once it has the list of dogs, um then it needs to perform the pre-fetching. So the main function that does all of this in Django is this prefetch related objects function. It lives under uh Django. db. models. query. Um that's sort of where all of the Prefetching code lives. And what happens is Django calls that function, it passes in the list of dogs that we got from before, as well as our prefetch-related lookups.

35:23

Speaker 8: So the first thing that prefetch related objects has to do is it needs to find a prefetcher. And a prefetcher is just any object that has a get prefetch query set method. So Django has a number of built-in classes that have these methods, but you know you could very well make your own. Just any Any sort of object that has get prefetch query set. The code that gets the prefetcher is this getPrefetcher function. And at the end of the day, in our example, basically all it will End up doing is it will uh take the first dog in our list of dogs and get the toys attribute. Here we can see it's a related manager, um, and that this related manager Manager does indeed have a get

36:08

Speaker 8: prefetch query set method. So once it has uh this prefetcher, uh we need to use it. Um so the function that does this Is prefetch one level. And we call uh the get prefetch query method, uh, get prefetch query set method. Uh, we pass in our list of dogs, and we get Get back five objects. So if you want to implement one of these things, you just have to return these five objects. Um I'll briefly go over what they are. There's this related query set, which is Here it's all our toys filtered by um the dog IDs, but you could return any sort of iterable um for that. Django doesn't really care that it's a query set. We have Related object adder, which takes one of these toys and returns an identifier for which

36:57

Speaker 8: dog it's associated to. Instance adder takes a dog and also returns a An identifier and that's how it matches them up. Um is single means there can be um it's false, so there can be more than one toy per dog, and a cache name for where to Store it. So once we have this, we can iterate over all of our the query set. We'll get our list of toys. We can use this related object address our function to build a list of toy object uh dictionary mapping the identifier to the toys and then we can iterate over our dogs and associate the toys with them so here if you look On Miyoki, there's a prefetched objects cache, and that's a mapping with the between this cache name, and here we have a query set with the toys already on there.

37:46

Speaker 8: And you can see if you do Miyoki. toys. all, you're actually getting this object from the cache. And so thanks. If you're interested in like efficient data fetching in Django or pretty much anything else, feel free to come see me. Also, Rover is hiring, so check out our careers page and also our engineering blog. All right. Hello, everybody. Um My name is Kenneth Wrights. If you know who I am, it's probably from the request project which I created. And I'm here to talk to you about a new project of mine called PipEnv, which uh is intended to replace your usage of pip and virtual m on a day-to-day basis.

38:31

Speaker 8: So one of the problems with pip in virtual env when you're using them is that uh there's two ways to use pip with requirements files. One of them, if is this text large enough to see? It is? Alright, good. Uh is to specify your requirements in a very human-friendly format like this, where you uh just specify the names of the dependencies that you want. Unfortunately when you go to push to production this is not a very stable build.

38:59

Speaker 3: So the more best practice way to do it is to uh pin all of your dependencies like this. Uh and this is called uh dependency pinning. effectively.

39:10

Speaker 8: So there are ways to do both of these at the same time.

39:13

Speaker 3: There's some great tools available for that, like pip

39:15

Speaker 8: tools. And I recommend using Using those tools if you're using pip. And uh but I wrote a tool called PipEmv, which I'll show you right now, which uh kind of gives you the best of both worlds.

39:26

Speaker 6: So I'm gonna CD or make a directory called demo. So this is gonna be a brand new project. Go into

39:32

Speaker 8: demo.

39:33

Speaker 6: And I'm gonna do pip env and I'm gonna install Django. And it's gonna create a pip file for the project, and it's gonna create a virtual m

39:42

Speaker 8: for the project for me, because it knows that that's That's what I want to do. And it'll take a second for it to go and install Django because the internet connection is not incredibly fast. Let me connect to my iPad, I'll just speed things up. Hopefully. Come on, there we go. Installing Django. Excellent. So what this is doing is it's creating a new file called a pip file, which is going to be something that's built into pip in the future. Uh and it's a new standard for specifying your dependencies. So now if we look at the pip file, it's in this nice human-friendly format, uh

40:30

Speaker 8: Toml, and you see Django equals star, which means I I didn't specify a version of Django, so I'm saying it can use any version of Django. And I can do pip and block, which takes a few seconds because of the way pip works. I unfortunately can't say tell me go get tell me the latest version of Django. to download it again. Uh we can do pipfile. lock. And just like in Bundler and all those other tools now, um we have uh it generates a uh deterministic file that you can use to rebuild your environment. So Django requires uh version 1. 1. 1. 4 and PyTZ uh 2017. 2. And so it did that all for us and we didn't have to deal with that.

41:16

Speaker 8: So if you can just start your project and do pipem install, it would have installed the right version if you had a lock file in there and everything. works great. And the cool thing about this is I can I'm using the default version of Python right now. Let's say I want to switch to Python 3. I just do pipm dash dash three and it will destroy my virtual env and create it with Python. three and if I want to switch to two I do pipe pipemv dash dash two and it does the same thing. So it's managing and destroying my virtual ms for me. It's kind of like a replacement for virtual envrapper. and pip and all those things combined by using and utilizing all those tools together. So yeah, do we have uh do we have uh time for like a question? Is that a thing that lightning Talks there?

42:01

Speaker 8: What's the hash of? The hash is of the the uh pip file so that we know when it's out of date. So if you update the pip file it knows when the lock file is out of date. Can I can I hash the packages themselves so containers can't retroactively insert code into my proxy Pip and block dash hashes will include hashes for all of the packages and we'll check them when you install. Yes. That's disabled by default because different versions of Python will re download different packages. packages and and will have different hashes. It was they used to be on by default. Can we install Piv with

42:37

Speaker 6: with PIP? Yes, pip install pipm. You can find out about it at pipem. org. Yes. Windows support? Uh works great with Windows. That was not easy. Okay So specify what?

42:54

Speaker 2: Specify the Python version within your pip file. So you can say lock into Python 3. 6.

42:57

Speaker 6: Yes. You can in your pip file say uh There there's a PEP for this, that's PEP

43:04

Speaker 8: 538, I believe, and that you can specify any of the requ of the version markers and one of them is it requires Python and then you can run uh you can specify any version of Python in there And then you can run pipamp check and it will check all of those requirements. And it will

Questions this talk answers

What is Girls Who Code's Summer Immersion Program?

It is a seven-week summer program for 10th- and 11th-grade girls that teaches programming fundamentals, has students build projects in several languages, and introduces them to women and careers in technology.

Discussed at 0:14

Who can join the Python Software Foundation and what do members get to do?

Anyone doing at least five hours a month of Python-related community work can qualify for membership. Members can vote for the board of directors, join working groups, and potentially run for the board.

Discussed at 6:09

What does the Python Software Foundation do?

The PSF runs PyCon US, holds Python-related trademarks, supports Python community events, and provides grants to conferences and communities around the world. It also oversees staff and funds its operations largely through PyCon revenue.

Discussed at 6:56

How does PyVideo make Python conference talks easier to find?

PyVideo indexes Python talks and organizes them by tags, speakers, and events, so people can find talks by subject or presenter instead of searching through general-purpose video sites.

Discussed at 10:27

What is Django Channels used for?

Django Channels extends Django beyond plain HTTP requests so the front end and back end can stay synchronized, enabling features such as real-time website chat.

Discussed at 14:15

How do you get started with Bitcoin and cryptocurrency wallets?

Bitcoin is represented by data recorded on a blockchain, while a wallet stores the information needed to access it. The talk describes hardware, hot, and paper wallets, and suggests Coinbase as an accessible starting point for buying Bitcoin.

Discussed at 18:12

What are altcoins and where can you buy them?

Altcoins are cryptocurrencies based on blockchain technologies other than Bitcoin. Coinbase offers currencies such as Ethereum and Litecoin, while services such as ShapeShift and exchanges including Poloniex, Bittrex, Kraken, and GDAX offer access to more coins.

Discussed at 21:19

What is the history of the oboe?

The modern oboe developed from earlier double-reed instruments including the Greek aulos, Armenian duduk, Middle Eastern zurna, Chinese suona, and European shawm. European shawm makers eventually produced families of sizes, leading to the early oboe and then the modern instrument.

Discussed at 23:30

Can you look directly at a solar eclipse?

Only during totality is it safe to look directly at the Sun, and only for the brief period when it is completely covered. Before totality, even when the sunlight seems less painful, viewing the Sun can still damage your eyes and requires proper protection.

Discussed at 30:02

What problem does Pipenv solve for Python projects?

Pipenv combines pip and virtualenv management with human-friendly dependency declarations and deterministic lock files. It creates the project virtual environment, records dependencies in a Pipfile, locks exact versions in Pipfile.lock, and can switch between Python versions.

Discussed at 38:30

How do you use Pipenv to create a project environment and lock dependencies?

Running `pipenv install Django` in a new project creates a Pipfile and virtual environment, while `pipenv lock` generates a deterministic lock file containing resolved dependency versions. A later `pipenv install` can rebuild the environment from that lock file.

Discussed at 39:33

Does Pipenv support Windows and different Python versions?

Yes. The speaker says Pipenv works on Windows and can recreate the environment with Python 2 or Python 3 using the corresponding command-line option; the Python requirement can also be specified in the Pipfile and checked.

Discussed at 41:37

Note: 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.

More videos by Buddy Lindsey Jr., Eric Holscher, Jeremy Gatens, Kelsey Hawley, Kenneth Reitz, Laura Hampton, Mike Hansen, Nicholle James and Wayne Merry

More videos from DjangoCon US