 I will hand over to our first lightning talk speaker who is Peter Hoffman. He's going to give us a pitch for Picon DE so Stop so we have only one minute. So let's go I want to invite you to Germany the southern part of Germany a nice city of Karlsruhe We have the Picon and the Pi data there last year. We are doing this this time for the second time Let's give you some impressions We have a really nice venue with the Center for Art in Media and Karlsruhe last year We had great talks about how the universe and the structure and everything fits together. We had keynotes from Matthew Rocklin So I just want you to invite to come to Karlsruhe talk to us. We are the organizers There's the many more organizers here And one small announcement. We have the first keynote speaker confirmed So West McKinney will be in Germany. So if you ever want to rant about pandas or ask him some Questions why the indexing works like it works. This is your chance. So see you in Germany Thank you, Peter MC. Oh, you're ready to go. Okay. I'll let you go All right. Thank you So I'm Nicholas. I'm the chair for Python Ireland and we organize a yearly conference about Python to Picon IE So this year will be the 10th and 11th of November Lots of hashtags email link so you can find me around. We're looking for more speakers, of course Sponsorships is still available and an extra news about Ireland and Python and we have 40 pilots called Starting Python in high school now and there will be a first sitting exam in Python for leaving sort in 2020 So that's something interesting So If you have experience in teaching computer science and want to help that You know set up properly in Ireland and come to me as well. I'll be around all week. Thank you. Thank you very much Yes So hi, I'm running the press key and I'm going to try to convince you that then of Python is actually harmful for the Python community and Python programming And So yeah the you know Zen is the Japanese Philosophical thing there is a competition to that called Tao which is Chinese and One of the translations of one of the parts of Tao is when the way is forgotten duty and justice appeared then knowledge and wisdom aboard and along with hypocrisy and The thing is You know, what's actually is enough Python? So it's it was an email posted by Team petters on the Python developers mailing list quite a bit ago. There wasn't Python 3 yet and It was actually Summary of some rules of time that he observed being used when when deciding whether to put something into Python or not And whether how to design it and It was humorous. It was actually a joke Unfortunately, not everybody got it So it got added to Python as an Easter egg You can actually type import this to get it displayed and it is actually used sometimes not that often but As a weapon to you know, cut discussion and said, okay, this is against them of Python We won't have it or you know a part of it is gets quoted as Argument against something which is very strange because the way it is structured the way why it's called Zen It's because every other sentence is a negation of the previous one So you can pretty much say anything you want with this Anyway, so so here are some examples of of how the Python developers themselves don't don't actually follow it So first it simply is better than complex and that's obviously excellent advice So recently there was a new implementation of a dict In Python that is obviously much better than the previous one it uses less memory. It's faster however, it makes the dict sorted and Because of that the definition of Python as a language is was changed to include that into dict that dicts are sorted and One of the features of complexity is that you entwine the implementation with the definition with with your API and in this case That's actually damaged a little bit the micro Python which doesn't can't use this particular implementation because of memory limits and Now it has a problem because Micro Python's dicts are not sorted and will not be so it's not Python anymore Explicit is better than implicit. You know this super call that everybody complained about in Python 3 that has been shortened to implicitly take all the arguments that that it needs from from your local scope and Yeah, that breaks this advice obviously Flat is better than nested but recently in Python 3 we see a lot smaller use of the with statement It gets into the standard library a lot. We've seen it in the keynotes today morning It's getting used a lot and what it does it lets you do your custom nested things in Python Errors should never pass silently so the recently fixed actually this is a fixed bug So kudos to that always list there would silently ignore all files It couldn't convert to unicode on in your local file system without raising any errors Yeah, there should be one and preferably only one obvious way to do it So we have now three or four ways of formatting strings in Python Admittedly it next to each next one is better than the previous but you still have to learn or three to to understand code Yeah Name spaces are one honking great idea This is the last point and actually it I'm shocked because there was no name space added to Python since that was published and It says let's do more of those Even even things like the type annotations with like back for a separate Name space you don't want to use the same names for types for type Notations as you have in your code because you know don't use them in your code anywhere You don't need them in the same namespace. No, they are in the global namespace so yeah The thing is once things are written down you forget about them You you get them out of your head on top the paper and they become dogma and you can only use them as you know Love advocates and and as a weapon But what's important is the process that actually produces produce those rules We we can reuse the same process again to produce new rules when the situation changes and this way the language and the community will be alive So so don't be a you know like a language lawyer Don't be a Zen of Python lawyer don't follow that the rules strictly Just just think about what actually how they were actually came up to how they were produced and Okay, right a minute. Thank you very much. Thank you a grand applause. Please run me Hi, my name is Sebastian and I would like to talk with you about keyboards those beautiful creatures that are so Perfectly designed that after hours and hours of using them every day They leave us with nothing less, but the feeling of ultimate satisfaction, right? Well, except that they are not perfectly designed, but it actually took me a couple of years to notice it. I Remember when I first discovered that some people are swapping the escape key and capsock and I thought wow It's actually amazing. I mean when you think about it the capsule keys one of the biggest keys out there and You only really use it when you need to argue with someone on Facebook While the escape key use it way more often even if you're not a Veeam programmer But it's way smaller and it's quite in Conveniently located so I swapped those two together and I was very happy until I got this guy So apparently Apple decided that you won't be able to swap the escape key from the touch bar with any other key So I was stuck with two escape keys one on the touch bar one on the capsock and no capsock key Which was bad. I mean what if someone is wrong on the internet? How can I keep my discussions to a typical internet level if I cannot turn on the capsock? So I had to I had to find a solution and I did a bit of reading and I found something that is I think the most clever Solution I have seen in my life You see someone came up with an idea to map pressing both shift keys at the same time to activating capsock So you press both shift keys you activate the capsock you preps you press both shift keys again You deactivated again once I saw it I thought this is brilliant and works only not with not only with the Mac books it works with any keyboard and it's really nice trick So that made me think about productivity like are there any other ways that I can improve the way I work So I did a bit of reading and I found this getting things done book by David Allen. It was Mentioned on many websites related with productivity and had a lot of reviews. So I thought it has to be good It wasn't I Mean the book is okay But it talks mostly about creating lists and if you have been working for a while You probably already figure out that making lists of things that you have to do will help you So I was a bit disappointed and I tried to find other ways And what I found is that what really works well for me are all small tips that I can start using right away Not like whole methodologies that will require me to change the way I work But those tips are not easy to find I mean people don't write books about productivity tips people write books about methodologies and Sometimes you don't even know that something is possible. So you don't try to improve it Like I didn't know that you can actually remap keys on your keyboard So I'm gonna share with you a couple of things that I found and maybe someone some some of you will find it useful Most of you probably already heard about the dot files like if not then you should really check them out Those are basically like configuration files for your computers So we can store them on github and you can download them on each new machine That you will be using and that way you will immediately have all your settings or your commas or your shortcuts back I'll actually have a link to the slides so we can check the source. Don't don't take pictures And the same applies to beam you can configure all your shortcuts or your plugins or your mappings by editing just one file And it also applies to get I mean you can define some one or two letter shortcuts for the most common commands that you're using But you can actually write some more advanced functions Like I have a function that will squash together last and commits or I have a different function That will check out the pull request from github to a separate branch so I can view the code there And there is no way I would remember how to do this from the top of my head without taking stag for flow But once you put it in this git config, it's super easy to use Coming back to Veeam for a moment. I don't use Veeam very often But I found a very useful tip uses spacebar as a leader key. It's much bigger It's centrally located you can reach it with both hands So it's gonna be way easier to use than default backslash and One thing that I noticed is that each time I log into I Python the production machines to do some debugging I always have to use I quite often use the same commands and that requires me to type from full import bar each time so that's annoying and Apparently there's a way to configure I Python so each time you started it will execute some arbitrary code So this is pretty nice And speaking of typing the same stuff over and over again There are some phrases that you probably type quite often like your full name your home address your email or whatever your signature of your email and So you can use a text expander that will take like a small block of text and expand it to pre-defined Sentences so it's basically like code snippets in real life So here are just few of my productivity tips and I know that there is a lot of people here who have their own shortcuts their Own mappings their own settings that may make their life much easier So I would really love to talk with you guys So if you can find me I will be here until Friday or if you can't find me just being on Twitter and the slides with the links to those files are available there Thank you. Okay. Thanks very much Sebastian run close. Oh, you're ready to go. Okay. Go Hello, everyone. So I'm Tony. I'm gonna talk about point break So I don't know what I'm doing my life, but I seem to spend an awful lot of time in GDP and other debuggers I found that using a debugger is Especially with a complicated program is Is the tedious process using a debugger manually quite often I'll get to the point I want to debug and I'll do the wrong thing and then I have to redo it all Particularly when you're debugging a complicated program something unexpected might happen and again you have to redo everything It's really annoying And also quite often I want to not necessarily directly debug something But monitor something or investigate something my program Let me be log something or just fight use something like a debugger to find out what's going on So this is point break. It was a film. The tagline was 100% adrenaline. So my term tagline is 100% pure Python This is what we have at the moment if you want to extend your debugging with something that's scriptable So you have something like GDP, which is a command line debugger with a Python Interface in there and an API that lets you write code, but it's all embedded in a debugger and you have to use their API what I would like instead is Like a debugger that's just a library and Python that I can write programs against because then I can build other tools on top of that So if I had a debugging library, I could build an analyzer that use the debugger to collect information Then you are to present it to myself or someone else So what we have at the moment, I think it's okay, but I think that my idea would be way more awesome So you could do something like you could write a simple program that just looked at put breakpoints on two methods to collect some information Then like graph the number of things So this is like create for you destroy food Then you've got a number of account of that the calls total number of foods that exist at any one time Or you could create something really complicated with like, you know crazy logic and like reactive breakpoints and Investing in all kinds of stuff that would tell you exactly what you've done wrong. That might be too hard But it's a possibility So it's a simple demo. Okay, right with the power of name shell So here's a really simple C program It doesn't do anything other than call a function 10 times in a loop. It doesn't print anything. There shouldn't be any output So if I make that Then I run it unsurprisingly it does nothing Then this is a How do I make things small That that one. Oh So this is a little script written against point break my debugger So I had a breakpoint which is just a Python function. It's going to print boo each time it hits that That C function. There is a ghost So if we We run that it prints boot 10 times that's simple. So it's really early days I spent about two weeks developing this At the moment, it's line it's 64 bit only API is still developing It doesn't yet read dwarf symbols, which would be really useful because that would give you line debugging information and other information about types The reason it doesn't do that is the parser is too slow. So I'm working on that It's missing many common debugging features But yeah, so I'll probably be sticking around for the sprints and maybe working on this But if you like the idea or you hate the idea come and say hello Thank you very much Big round of applause for Andy, please What to do with the flock of lambdas Library and talk by Andy funnier. That's me. There's my email. I'm a senior engineer at Bloomberg I'll get one thing out of the way right off the top What is flock good for? Usually that's a question at the end right at the beginning. It's fun. It's kind of an effect like a spreadsheet it's good for dealing with poorly defined mathematical systems like say taxes or role-playing games and I'm really looking for more uses out of this So if you find something that you think this would be useful for tell me after I'd really like to know So let's just look at some fairly normal functions. There's a function. There's a function declared with the lambda There's the lambda declared With no arguments. Hey, look it does what you expect. Here's some closures There's a perfectly normal closure with the list inside it. It also does what you'd expect If we change the list even though it's already inside a closure It's going to return based on the list. That's already enclosed Even though we edited the list. That's just a reminder that that Does what it's supposed to do enough of that. Let's take a look at dictionaries. We're gonna make some closures We're gonna put them in the same dictionary that's inside the closure That's inside That they're inside of they're all references so we can totally do this Let's just pretend we're putting up a bill of sale. So we'll put 30 of something. These are all zero argument lambdas Price 100 The subtotal is going to be the quantity times the price call each of them as we pull them out We'll take the New York City sales tax put that on Calculate the tax calculate the subtotal and Then if we call each of those and pull it out We're just evaluating closures and we're getting the values All of this just calls the things inside Pulse it out and gets it evaluated The tax line we can just pull out the tax line now We're in Edinburgh So let's say we're just gonna say the Tax here is 7% it that's a little more complicated So we change just the tax rate to 7% and we just want to see the tax and we just want to see the total We don't have to go back and do everything else. We can just pull out these two values And that's really what we've been going for here So it's a neat trick if we clean this up Let's hit three things to clean it up soaring a constant should not require creating these constant lambdas We know anytime we pull it out. We want to call it and We may want to do some caching eventually so we'll prepare for that So now it looks like this we can just put values in We create a flock dict out of the flock library and When we put a constant in it notices and deals with that We still create our lambdas just the same way, but We don't have to say we're going to call it flock knows when we pull it out That we're going to be calling it to pull out the value And our subtotals all work out the same way that functionality is preserved But we're here so we can add some more tricks because we know what we're doing So I've created something called an aggregator We'll make our bill of sale have five different items on it each with its own quantity each with its own price Then I can create a flock aggregator say I'm going to have Some parallel maps and here's the properties to go across them Again, we'll calculate those when they're needed And here's a function in this case of two argue in this case taking a tuple of the things going in That'll calculate across it I can go ahead and see what's the price on line three I Can go ahead and change the price each on line three and then just go look at the total line and it just comes dropping right out the bottom of the function Now if I have a flock I should be able to share my flock So shearing the flock just removes all this special functionality and gives me Kind of a final answer for every value of every lambda in the entire thing Calculates it out like this So here we see the prices the price each is the quantities the subtotals the taxes the tax rates the total Everything dropped out once I sheared my flock It's up on my github. There's my email There's the corporate Twitter and as I said, what's it good for? I'm really looking for the question of what is this good for? It's fun and let me know So hello, my name is Leo and I'm from Israel and when I'm working in a startup and when we started to to be large We decided about security rules, right? one of the security rules is you have to lock your Computer every time that you go to coffee or something Now for me two things happened one I always forgot it and the second thing all of my friends knew that I always forgot it and Started to look and start to hack my computer when I'm not near it. How many people it happened for them Cool, so it's not just Israeli thing So I tried to think what can I do and best idea that I can came for came with is I have a Bluetooth in my phone if I'm leaving I can check it So I tried to think if there is something like this for Mac users There is something like 10 applications that that is what they are doing for Windows There is a Windows feature for that in Windows. It's weird for Mac There is this application, but it's old and for me personally it didn't work So I started to look and found this Blog that explains how you can without pinging Check what is your connection? okay, and We just write it. This is a script best script from the blog that is doing that. Okay, and if I will run it You'll see that it's trying to connect RSI is the connection. Okay, so if I'm I'm not near my computer, right? And then off top of that We created a small Python script that check it every time that it's More less than minus one. It's added it to a queue and Check the queue. Okay, so if I run it And go with my Telephone to drink coffee or something. Thank you two issues one issue is if your office is narrow and with multiple places that you can walk go Maybe your computer suddenly will get up and down up and down when you are not in In your room and the second thing is now all my friends are trying to steal my computer my telephone Thank you. Okay over to you. Okay, so hi. I'm Thomas and This talk is about something I noticed for many years It's not about Python even if it looks like but you'll see So I guess most of you know the dog strings done the dog They are pronounced so not underscore underscore dog underscore underscore just say dunder that means the same and You all know you can use them to interactively get help or To generate documentation using Sphinx or some other toolkit and you can also access it from the code So the code basically knows about its documentation And this is how you do it. You just have a class and a dog string in there And if you are on the interactive Python interpreter, you can just use the help function to access that kind of documentation So you don't need a browser. You can just use the Python interpreter And why do we do this because so we don't have to wonder about what is this class doing? We document our stuff and everybody can use it that way So the class self documents itself so this was the technical part of my talk and Now to something different we also have some sort of documentation issue in real life so a lot of you hang around on Conferences like this one. Maybe some of you also visit a hacker space or in general just the place with a lot of people and if there are a thousand people like here, you maybe don't know a lot of them, maybe most of them But all of them are maybe working on some interesting project, but you don't know it and Why do you not know it because there's no documentation? It looks like this for example, you see just a lot of people doing things on their laptops But you don't know what More people doing things But you don't know either So everybody's doing something, but you don't know what So, okay, you can just go to them and say hey, what are you doing? But maybe you are shy. Maybe you don't want to do that and Even if you would do that it does not scale I can't walk to thousand people and say hey, what are you doing? It's just taking a lot of time So we can use doc strings So the idea is just document yourself and if a lot of people do that they can just read other people's Doc strings basically So you can use just a piece of paper But in that case you need to prepare it just print a few of your projects on it in big letters So you can read it from two meters distance at least and If it's not totally clear what it means maybe add some explanation below it in a bit smaller font Some nice graphics is also nice and don't write too much only a few words. You don't want to Take an hour to read it So put on the paper what interests you what you laugh what you work on maybe what you did work on in the past You can use a piece of paper. You can also use your laptop screen, but that's a bit Problematic if you want to work on it at the same time you can use a beamer With a second screen and just beam it somewhere a projector. I mean You can use a poster or you can just use a t-shirt and write something about Python on it but it's not great for a Python conference because everybody does Python of course and This is an example how it could look like so left the example right the explanation Maybe just put your name on it the projects you love a short line under it explaining what it is some keywords Maybe add some color or your homepage or whatever and Then just put it besides you if you are sitting somewhere and hacking on your laptop Just put it besides you so people can just read it. They don't need to say hello to a thousand people And then you have a dog string basically You can use these lights for whatever you want you notice license Do what the fuck you want public license. It basically says do what the fuck you want So yeah, this is really Thank you very much for coming I guess we kick off at 9 a.m. Tomorrow Yep, okay. Bye everybody