 Larry made the projector set up 50% faster by removing the chill. Will HDMI work? Will HDMI work? Will HDMI work? Sometime in this century, maybe. Oh, that's HDMI as well. Before? Very, very good. Last night, I attended, as a lightning talk man, you have social responsibilities, the party of the Kiwi guys, and so we were talking at the beach about romantic photos on the laptop of Larry Hastings. He will talk a short update of the galectomy. Give him a big hand. It's probably poor form, but you won't understand this lightning talk unless you've watched my talk from probably May 17 of this year. I gave this talk about what's new with the galectomy back at Pycon US. You haven't seen that talk. This is a YouTube link. I hope you can write that down very quickly. Anyway, I only have five minutes, so I'm going to go quickly. Here's an overview. This is the last important slide from that talk, showing you that wall time, the amount of time that it takes to run a CPython program in the galectomy versus not in the galectomy, has been getting much better. When I was done with it in May, I haven't really touched it much since, this black line is showing you what the galectomy is like versus the red line, which is what CPython is like. So I'm catching up very quickly. So while I was testing during the end of May, I noticed that memory consumption sometimes would go crazy. Already, it was too high, which I wasn't really worrying about. I was like, I'll fix memory later. But sometimes it'd be two gigabytes for this simple program, and sometimes it would be six gigabytes, and sometimes it would be 10 gigabytes and when I'm in America, you can crash. I knew something was going wrong and I didn't have anything else to look at, so I thought, okay, I'll look at this problem. Inside of CPython, there are two ways that it can allocate memory. There's normal library malloc and then there's what's called the small block allocator, which is Python's own special thing for small objects. I determined very quickly whatever was allocating all this memory it was doing with this small block allocator, and so I had to add instrumentation to figure out who was allocating all that memory. So here's the result of that. I printed out this very pretty thing. You can't read that, of course, it's too small, but one of these is 100x the next category. I'll zoom in on that. One particular block of memory. These are allocated by size, so we were allocating objects in the range of 473 bytes to 480 bytes and we allocated over 8 million of them. The next largest allocation was on the order of 15,000. So what is this object? I had to add more instrumentation and I figured out that it's frame objects. A frame object represents a function call in a running Python process and my Fibonacci benchmark is of course doing loads and loads of function calls, so I had to figure out why we were allocating all these function call objects. So I added some statistics to that and that showed me that we were allocating 5,000 of them simultaneously. Now this is a little crazy because if you think about Fibonacci, the way that a bad recursive Fibonacci works, if you call Fib of 30, their stack never goes more than 30 deep. So why am I allocating 5,000 of it at the same time? This is actually another single-threaded program, by the way. I wasn't even doing multi-threaded at this point. So why do I have 5,000 of them if I only use 30? There is actually a free list for frame-less objects inside of Python because they're such a hot object they get reused all the time. So why isn't the free list working? Why am I allocating 5,000 at the same time? So I added a bunch more logging inside of the Galactomy and I produced a graph. So this is what the graph looks like. All I did is printing out bars. Red bar means we allocated a frame from the free list. That's the thing that's fast when we like that. Green means we allocated a frame from malloc because the free list was empty. Blue means we deallocated a frame. The free list wasn't full yet, so we put it on the free list. And black means we deallocated a frame and the free list was full. And so we had to give it back to C. We had to free it normally. But the graph doesn't look like this. It's super bursty. So what's going on is, again, if you remember my talk, I talked about this reference count manager, this thing that handled reference counts and got rid of all of the contention. But it added a lot of delay. What's going on is that we free one of these free lists and then it waits for a long time and then the reference manager handles it and then it says, oh, it's done. We're going to give it back and it puts it back on another list where it gets put on the free list. So now there's this enormous delay between the last person getting rid of the free list who wasn't interested in it anymore and it actually getting on the free list again. So I have various ideas on how to solve this. I might very carefully watch when free list objects are ever given back and then if anybody takes a reference to a free list, the free list, frame list objects need to obey reference count rules. But if I happen to know that I created it and I haven't given anybody else a reference to it, so nobody can have a reference to it right now, maybe I could just put them on the free list and go on with my life. Or maybe I just need to create lots of them and do it in such a way that I'm not spending all of this memory like crazy. But the purpose of me giving this talk was just to show you A, there's nothing that's incredibly difficult about working on the Galactomy. It's just a lot of work and a lot of statistics and a lot of thinking about what could be the problem and figuring out what the problem is and I'm still confident that I'm not going to run into any problems that I can't solve. The major problem is figuring out what the problem is in the first place. I'm done. Alex, can you please set up? Thank you very much. Oh, you don't need to set up. That's wonderful. Google some of code experience. Alex Maxim, give him a big hand. Hello. I want to talk about a story about a story that happened to me. Everything begins in 2016, last year with a presentation about GSOC and what is that. So this happened in my college and I was very interested in it. Why do you think I was interested in money? Right? Okay. So when I heard about how much money can I get from it my eyes turned like stars. Okay. I think you too. Okay. After I tried to... I tried with Quala organization to enter in GSOC I tried to some issues. Also I was very I have I had much to work in my college too. So I had to do stuff. I had to do work for college and also for the organization to enter in GSOC. The announcing day has come and what do you think so? Those idiots didn't get me in. Okay. I was very frustrated and very angry. I failed. I mean I just failed. After a month or two months I I stepped back and tried to figure out why I didn't enter in GSOC. So I couldn't enter because I sucked. Okay. It wasn't their fault. It was my fault. Okay. So when you try to blame something try first to understand if you aren't you're safe just just failed. Don't blame someone. After this year I tried again to enter in GSOC. So it was like something very difficult. I had a friend a colleague that helped me a little. That pushed me. I got stuff done and so on. Again the announcing day has come. And guess what? Yeah, I entered. Okay. So what do you think about it? I want to I want to understand you to learn from it and maybe you know, I don't know. I want free things that would want to remember perseverance focus and get your shit done. Thank you. Daniel Pope on the stage and please set up while he's setting up. I've got an announcement from the biti.com there'll be an informal meetup about Bitcoin Ethereum and blockchains in general. It will happen at the sea by the sea in front of the Tiki Chiranguta beach bar. That's the same like the Kiwi party was last year. Note there will be some free beer. We'll still be there, but it's an informal meeting not endorsed by the European society and not liable from them but it's from the biti team. Please raise your hand if you would be interested so they can know how much beer they have to order. Please raise your hand. Biti team, can you count very quick? We have two, three, four, five. It's around 15 to 25 in a ballpark. It's the Ethereum course right now. Now give a big hand to Danny and Pope. It was working. You screwed up again. You killed it. It was good. Oh, okay. Well, maybe they'll come back. You come back, okay. Can we have Oscar Najira? Oh no, you do it with his chair. It's even better. Give him a big hand for the big chair. How, you know, we're famous. Could you give me like a little sort of neck rub? You know, I always skipped it when Rob made it. And what will you No, no, no, no, no, no, no, no, no, no, no, no. You have to give money. That's not a paper in the Software Foundation approves back rub. Really? Yeah, I did not go in the qualification. So, okay, I don't have slides. So, you will notice I am not the guy who has previously done this. And the guy who previously did this was Rob Collins, who is sadly no longer with us. He died last year. He was a great guy. He was always cheery. He contributed to my projects and he sprinted alongside me at EuroPython in 2015. And I think he would like it if we continued the tradition of massages in aid of the Python Software Foundation. So, so for this we need you. So, you are going to give the massages. The massage training will be tomorrow in the Argo room, which is a breakout room. If you forget that, it is on the breakout open space board. And we will give massages at the social on Thursday. So, these massages are in aid of the Python Software Foundation. The Python Software Foundation it protects the intellectual property of Python and it also sort of fund raises it. It gives grants to your meetups, to Python projects that benefit the community, PyPI, stuff we all use. So, it is a great cause. The Python Software Foundation is a charity. So, I want you to volunteer to give massages and come and learn it. And also give generously during the social. You can also come and just learn to massage along with us. You don't have to actually volunteer to give massages. To change the topic slightly, I recently got engaged. And that is entirely due to my massage skills, these talented hands. So, my fiance just loves my massages. So, thank you, Rob Collins, for all you taught me. So, please come along, learn how to massage tomorrow. It is at 2 p.m. in Arco. And if you don't want to do that, you can just donate to the PSF anyway. We will probably sort of stop you and say, give money for a massage or else. I mean, like most people in previous years, we got more money out of people avoiding having massages. The heat makes people quite sweaty. So, if you don't want to be massaged, you can give money to get out of having a massage. So, that's it. Thank you very much. Oscar, are you still selling up? That looks good. I was always interested in the statistics by Rob. How many paid for going away and how many paid for getting a massage. Interested on the updates. I need Thomas Walton to come to the staging area. And maybe the byty guys, they have the place coordinate. I'm assuming that meetup will be around 8 o'clockish. Is that correct? Yes, 8 o'clockish. It's an Irish time stamp. It's not a German time. 8 o'clockish. Okay, wonderful. So, yesterday we were doing philosophical thoughts about things that are supposed to be romantic. And there was one thing there was a lot of profiles with I like long walks on the beach. I went to the beach. I stood there for hours and expected thousands of young ladies walking long walks on the beach. But the only thing that happened was some old guys with not a lot of teeth trying to sell me fake Rolex. So, never trust anything on the internet. We have three cables now. Hey, that looks good. That looks right, not so good. Okay, okay. I have to do it without slides. That's good. We will be talking about Sphinx Gallery. Learn, teach by example. Give him a big hand. Okay, I'm going to present you a side project that I've been leading in. It's called Sphinx Gallery. And the main idea is to help teaching your software. Because when you are new to a software package and you want to learn it fast, you barely approach it through the documentation. And whatever approaches you have is usually I have a question, how would I do something? And then the answer is stack overflow. But sometimes you don't even know what to ask. And then it has been a wonderful resource. I don't know who knows the Matlock Lib Gallery. Okay. More or less half of the audience. And there it's very intuitive to me because I have more or less an idea of what I would like to see. And then I visually scan the gallery until I find a plot that that's what I would look like. And then I click it. And then the idea came, why cannot we have this in every other open source project that at least has graphics or text output. So I developed what it's Sphinx Gallery. Which is just a Sphinx plugin that you can put in your conf.py. Just import Sphinx Gallery and tell it, well, I have here a bunch of scripts. And that will just render a new Matlock Lib Gallery, but for your project. And you can always virtual control these Python files. And they will be always parsed to an HTML. You can enjoy all the RST syntax so that you have a really rich visuals and text. All the math parsers if you're working with scientific formulas. And on top of that there's always an exporter that takes all your Python files to Jupyter notebooks so that people using your software can download them and try them directly out. And I'm trying to hold the sprint on the weekend. If you want to join and learn the experience of a software project, you can help me continue developing this project. Thank you. Thank you very much. Now Alex will try to help Tomas about memory leaks and adapter leaks. So please tell, two to three jokes now? Two to three jokes. I haven't prepared that many. But I wanted to... Oh, it's... Oh, yeah. Okay. When is it a joke? No, when is the memory leak? Thomas Walton, give him a big hand. Hello, my name is Thomas Walton, I work for Cisco. I share some experience I have of when a memory leak is not a memory leak because Python's a great language. Surely it doesn't have memory leaks. But a colleague sent me this graph and it's from the end of the test and Python's at the yellow line so you can see that the memory usage was up to 12 gigabytes and the OS killed it because it had no memory left. So why was my program leaking 12 gigabytes of memory and then having to be killed? So I've come across this before. This wasn't my first time but I thought of three reasons when a memory leak in Python is not a memory leak. So the first one is really obvious, when you still got references to the objects. Here's an example from some library, Jason RPClib, please don't use it. If the author's here, I apologize. But it keeps all the requests and responses in history. So unless you want to delete them every time you make a request it's going to leak memory. That's really annoying because as a user you just make a request and you think it's just a request and you deal with a response. So I've done this before. I've seen this. I use the Object Graph module. Now other modules are available. The PyEmpler module we heard about the other day. So I've used Object Graph before. So I started with Object Graph show growth. This seemed pretty good. I could see... I've seen some objects that were in use. So I ran that during my test and I got this. So it's looking hopeful. I'm seeing some leaks in these log message objects. I've got 60,000 in memory. So good thing now. I can use Object Graph to find out what's referencing them. So I can randomly pick a log message that's in memory and then I can ask Object Graph to draw me all the back references to those objects. So I come up with a diagram like this which I have to say I was a bit disappointed with because that's exactly right. That's how the architecture... it shows the log message but it was exactly what I was expecting and the log message on that deck will get processed and will free the memory after time. But that didn't fit with the symptoms of the bug. So to avoid any doubt I turned off the bit of the code that used that deck and the problem still happened. And this is what my sort of printouts were looking like. And it was pretty rubbish. There was no growth. So I got a bit desperate. I started turning off the thing. I made this problem. So I drew some object graphs of it. But the object graph looked like this. And in fact that's not even it because it looked like this. I can't actually fit it all on the screen because that's how big it was. It's a 7 megabyte PNG. So that was useless. Completely useless. So I thought maybe this is a Python 2.7 program. It's still old I'm afraid. So maybe it's when the interpreter doesn't return your freed memory which if you do make a list, a massive list and then delete it you'll find that Python is still using loads of memory. There's more details on Stack Overflow. I don't know the details but fortunately that's no longer the case in Python 3.3. So don't need to worry about it too much anymore. But it wasn't this either. So I was a bit stuck. It was neither. What do I do? Well, I scratched my head and I came to... I realized that I looked at top and thought my program is running at 100% CPU all the time. That's not great and I'm doing a lot of network I.O. So what's happening? So I finally came to my answer which I can't say I still understand properly but where's memory leak nor memory leak? Well, it's in the Twisted TCP server send buffer because in Twisted it was just stuffing stuff onto this temp data buffer which didn't seem to be leaking an object graph but basically be careful if you're doing network I.O. and you're running 100% CPU you may find your buffers fill up and even when your clients disconnect it may still be stuck in the buffer. I'm assuming that's Twisted bug but never mind. Thank you. Thank you very much Thomas. So I need Maximilian Schultz to come and set up and I need Lara from last year. You may remember my saying that I won't do any job a computer can do better. Last year in Bilbao Lara was the mother of robots and she had a small robot there and I knew that robot will sometime replace me as a lightning talk man it will be the lightning talk robot so I already prepared another career with eating carrots and Lara until that will happen will guide you through lightning talks should there happen some in the coming today's because I'll be leaving tomorrow and as I understood you have an announcement which will keep our audience safe until tomorrow you should grab that microphone from Max push him by side. Thank you very much very important announcement so hi lady as he has said and I just have a small advice security advice because tomorrow is the social event how many of you are going whoa okay so nothing important on Friday nice I just want to remind you that the social event is not going to be ever python exclusive it's going to start that way but then we are going to open to the public and okay I just want you to freak out but I'm going to say this thing pit pocketers exist okay so just well there you have one well okay so we just want to remind you to your common sense and just don't leave everything lying around look out for other python stuff things and just be careful okay so have fun thank you so there's another warning there is often that scam you put up a sign be careful pit pockets and then people start touching the bag where they have their valuables to check if they are still there and the other guy steals it from exact that place I saw that in a TV series not on the internet now give a big hand to Maximilian nice to talk thank you everyone so this is an even more personal talk than yesterday and it's kind of the prequel to the trilogy that I finished today because this is the talk how I found happiness in life again um I use the title anyone can dig a hole but it takes a real man to call it home it's a song title of a band and I think it kind of resonates with feeling a lot of people have that have personal problems which is be a real man don't show it keep it to yourself and just dig through it and I don't think that is the right way to go about it so um two years ago I had a lot of personal problems which include stuff like the feeling that I had no skill this is broadly known by the term imposter syndrome so even though I was still in university at that time and even though I passed my exams and I felt like I did pretty well I always felt like a cheat I never had the feeling that I really understood what was happening or I maybe could even use it in a job uh the next thing what that's not good enough I was a very very unhealthy perfectionist everything I did wasn't good enough didn't live up to my own standards even though others told me it was good enough um then there's stuff like I didn't feel anything was worth something if I didn't suffer for it so if someone offered me a job because he knew me I couldn't take the job offer because it was a gift I didn't work for it I didn't suffer for it so it was worth nothing um and the last thing for me was it was only success that mattered in my life the only thing that drove me to do stuff was because I wanted to be successful this had the positive side effect that I was very successful in the things I did because it was the only thing that drove me when I played a video game I was very good at it if I uh at that time I played paintball and I then played in the national team uh for a short duration and everything I touched kind of turned into gold and a lot of people told me why are you sad because everything you do you're being successful at it and I that kind of was the problem I was being successful I wasn't being happy so uh two years ago this happened this is a picture I drew as one of uh the counseling sessions I took afterwards um and those lines show stuff like how happy I am uh how successful I felt over time how much responsibility I had and uh you can see the small uh Loch Ness monster which was where I hit rock bottom that was a time in my life where getting out of getting up out of bed was a very hard thing and um there were multiple days or even weeks where it didn't eat anything or just laid in bed for several days without getting up without doing anything and at some point um I I was a tutor in my university and um we have had a like schooling for one week uh because we helped the first semester students and we learned uh how to work with groups what we should uh show them and stuff like that and after that week uh and probably because I knew the woman that uh was our chef um I got the courage to ask her for help so uh she gave me the tools to build the letter to get out of the hole and that all that took almost one year and uh there was last year and I started to go to conferences uh last year and um what happened at that time was I started to think about what I value in life and how I wanted to live my life and what I wanted to find in life the usual question you hear about stuff like like if you're 80, 90 years old and you look back will you be happy if you are successful or will you be happy if you had a happy life um and so what what changed for me was uh that I changed perspective from being only focused on success I changed my perspective to being focused on being happy so it wasn't important to be the best but it was important to be happy while I did something so I started to take on hobbies and started to meet friends again and um mainly I just uh changed the core value of my entire existence you could say I didn't want to be successful but I wanted to be happy so I would like to ask all of you and maybe if you know someone that might need help um get up again even if it needs a helping hand and I know that's probably the hardest part asking others for help thank you thank you very much okay our next speaker will be Celestine Klein Klein Esper Klein Esper okay you will set up the system somewhere or you just need to read yeah like this okay okay hi everyone so this is my very first liking talk um and I talk about something that most of you uh might consider alien it's called energizer and it's kind of a tool to create a very productive group dynamic and um to get a little out of your comfort zone um I do it a lot a lot with uh pupils and python workshops so when they're um programming microbits by using python and they're sitting for a long time and um I don't know staring at their computer it's nice to move a little bit especially with a bunch of boys and girls whose hormone level and urge to move is like abnormally high and um yeah I'd like to show you um how this works and therefore I want you all to stand up so later on your laptops get up just a moment we are going to do something called microwave it's an energizer with three levels so make sure that you can move and you don't hitting your neighbor with your elbows does it work yeah it looks wonderful yeah you you're all beautiful so we start with level one level one goes like this mmm okay level two is like this yeah okay it doesn't work we're doing level two again mmm yeah great and level three is this yeah oh my god this is wonderful okay we're going to do this again a little bit faster level one mmm level two mmm level three mmm yeah you got it okay we're going to do this one last time level one mmm level two mmm and level three did something like this before wow okay okay nice um I wanted to introduce it um because I think it can make you feel like being part of something big which is a nice feeling and um I learned about myself that I really like to push people to make experiences like that and um this is also kind of the main target of education um so like making people um discover something new like um encourage them to uh develop a little more um and um also the method so like energizers are a tool or a method to encourage people a little more and getting a little bit more self confident and um I think that it doesn't really matter if you loved it or hated like the microwave thing because you just learn something about yourself um and learning and understanding is like about confusion to uh discover something to be amazed or even curious irritated, fascinated everything that captures you is uh pushing learning and understanding forward so um I think that just as you might be confused right now about this alien education method um pupils and teachers can be confused in the same way about coding which is a shame because we see that coding is um everywhere I mean we're at the Europe Python we see that it is in politics and economy even in architecture if you remember the lightning talk yesterday and so it has to become a bigger part of education it has to be more important and that's why I'm here I want you guys to think about how you can amaze and fascinate and making people more curious about what you're doing because what you all are doing is amazing and I'd really like to get it more into the education level so thank you very much we need to create something sustainable with education and coding together and we just have to do something and get out of a comfort zone so check out the koala website the koala school which are the micro bit projects I already talked about and if you have an idea or like feedback how you how to make you feel just write me that's my mail address and thank you very much thank you so much Michael from still working I need Fabian Neumann Fabian Neumann I'm running to the stage and I need Paul Roland okay already Fabian please set up so we are currently at 1743 that's military time for quarter to six and we are currently at lightning talk number nine of 23 huh you should have you don't have an adapter with you no but wait a minute it says something yeah try okay we have many lightning talks and not a lot of time we have this venue for a little longer than six o'clock so just a feeling should we shut down at six o'clock please raise your hand okay some people think yes um should we take another half hour or more 40 minutes or more also the majority goes down between 30 and 40 minutes okay signal understood um Fabian will find an adapter and we are switching to Paul is that correct wonderful Paul will be talking about slicing a carrot that's great thing for the bunnies with us we will cause bunnies eat carrot Alex could you help the guys with the setup they are when you were standing next to them it worked fine one of the cables does not work maybe take away the cable that does not work so probably let's just like okay that's better no cable left behind is a stupid thing take this cable away and you take it down kill the cable cable cutters are on the rise people using internet streaming stuff it's working it did it did yeah I saw it anyway what do you get if you cross yes we need you what do you get if you cross an octopus and a cow I can try a wizard from the ethics board and a cutting of all your funding it goes white and black and white and black it's very fascinating it's totally fascinating one thing it detects it I'm a production fan what I'm very very sorry about is that we don't have a lot of utopian science fiction the only utopian science fiction I can quote of my head which is popular is Star Trek they have a future where people just work on bettering themselves getting projectives to work oh we're still working on the resolution you need to lower the resolution for people who come after me it doesn't do what full HD resolution it says it can do it but it freaks out it's lying anyway how to 15 years to slice a carrot 5 minutes to set up a projector go right on give him a big hand hi I'm here to tell you about a new project by the Plum community which is a new UI that we're currently developing it's going to be radically simplified you may think clone has been around forever yes we have been some people say that to me as if it's a bad thing it's not a bad thing it takes a long time to learn to do something well if you're a sushi chef you can train for 15 years to slice the perfect carrot that long experience we've been around for 15 years and we've made some really bad user interfaces mostly because developers wrote them and then there was this well it kind of worked but then you had these users that came in and put content in them and you had this beautiful setup with a folder with pages if it became more than 20 and then the users came and put 20,000 documents in and it all stopped working so we are now rethinking maybe we're doing it it's showing in the background to make it radically more simple because we need to also UI design is really hard you tend to do UI design and everything fits on screen and then somebody goes and translates your software in Finnish and it doesn't fit on the popup box or any other language that makes it really long or happens to write stuff in a different direction so it's kind of hard but we're getting there we're getting a lot better one thing that's really important is to have mobile first I mean when Plone began it was fine to do it on a computer and then somebody came along and invented mobile phones bastards everybody's using it and it's especially important like me I work for a non-profit and most of my users are in Bangladesh and Cambodia and their phone is the only computer they will ever have so it's not enough to give them a stripped down version of a site it has to work all of the functionality has to work on mobile otherwise these people cannot use the website as intended so that is also a hard problem because Plone is a rather complicated content management system you can do a lot of things with it which means you have to redesign it so that you can do all of those complex things the complexity is needed but you can hide it and you can structure it so that it brings the most important things to the user first the people developing are called pastanaga which is catalan for carrot or turnip the catalans are not quite sure which ones they come from Barcelona most of them have worked at the University of Barcelona which has a huge Plone site so they've actually also studied the behavior of users and where they struggled so we're hoping that by reduce, reuse and recycle we can cut down the complexity that a complex piece of software like Plone needs to have to make that in a way so that it's usable for people who are on mobile people who are on desktops people who speak various languages around the world people who are blind people who have other accessibility issues and yes as I said before 15 years Plone is a long time but sometimes it takes you like the fifth or the sixth attempt to get things right I'm not saying we're getting it completely right now but we're making a big step in the right direction there's more things on Plone going on we have a roadmap come on Friday and if you want to have more good weather and more nice food we have a conference in October there will also be pyramid tracks and other tracks thank you very much Paul now while Fabian is setting up I need Oliver Bestwalter make yourself seen very good you don't have a setup that's good we can move on much quicker and wow that's the desktop that's great so you're from the UK I guess no no no it's from my other hobby, board gaming it's an upcoming board game it's a board game brass right okay you will be talking about daytime as time zone is confusing you yes that's confusing okay we have a global company we get confused with time zones all the time we just agreed to always have our meetings scheduled on UTC and even that goes wrong sometimes once again bacon and egg walk into a bar the bartender says sorry we don't serve breakfast here that looks great okay then I don't see it on my screen I have to a Roman walks into a bar raises two fingers and gets five beers wow give him a big hand quick quick so I have to look at this screen actually okay yeah this is from a little quirk I encountered last week and which took me or stole me two hours of my life maybe it helps somebody if I mention this here so just a little context in the beginning daytime library module I think of Python everybody knows what does it do for us first the context it's on my laptop it's central European summertime 11 o'clock in the morning Python 3.4 okay we import daytime and so on we say give me give me the current time in UTC it says okay nine o'clock fine everything's good then we say okay now give me and it's a date time aware time stamp right because it has time zone attached to it now I say okay give me the current time now it gives me my local time also fine and then there's this function UTC now which gives me again UTC time nine o'clock fine but this time was out and attached time stamp so it's naive so then there is S time zone a method on a daytime objects which basically converts a daytime you have into another time zone fine so let's make an example okay daytime give me the current date time so now and now convert it into time zone UTC what happens in pysons 3.4 no idea okay value error S time zone cannot be applied to naive daytime so there is no time zone information attached to it so S time zone doesn't work which is fine because that's how it was always now fast forward to pysons 3.6 exact same situation daytime now as time zone UTC ooh it works actually it's correct it's nine o'clock and the documentation about daytime as time zone says and changed in version 3.6 the S time zone method can now be called on naive instances okay so far so good let's take it one step further but now daytime UTC now so again remember UTC now gives you UTC time stamp but again in a naive instance so without any time zone attached so what does it happen when I say UTC now and then convert it to UTC what would you expect huh seven o'clock yeah that's not what I would expect but okay yeah so basically I say give me the current time in UTC then convert it to UTC but that's not UTC anymore because in UTC it's nine o'clock and not seven o'clock and that's the second part of the change entry is that it now can be called on naive instances that are presumed to represent system local time so it takes the time zone of my system local and converts it and so on and then converts it basically again which yeah for me doesn't really make sense and now the questions I have for one thing does it make sense defaulting to system local time yeah maybe probably what's the best practice basically our code broke on the assumption that the value error should be raised and we relied on this and then it failed and I got timestamps which we have four hours off and I was looking into this and couldn't make out why the question is what's the best practice now anyway so should we use daytime now with an explicit time zone UTC which then gives you a date time zone aware time stamp or should maybe UTC now return an aware daytime by itself and isn't this a breaking change the whole change is not mentioned in Python 3.6 change lock neither in the long change lock nor in the what's new section it's really only mentioned at the daytime modules as time zone documentation so if you have answers for me why this was change like this maybe some CPIs and core developers here or knows the ticket or bug that triggered this change I would be happy to know why this is like that thank you thank you very much I need Miroslav to make him say himself visible Miroslav very good and now we'll be listening to Oliver Bestwalter about what is TOX TOX is TOX written with an O so talk over now give him a big hand I prepared slides and everything but seeing this technical catastrophe unfolding I thought I don't do it and actually I realized I want to talk about something else anyway I wanted to explain to you what TOX is and how it works and whatever but it's actually not really important and I think if you're looking at automation and all that kinds of things the probability is pretty much 100% that you will stumble into it somehow and then figure out if you want to need it or use it just as a hint if there's a TOX .ini file in any of the Python projects that you saw then the project uses TOX to automate their testing and whatever you can do everything with it building docs deploying them is I stumbled into that project last year I'm a big fan of open source software for a long time and I always thought there were these personal talks that inspired me a bit because there's this feeling I'm not good enough or I can contribute anything of value or things like that I had that a long time and I stumbled into that project last year and it turns out I can help I'm now one of the core developers and to me it's very important to make clear that A I think if you're really interested in this kind of thing and you want to do it then you can do it and the other thing that is even more important I think is we are all pretty much all the technology companies are all pretty much I don't want to say anything negative but I mean the word software so we're all using it everybody takes it for granted if things break people start complaining on the issue trackers and expect they get free support and I think there needs to be a change of attitude and especially from the companies and I don't think that happens from the top down it has to happen from the roots up so I managed to convince my employer that I can use 20% of my time for open source development mainly talks I was really surprised that it worked I tried and I talked to them and it went up to the CTO and I had a talk to him and he understood that although we don't get any money directly out of it we really need it and things break down and so we said yeah go ahead so I want to encourage everyone who has these questions and these ideas and is working in a company that is heavily using open source which is pretty much every company and they want to give something back to try to take this route and if you have questions about it if I can give you any tips or something just approach me yeah that's it basically thank you very much while Miroslav is working to stage I need Pablo Pablo what did the cannibal get that came late to the dinner party a cold shoulder so Miroslav will give us one keyboard layout to rule all Latin alphabet one keyboard to rule them all give him a big hand I don't have my computer with me now because I need to see your computers how many of you are using the standard US keyboard layout oh very nice I like this keyboard layout it's so simple it's the basic one and what I like the most that every key has only like two symbols on it and one of my or my favorite editor was built for this for this keyboard layout HAKL and the brackets and everything is on the right place so with me sorry no no no I always use English layout my hands are on in the right position I can do everything but from time to time I have to write in German and in German you have these strange people and the sheep is and if I ask the people who understand me how many of you know that there is a big sheep for two weeks and that you have to write and after that you have the and then when you point it out but it looks like some kind of Anders my nickname is Shedivi Shedivi yes it's Sh not even in English American not even in German I don't get it that means I have to turn it on in Slovak sometimes I also write in Czech if I want to write one of my nicknames or if you come Zzluteuczki Kuň upiel Diabelske Odi then I need Slovak or Czech again it's a quarter all the signs are then all the interpunctions somewhere else and besides that number I have to do it with a shift how many times do I have to write in French what? what's the name? Azehti? so maybe I have to write and use the word Azehti but the problem is there is still a difference Azehti the M is in another line and the point that we use when we say we prefer the most we have to use a shift it really hurts normally I don't write in Polish I write sometimes in Polish I don't have a Polish keyboard but when I write someone whose name is Grzegorz Brzeńczykiewicz and lives in the Czech Republic I don't have a Polish keyboard on the American keyboard and I haven't seen a Polish keyboard so I have to know something what I can write in Polish Europight I think it was brought it was for the first time in Bilbao it was my first Europight to meet a hotel or friends you have to write in Spanish and I've never seen a Spanish keyboard but I had to write in Spanish and now I have to write in Italian and another time there is a keyboard Italian that I've never seen but I wanted to write in Italian after all these cramps two years ago I discovered two things for the back it was Rob's messages and for my hands it was the compost key this is the key that was around in UNIX or UNIX terminals in the 80s and you can install it now in your Linux Macintosh or Windows again actually it is one key that you don't really need it is like next to the space some windows or a menu key and then you just activated once and then on your keyboard whether you use German, French or English or US one you type one modifier and then the letter so it means that you also have letters like umlauts or axon and so on but also if you type compose.dot you get three dots if you do compose one two you get the fraction google for compose key for your operating system and if you have any questions just come to me as an extra tip for those who would like to use their caps lock as a control and escape key at the same time ask me afterwards thank you very much I'm not really sure if Miro Slafri knows that many languages or if he pulled a harpy cackling and it just sounded like different languages anyway great talk yesterday I learned that you only need one sentence in every language I'm handsome give me free beer so now we have I think Pavlo about yet another way to await we are waiting the protractor and hi I'm Pavlo and I'm going to talk to you about async.io so you heard a lot about async.io during this Europe Python previous Europe Python and probably the one before so keep calm I'll be awaiting for you so we know all about now how many people heard about awaitables alright okay so these are the two peps let's talk about awaitables that implement awaitables so I'm going to show a few things so basically the game plan is so we're going to take the usual like iterators like done the iter, done the next and what anyone wants to guess what this code is going to do this is a Jupyter notebook by the way here we go so we take our standard done the methods and append a and we turn them into async done the methods right so let's see how we can implement something with those done the methods yeah diastrates anyone um yeah I can try the power of windows by the way right yeah so what are we looking here is like all kind of so this is an async generator this is what I want to talk to you about so you probably you probably heard about async generators during this conference the reason why I am standing here is because I came across a PyPy package um presented I think is in PyCon 2016 which is called Asynchronous Generator but now it's in the standard implemented so now let's have a look how it works so basically it's an async generator that is going to yield something and we also can inject values back into the generator as we do with standard generators ok so let's make sure that we create this generator so what you can see this guy is going to return 42 full and bar and then quit ok and it's also going to listen to injected values alright let's run this guy oh yes we actually need to run this guy so yeah and it waits one second after each value and basically in the meanwhile it's free to do other tasks so that's the beauty of it you're doing it async ok now how many so I saw quite a few hands when I asked about async generators how many people have actually used async 4 alright fewer I was going to say I can bet money so as you can see async 4 is a nice construct obviously it also expects awaitable yes awaitable so here this was just a thing so we just use it as an iterator in the next slide we're going to show like how we can communicate with the generator so here we use the standard command so instead of send is going to be generator.asend so we always prepend an A right so we use an asend so the generator receives the command and on the next iteration you can see the injected command so now I'm printing the tuples and the injected values here so it's kind of useful it's good to know that this machinery is there we use it from time to time what else is there so in the dunder methods I was shown there was an enter and exit context manager so what if you have to do some heavy lifting when you enter and exit your context manager easy let's execute this guy so now it's basically code similar to the one before but now wrapped with the enter and exit will say enter enter in context leaving context there you go and this is all async all right so Pavlo so this is how you can reach me presented on windows thank you very much I need even thought come to the stage and Sebastian what to make yourself visible Steven Ports come run system is waiting Steven Ports will talk about an abundance of libraries give him a big hand thank you hi I'm a physicist and data scientist and today I want to share with you a small story about some former colleagues of mine about short of a decade ago former colleagues started their PhDs they figured out okay what kind of language do I work with now and they quickly found out python got some got some steam and the one started out and didn't find the right libraries they were just being developed not quite mature enough so we turned back to Matlab and did his stuff in there he did great with that and was fine all along the other one didn't stop there he started out to build his own project he developed he got some really sleepless nights about that developed his open source project and now not only he himself but quite a number of master students and bachelor students have been working with his library creating some awesome research what I want to tell you is building these libraries is awesome and nowadays that there is a great abundance of that I as a data scientist can go there and have like import a few libraries just run a few lines of code and basically my application is done and it's all thanks to you who are working on these projects creating them, bringing them further having them staying alive thank you all thank you very much Sebastian now we'll talk about go to and other crazy stuff you can do with bytecode let's go to is crazy I would not accept go to to be crazy but we will see what he will be doing with bytecode or trying to do, yeah keep on I just talked until you get your thing running your computer did you know that sharks have been longer on this planet than trees that's correct I can't climb on trees at least it's one try of an explanation and remember the photon who checked in and the receptionist asked do you need the bellhop to help you with your luggage and the photon told no I'm driving light Daniel do you do your presentation without oh he also has a laptop did you take the other broken one again oh this one is broken VGA that worked last time in 2005 I also have display port I think but not the full size display port mini size display port maybe you get an adapter and Daniela tells us something about Pycon UK don't sit down give somebody what do you need an adapter of I think it's mini display port to regular display port it's a sync pad okay somebody is bringing Daniel Procedar will hopefully he promised that his laptop will work whoa he will talk about Pycon UK give him a big hand okay it was good so um yeah thanks I want to talk to you about um Pycon wait a minute wait a minute I just want to talk about an unfortunate incident that left us feeling rather bad especially those of us who discovered on the 24th of June that we were going to become second class citizens after living in Britain for 31 years and some of us are bitterer than others but the thing is that gambling is a terribly destructive addiction and politics and our world is full of these wretched victims of this terrible compulsion like our former Prime Minister David Cameron who gambled away the future of the whole country in an attempt to win a battle in his party and this is David Cameron and our glorious Prime Minister for now Theresa May who gambled away her own government so she too has anyway while there's still a chance you're very welcome to come and visit us in Cardiff for Pycon UK 2017 26th of October to the 30th four days of talks and a day of sprints tickets are on sale now our call for proposals is open we'll close on August the 12th as I said our schedule and the black border is in recognition of our loss and Pycon UK.org come and see us it will really cheer us up thank you wonderful and trust the recommendation try to postpone the payment because the tickets will be charged in pounds and it's in freefall so for the guys from Iceland it will be a very cheap trip when you want to drink it's cheaper in Birmingham anyway and with the pound to the Icelandic Krona you essentially make money if you drink beer anyway we're trying to wow that looks good now he'll be talking Sebastian about go-to and other crazy stuff done on Debian Ubuntu Debian or Ubuntu anyway it's Debian give me a minute take your time it's just running yeah that looks good so who of you thinks that this code is actually valid Python code so what it does is you might know label and go-to from C and other programming languages so we have defined a list there then we have a label then if the counter variable is equal to the stop parameter we jump to the end label otherwise we move on with the code append to the value to the result increment the counter and then jump up to the begin again pretty much straightforward traditional programming style using go-to and this is actually valid Python code so that is because go-to.begin is actually valid syntax for attribute lookup but in this case those variables don't exist so if you try to run that code it will fail with a name error however I've written a library and if you decorate that function and then run it and the way this works is basically by rewriting the byte code what this what the with go-to function decorator function here does is it calls a patch code function which then calls find labels and go-tos and what this function does it calls another function that passes the byte code and now back to find labels we identify load global and load name operations followed by loadata and followed by loadata and pop-top and the byte code that is generated for an attribute lookup and if the object the attribute lookup is performed on has a variable name label or go-to we pass them as such and then generate new byte code in the end and it's on pypy you can install it using pip install go-to statement go ahead use it in production it's also on github and it's compatible with python 2.6 onwards also pypy wonderful the last time before you leave I have one more question which is the pep request we have to vote for to get it into python 3.7 yeah I will second that there will be a pep request to get it in python 3.7 and maybe it will be turned down maybe not harrod d will talk about sql, alchemy and chanku object relational mapper by the way does the name Pavlov bring a bell yeah it's bad for this late hour wow the desktop backgrounds get beautiful or un-beautiful is beautiful or what not really huh so people often ask me why do I walk along the stage so much and not stand still there are two reasons I have a fitness tracker counting my steps and the other thing I know from relativity when I'm moving subjectively my time is moving slower and I'm just getting older faster for you guys or something around that so harrod will talk about sql, alchemy give him a big hand we need to use jungle sometimes and jungle has many problems and one that it is not very fast in some cases so especially when doing queries with some complex conditions so what people usually do as I know is to write raw SQL queries but I don't like it because we lose the power of SQL construction and it's not fun what if we could memorize result of SQL compile and just apply parameters after but it's not so easy because jungle does parameter applying in the depth of the call stack and it's not layered to be used in this way but there is alternative and let's do some chemistry there is a thing called sql, alchemy you know it is well layered and one of the layers is sql constructor sql layer and we can use it with jungle there is a library called alchemy which translates jungle models to sql alchemy tables and there is a thing in sql alchemy that is called baked queries that memizes partially memizes result of compile of sql sql alchemy queries so we can combine them and do things like this with almost if the same query was happened before we can just construct for key cache and look up in the dictionary get sql and execute with jungle row query set and the overhead is minimized drastically and here is a proof of concept code it is not well written but it works I hope and this company I work for so thank you very much now I need Mark and Lira to come on the stage you and I've got sad news thank you sorry we are over we are getting thrown out of the thing the good news there will be lightning talks on Friday Mark and Lira will be hosting them I'll be spending the Friday with my father who has the 83rd or 84th birthday I never know because it's off by one error so I'll be leaving thank you very much for having me give a big hand to the lightning talks for Friday enjoy your evening and always be aware your pockets may be picked see you next year or somewhere else in the python universe bye