Thursday's Lightning Talks
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 112 | |
Author | ||
Contributors | ||
License | CC Attribution - NonCommercial - ShareAlike 4.0 International: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this | |
Identifiers | 10.5446/60799 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
00:00
GoogolGoodness of fitRight angleOnline helpRule of inferenceMultiplication signLecture/ConferenceMeeting/Interview
01:06
NewsletterBlogSoftware testingRight angleGoodness of fitTwitterTelecommunicationHybrid computerElectric generatorQuicksortCASE <Informatik>DemoscenePoint (geometry)Dependent and independent variablesMultiplication signEmailMessage passingNewsletterComputer programmingBit1 (number)VotingWordHand fanMedical imagingCompilation albumLecture/ConferenceComputer animation
04:49
Logical constantSoftware developerEvent horizonWhiteboardPoint (geometry)EmailFeedbackSelf-organizationSystem callZoom lensDifferent (Kate Ryan album)Local ring
05:51
Multiplication signEmailSelf-organizationNeuroinformatikCommon Language InfrastructurePerfect groupOpen setComputer animationLecture/Conference
06:47
Open setSpacetimePlug-in (computing)Electronic mailing listCloningQueue (abstract data type)Library (computing)Point (geometry)Water vaporMeeting/InterviewLecture/Conference
07:32
Coma BerenicesSpacetimeEvent horizonMachine learningDemo (music)Expert systemSign (mathematics)Goodness of fitEndliche ModelltheorieVirtual machineLibrary (computing)ArmWebsiteSelf-organizationComputer animation
08:24
Computer-generated imageryData modeloutputLine (geometry)User interfaceCodeLibrary (computing)Endliche ModelltheorieArmSelf-organizationVirtual machineElement (mathematics)Medical imagingSpeech synthesisDemo (music)Lecture/ConferenceXML
09:06
Hill differential equationComa BerenicesDemo (music)Electric generatorGoodness of fitMachine visionDifferent (Kate Ryan album)SpacetimeGoogolMedical imagingLink (knot theory)Type theoryNeuroinformatikArmTable (information)Computer iconRight angleComputer animationLecture/Conference
10:00
GradientGamma functionRight angleMultiplication signTwitterBitResultantExpressionPerfect groupLecture/ConferenceSource codeComputer animation
11:00
Perfect groupExpressionResultantMultiplication signSpacetimeOperator (mathematics)Forcing (mathematics)Functional (mathematics)Pattern languageLecture/ConferenceComputer animation
12:19
Functional (mathematics)Spectrum (functional analysis)Pattern languageOperator (mathematics)EmailGreatest common divisorMathematicsSummierbarkeitCASE <Informatik>Reduction of orderMaxima and minimaMultiplication signArithmetic meanComputer programmingRootVideo gameVacuumRight anglePoint (geometry)Formal languageOrder (biology)Lecture/ConferenceComputer animation
13:58
DisintegrationGEDCOMDatabaseUser profileEndliche ModelltheoriePiWorld Wide Web ConsortiumMiddlewareData modelRevision controlOnline helpPattern languagePerfect groupMathematicsRevision controlRow (database)Web 2.0Endliche ModelltheorieData managementWeb pageRight angleElectronic mailing listInstance (computer science)Software frameworkMiddlewareExtension (kinesiology)Keyboard shortcutField (computer science)Latent heatEntire functionElectronic visual displayInformationSystem administratorTable (information)Default (computer science)Set (mathematics)Theory of relativitySoftware developerData recoveryPoint (geometry)INTEGRALContext awarenessGame controllerTouchscreenInsertion lossDialectProcess (computing)Local ringOrder (biology)SpeciesMetropolitan area networkGraph coloringMultiplication signSpacetimeLevel (video gaming)Wave packetQuicksortLecture/ConferenceMeeting/InterviewSource code
19:42
Commodore VIC-20Raw image formatMultiplication signLattice (order)SpacetimeSoftware maintenanceWebsiteElectronic mailing listTable (information)Roundness (object)PiStudent's t-testTrailMeeting/InterviewLecture/ConferenceComputer animation
21:21
Reverse engineeringHypermediaTable (information)Gamma functionMass flow rateDensity of statesSystem programmingSlide rulePrice indexDecimalOpen setEmailData compressionBridging (networking)Scripting languageDebuggerAsynchronous Transfer ModeBootingProcess (computing)Thread (computing)CodeString (computer science)CompilerFrame problemObject (grammar)Data storage deviceGroup actionPresentation of a groupCursor (computers)ParsingElectric currentRevision controlFile formatBinary fileComputer fileModule (mathematics)WordPower (physics)2 (number)Mobile appReverse engineeringPresentation of a groupPoint (geometry)Goodness of fitCartesian coordinate systemFile archiverParameter (computer programming)Control flowQuicksortMedical imagingBitComputer fileLibrary (computing)ParsingData compressionDifferent (Kate Ryan album)Symbol tableRight angleInformationString (computer science)File formatType theorySlide ruleContent (media)Function (mathematics)Text editorMultiplication signCodeCASE <Informatik>Open setLevel (video gaming)Directory serviceTouchscreenBootingDebuggerScripting languageResultantObject (grammar)MereologyFrame problemSmoothingEmailBinary codeAsynchronous Transfer ModeGoogolSystem callThread (computing)Process (computing)Ocean currentExecution unitReal numberMetropolitan area networkNumbering schemeGreatest elementFood energyProfil (magazine)Core dumpComputer-assisted translationLecture/ConferenceComputer animation
26:44
TwitterClient (computing)DatabaseUser interfaceDependent and independent variablesSoftware repositorySinc functionBlogInternetworkingLimit (category theory)WordDevice driverDatabaseLibrary (computing)Software repositorySoftware testingComputer fontLambda calculusLogicRight angleWindows RegistryWeb browserRule of inferenceFunctional (mathematics)Library catalogElectronic mailing listRevision controlRepository (publishing)Observational studyCASE <Informatik>Game controllerClient (computing)Dependent and independent variablesData dictionarySystem callCore dumpError messageWebsiteHoaxCodeDifferent (Kate Ryan album)Point (geometry)TwitterSoftwareComputer wormData structureSocial classConnectivity (graph theory)Goodness of fitElectronic visual displayInteractive televisionEndliche ModelltheorieTraffic reportingBit ratePlanningArmInsertion lossComplex (psychology)Mach's principleTask (computing)Meeting/InterviewComputer animation
31:32
2 (number)Multiplication signSelf-organizationRevision controlFrustrationSystem callWeb pageWebsiteLecture/Conference
32:39
GoogolComputer programmingRevision controlLine (geometry)Network topologySoftwareSoftwareType theoryBitWeb pageRevision controlMixed realitySound effectLine (geometry)PlastikkarteSource codeComputer animationLecture/Conference
33:24
Doubling the cubeMechanism designLecture/Conference
34:11
TorusImplementationIntegrated development environmentSoftware developerPlanningTelecommunicationProjective planeMechanism designResultantReading (process)Open sourceFocus (optics)Multiplication signDirection (geometry)MultiplicationText editorTraffic reportingSoftware bugMereologyTouchscreenRankingArmBuildingMaxima and minimaStrategy gameRight angleEngineering drawing
39:14
Electronic meeting systemQuicksortTraffic reportingNeuroinformatikForcing (mathematics)Lecture/ConferenceMeeting/Interview
40:21
Linear regressionPresentation of a groupCore dumpInstallation artSource codeVideoconferencingModul <Datentyp>Module (mathematics)Process modelingData modelEndliche ModelltheorieLinear mapNetwork topologyMusical ensemblePerformance appraisalState of matterEndliche ModelltheorieWorkstation <Musikinstrument>Computing platformForm (programming)Data conversionHypercubeGoodness of fitOpen sourceRight angleTable (information)Software developerVirtual machineSystem callDefault (computer science)Universe (mathematics)AreaSubsetPosition operatorSet (mathematics)Special unitary groupComputer programmingSalem, IllinoisWebsiteInternet forumFeedbackHypermediaBitArithmetic meanTunisGradientMachine learningRegular graphTwitterLaptopCore dumpInternet service providerAuthorizationModule (mathematics)Open setComputer animation
45:12
TrigonometryCurve fittingLevel (video gaming)GodImage registrationRoundness (object)Coefficient of determinationInheritance (object-oriented programming)Shooting methodDifferent (Kate Ryan album)Lecture/ConferenceMeeting/Interview
46:25
Software developerProcess (computing)WritingMultiplicationTrailDisk read-and-write headMultiplication signWordRight angleLecture/Conference
47:09
Process (computing)Core dumpLink (knot theory)PrototypeEvent horizonInformationData managementFrequencyProduct (business)Computer animationMeeting/Interview
47:52
TwitterNetwork topologyOrder (biology)Line (geometry)Hardy spaceSoftware testingFunctional (mathematics)CASE <Informatik>Product (business)XMLLecture/ConferenceMeeting/Interview
48:56
Function (mathematics)Interior (topology)Kernel (computing)Computer fileInternet forumHydraulic jumpFAQLaptopImplementationVariable (mathematics)Type theoryCodeLogical constantLoop (music)Object (grammar)Object (grammar)Type theorySoftware testingInstance (computer science)Logical constantFunctional (mathematics)QuicksortSocial classEndliche ModelltheorieSlide ruleHardy spaceVariable (mathematics)Keyboard shortcutInterior (topology)CodeCASE <Informatik>Real numberMultiplication signFree variables and bound variablesAlgebraic closureSystem callImplementationCoefficient of determinationRight angleComputer animation
53:10
Variable (mathematics)Interior (topology)Function (mathematics)Type theoryCodeIntegrated development environmentLogical constantLoop (music)Object (grammar)Kernel (computing)Gamma functionSoftware testingAsynchronous Transfer ModeCellular automatonAlgebraic closureAttribute grammarFunctional (mathematics)Object-oriented programmingBuffer overflowStack (abstract data type)Uniform resource locatorComputer animation
53:57
Hill differential equationRoundness (object)Lecture/ConferenceMeeting/InterviewXML
Transcript: English(auto-generated)
00:06
OK, who knows what's a lightning talk? OK, there is like half of the people that is not raising their hand because maybe you're tired. So a lightning talk is a five-minute talk
00:20
about anything you want to talk about. It can be drinking a pint of Guinness in the ferryman, or it can be something related with Python. The good thing is that you have five minutes. Good news also for us, it's only five minutes, so if this is really boring, in five minutes we can just stop.
00:40
I'm going to have a timer in my phone, and if you see I need the help of everyone here, at five minutes I'm going to raise my hand, and if the speaker is still speaking, please start clapping to interrupt the person. Those are the rules. And the first lightning talk today is BB. He's going to talk about the EuroPython Society.
01:03
And I'm setting my timer. Yeah. All right. Go. Good evening. How's everyone doing? All right. So I'm going to hopefully bore you only for the next three minutes because I do not intend on going through the nerve-wracking experience
01:23
of speaking for five minutes in front of the tough crowd over here. What I'm going to be talking about is basically presenting a case to volunteer and help us build the future of EuroPython conferences. We've been organizing it for a very long time.
01:41
This is the second time that I've been doing it. And I wanted to just basically give you an insight about what goes on behind the scenes. In case you did not know, this conference is organized by EuroPython Society. We're completely volunteer-driven. We do not take a single penny out
02:00
of whatever is generated from the conference. All of this goes back to the community. So it's really important for us to have people who can help us build the next generation of EuroPython and put it together. So I'm going to show a personal snippet of how much flexibility
02:24
you have when you volunteer with EuroPython. So to give you a quick brief, I'm Vibhi. I am a volunteer with the comps, like communications. So all the tweets that you see on EuroPython, all the shitty ones, are mine.
02:40
And the good ones are from the other volunteers and so on. I also helped a bit with the program and so on. So here's what I did in March 31. There's a newsletter that we publish every month. And I was just playing around with some stupid stuff.
03:02
And I put something together, and I sent this email out to every newsletter subscriber with the subject, eat the spaghetti to forgetti to regretti. And I missed, or rather, I messed up the subject itself. So instead of spaghetti, I wrote sagetti.
03:23
Obviously, I handled it like a champ. And my response was something like this on Discord. I was like, what? OMG, ahh! But nevertheless, because we're a community conference,
03:42
people did take it up with a, you know, nobody took offense. And everyone was actually quite happy. In fact, my best message so far was I found the eat the sagetti to forgetti the regretti, the best email subject ever. And I'm very disappointed about the correction.
04:02
So the point that I'm trying to make is if you're looking for an avenue wherein you can mess up, fix things, and then get back up again the next day, then EuroPython is the place for you. We're open to new ideas.
04:21
We're open to any sorts of things that you want to do. Realistically, we just want you to sort of come up and just say, hey, I want to do this. And we'll make it happen for you. You want to come up with the next hybrid sort of agenda
04:41
for a 15-day conference. You want to do this in the Himalayas. Well, maybe not. Ads, yes. But we're there for you. So those were the messed up things. And here's an example of how we also try to do some new things every now and then. So there was a chat on Discord wherein someone was like,
05:03
hey, we're going to Dublin. Why don't we reach out to local Irish tech communities in Dublin and just try and help them out? And we just sent a couple of emails to different Irish tech communities. And all of us in different countries just got on a Zoom call just to discuss
05:21
how best we can put together this EuroPython. A lot of what you see from food to the social events and whatnot was through the feedback from them.
05:42
So again, the point is, if you want to help us out to put together EuroPython in 2023 and beyond, we're more than happy to have you on board. With that, feel free to find anyone who wears a yellow shirt, anyone with an organizer badge outside. We're more than happy to have a chat.
06:01
Or just send us an email on volunteer.europython.eu. Thank you so much for your time. That was perfect timing. OK, Rodrigo's next. Oh, sorry. Omar. Yeah. Omar.
06:21
And Sebastian is going to do an announcement while you configure your computer. Perfect. Hi. How many of you are using VS Code? Hands up. A lot of people. How many of you are using Vim? How many of you know what are dot files?
06:41
Well, that's quite a few people. How many of you heard about the ripgrep, exa, fd, those CLI tools? Cool. So for the rest of you who wants to learn about those things, I'm trying to organize an open space session tomorrow at the tool where I want to present some tools that I'm using and have a chat with other people about plugins for VM VS Code, Linux CLI tools, dot files, stuff like that.
07:04
So tomorrow at the tool, open spaces. I hope to see some of you. Thank you. So next one is Omar that is going to do. Yeah, replacing Omar. My name is that one. He's a clone of Omar. Yeah, clone. Cool. Please, Patrick, I see you in the list,
07:21
and I don't see you in the queue. Rodomir, also if you're here, you're in the list. OK, go. Five minutes. Cool. So my name is Daoud. I am one of the founders of Gradio, and that is a Python library I'll be talking about today, but also here to announce the Hugging Face Gradio Hackathon that we're running this week
07:41
and until the end of next week. So you can find us on the EuroPython website, and go to the Events tab, and you'll see us right here. And so is anyone here interested in machine learning? Raise your hands. So quite a few of you, good. That's a good sign. So yes, you should definitely participate in this hackathon if you're interested in machine learning. You don't have to be an expert in machine learning at all.
08:02
We make it really easy to create demos with machine learning models. So find the Events tab, and it'll take you to our EuroPython organization on Hugging Face. And you can join this organization, just like 75 other people have, and upload your demos here. So some of you might be thinking, what is Gradio? What is Hugging Face?
08:21
How many of you here have heard of Hugging Face before? Oh, wow. OK, a good amount. How many of you have heard of Gradio before? OK, so still some of you have. That's good. So once you join this organization, you can upload your models, and you have a chance to win prizes like t-shirts and such.
08:41
So for those of you who have not heard of Gradio, Gradio is a Python library. So you can pip install it within a few lines of code, have a web interface running, and wrapped around your machine learning model. So here's a few examples here. Here's like a sketch demo, question and answering, image segmentation, speech verification. So we have a library of a bunch of UI elements where you can wrap your machine learning model around.
09:03
And that's what Gradio is. I'm sure maybe a lot of you have seen the most popular Gradio demo here, Dali Mini. Here's an example generation here. Minions attending your Python hackathon. How many of you have played with the Dali Mini demo before? OK, so a good amount of you, again, I'm sure you have.
09:20
So if you haven't, definitely Google Dali Mini. It'll be the first link. Type in any text prompt and you'll see generated images. So this is an example of a Gradio demo. You can find more examples on Hugging Face spaces. We have a bunch like anime GAN and arcane GAN and a bunch of different computer vision or interesting spaces you can play around with.
09:42
So once again, please join the Hugging Face hackathon. And if you have any questions or if you run into any issues, we have a booth, a table on the first floor. You'll see a big Hugging Face emoji right by the banner. I'll be standing there. Omar will be standing there. You can ask us any questions and reach out to us there. Yeah, thank you.
10:01
Cool, thank you very much. So the next talk is Rodrigo. He's going to talk about smoosh all the things. That's a surprise talk. I'm not going to be talking about smoosh all the things, right, that's just the title I gave it. Cool, so. No, I just wanted to make it clear, yeah.
10:24
After Rodrigo, we will have Alex doing a one minute announcement and then we have a remote talk. Yeah, by the way, I will be interacting with you and I don't have a lot of time so you have to be snappy in your replies, okay? That's going to be important for me.
10:41
Can I? Oh, oh, wow, okay. So let's smoosh all the things. My name is Rodrigo. I hope you're all doing well and I don't really like to label people but you guys, you folks look like you enjoy Python so check out my Python work on Twitter. And now let's go for a quiz. So who can tell me what's one plus two plus three plus four?
11:00
10, amazing. So if you understand this expression and the result, can you please clap just a little bit? Okay, that's fine, perfect. Okay, so next quiz. What's one times two times three times four? 24, great. If you understand the expression and if you understand why the result is 24, can you please clap?
11:21
Okay, amazing. Now what's true and true and false and true? That's false. Okay, let's just pretend that's the operator and I didn't have much space there. So it is false. Now if you understand the expression and the result, can you please clap? Okay, amazing. Everyone understands these expressions, right?
11:41
Because they're fairly simple. Now the question is, what's the pattern here? Because these expressions, they're structurally similar to each other. So what's the pattern here? And the pattern is we have a binary function in all of them. We have a bunch of values that I was working with and when I take that binary function
12:01
and I smoosh all of the values together, I get a single result. So that's the pattern, the common pattern in these expressions. Now is this pattern of taking a binary function and smooshing a bunch of values together a useful pattern? Clap if you think it's a useful pattern.
12:20
Okay, it is a useful pattern because these are well-known functions or well-known built-ins. You've got sum, math.prod, and all. So this pattern is useful, this pattern of taking a bunch of things, a binary function, smooshing everything together into a single value. And this pattern has a name. And the name is reduce. If you go to functools, you have reduce in there.
12:41
Sum is reduce with plus. Math.prod is reduce with times. And all is reduce with the operator and. Right, so sum is a reduce, prod is a reduce, min is a reduce, max is a reduce, join is a reduce, something else I forgot is a reduce. So there's a bunch of reduces
13:02
that are baked into the language, all of the most common cases. So why is this relevant? Why am I spending my five minutes here talking about this? Because I think that understanding that reduce is the common factor to all of these functions, the three examples I showed, and some others, really gives you a deeper understanding
13:20
of these functions. And it essentially means that if you understand how reduce is, even if it's because of these specific examples, you have one more tool in your tool belt. And as programmers, we want tools in our tool belt. And the more philosophical point, I think, which for me is really beautiful, is that when you connect all of these dots, things start to make sense
13:40
instead of being in a vacuum, you start seeing how everything is related and how everything is connected. And I just, personally, I find it very, very interesting, useful, and nice. So that was it. Thank you for your time and reach out to me over there or through email. Bye.
14:06
Cool, thank you very much. Our next speaker is remote. So yeah, you can... Hello, how are you doing? Hi, everyone. Hey, welcome to your Python. Where are you streaming from?
14:21
I'm from Italy. Nice. Yeah, I hope you can hear me well. It's perfect. So now you have five minutes. Well, okay. Starting from now? Yes, go. Okay. I will talk about Django version, useful tool in this last couple of years
14:45
for a kind of version control for your Django models. Well, I am Danny, I'm from Italy, as I was saying, and I am a food sack developer working with JavaScript 2, sorry for that, and Python.
15:02
And okay, let's talk about Django version. By definition is an extension to the Django web framework that provides version control for modern instances. What are its features? Well, you can roll back to any point in a modern instance history.
15:21
You can recover related models instances and all of this with a simple admin integration. You can install using the Python Django version and adding the version to install it up in Django settings. And then you need to run manage.pi migrate
15:43
because it's creating default tables for history from the models. And then you can integrate it into the admin, in your model admin, like this one. You need to import the version admin from the version admin
16:02
and extend your admin version, admin model like this. After that, you need to launch manage.pi create initial revisions because this command is creating all the first version
16:23
in Django version tables, internal tables. After that, in the admin, in the model admin, this page you will see this button here. I think it's a little bit tiny, but yeah, there is.
16:41
I recovered the related context of records from your model and you will see a list of the related records. Same for the change page. You will see a history button on the top right of the page who will open a change history for that specific record.
17:03
You have a lot of management comments. The basic two are create initial revisions for, as I said, create the first revision of a specific record. You can bind it to a specific model and also have a custom comment.
17:22
But not only this, you can have a lot of other special comments or create initial revisions and you just need to use the dash, dash help command for more informations. Please note that for larger databases,
17:42
this comment can take a while, so take a note of this. Also, there is the related revisions comment. With no arguments, note that this comment will relate to your entire revision history. So you might prefer to use the binding to a specific model
18:05
or using this or keep for keeping last revisions or last days. You can also register a model for using with the API in using the syntax, register the entire model
18:23
or specific fields to include or exclude. And what about Django REST Framework? If you are using Web API, well, you can use Django version REST Framework. Sorry for the long name, totally my fault. I created this package for allowing an endpoint,
18:45
an API endpoint to display the version history. You can install like this, adding the version middleware to the middleware setting, and then you can register your model as we saw before.
19:01
And last thing, you need to extend history model to set your use for Django REST Framework. And this will provide you a lot of endpoints. The first one is the history of revisions for a specific record. The second one displays the specific revision
19:22
for a specific record. Third one displays a list of related records for a model, and last one, Robert, a previous version. You have also a lot of mixing for read-only, et cetera. And that's it, thank you.
19:41
Thank you very much. You're out of time. Yeah, sorry. Thank you for joining. So next one. Okay. Who was here yesterday and liked Bazel? Who wasn't here yesterday and still likes Bazel?
20:01
Great. So how would you like to go to Bazel? Like, because there's a great conference there. It's your SciPy. It's a conference for the scientific packages. So who likes scikit-learn? Ooh, yeah, so here, scikit-learn people. You can meet there. We have tutorials on scikit-learn, pandas,
20:23
Jupyter and things, and two days of tutorials and two days of talks, one day of sprints to work also on the packages so they constantly get better. And we're very happy to announce, we announced the list of session was just released today. So just go to the website and you can see all the sessions that will take place.
20:42
Ticket sales are open. As being an academic conference, the ticket prices are moderate. So if you're a student, your SciPy is also a great place to go. And yeah, that's basically it. So see you back in August in Bazel. Of course, Adrian wants to add something.
21:02
And if you're a maintainer of any of those packages or related packages, we're also organizing the maintainers track. That's not through a CFP. It's much more casual. It usually means we're a bunch of people sitting together like a round table and discussing common issues. If you're interested, contact one of us. Cool, thank you very much. Thank you very much.
21:20
So while the next person is connecting the laptop, I want to ask Patrick, is Rolomir or Arturo or Elena here, ready? Yeah, cool. Please, Rolomir, yeah.
21:41
Let's hope it works. It takes a few seconds. You have to say a joke. Good. Cool. Five minutes, go. Okay, hello, you're a Python. My name is Peter Sobot. I'm gonna talk really fast because this could probably be a half hour talk, but I'm gonna give it in five minutes. I'm gonna talk about reverse engineering Keynote with Python LLDB and Protobuf.
22:01
So what is Keynote? If you haven't heard of Keynote before, it's the app I'm using to make this presentation. It's PowerPoint but made by Apple. It's really, really nice. Does some smooth animations and cool stuff. What I don't like about Keynote is that it uses a proprietary file format. There's no way to open up a Keynote file and edit it from Python or edit it in your text editor or really make any sort of automation happen
22:20
outside of Keynote itself. So let's bust this open and reverse engineer it in about five minutes. First off, let's look at the bytes of the file. This is the bytes of a Keynote file here. You'll notice that it actually starts with two letters, PK. That's a good hint that it might be a zip file and that actually is because the guy who invented the zip file format was named Phil Katz and so he made the header his own initials. I should really make a file format now.
22:41
That's a great idea. But if we just try to unzip a Keynote file here, we can do that with the unzip command at the command line and it works. It actually gives us all of these files here and you see a lot of them are JPEGs. So if you just want to change the images in a Keynote file, that's easy to do. But there's other stuff as well. What if you want to change the text or automate any sort of other parameters in your file?
23:01
All of that's down here in these IWA files which stands for iWork Archive. iWork is the old name for Keynote. If you open one of these, it's not actually as useful. There's no markers in here. There's something to hint at what this file might be but you can scroll through and kind of see some of the text that was in your Keynote application or your Keynote document there. And here we have with p and then tll and stuff like that
23:21
and you can see from my first slide I had the same kind of text. Now some characters are missing so this is a hint that this might be compressed. So let's try and find out what compression format was used here. We can find this out by looking through the symbols of Keynote itself with this long command at the command line. We use the nm command and look for is it bzip maybe or is it bz2 or is it deflate or is it snappy?
23:41
These are all different compression formats. And this last command actually gives me a bunch of output which is a good hint that maybe Keynote is using snappy for compression. So let's use Python for this. Let's use the snappy Python library, open up that file that we just had there and try to decompress the file. If we chop up the first four bytes it actually works. So we're actually able to get some real content back
24:01
and you'll notice the full text content is available there. But there's all these pink bytes there. There's all these bytes that are not really intelligible and they don't make sense compared to the text in there. So there must be some other encoding format being used. And to find that out we can go back to our nm command again and type all this stuff in and look through all the rest of the strings to see maybe is there some hint at what's being used in here.
24:21
Now Keynote is made by Apple so something stood out to me in here and that's the fact that the word Google shows up three times at the bottom here. And that's actually Google's protobuf library being used by Apple for encoding the Keynote files themselves. So knowing a little bit about how protobufs work if you have protobuf in your application you need to put the schemas or the format of your protobuf documents
24:41
into the application itself. So we can do RG here, ripgrep for the protofiles in Keynote and then we find them, they're actually in there. So we write a little bit of Python which I'm not gonna show on the screen. You can extract all of that data and dump that to protofiles. They can just sit in a directory right there and suddenly now we have the schemas to decode what's happening on the inside of Keynote. But there's still one problem.
25:02
All of these have human readable names. Internally Keynote doesn't use human readable names. So we're going to have to bust Keynote open and use Python to actually inject code into it and extract data to decode all this stuff. This is where LLDB comes in. LLDB is a low level debugger. It is a debugging tool that you might use on the command line for inspecting
25:21
or debugging binary applications. In our case we're gonna call it from Python. So we'll do import LLDB and script the entire process. We'll import LLDB, create a debugger, set it to synchronous mode and then we'll say let's open up Keynote. So set a target to the path to the Keynote binary. Then we'll set a breakpoint. You can do this with LLDB really really easily
25:41
but in Python it's also easy. You can programmatically create a breakpoint here and say when the application is done launching, break on this method. So break on send finish launching notification which just happens as part of the boot process of any Mac OS app. Then we launch the app and then immediately after the app gets launched we'll hit that breakpoint automatically and we can run a couple commands here to grab the current thread,
26:01
grab the current stack frame and actually inject some objective C code. So this is, to be honest, the most interesting part to me. You can take this string of objective C code, inject it into the process, have it compiled on the fly, have it run and then take the result as a string back in your Python code. And once we have the result we have all the information we need to turn this back into information we can use
26:20
to decode the IDBA files we saw. So now we can go from that binary blob on the left to YAML on the right hand side and if you wanna actually do this for your own Keynote presentations I happen to make a library for it called Keynote Parser. So you can use Keynote Parser directly but I hope that instead of just a library you've had your interest peeked a little bit into how you can reverse engineer applications with Python and kind of break things apart and play with the insights.
26:42
Thanks so much. Thank you, thank you very much. So the next one is something about don't do something with mocks. Don't and mocks, I really like those two words together. All right, okay. Levels, levels, there we go. So I'm standing here
27:00
because I've made a stupid joke on internet and while it didn't get me fired it got me to write this short talk. Since then I've transformed it into a blog post which I will tweet out later so if this is too fast for you and it is gonna be fast, maybe read it up later. So of course this has nothing to do with manners and it's a mantra from the London School of Test Driven Development
27:20
and it's about third party dependencies in tests. So now I'm gonna tell you why you should mock APIs that you don't control and what to do instead. And as a case study I will use a very simple HTTP client. Say you are running a Docker container registry and sometimes you want to have an overview over the containers that you are in your repositories.
27:42
So you want to have the list of the names along with the tags. And this data is available from the HTTP API. If you don't know about anything what I've just talked about, it doesn't matter. You just have to know we are gonna talk to an HTTP API. So we will write a function that fetches the data
28:01
from this API and that returns a dictionary from the repo names to the version tags for each repo and we will call it get repos with tags. There we go. So this function takes a pre-configured HTTPX client. HTTPX is really good. And we built a dictionary from the repo names to the tags.
28:21
So first we ask the catalog endpoint for a list of repository names and extract it from the JSON response. Then we iterate over the names of those repositories and for each repository we will get the list of the tags and again we extract them from the JSON response and we return the dictionary. All right?
28:41
So on the first site this doesn't look that bad actually because we are passing in a client. So we can pass in a fake client, a mock if you want and that doesn't talk to the network at all. You can return any data you want. You can also simulate errors which is very useful. Yet, I'm here to tell you to not do this and this is not great. Why?
29:00
Well, if you want to test this, you end up with this monstrosity. You need three nested mocks just to verify that if you call the get method, if the get method returns an empty list that the function returns an empty dictionary. Now, this is the logic we are testing and it's drowning in this noise.
29:22
And the problem here is we are testing business logic and we have to mirror the structure of an HTTP client library. We have to even fake JSON payloads and none of this belongs into business logic tests. So this makes the tests less expressive and it also makes them more brittle because you don't want to rewrite your business tests
29:41
just because you switched out your HTTP libraries which takes us to the core point. There's a difference between owning a component and like an HTTP library or a database driver and owning the API to say component. In other words, if you want to have an API that you don't own and you want to mock it, you write a thin layer around it and mock that.
30:02
And this is what you're gonna do right now and I was too slow switching slides, I'm sorry. So we all have a class. We call it Docker registry client. It has an HTTPX client and we write them get repos method. There it is. It's the same code like before and we do the same thing for get repo tags. It gets the repo name, returns the tags, right.
30:22
It's important to keep this layer as simple as possible because this is the hardest one to test. This is interacting with the dirty world so adding logic into this layer means that you are just moving the problems into a different layer that's not helpful. So now we rewrite our function and it looks like this. Now look at this. Much more dramatic.
30:40
Now you can actually see that you could make it a dict comprehension, something that was not as obvious before. So we get cleaner code. This is already a big win here. Now let's rewrite the test and look at that. Only one mock, one lambda. It's simpler. The font is bigger so it's clearly better and once you want to do more complex tests like when get repos doesn't just return an empty list,
31:03
you just add a mock or a lambda for the tags function. You don't have to have a smart get method mocked out which is possible but messy. So obviously this makes more sense and more complex software but the same rules apply.
31:22
And this is it. This is why you don't mock what you don't own. I'm Hynek. I'm at Hynek on Twitter. I'm happy to talk about all this kind of stuff. I have opinions. Come and fight me. Thank you. Thank you very much. How much? You still have 20 seconds. Let me tell you more about my opinions. Okay, we're going to steal the adapter
31:41
because I think, let me see. Yeah, I don't have the others here. Two reminders. I have a Sony phone there that was in the floor here so if someone throws the phone. And if you have a ticket for social event, go and pick up the physical ticket.
32:03
Oh, okay. Yes. Hello everyone. My name is Patrick. I am one of the organizer of this conference and I really want to invite you to come for a run tomorrow. If you want to choose which time of the day
32:22
you can go on Discord, we have a very simple poll so you can choose and you can come around with us. But other than running, I really like writing tools for other people and one of the tools I built recently is called Latest.cat. And I built it because I was a bit frustrated by having to find the latest version
32:42
of a software like Python. For example, you have to go to the website, you have to parse this page and maybe find it here. And I wanted to make something that's a bit easier to use. So there's Latest.cat, you can go type Python and get the latest version. You can also use it from the command line
33:00
so you can use it with cURL. You can use it, you can pop it to other commands. And for some reason it also works from SSH so you can go there. And you can get the latest version of Python. Yeah, hopefully it's all for someone. Go to Latest.cat and use it. Thank you.
33:21
Cool, thank you, Patrick. So next one is Rolomir. Sorry. I think, yeah. Yeah, go for it. Sorry if I was mixing.
33:41
Let's hope. Now I need to say some history about Dublin. Where are you to? When I was in Dublin, I can, I can, almost there.
34:09
Yes. That's okay. So five minutes, go. Thank you. So I want to tell you about a certain mechanism that's Swiss entomologists and then social science
34:22
people have discovered. It's about how AMPs and thermites and Wikipedia editors and open source developers build large things. Basically, how do you build something big, right? You start a committee and you discuss
34:42
how you are going to build it in very tiny details. And then when you have it ready, you give the plan to the developers and the developers of course go and implement it, right? Only one problem. AMPs and open source developers don't read.
35:05
So instead, how they work is they just go on the site and look around and see, oh, there is something missing there. I will add it. Here, there is a comment that says, oh, this needs fixing. So maybe I will look into fixing that.
35:23
So they basically use their environment and the pheromones or comets that are added to that environment by other agents working on them to decide what to do and how to do it. And that's called, this way they can build
35:43
really, really big things without first planning them upfront. And the plan tends to not survive actual implementation. There is always changing requirements.
36:00
There is always unforeseen circumstances that you need to take into account. With this kind of strategy, you actually adapt the circumstances as they are discovered. And it's a very robust way of building software.
36:23
Maybe the end result doesn't look great. There are some extrusions that don't have any use and don't look pretty. But over the years, because the work of so many agents is accumulating over the work of previous,
36:41
and you get this incremental improvement, huge projects, huge old projects, so I don't know, like Emacs or Veeam or not just text editor, like BSD kernel, or things like that, they really grow very big and very solid and very useful.
37:02
And that mechanism is called Stigmaj. There is a mechanism of looking at your environment and reacting to it and building the thing by multiple agent without actually communicating directly.
37:21
There is only one problem with Stigmaj. It's sensitive to external stimuli. Which is, most of the time it's good, right? You want to adapt to the world around you. The problem is if you have ants building a nest and you put some sugar around it, you can divert some of the ants
37:41
from making them ignore the pheromones and instead follow the sugar. And this way you can kind of take over the project. You just need very little sugar because only a few ants will leave enough pheromones for other ants to follow.
38:00
What you can do, you can make the ants focus on just one part of the nest that you care about and abandon all the rest. In open source projects you can recognize that this is happening if you have like a bug report that everybody thinks it's important but it's not being worked on for 10 years
38:22
because everybody is working on something else. Maybe something is wrong there but there are more things you can do. If you keep moving the sugar around, you can do something that's called move fast and break things. So basically you prevent this accumulation of quality,
38:43
this accumulation of work from happening and the project actually never gets finished, never gets anywhere. And if there are projects that are also depending on it, you are also destroying those projects. So it's very dangerous if you have such interference
39:04
from outside into a project where the internal communication happens to the environment. That's all, thank you. Thank you very much Rodomir. Now we're going to welcome Arturo
39:24
with a talk about MOC scikit-learn. Just a second while we set up the AV. Eduardo, here. Eduardo, if you're here, please report there.
39:40
Is it working? It is not working. Do I have just to put it in? I told Caro to seculite, seculite.
40:08
Do you know? Want to know? Yeah. But then, okay. Yeah, that's gonna be it. You can view it here. Okay, see?
40:30
Okay, good. Hello everyone, I'm really glad to be here. I'm going to present the MOOC on machine learning in Python with scikit-learn.
40:41
Some of you may already know it, but because we already had a couple of sessions. And it's a work that we have between the scikit-learn core developers, or at least a subset of us, and some French institutions, which are the INRIA and the France Université Numérique.
41:01
And my name is Arturo Mork. You can find me in my social networks like that. So why do I have to pay attention to this guy if it's so late and we all want to go to the social event? Well, because a couple of years ago,
41:20
there was this tweet from this person saying that we have a regularization implemented by default in the logistic regression in scikit-learn. And he claims that probably not a lot of authors know about this, even if it's in the documentation.
41:42
So of course, I mean, it's in the documentation, but also we wanted to create a MOOC for people that even if they have a background in machine learning, they can find how to use good practices like hyperparameter tuning so that they don't really have to worry
42:03
if this is the default value or not. So what makes us different? First of all, I would say that it's moderated by some of the core developers, as I already said. It's also quite good because you have nothing to install in the font platform, you have everything provided.
42:23
We also have a static version, which is this one here. And it's accessible during the whole year. But in the font platform, you can also get a free attestation whenever you have a score above 60% of the questions.
42:44
We have quizzes and we have wrap-up quizzes, but I'm going to come back to this later. And also something that I find quite important is that we are following the spirit of open source, meaning that everybody can contribute to the course
43:02
and make a pull request to say like, okay, maybe this can be explore a little bit more in detail, maybe this was not phrased correctly, maybe I can add a wrap-up table, these kind of things. So we are really open to getting feedback from users and educators.
43:22
And that's the site where you can make your pull request and this is the font site that I was mentioning. So our philosophy is hands-on, you learn by doing. And it's divided in seven models, plus one introductory model. We have 15 video lessons that hopefully
43:41
are not very distractful, but the other way around. They are meant to make the course more friendly and erratic. And also we have 70 programming notebooks with 21 exercises that are not graded, but what we grade is this 26 quizzes and wrap-up quizzes.
44:01
In particular, the seven modules contain a narrative of having the predicted pipeline so that from the very first notebook, you get to explore a bit the data set and you build your first model. Great. And in particular, you can learn a lot
44:22
about hyperparameter tuning and don't commit, don't make these kind of mistakes that the guy in the tweet say. So in each session, we have had like around 1,500 participants per session
44:43
and a lot of very positive feedback in the forum. We have a very active forum. I just want to invite you to join this common effort, learn something new. We are opening a new session in October, so stay tuned. And many thanks to all of you.
45:02
This is the team on the left hand, the teachers on the right hand, the pedagogical and technical team. Thank you. Thank you very much, Arturo. Up next on the stage, we'll have Alena announcing a Python weekend conference.
45:27
In the meantime, I'll tell you that the roster for the lightning talks is pretty full today. There will be another round of lightning talks tomorrow and registrations for those will open at 8 a.m. So be first, so you get a slot.
45:44
Is it working? Oh my God. I broke it. What's happening? Did you try it during the event?
46:04
Shoot. It's a universal signal, right? Guys, I'm super sorry about that. I'm sorry, I'm sorry. I'm sorry. I'll give you the second, there you go. Okay, wait, wait, wait.
46:20
In the meantime, I can announce more. For instance, the fact that tomorrow morning at 9 a.m. we'll be welcoming you all here for a announcement and then follow a keynote session. It's gonna be on the gill. It's something you probably have never heard of because it's a very, very foreign concept to most Python developers.
46:41
And something about multi-threading or processing. I forgot which one exactly. It doesn't really matter. It's interchangeable. Yeah, so there's that. We're nearly done, right? Because I'm not really good at improvising things. Sure, of course.
47:01
We are working on it. Oh, you weren't joking. Yeah, sure, so. Oh. Yeah, okay, it's fine. Hi, guys. Hey, I'm Alinka, I'm tech community manager at One Fruit Company, kivy.com, travel and tech, maybe you know us. So with my internal Python community, we are organizing all kind of crazy Python events
47:22
all over the Europe thanks to our travel company. We are traveling a lot. And I just wanted to announce our next Python weekend in Barcelona. It will be from 19th to 21st of August and you can check out all the information at kivy.com Python Weekend. It's highly intensive educational event
47:41
where we will be building the prototype of kivy.com core technology. Our eight mentors will be guiding you on this process and it's completely free for the community. So just check out the link. I hope you captured that. And ping me on Twitter if you have any questions about that and I will see you soon.
48:03
Ciao, kivy. Thank you, Elena. We'll now close off the lightning talks with the last talk of the day. I have the honor of announcing Jakob, who is the EuroPython Society auditor
48:21
and a long contributing member to our efforts. And he will talk about testing inner functions.
48:57
So I assume that you all have heard about inner functions in Python.
49:02
They are functions inside the scope of another function. You have the basic case where you have just a function inside a function. Like on my slide here, I have the function f with g and h as inner functions. They're also called nested functions.
49:21
We have a more advanced model where we have the function inside a method instead and we also have the possibility of doing deep nesting. So far, nothing really interesting.
49:41
But how do we test inner functions? We don't because we can't reach them, right? They are in an inner scope because we want nobody else to depend on them so that we can use them to implement something
50:00
that is an implementation detail. So wouldn't it be nice if we could do something like this where we, from a package which we call nested, import nested. And as in our tests, we import our function f,
50:26
our class c, and our function m. And then we test, for example, the function g which is an inner function. And we use some sort of way to get access to this
50:41
saying that, well, it comes from the function f, it's called g, and it needs to have the three variables, v1 and v2, set. And then I do the test. And I do the same thing with the other cases as well.
51:02
I can test my function h, I can test my function k which is inside the c.foo method, and I can do nested testing where I need to fish out the function m, and from the function m,
51:23
I need to fish out the function o. Well, it turns out that this is possible. So let's go see the magic because that's where the real fun begins. So this function nested takes a reference
51:46
to the outer function. We give it the inner name, and we give it the three variables. So then first we check that this is actually a callable which we do by checking that the outer function
52:02
is an instance of types.function type or types.method type. And then we take out the code object of this function. And then we go through something called co-constants
52:24
in this one which are the actual references to all the constants inside this function object which includes all the inner functions.
52:48
And an inner function is an instance of the type types.code type, and it has the name we're looking for. And if it has the name we're looking for,
53:00
then we create a new function object that contains the code object of that, and we bind the three variables so that they each have a closure, and we do that up in this function at the top
53:25
called freevars. Oops. And if you want to get access to this nested function, nested module, then it's available at this URL.
53:43
Who learned something new? Great. I didn't come up with this myself. I found it on Stack Overflow with no upvotes. Thank you.
54:05
Thank you, Jacob. I'd like to ask you to join me in one more round of applause for all of our Lightning Talk contributors for today.