Bit about Bytes: Understanding Python Bytecode See James BennettWriting more efficient Python code.
I hereby solicit suggestions for the video of the day. Please email me your ideas with explanations. Selected entries will win 5 homework points. If your video is played at the beginning of class, you must also briefly explain something about the video and something about yourself — in person.
https://pollev.com/slade You may also download the app to your phone. Use the "slade" poll id.
The formation and revision of intuitions, Meyer and Frederick. Cognition, Volume 240, November 2023. Shane Frederick is a Professor of Marketing at the Yale School of Management.
“The Internet We Could Have Had“
Professor Chris Kelty, UCLA
November 4, 3:45 - 5:15 PM, Humanities Quadrangle, room 276Abstract: What was the internet we could have had and how is it related to the one we do? This talk will offer part of a book project on the moral and technical imagination of the internet as a global brain, a new economy, and a participatory democracy, and how it enabled instead an ad-revenue-driven social media hellscape of privacy violation, data extraction, and autocratic monopolies. In particular it will focus on the internet as an era of artificial intelligence, and offer a revision of the place of the internet as part of the technical infrastructure of knowledge and power. What are the implications--for science and politics--of automated data circulation, ennobled by an ethics of sharing, and mystified by the most expensive statistical clustering experiments in history?
Bio: Christopher M. Kelty is a professor at the University of California, Los Angeles. He has a joint appointment in the Institute for Society and Genetics, the department of Information Studies and the Department of Anthropology. His research focuses on the cultural significance of information technology, especially in science and engineering. He is the author most recently of Two Bits: The Cultural Significance of Free Software (Duke University Press, 2008), as well as numerous articles on open source and free software, including its impact on education, nanotechnology, the life sciences, and issues of peer review and research process in the sciences and in the humanities.
There will be a UNIX question, as in the first midterm. Here is a sample UNIX transcript (solutions) UNIX will cover through principle 3.
Review session: Today at 6pm on zoom. Check Ed Discussions for deets and slides.
From Rudy:
You can tell them that I also updated the original message with detailed answers - for those that can't (or don't want to) attend the session.
The version of Python on the zoo is 3.10. That is the version used by this assignment and the autograder. There were some major changes to byte codes in version 3.11, and for that matter, in version 3.9. See dis.html and specify version 3.10.
>>> def f(): ... a = 3 + 4 ... >>> dis.dis(f) 2 0 LOAD_CONST 1 (7) 2 STORE_FAST 0 (a) 4 LOAD_CONST 0 (None) 6 RETURN_VALUE >>> def f2(): ... a = 3 + 4 ... return a ... >>> dis.dis(f2) 2 0 LOAD_CONST 1 (7) 2 STORE_FAST 0 (a) 3 4 LOAD_FAST 0 (a) 6 RETURN_VALUE