Hi
user
Admin Login:
Username:
Password:
Name:
import madness # how to implement mergesort from scratch using only import statements
--client
nbpy
--show
nbpy17
--room mystic 12691 --force
Next: 11 Running Vintage Software: PyPI's Aging Codebase.
show more...
Marks
Author(s):
George London
Location
Mystic Theatre
Date
dec Sun 03
Days Raw Files
Start
17:00
First Raw Start
16:29
Duration
0:25:0
Offset
0:30:05
End
17:25
Last Raw End
17:29
Chapters
00:00
0:02:29
Total cuts_time
27 min.
https://2017.northbaypython.org/schedule/presentation/15/
raw-playlist
raw-mp4-playlist
encoded-files-playlist
host
archive
tweet
mp4
svg
png
assets
release.pdf
import_madness_how_to_implement_mergesort_from_scratch_using_only_import_statements.json
logs
Admin:
episode
episode list
cut list
raw files day
marks day
marks day
image_files
State:
---------
borked
edit
encode
push to queue
post
richard
review 1
email
review 2
make public
tweet
to-miror
conf
done
Locked:
clear this to unlock
Locked by:
user/process that locked.
Start:
initially scheduled time from master, adjusted to match reality
Duration:
length in hh:mm:ss
Name:
Video Title (shows in video search results)
Emails:
email(s) of the presenter(s)
Released:
has someone authorised pubication
Unknown
Yes
No
Normalise:
Channelcopy:
m=mono, 01=copy left to right, 10=right to left, 00=ignore.
Thumbnail:
filename.png
Description:
markdown
Recently I had trouble importing a module. So I started actually reading the documentation of the Python import system and realized that I had been writing Python for years without understanding basics like “a module is a file” or “importing a module executes it”. A few days later I had a terrible realization – it’s possible to implement a mergesort algorithm in Python using only the import statement. Actually making it work requires learning (and subverting) almost all of the import system’s underlying machinery. So walking through how it’s done creates an excellent (and entertaining) opportunity to shine some light on the darker corners of a system that Python programmers use nearly every day but can work for years without ever really understanding. This talk starts off with an explanation of the basic fundamentals of the import system, i.e. 1) What does the word “module” actually mean? 2) How does Python find the source code I’m importing? 3) What is Python actually doing when I import code? How is it different from compiled languages? 4) How Python uses namespaces to manage scope and keep our functions and variables organized! From there, things get pretty weird. The rest of the talk explains how the import system alone gives us the tools to emulate function evaluation and how that means that we can (but shouldn’t!) write algorithms using import statements instead of functions. I describe the classic mergesort algorithm and then I show how to actually implement it using imports (under the theory that nothing helps retain knowledge like watching it applied to a trainwreck.) I briefly discuss how “computation” is an abstract process that can be accomplished in more ways that we might intuitively realize. And then I wrap up with some practical advice on how users can avoid ImportErrors and a warning about the serious but non-obvious security risks of importing Python code.
Comment:
production notes
2017-12-03/16_29_55.ts
Apply:
16:29:55 - 16:56:02 ( 00:26:07 )
S:
16:29:55 -
E:
16:59:54
D:
00:29:59
(
End:
1567.0)
show more...
vlc ~/Videos/veyepar/nbpy/nbpy17/dv/mystic/2017-12-03/16_29_55.ts :start-time=00.0 --audio-desync=0
Raw File
Cut List
16:29:55
seconds: 0.0
Wall: 16:29:55
Duration
00:29:59
16:59:54
seconds: 1567.0
Wall: 16:56:02
Comments:
mp4
mp4.m3u
dv.m3u
Split:
Sequence:
:
delete
2017-12-03/16_29_55.ts
Apply:
16:56:02 - 16:57:25 ( 00:01:23 )
S:
16:29:55 -
E:
16:59:54
D:
00:29:59
(
Start:
1567.0) (
End:
1650.0)
show more...
vlc ~/Videos/veyepar/nbpy/nbpy17/dv/mystic/2017-12-03/16_29_55.ts :start-time=01567.0 --audio-desync=0
Raw File
Cut List
16:29:55
seconds: 1567.0
Wall: 16:56:02
Duration
00:29:59
16:59:54
seconds: 1650.0
Wall: 16:57:25
Comments:
mp4
mp4.m3u
dv.m3u
Split:
Sequence:
:
delete
2017-12-03/16_29_55.ts
Apply:
16:57:25 - 16:59:54 ( 00:02:29 )
S:
16:29:55 -
E:
16:59:54
D:
00:29:59
(
Start:
1650.0)
show more...
vlc ~/Videos/veyepar/nbpy/nbpy17/dv/mystic/2017-12-03/16_29_55.ts :start-time=01650.0 --audio-desync=0
Raw File
Cut List
16:29:55
seconds: 1650.0
Wall: 16:57:25
Duration
00:29:59
16:59:54
seconds: 0.0
Wall: 16:29:55
Comments:
mp4
mp4.m3u
dv.m3u
Split:
Sequence:
:
delete
2017-12-03/16_59_55.ts
Apply:
16:59:55 - 17:24:54 ( 00:24:59 )
S:
16:59:55 -
E:
17:29:55
D:
00:30:00
(
End:
1499.0)
show more...
vlc ~/Videos/veyepar/nbpy/nbpy17/dv/mystic/2017-12-03/16_59_55.ts :start-time=00.0 --audio-desync=0
Raw File
Cut List
16:59:55
seconds: 0.0
Wall: 16:59:55
Duration
00:30:00
17:29:55
seconds: 1499.0
Wall: 17:24:54
Comments:
mp4
mp4.m3u
dv.m3u
Split:
Sequence:
:
delete
2017-12-03/16_59_55.ts
Apply:
17:24:54 - 17:25:38 ( 00:00:44 )
S:
16:59:55 -
E:
17:29:55
D:
00:30:00
(
Start:
1499.0) (
End:
1543.0)
show more...
vlc ~/Videos/veyepar/nbpy/nbpy17/dv/mystic/2017-12-03/16_59_55.ts :start-time=01499.0 --audio-desync=0
Raw File
Cut List
16:59:55
seconds: 1499.0
Wall: 17:24:54
Duration
00:30:00
17:29:55
seconds: 1543.0
Wall: 17:25:38
Comments:
mp4
mp4.m3u
dv.m3u
Split:
Sequence:
:
delete
2017-12-03/16_59_55.ts
Apply:
17:25:38 - 17:29:55 ( 00:04:17 )
S:
16:59:55 -
E:
17:29:55
D:
00:30:00
(
Start:
1543.0)
show more...
vlc ~/Videos/veyepar/nbpy/nbpy17/dv/mystic/2017-12-03/16_59_55.ts :start-time=01543.0 --audio-desync=0
Raw File
Cut List
16:59:55
seconds: 1543.0
Wall: 17:25:38
Duration
00:30:00
17:29:55
seconds: 0.0
Wall: 16:59:55
Comments:
mp4
mp4.m3u
dv.m3u
Split:
Sequence:
:
delete
Rf filename:
root is .../show/dv/location/, example: 2013-03-13/13:13:30.dv
Sequence:
get this:
check and save to add this
2017-12-03/16_29_55.ts
2017-12-03/16_59_55.ts
Veyepar
Video Eyeball Processor and Review