We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

EuroPython 2014: July 22, 2014 - Lightning Talks

00:00

Formal Metadata

Title
EuroPython 2014: July 22, 2014 - Lightning Talks
Title of Series
Part Number
4
Number of Parts
119
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language
Production PlaceBerlin

Content Metadata

Subject Area
Genre
Abstract
Lightning Talks: Elliptics: Anton Tyurin, On Being Super: Austin Bingham, PYCON Finland: Mikko Ohtamaa, Regularities in language: Dmitrijs Milajevs, pip install pyladies: Lynn Root, Iktomi Forms: Harut Dagesyan, Killer Robots: Radomir Dopieralski, ZeroVM: Lars Butler, Zombies and Application Runtimes: Dmitry Jemerov, FritzConnection - Communicate with the AVM Fritz Box: Klaus Bremer, Argment Clinic: Larry Hastings, PEP 473: Adding structured data to builtin exceptions: Sebastian Kreft, Supporting Python 2 and Python 3 witth the same source code: Stefan Schwarzer, Birthday: Mark Shannon, nsupdate.info bepasty: Thomas Waldmann, Python Core Security: Christian Heimes, Hands On Unix: Rok Garbas, Deproulette: Joar Wandborg
Keywords
Source codeGreen's functionMultiplication signComputer animationLecture/Conference
Metropolitan area networkMultiplicationMathematical singularityDrill commandsPosition operatorRight angleSystem callService (economics)Key (cryptography)Range (statistics)Form (programming)Image resolutionProjective planeData storage deviceScalabilityFraction (mathematics)Group actionFood energyCrash (computing)Open sourceMusical ensembleProduct (business)User-generated contentHigh availabilityMathematicsData centerMechanism designReplication (computing)Dependent and independent variablesHash functionEllipseComputer animationLecture/Conference
Cache (computing)Maxima and minimaServer (computing)Proxy serverSoftware developerData centerNumberState of matterDifferent (Kate Ryan album)Group actionEllipseData storage deviceComputer fileContent delivery networkIntelligent NetworkOperator (mathematics)Cache (computing)Digital photographySoftwarePolar coordinate systemInterface (computing)Scripting languageCartesian coordinate systemComputer programmingPower (physics)Poisson-KlammerKey (cryptography)Internet service providerElectronic program guideInferenceService (economics)Formal languageWater vaporFile systemLecture/ConferenceDiagramComputer animation
Goodness of fitMereologyEllipseFront and back endsProjective planeData storage deviceLine (geometry)Computer fileAxiom of choiceWeb browserKeyboard shortcutMassQuicksortLecture/Conference
Inheritance (object-oriented programming)KnotOrder (biology)TheoryEndliche ModelltheorieObject (grammar)Wave packetProxy serverInheritance (object-oriented programming)Image resolutionSoftware industryOrder (biology)MereologyRight anglePosition operatorDifferenz <Mathematik>AlgorithmImplementationVariety (linguistics)Axiom of choiceFile formatLecture/ConferenceComputer animation
Graph (mathematics)ImplementationOrder (biology)Inheritance (object-oriented programming)Dynamical systemCASE <Informatik>Price indexStandard deviationSocial classComputer scienceGraph (mathematics)Graph (mathematics)Multiplication signFormal languageObject (grammar)LinearizationConstraint (mathematics)Sound effectImage resolutionFigurate numberRhombusWater vaporRule of inferenceFunctional (mathematics)Order (biology)BitAlgorithmNeuroinformatikCalculation
MereologyOrder (biology)Inheritance (object-oriented programming)Regular graphMetropolitan area networkParameter (computer programming)Proxy serverBitSocial classResultantObject (grammar)Multiplication signArrow of timePoint (geometry)Image resolutionType theoryLogicAlgorithmNetwork topologyFunctional (mathematics)Inheritance (object-oriented programming)System callEmbedded systemResolvent formalismLecture/ConferenceComputer animation
Message passingRing (mathematics)Field (computer science)Goodness of fitBitComputer animationLecture/Conference
Software engineeringBackupLaptopMoment (mathematics)Reduced instruction set computingSelf-organizationSign (mathematics)Computer animationLecture/Conference
BackupOpen setArmGamma functionInternet service providerMaxima and minimaMoment <Mathematik>Goodness of fitSimilarity (geometry)BitSemantics (computer science)Arithmetic meanWordDifferent (Kate Ryan album)Vector spaceComputational linguisticsObservational studyField (computer science)Context awarenessMultiplication signDirection (geometry)Pattern languageTrigonometric functionsStudent's t-testForm (programming)Set (mathematics)NumberSpacetimeDistribution (mathematics)Right angleTelecommunicationFormal languageDistanceLecture/ConferenceComputer animation
Computer iconMetropolitan area networkDistanceSpacetimeMessage passingGraph coloringFamilyWordCodeSemantics (computer science)Point (geometry)PlotterDimensional analysisElectric generatorView (database)XML
Executive information systemLine (geometry)Software developerComputer programmingResultantSign (mathematics)Multiplication signDifferent (Kate Ryan album)CodeProgrammer (hardware)Right angleLecture/Conference
Storage area networkBitSlide ruleGroup actionQuicksortWhiteboardFront and back endsSoftware developerIntegrated development environmentFrequencyRootMultiplication signRight angleSemiconductor memoryUniform resource locatorException handlingOpen sourceLecture/Conference
Inheritance (object-oriented programming)Self-organizationHost Identity ProtocolCAN busPersonal area networkStatisticsChecklistScripting languageSet (mathematics)BootingWordMedical imagingResonatorSoftware development kitWeb 2.0Materialization (paranormal)Self-organizationBasis <Mathematik>Graph (mathematics)Right angleChecklistScripting languageStatisticsProcess (computing)Data miningArithmetic meanLocal ringSoftwareTwitterQuicksortLecture/ConferenceComputer animation
Mathematical singularityForm (programming)HypermediaTouchscreenMoment (mathematics)Presentation of a groupCloningOnline helpStudent's t-testXMLLecture/Conference
Form (programming)outputElectronic visual displayAnalog-to-digital converterMetropolitan area networkValue-added networkData acquisitionOvalMassGamma functionPort scannerHand fanReal numberModul <Datentyp>ArmRankingMaxima and minimaHigher-order logicStudent's t-testForm (programming)Point (geometry)GenderoutputRepresentation (politics)Formal grammarAbstractionBitDifferent (Kate Ryan album)Data structureCondition numberError messageData modelComplex (psychology)Field (computer science)ImplementationInsertion lossWell-formed formula1 (number)Object (grammar)Coefficient of determinationAtomic numberWordData conversionStreaming mediaValidity (statistics)Functional (mathematics)Message passingSystem callParameter (computer programming)Execution unitDialectType theoryElectronic mailing listUnicodeString (computer science)ResultantLecture/ConferenceXMLComputer animation
Metropolitan area networkVisual systemAnalog-to-digital converterMessage passingForm (programming)Web pageEndliche ModelltheorieDemo (music)Mathematical singularityForm (programming)GUI widgetSingle-precision floating-point formatField (computer science)Canadian Mathematical SocietyTemplate (C++)Entire functionKey (cryptography)WordBitSource codeComputer animationLecture/Conference
Uniformer RaumMultiplication signPattern languageWordLine (geometry)BitMereologyData miningProjective planeParameter (computer programming)RoboticsGame controllerServer (computing)Formal languageComputer programmingLecture/ConferenceComputer animation
Degrees of freedom (physics and chemistry)QuicksortKinematicsBitAlgebraLinear algebraWebsiteServer (computing)Lecture/ConferenceEngineering drawingDiagramComputer animation
Goodness of fitArithmetic progressionBuffer overflowWordLecture/ConferenceComputer animation
Drop (liquid)Uniformer RaumClient (computing)Overhead (computing)Hyperbolic functionComputer hardwareDataflowPoint (geometry)Open setType theoryVirtual machineVirtualizationPairwise comparisonDifferent (Kate Ryan album)Water vaporOpen sourceArithmetic meanKernel (computing)Overhead (computing)Operating systemLecture/ConferenceComputer animation
Overhead (computing)Computer hardwareKernel (computing)Hyperbolic functionDataflowState of matterUniformer RaumRead-only memoryPort scannerSource codeMiddlewareSoftware developerRankingKey (cryptography)Software developerComputer programmingMultiplication signProcess (computing)Interpreter (computing)DemonMehrplatzsystemCodeNeuroinformatikData storage deviceReading (process)Functional (mathematics)Software testingCore dumpClient (computing)Point cloudIntegrated development environmentRandomizationCartesian coordinate systemoutputParameter (computer programming)AbstractionNetwork socketSource codeRight angleCopyright infringement2 (number)Limit (category theory)Computer fileInheritance (object-oriented programming)WebsiteStatistical hypothesis testingState of matterComputer animation
Uniformer RaumMetropolitan area networkSet (mathematics)Ring (mathematics)Endliche ModelltheorieCartesian coordinate systemPhysical systemDifferential equationMathematicsGoogle App EngineSoftware frameworkGraph (mathematics)Musical ensembleSoftwareGraph (mathematics)Sampling (statistics)Connected spaceLecture/ConferenceComputer animation
Binary fileModul <Datentyp>Directed setComputer networkMiniDiscStandard deviationTask (computing)ComputerWeb browserRevision controlWeb pageMetropolitan area networkBitImplementationStrategy gameAssociative propertyGroup actionElectronic mailing listCartesian coordinate systemAdditionAddress spaceWeb browserInstance (computer science)Direction (geometry)Scaling (geometry)MappingInstallation artSoftwareDefault (computer science)Process (computing)MiniDiscVirtual machineRun time (program lifecycle phase)Web crawlerBitGrass (card game)Presentation of a groupParameter (computer programming)Endliche ModelltheorieType theoryLimit (category theory)Semiconductor memoryNeuroinformatikRight angleCollisionComputer engineeringComputer fileData storage deviceLine (geometry)State of matterLink (knot theory)Game theorySoftware developerExecution unitMachine codeStandard deviationMobile appMedical imagingAuthenticationThread (computing)Complete metric spaceGraphical user interfaceWindowVideo game consoleComputer animation
Mathematical singularityDrill commandsUniformer RaumCuboidService (economics)Group actionParameter (computer programming)Metropolitan area networkGamma functionMach's principleEndliche ModelltheorieDependent and independent variablesRouter (computing)CuboidInternetworkingMultiplication signLevel (video gaming)Software testingService (economics)Connected spaceResultantRadical (chemistry)Line (geometry)CodeCorrespondence (mathematics)Sheaf (mathematics)Group actionElectronic mailing listGame controllerOffice suiteComputer configurationArithmetic meanDifferent (Kate Ryan album)DialectFamilyIP addressSoftwareTupleParameter (computer programming)Repository (publishing)Link (knot theory)System callType theoryModule (mathematics)Letterpress printingAddress spacePasswordInternet service providerLibrary (computing)WordForcing (mathematics)SummierbarkeitXMLUMLLecture/ConferenceComputer animation
Uniformer RaumData managementVibrationRing (mathematics)Computer iconRange (statistics)Lecture/Conference
Discrete element methodComputer fileInclusion mapParameter (computer programming)ParsingMetropolitan area networkLength of stayInformationData typeModulo (jargon)Higher-order logicFunction (mathematics)Module (mathematics)Pauli exclusion principleCodeBitInterpreter (computing)Arithmetic meanImplementationFunctional (mathematics)IntegerMedical imagingPosition operatorTrajectoryObject (grammar)Pointer (computer programming)Parameter (computer programming)String (computer science)outputInformationQuicksortLine (geometry)Virtual machineType theoryFunction (mathematics)ParsingInterface (computing)Computer fileProcess (computing)Error messageRight angleSource codeComputer configurationModule (mathematics)Different (Kate Ryan album)Electronic mailing listMultiplication sign1 (number)MereologyOptical disc driveFood energyDefault (computer science)Greatest elementTouch typingSystem callSpectrum (functional analysis)Electronic signatureShift operatorEntire functionData conversionLecture/ConferenceComputer animationJSONXML
Mathematical analysisDemoscenePhysical systemLecture/Conference
Pauli exclusion principleSource codeMessage passingComputer fileElectronic mailing listPrice indexLine (geometry)System callSoftware testingInformationAttribute grammarData typeWorld Wide Web ConsortiumVideo game consoleInteractive televisionException handlingPauli exclusion principleUltimatum gameInformationCASE <Informatik>Term (mathematics)Civil engineeringArithmetic meanSubject indexingLetterpress printingCodeUniformer RaumExecution unitTablet computerError messageOpen sourceType theoryObject (grammar)Limit (category theory)Library (computing)Maxima and minimaNormal (geometry)Statement (computer science)Function (mathematics)Video game consoleProcess (computing)AliasingInteractive televisionEmailSoftware testingWeb applicationStandard deviationLecture/ConferenceComputer animation
Source codeTask (computing)Software developerKnotExpert systemRevision controlUnicodeMathematicsMetropolitan area networkValue-added networkOffice suiteOpen setGroup actionLocal ringGraph coloringCodeWordRule of inferenceBitLibrary (computing)Different (Kate Ryan album)Source codeRevision controlSoftware developerElectronic program guideMereologyVotingView (database)Lecture/ConferenceComputer animation
Mathematical singularityDrill commandsPower (physics)Right angleHash functionMappingNumberFunctional (mathematics)ParadoxFreewareGoodness of fitLogicBitComputer animationLecture/Conference
CollisionHash functionGoodness of fitState of matterSemiconductor memoryFilter <Stochastik>LaptopParadoxDisk read-and-write headBitPosition operatorCASE <Informatik>Different (Kate Ryan album)Server (computing)Negative numberCategory of beingGroup actionSound effectSet (mathematics)IntegerData conversionRow (database)Lecture/Conference
Service (economics)Ideal (ethics)Disk read-and-write head12 (number)Router (computing)Web browserDatabaseInformationMultiplication signInstance (computer science)Direct numerical simulationClient (computing)Dynamical systemService (economics)Server (computing)SoftwareDot productDomain nameProjective planeData structureAddress spaceHacker (term)Bootstrap aggregatingSelf-organizationConnected spaceSpacetimeLibrary (computing)BitWeb 2.0InferenceMathematical analysisVideo gameWeb pageObject (grammar)FreewareQuery languageOrder (biology)Network topologyForestCommunications protocolLecture/Conference
Metropolitan area networkDirect numerical simulationService (economics)LoginBinary fileDivision (mathematics)Maxima and minimaDomain nameElectronic mailing listOrbitTouchscreenDirect numerical simulationConnected spaceLoginAddress spaceClient (computing)GoogolConfiguration spaceReverse engineeringDomain nameServer (computing)Projective planeKeyboard shortcutStatisticsSubsetRevision controlXMLLecture/ConferenceSource code
Metropolitan area networkAbstract syntax treeComputer-generated imageryVideoconferencingBinary fileProbability density functionComputer fileMultiplicationDrop (liquid)Physical systemElectronic mailing listIdeal (ethics)Projective planeBinary fileType theoryContent (media)Object-oriented programmingCASE <Informatik>Medical imagingVideoconferencingBinary codeComputer fileElectronic mailing listWeb browserGoodness of fitData structureQuery languagePhysical systemMultiplicationInformation securityBootstrap aggregatingOnline helpSource codeXMLLecture/ConferenceComputer animation
Logical constantInformation securityIntegrated development environmentElectronic visual displayLecture/ConferenceComputer animation
Core dumpDependent and independent variablesSoftware developerMetropolitan area networkSource codePort scannerOpen setMathematical analysisMultiplicationSurvival analysisMultiplication signLimit (category theory)Software developerSource codeInformation securityDependent and independent variablesPopulation densityOnline helpDifferent (Kate Ryan album)Form (programming)CodeFood energyProjective planeDivisorSoftware bugPresentation of a groupSubject indexingFreewareDot productTraffic reportingOpen sourceChainEmailGoogolCore dumpFluid staticsGradient descentTwitterComputer animation
Data acquisitionPauli exclusion principleComputer fileValue-added networkMetropolitan area networkAsynchronous Transfer ModeMusical ensembleGamma functionComputer networkProcess (computing)Message passingSensitivity analysisLibrary (computing)ImplementationFunctional (mathematics)PressureModule (mathematics)WindowPairwise comparisonForestScripting languageInformationWordKeyboard shortcutHash functionRandom number generationDirectory serviceProcedural programmingNeuroinformatikKey (cryptography)Flow separationPasswordSystem callVideo game consoleWebsiteRevision controlComputer fileNumberMathematicsRandomizationAsynchronous Transfer ModeDemonFunction (mathematics)RootMultiplication signBitLecture/ConferenceProgram flowchart
Information securityProjective planeDifferent (Kate Ryan album)CodeMultiplicationPhysical systemData managementRevision controlComputing platformSoftware developerPortable communications deviceLevel (video gaming)Lecture/Conference
Asynchronous Transfer ModeSoftware developerMaxima and minimaMetropolitan area networkRevision controlMultiplicationBinary fileData modelPort scannerPortable communications deviceGastropod shellEuler anglesDiscrete element methodData managementVideoconferencingExt functorArmGamma functionMusical ensembleBinary codeInstallation artRevision controlPoint (geometry)Cartesian coordinate systemNumberMultiplication signEndliche ModelltheorieSource codeControl flowIntegrated development environmentDivergenceDifferent (Kate Ryan album)Lecture/ConferenceComputer animation
Computer iconSoftware bugDefault (computer science)Integrated development environmentSoftware developerKeyboard shortcutRevision controlLaptopPoint (geometry)Projective planeLevel (video gaming)VirtualizationProcess (computing)Formal languageCuboidFunction (mathematics)Medical imagingCurvatureRight angleDivergenceLatent heatLecture/Conference
NumberMultiplication signSpring (hydrology)Range (statistics)Right angleCondition numberComputer programmingDeclarative programmingSet (mathematics)Lecture/Conference
2 (number)Lecture/Conference
Transcript: English(auto-generated)
All right, it's four o'clock. It's time for lightning talks again.
Thank you, thank you. How was the rest of your Python for you today? Was it good? All right, all right, thanks. I think all the people with the green shirts, everybody who's putting work into this, really appreciate that you like it.
Okay, let's get started. We don't have two setups again. We're gonna stick with a quick switchover, so if you are giving a lightning talk today, please be prepared to quickly set up.
We're gonna start with Anton Turin about elliptics, and the person after that is going to be Austin Bingham on being super. Austin, are you there? Excellent, best position you could pick.
All right, let's go.
Hello, my name is Anton. I work at Yandex, sorry, okay. Yandex is a Russian company. We provide services like searching and, oh, something wrong, search, mail, video, music, and so on. We have a lot of user-generated content services,
and today I would like to introduce you one of our open source projects named Elliptics. Elliptics is a distributed fault-tolerant key-value storage with high availability, high scalability, and a lot of other buzzwords. We use it in our production to store petabytes of data
and billions of keys, and it works perfectly. It was founded to solve problem when one of our data centers goes down. Idea of Amazon Denama is in base of this storage. Of course, Elliptics has DHT and provides replication
by using mechanism of Elliptics groups. Each node in one group takes responsibility for some range, bless you, for some range of keys and this DHT ring, and when you store your data
by key, hash is calculated from this key, and according to that number, data is transferred for some node. If you need replication, you should write your data in three different groups, for example, in three different data centers. Elliptics is not simply a storage.
It provides a distributed cache, Russian words, imaging, and we use it in our, for example, content delivery network. We use this cache, for example, in engines. We use this cache in services which are related with some operations we send in files, for example, photos.
If some photo became very popular, we could copy this photo to the cache closer to the user so we could save a lot of IO and network. The other feature is that Elliptics provides you
an ability to start your own program on the same node when your data is stored. It's server-side scripting. You could write your own program on Python, C++, and many other programs, languages, sorry, and you have a guarantee that your worker
would launch on the proper node and you need not copy any data through network. Elliptics is easy to use and easy to enlarge. It has a rich and powerful Python API. It supports asynchronous operations, so you could implement a really good scalable applications using it.
Of course, we provide C++ and Go API, and we have, of course, HTTP interface for our storage. It has brackets and keys like S3, S3 interface, sorry, and it's not compatible, but full S3-compatible interface is being developed now.
Oh, I'm sorry. It's quite obvious that it's impossible to store billions of keys on ordinary file system, for example, on X3 and so on, so we implemented our own backend for Elliptics storage. It's named eblob.
At the first glance, it looks like a simple, large binary object, and you just append that data to the end of this file and marked deleted keys as deleted. But there is a lot of broken science in this part of Elliptics, and it's extremely fast.
So the bottom line is if you need distributed storage in your own project and you could not rely on S3 because of big browser or something like this, I think I'm pretty sure that Elliptics is a good choice for you. Thank you. Thank you, Anton.
The next one is Austin on being super, and Mikko Ottama is the next one. Mikko, are you there? Okay. If it works, that is the big deal.
I can't see you, Mikko. There we go, okay. There you are, thank you. Great, hi, my name is Austin Bingham. I work for and part own a small software company in Norway called 60 North, and I wanna talk about on being super. So who here uses super? So just raise your hand. So nearly everybody, that sounds about right. Who knows how super actually works?
Much smaller hand. Who knows about the super proxy objects and method resolution order in the C3 algorithm? Okay, all right, so basically a lot of us use super but don't really understand exactly what's going on inside of it, and that's the position I was in a couple months ago when I had to develop some training for somebody
and I wanted to know how does super work? I use it for literally more than 10 years knowing that super is how I access the base class implementation. That was my model of it. I'd never had to really get any fancier than that. But as I looked into it, I learned that actually super is really fascinating and it opens the door to a wide variety of really interesting design choices and so I thought it would be a great topic for something like a five minute lightning talk format.
So here I am. So the first thing you need to understand to understand super is method resolution order which a lot of you probably know already because you can use or you use method resolution order all the time implicitly even without super. All it is is an ordering of an inheritance graph. And so here I've created A, B, C, and D, a standard diamond, well maybe not standard,
maybe not a good idea, but it's a diamond inheritance graph and you can see the MRO for D in the end there is D, B, C, A, and object is of course object is always in there. So it's just an order that Python has come up with for all of the classes in an inheritance graph. As I said, this is useful, this is used for all method resolutions. So you call D.foo,
then the method resolution order is used by Python to figure out which of these objects, which of these classes, I'm sorry, implements foo. And the first one that has foo is the one that gets used. That's fundamentally what MRO is. So how is MRO calculated? It can't just be randomly chosen, it must have some order. That's what the C3 algorithm is, or C3 linearization is the computer sciency term. This came out of the Dylan language I think,
I don't know, many, many years ago and now it's used in Python, Perl, Dylan, probably some other languages. It's very popular for dynamic MRO calculation. It has three basic things that it guarantees when it calculates the MRO. One is that drive classes will come in the MRO before they're base classes. So it guarantees that. It guarantees that whatever base class order you give
in your class definition is also preserved. So the relative ordering is always preserved based on what you tell it lexically. And finally, the first two constraints are conserved anywhere in an inheritance graph. So the relative ordering of classes is always the same no matter where you start. These are the rules that C3 provides and that's how Python resolves functions,
methods I should say. C3 brings with it a little bit of baggage. One of the interesting side effects is that not all inheritance graphs are legal. So in this case, you see I've created another inheritance graph where D inherits from B, A, and C in that order and because of the guarantees that C3 wants to make, or is going to make, it's telling you it can't do that. It can't have A before C because A has to come after C
because A is a, is that a bell I should be concerned about? Okay. I don't know what's going on here, really I don't. So you can get yourself into a hole. You may have seen this, maybe not. I'd never seen it but I thought it was interesting. So that's C3. So finally we come to super. What is super actually doing?
And this is the most pithy terse explanation I can come up with that's not a poem which may have been a good idea. But given a method resolution order, some MRO calculated by C3, and a class C in that MRO somewhere, super gives you an object which will resolve method calls using everything after C in that MRO. That is the definition of what super does.
Does that make sense? Yeah, read it a few times later if you want. When you call super, what you're actually doing is creating a proxy object, a super proxy, and that's the workhorse of super. That's the thing that embeds all this logic about looking in the MRO in the right place and using the tail and so forth. So I had this nice picture of, not really horses, it's a horse and a donkey.
One of them is named Sir Henry, which I thought was a cool name for a donkey so I put it up there. They're the workhorses of super. Super proxies are, like I said, just regular objects. You can take a reference to it, you can interrogate its type, you can see that it has a little dunder thing in it called this class which is the class type you passed as the first argument. So you can examine super a little bit and get a better sense of kind of
how it's put together and what it's doing. So in summary, I think I'm well in time here. One, Python calculates an MRO for all classes. You might have known that already. C3 is the algorithm that does that. Super requires an MRO and a starting point in that MRO. That's how it knows what to trim off of the MRO. And finally, super proxies find the first class in the rest of the MRO that supports the function
that you tried to call and that's how super works. Thank you. The next one after Michael will be Dimitri Milajev.
I hope I pronounced that arbitrarily wrong. There you are, I can see you, thank you. Also, would somebody mind to share what the ring was about? Is that a nice message or? Please, turn off your phones. We all will be happy with that. Hello Berlin.
So, who is having fun in your Python? Please raise your hands. Once that is, come on again. Very good. My name is Mikko and where I'm coming from, you are going to have more fun.
So we are going to have a PyCon Finland and I'm here to tell you why should come go there. At the first of our, we are having fun now, so let's compare Finland to Berlin, so. First of all, we are a little bit smaller community there, so we are still maturing, so we need a lot of guys
to come to see us and tell us that the Python is good. I'm especially proud of our little PyLadies community. We started like one year ago with two members and now we have 60 members there.
And then, of course, in Finland, it's not the Berlin, so you can use your laptop for the purpose it was created, which is forming up your labs. Also, a lot of cool technology comes from Finland,
so if you like Linux, SSA, or IRC, you should come to pay us a visit. Looking for our freedom.
And we are the only PyCon in the world where we have a sauna party. I need to tell the truth that I'm not actually one of the organizers and because I'm not the organizers, I can't make any promises,
so if there is no sauna party, you are invited to my home. I have a sauna for three people. And what I hope that you would do now that you go to vai.pycon.org, and what we lack in Finland is a good speaker, so we have other problems to have these foreign superstars come to our conference,
so if you have a talk in PyCon, please reuse that talk and come to tell the talk again in our PyCon in Finland. Thank you.
Lynn, are you around? I can see you here next.
Okay, my name is Mitris Milajevs. I'm a PhD student at Queen Mary University of London, and I'm doing computational linguistics 24 hours, seven days a week. So this talk will be about distributional semantics. Semantics as a study is all about meaning, and because I'm doing languages,
so it's meaning of sentences and meaning of words, and the main ideas of the whole field can be said in these two sentences, so you should know a word by the company it keeps, or a little bit more formally, that semantically similar words tend to appear in similar contexts.
So if you think about it, then you will see words like beer or wine occurring together with, I don't know, bar and parties, and probably such words as Python will occur with some different words, right?
So, oh sorry, this IPython is a bit confusing. So now we can, if we get a big text, we can just look to it, and for every word, we will look, what are the other words, our word of co-occurs together?
So for the boy, we will, no, okay, we see it with A one time, and we see it with might one time, and so on and so forth, and then we do it on many other sentences, and do our counting, and we get something like this. So we got our boy, and we know that it was together with time about 100 times, and together with year about 102 times,
and then we do the same with goal, and what we notice, that this number's kind of similar-ish, right? At least they're not, the pattern is different than to notion and idea, right? So we can measure a way of similarity. So how can we do the similarity thing?
What we're going to do is that we will see these words as vectors in a multidimensional space, and vectors, these are just some directions to points, and between two points, you can calculate the distance, or you can calculate the cosine between these two points, right?
So that's what we are going to do. So you seek it, learn, and ask us, okay, given these vectors, please calculate the distance, and what we see, that indeed, boy is much closer to goal than to notion, and we would expect it.
So can we go even further? Can we actually make it visible to us? So now our vectors, they're kind of in a so huge multidimensional space that we cannot even imagine how it looks like. So what this code is doing,
that it's, it tries to get the same points on a two-dimensional space, and tries to preserve the distances. So why it's two dimensions? Because then we can easily plot it. So and if we plot, we get something like this. And so here you see that boy is close to the goal,
mother is close to father, and all the family words, they cluster nicely in our field. And then kind of business-related words are here, and colors are there, and so on and so forth. So that's what distributional semantics is about. Though my main message is this.
Oh, sorry. So it was really few lines of code, but there were some intuition behind. So some science was behind. And if scientists tell you, they kind of know what to do, but developers know how to do things.
And if you connect these two things together, you can achieve very great results. And it doesn't really apply to linguistics, it applies to any science. And I really encourage you to look for some cool scientific results if you're a programmer, or learn programming if you're a scientist.
Thank you. The next afternoon will be Harut Dageshan.
All right. Oh, awesome, my turn. Okay, hold on. I don't have slide notes, but I can kind of makeshift. Hold on. Oh, dammit, it's not set up right.
Totally unprepared. Okay, so first a little bit about me. I am Lynn Root. I actually live in San Francisco. I am a backend developer for Spotify. I am also leader slash founder of the PyLadies of San Francisco, and a board member on the Python Software Foundation.
So earlier, Mikko from PyCon Finland talked about them having PyLadies for about a year now, which is pretty awesome. Side note, you should all go to PyCon Finland. I spoke there last time. It was awesome. And you might be wondering what exactly is PyLadies. So PyLadies is sort of a mentorship group
for women and friends in the Python slash open source community. We're there to support women in diversity. We've been around since the fall of 2011, and PyLadies San Francisco started in April 2012, and we're now up to like, I don't know, 1,800 members. And we have about 50 locations
all around the world except Antarctica, which is kind of the purpose of this talk. Maybe you can get a little PyLadies in Antarctica, little penguin PyLadies. So why would you want to start a PyLadies? I'm presenting about PyLadies. Why would you want that? It can be, it essentially is the motivation
for you to learn or to better your Python knowledge. I started PyLadies by wanting to learn how to code in Python, and got some friends with me, and it kind of blossomed from there. It also gives you leadership and organization, and it creates sort of a networking kind of web for you so you can kind of find jobs or build your resume.
And also, we kind of want to take over the world, so that's kind of awesome. How can you get PyLadies? You can pip install it. I did, I created a Python package right before PyCon,
and it's up on PyPI, so you can go grab it. Yeah, there is literally PyLadies on PyPI. So many people ask me about that. Yes, there's literally, not figuratively, literally a Python package. So pip install PyLadies, and then run PyLadies handbook. And what it does, what it gives you, is it's a handbook and a checklist
on how to start your own local chapter. And it has some assets and images so you can promote PyLadies. Some workshop materials so you don't have to create your own workshop. A lot of them are beginner workshops. And I am still developing it, and we'll have more scripts and stuff for local organizers to work with Twitter and Meetup
and data mining about our Meetup statistics. So if you don't want to pip install it, you can also go to kit.pyladies.com to see what it's about. Let's just read the docs. And basically, I wanted everyone to be able to have their own PyLadies.
Thank you. And the next one would be Radomir Dopieradsky.
Radomir, are you here? All right, thank you. It's okay? I don't know. There's the screen down there.
I think it's coming up. Oh, it's coming up. It's there. So, okay, if I try. Oh, it's, sorry, I think it should be.
I can't help with Russian. Cloned. Okay, I just move here. Can you move it over there and there, say, do you see that screen over there?
There's another screen down there. Maybe you can use that for the moment. I just move the presentation there and show this way. Okay. My name is Harut. I want to present our forms, like Django or WT forms, but our forms purpose to validate user input,
convert that input from form representation to Python internal representation,
render the forms, and our key feature is that they work well with nested data. So we have a little bit different abstraction layers The main object is form.
It contains nested structure of fields. Field represents a single atomic, single maybe atomic or maybe complex structure of data. Every field has converter,
has widget, has permissions, and has data before converting and after converting. So here is the form. To create your own form, you should subclass form, class,
and define a list of fields. Here you can see there are nested fields and to use form you accentuate it with initial data. Then call accept with data you want to convert
and either get data in form Python data or get errors. Here you see result of conversion of nested structure. So converter is object with two main methods.
One is to Python which accept unicode string and returns object of type of whatever type you want. And the second method does
revert, reverse conversion. And you can define validating functions that just validate or do simple one side conversions.
And from these methods you can throw validation error which is written in form dot errors. So you put converter in the field and validators as arguments to converters.
Converters can be required or not required. There is implementation of multi-dip features that allows us to add values under the same name.
List of converter with nested converter. Here you see implementation of multiple selects by list of converter. You can easily tweak converters by copying them by call.
And here is an example of implementation of a little bit complex converter that converts, not implementation, use it. That converts SQL, that converts
dictionary to SQLAlchemy object. So widgets are a little bit simpler. They just take a field and render them to the template.
You can render the entire form or single field. And where do we use? It is our CMS with some keywords presented.
So here it is. Laris Butler, are you there?
Is it you? Hello everybody. My name is Rolando Pirovski. I'm, you know, there is a saying that Python is going
either to save the world or destroy it. And I think there are enough people working on the saving part, so I thought I will work a little bit on the destroying part. So this is a hobby project of mine. It's a killer robot that's going to run around and kill everybody.
It's made with a Raspberry Pi inside and programmed in Python, obviously. It started as a, actually as a mechano set thing with some Arduino attached to it, but that didn't work too well.
So I got a server controller for it and it's a programmable kind. So I thought, oh great, I can program it. It came with some language based loosely on Fort. I don't know if you know Fort. It wasn't as easy to program as I anticipated.
Then I decided to upgrade the robot and give it another knee. So it has three degrees of freedom per leg. And thanks to that I can make it move much smoother and I can make it tilt and do all sorts of cool acrobatics.
But because of that I had to do something called inverse kinematics, which involves a little bit of math, mostly trigonometrics, and a little bit of linear algebra. And doing that in anything but Python was too painful for me, so I decided
to remake it again and put a Raspberry Pi inside. And also to put a bigger battery because all the extra servers were too much for the three AA batteries that I had in there. And it's growing, it's still growing. Right now it has a gyro sensor,
so it can sense when you tilt it or when you pick it up or things like that. It has an audio, it has a speaker connected to it so it can talk, for example, the voices of turrets from Portal, very useful. Like, hello friend, I'm going to kill you.
And it's coming on nicely, unfortunately. I was planning on bringing it here and showing how it works, but unfortunately just before the conference it burned three servos in the legs. So I decided no, I'm not going to risk that.
But this is how it looked like recently. And that's all, thank you. It's called Kubik, so you can Google that and see it.
We are making very good progress. Everybody who's in the overflow slots has a very good chance to actually get the talks in here. Dimitri Semirov, are you around? Excellent, get ready. Works, hi everybody. So I got to practice this elevator pitch
when I was at the OpenStack Summit in Atlanta a few weeks ago. So I've condensed that all for you to just a couple bullet points. So here we go. This is ZeroVM, and I work for Rackspace, by the way. ZeroVM is not ZeroMQ, it's not Docker. I can't tell you how many people asked me,
is that like Docker, after I explained it to them in a few sentences, so it's not Docker. Docker's cool, but this is not Docker. It is not a drop-in replacement for any other type of virtual machine. It's something completely different. It's not NaCl, but it's based on it. And if you want to know about NaCl, I'm not gonna explain that to you, just go read about it. It's pretty cool.
It's open source, and Rackspace is sponsoring it, but that doesn't mean it's a Rackspace thing. Anyone who wants to get involved in it can. Just to give you a quick comparison of different types of virtualization technologies, something like KVM would be in the far left column. There's no kernel, there's no operating system.
The overhead is extremely low. There's no interpretation. It starts up in about five milliseconds, and it's extremely secure, but of course, there are some limitations. A couple other key aspects. There's no place to get entropy from.
Time and random functions behave completely deterministically, so it's just like a pure function. If you give it X for input, you will always, always, always, always get Y for outputs, no matter what. And there's no persistent state, so you can't really ride a demon with this thing. It's more of like,
don't think of it so much like a program, but think of it as like a function. Your programs behave like functions, so you decompose your application to small, tiny, tiny, little programs. So of course, you need to do something with this, so for IO, you have to map all of your inputs and outputs beforehand,
and we do that through an abstraction, what we call channels. A channel on the host, on the outside of 0VM, can be a file, it can be a pipe, it can be a socket, whatever. But inside, it's just treated as a file. Everything looks like a file. And you can read and write, and you can declare, okay, read only, or read write, or whatever.
Like I said, it starts up in five milliseconds, no interpretation. The cool thing about it is that, this gets really useful when you have an environment where multiple users are running arbitrary code. You don't want them to talk to each other, probably. So the worst thing a user can do with his or her code
is to just crash itself. That's it. They can't break out. If you wanna read about how that works, there's a thing called suffer fault isolation. That's the core concept in NaCl, the Native Client. You can read about that. This means that you can embed it in data stores
like OpenStack Swift. And we've done this stuff today. It works already. We're still developing it to add some more cool features. So the cool thing about this is that you can send code to the data, do computations in place. And you have lots and lots of tiny little processes that live for just a few seconds, and then they're discarded and never reused.
If you wanna program on this thing, you can write in C or C++. We've also ported CPython 2.7. We're working on Python 3. And we also support Lua for some reason. Why is this interesting to Python people? Well, most of our developer tools are written in Python,
testing tools, and of course, the thing that enables this, the glue between Swift and ZeroVM is this zero cloud thing and that's written in Python, of course. Everything is Apache 2. It's all open source, so use it, contribute to it.
And if you wanna find out more about ZeroVM, check out these websites, come harass us on IRC or harass that Twitter handle right there. And that's all, thank you very much.
Another just gentle reminder, your phones have other settings than Ring. Klaus Brimmer, you're up next. All right, I see you.
Okay, so good afternoon, everyone. So my name is Dimitri Generalov. I work for Google and I'm here to talk about zombies and application frameworks. So first of all, why zombies? Let's get this out of the way first. So some guys a few years ago wrote a scientific paper
on modeling an outbreak of a zombie infection. And the math involved there involves solving as like a system of differential equations. And the SciPy guys actually made a cookbook sample out of this. And what I did with this was deploy this to Google App Engine. So just to show that it actually works, so here's my little website.
I can just change some values. Birth rate, press the simulate button and provided that my network connection is doing fine, it will show me the updated graph. I'm actually using my personal hotspot on the phone.
Yep, so it works. But wait, this is an App Engine application. How could I deploy SciPy and Matplotlib to App Engine? This doesn't work. Actually what I used here was a new feature of App Engine which is called managed VMs. And here's a link to some documentation of it.
And what is essentially what this allows me to do is to run the App Engine runtime on the standard Google Compute Engine VMs. Which means that I still get to use most of the App Engine APIs that are familiar like the data store, memcache, authentication. And in addition to that, I get to do a lot of stuff that wasn't previously possible such as running background threads and processes,
installing binary models which I just did. I can have direct network and disk access and I can even, with some caveats, direct the SSH into the machine running on the App Engine instance. And I also get the Compute Engine pricing. So unlike App Engine instances,
Compute Engine VMs do not really start in milliseconds, they start in minutes. So I actually have a long running VM and I have to pay to keep it running. But still, the pricing still is relatively nice. So how can this actually be accomplished? So in my app.yaml file, in addition to the standard App Engine stuff
that I usually have there, I add this key parameter which is called VM colon true. This means that I want to use this new managed VM stuff. When I do that, I also have to set up to tell which kind of instances I want and how many of them. So in this case, I'm still telling that I want manual scaling, I just want one instance.
And here, I specify the type of instance that I want to use. So like N1 standard one is just some, it has one core, it has some amount of memory, just the default Compute Engine instance. And this wonderful apt-get install line allows me to actually install binary packages onto my machine as it's installed. And I want to install NumPy, SciPy,
and the Matplotlib package. And now, once I have done that, I can actually go into the Google Developers console and check the state of my instance. So this is my instance, I can see its state, I can see its IP address, and I can even press the SSH button to connect into it. And I think I have an SSH window already open.
No, I don't, so let me open this again. And so this connects to the machine directly from my browser without any Chrome apps, without any native code, without any plugins. It's just a complete in-browser implementation of the SSH. And now that I have got there, I can actually, for example, get the list of processes
and peek a little bit under the hood. So what's actually running there, like there is all kinds of interesting Google stuff running there. And for example, you can see Docker there. And you can see through that that my application was actually deployed as a Docker image. So this feature is actually now in limited preview, so if you want to use it for your own stuff,
you have to sign up for the limited preview, so here's the link where you can do that. And if you have any more questions on this, then you can find me, I'll be around during the rest of the conference. Thanks, everyone.
Larry Hastings. All right, he'll be next.
Yes, my name is Klaus Bremer, and I like to talk about the Alpha-M Fritz box today. The box is a very popular internet XX router here, at least in Germany. And what you see here is a picture of an older model,
but that doesn't matter. Some time ago, I have tried to access this box by means of Python. But unfortunately, I was not able to find any library that allowed that. And so I decided to write my own one.
And I've named it Fritz Connection. And before you can talk to this box, you first have to know how this box talks to you. And this is based on UPnP and with style. And by the letter one, which is an XML-based dialect,
the box tells you about their own API. And once you know this, you can start to exchange data by means of SOAP via HTTP. And the API itself is organized in services.
Every service has a lot of action. And any action may get some parameters and may return a result that depends on the action. Yes, to work with Fritz Connection, you first have to install it.
That goes by pip install Fritz Connection. And then you may have to wait some time because it depends on requests and XML. And XML might have to compile, so this can take a few minutes. But afterwards, you are able to inspect the API.
So it's just a two-liner. You say import Fritz Connection as fc, fc to make a long word short. And then you say fc print API. You get the, you offer the, you send the address of your FritzBox, the IP address,
but that's not, that's optional because Fritz Connection knows how to find your box. But you may have changed the IP or may have more than one FritzBox in your network. And then you give your password. And as a result, you get a very, very long list
of all available services and corresponding action names. And the parameters for the actions as tuples here. The first item in this tuple is the name of the parameter. The second one, whether it's inbound or outbound. And the last one, the type of the parameter.
Once you know this, you can start to use the API. This is done by the method call action. And call action needs the service name, the action name, and optional sum parameters. And here's a very simple example.
You can say call action one IP connection and force termination as action name. Then the box will reconnect and you may get a new external IP from your service provider. And because it's hard to remember all the service names and action names, you can wipe it and here is a shorter call.
You can just call FC reconnect and it's done. There are more complicated examples for example this. There's a module named Fritz Host which lists you all active hosts which are connected to the box. This is a snapshot from my own home office as you can see.
And because this is a lightning talk, I see there is a repository for it. And there are a lot of links there to the documentation of the available service names and action names. And you can have a look at the code.
And if you say, well this code is quite ugly and I can do it better so please feel free to improve it. In this sense, thank you very much. Okay, exercise.
Pick up your phone, unlock it. Check the icon that says whether it's a sound ring, vibrate or silent. Make sure it's either vibration or silent. We are having currently one ring per lightning talk. I think we can get the ratio down a little bit.
Thank you.
Ladies and gentlemen, my name's Larry Hastings.
I was the release manager for Python 3.4 and I'm probably gonna do it again for 3.5. I'm here to tell you a little bit about how CPython works internally and show you a problem that we were having and how we solved it with a new tool. And by we, I kind of mean me. I did most of this. So let's talk about the problem. Here we have a Python interpreter and it's running your wonderful code
and you just happen to call os.doop2. You pass in two handles which are actually Python integers. So this goes into the CPython interpreter and it rolls around and around and around. It comes out here. This is posix underscore doop2. This is a C function that is the implementation of doop2 for CPython. How does this work?
And specifically, how do we turn those Python objects which are H and H2, these Python integers, how do we turn them into native C integers which is what the C code really wants to talk to? So here's posix doop2. This is sort of the external stuff. There's the docstring which is a C string and there's the external interface for doop2.
Most of it is kind of interesting. It returns a py object star. Everything that is an object in CPython is a py object star. It takes in a module and here it takes the args and kwargs and this is the interesting part or at least for this talk. Args is a pointer to a tuple and that contains the positional arguments.
Kwargs is a pointer to a dict and that contains the keyword arguments if there are any. But these are still Python values. How do we turn them into native C values which is what we want to deal with? This is it. You actually, it's up to you to write this code and so there's code that looks a lot like this all over the place in CPython.
Every time that you want to deal with a parameter, you kind of have to write it in a bunch of different places. So in Python 3.4, we added this new inheritable parameter to doop2 and we had to touch four different places. We had to add it to this keywords list so that it knew its name for a keyword parameter. We had to actually declare the variable and we had to tell it what type it was. This little I means it's an integer and the pipe means it's optional
and this inheritable, that's how it actually writes it in. We actually had to touch in five different places but we forgot one. We forgot to touch the docstring and the reason I point this out is because we're now up to five different places you have to touch when you add a new parameter and it's kind of an error prone process. So we were talking about adding a sixth one
to get introspection information. Right now, if you call inspect.signature on os.doop2, you don't get a signature back. We wanted to fix that but that would mean adding a sixth place and now this seemed like it was going to be way too much work. It was going to be way too error prone to manage all of these things. So I wrote a new tool. It's called argument clinic. The way this works is you write a comment
inside of your C file. It's literally a C comment with these extra funny strings at the beginning and the end and inside of that, this is machine readable information formatted sort of vaguely Python-esque kinda. It's not intended to look like Python. It's intended to be convenient for the person who's writing it. So you declare the name of your function, you declare your arguments
and you only have to write them once. Here you're declaring the arguments, you're declaring their default values, you're declaring their C types and you're declaring per argument docstrings which is just a convention for encouraging people to document more really. And then at the bottom, you have the actual docstring for the entire function. This is input to clinic.
Clinic runs over the code, finds this and then writes immediately afterwards in the C file its output. Its output is C code. This is similar to a tool by the way called COG written by Ned Batchelder which was a brilliant idea. So this is C code that's dealing with informing Python about dupe2. So there's the docstring and that's actually by the way
where we hid the introspection information. It's that funny looking first line. Here is a method def which is how we tell Python here's a function called dupe2, here's the function you should call when you call it. This is the external implementation of dupe2 and argument clinic writes that and that has all the argument parsing stuff and it writes a new function for you.
You write in the middle called dupe2 impl and you'll note fd, fd2 and inheritable, it's done all the conversion for you. It's now in lovely native C types and your code becomes much cleaner to read inside of C Python. All this upper code, this stuff, is actually hidden in a separate file so you don't even see it anymore. That's about all I got. If you wanna know more about it,
you can read the pep, pep436 or you can look at the source code. It's shipped with Python tools clinic clinic.py and it's only about 4,000 lines. Thanks very much.
The next one after Sebastian will be Stefan Schwatze. Are you there? I can see him, thanks.
Hi everyone, I'm Sebastian Kreff and today I'm gonna talk about pep 473,
adding structured data to built-in exceptions. It's a draft pep so if you like the idea or you have any comments, please contact me. I start thinking about this when I was working on doing TDD on a huge code base and either because I was lacking some understanding
of the code or typos, some tests would fail and the error messages are not helpful at all. So the worst example is index error. So you don't get back either the offending index nor the size of the container and it's even worse when you have a nested indexing
because you don't even have the offset. And so I started with a really hacky solution and instrumented by code to temporarily store some additional information about the index and the receiving objects which is open source by the way.
And then I have a test runner that collects all this information and output it nicely. So in this case, it's kind of much more direct to see that we have enough by one error and so we can go and fix the code without having to debug it or add extra print statements
or whatever method you like. And of course, the limitations of this is not portable. It only works with CPython 2 and also relies on the error messages which are not standard within the standard library itself. So I decided to reach the community.
I wrote to Python Ideas and they were really supportive and they put me to some preexisting issues related to this. Some of those are older than 10 years old and basically this PEP, what it is, it's a summary of all the attempts of all these people including Vito
trying to have more useful exceptions. So for the case of index error, we would add the target, the index which is just an alias of the key. And for example, for value error, we could have the unaccepted value.
So then test runners could get this information and try to do some automated debugging for you. The same could be possible in an interactive console like IPython or for diagnosing failing requests in a web application or long running processes.
And in the long term, the idea is with this information to provide uniform and normalized error message for all the standard library. So if you find this interesting and want to see it implemented or have any comments,
go read the PEP and send me an email. A small announcement. The local Bitcoin group, they are having their opening ceremony for their new office tonight at 6.30
in their office obviously. Go to their booth and check out the details if you wanna go there. The next after Stefan will be Mark Shannon. Mark, are you around? Excellent.
So my name is Stefan Schwazza. I'm giving a talk on Thursday about supporting Python two and three with the same code and I got a few questions on this yesterday. Yeah, what this is about and I thought I might say a few words
about this all for whom this is for. The talk's intended for developers maintaining a library for Python two and your users asking you all the time, please add Python three support. We need Python three, really we do.
Okay, but you are a bit reluctant maybe and don't know how much work this will be and of course, you are the user and you're waiting for someone else to port this library or adapt the library for Python three. Okay, the talk is not about all the differences,
big and small difference between Python two and three. There are other documents which summarize this quite nicely. One is of course, what's new in Python three or three zero actually and another one is porting to Python three or something.
A very good guide. The talk is about some differences between Python two and three, most really rated to Python versus bytes versus human code issues because this is I think the most complex part which might require real thought.
I mean, which is not so straightforward to get right. Okay, I discussed some steps to take to get to a Python three version of your library or Python two code. So it runs on both Python two and three unchanged and also some yard design, API design advice,
how you can do this and some other useful tips or best practices. I also want to give a sprint or offer a sprint on Saturday at least and possibly Sunday. I don't know how much of Sunday I will be here still.
So if you have a library that you want to port or adapt for Python three, again with the same source code for Python two and three, yeah, you're welcome. Yeah, thanks.
Think my counter ran out of power Okay This talk's called birthday, and you'll see why in a second right well You're a pythons really good, and it's even better if you it's your birthday hands up. It was your birthday this week
Just me oh no. I see some other people Good in fact. It's my birthday today. This is not just an attempt to get free cake and beer there is some other logic Well the birthday is just a number it's a number of team one and three hundred and sixty six
So it's just an arbitrary function mapping a person to some small number. It's a it's a hash function. It's eight and a half bit hash function so Right who's heard of the birthday paradox? Oh? Good number most of you okay for those who haven't
Hands up again whose birthday. It was this week actually whose birth is it today? So I can't see from here Somebody must have their hand up. It's got to be like at least 300 people okay Well, that's good, so that's quite a good hash function. It tends to do not too many collisions but the problem is
If you take a group of people and say find up more than heart the problem is you've more than half of them Having the same birthday you only need 23 people for that to be the case So that's your birthday paradox not really a paradox So you might think you've got quite a good hash function because of collisions is slightly different in fact if you've got an n-bit hash function
if you get close to two to the n over two items you're likely to have a collision so if you've got a hash function of 20 bits which gives you a million items you have a thousand entries good chance. You'll have a collision. You know a whole number of percent
okay, so Hash functions are useful for chopping stuff up into data, but they're sort of probabilistic so who's heard of bloom filters I'm not preaching to the converter too much, but definitely a fair bit Okay, so it's a probabilistic set. It's a way of using a hash function to say is
This a member of some set what it gives us to a nice property that we never get any false negatives But we might have false positives So if we're not do a bloom filter based on using birthdays as a hash We'd use 366 bits, but let's suppose we haven't got a big expensive server that has 366 bits of memory
But if you got this little laptop with 43 bits of memory So what we can do is we can break the hash up into different hashes smaller hashes and save bit of memory there By the way, if anyone actually does now bloom filters work They're probably wincing and I suggest you go and look at Wikipedia afterwards This is a kind of fun fun introduction. So I need two volunteers from the front row. Come on. Don't be shy. It's one
Go night some stand up here. We've just put your hand up. Okay, we've got two people right? Can I have your name? You are J o a are she's pronounced you are and the day of your birth
24th and the month 10 and sorry those gentlemen Peter Dimitri I can't hear very well up here. Obviously Dimitri and 24th it is not working well of October and yours was
Probabilistic data structures for you. Can I have another volunteer just to make this thing work a little bit better
another volunteer, please Okay So Yes, please Luis and Hopefully you're not born on 24th October 12th of December. Is that sorry?
1212 okay So we have our bloom filter and we're looking for you are or Louis. Yeah, Louis Sorry, not Dimitri because we've just scratched Dimitri because he had the wrong birthday So we have our bloom filter and Basically what we want to do is we can say probabilistically somebody's probably either you are or Lewis
We can't say for sure that they are but we can say they're surely if they're not So I want everyone in the front if you can see the microphone without turning your a microphone without turning your head You're at the front if you can see a microphone you're the back I want everyone the front to raise your left hand if your date of birth was the 24th or the 12th
Go on. Don't be shy doesn't work if you're shy Really there's like two or three people there you're out of time actually Too much fight back to mr. Thomas
I just wanted to show you to rather new projects the one is NS update dot info and the other is And the special thing is both were initially written in 48 hours It was a contest and it happened that I stood got a hacker space called check space
and I start with NS update info you maybe have used dynamic DNS service like no IP or DNS or some of the others But usually they want to sell you something and only some features are for free and other features are for pay
And also it's sometimes a bit difficult to find the free features because they have lots of features And we just thought we write a new one That's much simpler On this new service it's made with Django by the way
You can have one account, but you can have many hosts So you don't need to create a new account for every host it helps you configure your router You even have a small browser based update client if you have no other update client. This is for a talk usage You can update hosts in your own domain if you run your own name server and
You can even update other services that are based on the dynamic DNS Protocol and it supports IPv6 also, and it uses SSL of course So it's on github and as update minus info is the organization It's BSD licensed Python Django bootstrap jQuery and a library called DNS Python
That does all the low-level DNS stuff You can run your own instance on your own server. You need the software a web server whiskey a name server and Database server, but you can even use SQLite 3 so no big data, so no big database needed
I maybe show shortly a few pictures Looks like this if you are not logged in it shows your IP if you have IP v6 connectivity also shows the IP v6 address
This is the login screen you have a local account or you can also log in with github or bitbucket or Google This is if you have created a few hosts on the left you can create a new host It's just typing in some name selecting a domain. It also shows your reverse DNS
This happens after you created a host it shows you're ready to use DD client conf You just copy and paste this piece of text into the config and it immediately works So creating a new host is about two minutes, maybe
This look is the screen if you edit a host you can change the IP and so on and You can add new domains if you control a domain name server And if you add a new domain it even shows your bind 9 config if you copy and paste this to your bind Installation it also will immediately work and accept updates
Statistics and There is even documentation It's on github. Have a look the other project is paste bin oops There are lots of paste bins usually you just paste text into them
We wanted to create a new one that accepts every content type so you can paste PDFs or upload PDFs you can upload images video audio binaries if it's texted you get
Highlighting as usual if it's other content you get just the appropriate rendering if possible you can drag and drop multiple files If you have a modern browser you get file lists if you drag and drop multiple stuff There's a simple permission system in it, and it can even deal with large files efficiently. It's also in github
It's called be pasty. It's BSD license Python floss bootstrap jQuery and so on and General we need your help if such a project is interesting for you. It's good fraud newbies also It's rather small projects. Just join us contribute your ideas
Buck fixes security reviews you find me on Twitter, and I'm also here for the sprints Okay, thank you Kristen Heimers, are you around all right excellent and after Christian?
There's gonna be a rock rock Did I see you all right excellent?
No doesn't start oh, so it's not wrong display
Hmm, okay, let's find this way doesn't switch over
Okay, so hi. I'm Christian Heimers I'm a professional paranoid Python cock emitter one of the guys that takes care of the security of C Python So if you want to know more you can reach me on Twitter or on email so I like to tell to you what we'll actually do at the
So You know today. I like to talk to you what we actually do with C Python core Security we have a Python security response team That's the team that interacts with all incoming back reports We work rather closely with redhead in Google and also with core developers from other teams
For example at one time we had a issue that was first detected by Ruby guys Later, I ported the security fix for Python to PHP so we were able to fix the issue on all three
projects Also, we are using a tool called the verti scan. It's a commercial tool, but free for open source It's a static C code analyzer Or this you were able to can find C Python Yeah Ready define this limits defect descent
density for different kinds of projects in size so for Python it would be about Dot five but actually today, it's so we just have two outstanding issues because Updated the tool chain to a new version and take the two more issues. I'm about to call it in a couple of days
We got some new things. I'm played this path it replaces the old hash function used for dictionaries and So the thing that has the strings and unicode brings to hash with zip hash 24 from DJ Bernstein
Another guy implemented This PAP. It's basically it ensures that father script. Those doesn't get leaked to sub processes it's especially important if you have a root demon that starts some other processes that are
Nice That should not get sensitive informations That's isolated mode a new feature to the dust something so Console script doesn't get poisoned by the user site directory or some and farce
Was you random got a bit optimized for Python 3.4 use persistent file descriptor Eventually, we're going to use the new shiny get random this call. You know, it's getting these days Windows be using this function. Oh, and by the way
You're using you want to have any random secure? Random numbers don't ever use the random material it's used as a twister and if an attacker is able to get this amount of Outputs it can guess any future outputs. It's
624 so not much This is another feature. I implemented for Python 3.4 It's a password based heater edge key duration function, too While I was implementing this I found a docile number T nope Mrs. L in their implementation by the way the same issue Django had a while ago
So and if you're dealing with passwords never ever use anything else than these three functions B-written s-group are fine, too And you knew this function and Python 2 or all of versions Please use my library because much much faster than any other libraries currently on the market
There's also some change in the hmag module with Python 3 or 3 we already had This computer digest comparison function Python 3 to 3 3 or 4 we get another one and the good thing is So almost all the time so skipping to the end
several of these features will be back ported to Python 2.7 7 so really new teachers except for security
After rock the last slot will be for That's one name. I really don't know how to pronounce Your exactly you're next
Hi guys. I'm rock. I work for road code And as any of you you I install my software
And as a developer, I install it even more often. I'm more multiple versions different project different platform not only Python Therefore I usually broke my system Not anymore since I switched to mix Nyx is a package manager. You heard the talk this morning from my
Friend Doman about it the internals I would just like to go through all the features it offers and invite you at the end of the Europe item to join us to sprint and Make sure you don't break your system by just developing on your project
So Nyx, it's It's portable it works on any Posix platform which means Poor Mac OS users could actually now drop go away from homebrew because we ship also binaries
So, yeah, we have a transparent source binary model So if it's the binaries are not found. Yes, we'll compile them for you if it's needed Which we support multi-user and multi-version Solution to the problem so you can work you can have
Different Python versions installed at the same time in the same environment and they do not conflict We make sure that every installation you do it's reliable and it doesn't break anything outside of that installation
Even though even sometimes happen that some installation break all the installations are atomic in if something goes wrong if the installation is Installed application is installed successfully. You can always roll back to previous version It's reproducible the thing that bugs me the most is when somebody does a false release on pypi
and somebody forgot to pin The versions then I'm developing at one point I end up with a broken development environment We make sure here with by default you get it's always working once you set it up
and Well all in all Nix is great for developers Think of Nix as a virtual end the tool you probably are all using but much bigger It's not only meant for Python. It's you can you use it for Any project any language specific project you have you can even bind them more together because I think nowadays
We are all kind of forced at least to to learn JavaScript and all the tools like they have so it's one tool to do the job and
Just to maybe because you're probably wondering yeah, this is a tool that looks again like Docker, right? We don't virtualize anything we think a packaging problem should be done by the on the packaging level We can output we can provision or whatever you want to call it Docker virtual box any images
But you can just use it for booting bootstrapping your development environment and not screwing up your laptop Thank you, and hope to see you on Saturday. We'll have a next corner and We can get you up and running for basically any
Development environment you need. Thank you As you all will be the last one and as we've been talking about sprints a couple times already Who of you is thinking about joining us on the sprints on Saturday? Can you show me your hands?
That is a good number. That is awesome. It looks like I would guess at least 50 60 in here. It's very nice Alright, my name is you are and I Came to a realization yesterday that
Set up I The dependency declaration for your program basically is Turing complete So I exploited that fact and I created a package Called deprolate you never know what you get So pip install deprolate and
Then it don't do it Just don't that's all thank you very much That was fast. You've got the shortest lightning talk awesome. It's 45 seconds