~/talk

More About Generators

Talkat PyData London 2018 · 2018-04-26..04-29· [python]
slides:none on file

Generations of Python features start with PEP-255 and PEP-342 and the claim here is concrete: generators act as coroutines and sequencing primitives but rarely appear in data science because Python is slow for numeric work. The demo times a million-element moving average showing about 0.09s (NumPy) versus ~2s (pure Python/generators), then builds a working graph computation framework in ~82 lines using generators, dirty‑propagation and NetworkX drawing.

AI-written summary · about

  1. 0:00About PyData and introducing generators
  2. 1:50Hacking the Python print function
  3. 4:36Overview of the talk
  4. 5:32Review
  5. 6:25Three different implementations of the add function
  6. 8:15Adding a state variable, the difference between class and function
  7. 11:05A compute function with sleep
  8. 13:55Using the generator pattern with __iter__ and __next__
  9. 15:15Differences in approaches: laziness, storage
  10. 17:27What generators are
  11. 19:40Pipelines and nwise function
  12. 21:05Writing a basic scheduler with generators
  13. 23:05Why they are not what you think they are
  14. 23:40Timing code and Python not being optimal vs Perl for scientists
  15. 27:55Have some fun, computing graphs
  16. 29:10Implementing a graph structure with generators
  17. 31:20Improving the design with more laziness
  18. 38:00Final version of the code (propagation in nodes of a graph)
  19. 39:00Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.