 If you sign up for a lightning talk, would you please queue here on the side of the... Oh, sorry. The other side of the podium situation here, please. So first we have Mia from Pyvo Meetup. So if Mia is around, please join us. Perfect. So the order of all the talks, so we have first Mia from Pyvo Meetup, then we have a tournament, then we have Chuck with why you should come to CRA panel tomorrow, then we have AWS Lambda loves Python 3.11. Awesome. So Mia is here, we still have three minutes, if you want to, do you need to prepare? No. You're born ready. Okay. Very good. So hello everyone, one more time. Is there anyone that wasn't at the opening session? Raise your hand. Okay, so a lot of people. So I'm Mia, I'm co-organizer of Prague Python Meetups. In Prague we have Python Meetups that have been going on for more than ten years and these Meetups are every Wednesday in a month and today is, now every third Wednesday in a month and today is the third Wednesday in a month, what means we have a Meetup. So our Meetup is ten minutes on food from here. If you open the Europe Python website and you click on events, you will see there Pyvo Wednesday Meetup. We will have a group of people going from here and so you can join Honza, Honza will be standing in front of the venue when, Honza? Yes. After the lightning talks are over so you can go with him or you can come at any time. The Meetup starts at seven. There will be some food there, some light snacks and some smaller things but in case you are very hungry, if you want something big, it's better to go somewhere before the Meetup. Is that everything? Yes it is. Yeah, and you can check the maps but also we will put the signs on so just follow the signs or follow Honza. Thank you. Awesome, thank you, Mia. Now we have a tournament talk, just a reminder when you come to the, when you come to speak, please have your presentations ready to go. Wonderful. You may start. Okay. Hi. My name is Neil. I'm the AI tournament guy so if you weren't at the opening session, basically I've created a little video game that is meant to be played by a Python program rather than a human and during the conference I want, well, you guys can participate in a tournament that will be held on Friday so you have three days or two and a half to write a little bot that will play this game. I can't handle like 200 bots at the same time on the game so please team up with people so that we keep the number of teams playing to a minimum. So I think I will just show you what the game is so you can get an idea and I hope this doesn't crash. So what happens is everybody starts with one base on a map and your mining resources and with those resources eventually you start building vehicles. You can build some tanks or some boats eventually. With boats you can make new bases and then you can build planes and you have to basically try to conquer the space, yeah. And if you go to that QR code you will get to here with some instructions so if you want to participate you have to fill in Google form to sign up with your team name and some GitHub user names. You will be given a private GitHub repository where you can code your little program. Read the game rules and start working on your bot. You can do that even before you get to a repository. There is a forum on the Discord where you can ask me questions. Creating alliances with other teams is allowed. Betrayals are also allowed so be careful. And the deadline is three o'clock on Friday and we will do the tournament in the open space on Friday afternoon. Thank you. Awesome. Next we have Chuck. I allow but my mouse is gone for some reason. Oh we can see it now. Oh jeez. Oh jeez what's going on? No. What I can do is to drag it over now. Jesus. Okay display. Display. Well don't look at my P.R.s. Is Joshua around? Joshua. Wonderful. Yes you're on the queue. Very good. Good. And then Rodrigo. Amazing. Chuck. Yes. Okay. So five minutes. Okay. So this is actually the answer of the question why you should come to the P.R. session tomorrow. But I'm going to tell you in detail. So because government policy will affect you. How many of you have heard of secure open source software? Oh some of you. Probably because it's a U.S. law. Well welcome to Europe. So yeah you know about it. So next one. Have you heard of European Union Cyber Resilient Act? Okay more and more people. Of course it's European. But how many of you know GDPR? Well actually it's not that exciting because in open source we have no geographical boundaries so no matter where you came from you may be from Europe or maybe you are not from Europe. It will affect you. And government regulation. Yeah exactly. It will affect us. And now we have the Cyber Resilient Act. So who is maintaining an open source software? Okay. Some of you. And who is contributing to an open source software? More of you. Who is using an open source software almost every day? All of you. Yes. Great. So European Union Cyber Resilient Act is actually a regulation that's trying to keep us safe like putting a you know this logo on your software. But yeah so it's trying to protect people but there's a problem that we are facing because we are open source. So open source basically. Who have seen this before? Yes. So you know those pepper ones you know it's actually an updated version that I stole a slice from somebody. So the pepper version are those like you know they have some money because they're supported by some organization. The blue ones are probably like you know a very rich company supporting them. But they are this little one that everybody use but they got no resources maybe one person like trying to maintain it during the weekend and something. So we won't have enough resources to demonstrate that the compliance of the project or it will be very expensive. It's very difficult and it will affect the ecosystem a lot if we have a Cyber Resilient Act that trying to like make you and me may be reliable on the software that is open source. So there is a non-commercial activity that is extended but there is a problem because a lot of open source project they need to have some support they need to accept donation maybe there will be people who work for another company who contribute to the open source is that okay or you know I know some project you have been to the pie data booth there's like some project support of a non-focus is that okay and all these complicated things that will make the term commercial very difficult to define. So what shall I do? So we have to get more information and voice out our concerns that's why the CRA panel session tomorrow is designed for this and for you. So this is actually what happened in Brussels in May but this is in the past so we will have an amazing one tomorrow and one of the advisor will be here tomorrow hopefully. So if you want to come to the session and then you want to get some background information before you come here there's a lot of information in this slide so that's why I would give you the link to you know if you get this link you will have access to this slide and you can read all these things before you come to the CRA session tomorrow but even if you don't it's fine you can just come and ask questions there will be people the leader from the community will be there. So yeah please join us tomorrow thank you. Thank you chair. Thank you. And now we have AWS Lambda loves Python 3.11. Let's see. But anyway I wanted to ask before who was this first zero Python for? Like who was here for the first time? Wow. This is very good. Welcome. It's our pleasure to have you here. Nice. How are we? Almost. Be patient. Just a second. This is quite nice. I should actually. So. Okay. Hello my name is Jonas. I work at Otto. It's a big e-commerce marketplace in Germany. But enough about that. I want to tell you why it's a good idea to run a Python 3.11 if you're running code on AWS Lambda. I expect that most of you are more or less familiar with AWS Lambda. Those who are not, it's a function as a service product sold by AWS. Yes. So right to the chase. We switched one of our functions from 3.10 to 3.11. And what you see here are screenshots from the switch. And you can see that our run times decrease in all categories. I don't have the screenshot from the max run time here, but the average and the minimal run time. Both degrees decreased by 10 to 20%. Just by switching the Python version. Yeah. So you might think, okay, but 3.10 is the latest version that is available on AWS Lambda. Well, you also can build your own containers and run them. We do it with Docker and Terraform. But we do not use Docker itself to build the container. But we use nix to build a smaller container. And that also allows us to actually be confident in saying that the run time improvement is only responsible for the run time improvement. Because we know exactly what our container contains. Because nix allows us to build very small containers. All the system dependencies fit on the slide that are included in this container. Apart from G-Lib C, I forgot to put it on. So everything stayed the same. All dependencies stayed the same. It's just the Python version that changed. And that resulted in this performance increase. And, yeah, so it was basically one character change in the pipeline. And we saved money from it. And I think you can all benefit from this knowledge. And if you're interested in using nix with Python, just find me here. And I'm going to talk about this tomorrow again. Thank you. Thank you, Jonas. Now we have VB joining us. Awesome. Always. I can't see it. All right. Good morning, good afternoon, good evening to everyone who is joining us remotely. And also good evening to everyone over here. I am VB. I'm a bunch of open source things out hug and face. I'm also one of the organizers for this conference. Thank you so much for coming here, first of all. All right. So what I'm going to be talking about today is Llama 2. Who over here knows about Llama? Awesome. So Llama is this research model that was released a couple months back by Facebook, which was research access only, which could be used for all LLM things, large language model things. So pretty much everything which Ines spoke about in her keynote. Thank you very much again for that. And so yesterday, they released Llama 2, which is basically the successor for Llama. Now what makes it interesting? So first of all, it was trained on much more data. So it was trained on 40% more data than Llama 1. So it essentially is a much more sort of powerful model. Second of all, they made it faster by using a specific type of attention called grouped query attention. Now this was launched yesterday and, you know, hug and face being hug and face partnered with Meta to make sure that we can release the access for Llama 2 to everyone, right? Now there are certain quirks with the license, but by and large, this model is an open access model. You can talk about, like we can talk about licenses outside, but anyone can access Llama 2. You can read more about, like how to use Llama 2 and so on, you know, on this sort of blog post. It's essentially hf.co slash Llama 2 and you find that. What I'm going to show you is how can you actually run this Llama 2 model on your MacBook, right? So we're going to do a bunch of hacky things. What I did to, in order to do this, what I did was I essentially like hacked together two scripts. One is in case you're a Python enjoyer, then you can essentially go to the script. It's on web of s10 slash Llama Playground. You can use Llama 2 via the Friendly Transformers API, and it works pretty much the same way as any transformer model works. However, let's make it interesting and let's work, like let's make this work on our MacBook using A&E. So I'm going to like quickly bring this screen. If I can. Or can I? Actually I cannot. Can someone, oh wait, no. Do I have some more time left? You have two minutes left. Oh my God, I can't. Okay, we're going to try again. Oh, all right, it appeared. So what I'm doing is I'm using Llama.CPP, which is again another open source project, which allows you to run, you know, machine learning models, large language models on MPS. Again, the script for that is on web of s10 slash Llama Playground. So what I'm going to do is I'm going to essentially like run this, which takes a quantized model, and I'm going to ask it something right now. I'm going to write a joke for me, please. And let's see if it does something. I hope it performs okay. Oh my God, that's like really slow. But essentially what's happening right now is, like it's pulling a 13 billion parameter model, all on my laptop, and it's running it. And so here's one, sure, here's one. Why couldn't the bicycle stand up by itself because it was too tired? Oh, I am also too tired. Get it too tired and well, what? Anyway, so it did something. You can do the same thing. Thank you very much. And you have a great day. Awesome. Thank you, VB. Thank you very much. Now we have August with adding arrow function to Python grammar. I love that. And congratulations on doing a live demo, by the way. That is VB, everyone. So. Do I need to do something special or it should just connect to it? I am going. Yeah, I'm going to start running the timer. A few technical issues today. Okay, to the other side. Okay, well. Okay, it will be very hard to look from here. So what we are going to do is we will change lambda expression into arrow function in C Python. We will try to do that. I hope I won't do something wrong here. I already cloned the C Python. And I'm going to first show you how lambda expression works just to be sure. This is how it is, you know, defined. And we will try to do something like this, right? And it will work. It doesn't work right now. So what we are going to do is we will get into the grammar. Python.gram. Then I will go to the lambda keyword. Then I will copy this. I will create my own definition. Change its name. Then I will. Oh. Okay. This is harder than. So I put my parenthesis. I'm not using lambda style parameters. Then I'm adding this and put my arrow function, which means that I will need to define in the tokens also. But first, I will have to go to the lambda. Oops. The second one. As you see, there is an expression definition here. And here I will put it on top of sky. And add, like, arrow, def. Right. I was correct. Then I will go to the grammar again. And I will get into the tokens. And I will find the column where it is defined. Because we added something new actually here. I will just add the one. Function sign, which will be arrow. Oops. Then make regen token. Okay. I started getting excited here. Oops. Make regen. Okay. All right. Now this works for three minutes or something like that. I'm not so sure if you work on time because I started trembling here. Yeah. So I'm going to show something more. There are two things. One of them is the expression. The other one is statement. Statement is I am old. You don't know what to do with that. You just save it in your mind, right? Expression is like I give a cup to you. You can do anything with it. You can throw it. You can give it to somebody else. It returns something. What's the difference? The difference is like if I define a function, this is a statement, right? I can't do this A equals because it doesn't return anything. But lambda returns something actually, right? It returns a function. So it makes a kind of a difference. When we change this into this definition, it will be kind of, I don't know, it will seem in a nice way. And we could construct some stuff like I add Y like this. And then we could even change this into a function that returns a function which adds X and Y. Then we can call it, for example, 1.2, then like this. It's just, experiences are nice, right? Like you can nest them inside. You can merge them or something like that. Yes. Okay. Now we will see if it worked. There we are. A plus B. Okay. Yeah. We have it. As you see, we changed the grammar. So we can even do this at that. Yeah. I'm going to actually do even more from, this will also work. Thank you very much. I got some help from Pablo today because apparently I put it into the wrong place. Thanks to him also. Thank you very much, everybody. Thank you. Thank you. That was my fun. Very, very fun. Awesome. So who has plans for dinner, actually? How are plans for dinner going? No one. Okay. No one's having dinner today. All right. Everyone is there. Where? Craca. What do they have there? Meat and potatoes. Okay. So vegetarians. That is not for you. Okay. Maybe somewhere else. Awesome. Who? Okay. Hi. My name is Joanie and this is just a funny thing that made me go, to be clear, it was a bug in my code, not in Python's least comprehension, but you might be able to use this as an interview question or an obfuscation technique some time. So here's the coding test to be clear. This is not a trick question at all. This is sort of physical coding. The question is we have a lookup dictionary from country codes, country names. Okay. And then we have a list of data, which is supposed to include country codes, but it has some garbage also. We want to filter just the items that are country codes and we want to keep the country names along. This should be simple. There should be nothing difficult about this. And here is a correct answer. This is what I intended to write. So there's the lookup table. There's a list comprehension, which has eggs looping over the input list, which has garbage under country code and then a condition if eggs in lookup and if those match, if that matches, we return eggs and lookup of eggs. Right? This is what I intended to write. The bug was that I swapped eggs and the tuple. Okay. So this is clearly wrong, right? So who thinks this is a syntax error? A few hands. Who thinks it's a value error? A few hands. Who thinks it's a key error? More hands. You're kind of closer. Who thinks it's no error at all? Several hands. You're correct. There's no error. This is entirely valid code. So what was the... What's the value of result? Sorry. Yeah. So the result is ABCD, which I'm not country codes as far as I know, and we're not even in the input list. Okay. So the next question is what else happened, but you answered it already. Well, what happened was that I modified my lookup dictionary. For those of you who are not yet laughing, maybe I'll explain it. So there are... I'm looping over a list of strings and assigning each string to a tuple of two elements. And each string happens to be two characters long. In Python, if you loop over a string, you loop over the not really characters, the single character substrings. So when I assign X and lookup X to AB, I assign A to X and B to lookup of X. So when you want to give a weird interview question to your candidates, here's one example. And maybe if you want to remember something from this, there was a tweet by Ned Bachelder saying, hey, you can assign to anything you want in a list comprehension. This is a much more useful thing to do than mine. Thank you. So next now we have Antonio Curry with spy. I'm very curious about this one. I'm supposed to... Good. So I'm talking about spy. So the first question, how many of you use type annotations in your Python code? How many of you would like your Python code to go faster? If nobody raised the end now, it's a bit... So spy is a new project which started a few weeks ago. It's brand new. I'm doing it as part of my job at Anaconda in the PyScript team. It's static Python. So it means to be a new implementation of a compiler and an interpreter that aims to be as fast as C and as Pythonic as Python. The first goal for us is to target WebAssembly because of PyScript. And I would like spy to be a first-class WebAssembly language which use all the features which are coming in the WebAssembly world. I can argue whether this is a subset of Python which is statically typed and compiled or it's a different language which is Python-like. I don't think the distinction is too much important. It's more a marketing thing. But I think it's a different language. But you can pretend that it's just Python. Some of the goals for the project. I want this to feel like Python. So for most people who don't know all the details or the corner cases of the language, maybe you don't even notice that they are different. So for example, I want to have a fast editor-on cycle so you can just modify your code and run it without having to recompile. And that's why I'm developing an interpreter and a compiler at the same time and I'm testing them to be 100% compatible so that you can just switch from one to the other. No goals. I don't plan. I don't try. I don't even try to be 100% compatible with C Python in all corner cases because I've tried to optimize Python for 20 years and I know it's hard. So basically I'm cheating and removing some of the rules. For this reason, I don't plan that people use .py files. They use .spy just to underline that we have different rules. The idea is that you should be able to use to create standalone executable that you can just distribute and execute without having the interpreter. You should be able to use .py for creating C Python or other or .py or .py extensions. So in this sense, you can use it instead of Cyton or a better Cyton as Stefan is in first row and is looking better at me. But yes, I plan to have first-class integration with C libraries but also with other Python libraries by embedding C Python so you will be able to use Python modules from spy. But also since we're targeting WebAssembly, you will have full first-class integration with JavaScript and all the browser APIs. In the first slide, I said that I wanted to feel like Python but a static language cannot feel like Python because we are too used to all the magic that Python can do. And if you don't use the magic by yourself, the library that you're using are using this magic. But the insight is that I think that the vast majority of magic happens in part-time when all metaclassies, decorators and all these powerful libraries do stuff. And then the language that you use, normally, it's actually pretty boring and static. We tell people, oh, you should not mix types, you should do step annotation, don't monkey patch things, don't exec, don't create classes at runtime. So if we stick to this, then this is very easy to compile. So the idea is that with spy, we just codify this pattern that there will be an explicit metaprogramming phase in which you have full power of the interpreter and your libraries will be able to do all the magic that they do. But then we draw a line and from there, you are no longer allowed to, for example, monkey patch classes and do things like this so that the compiler have a better and easier job to emit fast code. It's almost bubbleware so far. I started a few weeks ago, so right now I have a very boring language in which you can do computation. I can compile Fibonacci, yes. And I plan to add JavaScript integration very soon so that I can translate to Wasm around in the browser and do interesting stuff already. Then I will add all the other things like list and dictionaries, classes. And then at the second stage, I will add the metaprogramming features, but they are there. Like, I'm designing things for MTS. That's it. Thank you. So next now we have learning Python through blocks. We had it. We don't have it anymore. We have it again. Okay. Good to go. So in this talk, I want to put the spotlight on Python in education. How kids learn how to code with Python and how we can all help. So my name is Josh. I'm a software engineer at Anaconda. And my full-time job is working on edge blocks, which is a project I created when I was 12, when I was a student. So how to learn Python if you're a complete beginner as a kid? So the most typical thing you're probably going to do is go to Google, type in how to download Python, and it might tell you that it's already pre-installed or give you a guide of how to install it. And then once you kind of got to that point, you probably end up with something that looks like this, which is a Python text prompt that we're probably all familiar with. But for kids, this kind of presents a problem which I kind of call the blank canvas of it's not very kind of obvious where to start. You kind of just thrown into the text prompt and what do I type? And this is a very unfamiliar concept to kids. You know, they've never typed a line of code in their life. So, you know, they're not really kind of sure what to do with this blank canvas and text prompt. And this can kind of become a demoralizing experience that leads kids just to give up. And that's not really what we want because we kind of have a digital skills shortage and, you know, we want more kids to learn Python and coding. So, just to kind of give a bit of background for those who aren't familiar, this is Scratch. So, this is kind of like the most popular tool that kids learn how to code at a very basic level. So, Scratch doesn't necessarily teach the concepts of text-based programming, but teaches fundamental concepts like for loops, iteration, and all that kind of stuff that you need to know, variables, functions. And all the blocks are kind of presented to the user so they can see what they need to do and they can drag and drop an experiment and you can't really get anything wrong. There's no concept of errors. There's debugging, but not in the sense of it's giving me a block of red text and I need to find out what to do with it. So, one of these solutions that I have come up with is kind of introducing this block-based format back. And this is the regi-blocks. And essentially what I've done is I've put the Python text on the blocks so that there's a one-to-one mapping between one line of text and a block. So, the kids can kind of have that familiar environment of this block-based, colorful environment, but they're starting to get to use to the syntax and how Python works, which is really important. And I've tried to include fun libraries, like Turtles, so being able to make it fun and engaging rather than just print hello world. But these are libraries that can be used outside of regi-blocks. So, eventually regi-blocks isn't going to be used by these kids, they'll move on to text-based Python, but we're teaching the concepts that they can later apply when they get to that stage. And very similar to Scratch, you have everything kind of on the canvas that you can drag and drop. An example project to load up kind of tutorials of how to use common things. So, kind of what I want to get out of this talk is kind of just to get across some of the things that have been key considerations for me, and hopefully we can all apply to the stuff that we're building to help beginners, specifically kids. So, especially in the UK where I'm from, and it's mostly a worldwide problem, there is a lack of teacher training. Teachers don't know how to code very well, and that's through no fault of their own. This is just through kind of having not the training in place to be able to deliver the lessons that they need. At touchscreen devices are a problem. I ran a code club and I had one kid ask what a keyboard and mouse was, and using Python that there's a bit of a problem. And also, there is a problem of text-based programming just being scary. You know, it's a big shift from the block-based environment a scratch that I showed you to a text-based prompt, and that is kind of like the jump, going in between one and the other within a matter of a few months within school. And also, installing software in school is a big problem as well, but there is a solution to that which is browsers. If you're in the WebAssembly summit yesterday, we're talking about bringing Python to the browser, PyScript to the open-source project that is being worked on at the minute to make it super easy to get started with Python in the browser, and this is something that I want to implement. And also, kind of just another example of adding more fun kind of libraries. This is based off of scratch extension that I saw, which brings Spotify into Python to be able to play preview songs. So it's kind of just adding another fun element into the learning code with text process. So it's completely free, and that's really important, but it's free. So if you'd like to try it out, I'd like to thank you for your patience and thank you. Thank you. Thank you very much. So I think we're getting to our last talk of the day, our last lightning talk. I don't know who is coming up, so it's a surprise for me too. Let's see. So while he sets up, I actually found a joke because I'm a little bit uncomfortable with this silence. So it's a pie joke joke. Why did the programmer quit his job? Anyone? Because he didn't get a raise. I didn't say it was a great joke. Perfect. So we're ready to start. Thank you. Thank you. Thank you. You go. Okay. So I wanted to talk to you about the 25 years of open source because I don't see anybody celebrating that this year, and this year we are having 25 years of open source software. So you must be thinking he must be wrong, right? People have, like programmers have shared source since times immemorial. What is he talking about? It's almost like 100 years at least, right? But turns out that the guy whose name is on every computer book created a... 25 years ago created a conference where a lot of open source developers congregated and they decided to name this phenomenon open source software. Before that it didn't have a name. And they decided to do... This is a screenshot from... description of that event written by some guy called Guido Van Rossum or something. I don't know if you know him. So, yeah. So they decided to do it to, like, help businesses realize that there is all that free code floating around that they can use in the business area. And after 25 years of that we can evaluate the effects. Like, the largest, most rich companies in the world had made billions on this open source software, right? Every large open source project has a foundation behind it so the companies can influence the development without having to employ programmers. We have developed marvelous processes and tools for making software more like a shiny product that is ready to be sold to customers and packaged. And unfortunately there are some downsides as well. As we use all this work, this effort to package it. It also gets in the works a little bit and makes everything a little bit slower, a little bit bigger, a little bit, you know, less portable. So we built this magnificent machine but we are left with all these crafts that was there because it was a product. Also it takes effort, right? To do the packaging, to do the CI, to do the proper, you know, type annotations, everything. And sometimes this affects open source developers in bad ways. They drop out or go crazy or, you know, some of them died. So I'm thinking, you know, maybe those companies could do that work themselves and let's do more open source code and not open source software for ourselves, within the community. And we don't, like, not every single open source project has to be a shiny product at the end. Thank you. Thank you. Thank you. So that was our last talk for today. I want to thank each and every single one of you for coming here today for helping us make this a party. And while you're free to go for dinner and the party continues tomorrow. Thanks again.