 So, my name is Ricardo, I'm sort of a library, I'm like 50% scientist, 50% software engineer. So I'm going to talk about neutrons today, so I work for the Spallation Neutron Source at Oak Ridge National Lab. So this is a picture of the Spallation Neutron Source. For those who don't know, this is in Oak Ridge. Oak Ridge was one of the secret cities that was built for the Manhattan Project. Uranium for the little boy, the bomb that was dropped over Japan. Uranium was enriched over there in Oak Ridge. Things changed, it's not secret anymore. And today, for example, we have the most powerful computer in the world. We also have huge programs in biology, in material science, we have environmental science. We also have bobcats and bears and the fucking lot. And this is really true, because I've seen them. Okay, so just a quick introduction about Spallation Neutron Source. So we work with neutrons. Neutrons, they have properties that allow us to study matter. They have a size that is a wavelength that is similar to the distance between atoms. So we can study matter with neutrons. So to produce neutrons, basically what we have is we produce hydrogen ions. So an atom of hydrogen with two electrons. We speed this in a linear accelerator to roughly 90% of the speed of light. We then chop off the two electrons because you don't need them. And then we accumulate them in this ring. And then we fire these to a mercury target and we obtain neutrons like that. And those neutrons, they are then directed to instruments. Okay, this is an example of an instrument that we have here. This is pretty huge. As you can see, we can see like a little guy over there. So basically what we have, we get those neutrons. We have a sample, I don't know, can you see them? Yeah, cool. Okay, there's a sample over there. So we shoot our sample with neutrons. Those neutrons are scattered and we get them on detectors. I'm not going through the details, I'll get the neutrons and all that. So basically, how we use Django. So Django is used everywhere along all this process. So all the instruments we have, I think we have around 12, 15 instruments. They all have Django somehow. So we use Django to monitor everything. And this is an example of how we use. So you use Django to monitor all the process. We use a lot of JavaScript, fancy plots, fancy stuff. All right, and then there's another thing that we also do. So we do data reduction because our data is huge. We have to submit our data to a cluster. This is part of the project that I'm working. So the idea is something like this. We have a reduction and every reduction is composed by several scans. We want to minimize errors. So what the users or scientists usually do, they measure the same thing several times. So for example, for a small angle scattering experiment, which is basically measuring the deviations of the scattered neutrons, we have the same sample, a protein for example, and we dissolve it in several concentrations. So we measure everything, we average, and we have some data. OK, so then this is submitted to a cluster. We can either submit a reduction composed of several scans as a simple MPI job or a single MPI job or multiple jobs. And now this is what I'm working. So I don't have much experience with Django and I've got a lot of questions. I'm taking advantage of these five minutes to get response from you. OK, so what I have basically is I have my reduction. My reduction is composed by several scans. And I have this job. What I submit either a reduction or I submit several scans. So I have this polymorphic association. I have no clue how to do this in Django. Another thing that I have, so I have my results. And my results, it depends on the inputs that the scientists give me. And the ideal for this would be JSON. But JSON, so far as we have left a lunch, we only have JSON with a key and a value. There's no nested JSON still supported in Django. So I'm summarizing everything. So basically I need something like these where I get all my objects and I get the type associated with the reduction on a scan. I also have something that I didn't tell. So the forms that you saw before, just to submit data, they are cluttered with a lot of. So I have like 100 entries in my form, even more sometimes. They're all conditional. Like I have default values. Sometimes the user stick a button and I have like a jQuery. Very fast thing that show ups with parameters that I have to change. And my templates, they are cluttered. They are huge. And I wonder if I can have this as a way to have this better. I saw this package. Crispy forms. I don't know if it's good or not. I've seen, because I talked with some people, some like, some don't. And also about JSON, I saw also the JSON, the proper JSON is not still supported in Django. I wonder if it's going to be supported in 185 or only in 1.9. Well, and that's all what I have for you. So please come and help me, all right? Thank you very much. So this talk is about sorted containers. It's a Python module I've been working on. This is going to be sorted containers in five minutes. My name is Grant Janks. I've been working on Python since about 2011. Like many of you, I was pleasantly surprised and impressed by Python's batteries included slogan. Not long into Python development, I started asking questions like these. How do you sort a Python dictionary by key? How do you sort it by value? How do I get the maximum value out of a dictionary? Could I somehow search a dictionary's keys? These questions get viewed millions of times for every priority queue, or cache, or in memory index, or even indexable set that somebody needs. In response, I got some great answers. The first is ordered dict. So you might have actually also used Django's sorted dict at one point. You quickly learned, though, that ordered doesn't stay sorted. It just stays ordered. There's also counter, which is pretty clever. Another Rayman-Heddinger contraption. It's combined with another module called heap queue, which helps you maintain a binary heap. And all of these were wonderfully fast, except when they weren't. So they kind of assume that updates can be batched and sorted methods can work lazily. And that gets us really far, actually, like really far. But sometimes you want even more. So if C++ and Java and .NET all have sorted map-like data types, why doesn't Python? I found the answer from Nick Coughlin paraphrasing Guido. If a user is sophisticated enough to realize that the built-in types aren't the right solution for their problem, then they're also up to the task of finding an appropriate third-party library. To that, I say good luck. If you go out there, you'll find a dozen different solutions. They'll all have different APIs. They'll all have varying levels of compatibility and performance. And if we decided only by most downloaded, then we'd end up going with B list. So let's try that. B list implements a B tree data type in C with a node size of 128. And I was pretty happy with it until one day I made this discovery. I'm surprised here because B list should shuffle 128 pointers, while bisect should shuffle 1,000 pointers. Like how can bisect be faster here? So I went back and I tried to write something in Python. I tried evaluating a lot of different kinds of sorted tree data types. There's red, black, there's skip list, there's play, there's randomized, there's treat. A lot of these are all written in CRC++. There's one that's a skip list implementation in Python, but it was kind of slow. All I can say in five minutes is that sorted containers runs with this idea. It's kind of like a B tree, but it's only half-heartedly so. It relies entirely on the bisect module. And while it's slow to program in Python, the interpreter, the Python interpreter is written in C. So if you think of it as programming the interpreter, you actually are writing C code. And it turns out lists are really fast, like really fast in trees, not so much. So listen to what some smart people have to say about it. Alex Martelli writes, good stuff. I like the simple, effective implementation idea of splitting the sorted containers into smaller fragments to avoid the order and insertion costs. Jeff Nupp writes, that last part, fast as C extensions was difficult to believe. I would need some sort of performance comparison to be convinced this is true. The author includes this in the docs, it is. And Kevin Samuel says, I'm quite amazed, not just by the code quality, but the actual amount of work, you put it stuff that is not code. Documentation, benchmarking, implementation explanations. And it was a true inspiration actually from Django to be this driven to create that much in terms of docs. Lastly, Mark Summerfield makes a short plea. He writes, Python's batteries included standard library seems to have a battery missing. And the argument that we've never had it before has worn thin. It's time that Python offered a full range of collection classes out of the box, including sorted ones. So I submit sorted containers. Thank you. So I hope you all forgive me for doing a purely promotional talk here, marketing, marketing this. I'm Tracy Osborn. You might have seen the book I've written and I'm really, really proud of it. And if you haven't seen it yet, come and find me. HelloWeb App is an introductory into Django. And I aimed it at non-programmers and designers and people who are used to using the websites. And I started out with templates first and doing static files and check out the website. So this is the original book and it's awesome. You can buy it off of me here. And it's on Amazon as well for later. And I wanted to point out the most helpful critical review which I think is really funny where it says overpriced book. Hey, I self-published. Very introductory, certainly not worth the $20. At least it's on luxurious paper. So I'll take it. I'm a designer, I did everything. But gone thin is well-written. Thank you, Mr. Critical Review or Mr. and Mrs. But I'm really up here. I really wanna expand this. There we go. This is why I'm really up here because I wrote this book and I am fundraising for the second book which is HelloWeb App Internet Interductory Concepts. So anyone who has gone through a HelloWeb App and has a basic web app or the awesome Django Girls tutorial or any other tutorial that launched them into their first basic web app, this new book will cover intermediate concepts like adding Stripe, adding an API, working with sessions, adding user uploaded images, so all these things that you would build upon a basic web app. And it's going awesome. I just launched it five days ago. I'm almost at the minimum goal, which is fantastic. But to Kickstarter, to very Lisa Kickstarter, so if you back the Kickstarter campaign, you'll get the new book by December. And if you back the first campaign, you would know I'm a year late from that one. That will not happen this time. I promise the book will be in your hands by December. So yeah, HelloWeb App Intermediate Concepts that is fundraising on Kickstarter. Watch the video because you get to see faces like this in the video. And thank you to everyone who backed the last Kickstarter and has been so supportive of my journey with my book. Wow, DjangoCon. All right, my name is Dan Dietz and I'm gonna be giving you a quick overview of something that we built called Fabric Bolt and the title of this talk is Look Ma No Command Line. So go ahead and wait for the presentation to pull up here. Perfect. All right, a little bit of a false start. First of all, we've got a company, Bolt Effect, that supports this project. So I'm just gonna give a shameless plug for our company. Django Dash 2013 was where we originally developed this piece of software. So I don't know if you're familiar with the competition that hasn't run for a couple of years now, but we, I'd like to say we took first place, but we actually tied for first. So what we tried to do was solve some problems that we saw. We built a tool that's designed to help with deployments. Okay, so there's lots of people that use fabric. I'm not gonna get into that, but when you're using fabric to manage deployment systems, you need programmers in order to execute those deployment tasks. You also need your programmers to have permissions to connect to appropriate machines. So they have to have the elevated permissions to go out to your production service and all that good stuff. And then you also have to keep track of what's actually happening. So when you run those deployments, you want logging, you want tracking, know what's being released. Okay, so what we wanted to do was be able to take something safely to production without you. So a normal workflow could look like this. All kinds of organizations have different workflows, but you could be doing programming, send something to QA. You have then client review, potentially in a staging environment, something like that. Project manager is working with a customer saying, hey, great, this is all good to go. We got it approved to go on Friday, right? So it's Monday, it's approved to go out at some point in the future. So then Friday rolls around, they stop you from working because you're happily working on the next feature, and then you run that deployment. So wouldn't it be great if that project manager or some other non-technical person could go ahead and run that deployment? It's kind, when we have a workflow that's constantly interrupting a developer to run those deployments and manage all of that stuff, it's kind of like the driver here having to get out and change his own tires. So that's at least from our perspective. Access control, you can have a system like this where you have developers that have machines and they have to have their SSH keys installed and then those SSH keys configured on all of those other machines out there. Wouldn't it be great if we had a system where we could have a central place where those keys are stored, it has access and then we hand out permissions in a nice web interface to different types of folks to give them different levels of access. Being able to track releases is great. So we had a fantastic talk from Lincoln earlier today where they were talking about doing releases and best practices and you don't want to be able to answer a question like, I think we released this sometime last week. We want to be able to say, yeah, 342 on Monday is when it went out. So what we did was we built a web interface. It's a Django project to run your fabric tasks. And so you can create users in the system, you can hand out permissions, you can manage all that stuff and then you can actually track what happened when those deployments run. So it's really easy to get started, pip install fabric bolt, you do your init, you migrate it, you run server and you're up and running and then you have a beautiful interface that looks like this, welcome to fabric bolt. You would go in and configure your hosts. You would configure stages. So you'd say, okay, these hosts are what I use for doing my testing, staging, whatever and I've got a stage over here for production. Once you actually get to the point where you want to run a deployment, you would select a stage and then you actually can see over here on the right hand side, there's a drop list to select from the task you'd like to deploy. Once you go through that process, you click deploy, you actually see what happened. So we have a status that shows, yep, everything was great and here's the full log of everything that happened. So all of that beautiful log that you would normally get working on the command line, we capture, store it, we keep it for later. So in the event that something bad would happen, we go back and we review, okay, here's all of my deployments, they look wonderful but I did have a failure. You could actually go back and say, okay, what happened during that failure? You know, what was the issue? What I really wanted to do was invite people to help us on the sprints. So we've been taking feedback from people. So last night at the party, we ran into Mike, asked him some questions. He's like, man, it would be really great if we had a feature like that. So we would love your input, come help us, give us ideas for features, how to make things awesome. Our core developers that maintain the project are here. So Thursday and Friday, we're gonna be sprinting. We've got Nathaniel, myself. Beth, unfortunately, didn't wanna come. She's like, not a programmer and gonna be bored to tears so didn't wanna come. And then we've got Dallas resident, the Texan, AKA Jared. In fact, I think his picture's a little bit bigger there, I think, yep, everything really is bigger in Texas. You can check us out on fabricbolt.io and then of course the GitHub project, MIT license, pull it down, test it out, try it. And that's all I've got. Okay, hello everyone. I am Andrew Goldwin again. And I am here to talk not about databases or migrations this time, but instead about a product I've been working on for the last couple of months, I'd say. So the background to this is I've always been annoyed by the lack of support for things like WebSockets and Django. I love WebSockets, they're pretty great. They do a lot of interesting stuff. And so, oh, we're having interesting, let me try plugging in again, hang on. Perfect, okay. So channels is a sort of idea that I came up with a while back and I've sort of started implementing now. And so what it is is it takes one of Django's most core concepts and changes it around. So Django is a web framework that's tied to request response, right? Everything you do in Django, the middleware, the URL routing, the views, are all part of this request response cycle. Projects like Celery try and break that out by having tasks, but the core part of Django is still that. And so what I said, what if that wasn't it? What if there's a different abstraction we can take here that still preserves the simplicity of Django, but let's you do stuff with WebSockets, with HTTP2 push, with background tasks, all this other stuff that happens kind of outside that old HTTP1 request response world. And so I took the core idea of a view that takes a request and returns a response and took a new abstraction, a sort of slightly lower one that is called a consumer. And a consumer listens on a channel and it takes a message at a time and it returns zero to more messages. Now, this seems very simplistic and it makes no sense out of context, so let's see some context. So first of all, what this means is that you can implement a view as a consumer because what channels does is it makes a channel for incoming Whiskey requests. So you have a thing that listens on that channel, it takes the requests, it does stuff with them and it sends back responses on the response channels. Now, this is just left plugged into Django's URL routing system by default, but if you want to, you could do low level stuff there, but that's not the fun part. The fun part is that as well as all the normal HTTP Whiskey stuff, you get lots of other things as well. So for example, channels comes with WebSocket support. So you run a WebSocket server and then you get WebSocket channels you can connect to and you can listen on. And so you can say, when someone connects, you can just have a view that talks to a model, when someone, you can have custom channels. So you can say, okay, whenever this thing happens on the site, send a message to channel name X and whenever that channel gets a message, you can send stuff back to WebSockets and so on. And then that's kind of brought together in a concept called a group. So one of the things you have with WebSockets in particular is lots of clients connect and you want to sort of group them by like, boy, these people are looking at the live blog, these people are looking at our front page, they're looking at the chat over here and you want to be able to send messages to all of them at once. And so there's also a group abstraction channels where you go, okay, we're going to have, whenever somebody connects, we have a thing listening on the Connect channel for WebSockets and it puts them into the group as they connect and handles that stuff. And you can do more, so because you have these custom channels, you can do things like, okay, whenever someone uploads a new avatar in the save method, we put a message onto a different channel and then that channel's consumer does thumb nailing. And that's a very brief explanation and I'm sure none of you get what's going on here so let's go a bit further. So what's supposed to happen is I'm splitting Django apart. I've taken Django, which traditionally runs as a single instance process and making it three different layers. What I call an interface layer, which is the thing that talks to the outside world. So you have your normal Whiskey interface, you have a WebSocket interface, you could have a HTTP2 interface in the future and other ones. There is a channel layer and the channel layer is responsible for routing between the two ones on the side of it and there is a worker layer. And what happens is, rather than Django running as a single process that takes a thing, does one thing at a time and returns the thing, the interface layers sort of handle all the negotiation with the outside world and put those messages onto the channel layer and then the workers, much like salary workers do, for example, just take one message at a time, run the appropriate consumer and do the right stuff. So the kind of point here is that this is approaching some kind of asynchronous programming. I think programming is great, it's really tricky. And so my goal is to give the people of Django a way to do the useful parts of async without having to know things about race conditions and steadlocks and livelocks and all the other stuff that even with good frameworks you're gonna run into some really quite nasty problems with this stuff. So channels is this project. I have documentation that's far more verbose like it's doing an hour on the stage here even at my pace. So if you wanna go and read the documentation, it shows you an example and the idea of this project is it's meant to be a way to prototype something that could be in Django itself in the future. So it's currently a third party app, you install it, plug it in, it will just take over and do stuff. There's some work examples in there as well. And then as a final thing, I've put up an example project called FIFF, which is kind of like a link aggregator, Reddit-ish kind of thing, but with live comments and chat and stuff like that. So that's also up for you to use. There's a chat example you can go and play with now if you like, and the source code for that's up too so you can see how that works. And that's that in a nutshell. Thank you very much.